开发者

Where are my Android app's data files?

I wrote an app that reads and writes a couple of 开发者_如何学JAVAdata 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 (i.e., 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜