ADB command-line instance detailed
1.ADB devices
Displays the emulator/device currently connected to the ADB server. The output is made up of two parts: serial number and status. The serial number consists of the device type and the port number, and the status includes offline (not connected) and device (connected).
2.adb–s <serialNumber><command>
Specify the emulator/device instance, if you need to install the email.apk app on emulator5552, you can execute the following command: Adb–s emulator5552 install email.apk If you run multiple emulators/devices, you will not be given an error.
3,adb install <path_to_apk> where path_to_apk represents the APK file storage path. such as installing the APK on the desktop
4, ADB push <local><remote> complete file copy function. Unlike the installation of a file, it can be used for any type of file, and the commands to copy files from local to emulator/device instances are as follows:
ADB push <local> <remote>
The <local> parameter indicates the location of the file (folder) on the computer;<remote> parameter represents the file (folder) location on the emulator/device instance.
The commands to copy files from the emulator/device instance to the local computer are as follows
ADB pull <remote> <local>
5. Enter the shell command
ADB shell
6,adb root access to the root of the phone
7,adb remount re-mount the system partition, make the system partition re-writable, want to delete the mobile app or reinstall the system application, this command and the previous command is often used.
example, delete the email.apk in the phone
Examples of ADB commands are detailed!