[Q] Error Recompiling CM11's SystemUI.apk - Android Q&A, Help & Troubleshooting

Hey guys, as I don't have proper access to a PC I relay on my phone for everything & I have Micromax Canvas A1 running official CM11 nightly if you wanted to know. Today I wanted to add this mod in my phone. So, first I decompiled my systemui using android apktool v4.4 & I got some error at first, but I fixed it by using use framework option present in apktool & I edited all xmls accordingly to the guide. Later when I tried to recompile I'm getting this error:
Code:
/sdcard/SystemUI_src/res/values/styles.xml:18: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.StatusBar'.
/sdcard/SystemUI_src/res/values/styles.xml:19: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.StatusBar'.
/sdcard/SystemUI_src/res/values/styles.xml:24: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.StatusBar'.
/sdcard/SystemUI_src/res/values/styles.xml:44: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.StatusBar'.
/sdcard/SystemUI_src/res/values/styles.xml:126: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.StatusBar.Ticker'.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/lix/aapt4.4, p, --min-sdk-version, 19, --target-sdk-version, 19, --version-code, 19, --version-name, 4.4.4-a26cd1cc02, -F, /data/data/per.pqy.apktool/APKTOOL7997562150152865281.tmp, -0, arsc, -I, ?/apktool/framework/1.apk, -S, /sdcard/SystemUI_src/res, -M, /sdcard/SystemUI_src/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:434)
at brut.androlib.Androlib.buildResources(Androlib.java:362)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:233)
at brut.apktool.Main.main(Main.java:88)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/lix/aapt4.4, p, --min-sdk-version, 19, --target-sdk-version, 19, --version-code, 19, --version-name, 4.4.4-a26cd1cc02, -F, /data/data/per.pqy.apktool/APKTOOL7997562150152865281.tmp, -0, arsc, -I, ?/apktool/framework/1.apk, -S, /sdcard/SystemUI_src/res, -M, /sdcard/SystemUI_src/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:481)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:415)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/lix/aapt4.4, p, --min-sdk-version, 19, --target-sdk-version, 19, --version-code, 19, --version-name, 4.4.4-a26cd1cc02, -F, /data/data/per.pqy.apktool/APKTOOL7997562150152865281.tmp, -0, arsc, -I, ?/apktool/framework/1.apk, -S, /sdcard/SystemUI_src/res, -M, /sdcard/SystemUI_src/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:475)
... 6 more
I: Using Apktool 2.0.0-Beta7 on SystemUI_src
I: Smaling...
I: Building resources...
Somebody please help me with this...

Did you install all the frameworks? It looks like you also need to install the systemui apk. Just a heads up. You are gonna get issues with only trying to do this on your phone.

zelendel said:
Did you install all the frameworks? It looks like you also need to install the systemui apk. Just a heads up. You are gonna get issues with only trying to do this on your phone.
Click to expand...
Click to collapse
There's no other frameworks as it's CM & I even tried installing systemui as framework, but still no luck And as I said before I don't have PC...

ghpranav said:
There's no other frameworks as it's CM & I even tried installing systemui as framework, but still no luck And as I said before I don't have PC...
Click to expand...
Click to collapse
Ok well then I am not sure what to tell you at this point. When I said other base frameworks I meant that both the framework res and system ui are base os frameworks.
What I would do is install both of those and then redecompile, make your edits and then recompile and see what happens.

You are doing some mistakes in styles.xml file. Check these lines in styles.xml. There are mistakes.
Line no.-
18
19
24
44
126

ANKIT RAWAT said:
You are doing some mistakes in styles.xml file. Check these lines in styles.xml. There are mistakes.
Line no.-
18
19
24
44
126
Click to expand...
Click to collapse
Thanks dude, will check it out, but I haven't edited anything in it much, I just added 2-3 lines at the end, everything else is kept constant...

Adding unusual lines of code can unbalace the flow of code, so it give error, dont change sequence of codes. Just do a simple edit and if you want to add extra line of codes then add at last of the XML file.
Thanks

ANKIT RAWAT said:
Adding unusual lines of code can unbalace the flow of code, so it give error, dont change sequence of codes. Just do a simple edit and if you want to add extra line of codes then add at last of the XML file.
Thanks
Click to expand...
Click to collapse
I just checked out those lines, & the common thing in those lines was:
Code:
parent="@android:style/TextAppearance.StatusBar"
And I just now realized that I haven't not at all edited anything in styles.xml...

zelendel said:
What I would do is install both of those and then redecompile, make your edits and then recompile and see what happens.
Click to expand...
Click to collapse
Hey bro, I did same as you told, installed both frameworks ( framework-res & systemui), redecompiled, made changes & when I tried to recompile I'm getting save error again, but there's little difference:
/sdcard/SystemUI_src/res/values/styles.xml:18: ]error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.StatusBar'.
/sdcard/SystemUI_src/res/values/styles.xml:19: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.StatusBar'.
/sdcard/SystemUI_src/res/values/styles.xml:24: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.StatusBar'.
/sdcard/SystemUI_src/res/values/styles.xml:44: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.StatusBar'.
/sdcard/SystemUI_src/res/values/styles.xml:126: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.StatusBar.Ticker'.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/lix/aapt4.4, p, --min-sdk-version, 19, --target-sdk-version, 19, --version-code, 19, --version-name, 4.4.4-a26cd1cc02, -F, /data/data/per.pqy.apktool/APKTOOL2592047250762465412.tmp, -0, arsc, -I, ?/apktool/framework/1.apk, -S, /sdcard/SystemUI_src/res, -M, /sdcard/SystemUI_src/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:434)
at brut.androlib.Androlib.buildResources(Androlib.java:362)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:233)
at brut.apktool.Main.main(Main.java:88)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/lix/aapt4.4, p, --min-sdk-version, 19, --target-sdk-version, 19, --version-code, 19, --version-name, 4.4.4-a26cd1cc02, -F, /data/data/per.pqy.apktool/APKTOOL2592047250762465412.tmp, -0, arsc, -I, ?/apktool/framework/1.apk, -S, /sdcard/SystemUI_src/res, -M, /sdcard/SystemUI_src/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:481)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:415)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/lix/aapt4.4, p, --min-sdk-version, 19, --target-sdk-version, 19, --version-code, 19, --version-name, 4.4.4-a26cd1cc02, -F, /data/data/per.pqy.apktool/APKTOOL2592047250762465412.tmp, -0, arsc, -I, ?/apktool/framework/1.apk, -S, /sdcard/SystemUI_src/res, -M, /sdcard/SystemUI_src/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:475)
... 6 more
I: Using Apktool 2.0.0-Beta7 on SystemUI_src
I: Smaling...
I: Building resources...
Click to expand...
Click to collapse

Related

[Q] Need help interpreting logs: compilation error

Hey there,
I recently started modding the stock 4.2.1 Gmail app to make it inverted with red accents and I'm running into errors when trying to compile. The only changes I've made were on /res/values/colors.xml (changing color hex values only, standard stuff). I'm using APK multitools, have my framework in proper dir, using option 12 (compile non-system APK)...
Running custom TouchWiz 4.1.1 ROM on Galaxy S3 T999
Here are the logs:
--------------------------------------------------------------------------
|2013-03-01 -- 15:23:15.81|
--------------------------------------------------------------------------
java version "1.7.0_15"
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
C:\Android\adt-bundle-windows-x86_64-20130219\other\..\projects\com.google.andro
id.gm-1.apk\res\xml\gmail_widget_info.xml:2: error: No resource identifier found
for attribute 'widgetCategory' in package 'android'
C:\Android\adt-bundle-windows-x86_64-20130219\other\..\projects\com.google.andro
id.gm-1.apk\res\xml-sw600dp\gmail_widget_info.xml:2: error: No resource identifi
er found for attribute 'widgetCategory' in package 'android'
C:\Android\adt-bundle-windows-x86_64-20130219\other\..\projects\com.google.andro
id.gm-1.apk\res\xml\widget_info.xml:2: error: No resource identifier found for a
ttribute 'widgetCategory' in package 'android'
C:\Android\adt-bundle-windows-x86_64-20130219\other\..\projects\com.google.andro
id.gm-1.apk\res\xml-sw600dp\widget_info.xml:2: error: No resource identifier fou
nd for attribute 'widgetCategory' in package 'android'
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 14, --target-sdk-version, 17, -F, C:\Users\Pascal\AppData\Local\Tem
p\APKTOOL8546294447776939075.tmp, -0, arsc, -I, C:\Users\Pascal\apktool\framewor
k\1.apk, -S, C:\Android\adt-bundle-windows-x86_64-20130219\other\..\projects\com
.google.android.gm-1.apk\res, -M, C:\Android\adt-bundle-windows-x86_64-20130219\
other\..\projects\com.google.android.gm-1.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 17, -F, C:
\Users\Pascal\AppData\Local\Temp\APKTOOL8546294447776939075.tmp, -0, arsc, -I, C
:\Users\Pascal\apktool\framework\1.apk, -S, C:\Android\adt-bundle-windows-x86_64
-20130219\other\..\projects\com.google.android.gm-1.apk\res, -M, C:\Android\adt-
bundle-windows-x86_64-20130219\other\..\projects\com.google.android.gm-1.apk\And
roidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 14, --target-sdk-version, 17, -F, C:\Users\Pascal\AppData\Local\Temp\
APKTOOL8546294447776939075.tmp, -0, arsc, -I, C:\Users\Pascal\apktool\framework\
1.apk, -S, C:\Android\adt-bundle-windows-x86_64-20130219\other\..\projects\com.g
oogle.android.gm-1.apk\res, -M, C:\Android\adt-bundle-windows-x86_64-20130219\ot
her\..\projects\com.google.android.gm-1.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
Press any key to continue . . .
Anybody knows what could be going on here? Thanks!
EDIT: for each of the problematic XML files, the attribute 'widgetCategory' has a value of 0x3...would that be normal?? Would I need a 4.2.1 framework to compile this 4.2.1 Gmail apk (don't think this would necessarily make sense...)?
Found problem to this issue!
Solution was to remove lines for attribute 'widgetCategory' for:
\res\xml\gmail_widget_info.xml
\res\xml-sw600dp\gmail_widget_info.xml
res\xml\widget_info.xml
\res\xml-sw600dp\widget_info.xml
Recompiled without any errors, couldn't find any impact on functionality!

decompiling/compiling error[framework files missing]

hey,i am trying to decompile contacts.apk from my micromax a52.
i tried from apk manager and apk multi tools but it is giving error
Code:
can't find framework resources for package of id:2.you must install proper framework files.
now i installed framework files to my computer and also by using "pull dependencies from device".
but still couldn't decompile it properly.it is also giving error during recompiling if i ignore those error and mod it.
Code:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 10, -F, C:\Users\aman\AppData\Local\Temp\APKTOOL2048703324560073052.tmp, -0, arsc, -I, C:\Users\aman\apktool\framework\1.apk, -S, C:\APK-Multi-Tool\other\..\projects\Contacts.apk\res, -M, C:\APK-Multi-Tool\other\..\projects\Contacts.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 10, -F, C:\Users\aman\AppData\Local\Temp\APKTOOL2048703324560073052.tmp, -0, arsc, -I, C:\Users\aman\apktool\framework\1.apk, -S, C:\APK-Multi-Tool\other\..\projects\Contacts.apk\res, -M, C:\APK-Multi-Tool\other\..\projects\Contacts.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 10, -F, C:\Users\aman\AppData\Local\Temp\APKTOOL2048703324560073052.tmp, -0, arsc, -I, C:\Users\aman\apktool\framework\1.apk, -S, C:\APK-Multi-Tool\other\..\projects\Contacts.apk\res, -M, C:\APK-Multi-Tool\other\..\projects\Contacts.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
plsss someone give a helping hand.
Have sdk installed and then try again.I could not help with apkmulti tools but in original apktool,you can install frameworks with
Code:
java -jar apktool.jar if framework-apk
Sent from my GT-N7000 using xda app-developers app
already installed framework!!
vijai2011 said:
Have sdk installed and then try again.I could not help with apkmulti tools but in original apktool,you can install frameworks with
Code:
java -jar apktool.jar if framework-apk
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
have already installed framework from my phone from which that app is taken.
amank22 said:
have already installed framework from my phone from which that app is taken.
Click to expand...
Click to collapse
If its a samsung phone,did yoh also install twframework-res.apk?And htc also has 1 more framework but I don't know what it is as I have never owned a htc or modded one.Also have sdk?
Sent from my GT-N7000 using xda app-developers app
amank22 said:
hey,i am trying to decompile contacts.apk from my micromax a52.
i tried from apk manager and apk multi tools but it is giving error
Code:
can't find framework resources for package of id:2.you must install proper framework files.
now i installed framework files to my computer and also by using "pull dependencies from device".
but still couldn't decompile it properly.it is also giving error during recompiling if i ignore those error and mod it.
Code:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 10, -F, C:\Users\aman\AppData\Local\Temp\APKTOOL2048703324560073052.tmp, -0, arsc, -I, C:\Users\aman\apktool\framework\1.apk, -S, C:\APK-Multi-Tool\other\..\projects\Contacts.apk\res, -M, C:\APK-Multi-Tool\other\..\projects\Contacts.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 10, -F, C:\Users\aman\AppData\Local\Temp\APKTOOL2048703324560073052.tmp, -0, arsc, -I, C:\Users\aman\apktool\framework\1.apk, -S, C:\APK-Multi-Tool\other\..\projects\Contacts.apk\res, -M, C:\APK-Multi-Tool\other\..\projects\Contacts.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 10, -F, C:\Users\aman\AppData\Local\Temp\APKTOOL2048703324560073052.tmp, -0, arsc, -I, C:\Users\aman\apktool\framework\1.apk, -S, C:\APK-Multi-Tool\other\..\projects\Contacts.apk\res, -M, C:\APK-Multi-Tool\other\..\projects\Contacts.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
plsss someone give a helping hand.
Click to expand...
Click to collapse
Pull out all the *.apk files from /system/framework/
N install them.
The frst bein framework-res.apk n thn the others.
Only *.apk files. Not *.jar files.
I tink it will help u get over your prblms..
Don't be lazy.
Lift your hand n press the Thanxxx Button.=)
ok ok..will do it n tell it if it solves my problem..
help me i have same issue when i compliling
i'm installed java and framework-res.apk
Please enter the number of your choice: 1
Enter the name of the folder to assembly (ex: dis_Name.apk) : dis_commod.apk
FICHIER
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: D:\documents\ANDROID\tool mod android\easy apk\
dis_commod.apk\res/drawable-xxhdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 9, --target-sdk-version, 18, -F, C:\Users\Finish\AppData\Local\Temp
\APKTOOL2014611683841755200.tmp, -0, arsc, -I, C:\Users\Finish\apktool\framework
\1.apk, -S, D:\documents\ANDROID\tool mod android\easy apk\dis_commod.apk\res, -
M, D:\documents\ANDROID\tool mod android\easy apk\dis_commod.apk\AndroidManifest
.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 9, --target-sdk-version, 18, -F, C:\
Users\Finish\AppData\Local\Temp\APKTOOL2014611683841755200.tmp, -0, arsc, -I, C:
\Users\Finish\apktool\framework\1.apk, -S, D:\documents\ANDROID\tool mod android
\easy apk\dis_commod.apk\res, -M, D:\documents\ANDROID\tool mod android\easy apk
\dis_commod.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 9, --target-sdk-version, 18, -F, C:\Users\Finish\AppData\Local\Temp\A
PKTOOL2014611683841755200.tmp, -0, arsc, -I, C:\Users\Finish\apktool\framework\1
.apk, -S, D:\documents\ANDROID\tool mod android\easy apk\dis_commod.apk\res, -M,
D:\documents\ANDROID\tool mod android\easy apk\dis_commod.apk\AndroidManifest.x
ml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
java.io.FileNotFoundException: dis_commod.apk\dist\commod.apk (The system cannot
find the path specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at com.android.signapk.SignApk.main(SignApk.java:320)
Press any key to continue . . .
Click to expand...
Click to collapse
change the path names
superuser.pm said:
help me i have same issue when i compliling
i'm installed java and framework-res.apk
Click to expand...
Click to collapse
I think your problem lies in this line:
Code:
invalid resource directory name: D:\documents\ANDROID\tool mod android\easy apk\
dis_commod.apk\res/drawable-xxhdpi
try to remove the blank charcters from the path...change folder names in the path.
I have this error when I try to compile:
Code:
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Proprietario\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\res\values\styles.xml:176: error: Error retrieving parent for item: No resource found that matches the given name 'Base.ThemeOverlay'.
C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\res\values\styles.xml:462: error: Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.AppCompat'.
C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\res\values\styles.xml:506: error: Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.AppCompat'.
C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\res\values\styles.xml:527: error: Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.AppCompat'.
C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\res\values\styles.xml:535: error: Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.AppCompat'.
C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\res\values-v21\styles.xml:65: error: Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.AppCompat'.
C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\res\values\styles.xml:554: error: Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.AppCompat'.
C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\res\values\styles.xml:564: error: Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.AppCompat.DropDownItem'.
C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\res\values\styles.xml:603: error: Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.AppCompat'.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 21, -F, C:\Users\PROPRI~1\AppData\Local\Temp\APKTOOL3070521381926684717.tmp, -0, arsc, -I, C:\Users\Proprietario\apktool\framework\1.apk, -S, C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\res, -M, C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 21, -F, C:\Users\PROPRI~1\AppData\Local\Temp\APKTOOL3070521381926684717.tmp, -0, arsc, -I, C:\Users\Proprietario\apktool\framework\1.apk, -S, C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\res, -M, C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-version, 21, -F, C:\Users\PROPRI~1\AppData\Local\Temp\APKTOOL3070521381926684717.tmp, -0, arsc, -I, C:\Users\Proprietario\apktool\framework\1.apk, -S, C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\res, -M, C:\Users\Proprietario\Desktop\APK-Multi-Tool\other\..\projects\Maps.to.Sygic_v9.0.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
What's the problem?
Thanks.

Need help with theming.

Hi there,
I recently decided to start doing some theming on my Lollipop ROM, cataclysm for nexus 5. Now, I tried to follow this guide http://forum.xda-developers.com/showthread.php?t=1814441 to recompile and decompile and I used this guide http://forum.xda-developers.com/android/themes/guide-t2978121 to try and theme some colors in systemui.apk. I started out with just the primary color of the notification drawer, just to test it.
But, when I try to recompile the apk, I get some errors. I have no idea what to do with them.
C:\Users\Eldin\Documents\apktool>apktool b SystemUI test.apk
I: Using Apktool 2.0.0-RC3 on SystemUI
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
C:\Users\Eldin\Documents\apktool\SystemUI\res\values\styles.xml:35: error: Error
retrieving parent for item: No resource found that matches the given name '@and
roid:style/TextAppearance.StatusBar'.
C:\Users\Eldin\Documents\apktool\SystemUI\res\values\styles.xml:36: error: Error
retrieving parent for item: No resource found that matches the given name '@and
roid:style/TextAppearance.StatusBar'.
C:\Users\Eldin\Documents\apktool\SystemUI\res\values\styles.xml:41: error: Error
retrieving parent for item: No resource found that matches the given name '@and
roid:style/TextAppearance.StatusBar'.
C:\Users\Eldin\Documents\apktool\SystemUI\res\values\styles.xml:51: error: Error
retrieving parent for item: No resource found that matches the given name '@and
roid:style/TextAppearance.StatusBar'.
C:\Users\Eldin\Documents\apktool\SystemUI\res\values\styles.xml:151: error: Erro
r retrieving parent for item: No resource found that matches the given name '@an
droid:style/TextAppearance.StatusBar.Ticker'.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\Eldin\
AppData\Local\Temp\brut_util_Jar_2232414949666097057.tmp, p, --forced-package-id
, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --ve
rsion-name, 5.0.2-1649326, -F, C:\Users\Eldin\AppData\Local\Temp\APKTOOL53377920
12544222906.tmp, -0, arsc, -I, C:\Users\Eldin\apktool\framework\1.apk, -S, C:\Us
ers\Eldin\Documents\apktool\SystemUI\res, -M, C:\Users\Eldin\Documents\apktool\S
ystemUI\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:437)
at brut.androlib.Androlib.buildResources(Androlib.java:374)
at brut.androlib.Androlib.build(Androlib.java:277)
at brut.androlib.Androlib.build(Androlib.java:250)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [C:\Users\Eldin\AppData\Local\Temp\brut_util_Jar_2232414949666097
057.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-versio
n, 21, --version-code, 21, --version-name, 5.0.2-1649326, -F, C:\Users\Eldin\App
Data\Local\Temp\APKTOOL5337792012544222906.tmp, -0, arsc, -I, C:\Users\Eldin\apk
tool\framework\1.apk, -S, C:\Users\Eldin\Documents\apktool\SystemUI\res, -M, C:\
Users\Eldin\Documents\apktool\SystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:488)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:423)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Eldin\Ap
pData\Local\Temp\brut_util_Jar_2232414949666097057.tmp, p, --forced-package-id,
127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --vers
ion-name, 5.0.2-1649326, -F, C:\Users\Eldin\AppData\Local\Temp\APKTOOL5337792012
544222906.tmp, -0, arsc, -I, C:\Users\Eldin\apktool\framework\1.apk, -S, C:\User
s\Eldin\Documents\apktool\SystemUI\res, -M, C:\Users\Eldin\Documents\apktool\Sys
temUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:482)
... 6 more
C:\Users\Eldin\Documents\apktool>
All I changed were 2 colors in res/values/colors.xml.
Can point me in the right direction?

[Q] Whatsapp

Hello, I do not speak English very well, and that's why I'm writing with Google Translate. Who can help me compile whatsapp? Every time I try to recompile, I find these errors:
C:\apktool>apktool b Whatsapp
I: Using Apktool 2.0.0-RC3 on Whatsapp
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
C:\apktool\Whatsapp\res\xml\whatsapp_widget.xml:2: error: No resource identifier
found for attribute 'widgetCategory' in package 'android'
C:\apktool\Whatsapp\res\xml\widget_info.xml:2: error: No resource identifier fou
nd for attribute 'initialKeyguardLayout' in package 'android'
C:\apktool\Whatsapp\res\xml\widget_info.xml:2: error: No resource identifier fou
nd for attribute 'widgetCategory' in package 'android'
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\PC\App
Data\Local\Temp\brut_util_Jar_8673526721265381617.tmp, p, --forced-package-id, 1
27, --min-sdk-version, 7, --target-sdk-version, 19, --version-code, 48450, --ver
sion-name, 2.11.238, -F, C:\Users\PC\AppData\Local\Temp\APKTOOL51129355695285053
61.tmp, -I, C:\Users\PC\apktool\framework\1.apk, -S, C:\apktool\Whatsapp\res, -M
, C:\apktool\Whatsapp\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:437)
at brut.androlib.Androlib.buildResources(Androlib.java:374)
at brut.androlib.Androlib.build(Androlib.java:277)
at brut.androlib.Androlib.build(Androlib.java:250)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [C:\Users\PC\AppData\Local\Temp\brut_util_Jar_8673526721265381617
.tmp, p, --forced-package-id, 127, --min-sdk-version, 7, --target-sdk-version, 1
9, --version-code, 48450, --version-name, 2.11.238, -F, C:\Users\PC\AppData\Loca
l\Temp\APKTOOL5112935569528505361.tmp, -I, C:\Users\PC\apktool\framework\1.apk,
-S, C:\apktool\Whatsapp\res, -M, C:\apktool\Whatsapp\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:488)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:423)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\PC\AppDa
ta\Local\Temp\brut_util_Jar_8673526721265381617.tmp, p, --forced-package-id, 127
, --min-sdk-version, 7, --target-sdk-version, 19, --version-code, 48450, --versi
on-name, 2.11.238, -F, C:\Users\PC\AppData\Local\Temp\APKTOOL5112935569528505361
.tmp, -I, C:\Users\PC\apktool\framework\1.apk, -S, C:\apktool\Whatsapp\res, -M,
C:\apktool\Whatsapp\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:482)
... 6 more
Please, Help me

[SOLVED] [APKTOOL] De- and Recompiling apk in debug-mode fails

Hi,
I'm trying to recompile an apk in debug mode (so no changes besides the one-liner in the manifest). But every time I execute "apktool b -d out" I get this error:
Code:
I: Using Apktool 2.0.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\Me\AppData\Local\Temp\brut_util_Jar_7477717139219658502.tmp, p, --out-mode, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 19, --version-code, 26, --version-name, @string/versionname, -F, C:\Users\Me\AppData\Local\Temp\APKTOOL7991561937292063981.tmp, -0, arsc, -I, C:\Users\Me\apktool\framework\1.apk, -S, D:\out\res, -M, D:\out\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:458)
at brut.androlib.Androlib.buildResources(Androlib.java:396)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.Androlib.build(Androlib.java:256)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\Me\AppData\Local\Temp\brut_util_Jar_7477717139219658502.tmp, p, --out-mode, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 19, --version-code, 26, --version-name, @string/versionname, -F, C:\Users\Me\AppData\Local\Temp\APKTOOL7991561937292063981.tmp, -0, arsc, -I, C:\Users\Me\apktool\framework\1.apk, -S, D:\out\res, -M, D:\out\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:444)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Me\AppData\Local\Temp\brut_util_Jar_7477717139219658502.tmp, p, --out-mode, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 19, --version-code, 26, --version-name, @string/versionname, -F, C:\Users\Me\AppData\Local\Temp\APKTOOL7991561937292063981.tmp, -0, arsc, -I, C:\Users\Me\apktool\framework\1.apk, -S, D:\out\res, -M, D:\out\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
... 6 more
I tried this both on Windows and Ubuntu and I'm always getting this error. If I decode with -r (copy resources raw) everything recompiles just fine, but then I can't add the "android:debuggable"-value (for obvious reasons, I just wanted to test the recompiling). I googled this error and often there is a problem with "aapt" not beeing recognized, so I added the path to my PATH-variable, but I'm still getting the above output.
Anyone out there with a fix or am I doing something wrong?
Regards,
me113
I fixed it myself. There was a problem with the decompiling of the resources. Three images were exported as jpg instead of png. Re-saving them as png fixed everything. :victory:

Categories

Resources