Difference between Emulator and Real Device for Installed applications?

回眸只為那壹抹淺笑 提交于 2019-12-10 14:40:08

问题


What is the difference for installed application's list in device and emulator. In emulator i can see the installed apps in location of /data/app

But, i can't see the installed application on my real device. Where it is stored. I can see the default application from here /system/app But i can't see installed application whatever i downloaded and my own application. Anyone guide me?


回答1:


On the emulator, you have root access.

On your phone, you do not have root access (unless you root it). And each application gets its own private folder with its own linux userid, so that one application can not look into the folder of another application. This is but only one aspect of the Android security model. There are many more.

Are you looking for anything in particular in those folders? If so, there are workarounds. For instance, if you're trying to look at your sqlite.db file, one workaround is to have your own application (since it has the permission to do so) programmatically read the database file and reconstitute it on the SD card (every time you want to manually check it).




回答2:


In my device (Samsung Galaxy Tab 10.1, Android 3.1) installed apps are in /data/data.

EDIT: If you want to get absolute path of your directory at runtime, you can use this trick:

getApplicationContext().getFilesDir().getAbsolutePath().replaceFirst("/file.*$", "");


来源:https://stackoverflow.com/questions/7790153/difference-between-emulator-and-real-device-for-installed-applications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!