Android SDK-debugging bridge ADB (2)

Source: Internet
Author: User

  Reading directory

  I. debugging bridge ADB

Ii. What are the main functions of ADB?

I. debugging bridge ADB
What is adb? What is the use of adb? How to Use the adb tool?

It is a general debugging tool used to manage simulators and real machines. It is powerful. You can directly open cmd to use the adb command. adb is called Android Debug Bridge, and serves as the debugging Bridge, through adb, We can debug the Android program through DDMS in Eclipse. To put it bluntly, it is the debug tool. adb works in a special way, the ** Socket TCP 5554 and other ports are used to allow the IDE to communicate with Qemu. By default, adb will use the network ports related to daemon. Therefore, when we run Eclipse, the adb process will automatically run, with the adb tool, we can manage the status of devices or mobile phone simulators, and perform many mobile phone operations, such as installing software, upgrading the system, and running shell commands. In short, adb is a bridge between Android phones and PCs, allowing users to perform comprehensive operations on their phones on their computers.

II:What are the main functions of ADB?

  1: view the status of the current simulator or Android device instance

The adb devices command is usually used to view the status of the simulator before use. The ADB response information is obtained through this command, and the ADB response information is displayed.

1.1: emulator-5554 is the Instance name

1.2: device indicates the instance connection status. device indicates that the instance is connected to adb. offline indicates that the instance is not connected to adb or cannot respond.

  

  2. Install and uninstall the APK Application

You can copy an APK application from your computer to a simulator or Android device, install the software using adb install <path_to_apk>, and uninstall the software using adb uninstall <packageName>, if you do not know the package name. you can find package = "" in xml.

2.1: first copy the apk file to the tools in the sdk directory

  

2.2: switch to the tools directory under the SDK installation path under dos

2.3: run the installation command

Adb install <path_to_apk>

  

The error occurred because I connected to the real machine and turned on the simulator, so adb gave me a Response Message "more than one driver and Simulator ", when I close the simulator and run the installation command, the system prompts that the installation is successful.

  

Uninstall APK

  

3: Copy files from the local machine to the simulator or Android device

Adb push <local path> <remote path>, <local path> refers to the target file on your machine or simulator, <remote path> refers to the target file on the remote device instance.

4: Copy files from the simulator to the simulator or Android device

Adb pull <remote path> <local path>: <local path> refers to the target file on your machine or on the simulator, <remote path> refers to the target file on the remote device instance.

5: Use shell commands

Enter the adb shell to enter the shell command line. You can use some common shell commands, such as the ls command to list the files.

  

 

    

Related Article

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.