Questions tagged [adb]

For issues specific to the Android Debug Bridge (adb), a command-line tool to interact with Android devices and emulator instances. See the full tag wiki for details and hints.

Android Debug Bridge (ADB)

Android Debug Bridge (adb) is a versatile tool that lets you manage the state of an emulator instance or Android-powered device.

adb is part of the Android SDK and is the essential managing tool for Android device development. Quoting one of the tutorials2:

ADB or Android Debug Bridge is a command line program which is used to communicate with your Android phone (or an emulator used by programmers). The use of ADB for Android phone users ranges from using it as a tool to get the logcat- A realtime log of the Android system, which allows one to know the cause of any errors. It is very helpful to app hackers to know exactly what block of code does what, and to modify apps accordingly

For Windows, one usually needs a device-specific driver to get ADB working. If you cannot find one for your device, you might want to check with the Universal ADB driver.

A device should have USB debugging enabled in order for ADB to be used on that.

Advanced usage

You can also use ADB between two Android devices, wirelessly. Note that, however, with Marshmallow (Android 6) the adb binaries have been removed from within Android. To get them back, you can e.g. use Magisk and its adb-Installer module.

See also, here on this site

External Links

2428 questions
149
votes
10 answers

How do you extract an Android app's data from a full backup made through "adb backup"?

I have been backing up my Nexus 7 with adb backup to back up all files into an encrypted backup. I see that you can restore from a backup with adb restore, but that would wipe all my existing data on the device. How exactly would I extract one…
user11553
131
votes
6 answers

How can I shut down my Android device using an adb command?

How do I halt an android phone using adb command? I can reboot, but I don't know how to halt. I tried shutdown -k wait command, but it did not work.
Blacklist Human
  • 1,521
  • 4
  • 12
  • 6
120
votes
4 answers

Where in the file system are applications installed?

I have installed a few Android applications both with the adb install MyApplication.apk command and via a webserver (like an alternative to Android Market). But where in the Android file system on my phone is the MyApplication.apk file placed? Are…
Jonas
  • 5,087
  • 8
  • 37
  • 47
83
votes
4 answers

Enable and disable system apps via ADB

Is there any adb command to enable/disable a system app? Thanks
lao
  • 933
  • 1
  • 8
  • 7
78
votes
4 answers

How to start root shell with Android Studio?

I just installed Android Studio. How do I get into root shell on my phone? Or do I have to download ADB separately?
trusktr
  • 1,297
  • 3
  • 14
  • 21
74
votes
4 answers

How to mount /system rewritable or read-only? (RW/RO)

How can I mount the /system directory rewritable or read-only on my Android phone?
Thomas Vos
  • 4,040
  • 5
  • 36
  • 46
67
votes
7 answers

Is there a minimal installation of ADB?

When it comes to troubleshooting, I often read recommendations like "Use adb logcat to find some more details". Looking for a good way to backup all my apps including their data, Full Backup of non-rooted devices refers to adb backup and adb…
Izzy
  • 91,536
  • 76
  • 351
  • 968
60
votes
1 answer

What all does ADB backup and how do I restore part of it?

I am soon going to unlock bootloader and root my Nexus 5, but I didn't wanted to wipe all the data so I thought of using the ADB backup function to restore after rooting is done. adb backup [-f ] [-apk|-noapk] [-shared|-noshared] [-all]…
Akshat Mittal
  • 725
  • 1
  • 7
  • 8
59
votes
18 answers

ADB constantly disconnects, shows device offline

I'm not 100% sure if this should go here or the main Stack Overflow, but I decided to go with this area in hope I might catch someone with more specific experience with a similar problem. I have a Samsung Captivate (love it minus it's crappy GPS). I…
Maximus
  • 691
  • 1
  • 5
  • 4
54
votes
9 answers

fastboot doesn't see device

I've read a lot of articles about this problem but I can't resolve it. I decided to install my developer application on phone using wifi. To do this I need to do some things with my phone. The first step is to unlock bootloader. I stack on step 8,…
pepuch
  • 801
  • 1
  • 6
  • 11
53
votes
4 answers

Is there a way to look inside and modify an adb backup created file?

I created a backup of my Galaxy Nexus with adb backup. The resulting file is named backup.db and it's somehow encrypted. I wanted to restore the backup, but it stops when it comes to restoring com.android.providers.contacts. I used adb logcat to…
ingorichter
  • 633
  • 1
  • 6
  • 6
51
votes
10 answers

ADB backup creates 0-byte file; prompts for current backup password even though I never set one; "Failed to set password" for Desktop backup password

The problem: Every time I run ADB backup, I get a message near the bottom of the home screen saying Backup starting..., followed by a message saying Backup finished a few seconds later despite the fact that I'm using 17 GB of device memory, and the…
Adi Inbar
  • 1,413
  • 2
  • 11
  • 23
50
votes
7 answers

Is there a way for me to run Adb shell as root without typing in 'su'?

Is there a way for me to run Adb shell as root without typing in su? I want to be able to have root access without going into the shell.
Hank
  • 643
  • 1
  • 6
  • 5
49
votes
4 answers

Broken screen while debug mode was disabled. How can I re-enable adb?

The screen of my phone is physically broken, so it doesn't display anything, but the touch aspect does seem to be working, as I can unlock my phone, and get haptic feedback. Before I go to get it replaced, I'd like to back up some personal data from…
Nate Parsons
  • 791
  • 1
  • 6
  • 13
40
votes
4 answers

Is there a way to see the device's screen *live* on PC, through ADB?

I am a vlogger and after getting HTC Desire HD, found out its camera was all I ever needed. However, I usually have to see myself while recording video, to control my facial expressions, and with a rear-facing camera it's just not possible. I know…
Unknown artist
  • 656
  • 1
  • 6
  • 13
1
2 3
99 100