Android ADB command

Source: Internet
Author: User
Android ADB command

1. View Devices

  • ADB 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

  • ADB help

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.

Related Article

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.