| adb devices -l |
Check connected devices |
|
| adb -s serial-number command |
Send commands to a specific device |
adb -s emulator-5555 install HelloWorld.apk |
| adb install path-to-apk |
Install an app |
adb install /path/to/apk/HelloWorld.apk |
| adb kill-server |
Stop the adb server |
|
| adb shell screencap -p path-to-save |
Take a screenshot |
adb shell screencap -p /sdcard/screenshot.png |
| Record a video |
adb shell screenrecord –size resolution path-to-save |
adb shell screenrecord –size 1280x720 /sdcard/record.mp4 |
| adb push local remote |
Copy files to a device |
adb push myfile.txt /sdcard/myfile.txt |
| adb pull remote local |
Copy files from a device |
adb pull /sdcard/screenshot.png |
| adb shell settings get global http_proxy |
Get proxy settings |
|
| adb shell settings put global http_proxy ip:port |
Set proxy server |
adb shell settings put global http_proxy 192.168.1.10:8888 |
| adb shell settings put global http_proxy :0 |
Reset proxy settings |
|
| adb shell am start com.android.settings |
Open system settings |
|
| adb shell pm list packages |
List ALL installed apps |
|
| adb shell pm list packages -f |
List apps with additional information |
|
| adb shell pm list packages -s |
List ONLY system apps |
|
| adb shell pm list packages -u |
List ONLY user-installed apps |
|
| adb bugreport |
Generate bug report |
|
| adb shell settings put system show_touches 1/0 |
Toggle touches (a small circle or dot) |
|
| adb shell setprop debug.hwui.overdraw true/false |
Toggle Debug GPU Overdraw (Enable Debug GPU Overdraw) |
|
| adb shell input keyevent KEYCODE_HOME |
Simulate the home button |
|
| adb shell input keyevent KEYCODE_BACK |
Simulate the back button |
|
| adb shell input keyevent KEYCODE_APP_SWITCH |
Simulate the swith app (overview) button |
|
| adb shell input keyevent KEYCODE_POWER |
Simulate the power button |
|
| adb shell input keyevent KEYCODE_SLEEP/KEYCODE_WAKEUP |
Simulate sleep/wakeup |
|