Android ADB command
1. View Devices
This command is used to view the currently connected devices. The Android devices or simulators connected to the computer are listed and displayed.
2. Install software
- ADB install <APK file path>
This command installs the specified APK file on the device.
3. uninstall software
- ADB uninstall <software Name>
- ADB uninstall-k <software Name>
If the-k parameter is added, the software is uninstalled but the configuration and cache files are retained.
4. log on to the device Shell
- ADB Shell
- ADB shell <command>
This command will log on to the shell of the device.
The <command> command is used to directly run the device command, which is equivalent to executing the remote command.
5. Send files to the device from the computer
- ADB push <local path> <remote path>
Use the push command to copy files or folders on the local computer to the device (mobile phone)
6. download files from your device to your computer
- ADB pull <remote path> <local path>
Run the pull command to copy files or folders on the device (mobile phone) to the local computer.
7. display help information
This command displays help information
8. delete files and folders
Tools> ADB remount
Tools> ADB Shell
# Su
# Cd system/SD/Data // enter the specified folder in the system
# Ls // the contents of the current folder are displayed in the list
# Rm-r XXX // delete a folder named XXX and all its files
# Rm XXX // delete file xxx
# Rmdir XXX // Delete the xxx folder
9. Use the mkdir command to create a folder. Example: mkdir Images
At this point, the folder has been created. Go to ddms in eclipse and open the new folder. You can see that the new folder already exists in this directory.
10. Use the ADB command to send coordinates to the simulator.
(1) In ddms, by setting the latitude and longitude, and sending, the latitude and longitude can be obtained in the simulator, and all applications in the simulator use it as the latitude and longitude of the local machine.
(2) In some cases, you cannot set the longitude and latitude in ddms. Therefore, you need to telnet localhost 5444 in cmd to enter the 5444 simulator (This number may change) -- note that the telnet service is not enabled in Windows 7, so you need to enter the control panel/Program/enable or disable the WINDOWS function/check the telnet server and client to start the telnet service. Then set the longitude and latitude in the form of GEO fix longitude and latitude to achieve the same effect.