iBotPeaches / Apktool

A tool for reverse engineering Android apk files

Home Page:https://apktool.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] Apk recompile fails

VusalShahbazzadeh opened this issue · comments

Information

  1. Apktool Version (apktool -version) -2.9.3
  2. Operating System (Mac, Linux, Windows) -Windows
  3. APK From? (Playstore, ROM, Other) -Android Settings
  4. Java Version (java --version) - 1.8.0_411-b09

Stacktrace/Logcat

C:\Users\Vusal\Desktop\S>apktool d Settings.apk
I: Using Apktool 2.9.3 on Settings.apk
I: Loading resource table...
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\Vusal\AppData\Local\apktool\framework\1.apk
I: Loading resource table from file: C:\Users\Vusal\AppData\Local\apktool\framework\16.apk
I: Decoding Shared Library (androidhwext), pkgId: 15
I: Loading resource table from file: C:\Users\Vusal\AppData\Local\apktool\framework\17.apk
I: Decoding Shared Library (android.miui), pkgId: 17
I: Decoding values */* XMLs...
I: Loading resource table from file: C:\Users\Vusal\AppData\Local\apktool\framework\18.apk
I: Decoding Shared Library (miui), pkgId: 16
I: Decoding Shared Library (android.miui), pkgId: 17
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

C:\Users\Vusal\Desktop\S>apktool b Settings
I: Using Apktool 2.9.3
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ai_button_icon.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\emergency_sos_icon.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_about_settings.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_accelerometer_settings.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_accessibility_settings.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_account_autostar.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_account_list.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_add_account_settings.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_airplane_mode_settings.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_android_beam_settings.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_app_lock.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_app_permission.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_brightness_settings.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_bt_audio_video_cra_audio.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_bt_audio_video_hifi_audio.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_bt_audio_video_microphone.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_bt_audio_video_vcr.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_bt_config.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_bt_unknown.png: error: invalid configuration 'godzillaui-xxhdpi'.
W: C:\Users\Vusal\Desktop\S\Settings\res\drawable-godzillaui-xxhdpi\ic_children_mode_settings.png: error: invalid configuration 'godzillaui-xxhdpi'.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Vusal\AppData\Local\Temp\brut_util_Jar_75228709056761557047008424928442150333.tmp, compile, --dir, C:\Users\Vusal\Desktop\S\Settings\res, --legacy, -o, C:\Users\Vusal\Desktop\S\Settings\build\resources.zip]

Steps to Reproduce

  1. apktool d Settings.apk
  2. apktool b Settings

Frameworks

If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files
(.apks that live in /system/framework or /system/priv-app)
/system/app/miuisystem/miuisystem.apk
/system/app/miui/miui.apk
/system/framework/framework-ext-res/framework-ext-res.apk

phone model Xiaomi Redmi Note 9 Pro

APK

If this APK can be freely shared, please upload/attach a link to it.
it is a settings apk from system

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? I can't compile.
  3. Are you using the latest apktool version? Yes.

Sorry, I'll accept a PR but no longer focusing MIUI changes.

godzillaui-xxhdpi

Thats clearly a MIUI specific qualifier.