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