User Tools

Site Tools


android:oneplus:adb

This is an old revision of the document!


ADB Commands

Command InstructionDescription
adb devices [-l]List connected devices (-l for long output)
adb helpShow this help message
adb versionShow version num
adb push [–sync] LOCAL… REMOTECopy local files/directories to device –sync: only push files that are newer on the host than the device. Need to specify the full path of the file you're pushing, and the full path to where you want to put it.
adb pull [-a] REMOTE… LOCALCopy files/dirs from device -a: preserve file timestamp and mode
adb shell [-e ESCAPE] [-n] [-Tt] [-x] [COMMAND…]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: allocate a pty if on a tty (-tt: force pty allocation)
-x: disable remote exit codes and stdout/stderr separation
adb install [-lrtsdg] [–instant] PACKAGE
adb install-multiple [-lrtsdpg] [–instant] PACKAGE…
Push one or more packages to the device and install them atomically. You'll need to supply the path where you have the .apk file saved, then run it like this: adb install TheAppName.apk.
-r: replace existing application
-t: allow test packages
-d: allow version code downgrade (debuggable packages only)
-p: partial application install (install-multiple only)
-g: grant all runtime permissions
–abi ABI: override platform's default ABI
–instant: cause the app to be installed as an ephemeral install app
–no-streaming: always push APK to device and invoke Package Manager as separate steps
–streaming: force streaming APK directly into Package Manager
–fastdeploy: use fast deploy
–no-fastdeploy: prevent use of fast deploy
–force-agent: force update of deployment agent when using fast deploy
–date-check-agent: update deployment agent when local version is newer and using fast deploy
–version-check-agent: update deployment agent when local version has different version code and using fast deploy
adb reboot bootloaderReboot the device to bootloader.
adb reboot recoveryReboot to recovery too.
adb reboot sideload Sideload reboots into recovery and automatically starts sideload mode. An OTA (over-the-air) update is downloaded by your phone as a .zip file. You can also download that zip file manually and install it without having to wait for your phone to have the update pushed to it. The end result is the same. All you have to do is download the update to your computer. Plug your phone into the computer. Then, reboot into recovery on your phone and using the up and down volume buttons choose Apply update from ADB. Then hop into your favorite terminal/command line and type adb sideload Full-Path-to-the-file.zip and hit enter.
adb reboot sideload-auto-rebootSame but reboots after sideloading.
adb sideload OTAPACKAGESideload the given full OTA package
adb rootRestart adbd with root permissions
adb unrootRestart adbd without root permissions
adb usbRestart adbd listening on USB
adb start-serverEnsure that there is a server running
adb kill-serverKill the server if it is running
adb reconnectKick connection from host side to force reconnect
adb reconnect deviceKick connection from device side to force reconnect
adb shellEnter a shell on the device. Once inside, you can interact with the actual running operating system on your phone.
android/oneplus/adb.1600376030.txt.gz · Last modified: (external edit)