0

How do I copy all the content from /data/data/ from a rooted android phone to the PC or SDCard ?

  • ES file explorer so far is unable to copy
  • adb pull does not find the content of that folder
  • adb shell does not seem to have a pull or push command

Or I'm doing both wrongly...

After copy, how do I put the files back (and replace, if needed) ?

migrated from superuser.com Jun 18 '15 at 19:45

This question came from our site for computer enthusiasts and power users.

  • Please clarify what you are doing exactly. Are you copying files to the PC via cable or to an SD card inserted into the phone? – CharlieRB Jun 15 '15 at 19:57
  • I've tried both alternatives. To the PC via USB OR to the SD card. None worked. I have no experience on ADB. – Lucas BS Jun 15 '15 at 21:04
  • If you are connected to a PC, you should try copying the files via Windows Explorer (if you're using Windows). – CharlieRB Jun 15 '15 at 21:30
  • Nop. These are system files... invisible to windows, unfortunately :( I suppose only advanced methods will enable me to copy the folder – Lucas BS Jun 17 '15 at 15:08
  • You can try settings Windows to show show hidden files so you can see them. – CharlieRB Jun 17 '15 at 15:17
1

Since the device is rooted, there is a good chance that a custom Recovery is also installed. I was able to copy all content from /data/data of Android 4.2.1 to my Linux PC by using following instructions:

  1. Boot into custom Recovery and mount Data.

  2. Enter adb pull /data/data/ ~/<TARGET_DIR>/ in terminal on Linux PC, or enter adb pull /data/data/ C:\<TARGET_DIR>\ in command prompt on Windows PC.

    It will take sometime in processing and the final result would be something like:

    5847 files pulled. 0 files skipped.
    554 KB/s (269059005 bytes in 473.725s)
    
  3. Enter the following commands to see size of /data/data:

    adb shell
    du -h /data/data/
    exit
    
  4. Enter du -h ~/<TARGET_DIR>/ in PC's terminal to see size of your target directory.
  5. See if those two output matches, which it would.

Or,

Though I would still use the aforesaid steps for ease, you may try the following solutions too:

  • Make a Nandroid backup of Data from custom Recovery and then extract ../data from the backup in your PC.
  • You can also save Nandroid backup in SD card and then extract the relevant content using Nandroid Manager.
  • EDIT: SORRY. I WAS NOT ON RECOVERY. IGNORE THIS Only a single folder was copied from the first method (which is the most interesting). I'll try the second. Meanwhile, would you have any idea of why this happened ? The copied folder was from com.keramidas.TitaniumBackup. There are at least fourty folders (as seen from ES file explorer) EDIT: SORRY. I WAS NOT ON RECOVERY – Lucas BS Jun 20 '15 at 18:10
  • It works ! Thanks ! Case wasn't noticed, I wanted to backup my data (probably you did too), without their apps, but I get the following message when pulling: skipping special file 'lib'. Would you know if this is a problem for the backup ? Question two: would you know what's the purpose of the tilde (~) before the destination path ? Thanks again for the responses. A info that may be relevant to others: the target path (only) can be written on windows format. – Lucas BS Jun 29 '15 at 23:56
  • @LucasBS Glad it works! 1) About that special file I too did noticed that during backup but it wasn't a big deal because the apps' data is in their folders. 2) No, I didn't want to backup my data at that time but just wanted to help you, so I tested and posted the answer, :) 3) ~ indicates HOME Directory of the user in Unix and Linux. Apologies since I forgot that you were using Windows and I should've mentioned a relevant command too, 4) If that ~ doesn't work on Windows then please edit my answer, make changes and mention in the comment during edit that I asked for it. – Firelord Jun 30 '15 at 9:15
  • Also, if the answer worked out well then you may accept the answer. :D – Firelord Jun 30 '15 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.