* fix: support skipping unread header sizes of ResChunk
* refactor: note that header skip happens too late on some
* refactor: check for chunk header end at each of each header
* chore: skip reading header on string pools
* fix: move header check prior to reading entries on tables
* fix: prevent over-reading config flags
* fix: properly read localeNumberingSystem
* test: adjust test for bcp47 aapt2 test
* fix: properly add 8 to 'read' on parser
* test: add test for aapt2 bcp47 tag
* test: add additional bcp47 test
* fix: handle numbering system parsing
* fix: add comment about localeNumber usage
* fix: prevent blowing out minSdkVersion
* fix: correct naming regression with apk name and sdk info
* chore: comment for why we double up minSdkVersion
* fix: deprecate compressionType
* test: assert apktool format isn't regressed
* Supports ASRC with null renamed package.
* Rework ASRC Chunk parser to a loop to break assumption of order of chunks
* Break out unknown skips for alignment to ResourceTypes.h
* Add verbose information for file skips
* Add test for protected apk sample
* Rework chunk parsing for StringBlock
* Refactor AXML Parser to support proper header reading
* Fix parsing if attribute size reported does not align to actual size
* refactor: rename package_ to pkgId
* refactor: ResAttrDecoder takes ResTable
* fix: fallback on attr decoding to proper prefix
* fix: reverse order of processing to trust string pool 2nd
Android prefers the resource map value over what the String block has.
This can be seen quite often in obfuscated apps where values such as:
<item android:state_enabled="true" app:state_collapsed="false" app:state_collapsible="true">
Are improperly decoded when trusting the String block.
Leveraging the resource map allows us to get the proper value.
<item android:state_enabled="true" app:d2="false" app:d3="true">
* refactor: set default value if no string/res value
* extract AaptInvoker and rename MetaFile to ApkInfo, all decode methods from AndrolibResources moved to the ApkDecoder
* extract ARSCData and FlagsOffset from ARSCDecoder and remove unused imports
* rebase to master
* move decodeManifest and decodeResources to the ResourceDecoder
* remove commented old code
Fastst way to fix empty key value splitting for styled strings.
Signed-off-by: Sven Marquardt <dev@mail.smarquardt.space>
Signed-off-by: Sven Marquardt <dev@mail.smarquardt.space>
* Correct falsely-referenced attribute into an entity which is an obfuscated name
* style: correct syntax for custom attributes
* fix: remove unused import
Co-authored-by: MyAnoneNeko <MyAnoneNeko@users.noreply.github.com>