开发者

How to access Data/app folder in android?

I want to access Data/app folder, I use the following code:

File fl = new File("data/app/");

fl.list()开发者_开发问答;

but I get exception. May be it need some permission to read this folder list, can some one tell me which permission it need to read file in that folder.

Any help in this regar is higly appreciated,

thanks.


1) The access mode for /data/app/ is rwxrwx--x. The --x part means that if you are not root you can not browse the directory but you can traverse it.

2) The apk files are world-readable (rw-r--r--)

So you can read the content of a file contained in /data/app/ as long as you know it's complete path.

shell@android:/ $ ls -l /data/app                                              
opendir failed, Permission denied

shell@android:/ $ ls -l /data/app/com.google.android.apps.maps-2.apk         
-rw-r--r-- system   system    8758286 2012-12-18 20:01 com.google.android.apps.maps-2.apk
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜