0

I'm making some apps for android and wanted to change files in the data/data/com.myapp/ folder, so I decided to root my Nexus 5.

This did the opposite of what I wanted. I used to be able to VIEW hidden files, but not modify them. Now, after root I cannot see anything but default folders (DCIM, Download, Music...) on my phone in windows explorer.

  • Windows explorer file options is set to see all files
  • I think this may be a USB driver issue, but have tried all the drivers in the sdk folder
  • I do not want to use ADB commands to manage files, i do not think this is necessary

I'd be grateful for any help with this. I've looked at other posts and forums and cannot find anything similar to this.

  • 1
    Is your phone in MTP, PTP, or Mass Storage mode? Is USB Debugging enabled? Try various combinations of those. – Matthew Read Mar 24 '15 at 0:16
  • I did. It looks like this has been a bug in android since 2012. The one other thread I managed to find basically said it was a stroke of luck that I could see those files in the first place. – jr.pe Mar 24 '15 at 3:25
0

I used ADB to give myself access to data/data/my.app.dir as well as the folders and files therein, then to pull them to my computer.

For some reason I could not pull files directly from their location (even with the ABD shell closed), so copied them to a the phone's emulated storage and pull them from there.

I wrote a simple batch script to easily pull the files I wanted:

@echo off
echo Database transfer progress:
adb shell su -c "chmod 777 /data"
adb shell su -c "chmod 777 /data/data"
adb shell su -c "chmod 777 /data/data/my.app.dir"
adb shell su -c "chmod 777 /data/data/my.app.dir/databases"
adb shell su -c "chmod 777 /data/data/my.app.dir/databases/MyDatabase"
adb shell su -c "cp /data/data/my.app.dir/databases/MyDatabase /sdcard/Download"
adb pull /sdcard/Download/MyDatabase C:\Temp
adb shell su -c "rm /sdcard/Download/MyDatabase"
echo[
REM - pause and check for errors
pause

I don't care about reverting permissions on this device, but rebooting the phone seems to reset them.

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.