Skip to content

Android Debug Bridge cheatsheet

Basic commands

List devices

adb devices

List devices (long output)

adb devices -l

Display logs

adb logcat

Log to a file

adb logcat -f /data/local/tmp/output.log

List packages

adb shell pm list packages

Reboot the device

adb reboot

Execute commands

Execute command on the device

adb shell ls /data/app


Elevate privileges in ADB session

adb shell
$ su

Restart ADB with root permissions

adb root

Restart ADB without root permissions

adb unroot

Copy files

Download file from the device

adb pull /data/app/file

Copy file to the device

adb push your-file /data/local/tmp