¿Cómo puedo adb extraer TODOS los archivos de una carpeta presente en la tarjeta SD


Tengo una carpeta en mi tarjeta SD como: / mnt / sdcard / Folder1 / Folder2 / Folder3/*.jpg

El nombre de Folder1 y Folder2 permanece constante y dentro de Folder2 tengo Folder3, 4, 5 y así sucesivamente.. quiero extraer todos los archivos jpeg en lugar de todos los archivos (hay más) utilizando adb a mi directorio actual en el equipo..

Cada carpeta tiene un número diferente de archivos jpeg y otros archivos y traté de usar esto:

adb pull mnt/sdcard/Folder1/Folder2/Folder/*.jpg .

, Pero no funcionó.. Así que uhmm ¿cómo puedo adb tirar de todo archivos presentes en cualquier carpeta de la tarjeta SD con un solo comando (solo comando porque cada carpeta tiene un número diferente de archivos)

Author: ritesht93, 2012-04-07

7 answers

Un solo archivo/carpeta usando pull:

adb pull "/sdcard/Folder1"

Salida:

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.

Archivos/carpetas específicos usando find de BusyBox:

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

Aquí hay una explicación:

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. The quotation marks around $line are required to work with filenames containing spaces.

Los scripts comenzarán en la carpeta superior y recursivamente bajarán y encontrarán todos los "*.jpg " archivos y sacarlos de su teléfono al directorio actual.

 113
Author: Jared Burrows,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-09-12 14:47:28

Directory pull está disponible en las nuevas herramientas de Android. (No se de que versión fue añadido, pero su trabajo en la última ADT 21.1 )

adb pull /sdcard/Robotium-Screenshots
pull: building file list...
pull: /sdcard/Robotium-Screenshots/090313-110415.jpg -> ./090313-110415.jpg
pull: /sdcard/Robotium-Screenshots/090313-110412.jpg -> ./090313-110412.jpg
pull: /sdcard/Robotium-Screenshots/090313-110408.jpg -> ./090313-110408.jpg
pull: /sdcard/Robotium-Screenshots/090313-110406.jpg -> ./090313-110406.jpg
pull: /sdcard/Robotium-Screenshots/090313-110404.jpg -> ./090313-110404.jpg
5 files pulled. 0 files skipped.
61 KB/s (338736 bytes in 5.409s)
 69
Author: Palani,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-03-09 17:50:16

Por favor, intente con solo dar la ruta desde donde desea extraer los archivos Acabo de recibir los archivos de sdcard como

adb pull sdcard/

NO dar * como para ampliar la búsqueda o filtro. ej: adb pull sdcard/*.txt this> esto no es válido.

Solo dale adb pull sdcard /

 37
Author: Narenderan Perumal,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-04-08 20:26:41

Sí, simplemente use la barra diagonal final para extraer recursivamente el directorio. Funciona para mí con Nexus 5 y la versión actual de adb (marzo 2014).

 6
Author: Posting as a guesty-guest,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-03-11 10:54:37

En Android 6 con ADB versión 1.0.32, usted tiene que poner / detrás de la carpeta que desea copiar. E. g adb pull "/sdcard/".

 2
Author: antimatter,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-09-01 04:05:08

Si está usando jellybean simplemente inicie cmd, escriba adb devices para asegurarse de que su legible, escriba adb pull sdcard/ sdcard_(la fecha o extra)

En otras versiones escriba adb pull mnt / sdcard / sdcard_ (la fecha o extra)

Recuerde hacer archivo o su cualquiera va a tener un lío o no funcionará.

 1
Author: EDward,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-11-04 05:10:26

Si desea extraer un directorio con acceso restringido desde un dispositivo rooteado, debe reiniciar adb como root: escriba adb root antes de extraer. De lo contrario, obtendrá un error diciendo remote object '/data/data/xxx.example.app' does not exist

 0
Author: naXa,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-09-02 21:49:54