Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.
Command | Description |
---|---|
adb devices |
List connected devices |
adb shell |
shell on connected phone (then su for root) |
adb install "app.apk" |
install app on your phone |
adb backup <app> |
backup <app> |
adb logcat |
logs on your phone |
Sometimes ADB can no longer connect to the mobile. There are several reasons for this.
- Enable Developers options
- Go to the settings of the Android device.
- Go to the system settings.
- Go to "About the phone".
- Tap 7 times "build number".
- The options for developers appear in the system settings.
- Inside Developers options, enable USB Debugging
When in doubt, reboot (Confucious)
{% embed url="https://developer.android.com/studio/debug/dev-options" %}
{% embed url="https://developer.android.com/studio/command-line/adb" %}