Common ADB commands

Source: Internet
Author: User
Tags tag name

with the fiery Android system, Android testing is now starting to heat up, but many test engineers just stay on the UI test, that is, what functions on the UI to test what function, as for how Android works, We are in the process of testing the system in the end of those changes, these are not concerned about. Test out the bug cut a picture is thrown to develop, so this is also lead to the development of our testers biased one reason, testing is a physical activity, in fact, we can do more in-depth, can find the bug and determine the cause of the error, so that developers will look at us. That's the ABD shell command I summed up in the Android Test total: 1. Displays all Android platforms in the system: Android list targets2. Display all AVD (emulator) in the system: Android list avd3. Create AVD (emulator): Android Create AVD--name name--target platform number 4. Start emulator: EMULATOR-AVD name-sdcard ~/name. IMG (-skin 1280x800) 5. Delete AVD (emulator): Android Delete avd--name name 6. Create the Sdcard:mksdcard 1024M ~/name. Img7. AVD (Simulator) Location: Linux (~/.ANDROID/AVD) Windows (C:\Documents and SETTINGS\ADMINISTRATOR\.ANDROID\AVD) 8. Start DDMS:DDMS9. Displays all currently running emulators: ADB devices10. Executes a command on a simulator: Abd-s simulator number command 11. Install the application: ADB install-r application. apk12. Get the files in the emulator: ADB pull<Remote> <Local>13. Writing files to the emulator: ADB push<Local> <Remote>14. Enter the simulator's shell mode: adb shell15. Launch SDK, documentation, instance Download Manager: Android16. Unloading apk package: adb shell CD Data/app RM APK package exit adb uninstall APK package with the main package name ADB install-r APK package 17. View ADB command Help information: ADB help18. View the log information on the command line: ADB logcat-s tag name 19. The command behind the ADB shell comes mainly from: source \system\core\toolbox directory and source \frameworks\base\cmds directory.      20. Delete the System application: ADB remount (re-mount the system partition to make the system partition writable). ADB shell CD System/app RM *.apk21. Get administrator privileges: adb root22. Start ACTIVITY:ADB Shell am Start-n Package Name/package name + class name (-N class name,-a action,-d date,-m mime-type,-c category,-e extension data, etc.). 23, the release port: You can set any port number, as the host to the emulator or device request port. such as: adb forward tcp:5555 tcp:800024, copying files: You can copy files to or from a device, copy a file or directory to a device or emulator: ADB push<Source> <Destination></Destination></Source>For example: adb push test.txt/tmp/test.txt Copy a file or directory from a device or emulator: ADB pull<Source> <Destination></Destination></Source>such as: ADB pull/addroid/lib/libwebcore.so. 25, the Search simulator/device instance: Get a list of the currently running emulator/device instances and the status of each instance: adb devices26, view bug report Report: ADB bugreport 27, record wireless communication log: Generally speaking, the wireless communication log is very much, at run time not necessary to record, but we can still through the command, set the record: adb shell logcat-b radio28, get the device ID and Serial number: adb get-product adb get-serialno29, Access database SQLite3 adb shell SQLITE3#CD system/sd/data//Enter the specified folder within the system #l S//List shows current folder contents #rm-r xxx//delete folder with Name xxx and all files inside #rm xxx//delete file xxx #rmdir xxx//delete xxx folder

Common ADB commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.