Android: Commonly Used adb commands and androidadb commands
1. List the current configurations:
Adb devices
For example:
Localhost :~ Newuser $ adb devices
List of devices attached
BH903QDW15device
41008990d29eb000device
2. For a device
Adb-s <serialNumber> <command>
For example:
Adb-s BH903QDW15 install hello.apk
3. Install the app
Adb install <path_to_apk>
4. File Replication
4.1 pull from mobile phone to local
Adb pull <remote> <local>
For example:
Adb pull/sdcard/foo.txt
4.2 push from local to mobile phone
Adb push <local> <remote>
For example:
Adb push foo.txt/sdcard/foo.txt
5. uninstall software
Adb shell pm uninstall <packageName>
For example:
Adb-s BH903QDW15 shell pm uninstall-k com. example. hello
-K is retained after uninstallation.
Note: adb shell pm [command]
There are a lot of commands: see: http://developer.android.com/tools/help/adb.html
6. screen recording:
Adb shell screenrecord/sdcard/demo.mp4
After recording, you can use pull to copy the file to a local device. For more information, see 4.1
7. view all adb shell commands
Adb shell ls/system/bin
8. randomly click test on the screen:
Adb shell monkey-v-p <packageName> <number>
9. List the package names of the installed software:
Adb shell pm list packages
For example, list the third-party software package names:
Adb shell pm list packages-3
10. View printed logs
Adb logcat
For example:
Output Error Log adb logcat E
Logcat Filtering:
Adb logcat | grep-I "debug"
Logs containing debug strings
More commands: http://developer.android.com/tools/help/adb.html
-------------------------------------------------------------------
For more information, the Android Development Alliance's QQ group: 272209595