Android adb command

Source: Internet
Author: User

1. View the device

    • ADB devices

This command is to view the currently connected device, the Android device connected to the computer, or the emulator will list the display

2. Installing the Software

    • ADB install <apk file path >

This command installs the specified APK file on the device

3. Uninstalling the Software

    • ADB uninstall < software name >
    • ADB uninstall-k < software name >

If you add the-K parameter, the software is uninstalled but the configuration and cache files are preserved.

4. Log in to the device shell

    • ADB shell
    • adb Shell <command Command >

This command will log into the device's shell.
The following add <command command > will be run directly on the device command, equivalent to executing a remote command

5. Send files from the computer to the device

    • ADB Push < Local path > < remote path >

Use the push command to copy files or folders on your computer to your device (mobile)

6. Download files from the device to the computer

    • ADB pull < Remote path > < local path >

Use the pull command to copy files or folders on your device (phone) to your local computer

7. Display Help information

    • ADB Help

This command will display the Help information

8. deleting files and folders

TOOLS>ADB remount
TOOLS>ADB Shell
#su
#cd system/sd/data//Enter the specified folder within the system
#ls//list displays the contents of the current folder
#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

9. Use the mkdir command to create a new folder. Example: mkdir images

Here, the folder has been newly created, viewed in Ddms in Eclipse, opens the location of the new folder, and you can see that the new folder already exists in the directory.

10. Send coordinates to simulator via ADB command

(1) in the DDMS by setting the latitude and longitude and send, you can get the latitude and longitude in the simulator, and all applications under the simulator are the local latitude and longitude
(2) In some cases, it is not supported to set the latitude and longitude in the DDMS, so you need to go through the cmd under the telnet localhost 5444来 into 5444 of this simulator (this number may change)-Note that the Telnet service is not open under Win7, so go to the Control Panel/ Program/Turn on or turn off Windows features/tick Telnet service side and client to start the Telnet service. You then set the latitude and longitude in the form of geo fix longitude to achieve the same effect.

use command line under ADB shell to delete specified files and folders in Android systemCategory: Android beginner 2011-02-22 15:51 1153 people read comments (0) favorite reports Androidshell

TOOLS>ADB remount
TOOLS>ADB Shell
#su
#cd system/sd/data//Enter the specified folder within the system
#ls//list displays the contents of the current folder
#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

Android adb command

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.