Android SDK ADB command Getting Started learning

Source: Internet
Author: User

"Basic Introduction"

In the process of learning Android, the ADB command is often required. ADB full name Android Debug Bridge, is a tool in the Android SDK,
ADB is a "client-server Side" program in which the client is the operating computer, and the server side is the Android device, including the physical machine for the ring virtual machine. Use this command to directly manipulate the Android emulator or the real andriod device.
Its main functions are:
* Shell running the device (command line)
* Port mapping for Management simulator ring devices
* Upload/download files between computer and device
* Install the local APK software to the simulator ring Android device
ABD Command configuration:
Add the paths to the path path

%android_home%/platform-tools
After completion, it can be used in CMD or console.


"General Command Details"
1, check the equipment situation

ADB devices
2. Install the Software
ADB install <apk file path >
3. Uninstalling the Software
ADB Uninstall < software name >ADB uninstall-k < software name >
4. Enter the shell of the device or simulator
ADB shell
After entering one of the functions is to view the specific parameters of the phone
The specific commands to view the phone system are as follows:
Getprop View all information parameters of the machine Getprop Ro.serialno view the SN number of the machine Getprop Ro.carrier View the machine's CID number Getprop ro.hardware View Machine Board code Getprop Ro.bootloader View SPL (hboot) version number
5. Release port
You can set any port number as the request port for the host to the simulator's ring device. Such as:
ADB forward tcp:5555 tcp:8000
6, send files from the computer to the device
ADB Push < Local path > < remote path >
7. Download files from the device to the computer
ADB pull < Remote path > < local path >
8. Start and close the ADB service
sudo adb start-server
Display Daemon Success after the use of adb xxx, no longer use ADB can be
sudo adb kill-server
Ends the daemon process.

"Common Errors"
The following errors are often reported when entering the ADB:

This problem typically occurs in two situations:

1,: There are multiple devices or simulator connection
Workaround: Specify a device or emulator to connect to
1. Get the simulator/device list
ADB devices
2. Specify device to execute ADB shell
Adb-s devicename Shell
For example:
Adb-s emulator-5554 Shell
In multi-device, executing the ADB command typically requires the device to be specified with the parameter-S. For example, uninstalling the package on emulator-5554 Com.soft.camera

Adb-s emulator-5554 Uninstall Com.soft.camera
In the second case: there is a device or simulator (there is a number that is displayed because this device has been used two times with the command ADB devices will see this device in two ways: offline and device)
Workaround:
General approach: Enter ADB start-server in the command window to restart the Adb.exe service
If the above method is not possible, the ultimate method: Open the taskbar, select the "Process" tab, find the Adb.exe process, end it, restart the finished ok (or in the Command Window Input command adb kill-server)

ADB start-server adb kill-server

Reference article:

http://blog.csdn.net/hellofeiya/article/details/8108317

Http://android.tgbus.com/lab/break/201106/357610.shtml

Http://blog.sina.com.cn/s/blog_7ffb8dd50100wvrb.html

Android SDK ADB command Getting Started learning

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.