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

单文件/文件夹使用拉:

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”文件,并将它们从手机中拖到当前目录。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要使用adb pull命令从Android设备提取数据库文件,您需要在命令行执行以下步骤: 1. 首先,连接到您的Android设备并打开命令行终端。 2. 使用adb shell命令进入设备的shell环境。 3. 导航到数据库文件所在的目录。根据您提供的引用内容,在命令行输入以下命令:cd /data/data/com.android.contacts/databases/ 4. 确保您在正确的目录,可以使用ls命令来查看目录文件列表。根据您提供的引用内容,您可以在命令行输入以下命令:ls 5. 一旦您确定了数据库文件的位置,您可以使用adb pull命令来提取数据库文件。在命令行,输入以下命令:adb pull <数据库文件名> <本地目标路径> 请注意,<数据库文件名>应该是您想要提取的数据库文件的实际文件名,<本地目标路径>是您希望将数据库文件保存到的本地计算机上的目标路径。 综上所述,要使用adb pull命令从Android设备提取数据库文件,您可以按照上述步骤进行操作。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [Androidadb pull或push 拷贝手机文件到到电脑上,拷贝手机数据库到电脑上,拷贝电脑数据库到手机上](https://blog.csdn.net/weixin_39641103/article/details/111481364)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值