Advertisement
SilverKing

Untitled

Jan 29th, 2018
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.35 KB | None | 0 0
  1. global options:
  2. -a listen on all network interfaces, not just localhost
  3. -d use USB device (error if multiple devices connected)
  4. -e use TCP/IP device (error if multiple TCP/IP devices available)
  5. -s SERIAL
  6. use device with given serial number (overrides $ANDROID_SERIAL)
  7. -p PRODUCT
  8. name or path ('angler'/'out/target/product/angler');
  9. default $ANDROID_PRODUCT_OUT
  10. -H name of adb server host [default=localhost]
  11. -P port of adb server [default=5037]
  12. -L SOCKET listen on given socket for adb server [default=tcp:localhost:5037]
  13.  
  14. general commands:
  15. devices [-l] list connected devices (-l for long output)
  16. help show this help message
  17. version show version num
  18.  
  19. networking:
  20. connect HOST[:PORT] connect to a device via TCP/IP [default port=5555]
  21. disconnect [HOST[:PORT]]
  22. disconnect from given TCP/IP device [default port=5555], or all
  23. forward --list list all forward socket connections
  24. forward [--no-rebind] LOCAL REMOTE
  25. forward socket connection using:
  26. tcp:<port> (<local> may be "tcp:0" to pick any open port)
  27. localabstract:<unix domain socket name>
  28. localreserved:<unix domain socket name>
  29. localfilesystem:<unix domain socket name>
  30. dev:<character device name>
  31. jdwp:<process pid> (remote only)
  32. forward --remove LOCAL remove specific forward socket connection
  33. forward --remove-all remove all forward socket connections
  34. ppp TTY [PARAMETER...] run PPP over USB
  35. reverse --list list all reverse socket connections from device
  36. reverse [--no-rebind] REMOTE LOCAL
  37. reverse socket connection using:
  38. tcp:<port> (<remote> may be "tcp:0" to pick any open port)
  39. localabstract:<unix domain socket name>
  40. localreserved:<unix domain socket name>
  41. localfilesystem:<unix domain socket name>
  42. reverse --remove REMOTE remove specific reverse socket connection
  43. reverse --remove-all remove all reverse socket connections from device
  44.  
  45. file transfer:
  46. push LOCAL... REMOTE
  47. copy local files/directories to device
  48. pull [-a] REMOTE... LOCAL
  49. copy files/dirs from device
  50. -a: preserve file timestamp and mode
  51. sync [DIR]
  52. copy all changed files to device; if DIR is "system", "vendor", "oem",
  53. or "data", only sync that partition (default all)
  54. -l: list but don't copy
  55.  
  56. shell:
  57. shell [-e ESCAPE] [-n] [-Tt] [-x] [COMMAND...]
  58. run remote shell command (interactive shell if no command given)
  59. -e: choose escape character, or "none"; default '~'
  60. -n: don't read from stdin
  61. -T: disable PTY allocation
  62. -t: force PTY allocation
  63. -x: disable remote exit codes and stdout/stderr separation
  64. emu COMMAND run emulator console command
  65.  
  66. app installation:
  67. install [-lrtsdg] PACKAGE
  68. install-multiple [-lrtsdpg] PACKAGE...
  69. push package(s) to the device and install them
  70. -l: forward lock application
  71. -r: replace existing application
  72. -t: allow test packages
  73. -s: install application on sdcard
  74. -d: allow version code downgrade (debuggable packages only)
  75. -p: partial application install (install-multiple only)
  76. -g: grant all runtime permissions
  77. uninstall [-k] PACKAGE
  78. remove this app package from the device
  79. '-k': keep the data and cache directories
  80.  
  81. backup/restore:
  82. backup [-f FILE] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|-nosystem] [PACKAGE...]
  83. write an archive of the device's data to FILE [default=backup.adb]
  84. package list optional if -all/-shared are supplied
  85. -apk/-noapk: do/don't back up .apk files (default -noapk)
  86. -obb/-noobb: do/don't back up .obb files (default -noobb)
  87. -shared|-noshared: do/don't back up shared storage (default -noshared)
  88. -all: back up all installed applications
  89. -system|-nosystem: include system apps in -all (default -system)
  90. restore FILE restore device contents from FILE
  91.  
  92. debugging:
  93. bugreport [PATH]
  94. write bugreport to given PATH [default=bugreport.zip];
  95. if PATH is a directory, the bug report is saved in that directory.
  96. devices that don't support zipped bug reports output to stdout.
  97. jdwp list pids of processes hosting a JDWP transport
  98. logcat show device log (logcat --help for more)
  99.  
  100. security:
  101. disable-verity disable dm-verity checking on userdebug builds
  102. enable-verity re-enable dm-verity checking on userdebug builds
  103. keygen FILE
  104. generate adb public/private key; private key stored in FILE,
  105. public key stored in FILE.pub (existing files overwritten)
  106.  
  107. scripting:
  108. wait-for[-TRANSPORT]-STATE
  109. wait for device to be in the given state
  110. State: device, recovery, sideload, or bootloader
  111. Transport: usb, local, or any [default=any]
  112. get-state print offline | bootloader | device
  113. get-serialno print <serial-number>
  114. get-devpath print <device-path>
  115. remount
  116. remount /system, /vendor, and /oem partitions read-write
  117. reboot [bootloader|recovery|sideload|sideload-auto-reboot]
  118. reboot the device; defaults to booting system image but
  119. supports bootloader and recovery too. sideload reboots
  120. into recovery and automatically starts sideload mode,
  121. sideload-auto-reboot is the same but reboots after sideloading.
  122. sideload OTAPACKAGE sideload the given full OTA package
  123. root restart adbd with root permissions
  124. unroot restart adbd without root permissions
  125. usb restart adb server listening on USB
  126. tcpip PORT restart adb server listening on TCP on PORT
  127.  
  128. internal debugging:
  129. start-server ensure that there is a server running
  130. kill-server kill the server if it is running
  131. reconnect kick connection from host side to force reconnect
  132. reconnect device kick connection from device side to force reconnect
  133.  
  134. environment variables:
  135. $ADB_TRACE
  136. comma-separated list of debug info to log:
  137. all,adb,sockets,packets,rwx,usb,sync,sysdeps,transport,jdwp
  138. $ADB_VENDOR_KEYS colon-separated list of keys (files or directories)
  139. $ANDROID_SERIAL serial number to connect to (see -s)
  140. $ANDROID_LOG_TAGS tags to be used by logcat (see logcat --help)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement