ADB Debugging Tools
The ADB (Android debug Bridge) is a generic debugging tool provided by Android, which allows us to manage the status of the device or phone simulator. You can also do the following:
1. Quickly update the code in the device or phone simulator, such as app or Android system upgrade;
2. Run the shell command on the device;
3, management equipment or mobile phone simulator on the predetermined port;
4. Copy or paste files on the device or phone simulator;
1, install the application to the simulator:
ADB install
Unfortunately, Android does not provide a command to uninstall the app, and can only delete it manually:
ADB shell
Cd/data/app
RM app.apk
2. Shell entering the device or simulator:
ADB shell
From the above command, you can enter the device or emulator shell environment, in this Linux shell, you can execute a variety of Linux commands, in addition, if you want to execute only one shell command, you can use the following way:
ADB Shell [command]
For example, the ADB shell DMESG will print out debug information for the kernel.
3. Release Port:
You can set any port number as the request port for the host to the emulator or device. Such as:
ADB forward tcp:5555 tcp:8000
4. Copy files:
Files can be copied to a device or from a device,
To copy a file or directory to a device or emulator:
ADB push
such as: adb push test.txt/tmp/test.txt
To copy a file or directory from a device or emulator:
ADB pull
such as: ADB pull/addroid/lib/libwebcore.so.
5, the Search simulator/device instance:
Gets a list of instances of the currently running emulator/device and the status of each instance:
ADB devices
6. Check the bug report:
ADB bugreport
7. Record the wireless communication log:
Generally speaking, the wireless communication log is very many, at run time not necessary to record, but we can still through the command, set the record:
ADB shell
Logcat-b Radio
8. Get the ID and serial number of the device:
ADB get-product
DB Get-serialno
9. Accessing the database SQLite3
ADB shell
Sqlite3
10. Remote Connection
WiFi debugging
1. Of course, the first thing is to connect the phone via the data cable, ADB devices to see if the device is connected.
2. If connected, check the phone's IP address in the following two ways:
1) Set-〉 wireless or network---〉wlan settings-〉 Press the Menu key and select the Advanced option---〉IP address such as: 10.207.82.146
ADB Connect 10.207.82.146
2) Command execution
adb shell ip-f inet addr Show Wlan0
If the connected to 10.207.82.146:5555 description is successful, the connection can be debugged (5555 is the default port)
If unable to connect to iphonesubinfo:5555 tries the ADB tcpip 5555 Restart port, then execute the above command.
# # #Adb Shell Common commands
ADB kill-server close ADB service
ADB Start-server launches ADB service
ADB devices-l viewing mounted devices
ADB shell netcfg View IP
ADB logcat-c purge Log
ADB Install Apk_file installation application
ADB Uninstall apk_file Uninstall application
This article is from "Meteor Studio" blog, please make sure to keep this source http://redone.blog.51cto.com/5382451/1881807
ADB Debugging Tools