ADB shell command detailed, Android

Source: Internet
Author: User
Tags clear screen

Http://www.miui.com/article-275-1.html

http://noobjava.iteye.com/blog/1914348

ADB shell command detailed, Android Blog Category:
    • Android

Common:
1. Enter the shell mode of the simulator:
ADB shell

2. Install the application:
ADB install-r application. apk
ADB install
ADB install <apk file path >: This command installs the specified APK file on the device
ADB install-r <apk file path >: If the plus-r parameter overwrites the original installed software and preserves the data
Note: APK file name does not use Chinese and does not have a space number

3. Unloading APK Package:
ADB shell
CD Data/app
RM APK Package
Exit
The main package name of the ADB uninstall APK package
ADB install-r APK Package

4. Get the files in the emulator:
ADB pull <remote> <local>

5. Write the file to the emulator:
ADB push <local> <remote>

6. Display all Android platforms in the system:
Android list targets

7. Display all AVD (simulator) in the system:
Android List AVD

8. Displays all the emulators currently running:
ADB devices

9. Create an AVD (simulator):
Android Create AVD--name name--target platform number

10. Start the emulator:
EMULATOR-AVD name-sdcard ~/name. IMG (-skin 1280x800)

11. Delete the AVD (simulator):
Android Delete AVD--name name

12. Create SDcard:
Mksdcard 1024M ~/name. img

Where the AVD (simulator) is located:
Linux (~/.ANDROID/AVD) Windows (C:\Documents and SETTINGS\ADMINISTRATOR\.ANDROID\AVD)

14. Start Ddms:
Ddms

15. Execute a command on a simulator:
Abd-s Simulator number Command

16. Launch the SDK, documentation, instance download Manager:
Android

17. View the ADB command Help information:
ADB Help

18. View the log information on the command line:
ADB logcat-s label Signature

The commands behind the ADB shell come mainly from:
SOURCE \system\core\toolbox directory and source code \FRAMEWORKS\BASE\CMDS directory.

20. Remove the System application:
ADB remount (re-mount the system partition so that the system partition is re-writable).
ADB shell
CD System/app
RM *.apk

21. Get Administrator Privileges:
ADB root

22. Start activity:
ADB shell am START-N package Name/package name + class name (-N class name,-a action,-d date,-m mime-type,-c category,-e Extended data, etc.).

23. Release Port:
You can set any port number as the request port for the host to the emulator or device. Such as:
ADB forward tcp:5555 tcp:8000

24. Copy files:
You can copy files to a device or from a device,
To copy a file or directory to a device or emulator:
ADB push <source> <destination></destination></source>
such as: adb push test.txt/tmp/test.txt
To copy a file or directory from a device or emulator:
ADB pull <source> <destination></destination></source>
such as: ADB pull/addroid/lib/libwebcore.so.

25, the Search simulator/device instance:
Gets a list of instances of the currently running emulator/device and the status of each instance:
ADB devices

26. Check the bug report:
ADB bugreport

27. Record the wireless communication log:
Generally speaking, the wireless communication log is very many, at run time not necessary to record, but we can still through the command, set the record:
ADB shell
Logcat-b Radio

28. Get the ID and serial number of the device:
ADB get-product
ADB Get-serialno

29. Accessing the database SQLite3
ADB shell
Sqlite3

Of course, you can adb help view:
_______________________________________________________________________________

Attached: commands commonly used in Linux systems:
1. To list all the files in the current directory, enter:
Ls-a
List all files, including. (points) 、.. (dots) and other files that start with a point.
2. To display more information, enter:
Ls-l chap1. Profile
Displays a long list, including details about CHAP1 and. Profile.
3. To display more information about the directory, enter:
Ls-d-L. Manual Manual/chap1
Displays the directory. and manual, and a long list of file MANUAL/CHAP1. When the-D flag is not used, it is listed. and manual all files in the directory, not details about the directory itself.
4. To list the files according to the modified time, enter:
Ls-l-T
Displays a long list of recently modified files, followed by older files.
File
The/usr/bin/ls contains the LS command.
/ETC/PASSWD contains the user ID.
/etc/group contains the group ID.
/usr/share/lib/terminfo/* contains terminal information.

5. rm files: Deleting files

1, DOS common commands (will not use their own search to learn)

    • cd--changing the current directory

    • dir--Displaying folder Contents

    • md--Creating subdirectories

    • copy--Copy Files

    • move--Moving files

    • del--Deleting files

    • cls--Clear Screen

    • attrib--displaying the file's (file) properties


2, Linux common commands (will not use their own search to learn)

      • cd--changing the current directory

      • pwd--View the current directory full path

      • ls--View the directory or the genus * of the file, list the following files as a directory

      • mkdir--Building a Directory

      • cp--Copy Files

      • rm--Deleting files and directories

      • mv--Remove directory or change file name

      • chmod/chown--Permissions Modification

      • clear--Clear Screen

      • mount--Loading a hardware device

      • su--switch to another person's identity without exiting the login

      • grep--text Content Search

      • find--file or directory name and permission belong to the master and other matching search

      • kill--can kill a process that is in progress or is already in a dest state

      • df--command to check the disk space consumption of the file system

        • http://noobjava.iteye.com/blog/1914348

ADB shell command detailed, Android

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.