Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: No resource found that matches the given name: attr #2365

Closed
ghost opened this issue Jun 15, 2020 · 2 comments
Closed

Error: No resource found that matches the given name: attr #2365

ghost opened this issue Jun 15, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 15, 2020

Information

  1. Apktool Version (apktool -version) 2.4.1
  2. Operating System (Mac, Linux, Windows) Windows 10 1909
  3. APK From? (Playstore, ROM, Other) Playstore

Stacktrace/Logcat

java -jar apktool_2.4.1.jar b file-manager_1.8
I: Using Apktool 2.4.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: E:\\file-manager_1.8\res\values\styles.xml:1336: error: Error: No resource found that matches the given name: attr '@android:bool/config_use_sim_language_file'.
W:
W: E:\\file-manager_1.8\res\values\styles.xml:1337: error: Error: No resource found that matches the given name: attr '@android:bool/config_use_strict_phone_number_comparation'.
W:
W: E:\\file-manager_1.8\res\values-v21\styles.xml:186: error: Error: No resource found that matches the given name: attr '@android:bool/config_use_sim_language_file'.
W:
W: E:\\file-manager_1.8\res\values-v21\styles.xml:187: error: Error: No resource found that matches the given name: attr '@android:bool/config_use_strict_phone_number_comparation'.
W:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\evildog1\AppData\Local\Temp\brut_util_Jar_8015305493712467435.tmp, p, --forced-package-id, 127, --min-sdk-version, 17, --target-sdk-version, 28, --version-code, 9, --version-name, 1.8, --no-version-vectors, -F, C:\Users\evildog1\AppData\Local\Temp\APKTOOL6967098957294477000.tmp, -e, C:\Users\evildog1\AppData\Local\Temp\APKTOOL586482507562542425.tmp, -0, arsc, -I, C:\Users\evildog1\AppData\Local\apktool\framework\1.apk, -S, E:\\file-manager_1.8\res, -M, E:\\file-manager_1.8\AndroidManifest.xml]

Steps to Reproduce

  1. java -jar apktool_2.4.1.jar d file-manager_1.8.apk
  2. java -jar apktool_2.4.1.jar b file-manager_1.8

Frameworks

No and I cleared the framework since this is not a system app

APK

https://apkcombo.com/file-manager/com.File.manager/

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? N/A
  3. Are you using the latest apktool version? Yes
@Ticklefish
Copy link

Those resources have got to have come from a framework file at some point. Since you haven't got that file (I looked in AOSP framework-res.apk - they're not there either) you'll probably have to put the resources into your bools.xml and edit the lines mentioned in the error message manually.

A bit annoying but relatively straightforward and it'll let the file recompile. The only problem is that you don't know whether these bools are meant to be set to true or false or a mix of both. So the app might not function 100% correctly.
If that happens, just change the values and try again.

I did some Googling for these resources and I think they might come from a Pixel resource app, but I don't know for sure. You could try downloading some system dumps and installing different files but that could take a while.

@iBotPeaches
Copy link
Owner

Can't replicate this. If anything I get:

W: /home/ibotpeaches/Downloads/Apktool/2365/file-manager_2.1.2/res/values/styles.xml:1568: error: style attribute 'android:attr/windowFixedWidthMajor' is private.
W: /home/ibotpeaches/Downloads/Apktool/2365/file-manager_2.1.2/res/values/styles.xml:1569: error: style attribute 'android:attr/windowFixedWidthMinor' is private.

Which just points to using private resources which is frowned upon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants