Apktool: Error when rebuild apk "error: No resource identifier found for attribute"

Created on 30 Jan 2017  Â·  2Comments  Â·  Source: iBotPeaches/Apktool

Information

  1. Apktool Version (2.2.2`) -
  2. Operating System (Windows 10) -
  3. APK From? (https://ibotpeaches.github.io/Apktool/) -

Stacktrace/Logcat

 C:\apktool\com.appstar.callrecorderpro-5.24\res\xml-v22\shortcuts.xml:4: error: No resource identifier found for attribute 'shortcutShortLabel' in package 'android'
Exception in thread "main" W:
brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Patto\AppData\Local\Temp\brut_util_Jar_6231941907125005760.tmp, p, --forced-package-id, 127, --min-sdk-version, 9, --target-sdk-version, 25, --version-code, 107, --version-name, 5.24, --no-version-vectors, -F, C:\Users\Patto\AppData\Local\Temp\APKTOOL3319633768955955221.tmp, -0, arsc, -0, arsc, -I, C:\Users\Patto\AppData\Local\apktool\framework\1.apk, -S, C:\apktool\com.appstar.callrecorderpro-5.24\res, -M, C:\apktool\com.appstar.callrecorderpro-5.24\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): [C:\Users\Patto\AppData\Local\Temp\brut_util_Jar_6231941907125005760.tmp, p, --forced-package-id, 127, --min-sdk-version, 9, --target-sdk-version, 25, --version-code, 107, --version-name, 5.24, --no-version-vectors, -F, C:\Users\Patto\AppData\Local\Temp\APKTOOL3319633768955955221.tmp, -0, arsc, -0, arsc, -I, C:\Users\Patto\AppData\Local\apktool\framework\1.apk, -S, C:\apktool\com.appstar.callrecorderpro-5.24\res, -M, C:\apktool\com.appstar.callrecorderpro-5.24\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): [C:\Users\Patto\AppData\Local\Temp\brut_util_Jar_6231941907125005760.tmp, p, --forced-package-id, 127, --min-sdk-version, 9, --target-sdk-version, 25, --version-code, 107, --version-name, 5.24, --no-version-vectors, -F, C:\Users\Patto\AppData\Local\Temp\APKTOOL3319633768955955221.tmp, -0, arsc, -0, arsc, -I, C:\Users\Patto\AppData\Local\apktool\framework\1.apk, -S, C:\apktool\com.appstar.callrecorderpro-5.24\res, -M, C:\apktool\com.appstar.callrecorderpro-5.24\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 com.appstar.callrecorderpro-5.24.apk
  2. apktool b com.appstar.callrecorderpro-5.24

### Frameworks
OEM Alexis ROM (Samsung S6 G920F). https://1fichier.com/?fa0eysphf5
(apk/system/framework)

### APK
Automatic Call Recorder https://1fichier.com/?odn2hw531i

### 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 same
  3. Are you using the latest apktool version ? yes version 2.2.2

Hello,
I just want to change the colors of the application, and I still have this error when I rebuild.
I almost found a solution but the decompilation does not display the files "values"
if i do apktool d --no-res automatic-call-recorder.apk and then apktool b automatic-call-recorder
the rebuild work with a fatal error seems to be not important, not sure...

C:\apktool>apktool b com.appstar.callrecorderpro-5.24.apk
I: Using Apktool 2.2.2
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
        at brut.androlib.Androlib.readMetaFile(Androlib.java:258)
        at brut.androlib.Androlib.build(Androlib.java:270)
        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.directory.PathNotExist: apktool.yml
        at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:105)
        at brut.androlib.Androlib.readMetaFile(Androlib.java:254)
        ... 4 more

C:\apktool>apktool b com.appstar.callrecorderpro-5.24
I: Using Apktool 2.2.2
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
**[Fatal Error] AndroidManifest.xml:1:1: Content is not allowed in prolog.**
I: Checking whether resources has changed...
I: Copying raw resources...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...

C:\apktool>

Thank you so much for your help ;)

Most helpful comment

➜  Bug1421 apktool d callrecorder.apk 
I: Using Apktool 2.2.3-bd62f7-SNAPSHOT on callrecorder.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /Users/connortumbleson/Library/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...
➜  Bug1421 apktool b callrecorder
I: Using Apktool 2.2.3-bd62f7-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...
➜  Bug1421 

Hey sorry for the delay on this. Lost track of this ticket and a lot of time has passed. I went ahead and found this apk online (since download link was dead) and gave it a quick decode and rebuild and all worked as expected.

My guess is that your framework is out of date. Ensure you run apktool empty-framework-dir --force if you decide to get this another shot.

All 2 comments

Hello thank's, but doesn't work.

➜  Bug1421 apktool d callrecorder.apk 
I: Using Apktool 2.2.3-bd62f7-SNAPSHOT on callrecorder.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /Users/connortumbleson/Library/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...
➜  Bug1421 apktool b callrecorder
I: Using Apktool 2.2.3-bd62f7-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...
➜  Bug1421 

Hey sorry for the delay on this. Lost track of this ticket and a lot of time has passed. I went ahead and found this apk online (since download link was dead) and gave it a quick decode and rebuild and all worked as expected.

My guess is that your framework is out of date. Ensure you run apktool empty-framework-dir --force if you decide to get this another shot.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ibuprophen picture Ibuprophen  Â·  3Comments

eriklu picture eriklu  Â·  3Comments

jpsachse picture jpsachse  Â·  3Comments

LeeDroid- picture LeeDroid-  Â·  3Comments

alexeikh picture alexeikh  Â·  3Comments