Android ADB command (view wifi password, MAC address, device information, Operation file, View File, log information, uninstall, start and install APK, etc.), androidadb installation apk
ADB is very powerful. Remember some ADB commands to help improve work efficiency.
1. Get the serial number:
Adb get-serialno
2. view the devices connected to the computer:
Adb devices
3. Restart the machine:
Adb reboot
4. Restart to bootloader, that is, the fl mode:
Adb reboot bootloader
5. Restart to recovery, that is, the recovery mode:
Adb reboot recovery
6. view log:
Adb logcat
7. Terminate the adb service process:
Adb kill-server
8. Restart the adb service process:
Adb start-server
9. Get the MAC address of the machine:
Adb shell cat/sys/class/net/wlan0/address
10. Obtain the CPU serial number:
Adb shell cat/proc/cpuinfo
11. Install APK:
Adb install <apkfile> // For example, adb install baidu.apk
12. retain data and cache files and reinstall apk:
Adb install-r <apkfile> // For example, adb install-r baidu.apk
13. Install apk to SD card:
Adb install-s <apkfile> // For example, adb install-s baidu.apk
14. Uninstall APK:
Adb uninstall <package> // For example, adb uninstall com. baidu. search
15. Uninstall the app but keep the data and cached files:
Adb uninstall-k <package> // For example, adb uninstall-k com. baidu. search
16. Start the application:
Adb shell am start-n <package_name>/. <activity_class_name>
17. view the cpu and memory usage of the device:
Adb shell top
18. view the app that occupies the first 6 of the memory:
Adb shell top-m 6
19. refresh the memory information once, and then return:
Adb shell top-n 1
20. query the memory usage of each process:
Adb shell procrank
21. Killing a process:
Adb shell kill [pid]
22. view the process list:
Adb shell ps
23. view the status of a specified process:
Adb shell ps-x [PID]
24. View background services information:
Adb shell service list
25. view the current memory usage:
Adb shell cat/proc/meminfo
26. View IO memory partitions:
Adb shell cat/proc/iomem
27. Remount the system partition to a read/write partition:
Adb remount
28. Copy files from the local device to the device:
Adb push <local> <remote>
29. Copy files from the device to the local device:
Adb pull <remote> <local>
30. List the files and folders in the directory, which is equivalent to the dir command in dos:
Adb shell ls
31. Enter the folder, which is equivalent to the cd command in dos:
Adb shell cd <folder>
32. Rename the 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 <folder>
35. Move files:
Adb shell mv path/file newpath/file
36. Set file permissions:
Adb shell chmod 777/system/fonts/DroidSansFallback. ttf
37. Create a folder:
Adb shell mkdir path/foldelname
38. view the file content:
Adb shell cat <file>
39. view the wifi password:
Adb shell cat/data/misc/wifi/*. conf
40. Clear log cache:
Adb logcat-c
41. view the bug report:
Adb bugreport
42. Get the device name:
Adb shell cat/system/build. prop
43. View ADB help:
Adb help
44. Run monkey:
Adb shell monkey-v-p youur. package. name 500
More:
How to obtain the name of an Android device (detailed description of the ADB command)
Official description