Android adb shell Command Collection

Source: Internet
Author: User
Tags command line tag name access database port number




1. Display all Android platforms in the system:


Android list targets


2. Display all AVD (simulators) in the system:


Android List AvD


3. Create AVD (Simulator):


Android Create AVD--name name--target platform number


4. Start Simulator:


emulator-avd name-sdcard ~/name. IMG (-skin 1280x800)


5. Delete AvD (simulator):


Android Delete AVD--name name


6. Create SDcard:


mksdcard 1024M ~/name. IMG


7. AVD (Simulator) Location:


Linux (~/.ANDROID/AVD) Windows (c:documents and SETTINGSADMINISTRATOR.ANDROIDAVD)


8. Start Ddms:


Ddms


9. Displays all emulators currently running:


ADB devices


10. Execute a command on an emulator:


abd-s Simulator number command


  11. Install Application:


adb install-r application. APK


12. Get the files in the emulator:


adb pull <remote> <local>


13. Write file to emulator:


adb push <local> <remote>


14. Into the simulator shell mode:


adb Shell


15. Launch SDK, documentation, instance Download Manager:


Android


16. Unloading APK Package:


adb shell CD Data/app RM apk package exit adb uninstall APK package's main package name ADB install-r APK package


17. View ADB command Help information:


adb help


18. View log information on the command line:


adb logcat-s tag name

the commands behind
adb shell come mainly from:


source Systemcoretoolbox directory and source Frameworksbasecmds directory.


20. Delete System application:


adb remount (re-mount system partition to make system partitions writable). 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 extended data, etc.).


23, publishing port:


you can set any port number as the request port for the host to the simulator or device. such as: adb forward tcp:5555 tcp:8000


24, copy file:


you can copy files from a device or from a device, copy a file or directory to a device or emulator: ADB push <source> <destination></destination></s Ource> such as: adb push test.txt/tmp/test.txt Copy a file or directory from a device or emulator: ADB pull <source> <destination></desti Nation></source> such as: adb pull/addroid/lib/libwebcore.so.


25, Search Simulator/device example:


Gets the list of instances of the currently running emulator/device and the status of each instance: ADB devices


26, View bug report:


adb bugreport


27, record wireless communication log:


in general, the wireless communication log is very much, not necessary to record at run time, but we can still through the command, set records: ADB shell 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 #cd system/sd/data//Enter the system specified folder #ls//list displays current folder contents #rm-r xxx//delete folder with Name xxx and all files inside #rm xxx//delete files xxx #rmdir xxx//delete xxx folder
Related Article

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.