I have a rooted Oreo Android device, and I can use "adb pull" from my linux machine to retrieve copies of files and directories from my device.

However, I want to get a full copy of each and every file and directory on my device, starting from the root filesystem. I know I have to do "adb root" in order to allow this to happen, but when I do so, I get the following error ...

adbd cannot run as root in production builds

So what I'd like to do, if possible, is to get this data onto my linux machine in the opposite manner: i.e., to be su'ed on my android device, and from that device, to cause a complete recursive copy of everything from root on down to somehow be sent out to my linux machine.

Any ideas of how I can do this?

Thank you in advance.

  • Do you have an SD card with enough free space to hold all those data? Then the much easier approach would be to copy (or tar cf) the files on-device to the SD card, and then pull them from there. Or, if you have a custom recovery like TWRP installed, simply perform a backup with it (also results in tar files).
    – Izzy
    Commented Oct 28, 2018 at 19:59
  • I do have a large sd card and tried the tar cf approach, but I ran into permissions problems even though I set selinux to "permissive". It got about 10 percent into the copy and failed with a permission error. But the TWRP backup idea worked for me. I didn't realize that the files in the backup directory are tar files. So that's the answer.
    – HippoMan
    Commented Oct 29, 2018 at 22:43
  • Yupp – sometimes the easiest things are the hardest to find :) Thanks for self-answering!
    – Izzy
    Commented Oct 29, 2018 at 23:10

1 Answer 1


Thanks to izzy, above, I realized that I can copy the TWRP backup directory to my linux machine and de-tar the files contained in the backup. I didn't realize that they were tar files.

This is the solution.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .