Apktool icon indicating copy to clipboard operation
Apktool copied to clipboard

metaresources.arsc

Open AlexStrannik opened this issue 8 years ago • 8 comments

I have found in GoogleMaps package folder file named metaresources.arcs. I'm using the freshest apktool 2.2.2 Help me! This file could not be opened by any app

AlexStrannik avatar Mar 22 '17 17:03 AlexStrannik

Interesting. I've never seen another arsc file in an application. It must unpack it separately. I assume by Google Maps you mean the regular Google Maps application I can download myself?

iBotPeaches avatar Mar 22 '17 17:03 iBotPeaches

Yes, its regular Google Maps app, latest version 9.48.2 have metaresources.arsc inside assets folder. https://apkpure.com/maps-navigation-transit/com.google.android.apps.maps

bursoft-git avatar Mar 23 '17 06:03 bursoft-git

Also seeing one of these in Google Play Services. Anyone managed to decode these?

lol768 avatar Apr 22 '17 20:04 lol768

I thought an aapt application can. But how to do this I do not know. This file has structure, which is identical to resources.arsc.

AlexStrannik avatar May 12 '17 09:05 AlexStrannik

Spent a solid amount of time looking into metaresources today. In short - no idea.

The header doesn't match that of resources.arsc. Aapt can't handle it. I will dig some more later.

iBotPeaches avatar Jul 27 '17 21:07 iBotPeaches

metaresources.arsc files are not regular binary resources files, they are compressed resources container serving as a generator for localized resources.arsc. I reverse engineered the format using an older version of the com.android.vending app:

  • Partial description of the binary format in the second part of this blog: https://www.pnfsoftware.com/blog/android-metaresources-arsc/
  • In order to write your own decoder (JEB ships with one, but it's not open-sourced), also look at the annotated decompiled code stored in the JEB's JDB2 database linked in the blog.

nfalliere avatar May 30 '19 22:05 nfalliere

Nice investigation! Was always curious what that file was for. Looks like a compact little trick to pack in those resources.

iBotPeaches avatar May 30 '19 22:05 iBotPeaches

Adjusting this ticket to the Feature ticket for metaresources. It will probably take years at my current pace of work on Apktool :/

iBotPeaches avatar Nov 28 '20 23:11 iBotPeaches