I would like to get the content of the folder /data of my rooted android device. I tried with adb, but because /data/ is owned by root, I need to first copy the content of /data in the extcard, and then use adb pull. However when I tried to do that I had some strange thing that happened: lot's of folder were missing after the copy into the sdcard, while if I manually copy one by one everything works fine (if you know why, please tell me!).

So I tried then to use directly rsync and the application ssh helper on the android device to synchronize this folder owned by root. But because I need to run it at root, I can't just run a basic

rsync -av -e 'ssh -p 2222' [email protected]:/data /tmp/android_data/

1 Answer 1


To do that, I found this solution: first install on android ssh helper, run it, and then run on your computer:

rsync -a --rsync-path="su -c rsync" -e 'ssh -p 2222' [email protected]:/data /tmp/android_data/

I'm not sure to understand why it works, because rsync is not supposed to be installed on android, but it works... (if anyone knows why it works, please tell me in comments!)

  • 1
    The rsync flag -e specifies to use the ssh protocol, which is why it works. Rsync can create checksums of remote files over ssh, and transfers them using scp Jun 8, 2018 at 20:16

You must log in to answer this question.

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