0

Basically, I dump all data into the directory 'sdcard/2019-07-xx-xx and there are subdirectories in 2019-07-xx-xx. The Folder is named after the timestamp when dumping data, now I run the command:

adb pull '/sdcard/2019-07*'

but it prompted:

adb: error: failed to stat remote object 'sdcard/2019-07*': No such file or directory

who can help me out?

Finley
  • 795
  • 1
  • 8
  • 26
  • Pull does not accept wildcard. So, you can find a workaround here: https://stackoverflow.com/a/11250068/4860513 – guipivoto Jul 10 '19 at 13:06

2 Answers2

0

According to documentation "adb pull" command can pull file or directory from your device. There is no support for a wildcard.

But you can use xargs to accomplish this. Just check post

vaxpax
  • 16
0

Example:

for days in 0{1..9} 1{0..9} 2{0..9} 3{0..1}; do 
   adb shell echo "\$EXTERNAL_STORAGE/2019-07-$days/" 
done

Gives us below output:

/sdcard/2019-07-01/
/sdcard/2019-07-02/
/sdcard/2019-07-03/
/sdcard/2019-07-04/
/sdcard/2019-07-05/
......

Final: You can copy and paste

- don't forget to change source_path and dates if needed - Notice the trial slash:

for days in 0{1..9} 1{0..9} 2{0..9} 3{0..1}; do
   adb pull "\$EXTERNAL_STORAGE/2019-07-$days/" ~/source_path
done
wuseman
  • 1,259
  • 12
  • 20