# Decompiling Jellybean apk's for Themeing?



## Detonation

Anyone have success decompiling any of the Jellybean apks (SystemUI, Framework-res, etc) for themeing? I tried with apktool but I just get errors. I did install the JB framework. Is it even possible yet, or do we need a new version of apktool?


----------



## Schoat333

I am able to decompile framework-res, but nothing else so far.

If you just want to edit images, make a copy of the apk, rename it to .zip, and then extract it. You can then edit non .9 images, and then use 7zip to drag them back into the original apk.


----------



## Detonation

Bump. So is this just not possible yet? Anyone know why? Was really hoping to make a 1% battery mod for JB.


----------



## Smcdo123

Detonation said:


> Bump. So is this just not possible yet? Anyone know why? Was really hoping to make a 1% battery mod for JB.


Well vanirbean has 1% battery mods. So must be possible see. Win.

Sent from my Galaxy Nexus using RootzWiki


----------



## Schoat333

It can be done by using an old ICS apk, 7zip, and a bit of hacking.

Heres what you need to do. (Make sure you have installed the JB framework-res.apk using "apktool if framework-res.apk")

1. Open both the JB and ICS apks in separate 7zip windows.
2. Drag the resources.arsc, AndroidManifest.Xml, and Res folder from the JB apk, into the ICS apk
3. decompile your modified ICS APK
4. make your changes
5. Recompile modified ICS apk
6 move whatever you changed back into the JB apk using 7zip.


----------



## bouchigo

Schoat333 said:


> I am able to decompile framework-res, but nothing else so far.
> 
> If you just want to edit images, make a copy of the apk, rename it to .zip, and then extract it. You can then edit non .9 images, and then use 7zip to drag them back into the original apk.


I was able to decompile and modify just fine.

I modified framework-res.apk and SystemUI.apk; added 1% and changed the nav bar, and centered the lockscreen:



I was also able to make mods to Launcher2.apk until I decided to use Nova Launcher because my go to Laucher (Apex Launcher) isn't working on jellybean, at least not for me.


----------



## Detonation

Did you use the method posted by Schoat333 to get SystemUI to decompile?

Alternatively, would you mind sharing your mods? The only thing I'm really missing on JB is 1% battery and a dedicated menu button, which you've evidently both done.


----------



## bouchigo

Detonation said:


> Did you use the method posted by Schoat333 to get SystemUI to decompile?


No, that's too much work for me.....lol

I just downloaded the latest sdk and took the new aapt.exe file and placed it in the "other" folder in APK Manager/APK Multi-Tool. I then added framework-res.apk to apktool as Schoat333 said ("apktool if framework-res.apk").

That was it, decompile and compile with ease.


----------



## Schoat333

bouchigo said:


> No, that's too much work for me.....lol
> 
> I just downloaded the latest sdk and took the new aapt.exe file and placed it in the "other" folder in APK Manager/APK Multi-Tool. I then added framework-res.apk to apktool as Schaot said ("apktool if framework-res.apk").
> 
> That was it, decompile and compile with ease.


Weird, I got the new aapt, but that doesn't work for me. What OS are you in? I'm using crappy XP on my work computer, so that may be why.


----------



## bouchigo

Schoat333 said:


> Weird, I got the new aapt, but that doesn't work for me. What OS are you in? I'm using crappy XP on my work computer, so that may be why.


I'm on Windows 7 64-bit.


----------



## cubsfan187

I was just going to start a thread about this. I wanted to make a 1% mod for JB as well. Any one out there willing to share their work? I hate the stock battery. Since day 1 of this phone...lol.

EDIT: We need some of those mods like when the Nexus first came out and we were all changing the nav buttons and battery icons the same day. Until source came out and then it was all cooked into the roms.


----------



## Detonation

Well I'm making progress. Installed the lastest SDK and grabbed the new new files. Still didn't work with APKManager but I figured its time to finally upgrade so I go ApkMultiTool instead. Decompiling worked but now compiling won't, I get "7za is not a recognized command" so something is messed up with my setup I guess. I think I'm just gonna uninstall everything and try again. I had it installed to my C:/Program Files which might also be causing issues due to security, gonna put it on my D: drive now.


----------



## bouchigo

Detonation said:


> Well I'm making progress. Installed the lastest SDK and grabbed the new new files. Still didn't work with APKManager but I figured its time to finally upgrade so I go ApkMultiTool instead. Decompiling worked but now compiling won't, I get "7za is not a recognized command" so something is messed up with my setup I guess. I think I'm just gonna uninstall everything and try again. I had it installed to my C:/Program Files which might also be causing issues due to security, gonna put it on my D: drive now.


This is what I'm using on my work computer if you want to give it a try to see if it works for you. It's APK Manager 5.0.2, and I've included my 1.apk file. Just make sure you set the varables path to point to the "other" folder wherever it is you put the APK Manager 5.0.2 folder, and put the 1.apk file where it belongs. Maybe make a backup of your current 1.apk file too.

MD5: 4987d6c59c96f358b43b46e060281853
http://www.mediafire.com/?3wcbpr94u0kbb3d


----------



## Detonation

bouchigo said:


> This is what I'm using on my work computer if you want to give it a try to see if it works for you. It's APK Manager 5.0.2, and I've included my 1.apk file. Just make sure you set the varables path to point to the "other" folder wherever it is you put the APK Manager 5.0.2 folder, and put the 1.apk file where it belongs. Maybe make a backup of your current 1.apk file too.
> 
> MD5: 4987d6c59c96f358b43b46e060281853
> http://www.mediafire.com/?3wcbpr94u0kbb3d


Thank you!! I compared your folder with mine and the only difference was my apktool.jar. I used yours and everything is good to go now. Where did you get that apktool.jar from? The one I had was from the latest apktool release on their website, but yours appears to be newer.

Anyways, flashable 1% battery mods will be coming shortly! And possibly extra nav keys if I can figure that out!


----------



## bouchigo

Detonation said:


> Thank you!! I compared your folder with mine and the only difference was my apktool.jar. I used yours and everything is good to go now. Where did you get that apktool.jar from? The one I had was from the latest apktool release on their website, but yours appears to be newer.
> 
> Anyways, flashable 1% battery mods will be coming shortly! And possibly extra nav keys if I can figure that out!


Honestly I don't remember where I got the apktool.jar from







Anyway, glad you go it working for you now.

The nav buttons shouldn't be too difficult. You will just have to edit some smali in the Navigation smali file, and the navigation bar xml in layout.


----------



## Schoat333

That was it for me too. I had the APKtool.jar version from 12/7/2011. The one you posted is from 1/22/2012.


----------



## jdkoreclipse

anyone get the apks to actually work? I compiled framework-res and systemUI and flashed them on a clean flash in my rom. It didnt boot just hung on the nexus X logo. But dirty flashing worked fine.


----------



## yarly

I would avoid using anything else and just use smali/baksmali directly. It's the most updated tool out there.

http://code.google.com/p/smali/


----------



## bouchigo

jdkoreclipse said:


> anyone get the apks to actually work? I compiled framework-res and systemUI and flashed them on a clean flash in my rom. It didnt boot just hung on the nexus X logo. But dirty flashing worked fine.


I got them to work just fine. I posted some screenshots on page 1 of this thread. I modded and installed framework-res.apk, SystemUI.apk, and Launcher2.apk successfully.

Sent from my Galaxy Nexus using RootzWiki


----------



## thepsyntyst

bouchigo said:


> I got them to work just fine. I posted some screenshots on page 1 of this thread. I modded and installed framework-res.apk, SystemUI.apk, and Launcher2.apk successfully.
> 
> Sent from my Galaxy Nexus using RootzWiki


any way you could guide me on the smali edit for the menu key?


----------



## veloz46

Hello friends!

Tomorrow will upload a tutorial to compile / decompile JB apk without problems.

Greetings!


----------



## bouchigo

veloz46 said:


> Hello friends!
> 
> Tomorrow will upload a tutorial to compile / decompile JB apk without problems.
> 
> Greetings!


I think they've got it figured out, that's why there really hasn't been much movement lately on this thread. But, knock yourself out, it may help others


----------



## Leandros

Meh. Can't recompile my SystemUi.apk. (also without my changes)
I can decompile it with the newest aapt.exe and the newest apktool (didn't use ApkMultiTool or something else) but can't recompile it.

I tried the ApkMultitool from site 2, but with this tool I cant even decompile my the apk's 
Any help?

With your newer apktool.jar I get this error:



Code:


<br />
C:\Users\Leandros\Desktop\decompile>apktool d SystemUi.apk<br />
I: Baksmaling...<br />
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78<br />
0a 30 33 35 00<br />
		at org.jf.dexlib.DexFile.<init>(DexFile.java:377)<br />
		at org.jf.dexlib.DexFile.<init>(DexFile.java:274)<br />
		at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)<br />
		at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)<br />
		at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)<br />
		at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)<br />
		at brut.apktool.Main.cmdDecode(Main.java:128)<br />
		at brut.apktool.Main.main(Main.java:65)<br />

Schoat333's method didn't work for me, as well...


----------



## RoLa

Leandros said:


> Meh. Can't recompile my SystemUi.apk. (also without my changes)
> I can decompile it with the newest aapt.exe and the newest apktool (didn't use ApkMultiTool or something else) but can't recompile it.
> 
> I tried the ApkMultitool from site 2, but with this tool I cant even decompile my the apk's
> Any help?
> 
> With your newer apktool.jar I get this error:
> 
> 
> 
> Code:
> 
> 
> <br />
> C:\Users\Leandros\Desktop\decompile>apktool d SystemUi.apk<br />
> I: Baksmaling...<br />
> Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78<br />
> 0a 30 33 35 00<br />
> at org.jf.dexlib.DexFile.<init>(DexFile.java:377)<br />
> at org.jf.dexlib.DexFile.<init>(DexFile.java:274)<br />
> at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)<br />
> at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)<br />
> at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)<br />
> at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)<br />
> at brut.apktool.Main.cmdDecode(Main.java:128)<br />
> at brut.apktool.Main.main(Main.java:65)<br />
> 
> Schoat333's method didn't work for me, as well...


With bad magic value, nuke classes.dex and try recompiling. If you need to break a .dex file down, use smali/baksmali for that.


----------



## veloz46

Hello!

If you use apkmanager, ensures that the framework-res.apk is that of the same rom.

If it still gives you problems, eliminates the apk clases.dex, and compile / descompilas and return to put the clases.dex

I spent a apkmanager I do not get compile problems. but of course, is not safe at all apk.

If you get problems. Framework-res.apk grabs the rom. rename to 1.apk
and paste in:

apkManager-JB/other/

and try again.

LINK

Greetings!


----------



## Leandros

Veloz, you're my Hero! IT WORKS! 
Thanks you so much!

Edit: Ok, SystemUi.apk works fine. But framework-res.apk won't recompile.



Code:


<br />
--------------------------------------------------------------------------<br />
|04.07.2012 -- 15:41:50,34|<br />
--------------------------------------------------------------------------<br />
java version "1.6.0_33"<br />
Java(TM) SE Runtime Environment (build 1.6.0_33-b03)<br />
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)<br />
W: Could not find sources<br />
I: Checking whether resources has changed...<br />
I: Building resources...<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-ar\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-ar\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-bg\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-bg\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-ca\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-ca\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-cs\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-cs\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-da\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-da\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-de\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-de\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-el\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-el\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-en-rGB\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-en-rGB\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-es\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-es\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-es-rUS\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-es-rUS\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-fa\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-fa\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-fi\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-fi\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-fr\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-fr\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-hr\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-hr\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-hu\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-hu\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-in\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-in\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-it\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-it\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-iw\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-iw\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-ja\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-ja\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-ko\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-ko\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-lt\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-lt\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-lv\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-lv\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-nb\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-nb\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-nl\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-nl\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-pl\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-pl\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-pt\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-pt\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-pt-rPT\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-pt-rPT\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-ro\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-ro\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-ru\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-ru\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-sk\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-sk\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-sl\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-sl\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-sr\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-sr\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-sv\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-sv\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-th\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-th\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-tl\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-tl\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-tr\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-tr\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-uk\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-uk\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-vi\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-vi\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-zh-rCN\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-zh-rCN\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-zh-rTW\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?<br />
C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res\values-zh-rTW\plurals.xml:79: error: Found tag </item> where </plurals> is expected<br />
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Leandros\AppData\Local\Temp\APKTOOL1331987006658251541.tmp, -x, -S, C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res, -M, C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\AndroidManifest.xml]<br />
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)<br />
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)<br />
at brut.androlib.Androlib.buildResources(Androlib.java:248)<br />
at brut.androlib.Androlib.build(Androlib.java:171)<br />
at brut.androlib.Androlib.build(Androlib.java:154)<br />
at brut.apktool.Main.cmdBuild(Main.java:182)<br />
at brut.apktool.Main.main(Main.java:67)<br />
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Leandros\AppData\Local\Temp\APKTOOL1331987006658251541.tmp, -x, -S, C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\res, -M, C:\Users\Leandros\Desktop\apkManager-JB\other\..\projects\framework-res.apk\AndroidManifest.xml]<br />
at brut.util.OS.exec(OS.java:83)<br />
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)<br />
... 6 more<br />


----------



## pellegrini

@leandros

There's a guide somewhere here or on xda that has a fix for recompiling 4.0.4 framework-res.apk and it should work for jb in this case. I ran into the same errors you did last week, basically you have to write down all the plural files that are showing errors in your terminal and edit individually. I had about 20 plural.xml files I had to edit. On line 79 each one was missing a % symbol. So I added a % symbol in front of the %d on line 79 to make it %%d in each plural that had an error, and it compiled with no errors.


----------



## akellar

New apktool found here - http://forum.xda-developers.com/showthread.php?t=1755243 - I haven't tested it yet but the idea is for it to work with ICS and I assume JB.


----------



## Gunthermic

I have had no issues. Used apktool 1.4.3 for Framework,Gallery and apktool 1.4.4 for all other apps.


----------



## pellegrini

I believe this is only an issue using apkmanager, I never had any trouble with apktool either.


----------



## Detonation

Tried decompiling some of the 4.1.1 source built apks and was getting the same errors I was when first trying, though the other JB ones still worked. Switched back to my ICS "version" of APKManager (with the other apktool.jar file) and now the 4.1.1 work on that haha.


----------



## bouchigo

Detonation said:


> Tried decompiling some of the 4.1.1 source built apks and was getting the same errors I was when first trying, though the other JB ones still worked. Switched back to my ICS "version" of APKManager (with the other apktool.jar file) and now the 4.1.1 work on that haha.


I'm using the apktool.jar v1.4.7 and it worked just fine. Didn't have to back to what I was using with ICS.


----------



## m.alkhalel

Detonation said:


> Tried decompiling some of the 4.1.1 source built apks and was getting the same errors I was when first trying, though the other JB ones still worked. Switched back to my ICS "version" of APKManager (with the other apktool.jar file) and now the 4.1.1 work on that haha.


I tried the ICS apktool & the v1.4.7 but on both them i keep getting this error in multiple files "Found tag </item> where </plurals> is expected" I'm using the aapt from latest SDK as well.... What exactly did you do?


----------



## pellegrini

m.alkhalel said:


> I tried the ICS apktool & the v1.4.7 but on both them i keep getting this error in multiple files "Found tag where is expected" I'm using the aapt from latest SDK as well.... What exactly did you do?


I posted a fix on the previous page, manually edit all the plural files that have errors, on line 79( I think that's the one) you will see something like % of %d you must change it to % of %%d in every plural that has errors and it will compile.


----------



## powerpoint45

I just made a full tutorial on this http://forum.xda-developers.com/showthread.php?t=1814441


----------



## Annex

I can decompile all jellybean apks... The thing you need to do it update your SDK and copy over the aapt.exe, adb.exe, AdbWinApi.dll and AdbWinUsbApi.dll and overwrite the old files in the APK MANAGER or APKTOOL... whatever you use.


----------

