Android Packages

58 views
Skip to first unread message

bertran...@bnf.fr

unread,
May 21, 2024, 12:03:01 PM5/21/24
to PRONOM
Hi everyone,

I created an issue for Android Packages (APK): https://github.com/digital-preservation/PRONOM_Research/issues/56.

At first, I thought that the existence of a file named AndroidManifest.xml at the root level of the APK/ZIP package would be enough to identify it. Then we had a discussion with Johan and Ross (https://digipres.club/@bitsgalore/112478785077854374), who pointed me to a possible confusion with XAPK files.

Nevertheless, I read at https://fileinfo.com/extension/xapk that
" The XAPK format was introduced to package the APK file and OBB file together for a seamless delivery and installation process when downloading an Android app from a non-Google Play site."
"XAPK files are compresed using the standard ZIP file format. These can be extracted using a standard compression/decompression software such as WinZIP. Once the XAPK file is extracted to the disc, it contains the following files in folder.
  • APK - Standard installation file for installing the application on Android devices
  • OBB - Additional file that contains relevant resource files"
So I would tend to think that the AndroidManfest.xml file would never be found at the root level of the XAPK container.

In addition, Android App Bundles don't have the same structure as APK either: they have an AndroidManifest.xml file but inside a /base/manifest structure (see https://developer.android.com/guide/app-bundle/app-bundle-format).

The LoC entry for APK (https://www.loc.gov/preservation/digital/formats/fdd/fdd000592.shtml) lists other folders that are found in the package, but as said Johan, we cannot be absolutely sure that they would always be present. So I would tend to limit the identification pattern to the presence of an AndroidManifest.xml file at the root level.

What do you think?

Kind regards,

Bertrand

bertran...@bnf.fr

unread,
May 31, 2024, 12:19:15 PM5/31/24
to PRONOM
Dear All,

I've just noticed that since January 2023, the Unix command File detects APK files: https://github.com/file/file/commit/b29519e7dc572d85f757314d3bfc7461ceb7709c. It looks further into the file to add some additional information ('with classes.dex', 'with drawables', etc.) but the presence of the AndroidManifest.xml file is a sufficient clue for identifying it as an Android Package.

Kind regards,

Bertrand

bertran...@bnf.fr

unread,
Nov 13, 2024, 5:22:45 AM11/13/24
to PRONOM
Dear All,

As the PRONOM hackathon week is in full swing, I am reminding you this. I thought it would be an easy one, but apparently not...

Kind regards,

Bertrand

bertran...@bnf.fr

unread,
Feb 7, 2025, 11:53:59 AMFeb 7
to PRONOM
Dear All,

As usual, huge thank you to Tyler who helped me a lot on Android application signatures - in fact, he produced the container signatures after some work we did on these three formats!

The signatures are ready and tested:


Kind regards,

Bertrand
Reply all
Reply to author
Forward
0 new messages