Thursday, November 30, 2017

What is the purpose and function of the "Media Storage" application and the media scanner?


I want to know what the purpose of the system app "Media Storage" and the media scanner is for and why for any reason a user would choose to not scan media on boot.




Why "adb root" does nothing?


I have a OnePlus 6T. It is rooted by TWRP and Magisk. I have set ro.debuggable to 1. But when I type adb root it does this:


enter image description here


I cannot even use adb pull on system files.



Answer



On production (user) build of a ROM, you can't start adbd as root unless ROM or at least adbd binary is rebuilt with required modifications. Reason is the ALLOW_ADBD_ROOT build flag (1, 2).

That's why adbd Insecure was developed, which replaced the adbd binary with a modified one.


On a userdebug or eng build (or with insecure adbd binary extracted from any of these build types):



  • If ro.secure=0, adbd runs as root when enabled from Settings (Developer Options) (3). However adb root won't work (4).

  • If ro.debuggable=1, adb root will restart adbd as root (5, 6).


However adbd can be built from modified source code to skip all these checks. Additionally SELinux should also be taken care of, if in enforcing mode. adbd must be allowed to run in unrestricted superuser context: u:r:su:s0 (7, 8), which isn't the case for user builds (9, 10, 11). See this answer for more details.


Android properties can be overwritten using /data/local.prop on userdebug/eng builds i.e. if ALLOW_LOCAL_PROP_OVERRIDE build flag is set (12, 13). But this doesn't work for ro.* properties (14) and same is true for setprop commandline tool. However default.prop / prop.default file - which could be located under multiple possible locations depending on the device build configurations (15) - can be modified to change read-only properties (if not already set from some other property file or *.rc file). If the file is in ramdisk, boot.img needs to be modified.


Magisk's resetprop tool can reset the read-only properties even if they are already set. ro.secure and ro.debuggable both may have possibly been changed as a part of MagiskHide policy (16), which you can revert back to allow adbd run as root.


Another related property is ro.adb.secure, which controls public key authentification. By setting ro.adb.secure=0 on userdebug/eng builds, authentification is skipped (no device unauthorized message ever) (17, 18, 19). Related: Storage location of “adb_keys”.



security - Why does every application run as a separate user under Android?


If it's for security reasons, so that one application cannot harm another, why is it not like that in the desktop Linux distros?


If desktop operating systems do prefer interaction between applications, why isn't it the same in the mobile ones? What's the difference?


What needs does a desktop Linux have that justify interaction between applications, that Android doesn't have?



Answer




Why does every application run as a separate user?




Because Android enforces a far stronger process isolation as traditional (desktop) operating systems like Unix, Linux or Windows, while still allowing interaction between applications (IPC is one of the strengths of Android) secured by a good security model.



If it's for security reasons, so that one application cannot harm another?



It is mostly for privacy reasons, but also comes in handy from a security perspective. The strong isolation of Apps in Android guarantees that no App can affect another App.



why is it not like that in the desktop Linux distros?



Most modern desktop multi-user systems have the focus on isolating users. Processes are also isolated, but not as strong as on Android. For example, if you install a program on Linux or Windows, it will have full access to your private user data. On Android, if not special permission is granted, it will have only access to its own data.


A while ago, the fact that Android apps that request the READ_EXTERNAL_STORAGE permission also get access to the users pictures residing in /sdcard/DCIM was a big shop stopper. Somehow, nobody seemed to remember that under a normal GNU/Linux or Windows installation, every installed app that is run by the user has full access to it's private data.



Android is a few steps ahead compared to traditional operating systems when it comes to permissions and access control for normal end-users. Typical Linux installations for end-users don't expose those features yet. Likely because nobody has written nice, user-friendly GUIs for them. And if there will be ever another Windows version after Win8, we likely see a similar permissions system there too.


external sd - How to access sd card from computer in marshmallow


Recently I upgraded my cell phone from Android Lollipop(5.1.1) to Marshmallow(6). While setting up the SD card, I choose Use as internal storage option. Now when I plugin my cell phone to my computer I can not see any SD card. So I can not read or write in it externally. Is there a way of accessing the SD card contents through data cable from computer?


I need to mention that, I tried with the option Use as portable storage but faced with the same problem.



Answer




I found a solution of this problem. Each time I connect my phone to my computer I have to go to Settings -> Developer options -> Select USB Configuration and select MTP(Media Transfer Protocol). Then I can access the SD card from my computer. It turns out that whenever its needed to connect the phone and the computer this procedure is to be followed.


Wednesday, November 29, 2017

linux - Failed to start emulator: No such file or directory


Alright So I downloaded the android SDK bundle for linux because I want to start making some apps, but i've ran into a couple of problems here.




  1. when I tried to create an emulator through the AVD Manager, and I tried to run it, i got the following error message:


    Starting emulator for AVD 'AVDTEST' Failed to start emulator: Cannot run program "/home/luke/adt-bundle-linux-x86_64-20140702/sdk//tools/emulator": java.io.IOException: error=2, No such file or directory





If you look, you will see that there is an extra slash before the tools directory, so I'm asking if anyone knows where I can go to change that path.


Also, the bundle didn't seem to come with any documentation. Am I just missing it or is it all online somewhere?


UPDATE: I tried running the emulator explicitly from the command line, but, even though I can clearly see that the file is there, and I am now providing the correct path, I still get the no such file/dir error.




applications - How to transfer apps, contacts and settings between two identical phones?


I'm having trouble with my new Samsung Galaxy S Vibrant running 2.1. It constantly reboots and I'm going to return it for a replacement unit. How can I transfer all of my phone settings, contacts, apps, app settings and pictures/movies from the old phone to the new one?



Answer



Lookout should do all, or at least most, of this for you.


(Warning: Market-speak follows)



Your mobile device is your most personal computer. It contains your personal data including contacts, photos, video, e-mail, and text messages. Backup your data and keep it safe and secure.



Whether you accidently delete data, your phone is lost, or even destroyed--your data is safe. You can restore any data with the click of a mouse. Changing devices is just as easy and your data can be transferred in seconds.



Tuesday, November 28, 2017

motorola xoom - Install Google Chrome for old tablet / phone


I have recently recovered my old tablet (Motorola Xoom Wifi). I am now on Android 4.1.2. The only important thing I am missing after recovery is Google Chrome.


I can see the application on the Google Play Store as Chrome Browser - Google, however the store indicates me "Your device isn't compatible with this version". I remember having some Google Chrome on the Xoom before recovery and I remember seeing the same message when I was offered to update Chrome recently (last few months). Is there some archive I could download older Chrome versions from?


What are my other options? Would rooting the tablet and installing Android 4.4.2 allow me to install the recent Chrome?


Is there some way to check what exactly does the new Chrome require my tablet does not have?


The only browser I have available now is the "Browser", and while it works, I would definitely prefer using Chrome.



Answer






  • I have Chrome 54.0.2 840.68, which is a prior version to what is available on the play store




  • Min API level is 21 and targetted is 25, which corresponds to Android 5.0 and 7.1.1 as can be seen here




  • API level was read using manifest viewer




  • Incompatibility warning is being shown as your Android version is not supported. Options you have and associated risks are explained in the accepted answer here Chrome Browser is not supported on this device (Samsung GT-P7500). That leaves you with choices of:





    1. Upgrading your Android version




    2. Accepting security risk of using earlier version downloaded from a secure site as commented




    3. Using a different browser







stock android - Why is the '/storage/emulated/' directory inaccessible?


The /storage directory and the /storage/emulated/0 directory is accessible in a non-rooted Android OS.
So, why is the /storage/emulated directory not accessible in a non-rooted Android OS ?



Answer



On Android 6+ /storage is a mountpoint where tmpfs is (bind) mounted (from /mnt/runtime/default) with mode 0755 i.e. it's world-readable.


For every app /storage/emulated is a bind mount in an isolated mount namespace, from /mnt/runtime/VIEW/emulated which is an emulated/virtual filesystem from /data/media having mode 0711 and owner root. So the directory is only traversable, not readable by non-root users that includes all apps.


VIEW is one of read (for apps with permission.READ_EXTERNAL_STORAGE) or write (permission.WRITE_EXTERNAL_STORAGE) or default (for all other apps and processes running in root/global mount namespace i.e. outside zygote).


/storage/emulated/0 is traversable, readable or writeable to apps depending on the status of manifest permissions READ/WRITE_EXTERNAL_STORAGE.


These measurements are a part of Android's app sandboxing approach for better isolation, security and privacy.



Related: What is /storage/emulated/0?


4.0 ice cream sandwich - Rooting failed htc one x : adb server is out of date


Tried to root my mobile HTC One X AT&T Build number 1.73.502.1 710RD ATT US edition referring the following link.


Root HTC One X



Restarted twice but the phone was not rooted.


    adb server is out of date.  killing...
* daemon started successfully *
** daemon still not runningerror: cannot connect to daemon

DON'T TOUCH THE DEVICE OR UNPLUG WHILE ROOTING!
PUSH FILES
adb server is out of date. killing...
* daemon started successfully *
3388 KB/s (2005736 bytes in 0.578s)

adb server is out of date. killing...
* daemon started successfully *
2874 KB/s (91980 bytes in 0.031s)
adb server is out of date. killing...
* daemon started successfully *
3240 KB/s (570342 bytes in 0.171s)
adb server is out of date. killing...
* daemon started successfully *
adb server is out of date. killing...
* daemon started successfully *

adb server is out of date. killing...
* daemon started successfully *
adb server is out of date. killing...
* daemon started successfully *
adb server is out of date. killing...
* daemon started successfully *

REBOOT
adb server is out of date. killing...
* daemon started successfully *

** daemon still not runningerror: cannot connect to daemon
adb server is out of date. killing...
* daemon started successfully *
adb server is out of date. killing...
ADB server didn't ACK
* failed to start daemon *
error:
AGAIN REBOOT
adb server is out of date. killing...
* daemon started successfully *

adb server is out of date. killing...
* daemon started successfully *

Does rooting require bootloader ?




Monday, November 27, 2017

Can I, simultaneously, run two instances of the Facebook app?


Can I, simultaneously, run two instances of the same Facebook app?
(which is installed once in the system)
I want to be active on two accounts (I also have iOS and Windows Phone devices if their support for multiple instances of an app is better than Android's.
But my Android phone is my main phone, hence I prefer an Android solution)
Also can I get parallel notifications from both the accounts (I don't need any chat messages, just the notifications from a specific Facebook group on my second account).




Attempted multiple solutions for malwares like androidSystem, timeService and monkeyTest, but to no avail


My Micromax A106 is affected by viruses called timeService, monkeyTest, androidSystem and some unknown ones.


These viruses started automatically even though I uninstalls, disabled and stopped them. Because of them, performance of mobile is very poor, not responding properly for my action.


I didn't even install any app. My mobile have only 16 apps.


When I switch off and then switch on the mobile, the apps like Privacy guard, 9 apps, cool browser, easy touch (1), easy touch (2), hot video, and some more unwanted apps are installed automatically.


I'm unable to uninstall them. If I uninstall them, they automatically get installed without my knowledge.



SOLUTIONS TRIED:




  1. I tried by installing all the antivirus apps available in Google Play like Norton, Avast, AVG, Kaspersky, Trojan remover and more. Nothing happened.




  2. Formatted Internal and External SD cards.




  3. Factory reset the device.





  4. Enabled the security options to not to install from unknown sources.




I tried most of the solutions available on web. Nothing works for me.


Anyone help me to resolve and relieve me from this issue.



Answer



I followed carefully every step and got rid of the issue. It will be very helpful to those having this issue.


All the credits goes to Nuh99 who posted the thread (with solution): FIX for Monkey Test & Time Service Virus. (Without Flashing) on XDA Forum.



Follow the instructions:




  1. Install following apps in your mobile from Google Play Store



    1. Busybox Installer by JRummy Apps Inc.

    2. Terminal Emulator by Jack Palevich

    3. Root Explorer Pro by Speed Software





  2. If you have root access in your Android mobile, then no problem. Proceed with further steps. Otherwise make your mobile to have root access by following these steps :



    1. Download "Kingo Root" in your system (i.e. laptop/desktop).

    2. Then connect your mobile by enabling "USB Debugging" option (turn on USb Debugging by going to Settings → Developer options → USB debugging).

    3. Then click "ROOT" in Kingo root. That's it.




  3. Turn off Wi-Fi/3G/4G, and then go to Settings → Apps → All → disable time service and monkey test. If already frozen via titanium backup or other app, skip this.





  4. Open Root explorer, go to system/xbin and see if there is any file starting with a dot (e.g. .ext.base). Also note that every (.) file has different permission then the rest of other files. So just remember those files with dots because those are the one that you're going to remove in Terminal emulator.




  5. Go back to system and then go to Priv-app folder and look for these two files cameraupdate.apk and providerCertificate.apk and notice that permission of these two files are different than the rest of APKs, so these two are the base of MonkeyTest and TimeSservice virus and needs to be deleted.




  6. In Terminal emulator app in your mobile you have to run the following commands. If you feel difficulty in running those commands, use ADB from your system. If you are having ADB in your system (i.e. laptop/desktop), run adb.exe.


    (I am using Android Studio. So, I run the adb.exe from User/AppData/Local/Android/sdk/platform-tools/adb.exe). Otherwise use it by downloading and installing.





  7. Open Terminal Emulator, or if you have access to your device via ADB from a computer.




  8. Follow these commands one by one:


    adb devices # Type this line if you're using ADB Windows
    adb shell
    su
    mount -o remount,rw /system

    cd system/priv-app
    chattr -iaA providerCertificate.apk
    rm providerCertificate.apk
    chattr -aA cameraupdate.apk
    rm cameraupdate.apk
    cd ..
    cd system/xbin
    chattr -iaA .b
    rm .b
    chattr -iaA .ext.base

    rm .ext.base
    chattr -iaA .sys.apk
    rm .sys.apk

    NOTE:



    1. If you are using an older version than KitKat you need not to type priv-app. Just type cd system/app

    2. If "chattr -aA ...." shows error, try it like this "chattr -iaA ...."





  9. Please make sure you type the file name correctly just as providerCertificate, 'C' is capital otherwise permission wont change.




  10. If you find any other files similar to monkeytest try to remove everything.




  11. Exit Emulator/ADB by giving exit command.





  12. Check it in your device if monkey test is present. Answer is "No".




Sunday, November 26, 2017

rooting - Is it possible to have a root-running app on no-root android?


I have an app which needs su privileges, But my device should not be working on rooted. I want to know if there is any way to take the access to just one app. For instance root the device, set the privileges for that app, unroot the device. Is it possible?





How to remove apps from "all downloaded" in Play Store



In the new Android Market/Play Store (3.5.15) they have now got a list of "all downloaded" apps.


I have had an android phone for a good 2/3 years now and the list is huge, plus sightly more questionable apps which should have been lost in the ether of the internet have now been dredged back up to haunt me.


Can I remove apps from here?


Thanks



Answer



No, it's not possible. The android market is plagued with issues like this one.


As of version 3.9.16 you can finally now remove applications from the "all" tab in the my apps list. You can even select several apps at once by long pressing one, then selecting the others.
These apps are removed from the Website too.


Source: Android Police


Android Screen In virtualbox Rotate 90 CCW?


I install Android 4.4 x86 on virtualbox in windows 8.1 That was Ok But when I install my first app pheed on it .
now when I run pheed app my screen rotate 90 ccw like as image .
enter image description here
I try some stakoverflow post about android screen landscape and portrait but none of them help me .
I tried some shortcut key like as :



ctrl+f9

ctrl+f10
ctrl+f11
ctrl+f12
Or press them twice in lessthen a second but none of theme fix it ?!!
have any idea to fix it ?





Saturday, November 25, 2017

Google Maps Location History is showing an incorrect location


I have a major problem that I hope someone can help with. On my Google Maps feature under my Location History it shows a location that I was never at at any point, but when my wife happened to see that location she doesn't believe me that the GPS could be wrong and pinpoint that location if I was never there.


I was first wondering myself how could that could be possible if I was never there or my phone was never at that location that was 35 miles away from me and second is there any way I could prove the GPS being wrong? Can I contact Google Maps and can they give an official printout of that certain day and every location I was? I really need to prove my honesty to her and hope there is a way.





rom flashing - Bricked Note GT-8013, unable to boot from TWRP recovery (flashes logo for 1-2 secs), nor on normal mode, installed TWRP via both IMG and TAR


I'm running a Samsung Note GT-N8013. One day, my tablet fails to boot, saying that encryption had been unsuccessful; according to this answer, /data has failed to format. I can't reset the device, pressing the reset button on the screen does nothing. I also can't boot into TWRP recovery mode, it just flashes the logo screen for 1-2 seconds and switches back to the Samsung Note logo screen. I've tried to reinstall TWRP into the recovery partition using both twrp-2.8.7.0-gt-n8013.img and twrp-2.8.6.0-gt-n8013.tar with Heimdall.




htc desire - SD card supported by Android 4.2.2


I bought a HTC 310 Desire running Android 4.2.2 (Jelly Bean) and would like to format my SD card (SDHC 32GB) so to be able to contain files larger than 4GB. I tried formatting the card exFAT, NTFS, ext2, ext4 (using the utility of my Windows PC, of a MAC and using MiniTool PartitionWizard) but when i place back the card into the phone, the phone keep saying that the card is damaged and propose to reformat it. If I accept the card will be formatted as FAT32 (i.e. no file larger than 4GB possible). Do you know what can be done? Possibly without rooting the phone? Is there somewhere a list of the file system supported by my phone? Or is there something special to pay attention to in the card formatting?




wi fi - My phone stopped remembering wifi passwords!


For some reason that completely escaped me, this here Samsung S3 mini stopped connecting automatically to my home network, always requiring me to re-type the wifi password.


Since then, I noticed that it's not just for my home network, but for all wifi networks.


More concretely, here's a sample of what happens:




  • I try to connect to a WPA-protected wifi.

  • Android asks for the password.

  • After I provide it, the phone connects successfully.

  • I turn off the wifi (on the phone).

  • I turn it back on.

  • The phone doesn't auto-connect to the wifi.

  • I explicitly select the wifi network to connect to.

  • Android again asks for the password I typed in a minute earlier.


Any idea how that can happen? What could I have done to deserve this? What could I do to redeem myself and fix this problem?



More details: "forget"thing ("disconnect"ing from) the network explicitly makes no difference (it still doesn't remember the password next time around), rebooting the phone neither. This phone is running Android-4.4.2, is not rooted.




Wednesday, November 22, 2017

adb - Why is my Android not restoring the app data from its Google Drive backup?


I'm testing a new version of our app that now supports Android Auto Backup (by targeting API over 23).


I've managed to get the system to back up the app's data by leaving it overnight (two nights), but when I uninstalled the app and installed it again, it didn't restore the data from the backup.


However, I can still see the backup for the app under Settings > System > Backup > App data > [appname] and that it was last backed up yesterday.


I first re-installed the app from an apk downloaded to the device. Would this not trigger the restore like installing from Google Play or over adb should?


I've tried uninstalling again and installing over adb, but it still doesn't restore the data.



Is there a way to force it to restore the data from the backup?



Answer



adb shell bmgr restore


Source


Additional inputs from OP incorporated from comments



It appears that the reason it didn't restore automatically in my case was that there were many different devices backed up to the same Google Account, and it didn't know which "set" to use. I got a list of "sets" with the command adb shell bmgr list sets and could then use your command with the desired set like this: adb shell bmgr restore .



Transfer LINE account from a phone to another without losing friends and chat history


LINE is a messaging/call application.


I bought a new Android phone, and want to transfer LINE friends, chat history, call logs, groups, groups chat history, from my former Android phone.


How to do?



Answer




Limitations of this method


Restored: Chats, Contacts, Media not older than a few weeks



Not restored: Sealed letter messages, Group chats, Media older than a few weeks


Perform on old Phone



  1. Make sure you set an Email and Password for your LINE Messenger account

  2. In LINE, go to your friends list

  3. Open Cogwheel (top right)

  4. Open Chats

  5. Open Back up and restore chat history

  6. If Google account has Not set written below, click on it

  7. Choose your Google account and click OK


  8. Select Back up to Google Drive

  9. Make sure the date on Last backup is the current day and time


Perform on new Phone



  1. Install LINE Messenger

  2. Login with your Email and Password

  3. Go to the friends list screen

  4. Open Cogwheel (top right)

  5. Open Chats & Calls


  6. Open Back up and restore chat history

  7. If Google account has Not set written below, click on it

  8. Choose your Google account and click OK

  9. Choose Restore


unbricking - Bootloader/BIOS, flashing ROM and correlated risks. Why Android devices are more brickable than PCs?


I have a solid experience of installing different OS (Linux, Windows,...) on PC. I would like to try just for fun to install Linux on a unbranded Android low cost tablet acquired in 2015. I spent some time browsing the web and as far as I understood there is a risk that during the flash procedure the device could be potentially damaged. So I read extensively on how to backup the ROM using TWRP and all related matters. I would like just to have some explanations on the below topic:


Scenario #1:
I have a PC, if I want to try another OS I can just format the hard disk and install it, in no way there is the risk of damaging the BIOS motherboard. Motherboard and hard-disk are separated, so no problems may arise.


Scenario #2:

I have a tablet, want to wipe out Android and install an upgraded version of Android or a Linux distro suitable for mobile devices.



  • Why in this scenario there is a risk to get an unusable device?

  • Is this because in this case motherboard and unit memory are bundled together? So wiping the memory will also erase the configuration settings of the motherboard?

  • Do we have here the equivalent of BIOS settings?




Tuesday, November 21, 2017

How can I turn songs from Google Play Music into ringtones?


Is there a way to easily use music from Google Play Music as ringtones on my phone?



Answer



Download the song and use something like Audacity to edit it. Save to your ringtones directory on your phone. Nothing else out of the ordinary needs to be done.


rooting - How can I root my Samsung Galaxy S3? Should I defer the system update?


I pre-ordered a Verizon SGS3, and it shipped to me before it was even available in stores. Since then I have not updated any programs that were Verizon-related.


If at some point I want to root my phone, does it then make sense to not update these programs? I have heard that in the past, certain over-the-air updates have closed holes which are used to root. Is this the case so far with this phone?



Answer



Update: Verizon's Galaxy S3 is locked and cannot as of now be rooted or updated to a custom firmware. See this XDA thread.



As far as I know there are no current pending security holes that can be exploited by circulating rooting apps at the moment.


Samsung does however not lock its phones if you buy them directly from them, i.e. you are free to install aftermarket firmware or modify the existing firmware via Odin quite easily (without having to hack/exploit/etc. anything). Some carriers, including Verizon however do indeed lock it.


If you have an unlocked S3 or as soon there's an exploit for the locked booloader:
CF-Root by Chainfire supports rooting stock firmwares of the S3 models GT-I9300 and GT-I9300T so far in a very easy way. It does not depend on an root exploit but rather modifies the system partition in another way that cannot be closed by a firmware OTA update. Just see the above referred blog post and the linked XDA forum thread in there for more info.


Monday, November 20, 2017

How do you set the default search engine in firefox?


In firefox if I type a bunch of words instead of a web address and hit go it does a google search.


You can install addons for other search engines and they appear in a list below the address bar and you can click those to perform the search on that engine instead.


Is there a way to make one of these search add-ons the default?



Answer




Figured this out by looking at the desktop version.


Enter "about:config" into the address bar. Search for "keyword.url" Set the value of this setting to the new search provider. For example: "https://www.duckduckgo.com/?q="


UPDATE: This has changed in the newer versions of Firefox (desktop version too).


You now have to install search engine addons.
Then enter "about:addons" in the address bar.
Long press on the search engine add on that you wish to be default and select "Set as Default" from the menu that appears.


Sunday, November 19, 2017

connection issues - Internet Apps are not working but browser works just fine and i am able to access websites



I have a rooted AT&T HTC inspire 4G handset, i am not able to use any internet apps but i am able to use the in build browsers to access internet over a WiFi.



I tried creating hotspot and share that internet with this HTC phone and everything worked just fine all the Apps and internet.


Please help me with this, I did tried syncing background data, and WiFi proxy setting, but No luck yet.




data connection - Can I use an Android phone without an Internet access plan?


I'm interested in buying an Android phone for Xmas. Currently my pick is LG Optimus One.
I will be using it without any Internet access plan, only using Wifi wherever possible.


Some questions that I have:



  1. Can the phone be usable even if I don't have any Internet access plan, or there will be severe usability issues? (eg: features that will not work)


  2. Do I have offline access to Google Calendar and GMail, auto-synchronizing whenever it detects Wifi connection?

  3. Is there an option to block any attempts from apps/phone to connect to Internet through GPRS/3G (thus slashing my credit from the carrier, since I won't have an Internet plan...)?


Thanks.



Answer




  1. YES. You will use it as a regular phone, but will be disconnected from the networks (Facebook, Twitter, IMs, Sync, etc)

  2. YES. You can access your calendar offline. And yes, you can sync when Wi-Fi is available.

  3. Yes, you just disable data traffic.



Saturday, November 18, 2017

ram - How do you see Memory usage in Android O?


Prior to Android Oreo I could see Memory usage by going to Settings > Memory but this does not exist any more since upgrading to Android O. Is there any way to see this now or has it been removed completely?



Answer



Enable Developer Mode (see here), and go to System > Developer options > Memory



enter image description here enter image description here


enter image description here enter image description here


Nexus 7 , Android Ver. 4.2.2, Locking icons down on home screen



We have a set of 30 Nexus 7's that are checked out by students who constantly delete/move/add icons on the home screen. We would like to lock the home screen icons so that they cannot be deleted/moved or added to. Is this possible?




Play a live YouTube stream in the YouTube app


For example youtube.com/opener - it won't play via the browser, but I can't figure out how to access it via the app.


Is it possible?




wi fi - Route Application through Mobile Data when on Wifi


While on Wifi, Whatsapp won't work on my Galaxy Note 2 due to my work proxy. I have found no proxying application that will work, yet. (My work is using an HTTP Proxy).


Is there an application that will route certain phone apps (such as Whatsapp) through mobile data, while still allowing other apps to use Wifi access?



Answer



By default, as soon as WiFi gets connected, the mobile network shuts down -- so you cannot use both simultaneously. Which means: no, even a proxy allowing for exceptions would not do, as the other network simply is no longer available.


Quoting from CyanogenMod Tracker:




Each time you activate WiFi you'll lose 3g connection. That's normal behaviour of Android network manager.



There were attempts on "hacking" that, as you can e.g. find here. This source from the Stanford university also makes clear on the standard behaviour:




  • Given WiFI is connected, then turn on 3G data connection. 3G connection will be automatically torn down by Connectivity Service.

  • Given 3G is connected, then turn on WiFi connection. Connectivity Service will tear down the existing 3G connection.



Except from "hacking attempts" as described by the Stanford example, I know of no solution to the issue.



applications - Import data from ColorNote app?


I have lost my Android phone but I have backup of my SD-card on which I have backup of my ColorNote app. How can I get all my notes from that backup?


NOTE: I am using iPhone now so don't have a Android device for now.




Do I have to buy or need a 3D-enabled phone to use Google Cardboard?


Google cardboard comes with 3D glasses. Does that mean that we will be able to watch 3D videos using a smartphone like the Moto-G (1st edition) which is not 3D enabled?



Answer



I'm able to use the YouTube VR 3D app to view 3D YouTube videos on my Samsung Galaxy 4S. I can also view Cardboard specific content with the Cardboard app on this same phone; as I understand it, Cardboard is designed to work with ordinary smart phones.


Friday, November 17, 2017

Using ADB backup for app databases


I'm having an issue with the backup, I did it fine yesterday and managed to back up the folder that contained the databases. I then successfully converted the backup.ab file to a backup.tar file and got to see the files. Today however, every time I do the adb backup command and allow the 'back up my data' option on the device all I seem to get is a 1kb file.


In the time in between the two back ups the device has had no wi-fi connection and been on aeroplane mode, therefore it can not have updated the app to change the 'android:allowbackup' to become false.


I am trying to pull off all kik messenger databases using ADB, the device is rooted but Kik.android is not debuggable so i cant seem to use the "run-as" method.


I am using the following commands:


adb backup -noapk /data/data/kik.android/databases/


What am I doing wrong???


I have included a screenshot, on the left is the first backup I did and that I got the databases fine, the command prompt shows that the files are there on the device and the command I used and the bottom window shows the output of the backup.ab file being a 1kb file.


Please help as its driving me crazy. enter image description here




clockworkmod recovery - Upgraded from KK 4.4.2 to CM 12 Lollipop, can't restore app data (S4 Mini LTE)


After taking a full Nandroid backup of my previous os and apps using CWM recovery, clearing cache and performing a factory wipe, I went ahead and flashed Lollipop. This is the ROM I used: https://s.basketbuild.com/filedl/devs?dev=F4k&dl=F4k/cm12/serranoltexx/cm-12-20150111-UNOFFICIAL-serranoltexx.zip


Upon first boot of Lollipop, I wasn't presented with any 'transfer existing apps/data' screen, but rather was just sent to the launcher screen. While lollipop runs fine however, I can't seem to be able to restore app data through either the custom recovery (just says "please wait" forever and phone gets stuck in a boot loop afterwards) or using apps on the actual phone. It is rooted (through both going into settings -> developer -> enable root access & also a flashable zip that I used) and both Titanium Backup(hangs at 0% and 1%) as well as Nandroid Manager(says 'error' when attempting to restore apps) both fail to restore.


Nandroid manager gave this output at the end: /system/bin/pm[6]: app_process: Permission denied


Is there any other way I can restore the app data?




Add contact without using "Google account"?


When I got my phone, I imported my old contacts by writing a small program that uses the contacts API. That worked great, and all my contacts were stored locally on the phone (sync with Google is turned off). Now I need to add a new contact manually through the standard contacts menu. I only get the option to add the new contact to my "Google account", there's no choice for local storage. All the contacts i batch-added with my program are correctly listed as "phone only, unsynced contact", and this is what I'd like to happen also with new contacts I add from the standard contacts menu as well.


I'm aware of this question, but there are no storage settings at all in the contacts settings menu described in that question's answer.



What do I do to add new contacts to the local storage? I could of course use the program I wrote, but that seems a bit cumbersome in the long run, and surely there must be a way to do this through the menus?


I'm running stock Android 4.0.2 on a Galaxy Nexus.



Answer



Disable the Google Contacts Sync app (Settings -> Apps -> All -> GoogleContactsSyncAdapter -> Disable) and reboot, then try adding a contact again. If this does not help and you have rooted your Android then you can delete /system/app/GoogleContactsSyncAdapter.apk with a file browser (but take a backup first!). Either way, next time you create a contact you should be informed that the contact will be stored locally.


As far as I can tell this won't break anything else.


However, if you also use another account with sync function like Microsoft Exchange (for hotmail), you'll have to remove that one too. In case of Microsoft Exchange, it's best to remove the entire account, because just disabling the app prevents you from receiving emails anyway.


Source


Thursday, November 16, 2017

ios - How do I migrate my SMS (text messages) from iPhone to Android?


I want to export my SMS history from an iPhone and import them into a new Android phone, including timestamp, message direction (incoming|outgoing), and correspondent (sender or recipient).


My specific scenario is this, but perhaps a generic solution exists -
Source: iPhone 4 running iOS 5 (jailbroken, if it helps)
Target: LG Nexus 4


This old question seems relevant except that it's aimed at Samsung devices, and it's 1½ years old.
Also, there's this alarming comment:
The problem with faked.org/isms2droid is that it doesn't correctly extract the iMessages correctly. It gets the wrong timestamp, and leaves the address empty and the type (which represents sent or received) is always 1 (received).


I'm thinking that there could be newer solutions that are worth mentioning?




Answer



After some digging into google, I came across a software called Backuptrans. The features listed include Transfer SMS between Android and iPhone, Save SMS from Android/iPhone onto local database on computer, Restore SMS from local database to Android/iPhone and many more.


I do not have an iPhone to check this software. This seems pretty good. The work steps are as simple as importing from iPhone to the computer and exporting to the Android device. More details with screenshots can be found here


The only downer for this solution is that you have to pay some cash (a minimum of $29.95) to use it fully. Since you are not comfortable with iSMS2droid (iPhone SMS Import), this seems to be the best option available.


On an additional note, iSMS2droid is worth trying before you buy Backuptrans.


samsung galaxy s 4 - Heimdall errors, "ERROR: Failed to confirm end of file transfer sequence!"


Using Heimdall v1.4 RC1 to flash Clockworkmod Recovery on a Samsung S4, I get the following,


$ sudo heimdall flash --RECOVERY ./recovery.img --no-reboot
Heimdall v1.4 RC1

Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/


This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...

Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...

Checking if protocol is initialised...
Protocol is not initialised.

Initialising protocol...
Protocol initialisation successful.


Beginning session...
Session begun.

In certain situations this device may take up to 2 minutes to respond.
Please be patient!

Downloading device's PIT file...
PIT file download successful.


Uploading RECOVERY
100%
ERROR: Failed to confirm end of file transfer sequence!
ERROR: RECOVERY upload failed!

Ending session...
Releasing device interface...
Re-attaching kernel driver...

I've even tried two different builds of Clockworkmod,



-rw-rw-r-- 1 ecarroll ecarroll 6.8M Aug 11 23:23 clockworkmod_6.0.3.2_jfltespr.img
-rw-rw-r-- 1 ecarroll ecarroll 6.8M Aug 12 00:02 recovery-clockwork-6.0.3.2-jfltespr.img

$ md5sum *clock*
c95fac4d0e27fcb0c3355f209e62cd9c clockworkmod_6.0.3.2_jfltespr.img
760cbf5a3b157ab23f49fcf40b46db2f recovery-clockwork-6.0.3.2-jfltespr.img

Answer



This is a because of a bug in Heimdall v1.4 RC1 -- the version that shipped with Ubuntu 13.04. What you'll want to do is upgrade Heimdall to version 1.4 final, or the latest version..


That should do it. Run heimdall info | head -n1 to get your current version.


7.0 nougat - You device does not support VoIP call recording


I own a stock OnePlus 3 device which is on android 7.1.1. I've not changed anything in the device! Everything is stock. I recently install an app called CUBE Acr to record viber and messenger calls. But when I install the application it says



Sorry but your device does not support VoIP apps call recording ( Skype, Whatspp, Etc ). This feature will be disabled. You can still record phone calls.



How can I turn on this feature from the device itself? is there anyting I should do to device settings in order to get that feature working?




Answer



I don't think you can change it by settings. If you see the list of compatible devices listed in the app description, you will find that your device does not figure . Only one plus one from your OEM is compatible


Also if you read app reviews, on other devices which are not compatible, developer says it's due to hardware or firmware incompatibility


security - Does full device encryption protect my data from Google and the government?


Apple recently made waves within the tech community by refusing to comply with law enforcement in regards to accessing encrypted user data. Their statement was that they do not have the technical ability to decrypt this data.


As an Android user, is there any similar possibility (preferably built in to the OS instead of third party) that I can use to achieve similar protection from even Google and my device manufacturer? I know there is the "Full Device Encryption" in my settings, but does this prevent Google etc. from accessing it?


For reference, my device runs Android Lollipop and is a OnePlus Two. If other versions like Marshmallow would allow me to do this that's fine.



Answer



Google has no idea what the encryption key for your device is. The entire process takes place on your device and the key is never transmitted anywhere. The key itself is also not stored in plaintext on your device:





The encrypted key is stored in the crypto metadata. Hardware backing is implemented by using Trusted Execution Environment’s (TEE) signing capability. Previously, we encrypted the master key with a key generated by applying scrypt to the user's password and the stored salt. In order to make the key resilient against off-box attacks, we extend this algorithm by signing the resultant key with a stored TEE key. The resultant signature is then turned into an appropriate length key by one more application of scrypt. This key is then used to encrypt and decrypt the master key.



So even if someone had a copy of your encrypted master key, they could not decrypt it without the TEE key from your device's SoC.


Therefore, outside of a flaw in the implementation, full device encryption will prevent anyone from accessing your data unless they know/obtain your password OR can guess your password (e.g via brute-forcing it or some kind of social engineering techniques). On devices that lack the necessary hardware-backing, FDE will attempt to encrypt the key using a software-only method.


4.1 jelly bean - Samsung Galaxy Tab-2 USB connection issue


I am working on Android application development, I want to run my application on Samsung Galaxy Tab-2 GT-P3100 but whenever I connect it with USB to the computer then it is not detecting.


snapshot -


enter image description here


EDIT:


I searched over internet about this problem I got same problem which is on the Microsoft Community MTP USB driver failed -Samsung Galaxy Tab 2.


When I follows all steps still is shows dialog as follows -


enter image description here


EDIT:




I got solution and also posted all the steps which I follow to resolve the problem. This is very helpful to me and hope you too.




Answer



I have followed the Exact steps from Link :




  1. Samsung mobile MTP Device cannot be installed





  2. StackOverflow tutorial




Here are steps : (for Windows specific instructions):




  1. Ensure phone is not connected to PC.




  2. Uninstall KIES from PC. Reboot your PC and Reinstall KIES after that. Just for great measure... open KIES, go to Tools | Troubleshoot connection error. Follow instructions and wait for it to finish the troubleshooting procedure.




  3. Reboot your phone (or turn off and then on your phone again). Do not connect it to your PC just yet.

  4. Once rebooted, go to your phone's dialer, type *#7284# - A configuration window will appear. In that window's USB section, if it's default to PDA, tap MODEM, then back to PDA, (if it is MODEM in the beginning, change it to PDA) then press the back key to exit. Most importantly, it must set as PDA when you exit.

  5. Turn off USB debugging in your phone.

  6. (Optional) Set your phone's screen timeout to a lengthy time. (minimum 1-2 minutes - recommended 5mins to 30mins) its found in Settings | Display. You can change this back later on.

  7. Connect the phone to your PC with USB cable and let windows load your drivers... and wait for the drivers to get reinstalled.

  8. Once reinstalled, disconnect the phone off USB. Switch USB debugging back on in your phone settings, and reconnect the phone back - you'll see windows load another set of drivers for your phone. Wait until it is completed. (This step is a precautionative measure to ensure your phone is identified with all the necessary drivers)

  9. Once complete, unplug your phone, and turn off USB debugging... This is to ensure MTP will initialize. Also, press the phone's home key until your homescreen is displayed. Only after doing all that, reconnect your phone back to PC.

  10. Test and see if MTP works using Windows Explorer. You'll see your phone's USB storage and SDCard contents if it does.



Hope it will help you..


Monday, November 13, 2017

How to remove malware package from android phone


My android phone has been affected with malware.I have done factory reset two times but it still installs UC News app without authorization when connected to internet.After that many pop-ups and confirm boxes randomly pop-up on window. After factory reset,I don't have any third party app installed. Where can I get a list of apk packages that are supposed to come with new android phone,so that I can remove it using adb?


Any other suggestions what should I do?




Help with this ADB REVERSE Tethering Script?



I added the functionality to automatically turn on reverse tethering after many fails:


Now i only enter t into terminal


alias t='r && sz $tether && r && sz $n'
tether='am start -n com.android.settings/com.android.settings.TetherSettings && input keyevent 66 && input keyevent 66'
n='netcfg rndis0 dhcp'
alias sz='ad shell'
alias de='ad devices -l'
alias r='ad kill-server && ad start-server'
alias ad='adb'
alias pu='adb push'


The issues with the above are: (2 is most important)




  1. This only works with the screen on and when notification bar isn't pulled down




  2. This doesn't simulate wi-fi/other wirelessnetworking or make apps actually try to connect to net instead of checking if wifi/other wirelessnetworking is enabled





  3. This code can most probably be much shorter/optimized (but at least it works)





To understand the background better please see my original question:I can reverse tether now by using alias but it stops on adb shell command





remote control - IR Receiver for Android Device


Assuming I already have a USB IR receiver and WMC remote as well as an Android device with a USB port, what is the best way to go about controlling the Android device with the remote after plugging in the receiver?




Saturday, November 11, 2017

applications - Open an app on startup/after booting


I need to force a selected application to start up each time my Android-based device is (re)started.


Is there anything I can use (configuration setting, external application etc.) to accomplish this task? Or is this kind of behavior limited to home screen managers only?



Answer




I'm not sure about the configuration setting, but I believe this is not only limited to home screen managers since you can achieve this by using 3rd-party apps.


Some related keywords:



Otherwise, you can use apps like Tasker:



  1. Create a Profile: Event - System - Device Boot

  2. Create a Task with Action: App - Launch App - (Select the app)

  3. Link the Profile to the Task


How to play a YouTube clip in background/minimised?


The stock YouTube app (here on 2.1-eclair, but applies to all android versions) stops playing when I minimised, switched to another application or even when I lock the phone. And when I resume it restart downloading the clip from the beginning. Is there any way that I can play YouTube clips in the background? Note, I only the audio to continue playing.





How to recover completely darkened screen on Moto G (Lollipop) due to setting brightness to zero?


I have Moto G on Lollipop, and I mistakenly set the brightness bar to zero. Now, the screen is completely darkened and I'm not able to see anything.


How to set back the brightness to usable mode without hitting factory reset?




rooting - How does SuperSu provide root privilege?


Has a write-up ever been released on exactly how SuperSu works? After searching around for a while I found mostly guides on how to use the app, not the implementation details.


I did, however, find this resource that is mostly directed at explaining how to use the root privileges programmatically, but explained things fairly well. The article gives information about SELinux, but not so much how its enforcement is circumvented.


There appears to be a lot of context switching to allow execution of certain events (from the point of view of those using SuperSu) otherwise denied under SELinux, but how did SuperSu get to the point at which it was able to "legally", as far as SELinux is concerned, patch SELpolicies?


It seems that the objective is to force the init process to spawn a new shell that runs the su daemon, but there does not appear to be any patching of the init process, but from the article linked:




On firmwares that use SELinux, su is generally implemented as a proxy to a daemon started from init



and



You might wonder why - if we're already running as the init context, as the root user ..





tl;dr; How does SuperSu execute in the context of the init process?


Given as:


u:r:init:s0          - Highest init context

u:r:init_shell:s0 - Shell started from init


stock android - Random apps keep installing on the phone



Here is a screenshot of these apps. I never downloaded them:


Screenshot
Screenshot (click image for larger variant)


Many times these have been deleted by me but they are download as well as installed by themselves again and again. What should I do? Also, these apps I never installed all at once rather one by one.




wi fi - Wi-Fi turned off but battery usage shows shows huge drain from it


I have a problem with my Galaxy S3 4G. It's currently all stock and running Android 4.4.4.


It seems the Wi-Fi will not turn off i.e. I can turn it "off" in the settings or notification bar, and this will stop Wi-Fi from being connected and device uses my mobile data instead, however in the battery menu the Wi-Fi is still being shown as on, even when it's turned off.


As you can see in the attached image, it's draining my battery really fast, and will only turn off when the device is in flight mode. I've checked and cannot see any rogue apps causing this, but after searching online and checking all option menus I seem unable to fix this problem.


Is there any way to stop this, save for a factory reset? Is this a KitKat wide problem, or just on my phone?


(Click image to enlarge)


IMG:




uninstallation - How to remove a persistent malware?


My Samsung Note 8 has gotten very weird lately. I get programs I never have installed, and when I try to reboot/reset my device with no backup they still come up after I'm finished with the reboot.


I also have in my "SIM" 2 cards, but I only have 1? And I can't access number. It also shows 2 different IMEIs.


The programs with weird names have all the permissions in my device. Some of them I can't delete, and some can't force stop, and they start running after some time.


Facebook was already installed when I did a reboot and the programs started coming in. I have a secure file on my phone. But this program has permission to everything.


How do I get rid of this problem? Do I root my phone? Can some of you guys please help me with this? This is making me a little paranoid.


Some of the programs:




  • Dagger

  • Customrabsclient

  • flexbox

  • istrumentzip

  • OpenCenus

  • rxandroid2

  • agera

  • customclient


I have used many anti-viruses like McAfee, Bitdefender, etc. I have factory reset my computer 2 times, but nothing changes. I have now downloaded AFWall+ to try to stop all these files, but I want to delete them all.



And when I check root manager it says that my phone is not rooted in the proper way. I never ever have rooted this phone.




Friday, November 10, 2017

gps tracking - How GPS works in android phone


I want to know how GPS works on android phone. Does it send any identification data to service providers/phone manufacturers/Map providers?


I recently read a new about IPhone tracking users - http://techcrunch.com/2011/04/21/apple-tracking-location-database/.


I am using Samsung android phone. How can be sure that nobody is tracking me even if I keep my GPS on for my running app tracking?


Thanks.




Answer



If you enabled "My Location" in Settings > Location & Security > Use wireless networks then your Cell/Wifi and/or GPS data will be sent to Google to triangulate your location if there is an application in the phone that requested for location. Your GPS data may also be sent to Google if you're using Google Latitude, Google Navigation, location-aware search, or use other location-based services.


Third party applications may also track your location, read their privacy policy before installing those applications if you're concerned.


EDIT: According to Android Central



Android does the same sort of thing, boys and girls. And it's supposed to. But it does it right. Instead of saving days and weeks and months of location data, it saves the 50 most recent cellular GPS locations, and 200 most recent Wifi fixes. And it's stored in a little file on your phone.


...


You can shut off Android's location services and stop further caching of location data. It's in Settings>Location & Security.



bootloader lock - What's the security implication of having an unlocked boot loader?


Nexus devices can be unlocked using the fastboot command fastboot oem unlock to install a custom firmware. For security reasons, the phone is wiped when this command is executed. However after this is done, most people leave the boot loader unlocked.


Devices that support unlocking the boot loader: SonyEricsson (now Sony), Sony, newer HTC devices, ??


Is there a security problem with an unlocked bootloader?
If this is the case, what can be done?



Answer



A permanently unlocked boot loader (BL) on a Nexus device is a big security risk.

It's only recommended for a pure developer phone.


An insecure BL enables all sorts of fastboot commands that can be used for e.g. doing the following:



  • Conduct a cold boot attack to recover the key for Android's full disk encryption

  • Make a copy of the device
    E.g. by booting a custom image (adb boot boot.img), then copying partition dumps

  • Erase data using fastboot erase

  • Flash arbitrary Android firmware, recovery images or radio firmware
    fastboot flash radio|recovery|boot|...

  • Install a root kit (boot custom recovery, then modify system files)


  • Steal Google/Facebook/whatever accounts stored on the phone

  • etc.


In case someone has their device encrypted, full access is not immediately possible. However there exists cracking software to brute force the used encryption PIN/passphrase. Altering the firmware is always possible (i.e. an evil maid attack, aka. installing a rootkit/password logger/etc.)


This is the normal process of modding a Nexus device:



  • unlock the bootloader (fastboot oem unlock)

  • boot/install insecure/open custom recovery

  • install custom firmware



To secure your modded device you should do this afterwards:



  • install a safe recovery image again (custom recoveries like TWRP/CWM are unsafe)
    use the extracted recovery.img from Google's factory firmware file, available here

  • relock the bootloader (fastboot oem lock)


This breaks the usual update mechanisms like RomManager. In case you need to upgrade, you can run flash_image recovery recovery.img (as root on the regular Android OS, it bypasses the BL lock) to install a temporary custom recovery again and use this once to upgrade the firmware and then remove the custom recovery again by doing a flash_image recovery stock.img. I know, this is not very user friendly right now, but let's hope the situation improves at the custom recovery front.


Some background on what's possible: http://hak5.org/episodes/hak5-1205 and http://www.youtube.com/watch?v=uM2_CpuzQ0o


Thursday, November 9, 2017

5.0 lollipop - Some program is showing ads on my desktop... How can I catch it?


Some program keeps showing me ads on the main page every now and then. It's extremely annoying, and I'm unable to catch it. Is there a way I can detect it to remove it?


When the ad shows up, I try to hold the home button to see the app name, but it disappears. Sometimes the ad is a link, so it asks me for the browser to use. My device is rooted.



Answer



Finding the Source


For Android >4.1


If your device is running Android 4.1 "Jelly Bean" or higher, you can just press and hold on notifications and your device will tell you who is generating them.


For Android <4.1


Use Airpush Detector. This application has a big list of apps that create banner ads. If it finds an application it knows of, it will tell you and ask you to uninstall.





Stopping the Future Problems


Use an Adblocker to Block Ads:



  1. AdFree (Recommended)

  2. AdBlock Plus

  3. Ad Away


Wednesday, November 8, 2017

Share to bookmark


Is there any way of having a "Bookmark" as part of the items in the "Share" options that show when one clicks "Share" on a given app?



Answer



I found an app Bookmark Home which adds Add bookmark to the share list. If you send a bookmark to it, it will be stored in the apps own storage, but there is an export option to save all of them in the Browser bookmarks.


nexus 4 - what is the GPS accuracy for android phones?


i need to know what is the accuracy of the GPS sensor for Samsung Galaxy S 3 and Nexus 4 .


i need to know how much its accuracy, I didn't find the information which i need, ex: how many meters the accuracy will be ?




How to fully backup non-rooted devices?



I know I'm asking for the close-to-impossible -- as a real full-backup certainly requires root permissions. But still there are many folks around not wanting to root their devices -- afraid of voiding their warranties or bricking their devices, or just not having their devices supported by any rooting method.


I also know there were a lot of questions asked already on this topic, and I checked all of them having the backup tag -- none covers the entire topic, all just have pieces, and especially people new to Android (but other non-power-users as well) would have a hard time figuring out the best way.


So I want a detailed canonical answer to the question:


Not involving root-solutions, how to achieve a backup as close as possible to a full backup?


Please do not give simple one-liner answers like "Use app xyz [full-stop]." If mentioning an app (and I doubt a single app would be the answer here), include what parts are covered by it -- as well as ideas on how to fill the gaps it leaves. (And to make it absolutely clear: I know the first thing coming to mind is Titanium Backup -- I use it myself, but this does not apply here: This question is strictly about methods for non-rooted devices!) Moreover, the answer should be as generic as possible in terms of applying to a wide range of devices (i.e. it should not be restricted to one device or manufacturer).


I already mentioned having investigated all questions here tagged backup. These will certainly be helpful providing details for answers here, so I will list up the topmost ones concerning my question:



All these provide some details for my question (so feel free to get inspired by them) -- but I feel there are still details missing. Also it would be helpful to have a summary -- say, an answer including the full description of "the maximum possible".


A last criterium: While I'd consider cloud-based solutions legit, I'd favour local solutions. If you can provide both: all the better. But some people value privacy quite high (I'm one of them), and thus would not trust their data to some cloud service.





Thanks to Ryan, we now have a solution for a really complete backup of all apps and their data -- which I didn't dare to hope for! The only disadvantage: His solution only works for less than 10% of all Android users; namely those whose devices are running at least with Android 4.x.


So again, I ask the close-to-impossible: Any solutions applicable at least on Gingerbread (2.3.x) or, better, even Froyo (2.2.x) -- so they cover the majority of current devices? These solutions may involve multiple tools (try to keep it as simple as possible though; think of your mother to follow your instructions ;)


And keep in mind: NO ROOT!




To further motivate high-quality answers (and hopefully avoid low-quality ones), I will be a harsh one here: As I rarely do, I will down-vote answers not fitting the mentioned criteria on one end -- but on the other end, I will setup a bounty for the best answer (which cannot be done immediately, but earliest after 2 days).



Answer



Solution Available for 4.0+ Devices:


For 4.0+ devices there is a solution called "adb backup".


Note: This only works for apps that do not disallow backup! Apps that disallow backup are simply ignored when creating a backup using this way.


This makes use of adb so you have to have the Android Software Development Kit (SDK) installed on your computer (on some Linux distributions: just packages android-tools-adb and android-tools-adbd).




The options for the adb command are:


adb backup [-f ] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|nosystem] []


  • -f : the path of the *.ab file that will be saved on your computer. This file is a compressed file that contains an archive of the data/apks from your device.

  • -apk|-noapk : indicates if the *.apk files should be backed up (default is -noapk)

  • -obb|-noobb : enable/disable backup of any installed apk expansion (aka .obb) files associated with each application (default is -noobb)

  • -shared|-noshared: enable/disable backup of the device's shared storage / SD card contents (default is -noshared)

  • -all : indicates that you want the entire system backed up. you can use the packages filter to just backup specific packages, or use -all for a full system backup.


  • -system|-nosystem: indicates if all the system applications and data are included when backing up. (default is -system)

  • : this is where you can list specific packages to backup. Use these if you want to back up only specific applications. If using -all, you do not need to specify packages.




How to backup your device:


First, you need to enable "USB debugging" on you Android device:



  1. Go to "About device" (or "About phone" or "About tablet") section in Settings

  2. Tap 7 times on "Build number" row (usually the last row). After that "Developer options" section will appear in Settings



Enabling



  1. Go to "Developer options" section in Settings

  2. Tap the "USB Debugging" checkbox


Enabling


Second, on your PC from the command prompt you will need to be able to locate both the adb command and your backup file. The easiest way to do this is to run the adb command from the directory where adb is located.


In Windows Explorer navigate to where you installed the Android SDK and SHIFT+RIGHT CLICK on the platform-tools folder. shift+rightclick


This will open a command prompt (your window will look different than mine).


In Mac's Terminal you can type cd and then drag the folder platform-tools folder from finder to the terminal window and the path will be inserted. Hit and you will be in the right place.



In Linux, I hope you know how to locate and cd to the parent directory of the adb command. You are using Linux after all.


From here type the following command:


Windows:


adb backup -apk -shared -all -nosystem -f backup08262012.ab

Linux & Mac


./adb backup -apk -shared -all -nosystem -f backup08262012.ab
## Notice that -all doesn't mean ALL. See the big bold NOTE at the top of this answer.
# drop the `./` in the command if you are using `android-tools-adb` package


(if you want to store the backup in a different directory, include a path for the ".ab" file as shown in the screenshot below.)


cmd


You will then be prompted on your device for a password (this is used to encrypt the backup):
backup screen


To restore, it works almost the same way.


Windows:


adb restore backup08262012.ab

Linux & Mac


./adb restore backup08262012.ab


Then you will be prompted for your password to restore on the device: restore screen




Now for the shameless self promotion:


Droid Explorer (v0.8.8.7+) will be able to handle this for 4.0+ devices. While Droid Explorer is currently optimized for Rooted devices, this functionality will work for non-rooted devices as well.


Droid Explorer will do full backups of the device and save them in %USERPROFILE%\Android Backups\. Within that folder is a folder named for the device, and inside that folder are the backups.


de backup


Double clicking on the Android Backup file will allow you to restore your device from the backup file.


cyanogenmod - Rooting and flashing the DX2


I have a DX2 I recently rooted (2.3.5) with some self root package. However, I didn't realize virtually all of the CM roms require 2.3.4. So now I need to SBF back to 2.3.4, re-root and flash. I'd like CM7, and maybe even try CM10. Is there a comprehensive site with all the necessary files in 1 location? I've searched all over forums and so many sites have dead links. I'm a bit of a noob, but have flashed the optimus elite once before..this motoblur crap is annoying..


Edit : DX2 = droid x2 CM = cyanogenmod SBF = system boot file noob = beginner or novice




file system - How can I enable last_kmsg?


I'm trying to diagnose a random reboot on LineageOS 14. last_kmsg is not in /proc, nor it is in /sys/fs/pstore/console-ramoops.



EDIT:


~# mount | grep PSTORE
~# mkdir /mnt/pstore && mount pstore -t pstore /mnt/pstore && ls /mnt/pstore
mount: 'pstore'->'/mnt/pstore': No such device

Answer



Back in 2012, /proc/last_kmsg (1) used to be a dump of kernel console messages, exported after reboots by Android's ram_console functionality (CONFIG_ANDROID_RAM_CONSOLE), which used persistent_ram (CONFIG_ANDROID_PERSISTENT_RAM) to handle a block of RAM that wasn't erased across reboots (2).


persistent_ram was based on Linux upstream RAMOOPS code which logged panic and oops messages to RAM. RAMOOPS was deprecated in favor of PSTORE (3) (memory handling) and PSTORE_RAM (4) (logging panics/oops to pstore/dmesg-ramoops). Later PSTORE_CONSOLE support was added (5, 6) to log not only the panics/oops, but all kernel console messages to pstore/console-ramoops-N which can be read later by mounting pstore (7). So the Android specific RAM_CONSOLE (8, 9) and PERSISTENT_RAM (10) were utterly removed.


Now pstore also offers logging userspace messages (PSTORE_PMSG) (11) and other features (12). Plus it supports multiple backends for persistent storage if supported by hardware, though SoC's on Android devices only support RAM storage (ramoops driver, AFAIK).


So it's not possible to enable last_kmsg on an upstream kernel, instead pstore offers a more versatile functionality.




mount: 'pstore'->'/mnt/pstore': No such device



It shows that your kernel isn't built with pstore support. All you need to do is use a kernel built with CONFIG_PSTORE_CONSOLE and optionally CONFIG_PSTORE_RAM (though buggy). Android's init by-default mounts pstore at /sys/fs/pstore (13) from where dmesg-ramoops (on panics/oops only) and console-ramoops can be read.


You can search forums for a custom ROM shipped with such kernel. Or if you have kernel source, you can build yourself on a Linux machine.


NOTE: Some new devices, like Samsung, still expose /proc/last_kmsg interface; I'm not sure whether they use original implementation or pstore at back end.




FURTHER READING: Reading kernel logs


Tuesday, November 7, 2017

a2dp - why do all sound apps get bluetooth button events, all at once



If i have my phone (thunderbolt cyanogenmod7/2.3) connected to a bluetooth stereo and i hit the play button on the stereo, music, pandora, Subsonic, and Audible all start playing at once. pausing pauses all of them.


is there some way of controlling what apps respond to the buttons? is there an app to filter button events?




languages - Is Hebrew support built into Android?


Is Hebrew support built into Android? If so, is it in all versions?



Answer



Here is my understanding as a developer:


Android 1.5-2.1: Right-to-left support is built-in, but most ROMs do not contain the letters. This means that Hebrew in most applications will show up as boxes (but in the correct order). This does allow individual applications to include their own fonts and thereby display Hebrew correctly.



Android 2.2: The default system fonts now include Hebrew characters. Right-to-left layout still works. (Although the rules for justification did change, annoyingly.) Based on some bug reports, Google did not yet consider support for right-to-left languages to be final in this version. (Note the comments by Google engineers, such as Romain Guy here: https://review.source.android.com/#change,15955).


Android 2.3: The SDK has been released, but no updates for actual devices. The SDK does include a Hebrew locale for the first time (http://developer.android.com/sdk/android-2.3.html#locs).


Also note that locale support ultimately depends on the vendor of the actual device (either the carrier or handset manufacturer). They may choose to remove locales they deem unimportant to save space, or they may choose to add some that they deem important for their targeted market.


Lineage OS : SD card as internal storage


I have set SD card as internal storage on custom ROM Lineage 14.1. Today, I have installed a official nightly, no issues during installation(on twrp, I cannot read external SD card). And, after reboot the file explorer, shows only internal storage(external SD shows only in Settings->Storage).





  1. Do I need to migrate data to shared SD card, each time, after Nightly installation?




  2. Earlier, when I set SD card as internal storage, I moved about 700+ MB to shared, and after nightly installation, it took 800+ Mb.




  3. Some applications can't move data to shared SD card (Whatsapp, Flipkart, Google apps). I know that it is decided by the android system. How to move them, without using root or any other application.





  4. TWRP Recovery sometimes rarely not showing external SD card.(TWRP version 3.1.0). How to solve?





Answer



After asking this question, I have installed two nightly on my device.




  • March_13 : lineage-14.1-20170313-nightly-armani-signed.zip





  • March_20 : lineage-14.1-20170320-nightly-armani-signed.zip




Now, I can finalize something about this.



  1. You don't need to migrate data after each installation(nightly).

    • if it is a clean install(after factory reset), then you need to migrate data`.

    • if you are installing another ROM, then you need to setup as new by formatting sd card.(backup before installation to avoid data loss)




  2. Storage size may increase due to application data usages, but, you don't need to migrate it again.

    • If you are flashing another ROM, don't format internal storage(format these partitions /boot, /data, /system and cache. This adoptable storage cannot be used on the newly installed ROM, but it will be available during installation [on recovery menu]).

    • Also, if you're backing up current ROM, Adopted SD card data is also get backed up, but the app that uses SD card as storage will loss data after restore (You need to install those apps again).



  3. System decides which applications should save data on external sd card.(usually system apps and Gapps can use only internal storage, some user apps can be moved to external SD )

  4. External SD card speed is slower than internal storage. Also, it may be the bug of TWRP recovery, which will be solved in future new releases.



samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...