简体   繁体   English

引擎盖下的Android java app安装

[英]Android java app installation under the hood

I am trying to understand what exactly is going on when you install an application (APK) on an Android device. 我试图了解在Android设备上安装应用程序(APK)时究竟发生了什么。 I guess that files are are extracted from the package and copied somewhere on the device. 我想这些文件是从包中提取出来的,并在设备上的某处复制。

  • Are there other steps going on? 还有其他步骤吗? For example, is the package name of the application written somewhere in the OS like in somekind of registry? 例如,应用程序的软件包名称是在某些注册表中编写的吗?
  • Is the application version number written as well somewhere or the OS reads the xml manifest of the application to know its installed version? 应用程序版本号是否也写在某处或操作系统读取应用程序的xml清单以了解其安装的版本?

This is related to another question where I suspect that some data was not erased correctly during the uninstallation of a debug app and I am trying to find what that might be. 这与另一个问题有关 ,我怀疑在卸载调试应用程序期间某些数据没有被正确删除,我试图找到可能的内容。

There will be files/dirs created in various locations, not necessary in all possible locations for every app though, it depends on how the app is configured. 将在各个位置创建文件/目录,但在每个应用程序的所有可能位置都不需要,但这取决于应用程序的配置方式。

This list is not necessarily complete. 此列表不一定完整。

Files/dirs: 文件/显示目录:

  • /data/data /数据/数据
  • /data/app /数据/应用程序
  • /data/app-asec /数据/ APP-ASEC
  • /data/app-lib /数据/ APP-LIB
  • /data/dalvik-cache /数据/达尔维克缓存
  • /data/local/tmp /数据/本地/ tmp目录
  • /mnt/asec 到/ mnt / ASEC
  • /mnt/obb 到/ mnt / OBB
  • /mnt/sdcard/Android/obb 的/ mnt / SD卡/ Android设备/ OBB
  • /mnt/sdcard/Android/data 的/ mnt / SD卡/ Android设备/数据

Your app will also get an entry in these files: 您的应用也会在这些文件中输入一个条目:

  • /data/system/packages.list /data/system/packages.list
  • /data/system/packages.xml /data/system/packages.xml
  • /data/system/appops.xml /data/system/appops.xml

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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