-1

I need to get an internal file out of the filesystem in tact. I see the file, using ES File Explorer, located in LocalDevice/data/data/com.myapplication/file/user.json. The device (Nexus-7) is rooted. I can copy and paste the file to another location, but I think this may change the nature of the file. One way to do this would be to email it, but Gmail (or whatever) doesn't have access to the that folder. Is there a way to give Gmail permission? or another way to get the file out?

I am debugging an app I am creating in which this json file is copied, programmatically, from res/raw to the data/data/... location. The parsing of the json file in data/data throws a parse exception, and so I want to look at the json file that has been written, to see if it has been copied correctly.

1 Answer 1

3

As you may already know, you can only access those files with root, i.e. if your device is rooted.

I can copy and paste the file to another location, but I think this may change the nature of the file.

Whut? No, copying a file will not change the file contents. They will be the same as of the time the copy process is started. Ideally, you should make sure that no process has a open write/append file handle to the file, by killing the relevant processes (e.g. com.myapplication)

3
  • Thanks for your reply. By 'changing the nature' of the file, I meant not the contents, but more like from one encoding to another.
    – numberwang
    Commented Feb 5, 2014 at 21:16
  • Also, on your suggestion, I made certain that myapplication was not runnning, then tried sending the file as an attachment in gmail, but I still get the Couldn't find attachment error.
    – numberwang
    Commented Feb 5, 2014 at 21:22
  • 2
    Copying a file doesn' change its encoding. And though your device has root access, Gmail does not. What Flow wanted to say is: 1) Use ES File Explorer to copy the file from /data/data/com.myapplication/file/user.json to e.g. /sdcard/user.json, then 2) open that new location in Gmail to attach the file, and finally 3) optionally delete /sdcard/user.json as it's no longer needed.
    – Izzy
    Commented Feb 5, 2014 at 21:39

You must log in to answer this question.

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