You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
The text was updated successfully, but these errors were encountered:
I'm trying it on 'Opera browser beta' with the same problem.
Problem is the following:
base.apk has AndroidManifest.xml and resources.arsc
Let's see AndroidManifest.xml in Android Studio (Analyze APK option): <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@ref/0x7f080413" /
Let's see base.apk's resources.arsc.
It contains ID 0x7f080413, however no name is defined. It's also not defined for any DPI resolution.
This symbol is available for xxhdpi resolution in another APK package (split_config.xxhdpi.apk):
It has got a name drawable/notification_smali
Solution:
Allow res/values/public.xml to contain names of symbols that are not defined. Currently it would say the following if symbol in public.xml is declared, but its definition cannot be found for any DPI: W: R:\tmp\decompiledBase\res\values\public.xml:19946: error: no definition for declared symbol 'com.opera.browser.beta:drawable/notification_small'.
Currently this is not allowed.
For decompilation, add the possibility to specify more APK packages from which resource IDs will be derived.
Add an option like this:
-additional_apks "R:\tmp\unpackedAPKs\split_config.xxhdpi.apk:R:\unpackedAPKs\R:\tmp\unpackedAPKs\ssplit_config.xxxhdpi.apk:R:\tmp\unpackedAPKs\split_mintegral_ads.apk"
resources.arsc to be loaded from these additional APK packages and IDs to be put inside of res/values/public.xml properly. AndroidManifest.xml should be decompiled then.
Thanks for this great project by the way.
sipsuru
changed the title
[BUG] XAPK Base apk Invalid Decompile | @null as value in xml | Android 15 Target SDK
[BUG] XAPK Base APK - Invalid Resource Decompilation | @null in XML Resources | Android 15 Target SDK
Feb 17, 2025
Information
apktool -version
) - 2.11.0 | 2.11.0-7-f5c226b5-SNAPSHOTjava --version
) - 23.0.1 | 2024-10-15ADB Stacktrace/Logcat
Steps to Reproduce
apktool d wp.wattpad.apk
apktool b -o wp.wattpad.apk
adb install-multiple app1.apk app2.apk ...
ORCreate 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
apktool d
,apktool b
without changing anything? - YesUpdate: 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
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.
The text was updated successfully, but these errors were encountered: