Advertisement
Guest User

Untitled

a guest
Apr 1st, 2012
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.98 KB | None | 0 0
  1. C:\android-sdk-windows\platform-tools>adb pull /dev/block/mmcblk 1p12 boot.img
  2. Android Debug Bridge version 1.0.29
  3.  
  4. -d - directs command to the only connected USB devic
  5. e
  6. returns an error if more than one USB device is
  7. present.
  8. -e - directs command to the only running emulator.
  9. returns an error if more than one emulator is r
  10. unning.
  11. -s <serial number> - directs command to the USB device or emulator w
  12. ith
  13. the given serial number. Overrides ANDROID_SERI
  14. AL
  15. environment variable.
  16. -p <product name or path> - simple product name like 'sooner', or
  17. a relative/absolute path to a product
  18. out directory like 'out/target/product/sooner'.
  19.  
  20. If -p is not specified, the ANDROID_PRODUCT_OUT
  21.  
  22. environment variable is used, which must
  23. be an absolute path.
  24. devices - list all connected devices
  25. connect <host>[:<port>] - connect to a device via TCP/IP
  26. Port 5555 is used by default if no port number
  27. is specified.
  28. disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
  29. Port 5555 is used by default if no port number
  30. is specified.
  31. Using this command with no additional arguments
  32.  
  33. will disconnect from all connected TCP/IP devic
  34. es.
  35.  
  36. device commands:
  37. adb push <local> <remote> - copy file/dir to device
  38. adb pull <remote> [<local>] - copy file/dir from device
  39. adb sync [ <directory> ] - copy host->device only if changed
  40. (-l means list but don't copy)
  41. (see 'adb help all')
  42. adb shell - run remote shell interactively
  43. adb shell <command> - run remote shell command
  44. adb emu <command> - run emulator console command
  45. adb logcat [ <filter-spec> ] - View device log
  46. adb forward <local> <remote> - forward socket connections
  47. forward specs are one of:
  48. tcp:<port>
  49. localabstract:<unix domain socket name>
  50. localreserved:<unix domain socket name>
  51. localfilesystem:<unix domain socket name>
  52. dev:<character device name>
  53. jdwp:<process pid> (remote only)
  54. adb jdwp - list PIDs of processes hosting a JDWP transport
  55.  
  56. adb install [-l] [-r] [-s] <file> - push this package file to the device and i
  57. nstall it
  58. ('-l' means forward-lock the app)
  59. ('-r' means reinstall the app, keeping its data
  60. )
  61. ('-s' means install on SD card instead of inter
  62. nal storage)
  63. adb uninstall [-k] <package> - remove this app package from the device
  64. ('-k' means keep the data and cache directories
  65. )
  66. adb bugreport - return all information from the device
  67. that should be included in a bug report.
  68.  
  69. adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosy
  70. stem] [<packages...>]
  71. - write an archive of the device's data to <file>
  72. .
  73. If no -f option is supplied then the data is wr
  74. itten
  75. to "backup.ab" in the current directory.
  76. (-apk|-noapk enable/disable backup of the .apks
  77. themselves
  78. in the archive; the default is noapk.)
  79. (-shared|-noshared enable/disable backup of the
  80. device's
  81. shared storage / SD card contents; the defau
  82. lt is noshared.)
  83. (-all means to back up all installed applicatio
  84. ns)
  85. (-system|-nosystem toggles whether -all automat
  86. ically includes
  87. system applications; the default is to inclu
  88. de system apps)
  89. (<packages...> is the list of applications to b
  90. e backed up. If
  91. the -all or -shared flags are passed, then t
  92. he package
  93. list is optional. Applications explicitly g
  94. iven on the
  95. command line will be included even if -nosys
  96. tem would
  97. ordinarily cause them to be omitted.)
  98.  
  99. adb restore <file> - restore device contents from the <file> backup
  100. archive
  101.  
  102. adb help - show this help message
  103. adb version - show version num
  104.  
  105. scripting:
  106. adb wait-for-device - block until device is online
  107. adb start-server - ensure that there is a server running
  108. adb kill-server - kill the server if it is running
  109. adb get-state - prints: offline | bootloader | device
  110. adb get-serialno - prints: <serial-number>
  111. adb status-window - continuously print device status for a specifie
  112. d device
  113. adb remount - remounts the /system partition on the device re
  114. ad-write
  115. adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
  116. tloader or recovery program
  117. adb reboot-bootloader - reboots the device into the bootloader
  118. adb root - restarts the adbd daemon with root permissions
  119. adb usb - restarts the adbd daemon listening on USB
  120. adb tcpip <port> - restarts the adbd daemon listening on TCP on th
  121. e specified port
  122. networking:
  123. adb ppp <tty> [parameters] - Run PPP over USB.
  124. Note: you should not automatically start a PPP connection.
  125. <tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
  126. [parameters] - Eg. defaultroute debug dump local notty usepeerdns
  127.  
  128. adb sync notes: adb sync [ <directory> ]
  129. <localdir> can be interpreted in several ways:
  130.  
  131. - If <directory> is not specified, both /system and /data partitions will be u
  132. pdated.
  133.  
  134. - If it is "system" or "data", only the corresponding partition
  135. is updated.
  136.  
  137. environmental variables:
  138. ADB_TRACE - Print debug information. A comma separated list
  139. of the following values
  140. 1 or all, adb, sockets, packets, rwx, usb, sync
  141. , sysdeps, transport, jdwp
  142. ANDROID_SERIAL - The serial number to connect to. -s takes prior
  143. ity over this if given.
  144. ANDROID_LOG_TAGS - When used with the logcat option, only these de
  145. bug tags are printed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement