Guest User

Untitled

a guest
Jul 18th, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.63 KB | None | 0 0
  1. devices - list all connected devices
  2. connect <host>[:<port>] - connect to a device via TCP/IP
  3. Port 5555 is used by default if no port number
  4. is specified.
  5. disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
  6. Port 5555 is used by default if no port number
  7. is specified.
  8. Using this command with no additional arguments
  9.  
  10. will disconnect from all connected TCP/IP devic
  11. es.
  12.  
  13. device commands:
  14. adb push <local> <remote> - copy file/dir to device
  15. adb pull <remote> [<local>] - copy file/dir from device
  16. adb sync [ <directory> ] - copy host->device only if changed
  17. (-l means list but don't copy)
  18. (see 'adb help all')
  19. adb shell - run remote shell interactively
  20. adb shell <command> - run remote shell command
  21. adb emu <command> - run emulator console command
  22. adb logcat [ <filter-spec> ] - View device log
  23. adb forward <local> <remote> - forward socket connections
  24. forward specs are one of:
  25. tcp:<port>
  26. localabstract:<unix domain socket name>
  27. localreserved:<unix domain socket name>
  28. localfilesystem:<unix domain socket name>
  29. dev:<character device name>
  30. jdwp:<process pid> (remote only)
  31. adb jdwp - list PIDs of processes hosting a JDWP transport
  32.  
  33. adb install [-l] [-r] [-s] <file> - push this package file to the device and i
  34. nstall it
  35. ('-l' means forward-lock the app)
  36. ('-r' means reinstall the app, keeping its data
  37. )
  38. ('-s' means install on SD card instead of inter
  39. nal storage)
  40. adb uninstall [-k] <package> - remove this app package from the device
  41. ('-k' means keep the data and cache directories
  42. )
  43. adb bugreport - return all information from the device
  44. that should be included in a bug report.
  45.  
  46. adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosy
  47. stem] [<packages...>]
  48. - write an archive of the device's data to <file>
  49. .
  50. If no -f option is supplied then the data is wr
  51. itten
  52. to "backup.ab" in the current directory.
  53. (-apk|-noapk enable/disable backup of the .apks
  54. themselves
  55. in the archive; the default is noapk.)
  56. (-shared|-noshared enable/disable backup of the
  57. device's
  58. shared storage / SD card contents; the defau
  59. lt is noshared.)
  60. (-all means to back up all installed applicatio
  61. ns)
  62. (-system|-nosystem toggles whether -all automat
  63. ically includes
  64. system applications; the default is to inclu
  65. de system apps)
  66. (<packages...> is the list of applications to b
  67. e backed up. If
  68. the -all or -shared flags are passed, then t
  69. he package
  70. list is optional. Applications explicitly g
  71. iven on the
  72. command line will be included even if -nosys
  73. tem would
  74. ordinarily cause them to be omitted.)
  75.  
  76. adb restore <file> - restore device contents from the <file> backup
  77. archive
  78.  
  79. adb help - show this help message
  80. adb version - show version num
  81.  
  82. scripting:
  83. adb wait-for-device - block until device is online
  84. adb start-server - ensure that there is a server running
  85. adb kill-server - kill the server if it is running
  86. adb get-state - prints: offline | bootloader | device
  87. adb get-serialno - prints: <serial-number>
  88. adb status-window - continuously print device status for a specifie
  89. d device
  90. adb remount - remounts the /system partition on the device re
  91. ad-write
  92. adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
  93. tloader or recovery program
  94. adb reboot-bootloader - reboots the device into the bootloader
  95. adb root - restarts the adbd daemon with root permissions
  96. adb usb - restarts the adbd daemon listening on USB
  97. adb tcpip <port> - restarts the adbd daemon listening on TCP on th
  98. e specified port
  99. networking:
  100. adb ppp <tty> [parameters] - Run PPP over USB.
  101. Note: you should not automatically start a PPP connection.
  102. <tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
  103. [parameters] - Eg. defaultroute debug dump local notty usepeerdns
  104.  
  105. adb sync notes: adb sync [ <directory> ]
  106. <localdir> can be interpreted in several ways:
  107.  
  108. - If <directory> is not specified, both /system and /data partitions will be u
  109. pdated.
  110.  
  111. - If it is "system" or "data", only the corresponding partition
  112. is updated.
  113.  
  114. environmental variables:
  115. ADB_TRACE - Print debug information. A comma separated list
  116. of the following values
  117. 1 or all, adb, sockets, packets, rwx, usb, sync
  118. , sysdeps, transport, jdwp
  119. ANDROID_SERIAL - The serial number to connect to. -s takes prior
  120. ity over this if given.
  121. ANDROID_LOG_TAGS - When used with the logcat option, only these de
  122. bug tags are printed.
  123.  
  124. C:\Documents and Settings\user>adb shell
  125. $ chmod 777/data/local/tmp/fre3vo
  126. chmod 777/data/local/tmp/fre3vo
  127. Usage: chmod <MODE> <FILE>
  128. $ /data/local/tmp/fre3vo -debug -start F0000000 -end FFFFFFFF
  129. /data/local/tmp/fre3vo -debug -start F0000000 -end FFFFFFFF
  130. /data/local/tmp/fre3vo: not found
  131. $ reboot
  132. reboot
  133.  
  134. C:\Documents and Settings\user>adb push fre3vo/data/local/tmp
  135. Android Debug Bridge version 1.0.29
  136.  
  137. -d - directs command to the only connected USB devic
  138. e
  139. returns an error if more than one USB device is
  140. present.
  141. -e - directs command to the only running emulator.
  142. returns an error if more than one emulator is r
  143. unning.
  144. -s <serial number> - directs command to the USB device or emulator w
  145. ith
  146. the given serial number. Overrides ANDROID_SERI
  147. AL
  148. environment variable.
  149. -p <product name or path> - simple product name like 'sooner', or
  150. a relative/absolute path to a product
  151. out directory like 'out/target/product/sooner'.
  152.  
  153. If -p is not specified, the ANDROID_PRODUCT_OUT
  154.  
  155. environment variable is used, which must
  156. be an absolute path.
  157. devices - list all connected devices
  158. connect <host>[:<port>] - connect to a device via TCP/IP
  159. Port 5555 is used by default if no port number
  160. is specified.
  161. disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
  162. Port 5555 is used by default if no port number
  163. is specified.
  164. Using this command with no additional arguments
  165.  
  166. will disconnect from all connected TCP/IP devic
  167. es.
  168.  
  169. device commands:
  170. adb push <local> <remote> - copy file/dir to device
  171. adb pull <remote> [<local>] - copy file/dir from device
  172. adb sync [ <directory> ] - copy host->device only if changed
  173. (-l means list but don't copy)
  174. (see 'adb help all')
  175. adb shell - run remote shell interactively
  176. adb shell <command> - run remote shell command
  177. adb emu <command> - run emulator console command
  178. adb logcat [ <filter-spec> ] - View device log
  179. adb forward <local> <remote> - forward socket connections
  180. forward specs are one of:
  181. tcp:<port>
  182. localabstract:<unix domain socket name>
  183. localreserved:<unix domain socket name>
  184. localfilesystem:<unix domain socket name>
  185. dev:<character device name>
  186. jdwp:<process pid> (remote only)
  187. adb jdwp - list PIDs of processes hosting a JDWP transport
  188.  
  189. adb install [-l] [-r] [-s] <file> - push this package file to the device and i
  190. nstall it
  191. ('-l' means forward-lock the app)
  192. ('-r' means reinstall the app, keeping its data
  193. )
  194. ('-s' means install on SD card instead of inter
  195. nal storage)
  196. adb uninstall [-k] <package> - remove this app package from the device
  197. ('-k' means keep the data and cache directories
  198. )
  199. adb bugreport - return all information from the device
  200. that should be included in a bug report.
  201.  
  202. adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosy
  203. stem] [<packages...>]
  204. - write an archive of the device's data to <file>
  205. .
  206. If no -f option is supplied then the data is wr
  207. itten
  208. to "backup.ab" in the current directory.
  209. (-apk|-noapk enable/disable backup of the .apks
  210. themselves
  211. in the archive; the default is noapk.)
  212. (-shared|-noshared enable/disable backup of the
  213. device's
  214. shared storage / SD card contents; the defau
  215. lt is noshared.)
  216. (-all means to back up all installed applicatio
  217. ns)
  218. (-system|-nosystem toggles whether -all automat
  219. ically includes
  220. system applications; the default is to inclu
  221. de system apps)
  222. (<packages...> is the list of applications to b
  223. e backed up. If
  224. the -all or -shared flags are passed, then t
  225. he package
  226. list is optional. Applications explicitly g
  227. iven on the
  228. command line will be included even if -nosys
  229. tem would
  230. ordinarily cause them to be omitted.)
  231.  
  232. adb restore <file> - restore device contents from the <file> backup
  233. archive
  234.  
  235. adb help - show this help message
  236. adb version - show version num
  237.  
  238. scripting:
  239. adb wait-for-device - block until device is online
  240. adb start-server - ensure that there is a server running
  241. adb kill-server - kill the server if it is running
  242. adb get-state - prints: offline | bootloader | device
  243. adb get-serialno - prints: <serial-number>
  244. adb status-window - continuously print device status for a specifie
  245. d device
  246. adb remount - remounts the /system partition on the device re
  247. ad-write
  248. adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
  249. tloader or recovery program
  250. adb reboot-bootloader - reboots the device into the bootloader
  251. adb root - restarts the adbd daemon with root permissions
  252. adb usb - restarts the adbd daemon listening on USB
  253. adb tcpip <port> - restarts the adbd daemon listening on TCP on th
  254. e specified port
  255. networking:
  256. adb ppp <tty> [parameters] - Run PPP over USB.
  257. Note: you should not automatically start a PPP connection.
  258. <tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
  259. [parameters] - Eg. defaultroute debug dump local notty usepeerdns
  260.  
  261. adb sync notes: adb sync [ <directory> ]
  262. <localdir> can be interpreted in several ways:
  263.  
  264. - If <directory> is not specified, both /system and /data partitions will be u
  265. pdated.
  266.  
  267. - If it is "system" or "data", only the corresponding partition
  268. is updated.
  269.  
  270. environmental variables:
  271. ADB_TRACE - Print debug information. A comma separated list
  272. of the following values
  273. 1 or all, adb, sockets, packets, rwx, usb, sync
  274. , sysdeps, transport, jdwp
  275. ANDROID_SERIAL - The serial number to connect to. -s takes prior
  276. ity over this if given.
  277. ANDROID_LOG_TAGS - When used with the logcat option, only these de
  278. bug tags are printed.
  279.  
  280. C:\Documents and Settings\user>adb shell
  281. $ chmod 777/data/local/tmp/fre3vo
  282. chmod 777/data/local/tmp/fre3vo
  283. Usage: chmod <MODE> <FILE>
  284. $ /data/local/tmp/fre3vo -debug -start E0000000 -end EFFFFFFF
  285. /data/local/tmp/fre3vo -debug -start E0000000 -end EFFFFFFF
  286. /data/local/tmp/fre3vo: not found
  287. $ reboot
  288. reboot
  289.  
  290. C:\Documents and Settings\Jason>adb shell
  291. $ su
  292. su
  293. su: permission denied
  294. $ exit
  295. exit
  296.  
  297. C:\Documents and Settings\user>adb shell cat/msm_rotator
  298. cat/msm_rotator: not found
Add Comment
Please, Sign In to add comment