Hot answers tagged


Just for reference of others, here is some background on the .ab file format. The Android Backup (*.ab) file is a compressed TAR file. It is compressed using the DEFLATE algorithm. On top of that, there can be AES encryption used. This is determined when you create the backup, if you enter a password then the backup is encrypted, otherwise; there is no ...


Where an app is stored very much depends on several criteria: System apps / pre-installed-bloatware-apps are stored in /system/app with privileged apps in /system/priv-app (which are mounted read-only to prevent any changes) normal apps in internal memory go to /data/app some apps (encrypted on internal storage?) go to /data/app-private Apps stored on ...


Try adb shell reboot -p to shutdown the phone.


I started working on this. I'm posting my results so far here as a "community wiki" answer for two reasons: first, if someone else wants to join in, there's a place to talk; second, if I get pulled away from this project, there'll be hints for someone else to start working.   The backup logic on the host is entirely contained within


If I'm understanding your question correctly, you're asking how to get root access automatically when you run adb shell, so that you don't have to go into the shell and type su to execute a command as root on your phone. This is controlled by a flag in your boot partition, which most custom ROMs have modified to allow root permission by default. If you get ...


Yes. The command is pm disable <package name>. You must be root in order to do this: PC> adb shell shell@hammerhead:/ $ su root@hammerhead:/ # pm list packages -e | grep 'calculator' root@hammerhead:/ # pm disable Package new state: disabled root@hammerhead:/ # pm list ...


Or with a one-liner: ( printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 backup.ab ) | tar xfvz -


If it helps, I found ADB.exe here in a new Android Studio 1.0.2 install: C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools


The su binary needs both the execution and the setuid permission bit set. The first is needed that the file can be executed and the second is that it automatically runs with the file owner's rights (set user id, or setuid. In this case the owner is root. Read more here). Files on the external storage don't have the executable and setuid permission bits set ...


They are stored in /data/app/ but unless your phone is rooted all you will see is an empty folder.


One more option is to use bash, cat and gunzip (gzip). The full process could be this (with an unencrypted backup): backup one app's data (for example "Override DNS for KitKat"): $ adb backup -f net.mx17.overridedns.ab -noapk net.mx17.overridedns Now unlock your device and confirm the backup operation. extract the compressed data $ dd if=net.mx17....


In fact, it is not necessary to install the entire SDK if one does not want to use it for development. To be able to run basic ADB commands in the context needed by an average user, a rudimentary installation is completely sufficient. I will try to explain how to do this, and hopefully cover the most used computer systems. Requirements First, you will need ...


Linux/OSX Run fastboot as root or with sudo. Other OS: credits


To make the system recognize the Android device, in their several modes, one needs to set permissions for his user in udev. You need to repeat this process of loading Android udev IDs, for every mode the phone has (operating system, bootloader or recovery) because they have different USB IDs # reboot into fastboot mode adb reboot bootloader # grab you ...


I just did this! /data/property/persist.sys.dalvik.vm.lib is a textfile containing one of two values: '' or ''. You can change from ART to Dalvik simply by editing this file. Ex: adb shell 'echo >/data/property/persist.sys.dalvik.vm.lib'


Short Answer Try using an earlier version of adb. 1.0.32 did not work for me, but 1.0.31 did. Long Answer I just encountered this issue on a Nexus 5 running CyanogenMod 11 (based on Android 4.4) using the current version of the Platform Tools and ADB (Android Debug Bridge version 1.0.32 Revision eac51f2bb6a8-android). Using adb logcat to watch the ...


Android Studio does not contain ADB, you need Android SDK for it (it is installed on first run of Android Studio 0.9.x and newer). ADB is located in sdk\platform-tools. It's possible to add to PATH in Windows and use Terminal inside Android Studio only by command: adb shell and after use su get root shell. locate SDK platform tools folder (eg: C:\android\...


Switching from USB 3.0 port to USB 2.0 solved the problem for me. Most laptops come with both port types these days.


adb push will copy any file to the phone, whereas adb install will only accept an apk file, and will install it onto the device.


More specifically adb push [file] [path] will take [file] from the PC and copy it to [path] on the android device. adb install [apkfile] will copy [apkfile] from the pc into /data/app/ on the android device. The main difference being that push will let you specify where you want the file to go on the device, and install puts it in a known location (...


You don't need any special drivers -- all you need is to make your device known. A few simple steps can accomplish this when your device is connected via USB: sudo lsusb [...] Bus 002 Device 054: ID 18d1:4e22 Google Inc. Nexus S (debug) See the two hex values separated by a colon: 18d1:4e22 This is the manufacturerID:deviceID you need to tell the system ...


There are a few methods how you can mount your /system directory RW or RO. However, it will require root. Method 1: Connect your phone to the computer. (Make sure USB debugging is enabled on your phone) Open CMD/Terminal on your PC. Windows: CTRL + R, then type cmd. Ubuntu: CTRL + ALT + T. Mac: Navigate to /Applications/Utilities/ and double-click on ...


Yes, you actually can do this. It's kind of kludgy looking when you inspect the clipboard, but it works just fine. First off, you can inspect the current clipboard contents with service call clipboard 1 from an adb shell (or, without shelling in first, adb shell service call clipboard 1). It may start out initially blank after a reboot, for example: # ...


The file is not encrypted, unless your specify so when creating the backup. It is however compressed (using deflate). You can find out the exact format by looking at Android source (com/android/server/ code, and, technically, should be able to extract specific data from it. However, IIRC, there are some file integrity checks in ...


For what ADB backup does, you might wish to see our backup tag-wiki. Basically, depending on the command line switches used, it backs up apps (.apk) and their data. As for the second part of your question, you might wish to see Is there a way to look inside and modify an adb backup created file? Yes, it's possible extracting parts of it, and yes, Titanium ...


and the answer is pretty simple, use cp instead of mv)


Launch the emulator from the command line so that you can specify a /system partition size using the -partition-size <MB> option. For example, I use this to launch an emulator running Android 1.6 with a /system partition of 512 MB: emulator -avd Donut -partition-size 512 ...where "Donut" is whatever you named your AVD (you can check in Eclipse's AVD ...


In adb shell or terminal emulator (and most likely over SSH) you can use the pm utility to install apps. The command is: pm install /sdcard/app1.apk The following are the switches of pm: usage: pm [list|path|install|uninstall] pm list packages [-f] [-d] [-e] [-u] [FILTER] pm list permission-groups pm list permissions [-g] [-f] [-...


I found sort of a workaround for this (at least for a rooted phone). If a phone is rooted, busybox is most probably installed. stty is part of busybox. stty intr ^x Redefines Ctrl+X to act as a break command, e.g. what was previously Ctrl+C.

Only top voted, non community-wiki answers of a minimum length are eligible