# 4.0.3 Theme Set up and help - APKTOOL



## bignasty407 (Jun 24, 2011)

I use APKtool in the past for decompile/recompile of my themes, i have SDK installed and APKTOOl placed in the proper folder tree that i need it to be, but when i go to compile any app, system app or even a regular app it will never compile, i was curious as to what you guys who are crankin out the themes are working with, because i have themes ready to be tested, once i can get them to compile, if anyone is available to help me i would greatly appreciate it.


----------



## Trenton (Jun 7, 2011)

T_T hmmm what happens during the compile? does it just hang or does it throw errors? Post up the error messages.

I use Apk manager on OS X

Sent from my Galaxy Nexus using Tapatalk


----------



## bignasty407 (Jun 24, 2011)

Throws Errors. here ya go...

C:\Users\user\Desktop\New folder>apktool b systemui.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
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.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more


----------



## Nelboy (Jul 16, 2011)

bignasty407 said:


> I use APKtool in the past for decompile/recompile of my themes, i have SDK installed and APKTOOl placed in the proper folder tree that i need it to be, but when i go to compile any app, system app or even a regular app it will never compile, i was curious as to what you guys who are crankin out the themes are working with, because i have themes ready to be tested, once i can get them to compile, if anyone is available to help me i would greatly appreciate it.


I had to swap out this file to get compiles to work properly on Windoze. Just use the latest apktool build and then replace the original aapt.exe file with this one: http://dl.dropbox.com/u/54679702/aapt.zip


----------



## runandhide05 (Sep 20, 2011)

how about for linux?
i had everything working perfeclt, when to changed something to be able to decomp framework, and now im getting a similar error
i cant seem to find aapt that will work.
here what it spits out at me
[email protected]:~/apktool$ apktool b '/home/zach/apktool/zygot1.8-SystemUI.apk'
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
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.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
[email protected]:~/apktool$


----------



## bignasty407 (Jun 24, 2011)

same issues asbfore, even with the new aapt. file you provided.


----------



## Nelboy (Jul 16, 2011)

runandhide05 said:


> same issues asbfore, even with the new aapt. file you provided.


The apktool.yml file that's showing up in your errors appears to be created during the decompile process. If anything goes wrong during the decompile that file will get borked. If that happens you won't be able to recompile.
I'd try saving your changes somewhere and decompiling again. Modify that and see if it will recompile.

p.s.
Are you compiling to a different filename than what was decompiled from? If so try using the same name and see what happens.


----------



## Trenton (Jun 7, 2011)

So I tried to mess with systemui from 403...I got errors on the decompile but it went through, edited some images, compiled just fine...but when I pushed them to my system on my nexus I had no status bar or nav bar....it was kind of nice...had the whole screen









anyways heres my log from apkmanager on OS X



> decompile function
> decomp_ext_test ("apk" or "jar" file test) function
> project is an apk file, launching decomp_apk subroutine
> decomp_apk, actually decompiling now
> ...


and the compile


> compile (main) function
> compile_apk, (compile with apktool) function
> comp_apkt, actually compiling now
> Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
> ...


----------



## Nelboy (Jul 16, 2011)

Also, if you're moving files around after decompiling, make sure that the apktool.yml file that was created during the decompile is still in the root of your source directory you are compiling.


----------



## altimax98 (Jul 14, 2011)

Try this. Search apktool on google and Download the last file on the list. It is a tar.gz file. Unzip it and place the apktool.jar file into the 'other' folder in apkmanager. Make sure you also update the aapt file and if its windows also download the windows version and update the .bat file as well..

I've been using apk-multi tool and this fixed the decompile/compile issues for me on ICS system files.

3 files your going to update-

1 - apktool.bat (windows)
2 - apktool.jar 
3 - aapt

Sent From Nexi - The Galaxy Nexus


----------



## runandhide05 (Sep 20, 2011)

Nelboy said:


> The apktool.yml file that's showing up in your errors appears to be created during the decompile process. If anything goes wrong during the decompile that file will get borked. If that happens you won't be able to recompile.
> I'd try saving your changes somewhere and decompiling again. Modify that and see if it will recompile.
> 
> p.s.
> Are you compiling to a different filename than what was decompiled from? If so try using the same name and see what happens.


ok here is the quick run down,
i had everything set up just fine, themed about 60 systemui.apks not a problem, i decided it was time to theme some framework-res.apk
for some reason it would fail each time, did some research found what was said to be the right aapt and apktool.jar, moved them to path, decomped framework, no problemish... when i went to build the exact framework the size was smaller by about half, noticed it was no working properly, so went back to work on some more systemui's and i could not decompile, downloaded the newest apktool, apktool.jar and aapt. and got the message above,
now what u had said about possible bad decomp and the yml files, i compared them to my systemuis that i had decomped before disaster and their are identical. and i also tried to rebuild the old systemui that i had decopmed before, still same error.
this has got me puzzled
about filenames, ive tried simple decomp and recomp the exact same file without making a single change, still same error.

again, im sure u can tell by the error but i am on linux ubuntu 11.04 (i think thats the newest version) and 64bit
i jumped over to windows, for test purpused, and i am able to decomp and recomp the exact same files without a problem, ( just to check and make sure my apks did not get corrupt) but il be damned if A) i can remember how to sign an apk in windows







really...do i want to working in windows...NO lol
any futher help woulb be GREAT,
o one more thing, as another form of trouble shooting i have DT send me his exact aapt, apktool.jar and apktool script which he has been using on his laptop for 4.0.3 and it still did not work.
so again i say... im puzzled


----------



## runandhide05 (Sep 20, 2011)

altimax98 said:


> Try this. Search apktool on google and Download the last file on the list. It is a tar.gz file. Unzip it and place the apktool.jar file into the 'other' folder in apkmanager. Make sure you also update the aapt file and if its windows also download the windows version and update the .bat file as well..
> 
> I've been using apk-multi tool and this fixed the decompile/compile issues for me on ICS system files.
> 
> ...


how about a link, cause my "google" found no such tar


----------



## Nelboy (Jul 16, 2011)

runandhide05 said:


> ok here is the quick run down,
> i had everything set up just fine, themed about 60 systemui.apks not a problem, i decided it was time to theme some framework-res.apk
> for some reason it would fail each time, did some research found what was said to be the right aapt and apktool.jar, moved them to path, decomped framework, no problemish... when i went to build the exact framework the size was smaller by about half, noticed it was no working properly, so went back to work on some more systemui's and i could not decompile, downloaded the newest apktool, apktool.jar and aapt. and got the message above,
> now what u had said about possible bad decomp and the yml files, i compared them to my systemuis that i had decomped before disaster and their are identical. and i also tried to rebuild the old systemui that i had decopmed before, still same error.
> ...


I'm by no means a linux expert so this may be nonsense but could there possibly be a permission issue with the apktool files or folders on your ubuntu install after you changed it up for the framework stuff? I watched a tutorial earlier on setting up apktool on Linux Mint and he had to change the owner and permissions for the files and folders he downloaded to get it to work properly. Just a thought.


----------



## runandhide05 (Sep 20, 2011)

Nelboy said:


> I'm by no means a linux expert so this may be nonsense but could there possibly be a permission issue with the apktool files or folders on your ubuntu install after you changed it up for the framework stuff? I watched a tutorial earlier on setting up apktool on Linux Mint and he had to change the owner and permissions for the files and folders he downloaded to get it to work properly. Just a thought.


changed, to r/w on all three still no love
is the yml file created by the apktool.jar or the apktool script?


----------



## Nelboy (Jul 16, 2011)

runandhide05 said:


> crap i did not think of that, but i havent a clue how or what to change it to or try to change it to


Here is the video I watched. 



 maybe it'll help?


----------



## altimax98 (Jul 14, 2011)

runandhide05 said:


> crap i did not think of that, but i havent a clue how or what to change it to or try to change it to


On windows you can use apk multi tool for signing an apk, or I put it on a shared drive and use the kitchen to sign an entire system app folder.

Also is your path right?

I'm mobile and can't get the link but its the last file on the list on the left on the apk-tool google site

Sent From Nexi - The Galaxy Nexus


----------



## Nelboy (Jul 16, 2011)

Sorry. Didn't realize it would put the video in the post just by putting in the url! ^^^^^^^^^^^


----------



## ro6666lt (Sep 2, 2011)

The theme subforum is reserved for releases. moved over to gnex(cdma) general.


----------



## RMarkwald (Oct 19, 2011)

Nevermind, Nelboy already covered it.


----------



## Fatsix (Dec 19, 2011)

Nelboy said:


> I had to swap out this file to get compiles to work properly on Windoze. Just use the latest apktool build and then replace the original aapt.exe file with this one: http://dl.dropbox.co...679702/aapt.zip


F*cking Finally!
Thank you so much. I have been ripping my hair out for 3 days, with this basatard compile error. This file fixed the error. Even downloading the latest Apktools appt.exe, 5/15/11 didnt fix it. Huge relief!


----------

