# help with hazmatic template



## bretth18

So i went into the template, colored some of the icons in the res file. When i put this into eclipse i get one error. what do i do in eclipse. do i have to change package name or something?


----------



## Skurtz1313

you can not build theme engine in eclipse


----------



## Stetsonaw

Can you link to the Template? I'll take a look at it to see what i can find, but iirc, it's just an apk that you decompile and modify.


----------



## bretth18

https://github.com/haxzamatic/Templatebread-
If i cant theme in eclipse how do i do it? im so confused


----------



## Stetsonaw

After you make your changes, compile it with APK Manager.
A good post to get you started.
http://forum.xda-developers.com/showthread.php?t=964391


----------



## cush2push

bretth18 said:


> https://github.com/haxzamatic/Templatebread-
> If i cant theme in eclipse how do i do it? im so confused


there are 2 options you grab a compiled template and decomile with apk manager or compile with linux


----------



## bretth18

how do i compile with apk manager


----------



## Stetsonaw

The link i gave you above has the compiled template.

APK Manager Tutorial


----------



## bretth18

alright i did all of this, threw it in eclipse, packaged it, signed it, and thats where everything blows up. I choose the theme, and immediately every app known to man kind force closes and the notification bar goes boom boom. All my theme contains is some red icons!


----------



## JsinLegacy

Brett there is no need to place it in eclipse at all .. it cannot build the theme ... use APK Manager or APKTool to decompile it and make changes.. then compile with APK Manager or APKTool... APK Manager will sign the apk for you once you compile it.. well you have to choose the option.. basically its 9 decompile 11 compile 12 sign .. pretty easy... if you use APKTool to decompile and compile then you will need to use jar signer to sign the apk.


----------



## bretth18

Jsin, I bow down to you. I used APK Manager, but i get a error when i try to compile the file.


----------



## Stetsonaw

Post up the last entry in the log file from when you started the compile.

Sent from 1885


----------



## bretth18

http://www.mediafire.com/?hynsjlylyydf6c3
here, i uploaded full log file


----------



## Stetsonaw

Looks like you are missing your 1.apk file.

Copy the apktool.jar from the others folder in apk manager, and the framework-res.apk from CM7 to the c:/ (not in a folder), make sure nothing is selected, then hold Shift and right-click in open space, then select "Open Command Prompt this Location".

Type this command: java -jar apktool.jar if framework-res.apk
This will create the 1.apk that you need to decompile properly, which you need to be able to compile.

You will need the Java JRE installed. Not at my computer to get you the link, so just Google it. Let us know how it goes.

Sent from 1885


----------



## JsinLegacy

Are you editing any xmls or just exchanging images...


----------



## bretth18

just exchanging images


----------



## Stetsonaw

Well if that's all, j Judy drop then into the apk, without decompiling it. Unless you are modifying .9.pngs as well. Those need to be modified while decompiled because of the guides.

Sent from 1885


----------



## JsinLegacy

You can compile 9.pngs in eclipse and then drop them in....use 7-Zip to open the apk and then swap out images in the corresponding folders then close it up and save...oh delete the META-inf folder then use jar signer to sign it and it should install like a normal apk


----------



## Stetsonaw

i take it that apkmanager automagically deletes the META-inf folder when it signs? I've never had to do that before.


----------



## Webst3r

Was going to say exactly what jsin said. Just open it in 7-zip and swap the images.

I have a video tutorial on this, and .9.pngs. (The second tutorial on .9s needs to be updated though.)

http://rootzwiki.com/entry.php?14-HOW-TO-VIDEO-Basic-Themeing-Getting-your-imges-into-an-.apk


----------



## Trenton

Why use 7z if he already has apkmanager up and running?. If you mess with an apk in 7z you're gonna have to sign it too, right. All this can be done in apkmanager. My2¢.

Sent from my DROIDX using Tapatalk


----------



## Stetsonaw

True story, +more control with apk_manager.


----------



## JsinLegacy

Apk manager does do it all for you...but he was having issues getting it to compile...the 7-Zip method is an alternative method when just wanting to swap images out.... technically you don't have to sign it if you are placing it in an update.zip folder...however if you want to install as a normal apk then yes you will have to sign it.....

Stet apk manger does all this for you as far as signing....so technically you could place the apk in apk manager and just use it to sign it after exchanging the images using 7-Zip

Removing the meta-inf was a trick used when i started before all these fancy new tools came out ...but these things do make it so much nicer to do things


----------



## Webst3r

If he's themeing a market app, than forget what I said. Sorry if I caused any confusion. Thought it might have been a system app.


----------



## bretth18

Nope im not themeing a market app, trying to theme cm7


----------



## Stetsonaw

which will need to be signed, as it needs to be installed.


----------



## bretth18

so no 7zip. just apk manager rite?


----------



## Stetsonaw

If you're just doing png drop ins, you can use 7zip, just drop it into apk_manager's "Place-apk-here-for-signing" folder, and use option 16 (dependent on your version of apk_manager), Batch Sign APK.


----------



## bretth18

so i drop the whole drawable folder in place here for signing?


----------



## Stetsonaw

place the completed apk in there for signing. No need to delete the meta-inf folder, as the tool takes care of that for you.


----------



## Webst3r

bretth18 said:


> so i drop the whole drawable folder in place here for signing?


Open the apk in 7-zip, put all the images you;ve edited into their respective folders. Sign it with apk manager (option 16 like Stetsonaw said)


----------



## bretth18

ahhhhhh. so confused. so i decompiled apk, then i go to projects file, replace those images, then go back to scriptm compile the apk, then sign it?


----------



## bretth18

Would this whole process be easier if i made this a flashable .zip? if so, how the hell do i do that


----------



## Dewguzzler

i dont believe you can make a zip to install the apk. its basically an app that theme chooser tells the system to use the images from kinda like ninja/meta morph. a theme that uses a .zip would have to be made for each rom since the framework should be a lil different. someone can correct me if im wrong tho


----------



## bretth18

Dude i dont mean to be a ass, but make your own thread bro


----------



## RoLa

Deleted


----------



## Stetsonaw

It's not necessarily two threads about the same thing, as they are two different aspects of the theme chooser. 1 of you is hacking it apart and putting it together like most of us (and in windows), and the other is building from sauce in linux. so two threads would make sense.


----------



## bretth18

Stetsonaw said:


> It's not necessarily two threads about the same thing, as they are two different aspects of the theme chooser. 1 of you is hacking it apart and putting it together like most of us (and in windows), and the other is building from sauce in linux. so two threads would make sense.


on that note, if someone could help me set up everything for apk manager and apk tool on windows 7, that wud be awsome


----------



## Webst3r

bretth18 said:


> on that note, if someone could help me set up everything for apk manager and apk tool on windows 7, that wud be awsome


Just download APK Manager. The script is pretty self-explanatory. If you have issues with that, then come back, and I'll help you with APK Tool.


----------



## RoLa

Deleted


----------



## AntwonJenkins

This is the errors I got after just switching a couple images and trying to recompile with APKtool:

[*] "C:\Documents and Settings\Anthony\Desktop\Android Crap\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme" 
recompiling "C:\Documents and Settings\Anthony\Desktop\Android Crap\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme"... 
I: Smaling...
I: Building resources...
Exception in thread "main" (skipping index file 'C:\Documents and Settings\Anthony\Desktop\Android Crap\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme\res\drawable\Thumbs.db')
(skipping index file 'C:\Documents and Settings\Anthony\Desktop\Android Crap\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme\res\drawable-hdpi\Thumbs.db')
(skipping index file 'C:\Documents and Settings\Anthony\Desktop\Android Crap\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme\res\drawable-hdpi-finger\Thumbs.db')
(skipping index file 'C:\Documents and Settings\Anthony\Desktop\Android Crap\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme\res\drawable-land-hdpi\Thumbs.db')
C:\Documents and Settings\Anthony\Desktop\Android Crap\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme\res\values\public.xml:1592: error: Public symbol style/Templatebread declared here is not defined.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\Anthony\LOCALS~1\Temp\APKTOOL2857309209796871743.tmp, -x, -I, C:\Documents and Settings\Anthony\apktool\framework\1.apk, -S, C:\Documents and Settings\Anthony\Desktop\Android Crap\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme\res, -M, C:\Documents and Settings\Anthony\Desktop\Android Crap\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\Anthony\LOCALS~1\Temp\APKTOOL2857309209796871743.tmp, -x, -I, C:\Documents and Settings\Anthony\apktool\framework\1.apk, -S, C:\Documents and Settings\Anthony\Desktop\Android Crap\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme\res, -M, C:\Documents and Settings\Anthony\Desktop\Android Crap\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
The system cannot find the drive specified.

what am I doing wrong?


----------



## JsinLegacy

are the images named the same and did you add extra ones? also did you try swapping out .9 images and the new ones not have the guides?


----------



## AntwonJenkins

the images were the same name, same size, same everything just a different color and none of them were .9's (which I am also familiar with and haven't had to much trouble with them so far)


----------



## AntwonJenkins

trial run #100, this time around got:

[*] C:\Android\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme 
recompiling C:\Android\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme... 
W: Could not find sources
I: Building resources...
(skipping index file 'C:\Android\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme\res\drawable\Thumbs.db')
(skipping index file 'C:\Android\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme\res\drawable-hdpi\Thumbs.db')
I: Building apk file...
The system cannot find the drive specified.

What does 'The system cannot find the drive specified' mean? What is it looking for? Where do I specify it?


----------



## AntwonJenkins

What I really need is help with compiling CM7 themes on a windows computer running windows XP. I have a apk_manager and autoAPKtool installed and can at least semi work both. I use apk_manager to decompile and compile go launcher stuff all day long but for the life of me can't get a cm7 theme to completely work correctly. Every time the main issue I keep having is the theme preview and name in the Theme Chooser app when you go to select the theme is blank. The picture is blank (black) and the name says "string/theme_name" even though these things have been changed and should show correctly. Does anyone have any ideas, any pointers, anything?! It would be a huge help!


----------

