iBotPeaches / Apktool

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

[BUG] compiling whatsapp resources #3190

Closed byomi closed 1 year ago

byomi commented 1 year ago

Information

  1. Apktool Version (apktool -2.8.0) -
  2. Operating System (Mac, Linux, Windows) -linux
  3. APK From? (Playstore, ROM, Other) -apkpure
  4. Java Version (java --version) -Openjdk 17.0.7

Description first when i started to reverse engineer whatsapp i used the 2.7.0 but can't compile apk unless i decompile it withoout resources so now i am using the last version and the error change the bug fixed in last version but here new problem i dont want to decompile without resources since i want to add my own pictures images and change package name to my own

Stacktrace/Logcat

./apktool b WhatsApp --use-aapt2
I: Using Apktool 2.8.0
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: /home/nobodyknows/Desktop/apktooldof/WhatsApp/res/animator/APKTOOL_DUMMYVAL_0x7f02000b.xml:7: error: attribute state_dragged (aka com.whatsapp:state_dragged) not found.
W: /home/nobodyknows/Desktop/apktooldof/WhatsApp/res/animator/APKTOOL_DUMMYVAL_0x7f02000c.xml:7: error: attribute state_dragged (aka com.whatsapp:state_dragged) not found.
W: /home/nobodyknows/Desktop/apktooldof/WhatsApp/res/animator/APKTOOL_DUMMYVAL_0x7f020016.xml:4: error: attribute state_dragged (aka com.whatsapp:state_dragged) not found.
W: /home/nobodyknows/Desktop/apktooldof/WhatsApp/res/color/APKTOOL_DUMMYVAL_0x7f06065c.xml:5: error: attribute state_dragged (aka com.whatsapp:state_dragged) not found.
W: /home/nobodyknows/Desktop/apktooldof/WhatsApp/res/color/APKTOOL_DUMMYVAL_0x7f06085b.xml:5: error: attribute state_dragged (aka com.whatsapp:state_dragged) not found.
W: /home/nobodyknows/Desktop/apktooldof/WhatsApp/res/color/APKTOOL_DUMMYVAL_0x7f06085b.xml:6: error: attribute state_dragged (aka com.whatsapp:state_dragged) not found.
W: /home/nobodyknows/Desktop/apktooldof/WhatsApp/res/color/APKTOOL_DUMMYVAL_0x7f06085c.xml:5: error: attribute state_dragged (aka com.whatsapp:state_dragged) not found.
W: /home/nobodyknows/Desktop/apktooldof/WhatsApp/res/drawable/mtrl_switch_thumb.xml:6: error: attribute state_with_icon (aka com.whatsapp:state_with_icon) not found.
W: error: failed linking file resources.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_26608826609686595201617165250529962023.tmp, link, -o, /tmp/APKTOOL1139501867453885000.tmp, --package-id, 127, --min-sdk-version, 23, --version-code, 231374003, --version-name, 2.23.13.74, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, --enable-sparse-encoding, -e, /tmp/APKTOOL1952182002010738841.tmp, -0, arsc, -I, /home/nobodyknows/.local/share/apktool/framework/1.apk, --manifest, /home/nobodyknows/Desktop/apktooldof/WhatsApp/AndroidManifest.xml, /home/nobodyknows/Desktop/apktooldof/WhatsApp/build/resources.zip]

Steps to Reproduce

  1. apktool b Whatsapp --use-aapt2

APK

https://m.apkpure.com/whatsapp-android/com.whatsapp/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? yes
  3. Are you using the latest apktool version? Yes
iBotPeaches commented 1 year ago

Thanks for the report, but this is a known issue just a few tickets back at: https://github.com/iBotPeaches/Apktool/issues/3129

Closing for duplicate.