Summary of commonly used Android ADB commands [Android SDK]

Source: Internet
Author: User

Some ADB commands are often used in my work. Today I have summarized some common commands of Android ADB, hoping to help you a bit:

1. Install the APK package: Tools> ADB install xxx.apk enter

2. Uninstall the APK package: Tools> ADB uninstall com.cn. Android [package name]

3. 1. View logcat information: Tools> ADB logcat

2. Output The logcat information and save it as TXT: Tools> ADB logcat> abc.txt

4. Press the stack image: Tools> ADB pull/sdcard/image/aaa.jpg C:/press the AAA image in the image directory under the sdcard to the root directory of the C drive.

5. Use the ADB shell command:

(1) CD sdcard enters the mobile phone memory card

(2) ls-l view the detailed information of the file

(3) ls-a to view information about hidden files. For example, a file starting with a dot may be a system file.

(4) Exit

(5) Rm 11.png Delete 11 Images

(6) RM *. PNG: delete all images ending with PNG.

 

6. in Linux, sometimes it is connected to a mobile phone and ddms does not recognize any other solution:

Use the root account to disable ADB devices and start it:

(1) first enter the root account: su

(2) enter the password

(3) Go to tools> sudo./ADB kill-server and turn off the server service.

(4) Go to tools> sudo./ADB devices to start the existing ADB service.

7. Install JDK in Linux

(1) download jdk-6u15-linux-i586.bin files

(2)/usr/Java enter the Directory

(3) set the password Sudo-passwd 123456 for the root user.

(4) mkdir Java CD Java

(5) Modify permissions: chmod + x/home/zzd/downloads/jdk-6u15-linux-i586.bin

(6) install JDK binfile:/home/zzd/downloads/jdk-6u15-linux-i586.bin

(7) Configure environment variables: Add the following environment variables to/etc/profile

Root permission to enter the profile file: sudo gedit/etc/profile

Export java_home =/usr/Java/jdk1.6.0 _ 15
Export android_java_home = $ java_home
Path = $ java_home/bin:/android-sdk-linux_86/tools: $ path
Export classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar

 

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.