Questions tagged [adb]

ADB (Android Debug Bridge) is a tool that comes with the Android SDK that allows you to control and interface with your Android device.

Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. It is a client-server program that includes three components:

  • A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb command. Other Android tools such as the ADT plugin and DDMS also create adb clients.
  • A server, which runs as a background process on your development machine. The server manages communication between the client and the adb daemon running on an emulator or device.
  • A daemon, which runs as a background process on each emulator or device instance.

adb can communicate with an Android device through USB (USB debugging must be enabled). When already established, this connection can be transferred to a wireless network using adb tcpip command.

adb is included with Android SDK, or more specifically its platform-tools package, which can be downloaded and installed separately from the SDK:

Also users of 32-bit systems need to use version r23.0.1 - the later versions include 64-bit binaries:

Be aware that while adb shares a lot of code across all supported platforms - some of its code is platform specific. Please provide more details about your environment when asking for help with adb trouble shooting.

7629 questions
3
votes
1 answer

App doesn't update on physical device when debugging

Even after changing the source code, the application doesn't update when debugging on the physical device and keeps debugging the old code. Issue log: --------- beginning of system --------- beginning of crash --------- beginning of main 2022-08-19…
Cyber Avater
  • 1,494
  • 2
  • 9
  • 25
3
votes
1 answer

Reboot offline Android device remotely

I would like to reboot a connected but offline Motorola Droid 2 device via ADB (or monkeyrunner). Restarting ADB via adb kill-server and then adb devices has not brought the device back online. So I figure I have to restart it. How can I do a reboot…
Matthias Braun
  • 32,039
  • 22
  • 142
  • 171
3
votes
1 answer

USB device not showing up in Titanium Studio

When I type "adb devices" I can see my usb device listed. USB debugging and unknown sources on connected device are enabled and yet still when I press run I don't see this device in Titanium Studio. I'm on Ubuntu 11.04. What am I doing wrong here?
Sergey
  • 4,702
  • 6
  • 26
  • 32
3
votes
0 answers

remote secure_mkdirs failed: Operation not permitted adb: error: failed to read copy response

I am having a mobile with following configurations: Model Name: Samsung S22 Ultra Model Number: SM-S908E Android Version: 12 I enabled developer options and USB debugging and I am able to execute adb devices, adb install filename.apk. I need to…
3
votes
4 answers

How to get my android device name in my android programe?

I get device names by the command "adb deivces" in command line. Now I want get name in my android device. String serial = null; try { Class c = Class.forName("android.os.SystemProperties"); Method get =…
wiseideal
  • 65
  • 1
  • 1
  • 6
3
votes
1 answer

Android Phone stopped notifiying about usb connection with PC

I've a Samsung Galaxy S2 device which I had been using for Android development through adb for almost two month. A few days ago it just stoppt detecting the usb connection with my Thinkpad T420. Here are the odd facts: problem appears only on this…
Rodja
  • 7,998
  • 8
  • 48
  • 55
3
votes
2 answers

my Realme device is not connect as adb devices on mac but connecting on windows fluently

device is connecting perfectly on windows but not on mac devices is not asking permission to trust this device and showing offline while running adb devices command my phone is realme 9 pro speed addition, i have tried on multiple macbook but still…
3
votes
1 answer

chrome://inspect/#devices shows device but no open chrome tabs

I am trying to debug my web application. In the chrome://inspect/#devices tab I can see my device and in adb devices too, the problem is that the chrome tabs that I open on the mobile are not shown. I have USB debugging enabled. Any ideas? Thank you…
3
votes
1 answer

Android PackageManager: check if a library APK has been installed

The PackageManager.getPackageInfo(packageName, flags) method can be used to check whether a specific package has been installed. It either returns the PackageInfo or throws PackageManager.NameNotFoundException. How to check if a library APK is…
vmayorow
  • 630
  • 5
  • 15
3
votes
2 answers

requires:android.permission.WRITE_SECURE_SETTINGS while running adb shell commands

I am trying to edit the settings for back gesture scaling on my Oneplus 9 running Android 12 on OxygenOS. The stock settings don’t let me set limits for the back gesture on the left side of the screen, so I wanted to set it manually. adb shell…
Sergio Rossi
  • 31
  • 1
  • 2
3
votes
1 answer

Difference between `adb pair` and `adb connect`?

What's the difference between adb pair … and adb connect …? (When used to communicate with a device that's made itself available for debugging over Wi-Fi.) The help page says: adb connect: "connect to a device via TCP/IP" adb pair: "pair with a…
mjs
  • 63,493
  • 27
  • 91
  • 122
3
votes
0 answers

update adb on Raspberry Pi 4

I'm want to use scrcpy in Raspberry Pi 4 for connection to tablet(Android 11) with Wireless debugging. I know that first you need to adb pair device before you can adb connect, but when I try to pair my device I'm getting this error: $ adb pair adb:…
skudopou
  • 31
  • 1
3
votes
0 answers

Error: "Unable to run adb check your Android SDK installation and ANDROID_SDK_ROOT environment variable: E:\Android\Sdk\platform-tools\adb.exe

Brief I am new to Flutter. I installed Android Studio and Flutter source code as mentioned in Flutter's Installation guide for windows. I had a problem with the lack of storage space on C:Drive as mentioned in my previous question, so I installed…
3
votes
2 answers

adb shell su -c command throws Permission Denied (My phone is rooted)

First of all, I'm experimenting a DVFS with my rooted phone, Galaxy A12. Nevertheless, if I use a command inside of adb shell then it does not throw a Permission Denied. ~$ adb shell a12:/ $ su a12:/ # echo 500000 >…
JIN
  • 149
  • 2
  • 10
3
votes
0 answers

Enable Android wireless debugging via ADB with IPv6 address

I am using a Google Pixel 4 XL with Android 12 The wireless network interface has two IPv6 addresses bound to it I have enabled Developer Options In the Developer Options menu, I have enabled the Wireless Debugging setting When I click into the…
Trevor Sullivan
  • 183
  • 1
  • 11