iBotPeaches / Apktool

A tool for reverse engineering Android apk files
https://apktool.org/
Apache License 2.0
20.08k stars 3.58k forks source link

[BUG] Building Discord 2.37 fails #3638

Closed dylanpdx closed 3 months ago

dylanpdx commented 3 months ago

Information

  1. Apktool Version (apktool -version) - 2.9.3
  2. Operating System (Mac, Linux, Windows) - Windows
  3. APK From? (Playstore, ROM, Other) - ApkMirror (link)
  4. Java Version (java --version) - openjdk 11.0.16.1 2022-08-12 LTS

Stacktrace/Logcat

> apktool b .\discord\ -o out.apk
I: Using Apktool 2.9.3
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_in.xml:6: error: attribute android:fromExtendBottom not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_in.xml:6: error: attribute android:fromExtendLeft not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_in.xml:6: error: attribute android:fromExtendRight not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_in.xml:6: error: attribute android:fromExtendTop not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_in.xml:6: error: attribute android:toExtendBottom not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_in.xml:6: error: attribute android:toExtendLeft not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_in.xml:6: error: attribute android:toExtendRight not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_in.xml:6: error: attribute android:toExtendTop not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_out.xml:6: error: attribute android:fromExtendBottom not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_out.xml:6: error: attribute android:fromExtendLeft not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_out.xml:6: error: attribute android:fromExtendRight not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_out.xml:6: error: attribute android:fromExtendTop not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_out.xml:6: error: attribute android:toExtendBottom not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_out.xml:6: error: attribute android:toExtendLeft not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_out.xml:6: error: attribute android:toExtendRight not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_enter_out.xml:6: error: attribute android:toExtendTop not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_exit_in.xml:6: error: attribute android:fromExtendBottom not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_exit_in.xml:6: error: attribute android:fromExtendLeft not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_exit_in.xml:6: error: attribute android:fromExtendRight not found.
W: C:\Users\***\Downloads\.\discord\res\anim-v33\rns_default_exit_in.xml:6: error: attribute android:fromExtendTop not found.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\***\AppData\Local\Temp\brut_util_Jar_171498497223160340245665335151115810592.tmp, link, -o, C:\Users\***\AppData\Local\Temp\APKTOOL13818962590564481423.tmp, --package-id, 127, --min-sdk-version, 24, --target-sdk-version, 33, --version-code, 237013, --version-name, 237.13 - Stable, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, --no-compile-sdk-metadata, --warn-manifest-validation, -e, C:\Users\***\AppData\Local\Temp\APKTOOL17962336861814755183.tmp, -0, arsc, -I, C:\Users\***\AppData\Local\apktool\framework\1.apk, --manifest, C:\Users\***\Downloads\.\discord\AndroidManifest.xml, C:\Users\***\Downloads\.\discord\build\resources.zip]

Steps to Reproduce

  1. apktool d discord.apk
  2. apktool b ./discord/ -o out.apk

APK

If this APK can be freely shared, please upload/attach a link to it. https://www.apkmirror.com/apk/discord-inc/discord-chat-for-gamers/discord-chat-for-gamers-237-13-stable-release/discord-talk-play-hang-out-237-13-stable-2-android-apk-download/

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? Yes
  2. If you are trying to install a modified apk, did you resign it? N/A
  3. Are you using the latest apktool version? Yes
iBotPeaches commented 3 months ago

I could not replicate.

➜  3638 apktool d 3638.apk -s
I: Using Apktool v2.9.2-48-6b986e9a-SNAPSHOT on 3638.apk with 8 thread(s).
I: Copying raw classes.dex file...
I: Copying raw classes2.dex file...
I: Copying raw classes3.dex file...
I: Copying raw classes4.dex file...
I: Copying raw classes5.dex file...
I: Copying raw classes6.dex file...
I: Copying raw classes7.dex file...
I: Copying raw classes8.dex file...
I: Copying raw classes9.dex file...
I: Loading resource table...
I: Decoding file-resources...
I: Loading resource table from file: /home/ibotpeaches/.local/share/apktool/framework/1.apk
I: Decoding values */* XMLs...
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Copying META-INF/services directory
➜  3638 apktool b 3638
I: Using Apktool v2.9.2-48-6b986e9a-SNAPSHOT with 8 thread(s).
I: Copying 3638 classes.dex file...
I: Copying 3638 classes2.dex file...
I: Copying 3638 classes3.dex file...
I: Copying 3638 classes5.dex file...
I: Copying 3638 classes9.dex file...
I: Copying 3638 classes4.dex file...
I: Copying 3638 classes7.dex file...
I: Copying 3638 classes6.dex file...
I: Copying 3638 classes8.dex file...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs... (/lib)
I: Copying libs... (/kotlin)
I: Copying libs... (/META-INF/services)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk into: 3638/dist/3638.apk
➜  3638 

Confirm you have framework files reset (apktool empty-framework-dir)