Apktool
Apktool copied to clipboard
[FEAT] XAPK Support - Support Resource Decompilation in XAPK | @null in XML Resources When Decompiling XAPK Base APK
Information
- Apktool Version (
apktool -version) - 2.11.0 | 2.11.0-7-f5c226b5-SNAPSHOT - Operating System (Mac, Linux, Windows) - Windows
- APK From? (Playstore, ROM, Other) - Other [ApkCombo / ApkPure - XAPK]
- Java Version (
java --version) - 23.0.1 | 2024-10-15
ADB Stacktrace/Logcat
adb: failed to finalize session
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1887994749.tmp/base.apk (at Binary XML file line #645): <meta-data> requires an android:value or android:resource attribute]
Steps to Reproduce
- Download xapk and extract apks inside.
- Decompile wp.wattpad.apk with
apktool d wp.wattpad.apk - Delete original wp.wattpad.apk
- Recompile without modifications with
apktool b -o wp.wattpad.apk - Sign all apks (in current directory) with: sign.py
- [Tried with & without this step]; Align all apks (in current directory) with: align.py
- Install all apks with
adb install-multiple app1.apk app2.apk ...OR Create a zip folder containing all the apks, icon.png, manifest.json
Frameworks
Not from a framework
APK
https://apkcombo.app/wattpad/wp.wattpad/download/phone-10.95.0-apk
Questions to ask before submission
- Have you tried
apktool d,apktool bwithout changing anything? - Yes - If you are trying to install a modified apk, did you resign it? - Yes
- Are you using the latest apktool version? - Yes
Update: I don't get any error (or warning) when decompiling or recompiling. So I've included adb's logcat here.
Additional Information
Not a issue with the original xapk itself. I could successfully install the original xapk (and with adb too).
When the wp.wattpad.apk (base apk) is decompiled, it contains a lot of @null values, like
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@null"/>
<service android:foregroundServiceType="shortService" android:icon="@null" android:name="wp.wattpad.migration.MigrationService"/>
and in many more. (This's from AndroidManifest.xml)
There're apks for multiple resolutions: config.hdpi.apk, config.ldpi.apk, config.mdpi.apk, config.tvdpi.apk, config.xhdpi.apk, config.xxhdpi.apk, config.xxhdpi.apk, so could it be that apktool replaces original resources with @null as they're not available in the base apk?
Furthermore, the target Android version seemed to be 15, which's more interesting.