Android SDK in-depth understanding of ADB

Source: Internet
Author: User

ADB server-The client program consists of 3 parts 1. The client is running on the development machine and can be called through the ADB command line, and the ADT plug-in and DDMS also require ADB client 2. Service side (server) Run as a background process on the development machine (Adb.exe opens your task Manager viewing process) for interactive communication between the client and ADB daemon. 3. Background program daemon run on the virtual machine or device to start the ADB client, check whether the server is running, otherwise open the service, TCP is 5037, used to accept the command issued by the ADB client. All clients interact with the server using port 5037. The server establishes a connection to the simulator or device. Check the emulator/device for the odd (odd-numbered) port number between 5555 and 5582, and when found, establish a connection to this port. The simulator/device then obtains a series of successive ports, the even-numbered port number (even-numbered) for the console console connection, and the odd number for the ADB connection. Emulator 1, console:5554
Emulator 1, adb:5555
Emulator 2, console:5556
Emulator 2, adb:5557
And so on ... The client can control any emulator/device ADB related commands http://developer.android.com/tools/help/adb.html#issuingcommands basic command line
adb [-d|-e|-s <serialnumber>] <command>
ADB get-state gets current status of ADB start-server check whether ADB service process is turned on ADB kill-server terminate ADB service process current device
ADB devices
From the device "pull" the file to the computer
ADB pull <remote> <local>
"Push" files from the computer to the device
ADB push <local> <remote>
Install APK
ADB install <path_to_apk>
Specify the device
UNIX shell script opens activity
ADB shell am start-a Android.intent.action.VIEW
Uninstall app
adb shell pm Uninstall com.example.MyApp
Open path
ADB Shell Ls/system/bin
Turn on debugging
ADB logcat

Android SDK in-depth understanding of ADB

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.