简体   繁体   中英

Where are my Android app's data files?

I wrote an app that reads and writes a couple of data files. When I call the method getFilesDir() it returns /data/data/nel.prog.MyApp99/files (assuming my app is called MyApp99).

So how do I see that on my PC?

When I attach my phone as a debugging target to my (XP) PC I get 2 external drives created - one for the phone itself and one for the SD card, and I can't find that path in either one! In XP I set my "Folder options" to show hidden files and folders and to not hide protected operating system files. I can see a lot of stuff (ie, lots of files and folders on both the phone and SD card). But I don't see the above path nor the data files themselves.

Where are they and how do I access them? Thanks in advance!

You can use adb (Android Debug Bridge) in your adk/tools dir to copy files or start a remote shell (and then list files/contents).

adb pull <remote> <local>   // copy files

adb shell    // start shell

Update:

Above commands only work from a computer connected to Android device.

For sharing files between apps on device you should check out: http://developer.android.com/guide/topics/security/security.html#userid

Your phone must be rooted to be able to access the /data directory. Once you did it you can use a tool like DroidExplorer to browse this folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM