1.ADB devices View the currently connected devices;
2.ADB start-server open adb service;
3.ADB kill-server stop adb service;
4.ADB install-r (apk path)-R means if the APK is installed, reinstall the APK and keep the data and cache files.
5.ADB Uninstall (APK package name) Uninstall app but keep data and cache files;
6. List the package name
ADB shell PM List Packages lists the package names for all applications in the system;
ADB shell PM List packages-s Lists all package names for the system application;
ADB shell PM List packages-3 lists the third-party app package names in addition to the system application;
7. ADB shell pm Clear (apk package name) clears the app data and cache;
8.ADB Shell am start-n com.helloshan.demo/. Mianactivity start the application;
9. ADB shell am force-stop (APK package name) force stop the application;
10.ADB Remount re-mount the system partition to allow the system partition to be re-writable;
11. Remove the System application:
ADB shell
CD system/app/
Ls
RM *.apk
The LS command can view all files under a folder
12. Kill a Process:
ADB shell
PS is the view process command
Kill PID you want to end the process
13.pull and push files, requires ADB remount to get permission before operation
ADB push (file path) (the path you want to push)
ADB pull (file path) (Path to pull)
14.ADB remount Get file Read and Write permissions:
15.ADB Root Gain root privileges
16. View Logs
ADB logcat viewing logs
ADB logcat > Log.txt Save Log to File
ADB logcat-s "Activitymanager" "-S" option: Sets the label of the output log to display only that label
The log;
17.ADB Shell WM size View screen resolution
18. Common Operations Folder commands
ADB shell
CD System/app//Enter the specified folder within the system
LS//list displays the current folder contents
mkdir XXX//create folder for XXX
Rm-r XXX//Delete the folder with the name xxx and all the files inside it
RM XXX//delete file xxx
rmdir xxx//delete xxx folder
ADB common commands