Android ADB Usage

Source: Internet
Author: User

1. View device ADB devices 2. Install the software ADB installation 3.   Uninstall software adb uninstall < software name > ADB uninstall-k < software name > If you add the-K parameter to uninstall the software but keep the configuration and cache files. 4. The shell:adb shell that enters the device or simulator can enter the shell environment of the device or emulator through the command above, and in this Linux shell you can execute various Linux commands, and if you want to execute only one shell command,   The following can be used: adb shell [command] such as: adb shell DMESG will print out the kernel debugging information. 5. The publish port can be set to any port number, as the host to the emulator or device request ports. such as: adb forward tcp:5555 tcp:8000 6. Send files from PC to device ADB push < Local path > < remote path > Use the push command to copy files or folders on your computer to your device (mobile) 7. Download files from your device to your computer ADB pull < remote path > < local path > Use the pull command to copy files or folders on your device (phone) to your computer 8, view bug reports adb bugreport 9, record wireless communication log One As a general note, the number of wireless communication is very much, not necessary to record at runtime, but we can still command, set the record: ADB shell logcat-b Radio 10, get the device ID and serial number adb get-product adb get-serialno ad b Shell Sqlite3

ADB install <apk file path >: This command installs the specified APK file on the device?? The ADB command Daquan 1. Display all Android platforms in the system:     Android list targets 2. Display all AVD (simulator) in the system:     Android list AVD 3. Create AVD (Simulator):     android Create AVD--name name--target platform number 4. Launch simulator:     emulator-avd name-sdcard ~/name. IMG (-skin 1280x800) 5. Delete AVD (emulator):     android Delete AVD--name name 6. Create SDcard:     mksdcard 1024M ~/name. IMG 7. AVD (Simulator) Location:     Linux (~/.ANDROID/AVD)       Windows (C:\Documents and SETTINGS\ADMINISTRATOR\.ANDROID\AVD) 8. Start Ddms:     Ddms 9. Displays all currently running emulators:     ADB devices 10. Execute command on a simulator:       abd-s Simulator number command 11. Install applications:       adb install-r app. apk 12. Get the files in the emulator:       adb pull <remote> <local> 13. Write files to simulator:       adb push <local> <remote> 14. Enter the shell of the simulatorMode:       adb shell 15. Launch SDK, documentation, instance Download Manager:       Android 16. Unloading APK package:       adb shell       CD Data/app     & nbsp RM apk Package       exit       adb uninstall APK package's main package name    & nbsp;  adb install-r apk package 17. View ADB command Help information:       ADB assist 18. 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. Remove the System application:       adb remount (re-mount the system partition to make the system partition writable again).       adb shell       CD System/app       RM *.apk 21. Get administrator privileges:       adb root 22. 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 ,-EExtended data, etc.). 23, 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:8000 24, copy files:     You can copy files to a device or from a device,      Copy a file or directory to a device or emulator:   ADB push <source> <destination></destination></source>        such as: 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. Search Simulator/Device instance:      get a list of the currently running emulator/device instances and the status of each instance:     adb devices 26, view bug report: ADB Bugreport 27, record the wireless communication log:     Generally speaking, there is a lot of log of wireless communication, it is not necessary to record at runtime, but we can still set the record by command:     adb Shell & nbsp;   Logcat-b Radio 28, get the ID and serial number of the device:      adb get-product      adb Get-serialno 29, Access database SQLite3      adb shell      SqLite3

Get package name for all apps: c:\users\duke>adb Shell
02.# pm List Packages
03.PM List Packages http://blog.csdn.net/agods/article/details/8657970

Enter the following command to query which 5037 ports are occupied

Netstat-ano | Findstr "5037"
Kill the process that occupies the port
C:\users\wwx229495>taskkill/pid 3676/f
Success: The process with PID 3676 has been terminated.

Android ADB Usage

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.