- Gender
- Male
- Country
- United States of America
What is ADB?
Android Debug Bridge (adb) is a command line tool that lets you communicate with an emulator or connected Android device. You can find the adb tool in android sdk/platform-tools or Download here
Download adb.exe 1.0.36 + fastboot for Windows
Revision e02fe72a18c3-android
Downloaded from Android SDK. 100% clean and untouched
It contains the following files:
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
fastboot.exe
List of ADB commands:
directs adb to listen on all interfaces for a connection
directs command to the only connected USB device
returns an error if more than one USB device is present.
directs command to the only running emulator.
returns an error if more than one emulator is running.
directs command to the device or emulator with the given serial number or qualifier. Overrides ANDROID_SERIAL environment variable.
simple product name like 'sooner', or a relative/absolute path to a product out directory like 'out/target/product/sooner'. If -p is not specified, the ANDROID_PRODUCT_OUT environment variable is used, which must be an absolute path.
Name of adb server host (default: localhost)
Port of adb server (default: 5037)
list all connected devices
('-l' will also list device qualifiers)
connect to a device via TCP/IP. Port 5555 is used by default if no port number is specified.
disconnect from a TCP/IP device. Port 5555 is used by default if no port number is specified. Using this command with no additional arguments will disconnect from all connected TCP/IP devices.
ADB - Device commands:
copy files/dirs to device
copy files/dirs from device
(-a preserves file timestamp and mode)
copy host->device only if changed
(-l means list but don't copy)
run remote shell command (interactive shell if no command given)
(-e: choose escape character, or "none"; default '~')
(-n: don't read from stdin)
(-T: disable PTY allocation)
(-t: force PTY allocation)
(-x: disable remote exit codes and stdout/stderr separation)
run emulator console command
View device log
list all forward socket connections. the format is a list of lines with the following format: <serial> " " <local> " " <remote> "\n"
forward socket connections
forward specs are one of:
* 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)
same as 'adb forward <local> <remote>' but fails if <local> is already forwarded
remove a specific forward socket connection
remove all forward socket connections
list all reverse socket connections from device
reverse socket connections
reverse specs are one of:
* tcp:<port>
* localabstract:<unix domain socket name>
* localreserved:<unix domain socket name>
* localfilesystem:<unix domain socket name>
same as 'adb reverse <remote> <local>' but fails if <remote> is already reversed.
remove a specific reversed socket connection
remove all reversed socket connections from device
list PIDs of processes hosting a JDWP transport
push this package file to the device and install it
(-l: forward lock application)
(-r: replace existing application)
(-t: allow test packages)
(-s: install application on sdcard)
(-d: allow version code downgrade (debuggable packages only))
(-g: grant all runtime permissions)
push this package file to the device and install it
(-l: forward lock application)
(-r: replace existing application)
(-t: allow test packages)
(-s: install application on sdcard)
(-d: allow version code downgrade (debuggable packages only))
(-p: partial application install)
(-g: grant all runtime permissions)
remove this app package from the device
('-k' means keep the data and cache directories)
return all information from the device that should be included in a bug report.
write an archive of the device's data to <file>. If no -f option is supplied then the data is written to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any installed apk expansion (aka .obb) files associated with each application; the default is noobb.)
(-shared|-noshared enable/disable backup of the device's shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If the -all or -shared flags are passed, then the package list is optional. Applications explicitly given on the command line will be included even if -nosystem would ordinarily cause them to be omitted.)
restore device contents from the <file> backup archive
disable dm-verity checking on USERDEBUG builds
re-enable dm-verity checking on USERDEBUG builds
generate adb public/private key. The private key is stored in <file>, and the public key is stored in <file>.pub. Any existing files are overwritten.
show this help message
show version num
ADB - Scripting:
wait for device to be in the given state: device, recovery, sideload, or bootloader
Transport is: usb, local or any [default=any]
ensure that there is a server running
kill the server if it is running
prints: offline | bootloader | device
prints: <serial-number>
prints: <device-path>
remounts the /system, /vendor (if present) and /oem (if present) partitions on the device read-write
reboots the device, optionally into the bootloader or recovery program.
reboots the device into the sideload mode in recovery program (adb root required).
reboots into the sideload mode, then reboots automatically after the sideload regardless of the result.
sideloads the given package
restarts the adbd daemon with root permissions
restarts the adbd daemon without root permissions
restarts the adbd daemon listening on USB
restarts the adbd daemon listening on TCP on the specified port
ADB - Networking:
Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
ADB sync notes:
<localdir> can be interpreted in several ways:
- If <directory> is not specified, /system, /vendor (if present), /oem (if present) and /data partitions will be updated.
- If it is "system", "vendor", "oem" or "data", only the corresponding partition is updated.
ADB - Internal debugging:
Kick current connection from host side and make it reconnect.
Kick current connection from device side and make it reconnect.
ADB - Environment variables:
Print debug information. A comma separated list of the following values 1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
The serial number to connect to. -s takes priority over this if given.
When used with the logcat option, only these debug tags are printed.
List of Fastboot commands:
Reflash device from update.zip.
Flash boot, system, vendor, and -- if found -- recovery.
Write a file to a flash partition.
Locks the device. Prevents flashing.
Unlocks the device. Allows flashing any partition except bootloader-related partitions.
Prevents flashing bootloader-related partitions.
Enables flashing bootloader-related partitions.
Queries bootloader to see if the device is unlocked.
Queries the bootloader to get the unlock nonce.
Issue unlock bootloader using request.
Locks the bootloader to prevent bootloader version rollback.
Erase a flash partition.
Format a flash partition. Can override the fs type and/or size the bootloader reports.
Display a bootloader variable.
Sets the active slot. If slots are not supported, this does nothing.
Download and boot kernel.
Create bootimage and flash it.
List all connected devices [with device paths].
Continue with autoboot.
Reboot device [into bootloader].
Reboot device into bootloader.
Show this help message.
Fastboot - Options:
Erase userdata and cache (and format if supported by partition type).
Do not erase partition before formatting.
Specify a device. For USB, provide either a serial number or path to device port. For ethernet, provide an address in the form <protocol>:<hostname>[ort] where <protocol> is either tcp or udp.
Specify product name.
Override kernel commandline.
Specify a custom USB vendor id.
Specify a custom kernel base address (default: 0x10000000).
Specify a custom kernel offset. (default: 0x00008000)
Specify a custom ramdisk offset. (default: 0x01000000)
Specify a custom tags offset. (default: 0x00000100)
Specify the nand page size (default: 2048).
Automatically sparse files greater than 'size'. 0 to disable.
Specify slot suffix to be used if the device supports slots. This will be added to all partition names that use slots. 'all' can be given to refer to all slots. 'other' can be given to refer to a non-current slot. If this flag is not used, slotted partitions will default to the current active slot.
Sets the active slot. If no suffix is provided, this will default to the value given by --slot. If slots are not supported, this does nothing. This will run after all non-reboot commands.
Do not buffer input or output.
Display version.
show this message.
Credits:
iAndroHacker (this thread)
Google (Adb and Fastboot)
Android Debug Bridge (adb) is a command line tool that lets you communicate with an emulator or connected Android device. You can find the adb tool in android sdk/platform-tools or Download here
Download adb.exe 1.0.36 + fastboot for Windows
Revision e02fe72a18c3-android
Downloaded from Android SDK. 100% clean and untouched
It contains the following files:
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
fastboot.exe
List of ADB commands:
Code:
-a
Code:
-d
returns an error if more than one USB device is present.
Code:
-e
returns an error if more than one emulator is running.
Code:
-s <specific device>
Code:
-p <product name or path>
Code:
-H
Code:
-P
Code:
devices [-l]
('-l' will also list device qualifiers)
Code:
connect <host>[:<port>]
Code:
disconnect [<host>[:<port>]]
ADB - Device commands:
Code:
adb push <local>... <remote>
Code:
adb pull [-a] <remote>... <local>
(-a preserves file timestamp and mode)
Code:
adb sync [ <directory> ]
(-l means list but don't copy)
Code:
adb shell [-e escape] [-n] [-Tt] [-x] [command]
(-e: choose escape character, or "none"; default '~')
(-n: don't read from stdin)
(-T: disable PTY allocation)
(-t: force PTY allocation)
(-x: disable remote exit codes and stdout/stderr separation)
Code:
adb emu <command>
Code:
adb logcat [ <filter-spec> ]
Code:
adb forward --list
Code:
adb forward <local> <remote>
forward specs are one of:
* 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)
Code:
adb forward --no-rebind <local> <remote>
Code:
adb forward --remove <local>
Code:
adb forward --remove-all
Code:
adb reverse --list
Code:
adb reverse <remote> <local>
reverse specs are one of:
* tcp:<port>
* localabstract:<unix domain socket name>
* localreserved:<unix domain socket name>
* localfilesystem:<unix domain socket name>
Code:
adb reverse --no-rebind <remote> <local>
Code:
adb reverse --remove <remote>
Code:
adb reverse --remove-all
Code:
adb jdwp
Code:
adb install [-lrtsdg] <file>
(-l: forward lock application)
(-r: replace existing application)
(-t: allow test packages)
(-s: install application on sdcard)
(-d: allow version code downgrade (debuggable packages only))
(-g: grant all runtime permissions)
Code:
adb install-multiple [-lrtsdpg] <file...>
(-l: forward lock application)
(-r: replace existing application)
(-t: allow test packages)
(-s: install application on sdcard)
(-d: allow version code downgrade (debuggable packages only))
(-p: partial application install)
(-g: grant all runtime permissions)
Code:
adb uninstall [-k] <package>
('-k' means keep the data and cache directories)
Code:
adb bugreport [<zip_file>]
Code:
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
(-apk|-noapk enable/disable backup of the .apks themselves in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any installed apk expansion (aka .obb) files associated with each application; the default is noobb.)
(-shared|-noshared enable/disable backup of the device's shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If the -all or -shared flags are passed, then the package list is optional. Applications explicitly given on the command line will be included even if -nosystem would ordinarily cause them to be omitted.)
Code:
adb restore <file>
Code:
adb disable-verity
Code:
adb enable-verity
Code:
adb keygen <file>
Code:
adb help
Code:
adb version
ADB - Scripting:
Code:
adb wait-for[-<transport>]-<state>
Transport is: usb, local or any [default=any]
Code:
adb start-server
Code:
adb kill-server
Code:
adb get-state
Code:
adb get-serialno
Code:
adb get-devpath
Code:
adb remount
Code:
adb reboot [bootloader|recovery]
Code:
adb reboot sideload
Code:
adb reboot sideload-auto-reboot
Code:
adb sideload <file>
Code:
adb root
Code:
adb unroot
Code:
adb usb
Code:
adb tcpip <port>
ADB - Networking:
Code:
adb ppp <tty> [parameters]
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
ADB sync notes:
Code:
adb sync [ <directory> ]
- If <directory> is not specified, /system, /vendor (if present), /oem (if present) and /data partitions will be updated.
- If it is "system", "vendor", "oem" or "data", only the corresponding partition is updated.
ADB - Internal debugging:
Code:
adb reconnect
Code:
adb reconnect device
ADB - Environment variables:
Code:
ADB_TRACE
Code:
ANDROID_SERIAL
Code:
ANDROID_LOG_TAGS
List of Fastboot commands:
Code:
update <filename>
Code:
flashall
Code:
flash <partition> [ <filename> ]
Code:
flashing lock
Code:
flashing unlock
Code:
flashing lock_critical
Code:
flashing unlock_critical
Code:
flashing get_unlock_ability
Code:
flashing get_unlock_bootloader_nonce
Code:
flashing unlock_bootloader <request>
Code:
flashing lock_bootloader
Code:
erase <partition>
Code:
format[:[<fs type>][:[<size>]] <partition>
Code:
getvar <variable>
Code:
set_active <suffix>
Code:
boot <kernel> [ <ramdisk> [ <second> ] ]
Code:
flash:raw boot <kernel> [ <ramdisk> [ <second> ] ]
Code:
devices [-l]
Code:
continue
Code:
reboot [bootloader]
Code:
reboot-bootloader
Code:
help
Fastboot - Options:
Code:
-w
Code:
-u
Code:
-s <specific device>
Code:
-p <product>
Code:
-c <cmdline>
Code:
-i <vendor id>
Code:
-b, --base <base_addr>
Code:
--kernel-offset
Code:
--ramdisk-offset
Code:
--tags-offset
Code:
-n, --page-size <page size>
Code:
-S <size>[K|M|G]
Code:
--slot <suffix>
Code:
-a, --set-active[=<suffix>]
Code:
--unbuffered
Code:
--version
Code:
-h, --help
Credits:
iAndroHacker (this thread)
Google (Adb and Fastboot)