Android Common ADB commands

Source: Internet
Author: User

1. View all linked devices

Command:

ADB devices

Cases:

C:\USERS\LAIYU>ADB devices

List of devices attached

5D3B5AAC Device

Device commands

2. Copying Files / directory to mobile device

Command:

ADB push

Example: Copy d:\\ wifi.apk to phone/mnt/sdcard/(phone memory)

C:\USERS\LAIYU>ADB Push d:\\wifi.apk/mnt/sdcard/

1661 kb/s (7471417 bytes in 4.390s)

3. copy files from a mobile device / Catalogue

Command:

ADB pull []

Cases:

C:\USERS\LAIYU>ADB pull/mnt/sdcard/wifi.apk d:\\

1573 kb/s (7471417 bytes in 4.637s)

Note: If the file already exists, overwrite it directly, without prompting

4. Enter the mobile remote terminal

Command:

ADB shell

Cases:

C:\USERS\LAIYU>ADB Shell

[Email protected]:/$

5. running Remote Shell Command

ADB shell

6. View Device Logs

Command:

ADB Logcat []

Note: About FILTER-SPEC reference command: ADB logcat--help

7. installation

Non-covered installation

Command:

ADB install package_name.apk

Cases:

C:\USERS\LAIYU>ADB Install d:\\wifi.apk

2802 kb/s (7471417 bytes in 2.603s)

PKG:/data/local/tmp/wifi.apk

Success

Overwrite the installation

Command:

ADB install package_name.apk

Cases:

C:\USERS\LAIYU>ADB Install-r d:\\wifi.apk

1772 kb/s (7471417 bytes in 4.117s)

PKG:/data/local/tmp/wifi.apk

Success

Note: ADB will copy the package to the TEMP directory and install it

8. Uninstall

Command:

adb uninstall [-K] Pkg_name

Option Description:

-K preserving data and cache directories

Note: Here's the pkg_name, not the on-time package naming

Cases:

C:\USERS\LAIYU>ADB Uninstall com.snda.wifilocating

Success

Script commands

9. Open ( run ) Service

Command:

ADB start-server

Note: The ADB process is visible in Task Manager after opening

Cases:

C:\USERS\LAIYU>ADB Start-server

* Daemon not running. Starting it now on Port 5037 *

* Daemon started successfully * Example:

10. terminating a running service

Command:

ADB kill-server

Android Common ADB commands

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.