Turn "Android adb command Daquan

Source: Internet
Author: User

The ADB is powerful, and remembering some of the ADB commands can help improve productivity.

  1. Get Serial Number:

    ADB Get-serialno
  2. To view the devices that connect to your computer:

    ADB devices
  3. Restart the machine:

    ADB reboot
  4. Restart to bootloader, which is the brush mode:

    ADB reboot bootloader
  5. Restart to recovery, which is the recovery mode:

    ADB reboot Recovery
  6. View log:

    ADB logcat
  7. To terminate the ADB service process:

    ADB kill-server
  8. To restart the ADB service process:

    ADB start-server
  9. Get Machine MAC Address:

    ADB Shell cat/sys/class/net/wlan0/address
  10. Get the CPU serial number:

    ADB Shell Cat/proc/cpuinfo
  11. Install APK:

    ADB install <<span style= "padding:0px; margin:0px; line-height:21px; " >apkfile>//For example: adb install baidu.apk
  12. Keep the data and cache files and reinstall the APK:

    ADB install-r <<span style= "padding:0px; margin:0px; line-height:21px; " >apkfile>//For example: ADB install-r baidu.apk
  13. Install apk to SD card:

    ADB install-s <<span style= "padding:0px; margin:0px; line-height:21px; " >apkfile>//For example: ADB install-s baidu.apk
  14. Uninstall APK:

    ADB uninstall <<span style= "padding:0px; margin:0px; line-height:21px; " >package>//For example: ADB uninstall Com.baidu.search
  15. Uninstall the app but keep the data and cache files:

    ADB uninstall-k <<span style= "padding:0px; margin:0px; line-height:21px; " >package>//For example: ADB uninstall-k com.baidu.search
  16. To launch an app:

    ADB shell am start-n <<span style= "padding:0px; margin:0px; line-height:21px; " >package_name>/.<<span style= "padding:0px; margin:0px; line-height:21px; " >activity_class_name>
  17. To view the CPU and memory consumption of the device:

    ADB Shell Top
  18. To see the top 6 apps that occupy memory:

    ADB Shell Top-m 6
  19. Refreshes the memory information once and then returns:

    ADB Shell Top-n 1
  20. Query the memory usage of each process:

    ADB Shell Procrank
  21. Kill a process:

    ADB shell kill [PID]
  22. To view a list of processes:

    ADB Shell PS
  23. To view the status of a specified process:

    adb shell Ps-x [PID]
  24. To view background services information:

    ADB Shell Service List
  25. To view current memory consumption:

    ADB Shell Cat/proc/meminfo
  26. To view the IO memory partition:

    ADB Shell Cat/proc/iomem
  27. To re-mount the system partition as a read-write partition:

    ADB remount
  28. Copy files from local to device:

    ADB push <<span style= "padding:0px; margin:0px; line-height:21px; " >local> <<span style= "padding:0px; margin:0px; line-height:21px; " >remote>
  29. Copy files from device to Local:

    ADB pull <<span style= "padding:0px; margin:0px; line-height:21px; " >remote> <<span style= "padding:0px; margin:0px; line-height:21px; " >local>
  30. Lists the files and folders in the directory, equivalent to the dir command in DOS:

    ADB Shell ls
  31. Enter the folder, equivalent to the CD command in DOS:

    adb shell CD <<span style= "padding:0px; margin:0px; line-height:21px; " >folder>
  32. To rename a file:

    adb shell rename Path/oldfilename path/newfilename
  33. Delete system/avi.apk:

    ADB Shell rm/system/avi.apk
  34. Delete the folder and all the files below it:

    adb shell rm-r <<span style= "padding:0px; margin:0px; line-height:21px; " >folder>
  35. To move a file:

    ADB shell MV Path/file newpath/file
  36. To set file permissions:

    ADB shell chmod 777/system/fonts/droidsansfallback.ttf
  37. New folder:

    ADB shell mkdir path/foldelname
  38. To view the contents of a file:

    ADB shell cat <<span style= "padding:0px; margin:0px; line-height:21px; " >file>
  39. To view WiFi password:

    ADB Shell cat/data/misc/wifi/*.conf
  40. Clear the log cache:

    ADB logcat-c
  41. To view the bug report:

    ADB bugreport
  42. Get Device Name:

    ADB Shell Cat/system/build.prop
  43. View ADB help:

    ADB Help
  44. Run Monkey:

    adb shell Monkey-v-P Your.package.name 500

Turn "Android adb command Daquan

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.