app-info-parser icon indicating copy to clipboard operation
app-info-parser copied to clipboard

Feature request: parse aab format

Open sunnylqm opened this issue 3 years ago • 17 comments

https://developer.android.com/guide/app-bundle/app-bundle-format

It seems that there is just one more base folder compared to apk:

image

sunnylqm avatar Jun 17 '21 07:06 sunnylqm

@sunnylqm Please provide a aab file for testing.

chenquincy avatar Jun 17 '21 07:06 chenquincy

@sunnylqm I tried to parse the AAB file base on the current version. It seems not just one more folder. The AAB file's AndroidManifest.xml has a different chunk type compare to APK file, that make a parse error in xml-parser/binary.js. I will try it later but no sure when it will be resolved(because I'm working for a busy project).

chenquincy avatar Jun 17 '21 08:06 chenquincy

@chenquincy Appreciate your effort! I'd like to buy you some coffee 👍

sunnylqm avatar Jun 17 '21 09:06 sunnylqm

@sunnylqm I just checked some document of AAB file and found that things are more complicated than we thought.

image

Refer to this document.

The manifest.xml in AAB file is compiled with a protocol buffer format different from apk's manifest.xml(binary format).

It means that we need the detail of protocol buffer format to parse AAB file's manifest.xml. Unfortunately, I didn't find it.

chenquincy avatar Jun 17 '21 11:06 chenquincy

If you can find or provide the protocol, I think I can resolve the issue with the protocol.

chenquincy avatar Jun 17 '21 11:06 chenquincy

i think it means this one https://developers.google.com/protocol-buffers right?

sunnylqm avatar Jun 17 '21 11:06 sunnylqm

@sunnylqm Yes, that's it. But we also need the proto file or json of the xml to decode it. Here is a js tool to decode protocol buffer format content: protobufjs. I have no idea about the structure of the manifest.xml's proto.

chenquincy avatar Jun 17 '21 12:06 chenquincy

Check this out https://gist.github.com/Farious/e841ef85a8f4280e4f248ba8037ea2c0#file-rollback_aab-sh-L51

sunnylqm avatar Jun 17 '21 12:06 sunnylqm

@sunnylqm Thanks for your help. I parsed it success just now, is this result you want:

{
  "element": {...},
  "source": {...}
}

chenquincy avatar Jun 17 '21 12:06 chenquincy

@sunnylqm I had simplified the result, because the original result is too long.

chenquincy avatar Jun 17 '21 12:06 chenquincy

I don't know but I think it is 😅

sunnylqm avatar Jun 17 '21 12:06 sunnylqm

Very cool! Looking forward for a new version!

sunnylqm avatar Jun 17 '21 12:06 sunnylqm

@sunnylqm OK, I have removed the parse result. I still should take a while to write the final version. Be patient, not sure for the finish time. Thanks for your help and support again!

chenquincy avatar Jun 17 '21 12:06 chenquincy

希望尽快啊,辛苦

DreamPWJ avatar Jan 11 '22 02:01 DreamPWJ

Hi there!

Any update on this issue/feature?)

R1p4eg avatar Aug 10 '22 18:08 R1p4eg

@chenquincy helllo! any updates?

thekhegay avatar Aug 11 '22 07:08 thekhegay