[Huawei Mate 20 Pro Themes, Apps, and Mods] MirageBlader:
Hello everyone,

i was planning to translate the Freebuds 2 Assistant app since its only avaidable in chinese.

I was able to decompile it using APKTools but not have issue to compile it back so i can install it.

The App can be downloaded here: http://appstore.huawei.com/app/C100420969

If anyone who did this already could help me with the recompilation, it would be much appriciated.

My Freebuds 2 Pro arrive next week and i wanted to translate the app to make the usage easier.

Hopefully it would help others too.

Many thanks in advance and happy new year :)

EDIT:

This is what i get if i try to recompile the apk without any modifications:

c:\Windows>apktool b huawei

I: Using Apktool 2.3.4

I: Checking whether sources has changed...

I: Smaling smali folder into classes.dex...

I: Checking whether resources has changed...

I: Building resources...

S: WARNING: Could not write to (C:\Users\********\AppData\Local\apktool\framework), using C:\Users\********\AppData\Local\Temp\ instead...

S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable

W: ERROR: 9-patch image c:\Windows\huawei\res\drawable-xxxhdpi\download_button.9.png malformed.

W: No marked region found along edge.

W: Found along left edge.

W: ERROR: Failure processing PNG image c:\Windows\huawei\res\drawable-xxxhdpi\download_button.9.png

W: ERROR: 9-patch image c:\Windows\huawei\res\drawable-xxxhdpi\button_background.9.png malformed.

W: No marked region found along edge.

W: Found along left edge.

W: ERROR: Failure processing PNG image c:\Windows\huawei\res\drawable-xxxhdpi\button_background.9.png

W: ERROR: 9-patch image c:\Windows\huawei\res\drawable\schedule.9.png malformed.

W: No marked region found along edge.

W: Found along left edge.

W: ERROR: Failure processing PNG image c:\Windows\huawei\res\drawable\schedule.9.png

W: ERROR: 9-patch image c:\Windows\huawei\res\drawable\schedule_bg.9.png malformed.

W: No marked region found along edge.

W: Found along left edge.

W: ERROR: Failure processing PNG image c:\Windows\huawei\res\drawable\schedule_bg.9.png

brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\FRONTO~1\AppData\Local\Temp\brut_util_Jar_8797507990411023629.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk-version, 27, --version-code, 1, --version-name, 1.0.0.106, --no-version-vectors, -F, C:\Users\FRONTO~1\AppData\Local\Temp\APKTOOL4926485481336695816.tmp, -0, arsc, -0, assets/introduction_en.files/image001.png, -0, assets/introduction_en.files/image002.png, -0, assets/introduction_en.files/image003.png, -0, assets/introduction_en.files/image004.png, -0, assets/introduction_en.files/image005.png, -0, assets/introduction_en.files/image006.png, -0, assets/introduction_en.files/image007.png, -0, assets/introduction_en.files/image008.png, -0, assets/introduction_en.files/image009.png, -0, assets/introduction_en.files/image010.png, -0, assets/introduction_en.files/image011.png, -0, assets/introduction_en.files/image012.png, -0, assets/introduction_en_standard.files/introduction_en_standard1247.png, -0, assets/introduction_en_standard.files/introduction_en_standard1360.png, -0, assets/introduction_en_standard.files/introduction_en_standard26.png, -0, assets/introduction_en_standard.files/introduction_en_standard3244.png, -0, assets/introduction_en_standard.files/introduction_en_standard37.png, -0, assets/introduction_en_standard.files/introduction_en_standard567.png, -0, res/drawable-hdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, png, -0, res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-hdpi-v4/abc_cab_background_top_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_list_focused_holo.9.png, -0, res/drawable-hdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-hdpi-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-hdpi-v4/abc_list_pressed_holo_light.9.png, -0, res/drawable-hdpi-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-hdpi-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-hdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-hdpi-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-hdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-hdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/notification_bg_low_normal.9.png, -0, res/drawable-hdpi-v4/notification_bg_low_pressed.9.png, -0, res/drawable-hdpi-v4/notification_bg_normal.9.png, -0, res/drawable-hdpi-v4/notification_bg_normal_pressed.9.png, -0, res/drawable-ldrtl-hdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-ldrtl-mdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-ldrtl-xhdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-ldrtl-xxhdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-ldrtl-xxxhdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-mdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-mdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-mdpi-v4/abc_cab_background_top_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_list_focused_holo.9.png, -0, res/drawable-mdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-mdpi-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-mdpi-v4/abc_list_pressed_holo_light.9.png, -0, res/drawable-mdpi-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-mdpi-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-mdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-mdpi-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-mdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-mdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/notification_bg_low_normal.9.png, -0, res/drawable-mdpi-v4/notification_bg_low_pressed.9.png, -0, res/drawable-mdpi-v4/notification_bg_normal.9.png, -0, res/drawable-mdpi-v4/notification_bg_normal_pressed.9.png, -0, res/drawable-xhdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-xhdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-xhdpi-v4/abc_cab_background_top_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_list_focused_holo.9.png, -0, res/drawable-xhdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-xhdpi-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-xhdpi-v4/abc_list_pressed_holo_light.9.png, -0, res/drawable-xhdpi-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-xhdpi-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-xhdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-xhdpi-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-xhdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/notification_bg_low_normal.9.png, -0, res/drawable-xhdpi-v4/notification_bg_low_pressed.9.png, -0, res/drawable-xhdpi-v4/notification_bg_normal.9.png, -0, res/drawable-xhdpi-v4/notification_bg_normal_pressed.9.png, -0, res/drawable-xxhdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-xxhdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-xxhdpi-v4/abc_cab_background_top_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_list_focused_holo.9.png, -0, res/drawable-xxhdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-xxhdpi-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-xxhdpi-v4/abc_list_pressed_holo_light.9.png, -0, res/drawable-xxhdpi-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-xxhdpi-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-xxhdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-xxhdpi-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-xxhdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, gif, -0, res/drawable-xxxhdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-xxxhdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-xxxhdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-xxxhdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-xxxhdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-xxxhdpi-v4/button_background.9.png, -0, res/drawable-xxxhdpi-v4/download_button.9.png, -0, res/drawable-xxxhdpi-v4/en_group.9.png, -0, jpg, -0, res/drawable-xxxhdpi-v4/toast.9.png, -0, res/drawable/base_action_bar_shadow.9.png, -0, res/drawable/schedule.9.png, -0, res/drawable/schedule_bg.9.png, -0, res/drawable/waiting_number.9.png, -0, arsc, -I, C:\Users\FRONTO~1\AppData\Local\Temp\1.apk, -S, c:\Windows\huawei\res, -M, c:\Windows\huawei\AndroidManifest.xml]

EDIT 2:

I tried now multiple apks and all of them worked just fine.

I have really no idea why this one keep failing.

I tried to decompile it (this worked) and then just build again and i keep getting this error.

EDIT2:

PROBLEM SOLVED! APKTool did some mess on the 9.png compression. Fixed it and the translation is almost done! Whooop