Skip to content

ADB Command List Recent

Use Ctrl + F shortcut to quickly find the command you need.

1. Functional Commands

NameCommandRemarks
Restartadb reboot
Restart to recoveryadb reboot recovery
Restart to bootloaderadb reboot bootloader
Shut downadb shell reboot -p
Restore Device DPIadb shell wm density reset
Modify Device DPIadb shell wm density 320320 = custom dpi
View Device DPIadb shell wm density
Restore resolutionadb shell wm size reset
Modify resolutionadb shell wm size 1080x1920Custom resolution
View resolutionadb shell wm size
View serial numberadb get-serialno
View device detailsadb devices -l
View 3rd party packagesadb shell pm list packages -3
View system packagesadb shell pm list packages -s
View all packagesadb shell pm list packages
View memory usageadb shell dumpsys meminfo
Clear app data/cacheadb shell pm clear cn.com.test.mobileCustom package name
Uninstall appadb uninstall cn.com.test.mobileCustom package name
Uninstall (keep data)adb uninstall -k cn.com.test.mobileCustom package name
Force stop appadb shell am force-stop cn.com.test.mobileCustom package name
Screenshotadb shell screencap -p /sdcard/01.pngCustom name
Install APKadb install d:/temp/1.apkAPK absolute path
Set battery %adb shell dumpsys battery set level 100Custom percentage
Launch appadb shell am start -ncn.com.test.mobile/.ui.SplashActivityPackage name
Check Android versionadb shell getprop ro.build.version.release
Top 10 memory appsadb shell top -s 10
View device brandadb shell getprop ro.product.brand
Turn on WiFiadb shell svc wifi enable
Turn off WiFiadb shell svc wifi disable
Enable pointer displayadb shell settings put system pointer_location 1
Disable pointer displayadb shell settings put system pointer_location 0
Simulated clickadb shell input tap [x] [y]x/y coordinates
Turn off updatesadb shell pm disable-user com.wssyncmldm
Prevent black screen timeoutadb shell settings put system screen_off_timeout 2147483647Run when screen not black

2. Button Commands

NameCommandRemarks
Power buttonadb shell input keyevent 26
Menu keyadb shell input keyevent 82
HOME keyadb shell input keyevent 3
Return keyadb shell input keyevent 4
Volume upadb shell input keyevent 24
Volume downadb shell input keyevent 25
Muteadb shell input keyevent 164
Play/Pauseadb shell input keyevent 85
Stop playingadb shell input keyevent 86
Next songadb shell input keyevent 87
Previous songadb shell input keyevent 88
Resume playbackadb shell input keyevent 126
Pause playbackadb shell input keyevent 127
Light up screenadb shell input keyevent 224
Turn off screenadb shell input keyevent 223
Swipe to unlockadb shell input swipe 300 1000 300 500Start x, y, End x, y
Enter textadb shell input text helloWhen focus is on text box

Xiaomi MIUI ADB Optimization Commands

NameCommand
Disable smart servicesadb shell pm disable-user com.miui.systemAdSolution
Disable Xiaomi e-commerceadb shell pm disable-user com.xiaomi.ab
Disable user feedbackadb shell pm disable-user com.miui.bugreport
Disable system analyticsadb shell pm disable-user com.miui.analytics
Remove splash screen adsadb shell rm -f -r /sdcard/Android/data/com.miui.systemAdSolution/files
Prevent ads recurringadb shell touch /sdcard/Android/data/com.miui.systemAdSolution/files

Some3C Phone Farm Documentation