Android Debug Bridge
ADB Command
Scripting commands
Wait for the device to be in the specified state.
state : Values can be device , recovery , sideload , or bootloader .
transport : Values can be usb , local , or any .
adb wait-for [-transport] -state
Print the adb state of a device. The adb state can be print offline , bootloader ,
or device .
adb get-state
Print the adb device serial number string.
adb get-serialno
Print the adb device path.
adb get-devpath
Remount the /system , /vendor , and /oem partitions in read-write mode.
adb remount
Reboot the device. This command defaults to booting the system image, but also
supports bootloader and recovery .
The bootloader option reboots into bootloader.
The recovery option reboots into recovery.
The sideload option reboots into recovery and starts sideload mode.
The sideload-auto-reboot option is the same as sideload , but reboots after
side loading completes.
adb reboot [bootloader | recovery | sideload | sideload-auto-reboot ]
Side load (install in APK format) the specified full OTA package onto the device.
adb sideload otapackage
Restart adbd with root permissions.
adb root
Restart adbd without root permissions.
adb unroot
Restart the adb server listening on USB.
adb usb
Restart the adb server listening on TCP at the specified port.
adb tcpip port-number
Internal debugging commands
Check whether the adb server process is running.
adb start-server
Terminate the adb server process.
adb kill-server
Force a reconnect from the host.
adb reconnect
Force a reconnect from the device to force a reconnect.
adb reconnect device
Shell commands
Start a remote interactive shell in the target device.
adb shell
Issue a shell command in the target device and then exit the remote shell. Use any
combination of the following options:
-e : Specify an escape character or the value none if you do not want to use
an escape character. If you do not provide a value, the default escape character (a
dash ( - )), is used.
-n : Do not read from stdin .
-T : Disable pseudo-terminal utiity (PTY) allocation.
-t : Force PTY allocation.
-x : Disable remote exit codes and stdout/stderr separation.
adb shell -e escape_char [-n] [-T] [-t] [-x] [command]
Run an emulator console command
adb emu command