Open weary-adventurer opened 1 year ago
I've also tried a different aapt2 version from latest build tools.
Same error with:
apktool b --aapt build-tools\33.0.0\aapt2.exe
apktool b --aapt build-tools\34.0.0-rc3\aapt2.exe
May you try the upcoming build here? https://github.com/iBotPeaches/Apktool/suites/16733967486/artifacts/956092470
I recognize that error as something already resolved.
I've tried this version and it seems the errors are different now.
Without arguments:
I: Using Apktool v2.8.1-68-77b4229d-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: Failed to generate resource table for split ''
W: X:\test\_unpacked\res\values-v34\colors.xml:5: error: Error: Resource is not public. (at 'APKTOOL_DUMMYVAL_0x7f0709b2' with value '@android:color/accent_material_light').
W:
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\User\AppData\Local\Temp\brut_util_Jar_1573041273733491312796520576701119900.tmp, p, --forced-package-id, 127, --min-sdk-version, 29, --target-sdk-version, 34, --version-code, 593814038, --version-name, 117.0.5938.140, --no-version-vectors, -F, C:\Users\User\AppData\Local\Temp\APKTOOL1100759794303156844.tmp, -e, C:\Users\User\AppData\Local\Temp\APKTOOL15263151198938633053.tmp, -0, arsc, -I, C:\Users\User\AppData\Local\apktool\framework\1.apk, -S, X:\test\_unpacked\res, -M, X:\test\_unpacked\AndroidManifest.xml]
With --use-aapt2
:
I: Using Apktool v2.8.1-68-77b4229d-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: X:\test\_unpacked\res\values-v34\colors.xml:5: error: resource android:color/accent_material_light is private.
W: X:\test\_unpacked\res\values-night-v34\colors.xml:6: error: resource android:color/bright_foreground_light is private.
W: X:\test\_unpacked\res\values\styles.xml:4: error: expected flags but got (raw string) APKTOOL_MISSING_0x7f0103fc.
W: X:\test\_unpacked\res\values\styles.xml:4817: error: expected flags but got (raw string) APKTOOL_MISSING_0x7f0107f5.
W: X:\test\_unpacked\res\values\styles.xml:4833: error: expected flags but got (raw string) APKTOOL_MISSING_0x7f010504.
W: X:\test\_unpacked\res\values\styles.xml:4865: error: expected flags but got (raw string) APKTOOL_MISSING_0x7f010504.
W: X:\test\_unpacked\res\values\styles.xml:5384: error: expected enum but got (raw string) 2.
W: X:\test\_unpacked\res\values\styles.xml:10189: error: resource android:color/bright_foreground_dark_disabled is private. W: X:\test\_unpacked\res\values\styles.xml:10203: error: resource android:color/btn_default_material_dark is private.
W: X:\test\_unpacked\res\values\styles.xml:10204: error: resource android:color/btn_leanback_color is private.
W: X:\test\_unpacked\res\values\styles.xml:10205: error: resource android:color/bright_foreground_dark_inverse is private.
W: X:\test\_unpacked\res\values\styles.xml:10206: error: resource android:color/btn_default_material_light is private.
W: X:\test\_unpacked\res\values\styles.xml:10207: error: resource android:color/btn_leanback_focused is private.
W: X:\test\_unpacked\res\values\styles.xml:10208: error: resource android:color/background_floating_device_default_light is private.
W: X:\test\_unpacked\res\values\styles.xml:10209: error: resource android:color/background_device_default_light is private. W: X:\test\_unpacked\res\values\styles.xml:10210: error: resource android:color/car_action1 is private.
W: X:\test\_unpacked\res\values\styles.xml:10211: error: resource android:color/car_action1_dark is private.
W: X:\test\_unpacked\res\values\styles.xml:10212: error: resource android:color/background_holo_light is private.
W: X:\test\_unpacked\res\values\styles.xml:10213: error: resource android:color/background_floating_material_light is private.
W: X:\test\_unpacked\res\values\styles.xml:10214: error: resource android:color/car_blue_100 is private.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\User\AppData\Local\Temp\brut_util_Jar_6336769292040621121824582984158182377.tmp, link, -o, C:\Users\User\AppData\Local\Temp\APKTOOL3244941944423443864.tmp, --package-id, 127, --min-sdk-version, 29, --target-sdk-version, 34, --version-code, 593814038, --version-name, 117.0.5938.140, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, --no-compile-sdk-metadata, -e, C:\Users\User\AppData\Local\Temp\APKTOOL16665445829855389215.tmp, -0, arsc, -I, C:\Users\User\AppData\Local\apktool\framework\1.apk, --manifest, X:\test\_unpacked\AndroidManifest.xml, X:\test\_unpacked\build\resources.zip]
I got a slightly different error.
W: /media/ibotpeaches/AOSP/Apktool/3352/base/res/values/styles.xml:4: error: Error: String types not allowed (at 'APKTOOL_DUMMYVAL_0x7f050216' with value 'APKTOOL_MISSING_0x7f0103fc').
Which does look odd.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="APKTOOL_DUMMYVAL_0x7f150000">
<item name="APKTOOL_DUMMYVAL_0x7f050216">APKTOOL_MISSING_0x7f0103fc</item>
<item name="APKTOOL_DUMMYVAL_0x7f0502fe">@drawable/APKTOOL_DUMMYVAL_0x7f0901e8</item>
</style>
In this default configuration of res mode in removal, we should have killed that resource. I'll investigate that aspect.
Information
apktool -version
) - 2.8.1java --version
) - openjdk 17.0.7 2023-04-18Stacktrace/Logcat
With --use-aapt2:
Without --use-aapt2:
Steps to Reproduce
apktool d base.apk
apktool b base -o base_rebuilt.apk
ORapktool b base --use-aapt2 -o base_rebuilt.apk
APK
Just the APK: base.apk.zip
Note: This is a split Chrome 117 APK, can be extracted from original .apkm here: https://www.apkmirror.com/apk/google-inc/chrome/chrome-117-0-5938-140-release/google-chrome-fast-secure-117-0-5938-140-9-android-apk-download/
Questions to ask before submission
apktool d
,apktool b
without changing anything? Yes