Android simulator ADB command Introduction

Source: Internet
Author: User
Tags linux shell commands
The tools folder of the SDK contains the android simulator operation's Important Command ADB. ADB is called Android debug bridge, which is the role of the debugging bridge.
  • The tools folder of the SDK contains the android simulator operation's Important Command ADB. ADB is called Android debug Bridge, which serves as the debugging bridge. Through ADB, We can debug Android through ddms in eclipse.ProgramTo put it bluntly, it is the debug tool.

    ADB works in a special way by listening to socket TCP 5554 and other ports to allow the IDE to communicate with qemu. By default, ADB will use the network port related to daemon, so when we run eclipse, the ADB process will automatically run.

    1. You can use ADB to easily execute Linux shell commands. For example, ADB shell DIR is used to list directories. in Linux, the root directory is a drive C and drive D instead of a drive D on Windows.

    2. Install the APK program to the simulator and run ADB install android123.apk. The installation package named android123will be installed in the androidsimulator. The preceding file is the android123.apk file which needs to be placed in the SDK \ tools directory.

    3. transfer the file to emulator. Use the ADB push android123.txt/tmp/android123.txt command to transfer the android123.txt file under SDK \ toolsto the/tmp/folder of the simulator, note that the content in the/tmp/folder will be cleared when the android simulator restarts. In addition to the description of ddms In the ADT plug-in,

    4. Returning files from the android simulator to the computer

    You can use the ADB pull/tmp/android123.txt android123.txtcommand to upload the android123.txt file from the tmpfile of the simulator to the computer SDK \ tools directory.



    The android ADB command not only allows you to conveniently install the APK file, but also provides some auxiliary functions of Android debug bridge for the PC and Android simulators.

    1. If you find * daemon not running. Starting it now * prompts in eclipse, you can end the ADB.

    ADB kill-Server

    2. display the android simulator status

    ADB devices port number and other information. After execution, the TCP port number is displayed.
    ADB get-product get Device Model
    ADB get-serialno get the serial number

    3. Waiting for a running Device

    ADB wait-for-Device

    4. port forwarding

    ADB forward TCP: 5555 TCP: 1234 is used to forward the default TCP 5555 port to port 1234.

    5. view the bug report

    ADB bugreport


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.