./image1.jpgpull: /sdcard/Folder1/image2.jpg -> ./image2.jpgpull:..._adb pull 整个文件夹">
当前位置:   article > 正文

android adb pull 文件夹,android – 我如何adb拉SD文件夹中的所有文件

adb pull 整个文件夹

单文件/文件夹使用拉:

adb pull "/sdcard/Folder1"

输出:

adb pull "/sdcard/Folder1"

pull: building file list...

pull: /sdcard/Folder1/image1.jpg -> ./image1.jpg

pull: /sdcard/Folder1/image2.jpg -> ./image2.jpg

pull: /sdcard/Folder1/image3.jpg -> ./image3.jpg

3 files pulled. 0 files skipped.

特定文件/文件夹使用find从BusyBox:

adb shell find "/sdcard/Folder1" -iname "*.jpg" | tr -d '\015' | while read line; do adb pull $line; done;

这里有一个解释:

adb shell find "/sdcard/Folder1" - use the find command, use the top folder

-iname "*.jpg" - filter the output to only *.jpg files

| - passes data(output) from one command to another

tr -d '\015' - explained here: http://stackoverflow.com/questions/9664086/bash-is-removing-commands-in-while

while read line; - while loop to read input of previous commands

do adb pull $line; done; - pull the files into the current running directory, finish

脚本将在顶部文件夹中开始,并递归下来,找到所有的“* .jpg”文件,并将它们从手机中拖到当前目录。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/56364
推荐阅读
相关标签
  

闽ICP备14008679号