Phone.apk compile error, don't ignore me please - Android Q&A, Help & Troubleshooting

Hey, please don't ignore this problem. Every project I started is stopped by this error, I can't fix many of my roms because of it. I can't continue my work so please help me. Don't think I am another one person who has no idea what he is doing, I have some experience in porting but no one wants help me.
I have done many ports for my LG Swift and now I started developement for Xperia J.
But I'm struggling with error that doesn't allow me to fix the worse bugs in my ports.
The situation:
I have succesfull decompiled, patched and compiled framework.jar for my MIUI5 port, same with LiGux, MIUI4 and many others.
But when I try to fix Phone.apk ( values/bools.xml ) then it gives me this error when smailing (no matter which rom I'm poring):
Code:
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 16, --target-sdk-version, 16, -F, H:\DOCUME~1\ks\USTAWI~1\Temp\APKT
OOL1846198324772815581.tmp, -0, arsc, -I, H:\Documents and Settings\ks\apktool\f
ramework\1.apk, -S, C:\apktools2\LiGux\Phone\res, -M, C:\apktools2\LiGux\Phone\A
ndroidManifest.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, 16, --target-sdk-version, 16, -F, H:
\DOCUME~1\ks\USTAWI~1\Temp\APKTOOL1846198324772815581.tmp, -0, arsc, -I, H:\Docu
ments and Settings\ks\apktool\framework\1.apk, -S, C:\apktools2\LiGux\Phone\res,
-M, C:\apktools2\LiGux\Phone\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, 16, --target-sdk-version, 16, -F, H:\DOCUME~1\ks\USTAWI~1\Temp\APKTOO
L1846198324772815581.tmp, -0, arsc, -I, H:\Documents and Settings\ks\apktool\fra
mework\1.apk, -S, C:\apktools2\LiGux\Phone\res, -M, C:\apktools2\LiGux\Phone\And
roidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
This error appears with MIUI, Lewa, LiGux, every rom I try to port.
YES! I remember about if framework-res.apk and if ANY_ADDIITONAL_FRAMEWORK_HERE.apk
I tried to recompile those Phone.apk's on Ubuntu too but still the same error.
I have tried many versions of apktool, I have tried various tools for recompiling, I have tried to do it manually too.
I never works, always the same error.
Please help me with this, I can't finish most of my ports beacuse of it : (

lozohcum said:
*snip*
Click to expand...
Click to collapse
What aapt did u used?

1.5.2 and older

lozohcum said:
1.5.2 and older
Click to expand...
Click to collapse
not the apktool i meant the AAPT

The same, the newest version from this site: http://code.google.com/p/android-apktool/

The phone apk has been a problem for awhile now. It can't be recompiled by any means at the moment and needs to be built from source.
Wayne Tech Nexus

So how can I build it from source? For MIUI5, LiGux ?

lozohcum said:
So how can I build it from source? For MIUI5, LiGux ?
Click to expand...
Click to collapse
For MIUI you cant. and if the other one doesnt provide source then you cant from them either.

Great,,, so there is no ability to fix not working micro in my LiGux port and Unlock Sim Code in Xperia MIUI port :/

Use miui's apktool: https://github.com/MiCode/patchrom_tools/blob/jellybean/aapt.exe and https://github.com/MiCode/patchrom_tools/blob/jellybean/apktool.jar
apktool d -t miui -f Phone.apk
apktool b -f Phone unsigned-Phone.apk
java -jar signapk.jar platform.x509.pem platform.pk8 unsigned-Phone.apk signed-Phone.apk
zipalign -v -f 4 signed-Phone.apk Phone.apk
Click to expand...
Click to collapse

Thanks, will try

Phone.apk
For Phone.apk, you will encounter a lot of errors on the recompile thanks to bad XML files in a few languages. The key here is to read the errors and correct them. Essentially there are the following problems with strings:
Strings that were broken onto multiple lines. Make them on one line.
For the above lines, remove the extra double quotes that are on the inside of the ><.
Look for apostrophes and put a \ in front of them.
Lastly there will be a bunch of lines with variable replacement codes in them like %1$d. These are all just text strings for some kind of error messages. Seems to be problems with all the stuff surrounding throttling. I simply removed the codes as I don't really care about such messages. Wish I understood the variables better but again, these were very limited messages and I don't see this as a major issue.
There is a lot to clean up, but don't let anyone tell you that this cannot be done because it most certainly can.

Related

[Q] How to recompile Dolphin Browser HD

Hi to all of you!
I have a problem with decompiling, editing and recompiling Dolphin Browser Hd.
I use apktool both in Windows Seven and Ubuntu 11.10, I have the same problem in both operative system.
I am able to decompile the apk, but when I try to recompile it, even if I haven't edited anything, I received this error:
Code:
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL8222021305781533885.tmp, -I, /home/bibi/apktool/framework/1.apk, -S, /home/bibi/apktool/mobi.mgeek.TunnyBrowser-1/res, -M, /home/bibi/apktool/mobi.mgeek.TunnyBrowser-1/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL8222021305781533885.tmp, -I, /home/bibi/apktool/framework/1.apk, -S, /home/bibi/apktool/mobi.mgeek.TunnyBrowser-1/res, -M, /home/bibi/apktool/mobi.mgeek.TunnyBrowser-1/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Can anyone help me? I have found a lot of people having this issue but no one can solve it. These are two threads about it: http://code.google.com/p/android-apktool/issues/detail?id=277&sort=-id&colspec=ID%20Stars%20Type%20Status%20Priority%20Milestone%20Owner%20Summary http://code.google.com/p/android-apktool/issues/detail?id=282
I have the same problem if I try do recompile all the apk in /data/app.
Not exactly at all, I have this issue just with Dolphin Browser Hd, I upload that apk for you with my framework.
I am able to recompile this Dolphin Browser Hd apk, version 4.0.
I think it gives error if the dependency source file is not there, I'm not sure.have successfully decompiled the go launcher but recompiling gave me errors.
Sent from my GT-I9100 using xda premium
Why are you telling the source file is not there? I have framework-res.apk and twframework-res.apk. Isn't enough?
I have found Dolphin apk I attached and I was able to recompile it. I don't know why, it is the same version of mine.

[Q] recompile framework-res.apk from cm9-20120404

Is it possible to recompile the framework-res.apk from cm9-20120404??
tried apktool 1.4.1 & 1.4.2 with newest aapt.exe
and AutoAPKtool 2.0.3 still lots of error........
anyone can help?
Use the apk tool designed for ics . It didn't gave me errors on decompiling, not tried the version you mentioned though
#*posted on the move *#
bala_gamer said:
Use the apk tool designed for ics . It didn't gave me errors on decompiling, not tried the version you mentioned though
#*posted on the move *#
Click to expand...
Click to collapse
I tried this ICS apktool, but still got errors with 'plurals.xml'
http://forum.xda-developers.com/showthread.php?t=1558171
ron194 said:
I tried this ICS apktool, but still got errors with 'plurals.xml'
http://forum.xda-developers.com/showthread.php?t=1558171
Click to expand...
Click to collapse
use "AutoAPKTool2.0.0" and just tried decompiling the same and didnt got any errors. dont forget to install the framework b4 decompiling.
bala_gamer said:
use "AutoAPKTool2.0.0" and just tried decompiling the same and didnt got any errors. dont forget to install the framework b4 decompiling.
Click to expand...
Click to collapse
still not work......
Code:
[*] C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res
recompiling C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res...
W: Could not find sources
I: Building resources...
invalid resource directory name: C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res/animator
invalid resource directory name: C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res/interpolator
invalid resource directory name: C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res/mipmap-hdpi
invalid resource directory name: C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res/mipmap-ldpi
invalid resource directory name: C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res/mipmap-mdpi
invalid resource directory name: C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res/mipmap-xhdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Ron\AppData\Local\Temp\APKTOOL8300429255981799689.tmp, -x, -S, C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res, -M, C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Ron\AppData\Local\Temp\APKTOOL8300429255981799689.tmp, -x, -S, C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res, -M, C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
ron194 said:
still not work......
Click to expand...
Click to collapse
you are right, giving errors on recompiling. what mod are you doing anyway?
bala_gamer said:
you are right, giving errors on recompiling. what mod are you doing anyway?
Click to expand...
Click to collapse
thx for ur help! I hv just replaced the ICS "aapt.exe" to the AutoAPKTool 2.0.0, and it works now!
I just want to mod the navigation bar, but cant recompile the framework-res even without any mod before.......

recompile sony ICS apk's with APKTOOL

i tried recompiling the Home.apk, in the same condition i decompiled it, but it gives an error,
i installed
SemcGenericUxpRes.apk and framework-res.apk and it succesfully decompiled.
also: i tried an older version of apktool , 1.4.1 which was succesfull with some samsung phones in other threads but no success with that either
i also tried copying the latest aapt from the sdk to the apktool installation, nothing.
so if anyone has had success recompiling sony ICS apks, then help..
gandhar said:
i tried recompiling the Home.apk, in the same condition i decompiled it, but it gives an error,
i installed
SemcGenericUxpRes.apk and framework-res.apk and it succesfully decompiled.
also: i tried an older version of apktool , 1.4.1 which was succesfull with some samsung phones in other threads but no success with that either
i also tried copying the latest aapt from the sdk to the apktool installation, nothing.
so if anyone has had success recompiling sony ICS apks, then help..
Click to expand...
Click to collapse
You should ask question in general section anyway...
Sent from my WT19i using XDA
What error you get?
Also, wrong section.
Someguyfromhell said:
What error you get?
Also, wrong section.
Click to expand...
Click to collapse
oh sorry for the wrong section, but i do not think someone in the general section would have answered this one..
this is exactly the error
C:\Users\gandhar\apktool>apktool d Home.apk Home
Destination directory (C:\Users\gandhar\apktool\Home) already exists. Use -f swi
tch if you want to overwrite it.
C:\Users\gandhar\apktool>apktool d Home.apk Home
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\gandhar\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\gandhar\apktool\framework\2.apk
I: Loaded.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\Users\gandhar\apktool>apktool b Home Home1.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\Users\gandhar\apktool\Home\res\values\styles.xml:4: error: Error retrieving p
arent for item: No resource found that matches the given name 'Layout'.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\gandhar\AppData\Local\Temp
\APKTOOL762609809719293048.tmp, -I, C:\Users\gandhar\apktool\framework\1.apk, -I
, C:\Users\gandhar\apktool\framework\2.apk, -S, C:\Users\gandhar\apktool\Home\re
s, -M, C:\Users\gandhar\apktool\Home\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\gandhar\AppData\Local\Temp\APKTOOL762609809719293048.tmp, -I, C:\Users\gand
har\apktool\framework\1.apk, -I, C:\Users\gandhar\apktool\framework\2.apk, -S, C
:\Users\gandhar\apktool\Home\res, -M, C:\Users\gandhar\apktool\Home\AndroidManif
est.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
C:\Users\gandhar\apktool>
i have the latest version of java
danist727 said:
You should ask question in general section anyway...
Sent from my WT19i using XDA
Click to expand...
Click to collapse
i thought ROM modders would have come across this error before, so, here..
edit:
@sumguyfromhell,
i have latest aapt from sdk, java jdk, jre
Seems like you have made a mistake while editing a .xml file, as it is unable to compile the file(xml files are compiled to a bit different language).
Someguyfromhell said:
Seems like you have made a mistake while editing a .xml file, as it is unable to compile the file(xml files are compiled to a bit different language).
Click to expand...
Click to collapse
i just did that, no editing done, i directly recompiled after the decompiling..
edit:
say i just want to change the values.xml, so is there a workaround maybe?
edit: i mean integers.xml
Hurray!!! i found something,
Just decompile apk, replace the string <style name="Layout.ButtonContainer" for <style name="Layout.ButtonContainer" parent="@android:style/Theme.Wallpaper.NoTitleBar"> at \res\values\styles.xml and compile...
it's from this thread,
http://forum.xda-developers.com/showthread.php?t=1276332
just recompiled, thank you guys
can someone close this thread?
gandhar said:
Hurray!!! i found something,
Just decompile apk, replace the string <style name="Layout.ButtonContainer" for <style name="Layout.ButtonContainer" parent="@android:style/Theme.Wallpaper.NoTitleBar"> at \res\values\styles.xml and compile...
it's from this thread,
http://forum.xda-developers.com/showthread.php?t=1276332
just recompiled, thank you guys
can someone close this thread?
Click to expand...
Click to collapse
i get dis error while recompiling.....
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\LaLa\AppData\Local\Temp\APKTOOL61323.tmp, -I, C:\Users\LaLa\apktool\framework\1.apk, -S, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\res, -M, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\LaLa\AppData\Local\Temp\APKTOOL61323.tmp, -I, C:\Users\LaLa\apktool\framework\1.apk, -S, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\res, -M, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
but i cant find layout in styles.xml!!!! Help..
whalesplaho said:
i get dis error while recompiling.....
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\LaLa\AppData\Local\Temp\APKTOOL61323.tmp, -I, C:\Users\LaLa\apktool\framework\1.apk, -S, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\res, -M, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\LaLa\AppData\Local\Temp\APKTOOL61323.tmp, -I, C:\Users\LaLa\apktool\framework\1.apk, -S, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\res, -M, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
but i cant find layout in styles.xml!!!! Help..
Click to expand...
Click to collapse
update your sdk to latest version, then copy aapt.exe from platform-tools to apktool directory, that was the fix i had found on the apktool bugtracker.
edit:you have to install frameworks again after replacing aapt
how about decompiling and recompiling framework-res.apk, settings.apk, systemui.apk, and other semc ics apks bro gandhar ??
iiandskater said:
how about decompiling and recompiling framework-res.apk, settings.apk, systemui.apk, and other semc ics apks bro gandhar ??
Click to expand...
Click to collapse
a lot of people including me are waiting for the next version of apktool just because of the errors that are met when recompiling ICS apks..
it does not accept some parts of a lot of xml files, so many need to be changed just to recompile the file, many files excluding the actual modifications we need to do..
well i am no expert at this, so i may be wrong, but my experience in trying to recompile leads me to conclude that i should wait for the next version
gandhar said:
a lot of people including me are waiting for the next version of apktool just because of the errors that are met when recompiling ICS apks..
it does not accept some parts of a lot of xml files, so many need to be changed just to recompile the file, many files excluding the actual modifications we need to do..
well i am no expert at this, so i may be wrong, but my experience in trying to recompile leads me to conclude that i should wait for the next version
Click to expand...
Click to collapse
i'm agree with you,
i've try many ways but its always end with no luck..
that's doesn't matter my bro,
i also hope for new version / way that will works perfectly,
thanks for ur answer..

[help] APKTool recompile issues

I am looking for help with APKTool. I have tried using the current stable version, as well as the 2.x beta. Both with same result. I am even using the dependancies on the official google code site. My android sdk is fully updated, and both JRE and JDK are installed (both installations done about 2 weeks ago, with no prompt to update since)
Code:
C:\Development\android>apktool.bat b framework-res framework-res-new.apk
I: Using Apktool 2.0.0-Beta7 on framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Development\android\framework-res\res/values
-mcc454-mnc-1
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\Shanno
n\AppData\Local\Temp\brut_util_Jar_147258541274646456.tmp, p, --min-sdk-version,
17, --target-sdk-version, 17, -F, C:\Users\Shannon\AppData\Local\Temp\APKTOOL12
39664133003724430.tmp, -x, -0, arsc, -S, C:\Development\android\framework-res\re
s, -M, C:\Development\android\framework-res\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: [C:\Users\Shannon\AppData\Local\Temp\brut_util_Jar_14725854127464
6456.tmp, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, C:\Users\Shann
on\AppData\Local\Temp\APKTOOL1239664133003724430.tmp, -x, -0, arsc, -S, C:\Devel
opment\android\framework-res\res, -M, C:\Development\android\framework-res\Andro
idManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:481)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:415)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Shannon\
AppData\Local\Temp\brut_util_Jar_147258541274646456.tmp, p, --min-sdk-version, 1
7, --target-sdk-version, 17, -F, C:\Users\Shannon\AppData\Local\Temp\APKTOOL1239
664133003724430.tmp, -x, -0, arsc, -S, C:\Development\android\framework-res\res,
-M, C:\Development\android\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:475)
... 6 more
Skaeren said:
I am looking for help with APKTool. I have tried using the current stable version, as well as the 2.x beta. Both with same result. I am even using the dependancies on the official google code site. My android sdk is fully updated, and both JRE and JDK are installed (both installations done about 2 weeks ago, with no prompt to update since)
Click to expand...
Click to collapse
Error log says could not find resources. It means you have not installed framework-res.apk (in case of Samsung Touchwiz phones install twframework also).
Solution :-
Pull framwork-red.apk and for Samsung TW phones pull twframawork-res.apk and put it where you keep files in apktool.
If you are using APK Multitool with GUI, then first button is for installing framework.
If you are using command line apktool, type
Code:
apktool if framework-res.apk
to install framework.
Then decompile and recompile.
Press Thanks if helped
Sent from my GT-S5360 Gadget of Mass Destruction using xda-app
Using CWM........Busybox Commands........No I use my hands
hnkotnis said:
Error log says could not find resources. It means you have not installed framework-res.apk (in case of Samsung Touchwiz phones install twframework also).
Solution :-
Pull framwork-red.apk and for Samsung TW phones pull twframawork-res.apk and put it where you keep files in apktool.
If you are using APK Multitool with GUI, then first button is for installing framework.
If you are using command line apktool, type
Code:
apktool if framework-res.apk
to install framework.
Then decompile and recompile.
Press Thanks if helped
Sent from my GT-S5360 Gadget of Mass Destruction using xda-app
Using CWM........Busybox Commands........No I use my hands
Click to expand...
Click to collapse
This did not help
Code:
C:\Development\android>apktool.bat if framework-res.apk
I: Framework installed to: C:\Users\Shannon\apktool\framework\1.apk
Code:
C:\Development\android>apktool.bat d framework-res.apk
I: Using Apktool 2.0.0-Beta7 on framework-res.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Loading resource table...
I: Copying assets and libs...
I: Copying unknown files/dir...
I: Copying original files...
Code:
C:\Development\android>apktool.bat b framework-res framework-res-new.apk
I: Using Apktool 2.0.0-Beta7 on framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Development\android\framework-res\res/values
-mcc454-mnc-1
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\Shanno
n\AppData\Local\Temp\brut_util_Jar_3655706423395563843.tmp, p, --forced-package-
id, 1, --min-sdk-version, 17, --target-sdk-version, 17, --version-code, 17, --ve
rsion-name, 4.2.1-WW_epad-10.6.2.10-20130918, -F, C:\Users\Shannon\AppData\Local
\Temp\APKTOOL5651618845894214526.tmp, -x, -0, arsc, -S, C:\Development\android\f
ramework-res\res, -M, C:\Development\android\framework-res\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: [C:\Users\Shannon\AppData\Local\Temp\brut_util_Jar_36557064233955
63843.tmp, p, --forced-package-id, 1, --min-sdk-version, 17, --target-sdk-versio
n, 17, --version-code, 17, --version-name, 4.2.1-WW_epad-10.6.2.10-20130918, -F,
C:\Users\Shannon\AppData\Local\Temp\APKTOOL5651618845894214526.tmp, -x, -0, ars
c, -S, C:\Development\android\framework-res\res, -M, C:\Development\android\fram
ework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:481)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:415)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Shannon\
AppData\Local\Temp\brut_util_Jar_3655706423395563843.tmp, p, --forced-package-id
, 1, --min-sdk-version, 17, --target-sdk-version, 17, --version-code, 17, --vers
ion-name, 4.2.1-WW_epad-10.6.2.10-20130918, -F, C:\Users\Shannon\AppData\Local\T
emp\APKTOOL5651618845894214526.tmp, -x, -0, arsc, -S, C:\Development\android\fra
mework-res\res, -M, C:\Development\android\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:475)
... 6 more
C:\Development\android>
Skaeren said:
This did not help
Code:
C:\Development\android>apktool.bat if framework-res.apk
I: Framework installed to: C:\Users\Shannon\apktool\framework\1.apk
................................................................
Try with Android Multitool.
If it does not work give me that apk and framework. I will try to decompile it.
Wait........ Is it a 3rd party app? (I mean not a system app?)
Then it might be possible that developer is using some other resources, different than in your framework.
Click to expand...
Click to collapse
hnkotnis said:
Skaeren said:
This did not help
Code:
C:\Development\android>apktool.bat if framework-res.apk
I: Framework installed to: C:\Users\Shannon\apktool\framework\1.apk
................................................................
Try with Android Multitool.
If it does not work give me that apk and framework. I will try to decompile it.
Wait........ Is it a 3rd party app? (I mean not a system app?)
Then it might be possible that developer is using some other resources, different than in your framework.
Click to expand...
Click to collapse
Thanks, but it didn't help. I will keep the tool, ask my girlfriend to look over the log when there is time, but so far, still an error. I have not been able to recompile.
It is a system app. I modified one file to enable calls on my TF300TG. I have included 7zip files of the apk, and of the values folder. The values folder goes inside the res folder of the decompiled apk, before recompiling. If you could recompile for me, I will give you all the cookies!
Click to expand...
Click to collapse
Skaeren said:
hnkotnis said:
Thanks, but it didn't help. I will keep the tool, ask my girlfriend to look over the log when there is time, but so far, still an error. I have not been able to recompile.
It is a system app. I modified one file to enable calls on my TF300TG. I have included 7zip files of the apk, and of the values folder. The values folder goes inside the res folder of the decompiled apk, before recompiling. If you could recompile for me, I will give you all the cookies!
Click to expand...
Click to collapse
You did not tell me you had JellyBean. I found it when I took a look at framework-res.apk manifest.
There is some problem with decompiling and recompiling JB Framework. (No problem for other apks)
So I did a bit searching and I found this
monstaX said:
Grab an ICS framework-res apk. Replace manifest resources.arsc and res from the ICS apk with the one from jb apk. Then dexompile with apktool142.jar and then edit. Then recompile with apktoll144.jar. then open the apk that recompiled and take out manifest resources.arsc and res and place back in jb framework sorry if its to confusing. But just a quick write up
Sent from my SPH-L710 using XDA App
Click to expand...
Click to collapse
Added at 28/01/2014 04:00 PM IST
I also found this thread
This contains JB Decompiling tool and there are some guides of framework-res modifications.
Click to expand...
Click to collapse
hnkotnis said:
Skaeren said:
I will try to do it.
Click to expand...
Click to collapse
thanks
Click to expand...
Click to collapse
@Skaeren
Please read my updated post above.
hnkotnis said:
@Skaeren
Please read my updated post above.
Click to expand...
Click to collapse
I thank you for your assistance. I will take a look at the link when I get home. I know it might be asking a lot, but would it be possible for you to make the required resources.arsc for me? Basically, I only need two variabls in bools.xml changed. I have attached my bools.xml file.
If you are able to, I greatly appreciate the help. Hell, I greatly appreciate the help anyway. This stuff is a little beyond my current knowledge pool though.
is this proble solved? you want recompiled system file like systemui.apk?
try to delete folder "values-mcc9989-mnc999" in your decopile folder /res/here
press thanks button if i helped you
Problem while decompiling SystemUI.apk
I can decompile framework-res.apk but i cant able to decompile SystemUI.apk 4.2.2.
Any Solution???
thanks in advance

HELP NEEDED! Compiling Framework & SystemUI

Hello all. Need some of your expert advice ASAP!
I'm very familiar with using APKTool and Compiling/Decompiling Apps. I've run into a problem with the framework-res and SystemUI apps.
Current ROM/App info:
Samsung Galaxy Tab 3 8.0
Android 4.2.2 (Samsung Touchwiz)
Framework Installed in APKTool: framework-res.apk, twframework-res.apk and SystemUI.apk
APKTool Version: 2.0 (I've tried almost every version of APKTool and AAPT)
Java Version: 1.7 (as required by APKTool 2.0)
OS: Windows and Linux (same results on each OS)
The framework and SystemUI apps decompile fine. No errors and all the XML/Smali files are perfect. The problem is that I can not recompile either of them. Each time I attempt, I get the same error regarding the Android Manifest file....
Code:
brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: c
\brut_util_Jar_8264547236691306049.tmp, p, --forced-package-id, 127, --min-sdk-version, 17, --
me, 4.2.2-T310UEUAMH2, -F, C:\Users\Adam\AppData\Local\Temp\APKTOOL3953045592385201216.tmp, -0
:\Users\Adam\Desktop\Project_Tab3_4.15\OriginalFiles\SystemUI\res, -M, C:\Users\Adam\Desktop\P
xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:439)
at brut.androlib.Androlib.buildResources(Androlib.java:367)
at brut.androlib.Androlib.build(Androlib.java:290)
at brut.androlib.Androlib.build(Androlib.java:262)
at brut.apktool.Main.cmdBuild(Main.java:236)
at brut.apktool.Main.main(Main.java:88)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command:
236691306049.tmp, p, --forced-package-id, 127, --min-sdk-version, 17, --target-sdk-version, 17
-F, C:\Users\Adam\AppData\Local\Temp\APKTOOL3953045592385201216.tmp, -0, arsc, -I, C:\Users\A
roject_Tab3_4.15\OriginalFiles\SystemUI\res, -M, C:\Users\Adam\Desktop\Project_Tab3_4.15\Origi
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:473)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:420)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Adam\AppData\Local\Tem
kage-id, 127, --min-sdk-version, 17, --target-sdk-version, 17, --version-code, 17, --version-n
Temp\APKTOOL3953045592385201216.tmp, -0, arsc, -I, C:\Users\Adam\apktool\framework\1.apk, -S,
stemUI\res, -M, C:\Users\Adam\Desktop\Project_Tab3_4.15\OriginalFiles\SystemUI\AndroidManifest
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:467)
... 6 more
I have spent the past 6 hours searching and reading for possible solutions and nothing has worked. I know some dev's have been able to sucessfully compile these apps (even though MANY people have had this exact same problem).
Can anyone provide any assistance on what the fix/workaround is to get these apps compiled? FYI - I have even tried compiling the stock apps without any mods and I get the same errors.
Let me know if you need further clarification on my situation. And please, only respond if you have a known solution. I have speculated all day and chased every possible hunch.
Thanks in advance!!!!
arshull said:
Hello all. Need some of your expert advice ASAP!
I'm very familiar with using APKTool and Compiling/Decompiling Apps. I've run into a problem with the framework-res and SystemUI apps.
Current ROM/App info:
Samsung Galaxy Tab 3 8.0
Android 4.2.2 (Samsung Touchwiz)
Framework Installed in APKTool: framework-res.apk, twframework-res.apk and SystemUI.apk
APKTool Version: 2.0 (I've tried almost every version of APKTool and AAPT)
Java Version: 1.7 (as required by APKTool 2.0)
OS: Windows and Linux (same results on each OS)
The framework and SystemUI apps decompile fine. No errors and all the XML/Smali files are perfect. The problem is that I can not recompile either of them. Each time I attempt, I get the same error regarding the Android Manifest file....
Code:
brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: c
\brut_util_Jar_8264547236691306049.tmp, p, --forced-package-id, 127, --min-sdk-version, 17, --
me, 4.2.2-T310UEUAMH2, -F, C:\Users\Adam\AppData\Local\Temp\APKTOOL3953045592385201216.tmp, -0
:\Users\Adam\Desktop\Project_Tab3_4.15\OriginalFiles\SystemUI\res, -M, C:\Users\Adam\Desktop\P
xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:439)
at brut.androlib.Androlib.buildResources(Androlib.java:367)
at brut.androlib.Androlib.build(Androlib.java:290)
at brut.androlib.Androlib.build(Androlib.java:262)
at brut.apktool.Main.cmdBuild(Main.java:236)
at brut.apktool.Main.main(Main.java:88)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command:
236691306049.tmp, p, --forced-package-id, 127, --min-sdk-version, 17, --target-sdk-version, 17
-F, C:\Users\Adam\AppData\Local\Temp\APKTOOL3953045592385201216.tmp, -0, arsc, -I, C:\Users\A
roject_Tab3_4.15\OriginalFiles\SystemUI\res, -M, C:\Users\Adam\Desktop\Project_Tab3_4.15\Origi
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:473)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:420)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Adam\AppData\Local\Tem
kage-id, 127, --min-sdk-version, 17, --target-sdk-version, 17, --version-code, 17, --version-n
Temp\APKTOOL3953045592385201216.tmp, -0, arsc, -I, C:\Users\Adam\apktool\framework\1.apk, -S,
stemUI\res, -M, C:\Users\Adam\Desktop\Project_Tab3_4.15\OriginalFiles\SystemUI\AndroidManifest
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:467)
... 6 more
I have spent the past 6 hours searching and reading for possible solutions and nothing has worked. I know some dev's have been able to sucessfully compile these apps (even though MANY people have had this exact same problem).
Can anyone provide any assistance on what the fix/workaround is to get these apps compiled? FYI - I have even tried compiling the stock apps without any mods and I get the same errors.
Let me know if you need further clarification on my situation. And please, only respond if you have a known solution. I have speculated all day and chased every possible hunch.
Thanks in advance!!!!
Click to expand...
Click to collapse
are these apps are deodexed?
install deodexed framework and systemui apps
Vaibhav Chauhan said:
are these apps are deodexed?
install deodexed framework and systemui apps
Click to expand...
Click to collapse
Yes, all apps/ROM is DeOdexed
arshull said:
Yes, all apps/ROM is DeOdexed
Click to expand...
Click to collapse
make sure you have compiled same rom's apps
Do you have the android SDK updated?
Bat cave One
can u specify what modifications u made in the apk...
zelendel said:
Do you have the android SDK updated?
Bat cave One
Click to expand...
Click to collapse
Yes, SDK is updated to the latest.
Sent from my HTC One using XDA Free mobile app
theprakhar said:
can u specify what modifications u made in the apk...
Click to expand...
Click to collapse
Very basic mods.... Color changes mostly. But I can not even recompile unmodified apps after I decompile them.
Sent from my HTC One using XDA Free mobile app
arshull said:
Very basic mods.... Color changes mostly. But I can not even recompile unmodified apps after I decompile them.
Sent from my HTC One using XDA Free mobile app
Click to expand...
Click to collapse
you can try other tools for compile
Vaibhav Chauhan said:
you can try other tools for compile
Click to expand...
Click to collapse
I have tried everything possible. I'm going to set up a separate dev environment with some different tools/drivers and see if that has any effect.
Sent from my HTC One using XDA Free mobile app
arshull said:
I have tried everything possible. I'm going to set up a separate dev environment with some different tools/drivers and see if that has any effect.
Sent from my HTC One using XDA Free mobile app
Click to expand...
Click to collapse
ok try it
Same here
Vaibhav Chauhan said:
ok try it
Click to expand...
Click to collapse
I'm having the exact same problem for modding a keyboard. I have my JAVA PATH set to correct Java JDK location; correct paths set to android SDK files, which were placed in C:\windows (per advise for this problem). Also tried different APKTools. Nothing works

Categories

Resources