Isn't there an official .apk format specification?

I saw some applications that convert .apk files to elementary files. I would like to know where I can find the official specification of .apk files, but I have not reached it anywhere! Can someone enlighten us about where to look, and what are the best resources for a specification if there is no formal specification?

+6
source share
1 answer

I do not know if there is an official specification, but from the view of my application file structure, I deduced the following:

-Apk is just a zip file and can be opened as such in any suitable application (7zip, WinZip, WinRAR, any default tool for the OS by default).

-It must contain the AndroidManifest.xml file in the root directory (although this is a compiled XML file, and not for humans).

-It should contain the classes.dex file containing the actual binary code compiled as Dalvik bytecode.

-It must contain the resources.arsc file. I believe this is the index of everything in the / res folder, but I'm not sure.

-It must contain the META-INF folder in the root containing CERT.RSA, CERT.SF and MANIFEST.MF. These are application digital signature files.

- The application may contain folders / assets, / res and / raw, containing resource files, such as images and databases.

- An application may contain a / lib folder containing folders for all source code targets (e.g. armeabi) that contain .so files (native code).

I probably missed a ton of things, but this should give you a good start.

+7
source

Source: https://habr.com/ru/post/893918/


All Articles