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

2353 questions
23
votes
2 answers

How to use ADB to list remote directories?

I used adb push lol.png /storage/sdcard0/ to push a test file to my Galaxy S6, and the file was transferred successfully while failed to show up in my Android File Transfer. This is probably due to the fact that S6 doesn't have sdcard0 directory. I…
Aero Windwalker
  • 1,024
  • 8
  • 15
  • 27
17
votes
5 answers

How to pull only newer files with “adb pull”? (Android SDK utility)

With the command adb pull /sdcard/ I can copy all the contents of the internal memory of my Android phone into my current local directory. And adb pull /mnt/extSdCard/ does the same with the external SD card. But that command always copies…
OMA
  • 363
  • 3
  • 5
  • 13
15
votes
2 answers

What's the difference between 'adb push' and 'adb install'?

Will adb push only copy the file into the target location whereas adb install copies the file into the target location and also sets the proper permission for you?
5YrsLaterDBA
  • 325
  • 2
  • 4
  • 7
11
votes
9 answers

The command 'adb root' works, but 'adb remount' results in "Operation not permitted" message

I'm trying to remount /system to copy some files to it. I tried the following with adb: adb root adb remount The first command works fine (because my phone is rooted), but the second tells me that the operation is not permitted. If I open an adb…
Overv
  • 231
  • 1
  • 2
  • 5
10
votes
2 answers

adb listing all forwarded ports

I have forwarded a machine port to an emulator using adb forward tcp:1234 tcp:8080 I want to see which ports are currently being forwarded to avoid any conflicts. How do I do that?
Vihaan Verma
  • 405
  • 2
  • 5
  • 10
10
votes
4 answers

ADB commands to get the adb version of mobile phone

This might sound stupid, but after reading this post (which seem complete) I still dont see how to get the "abd version" of my android, the output I expect is something like this Android Debug Bridge version 1.0.31. I tried (based on this answer)adb…
Bur Nor
  • 155
  • 2
  • 3
  • 9
9
votes
2 answers

Simplest way to find the PID of your app

When using the adb Monitor tool to read the Logcat, I like to filter out all everything but what directly affects the app. Trouble is, it's really hard to tell what the PID of your app. It easy enough if the app using Unity, but if it doesn't, It's…
Branderson20
  • 91
  • 1
  • 1
  • 2
8
votes
1 answer

What's ADB and why is it used for? How do I install it on my device?

There are mentions about ADB on various questions and answers on this site. I'm not exactly sure what ADB is, what it does, how it works and where I can get it: there's little information on the tag wiki besides the link for ADB on the android…
That Brazilian Guy
  • 1,174
  • 5
  • 21
  • 40
8
votes
1 answer

How to list all the namespaces?

Right now, to list all the settings of System namespace I can do: platform-tools/adb shell settings list system To list all the settings from Global namespace I can do platform-tools/adb shell settings list global But I want to explore all the…
Nulik
  • 243
  • 2
  • 9
8
votes
3 answers

disconnect adb of device connected over TCP does not work

I run the following command to connect device over TCP ; adb connect 192.168.56.102:5555 I am not able now to disconnect it I even made two attempts : adb disconnect 192.168.56.102:5555 The second is , I reboot adb adb…
Abdennour TOUMI
  • 245
  • 3
  • 4
  • 9
7
votes
2 answers

How to extract .zip through ADB shell

Exactly what the title says. I've got a 1.5 gb zip file on my sdcard that I would like to extract via adb (not pulling to pc and pushing back). Is there a simple command to unzip a file? Thanks!
Mr. Monkey
  • 664
  • 2
  • 8
  • 11
7
votes
0 answers

How to make changes done through `adb settings put` persist through device reboots?

The specific changes I attempted were to a database entry following instructions in this question: Possible to turn on Airplane mode with WiFi on only? The changes to either row would take effect immediately but are reset following a reboot. The…
Narfanar
  • 171
  • 1
  • 3
6
votes
1 answer

Terminating adb.exe?

I am trying to hot spot my htc evo. When I click on PDAnet, it tells me that I have to terminate adb.exe. how do i terminate adb.exe. thank
Dan
6
votes
3 answers

"Too many files specified; only takes APK file and verifier file" problem

I have some devices attached to my PC. Now I want to install Astro to a specific emulator. Unfortunately, I get this error. hieund@hieund:~/Downloads$ adb install "Astro File Manager 2.5.1.apk" -s emulator-5554 too many files specified; only takes…
emeraldhieu
  • 369
  • 1
  • 7
  • 16
6
votes
2 answers

Start application from ADB

I have an Android device which I don't have physical access to. But I can access it through ADB commands. I have Teamviewer host installed on it. But unfortunately it's not running. How can I start it using ADB commands? Below is the Teamviwer app…
Arya
  • 243
  • 1
  • 3
  • 10
1
2 3
11 12