Apktool icon indicating copy to clipboard operation
Apktool copied to clipboard

(No resource found that matches the given name) decompiling / recompiling

Open ickacn opened this issue 6 years ago • 5 comments

I decompile Whoscall6.2 apk then recompile it again without any changes.

deompile :

H:\s>java -jar apktool_2.3.0.jar d -f h:\s\Whoscall.apk -o whoscall
I: Using Apktool 2.3.0 on Whoscall.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\user\AppData\Local\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

recompile :

H:\s>java -jar apktool_2.3.0.jar b whoscall -o whoscallfine.apk
I: Using Apktool 2.3.0
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: H:\s\whoscall\res\layout\lr.xml:14: error: Error: No resource found that matches the given name (at 'style' with value '@style/Font.TextSize.T3').
W:
W: H:\s\whoscall\res\layout\lr.xml:17: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/view_item_portal_place_item').
W:
W: H:\s\whoscall\res\layout\ls.xml:2: error: No resource identifier found for attribute 'cardBackgroundColor' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\ls.xml:2: error: No resource identifier found for attribute 'cardCornerRadius' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\ls.xml:2: error: No resource identifier found for attribute 'cardUseCompatPadding' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\ls.xml:2: error: No resource identifier found for attribute 'cardPreventCornerOverlap' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\ls.xml:8: error: Error: No resource found that matches the given name (at 'style' with value '@style/Font.TextSize.T1').
W:
W: H:\s\whoscall\res\layout\ls.xml:9: error: Error: No resource found that matches the given name (at 'style' with value '@style/Font.TextSize.T3').
W:
W: H:\s\whoscall\res\layout\lt.xml:24: error: No resource identifier found for attribute 'image_src' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\lt.xml:24: error: No resource identifier found for attribute 'text' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\lt.xml:25: error: No resource identifier found for attribute 'image_src' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\lt.xml:25: error: No resource identifier found for attribute 'text' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\lt.xml:26: error: No resource identifier found for attribute 'image_src' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\lt.xml:26: error: No resource identifier found for attribute 'text' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\lt.xml:29: error: No resource identifier found for attribute 'image_src' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\lt.xml:29: error: No resource identifier found for attribute 'text' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\lt.xml:30: error: No resource identifier found for attribute 'image_src' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\lt.xml:30: error: No resource identifier found for attribute 'text' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\lt.xml:36: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/dialpad_view').
W:
W: H:\s\whoscall\res\layout\lu.xml:5: error: Error: No resource found that matches the given name (at 'style' with value '@style/AudioChooser.Icon').
W:
W: H:\s\whoscall\res\layout\lu.xml:6: error: Error: No resource found that matches the given name (at 'style' with value '@style/AudioChooser.Text').
W:
W: H:\s\whoscall\res\layout\lu.xml:9: error: Error: No resource found that matches the given name (at 'style' with value '@style/AudioChooser.Icon').
W:
W: H:\s\whoscall\res\layout\lu.xml:10: error: Error: No resource found that matches the given name (at 'style' with value '@style/AudioChooser.Text').
W:
W: H:\s\whoscall\res\layout\lu.xml:13: error: Error: No resource found that matches the given name (at 'style' with value '@style/AudioChooser.Icon').
W:
W: H:\s\whoscall\res\layout\lu.xml:14: error: Error: No resource found that matches the given name (at 'style' with value '@style/AudioChooser.Text').
W:
W: H:\s\whoscall\res\layout\lu.xml:17: error: Error: No resource found that matches the given name (at 'style' with value '@style/AudioChooser.Icon').
W:
W: H:\s\whoscall\res\layout\lu.xml:18: error: Error: No resource found that matches the given name (at 'style' with value '@style/AudioChooser.Text').
W:
W: H:\s\whoscall\res\layout\lv.xml:5: error: Error: No resource found that matches the given name (at 'style' with value '@style/CustomProgressBar').
W:
W: H:\s\whoscall\res\layout\lw.xml:5: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/widget_small_header').
W:
W: H:\s\whoscall\res\layout\m.xml:5: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/abc_screen_content_include').
W:
W: H:\s\whoscall\res\layout-v17\m.xml:5: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/abc_screen_content_include').
W:
W: H:\s\whoscall\res\layout\m2.xml:7: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/yellow_page_tabs').
W:
W: H:\s\whoscall\res\layout\m8.xml:5: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/common_horizontal_divider_view').
W:
W: H:\s\whoscall\res\layout\m8.xml:7: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/common_horizontal_divider_view').
W:
W: H:\s\whoscall\res\layout\m8.xml:12: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/common_horizontal_divider_view').
W:
W: H:\s\whoscall\res\layout\m8.xml:17: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/common_horizontal_divider_view').
W:
W: H:\s\whoscall\res\layout\m8.xml:22: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/common_horizontal_divider_view').
W:
W: H:\s\whoscall\res\layout\m9.xml:33: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/yellow_page_tabs').
W:
W: H:\s\whoscall\res\layout-v16\m9.xml:33: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/yellow_page_tabs').
W:
W: H:\s\whoscall\res\layout-v11\mc.xml:4: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_template_icon_group').
W:
W: H:\s\whoscall\res\layout-v11\mc.xml:5: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_media_cancel_action').
W:
W: H:\s\whoscall\res\layout-v11\mc.xml:6: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_template_lines_media').
W:
W: H:\s\whoscall\res\layout-v17\mc.xml:4: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_template_icon_group').
W:
W: H:\s\whoscall\res\layout-v17\mc.xml:5: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_media_cancel_action').
W:
W: H:\s\whoscall\res\layout-v17\mc.xml:6: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_template_lines_media').
W:
W: H:\s\whoscall\res\layout-v11\md.xml:4: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_template_icon_group').
W:
W: H:\s\whoscall\res\layout-v11\md.xml:5: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_media_cancel_action').
W:
W: H:\s\whoscall\res\layout-v17\md.xml:4: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_template_icon_group').
W:
W: H:\s\whoscall\res\layout-v17\md.xml:5: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_media_cancel_action').
W:
W: H:\s\whoscall\res\layout-v11\me.xml:5: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_media_cancel_action').
W:
W: H:\s\whoscall\res\layout-v11\me.xml:6: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_template_lines_media').
W:
W: H:\s\whoscall\res\layout-v17\me.xml:5: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_media_cancel_action').
W:
W: H:\s\whoscall\res\layout-v17\me.xml:6: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_template_lines_media').
W:
W: H:\s\whoscall\res\layout-v11\mf.xml:5: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_media_cancel_action').
W:
W: H:\s\whoscall\res\layout-v17\mf.xml:5: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/notification_media_cancel_action').
W:
W: H:\s\whoscall\res\layout\t.xml:2: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.PopupMenuItem').
W:
W: H:\s\whoscall\res\layout\t.xml:4: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.PopupMenuItem.InternalGroup'
).
W:
W: H:\s\whoscall\res\layout\t.xml:5: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.PopupMenuItem.Text').
W:
W: H:\s\whoscall\res\layout\t.xml:6: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.PopupMenuItem.Text').
W:
W: H:\s\whoscall\res\layout-v17\t.xml:2: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.PopupMenuItem').
W:
W: H:\s\whoscall\res\layout-v17\t.xml:4: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.PopupMenuItem.InternalGr
oup').
W:
W: H:\s\whoscall\res\layout-v17\t.xml:5: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.PopupMenuItem.Text').
W:
W: H:\s\whoscall\res\layout-v17\t.xml:6: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.PopupMenuItem.Text').
W:
W: H:\s\whoscall\res\layout\v.xml:5: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/abc_screen_content_include').
W:
W: H:\s\whoscall\res\layout\w.xml:4: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/abc_screen_content_include').
W:
W: H:\s\whoscall\res\layout\x.xml:6: error: No resource identifier found for attribute 'navigationContentDescription' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout\x.xml:4: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/abc_screen_content_include').
W:
W: H:\s\whoscall\res\layout\x.xml:5: error: Error: No resource found that matches the given name (at 'style' with value '?attr/actionBarStyle').
W:
W: H:\s\whoscall\res\layout\x.xml:6: error: Error: No resource found that matches the given name (at 'style' with value '?attr/toolbarStyle').
W:
W: H:\s\whoscall\res\layout\x.xml:7: error: Error: No resource found that matches the given name (at 'style' with value '?attr/actionModeStyle').
W:
W: H:\s\whoscall\res\layout-v21\x.xml:6: error: No resource identifier found for attribute 'navigationContentDescription' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\layout-v21\x.xml:4: error: Error: No resource found that matches the given name (at 'layout' with value '@layout/abc_screen_content_include').
W:
W: H:\s\whoscall\res\layout-v21\x.xml:5: error: Error: No resource found that matches the given name (at 'style' with value '?attr/actionBarStyle').
W:
W: H:\s\whoscall\res\layout-v21\x.xml:6: error: Error: No resource found that matches the given name (at 'style' with value '?attr/toolbarStyle').
W:
W: H:\s\whoscall\res\layout-v21\x.xml:7: error: Error: No resource found that matches the given name (at 'style' with value '?attr/actionModeStyle').
W:
W: H:\s\whoscall\res\layout\y.xml:2: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.Search.DropDown').
W:
W: H:\s\whoscall\res\layout\y.xml:4: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.Search.DropDown.Icon1').
W:
W: H:\s\whoscall\res\layout\y.xml:5: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.Search.DropDown.Query').
W:
W: H:\s\whoscall\res\layout\y.xml:6: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.Search.DropDown.Icon2').
W:
W: H:\s\whoscall\res\layout\z.xml:5: error: Error: No resource found that matches the given name (at 'style' with value '?attr/actionButtonStyle').
W:
W: H:\s\whoscall\res\layout\z.xml:7: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.SearchView.MagIcon').
W:
W: H:\s\whoscall\res\layout-v17\z.xml:5: error: Error: No resource found that matches the given name (at 'style' with value '?attr/actionButtonStyle').
W:
W: H:\s\whoscall\res\layout-v17\z.xml:7: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.SearchView.MagIcon').
W:
W: H:\s\whoscall\res\animator-v21\a.xml:4: error: No resource identifier found for attribute 'state_collapsed' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\animator-v21\a.xml:4: error: No resource identifier found for attribute 'state_collapsible' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\xml\d.xml:2: error: Error: No resource found that matches the given name (at 'label' with value '@string/samsung_edge_title').
W:
W: H:\s\whoscall\res\xml\d.xml:2: error: Error: No resource found that matches the given name (at 'description' with value '@string/samsung_edge_description').
W:
W: H:\s\whoscall\res\xml\d.xml:2: error: Error: No resource found that matches the given name (at 'previewImage' with value '@drawable/bg_preview').
W:
W: H:\s\whoscall\res\color\ep.xml:4: error: No resource identifier found for attribute 'alpha' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\color\eq.xml:4: error: No resource identifier found for attribute 'alpha' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\color\f0.xml:4: error: No resource identifier found for attribute 'alpha' in package 'gogolook.callgogolook2'
Exception in thread "main" W:
brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\icka\AppData\Local\Temp\brut_util_Jar_36188171940
43395432.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 23, --version-code, 60200662, --version-name, 6.2, --no-version-vectors, -F, C:\Users\icka\AppDa
ta\Local\Temp\APKTOOL806700380592643484.tmp, -0, arsc, -0, arsc, -I, C:\Users\icka\AppData\Local\apktool\framework\1.apk, -S, H:\s\whoscall\res, -M, H:\s\whoscall\AndroidManifest.xml]
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:485)
        at brut.androlib.Androlib.buildResources(Androlib.java:419)
        at brut.androlib.Androlib.build(Androlib.java:318)
        at brut.androlib.Androlib.build(Androlib.java:270)
        at brut.apktool.Main.cmdBuild(Main.java:224)
        at brut.apktool.Main.main(Main.java:75)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\icka\AppData\Local\Temp\brut_util_Jar_3618817194043395432.tmp, p, --for
ced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 23, --version-code, 60200662, --version-name, 6.2, --no-version-vectors, -F, C:\Users\icka\AppData\Local\Temp\APKTOOL8
06700380592643484.tmp, -0, arsc, -0, arsc, -I, C:\Users\icka\AppData\Local\apktool\framework\1.apk, -S, H:\s\whoscall\res, -M, H:\s\whoscall\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:454)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:471)
        ... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\icka\AppData\Local\Temp\brut_util_Jar_3618817194043395432.tmp, p, --forced-package-id, 127, --min-sdk-ve
rsion, 15, --target-sdk-version, 23, --version-code, 60200662, --version-name, 6.2, --no-version-vectors, -F, C:\Users\icka\AppData\Local\Temp\APKTOOL806700380592643484.tmp, -0, arsc,
-0, arsc, -I, C:\Users\icka\AppData\Local\apktool\framework\1.apk, -S, H:\s\whoscall\res, -M, H:\s\whoscall\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:95)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:448)
        ... 6 more
W: H:\s\whoscall\res\color\f1.xml:4: error: No resource identifier found for attribute 'alpha' in package 'gogolook.callgogolook2'
W:
W: H:\s\whoscall\res\color\f2.xml:4: error: No resource identifier found for attribute 'alpha' in package 'gogolook.callgogolook2'
W:

………………

Information

  1. Apktool Version (apktool -version) - 2.3.0
  2. Operating System (Mac, Linux, Windows) - windows
  3. APK From? (Playstore, ROM, Other) - playstore

Stacktrace/Logcat

Include stacktrace here

Steps to Reproduce

  1. apktool

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)

APK

If this APK can be freely shared, please upload/attach a link to it. https://drive.google.com/open?id=14Ee3VhXX1of1ujXLa8uDzLHd1wBj6Cq-

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?
  3. Are you using the latest apktool version? Yes

ickacn avatar Nov 15 '17 18:11 ickacn

Sorry for the delay. I confirm this. I think this is a duplicate of another ticket, which has to do with invalid namespacing which leads to complete failure of resource identification.

However, I cannot find that ticket. So will confirm this one for now.

iBotPeaches avatar Nov 29 '17 13:11 iBotPeaches

any news regarding this?

fontanierh avatar Jan 18 '19 17:01 fontanierh

@fontanierh, I had performed a quick search and found that this was identified (by @iBotPeaches) as being either tied to AndResGuard or DexProtector.

I believe that iBotPeaches may have been referring to the https://github.com/iBotPeaches/Apktool/issues/1423 issue but, I can't be 100% sure.

Just as a suggestion, I'm wondering if the solution from the https://github.com/iBotPeaches/Apktool/issues/1905#issuecomment-426111019 may also be tied this as well and, if so, maybe it could be helpful for you.

I doubt that iBotPeaches had stated this as being a duplicate of another issue and is ignoring it.

Good Luck! :-)

~Ibuprophen

Ibuprophen avatar Jan 18 '19 22:01 Ibuprophen

I replicate this. Adding bug.

iBotPeaches avatar Nov 29 '20 13:11 iBotPeaches

Use the -r flag when decompiling the apk

 apktool -r d demo.apk

Retr02332 avatar May 13 '22 02:05 Retr02332