SUPERAndroidAnalyzer / abxml-rs

Android binary XML decoding library in Rust.
Apache License 2.0
27 stars 5 forks source link

Weird output for `platformBuildVersionCode` and `platformBuildVersionName` #72

Open Ayrx opened 3 years ago

Ayrx commented 3 years ago

I get the following from get_attributes of the root element of an AndroidManifest.xml parsed with this library:

{platformBuildVersionCode: @flags:28, android:versionCode: 10042, android:versionName: 9.17.3.1, android:compileSdkVersion: 28, platformBuildVersionName: @flags:9, android:compileSdkVersionCodename: 9, package: cm.aptoide.pt}

The platformBuildVersionCode: @flags:28 and platformBuildVersionName: @flags:9 appears to be a slight mis-parse? For comparison, here is the output of the same APK file from apktool (and is matched by JADX):

<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="28" android:compileSdkVersionCodename="9" package="cm.aptoide.pt" platformBuildVersionCode="28" platformBuildVersionName="9">
 ...snip...

Let me know if providing the affected APK helps. FWIW, this isn't an isolated thing and I get the same result from a bunch of APKs downloaded from apkpure.com.

gnieto commented 3 years ago

Hey @Ayrx ,

I will take a look. Could you link any APK with this behaviour, please?

Thanks!

Ayrx commented 3 years ago

APK is too large to upload directly but you can see an example here: https://apkpure.com/amazon-shopping-search-find-ship-and-save/com.amazon.mShop.android.shopping

SHA256 checksum:

a6035eeb29f9309522496b0eac95badb6b6179fddc30ae1686e71421837d7a1f  Amazon Shopping Search Find Ship and Save_v22.7.0.100_apkpure.com.apk