ADB's all-called Android Debug Bridge, is the role of the Debug bridge. With ADB we can easily debug the Android program via DDMS in Eclipse, which is the Debug tool. ADB has a special way of working, using ports such as the Socket TCP 5554 to communicate with the IDE and Qemu, by default ADB will daemon the associated network ports, so the ADB process will run automatically when we run Eclipse. As a developer, it is very necessary to master the appropriate ADB operations commands. Make a small summary of the ADB commands that are used relatively more often in your work.
1. ADB's own management-related commands
ADB kill-server terminates ADB service process
ADB start-server start or restart the ADB service process
ADB Root restarts adb services with root privileges
2. Setting (including simulator) management with ADB
ADB devices viewing devices connected to a computer
ADB Get-serialno Gets the serial number of the device connected to the computer and is currently connected to only one device to get
ADB reboot Restart the device connected to the computer
ADB reboot Bootloader/recovery Restarts the device into FastBoot mode or recovery mode, usually used when the machine is being brushed
adb [-d|-e|-s] command sends the specified command to the specified device, where Serialnuber is the device number
3. Get Device hardware information
adb shell cat/sys/class/net/wlan0/address get WiFi MAC address
ADB shell Cat/proc/cpuinfo get CPU serial number
ADB shell Cat/system/build.prop get device compilation properties
ADB shell cat/data/misc/wifi/*.conf get device Wi-Fi configuration information
4. App operation via device management
ADB install [-r|-s] installation apk file
adb uninstall [-K] Uninstall APP
ADB shell top [-m] view memory, if number indicates how many data is viewed
ADB shell PS View process list data
adb shell kill kills the corresponding PID process
ADB shell Ps-x View the running state of the specified PID
ADB Shell Service List view background service information
ADB shell cat/proc/meminfo View current Memory usage
adb shell cat/proc/iomen View IO Memory Partitioning
5. Related ADB commands for working with files
ADB shell LS mnt View the name of the storage device in all devices
ADB remount to re-mount the system partition as a read-write partition
ADB push copies files locally and locally to the device from the local and remote files
ADB pull copy files from device to local operation
ADB shell LS View all files and folders under the directory
ADB Shell CD View folder contents
ADB shell mkdir path/floldername new file
6. Other Operational commands
ADB shell input text send file contents
ADB shell input KeyEvent sends keyboard events via ADB command
ADB shell WM size get device resolution
ADB shell Getprop get device parameter information
ADB shell SetProp Setting the device's parameter information
ADB shell screencap-p screenshot using adb command
adb shell Screenrecord [options] use ADB commands for video recording
[Options] can be filled in:
Size Width*height
Bit-rete
-time-limit time limit, etc.
Betterlater
This article source:http://blog.csdn.net/true100/article/details/49736481#rd
Summary of commonly used ADB commands in Android development