Apktool
Apktool copied to clipboard
Webview - "no resource found" for attrs
Information
- Apktool Version (
apktool -version) - the latest v2.3.4 - Operating System (Mac, Linux, Windows) - Windows
- APK From? (Playstore, ROM, Other) - Playstore
Stacktrace/Logcat
D:\anti-compile>D:\anti-compile\apktool.bat b webview_57.0.2987.108
I: Using Apktool 2.3.4
I: Copying webview_57.0.2987.108 classes.dex file...
I: Checking whether resources has changed...
I: Building resources...
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:66: error: Publicsymbol attr/actionBarSize declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:227: error: Public symbol attr/backgroundTintMode declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:215: error: Public symbol attr/buttonGravity declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:237: error: Public symbol attr/buttonSize declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:162: error: Public symbol attr/buttonTintMode declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:238: error: Public symbol attr/colorScheme declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:8: error: Public symbol attr/displayOptions declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:234: error: Public symbol attr/imageAspectRatioAdjust declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:7: error: Public symbol attr/navigationMode declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:174: error: Public symbol attr/showAsAction declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:172: error: Public symbol attr/showDividers declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:196: error: Public symbol attr/thumbTintMode declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:44: error: Public symbol attr/tickMarkTintMode declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values\public.xml:199: error: Public symbol attr/trackTintMode declared here is not defined.
W: D:\anti-compile\webview_57.0.2987.108\res\values-v21\styles.xml:150: error: Error: No resource found that matches the given name: attr '@attr/actionBarSize'.
W:
W: D:\anti-compile\webview_57.0.2987.108\res\values-v21\styles.xml:188: error: Error: No resource found that matches the given name: attr '@attr/actionBarSize'.
W:
W: D:\anti-compile\webview_57.0.2987.108\res\values\styles.xml:656: error: Error: No resource found that matches the given name: attr '@attr/actionBarSize'.
W:
W: D:\anti-compile\webview_57.0.2987.108\res\values\styles.xml:788: error: Error: No resource found that matches the given name: attr '@attr/actionBarSize'.
W:
W: D:\anti-compile\webview_57.0.2987.108\res\values\styles.xml:931: error: Error: No resource found that matches the given name: attr '@attr/displayOptions'.
W:
W: D:\anti-compile\webview_57.0.2987.108\res\values\styles.xml:954: error: Error: No resource found that matches the given name: attr '@attr/showDividers'.
W:
W: D:\anti-compile\webview_57.0.2987.108\res\values\styles.xml:967: error: Error: No resource found that matches the given name: attr '@attr/showDividers'.
W:
W: D:\anti-compile\webview_57.0.2987.108\res\values\styles.xml:1037: error: Error: No resource found that matches the given name: attr '@attr/buttonGravity'.
W:brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\LUXIAO~1\AppData\Local\Temp\brut_util_Jar_7161397324008131143.tmp, p, --shared-lib, --min-sdk-version, 21, --target-sdk-version, 25, --version-code, 298710800, --version-name, 57.0.2987.108, --no-version-vectors, -F, C:\Users\LUXIAO~1\AppData\Local\Temp\APKTOOL2199737713723512238.tmp, -x, -0, arsc, -0, pak, -0, dat, -0, bin, -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/bubble.9.png, -0, res/drawable-hdpi-v4/dropdown_popup_background_down.9.png, -0, res/drawable-hdpi-v4/dropdown_popup_background_up.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-hdpi-v4/ondemand_overlay.9.png, -0, res/drawable-ldrtl-hdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-ldrtl-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-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, res/drawable-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-v4/abc_cab_background_top_mtrl_alpha.9.png, -0, res/drawable-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-v4/abc_list_focused_holo.9.png, -0, res/drawable-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-v4/abc_list_pressed_holo_light.9.png, -0, res/drawable-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-v4/abc_textfield_search_activated_mtrl_alpha.9.png, -0, res/drawable-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, res/drawable-v4/notification_bg_low_normal.9.png, -0, res/drawable-v4/notification_bg_low_pressed.9.png, -0, res/drawable-v4/notification_bg_normal.9.png, -0, res/drawable-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/bubble.9.png, -0, res/drawable-xhdpi-v4/dropdown_popup_background_down.9.png, -0, res/drawable-xhdpi-v4/dropdown_popup_background_up.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-xhdpi-v4/ondemand_overlay.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, 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/bubble.9.png, -0, res/drawable/dropdown_popup_background_down.9.png, -0, res/drawable/dropdown_popup_background_up.9.png, -0, res/drawable/ondemand_overlay.9.png, -0, wav, -0, arsc, -I, C:\Users\luxiaofeng\AppData\Local\apktool\framework\1.apk, -S, D:\anti-compile\webview_57.0.2987.108\res, -M, D:\anti-compile\webview_57.0.2987.108\AndroidManifest.xml]
Steps to Reproduce
- apktool d webview.apk
- apktool b webview
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)
Nope, no OEM ROM apk
APK
If this APK can be freely shared, please upload/attach a link to it. https://www.apkmirror.com/uploads/page/4/?q=android-system-webview
I have tried and it seems the version before [Android System WebView 56.0.2924.87] is OK(can be built successfully), and the version after [Android System WebView 57.0.2987.108] is NG(above error)
Questions to ask before submission
- Have you tried
apktool d,apktool bwithout changing anything? - Yes. This is how to reproduce - If you are trying to install a modified apk, did you resign it? - doesn't build so cant resign
- Are you using the latest apktool version?yes
Others:
- I have seen the related issue #1840 #1376 #1780 #1817, but can not fix the problem using [apktool empty-framework-dir --force]
- this apk is andorid system webview which is an android system component https://play.google.com/store/apps/details?id=com.google.android.webview
I am facing with same issue on Macos Mojave , it can decompile and recompile some apps successfully but with apps which recently updated, it was failed. Is this a bug?
I can duplicate this.
@iBotPeaches I hope this will be fixed soon, I needed to change an apk and get the same problem...
Keep up the great work and thanks!
@lxf-sole look at my last reply in my issue that I resolved;
https://github.com/iBotPeaches/Apktool/issues/1965#issuecomment-450761101
What I suggest is trying these steps.
Make sure where ever the frameworks are being store, that this directory is cleaned out before running these commands.
apktool if framework-res.apk - you probably need the framework from your phone
apktool d webview.apk
apktool b webview
Now does it compile? If this works try using the new webview.apk in the dist directory, if it doesn't work, then take the resources.arsc from build directory and add it into the original webview.apk with any Zip archive tool like Winrar, 7zip, then see if it boots up now in the system and works.
You also might not be able to sign it, but you can try, I couldn't sign the Settings.apk, or else it wouldn't work.
Hope this helps!
@0pLuS0
I have tried your steps but it seems not have effect.
I picked up framework-res.apk from \system\framework and run command [apktool if framework-res.apk], and the message [Framework installed to: C:\Users\xxx\AppData\Local\apktool\framework\1.apk] was shown on cmd. Is this message right? and if you could tell me, what's the effect of this command?
after run [apktool b webview] command ,there is no resources.arsc in the build directory so I think it was not created due to the error message I issued
@lxfsole some apps need the frameworks, and for the location it's installed, it's fine.
Upload the webview and framework apk you are working on somewhere I can download them and I will try them on my computer...
@0pLuS0
webview.apk can be downloaded from google play. https://play.google.com/store/apps/details?id=com.google.android.webview&hl=en
And I downloaded old version from below websites. https://www.apkmirror.com/uploads/page/4/?q=android-system-webview
And I think any framework could be used.