I am trying to understand the exact details of how Android extracts the entries from an APK during the installation process. First some background info:
- The installation may occur either through Play Store or directly using for example
adb
using a command likeadb install example.apk
. Should be noted that depending on how it is installed the process might be slightly different - I am interested in both cases - The .apk is basically a zip file and an extraction should occur. Following the zip format specification the extraction should account for the compression method being used by each entry. I located this method which I am not sure if it is related with the installation process but I can see it takes into account the two available compression methods (STORE, DEFLATE).
I have tried in Android 11(emulator x86), to install an APK (through adb) which does not have a compression method of either STORE or DEFLATE for the AndroidManifest.xml and it installs successfully.
What is the responsible code for handling compression methods outside of the ones expected?
adb install
is that nowadays PlayStore delivers apps as split APK files (multiple APK files per app), where asadb install
expects a monolithic APK file.adb install_multiple
if I'm not mistaken ;) And while I'm not sure about the PlayStore app, installation is usually handled bypm install
(whichadb install
hands over to IIRC).