Android adb and shell command usage summary

Source: Internet
Author: User
Tags unix domain socket

ADB command

Help information

Version information

Service Start-Stop

ADB start-server start adb server

ADB kill-server stop ADB server

Device status

adb devices Display all devices (format serial number and status)

-L display Qulifiers (for example: Product:mt7-cl00 model:huawei_mt7_cl00 device:hwmt7)

ADB wait-for-device device Online has been blocked before, and can be used as a prefix for commands that do not require the system to be fully booted : such as adb wait-for-device shell Getprop

ADB get-state

ADB Get-serialno

ADB Get-devpath

ADB status-window continuous display of device status (updated upon change)

ADB root restarts adbd daemon with root privileges

ADB usb Restart ADBD daemon, monitor usb

ADB tcpip <port> Restart ADBD daemon, listening on the specified TCP port

ADB specifies target device options (not available)

-A All devices

-D USB Connected device

-E Simulator Device

-S <Serial-No> specify devices by serial number

ADB remout re-mount/system and/vendor partitions in read-write mode

ADB reboot Restart device

Bootloader reboot into bootloader mode

Recovery reboot and enter recovery mode

File transfer

ADB pull <path-dev> <path-pc> copy files or directories from the device to the PC side

-P Show Progress

ADB push <path-pc> <path-dev> copy PC-side files or directories to device

-P Show Progress

-a copy timestamp and mode

adb sync [<directory>] Copy the contents of the PC-side changes to the device (default is/system,/vendor,/data)

-l list only, do not copy

ADB Install <apkfile-pc> installation application

-R Replacement

-S mount to SD card

Possible error messages:

    

ADB uninstall <package-name> removal apps

-K preserving data and cache directories

Call the Android shell command

ADB shell enters the shell environment

ADB shell [shell-cmd] Execute shell command

Android Shell Command Summary: http://www.cnblogs.com/pixy/p/4741532.html

Network-related

ADB connect

ADB disconnect

ADB forward <spec-local> <spec-remote> socket directional bindings:

The spec format is:

Tcp:<port>
Localabstract:<unix Domain Socket name>
Localreserved:<unix Domain Socket name>
Localfilesystem:<unix Domain Socket name>
Dev:<character Device name>
Jdwp:<process pid> (remote only)

--no-rebind fails if the local side is already bound

ADB forward--remove <spec-local> remove the specified directed bindings

ADB forward--remove-all

ADB reverse--list Show all reverse socket connections from the device

ADB reverse <spec-remote> <spec-local> reverse socket bindings

The spec format is:

Tcp:<port>
Localabstract:<unix Domain Socket name>
Localreserved:<unix Domain Socket name>
Localfilesystem:<unix Domain Socket name>

--norebind <spec-remote> already bound fails

ADB reverse--remove <spec-remote> Remove reverse bindings

ADB reverse--remove-all remove all reverse bindings

ADB PPP <tty> [Parm] running PPP via USB

Debugging related

ADB logcat [option] [filter-specs] output log data. Can redirect to file: adb logcat>d:\logcat.txt

ADB bugreport display Dumpsys, dumppstate, logcat information

ADB jdwp shows effective jdwp (Java Debug Wire protocol) process

Other

ADB EMU <emu_command> Simulator Console commands

ADB backup back up system data to file

-F <file> Specify file name (save Backup.ab)

-apk | -noapk whether to back up. APK (default =-noapk)

-obb | -noobb whether to back up the apk extension file. Obb, default is Noobb

-shared | -noshared whether to back up shared STOREAGE,SD card contents (default = noshared)

-all Backup of all installed applications

Whether the-system|-nosystem-all includes system applications, (default is systems)

[<packages...>] List of apps to back up. If you have-all or-shared, you can not have this item.

ADB restore <file> recover data from backup files.

ADB disable-verity

ADB keygen <file> generates a key to the,<file> file that holds the private key, <file>.pub the public key. Existing files will be overwritten.

Android adb and shell command usage summary

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.