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

Android 7.1 resources not found. #1349

Closed
jchen10 opened this Issue Oct 21, 2016 · 7 comments

Comments

Projects
None yet
4 participants
@jchen10

jchen10 commented Oct 21, 2016

Information

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

Stacktrace/Logcat

java -jar apktool_2.2.1.jar d com.android.chrome_54.0.2840.68-284006800_minAPI16\(armeabi-v7a\)\(nodpi\)_apkmirror.com.apk -o Chromium
I: Using Apktool 2.2.1 on com.android.chrome_54.0.2840.68-284006800_minAPI16(armeabi-v7a)(nodpi)_apkmirror.com.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/wp/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...


java -jar apktool_2.2.1.jar b Chromium -o Chromium_unaligned.apk                   16-10-21 9:33
I: Using Apktool 2.2.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: /home/wp/tmp/Chromium/res/xml-v22/launchershortcuts.xml:4: error: No resource identifier found for attribute 'shortcutId' in package 'android'
W:
W: /home/wp/tmp/Chromium/res/xml-v22/launchershortcuts.xml:4: error: No resource identifier found for attribute 'shortcutShortLabel' in package 'android'
W:
W: /home/wp/tmp/Chromium/res/xml-v22/launchershortcuts.xml:7: error: No resource identifier found for attribute 'shortcutId' in package 'android'
W:
W: /home/wp/tmp/Chromium/res/xml-v22/launchershortcuts.xml:7: error: No resource identifier found for attribute 'shortcutShortLabel' in package 'android'
W:
W: /home/wp/tmp/Chromium/res/xml-v22/launchershortcuts.xml:7: error: No resource identifier found for attribute 'shortcutLongLabel' in package 'android'
W:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_2530067890940115126.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 25, --version-code, 284006800, --version-name, 54.0.2840.68, -F, /tmp/APKTOOL7059036875870996748.tmp, -0, arsc, -0, pak, -0, dat, -0, bin, -0, dex, -0, txt, -0, lib/armeabi-v7a/libchrome.1847.114.so, -0, lib/armeabi-v7a/libchrome.1916.122.so, -0, lib/armeabi-v7a/libchrome.1916.138.so, -0, lib/armeabi-v7a/libchrome.1916.141.so, -0, lib/armeabi-v7a/libchrome.1985.122.so, -0, lib/armeabi-v7a/libchrome.1985.128.so, -0, lib/armeabi-v7a/libchrome.1985.131.so, -0, lib/armeabi-v7a/libchrome.1985.135.so, -0, lib/armeabi-v7a/libchrome.2062.117.so, -0, lib/armeabi-v7a/libchrome.2125.102.so, -0, lib/armeabi-v7a/libchrome.2125.114.so, -0, lib/armeabi-v7a/libchrome.2171.37.so, -0, lib/armeabi-v7a/libchrome.2171.59.so, -0, so, -0, arsc, -I, /home/wp/.local/share/apktool/framework/1.apk, -S, /home/wp/tmp/Chromium/res, -M, /home/wp/tmp/Chromium/AndroidManifest.xml]
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
        at brut.androlib.Androlib.buildResources(Androlib.java:412)
        at brut.androlib.Androlib.build(Androlib.java:311)
        at brut.androlib.Androlib.build(Androlib.java:264)
        at brut.apktool.Main.cmdBuild(Main.java:227)
        at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_2530067890940115126.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 25, --version-code, 284006800, --version-name, 54.0.2840.68, -F, /tmp/APKTOOL7059036875870996748.tmp, -0, arsc, -0, pak, -0, dat, -0, bin, -0, dex, -0, txt, -0, lib/armeabi-v7a/libchrome.1847.114.so, -0, lib/armeabi-v7a/libchrome.1916.122.so, -0, lib/armeabi-v7a/libchrome.1916.138.so, -0, lib/armeabi-v7a/libchrome.1916.141.so, -0, lib/armeabi-v7a/libchrome.1985.122.so, -0, lib/armeabi-v7a/libchrome.1985.128.so, -0, lib/armeabi-v7a/libchrome.1985.131.so, -0, lib/armeabi-v7a/libchrome.1985.135.so, -0, lib/armeabi-v7a/libchrome.2062.117.so, -0, lib/armeabi-v7a/libchrome.2125.102.so, -0, lib/armeabi-v7a/libchrome.2125.114.so, -0, lib/armeabi-v7a/libchrome.2171.37.so, -0, lib/armeabi-v7a/libchrome.2171.59.so, -0, so, -0, arsc, -I, /home/wp/.local/share/apktool/framework/1.apk, -S, /home/wp/tmp/Chromium/res, -M, /home/wp/tmp/Chromium/AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:439)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:464)
        ... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_2530067890940115126.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 25, --version-code, 284006800, --version-name, 54.0.2840.68, -F, /tmp/APKTOOL7059036875870996748.tmp, -0, arsc, -0, pak, -0, dat, -0, bin, -0, dex, -0, txt, -0, lib/armeabi-v7a/libchrome.1847.114.so, -0, lib/armeabi-v7a/libchrome.1916.122.so, -0, lib/armeabi-v7a/libchrome.1916.138.so, -0, lib/armeabi-v7a/libchrome.1916.141.so, -0, lib/armeabi-v7a/libchrome.1985.122.so, -0, lib/armeabi-v7a/libchrome.1985.128.so, -0, lib/armeabi-v7a/libchrome.1985.131.so, -0, lib/armeabi-v7a/libchrome.1985.135.so, -0, lib/armeabi-v7a/libchrome.2062.117.so, -0, lib/armeabi-v7a/libchrome.2125.102.so, -0, lib/armeabi-v7a/libchrome.2125.114.so, -0, lib/armeabi-v7a/libchrome.2171.37.so, -0, lib/armeabi-v7a/libchrome.2171.59.so, -0, so, -0, arsc, -I, /home/wp/.local/share/apktool/framework/1.apk, -S, /home/wp/tmp/Chromium/res, -M, /home/wp/tmp/Chromium/AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:95)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:433)
        ... 6 more

Steps to Reproduce

  1. apktool
    Download the Chrome.apk from apkmirror, then run apktool d, and b without any change.

    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.
http://www.apkmirror.com/wp-content/themes/APKMirror/download.php?id=130027

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

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Oct 23, 2016

Owner

These are Android 7.1 resources. This will become the bug report to track Android 7.1 changes.

Owner

iBotPeaches commented Oct 23, 2016

These are Android 7.1 resources. This will become the bug report to track Android 7.1 changes.

@iBotPeaches iBotPeaches added this to the 2.2.2 - Bug Fixes milestone Oct 23, 2016

@iBotPeaches iBotPeaches self-assigned this Oct 23, 2016

@iBotPeaches iBotPeaches changed the title from The "No resource identifier found for attribute" still presents in the latest 2.2.1 to Android 7.1 resources not found. Oct 23, 2016

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Oct 23, 2016

Owner
➜  Bug1349 apktool empty-framework-dir --force
I: Removing 1.apk framework file...
➜  Bug1349 apktool d com.android.chrome_54.0.2840.68-284006800_minAPI16\(armeabi-v7a\)\(nodpi\)_apkmirror.com.apk
I: Using Apktool 2.2.2-7c6c7a-SNAPSHOT on com.android.chrome_54.0.2840.68-284006800_minAPI16(armeabi-v7a)(nodpi)_apkmirror.com.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  Bug1349 apktool b com.android.chrome_54.0.2840.68-284006800_minAPI16\(armeabi-v7a\)\(nodpi\)_apkmirror.com
I: Using Apktool 2.2.2-7c6c7a-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
➜  Bug1349 

With this commit - 7c6c7ab

Owner

iBotPeaches commented Oct 23, 2016

➜  Bug1349 apktool empty-framework-dir --force
I: Removing 1.apk framework file...
➜  Bug1349 apktool d com.android.chrome_54.0.2840.68-284006800_minAPI16\(armeabi-v7a\)\(nodpi\)_apkmirror.com.apk
I: Using Apktool 2.2.2-7c6c7a-SNAPSHOT on com.android.chrome_54.0.2840.68-284006800_minAPI16(armeabi-v7a)(nodpi)_apkmirror.com.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  Bug1349 apktool b com.android.chrome_54.0.2840.68-284006800_minAPI16\(armeabi-v7a\)\(nodpi\)_apkmirror.com
I: Using Apktool 2.2.2-7c6c7a-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
➜  Bug1349 

With this commit - 7c6c7ab

@jchen10

This comment has been minimized.

Show comment
Hide comment
@jchen10

jchen10 Oct 25, 2016

Verified with 2.2.2 snapshot build! Thanks!

jchen10 commented Oct 25, 2016

Verified with 2.2.2 snapshot build! Thanks!

@nicks258

This comment has been minimized.

Show comment
Hide comment
@nicks258

nicks258 Mar 27, 2017

i am using gradle version 2.3.0 but still it says Error:(2) No resource identifier found for attribute 'shortcutId' in package 'android' How to resolve this error.

i am using gradle version 2.3.0 but still it says Error:(2) No resource identifier found for attribute 'shortcutId' in package 'android' How to resolve this error.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 27, 2017

Owner

@nicks258 Did you even read this bug report? I literally posted the answer two responses above.

Owner

iBotPeaches commented Mar 27, 2017

@nicks258 Did you even read this bug report? I literally posted the answer two responses above.

@nicks258

This comment has been minimized.

Show comment
Hide comment
@nicks258

nicks258 Mar 28, 2017

sorry, my bad. Thanks for the response.

sorry, my bad. Thanks for the response.

@ljani

This comment has been minimized.

Show comment
Hide comment
@ljani

ljani Aug 28, 2017

In case anyone else gets here from google, I had this problem even after upgrading to v2.2.4. The solution was to run apktool empty-framework-dir --force before building.

ljani commented Aug 28, 2017

In case anyone else gets here from google, I had this problem even after upgrading to v2.2.4. The solution was to run apktool empty-framework-dir --force before building.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment