Android adb command line cheatsheet

To use the adb command, make sure you enabled the USB debugging on your device, an emulator is usually enabled by default. The following adb command examples will use this package name for demonstration: com.example.myapp

Show connected devices and pick a device and shell into it. In this case, 7f1c864e is the device id.

adb devices
adb -s 7f1c864e shell

Connect to a device wirelessly by ip address.

adb connect 192.168.56.101:5555

Install an app from an apk file on your computer. Replace /Users/dev/android_studio_projects/myapp.apk with your actual apk path on your computer.

adb install /Users/dev/android_studio_projects/myapp.apk

Uninstall an app, the second and the thrid line below are for when you have multple devices connected to your computer, it uninstalls the app on device specified by the device id or network address.