- Mar 26, 2020
- 11
- 0
- 0
Hello everyone!
There some useful operation for adb in my weekday job, hope to help you.
1. show all devices connect by adb
adb devices
2.select a devices to Excuting an order
adb -s deviceid
3.install a app
adb install -r <apk path>
4.uninstall a app
adb uninstall <packageName>
5.get a file from device to computer
adb pull <device file path> <computer save path>
6.push a file to device
adb push <local path> <device path>
7.enter a shell mode
adb shell
8.call a activity by ActivityManager
adb shell am start -n <packageName>/<activity class name>
9.Analog input text
adb shell input text <your text>
10.make a log
adb logcat -v time ><log file save path>
11.dump a app's package info(permission, apk path, mainfest info)
adb shell dumpsys package <pacakge_name>
12.get current window activity info
adb shell dumpsys window | findstr mCurrentFocus
13.clear app cache
adb shell pm clear <packageName>
14.dumpsys app memory usage
adb shell dumpsys meminfo <packageName>
There some useful operation for adb in my weekday job, hope to help you.
1. show all devices connect by adb
adb devices
2.select a devices to Excuting an order
adb -s deviceid
3.install a app
adb install -r <apk path>
4.uninstall a app
adb uninstall <packageName>
5.get a file from device to computer
adb pull <device file path> <computer save path>
6.push a file to device
adb push <local path> <device path>
7.enter a shell mode
adb shell
8.call a activity by ActivityManager
adb shell am start -n <packageName>/<activity class name>
9.Analog input text
adb shell input text <your text>
10.make a log
adb logcat -v time ><log file save path>
11.dump a app's package info(permission, apk path, mainfest info)
adb shell dumpsys package <pacakge_name>
12.get current window activity info
adb shell dumpsys window | findstr mCurrentFocus
13.clear app cache
adb shell pm clear <packageName>
14.dumpsys app memory usage
adb shell dumpsys meminfo <packageName>