Android Common ADB commands

Source: Internet
Author: User

1. Install APK (if add-r parameter, keep set data, reinstall FILENAME.APK)

ADB install xxx.apk

ADB install-r xxx.apk


2. Uninstall APK ( if the plus-K parameter, to uninstall the software but retain the configuration and cache files )

ADB uninstall xxx.apk

ADB uninstall-k xxx.apk


3. View all currently connected emulator devices

ADB devices


4, to a certain simulator operation

Adb-s Simulator number Command


5, import files to the simulator (this command can also be implemented to install the APK, just put the apk into "/system/app" or "/data/app" OK)

ADB push file Emulator path


6. export files from simulator

ADB pull simulator file local path


7. Check the simulator log information

ADB logcat


8. Get Administrator Privileges

ADB root


9. Enter Shell mode

ADB shell


10, start activity (adb shell followed by the command mainly from the source \system\core\toolbox directory and source \frameworks\base\cmds directory)

ADB shell am START-N package Name/package name + class name (-N class name,-a action,-d date,-m mime-type,-c category,-e Extended data, etc.)


11. Get the Device ID number

ADB Get-serialno


12. Open ADB Service

ADB start-server


13. Close the ADB service

ADB kill-server


14. Visit Sqlite3

ADB shell

Sqlite3


15. Restart the device

ADB reboot


16, hanging in the partition (can make the system partition can be re-writable)

ADB remount


17, the release port (can be set any port number, as the host to the emulator or device request port)

ADB forward tcp:5555 tcp:8000


The above is a number of commonly used ADB commands, such as do not understand or other commonly used commands, you can leave a message!


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.