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

Apktool fails building "Exception in thread "main" brut.androlib.AndrolibException" #1454

Closed
elichai opened this issue Mar 21, 2017 · 2 comments

Comments

@elichai
Copy link

elichai commented Mar 21, 2017

Information

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

Stacktrace/Logcat

I: Using Apktool 2.2.2
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
W: /home/elichai2/apktool/Gmail2/res/xml-v22/shortcuts.xml:4: error: No resource identifier found for attribute 'shortcutId' in package 'android'
W: 
W: /home/elichai2/apktool/Gmail2/res/xml-v22/shortcuts.xml:4: error: No resource identifier found for attribute 'shortcutShortLabel' 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_6356984850778804409.tmp, p, --forced-package-id, 127, --min-sdk-version, 14, --target-sdk-version, 25, --version-code, 58570413, --version-name, 6.10.9.138660241.release, --no-version-vectors, -F, /tmp/APKTOOL2740721461581814930.tmp, -0, arsc, -0, opng, -0, webp, -0, html, -0, arsc, -I, /home/elichai2/.local/share/apktool/framework/1.apk, -S, /home/elichai2/apktool/Gmail2/res, -M, /home/elichai2/apktool/Gmail2/AndroidManifest.xml]
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:477)
        at brut.androlib.Androlib.buildResources(Androlib.java:411)
        at brut.androlib.Androlib.build(Androlib.java:310)
        at brut.androlib.Androlib.build(Androlib.java:263)
        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_6356984850778804409.tmp, p, --forced-package-id, 127, --min-sdk-version, 14, --target-sdk-version, 25, --version-code, 58570413, --version-name, 6.10.9.138660241.release, --no-version-vectors, -F, /tmp/APKTOOL2740721461581814930.tmp, -0, arsc, -0, opng, -0, webp, -0, html, -0, arsc, -I, /home/elichai2/.local/share/apktool/framework/1.apk, -S, /home/elichai2/apktool/Gmail2/res, -M, /home/elichai2/apktool/Gmail2/AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:440)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:463)
        ... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_6356984850778804409.tmp, p, --forced-package-id, 127, --min-sdk-version, 14, --target-sdk-version, 25, --version-code, 58570413, --version-name, 6.10.9.138660241.release, --no-version-vectors, -F, /tmp/APKTOOL2740721461581814930.tmp, -0, arsc, -0, opng, -0, webp, -0, html, -0, arsc, -I, /home/elichai2/.local/share/apktool/framework/1.apk, -S, /home/elichai2/apktool/Gmail2/res, -M, /home/elichai2/apktool/Gmail2/AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:95)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:434)
        ... 6 more

Steps to Reproduce

  1. apktool d Gmail2.apk
  2. apktool if framework-res.apk
  3. apktool b Gmail2

Frameworks

https://goo.gl/2mOCh2

APK

https://goo.gl/xJt2WS

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? not modified.
  3. Are you using the latest apktool version? yes.
@elichai
Copy link
Author

elichai commented Mar 24, 2017

So @iBotPeaches helped me fix this.
So apktool got an internal framework, so I should've used that and not my OEM one.
so running apktool empty-framework-directory --force fixed this :)

@elichai elichai closed this as completed Mar 24, 2017
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
@elichai and others