24

How to copy a whole directory (and all of its content recursively) over USB with adb pull? For instance to backup the SD card.

Attempt:

$ adb pull /sdcard backup
failed to copy '/sdcard' to 'backup': Is a directory
Nicolas Raoul
  • 5,266
  • 14
  • 58
  • 90

1 Answers1

36

The trick is to add /. to the name of the folder you want to copy:

adb pull /sdcard/. backup

This copies the whole directory recursively.

Nicolas Raoul
  • 5,266
  • 14
  • 58
  • 90