Search code examples
androidcmdadb

adb pull multiple files with the same extension


How can we pull multiple files with the same extension by using "abd" command?

More details, I know that we can use command

adb pull sdcard/folder target-folder

to get all file of the folder.

I use this command to filter file in the adb shell.

ls -lR sdcard/folder | grep "ext"

But I want to filter some files with the same extension and pull them. So now, how can we combine two commands?


Solution

  • adb shell ls sdcard/folder/*.ext | tr '\r' ' ' | xargs -n1 adb pull
    

    See adb pull multiple files