博客、帮助文档-从Android模拟器sdcard中导出文件-by小雨

发一下牢骚和主题无关:

    

境环

    Eclipse Indigo + Android 2.2

     

    

问题

            Android模拟器中应用微信,微信挚友向我发送片图,保存后想出导到脑电磁盘中。

     

    

    

决解

            应用adb pull命令。

adb pull <remote> [<local>]  - copy file/dir from device

adb pull 模拟器路径 [脑电磁盘路径,可选,不填示表出导到当前目录] –从设备中拷贝文件或者目录

    
 

 

            比如从/sdcard/tencent/MicroMsg/Camera目录中出导片图到D盘,可以应用如下命令:

adb pull /sdcard/tencent/MicroMsg/Camera D:\

    
 

    

操作日志

C:\Users\Wentasy>adb -help
Android Debug Bridge version 1.0.26

 -d                            - directs command to the only connected USB devic
e
                                 returns an error if more than one USB device is
 present.
 -e                            - directs command to the only running emulator.
                                 returns an error if more than one emulator is r
unning.
 -s <serial number>            - directs command to the USB device or emulator w
ith
                                 the given serial number. Overrides ANDROID_SERI
AL
                                 environment variable.
 -p <product name or path>     - 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.
 devices                       - list all connected devices
 connect <host>[:<port>]       - connect to a device via TCP/IP
                                 Port 5555 is used by default if no port number
is specified.
 disconnect [<host>[:<port>]]  - disconnect from a TCP/IP device.
                                 Port 5555 is used by default if no port number
is specified.
                                 Using this ocmmand with no additional arguments

                                 will disconnect from all connected TCP/IP devic
es.

device commands:
  adb push <local> <remote>    - copy file/dir to device
  adb pull <remote> [<local>]  - copy file/dir from device
  adb sync [ <directory> ]     - copy host->device only if changed
                                 (-l means list but don't copy)
                                 (see 'adb help all')
  adb shell                    - run remote shell interactively
  adb shell <command>          - run remote shell command
  adb emu <command>            - run emulator console command
  adb logcat [ <filter-spec> ] - View device log
  adb forward <local> <remote> - 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)
  adb jdwp                     - list PIDs of processes hosting a JDWP transport

  adb install [-l] [-r] [-s] <file> - push this package file to the device and i
nstall it
                                 ('-l' means forward-lock the app)
                                 ('-r' means reinstall the app, keeping its data
)
                                 ('-s' means install on SD card instead of inter
nal storage)
  adb uninstall [-k] <package> - remove this app package from the device
                                 ('-k' means keep the data and cache directories
)
  adb bugreport                - return all information from the device
                                 that should be included in a bug report.

  adb help                     - show this help message
  adb version                  - show version num

DATAOPTS:
 (no option)                   - don't touch the data partition
  -w                           - wipe the data partition
  -d                           - flash the data partition

scripting:
  adb wait-for-device          - block until device is online
  adb start-server             - ensure that there is a server running
  adb kill-server              - kill the server if it is running
  adb get-state                - prints: offline | bootloader | device
  adb get-serialno             - prints: <serial-number>
  adb status-window            - continuously print device status for a specifie
d device
  adb remount                  - remounts the /system partition on the device re
ad-write
  adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
  adb reboot-bootloader        - reboots the device into the bootloader
  adb root                     - restarts the adbd daemon with root permissions
  adb usb                      - restarts the adbd daemon listening on USB
  adb tcpip <port>             - restarts the adbd daemon listening on TCP on th
e specified port
networking:
  adb ppp <tty> [parameters]   - 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: adb sync [ <directory> ]
  <localdir> can be interpreted in several ways:

  - If <directory> is not specified, both /system and /data partitions will be u
pdated.

  - If it is "system" or "data", only the corresponding partition
    is updated.

environmental variables:
  ADB_TRACE                    - Print debug information. A comma separated list
 of the following values
                                 1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
  ANDROID_SERIAL               - The serial number to connect to. -s takes prior
ity over this if given.
  ANDROID_LOG_TAGS             - When used with the logcat option, only these de
bug tags are printed.

C:\Users\Wentasy>cd D:
D:\

C:\Users\Wentasy>D:

D:\>adb pull /sdcard/tencent/MicroMsg/Camera D:\
pull: building file list...
pull: /sdcard/tencent/MicroMsg/Camera/mmexport1365840005829.jpg -> D:\/mmexport1
365840005829.jpg
pull: /sdcard/tencent/MicroMsg/Camera/mmexport1365839981899.jpg -> D:\/mmexport1
365839981899.jpg
pull: /sdcard/tencent/MicroMsg/Camera/mmexport1365839955299.jpg -> D:\/mmexport1
365839955299.jpg
pull: /sdcard/tencent/MicroMsg/Camera/mmexport1365839940125.jpg -> D:\/mmexport1
365839940125.jpg
4 files pulled. 0 files skipped.
45 KB/s (121750 bytes in 2.595s)

D:\>

D:\>dir
 Volume in drive D is LENOVO
 Volume Serial Number is BCCD-80BD

 Directory of D:\

2013/04/13  16:13            30,560 mmexport1365839940125.jpg
2013/04/13  16:13            29,325 mmexport1365839955299.jpg
2013/04/13  16:13            30,643 mmexport1365839981899.jpg
2013/04/13  16:13            31,222 mmexport1365840005829.jpg

    
 

    

参考料资

            adb –help

     

    

总结

            1.多看帮助文档

            2.英语确切很要重,用不在网上找查任何料资,只要有帮助文档、参考手册很多问题都可以决解。

     

 

 

    

katoon Sina  CSDN
@Wentasy 博文仅供参考,欢送大家来访。若有错误的地方,希望批评指正。原创博文如需转载请注明出处,谢谢 :) [CSDN博客]

文章结束给大家分享下程序员的一些笑话语录: Google事件并不像国内主流媒体普遍误导的那样,它仅仅是中国Z府和美国公司、中国文化和美国文化甚至中国人和美国人之间的关系,是民族主义和帝国主义之间的关系;更重要的是,它就是Z府和公司之间的关系,是权力管制和市场自由之间的关系。从这个意义上说,过度管制下的受害者,主要是国内的企业。Google可以抽身而去,国内的企业只能祈望特区。www.ishuo.cn

posted @ 2013-04-15 21:53  坚固66  阅读(323)  评论(0编辑  收藏  举报