[Tutorial] Customize your battery mod! - Vibrant Themes and Apps

It's impossible to please everyone and everyone has their personal preferences. This tutorial is for when rom devs don't make what you want! As the title says it's just for battery mods but you can apply this to almost anything to get what you want. I'm going to try and make this as easy as possible. From start to finish. Please read the whole post! I hope this helps at least someone~
First things first. You need to go and download 7zip. Ok.
Now you need to go and find which battery icon images you'd like. For this example, we're going to download the Trigger theme kit. Click here to download. In the kit, I have 3 sets of battery images you can choose from. Let's do it with the semi-accurate batteries.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Conveniently, I have already named them properly for you! These names are pretty consistent throughout all the Vibrant ROMs I believe, but just be aware that it depends on the framework and the accurate battery mod built into the framework.
Next we need the framework to place these in. I'm going to use Trigger as an example. But you can use any ROM or framework. So if you are using it from a ROM, you need to first open it.
I'd suggest you familiarize yourself with this structure if you already don't know it! Just poke around and see what's where.
Next navigate to the system directory, then framework. Here's what you should see.
The images for the batteries (along with most other system related images) are in framework-res.apk. Pull it out to a new directory. I've got it in the same directory as my theme kit.
After that, you need to right click on the APK and go to the 7-zip option and click open archive.
Many of you probably already know this, but too much information never hurts! APKs are basically renamed zip files. When they are compiled all the files inside are compiled into binary format so you cannot edit them unless you decompile the framework. The exception are images. This is why we can do this and edit them without having to make a new file. We can just open it and replace what we want and replace it back!
Ok so next, after you open it you'll see a couple directories. You need to go to the res directory. In here are more folders! You want to find one that is named drawable-hdpi or drawable-hdpi-v4. In here is the jackpot. You will find the battery images in there, too.
Now here's the magic! Select all the images from the batt_semi-accurate batteries folder and drag them into the opened zip archive (into the res/drawable-hdpi folder)!
7zip will pop up a dialog asking if you want to overwrite or something. Click yes.
Now your framework is ready to be put on your phone!
You can do this one of two ways. Either make a flashable for your phone. Or transfer it via adb in recovery. I like doing method b but I'll briefly go over both.
method A:
I've attached a flash.zip. It contains the new framework I've gone over how to make in this tutorial. Only it is flashable. You can either use it (but replacing the framework-res.apk with the one you're working with) or you can take some time to learn how it's made!
*I made this flashable zip with my ACS tool (link in sig). You can do the same! Open the tool, go to options, make sure you click the checkbox next to system, close options. Click generate zip. You now have an empty flashable zip. You needed to click the systme checkmark because now it knows to transfer anything in the system directory in the zip file to the system directory on your phone. So basically you need to replicate the directory structure. If you open my zip you can see I've done so.
method B:
You need to know how to use adb and command line somewhat to do this. This isn't an ADB guide so please google one to brush up.
Boot your phone into clockwork recovery. And open up a new command line. You need to get into the same folder where your new framework-res.apk is.
commands are pretty basic, cd to change directory.
next you need to run the command to push the file onto the right place on your phone
Code:
adb push framework-res.apk /system/framework/
that should do the trick. it should say transferred in x seconds blah blah. once that's done. reboot. done.

Hi,
Thank you for the info. I have tried this method with original ROM framework-res.apks and THEME framework-res.apks. The only one that I got to function was Glasstopia. The other ones have always caused a boot-loop after getting to the main screen. Some people have responded that it was maybe faulty png files and some say that it was caused by something in the xmls. I just thought this was important to mention.

This is exactly what I wanted but I have a few questions. I have created a theme but when I added the battery images that wanted in there I found that it only decreases in 20% intervals and I want it to decrease in 1% intervals. Im assuming that the theme I based it off of had it in that interval. Any help is greatly appreciate it.
Sent from my SGH-T959 using XDA App

MeximCivic said:
This is exactly what I wanted but I have a few questions. I have created a theme but when I added the battery images that wanted in there I found that it only decreases in 20% intervals and I want it to decrease in 1% intervals. Im assuming that the theme I based it off of had it in that interval. Any help is greatly appreciate it.
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
You'd need to modify Stat_Battery.xml and Stat_Battery_Charge.xml in /res/drawable/
In order to do this you must first decompile (not unzip) the framework.

MWBehr said:
You'd need to modify Stat_Battery.xml and Stat_Battery_Charge.xml in /res/drawable/
In order to do this you must first decompile (not unzip) the framework.
Click to expand...
Click to collapse
Correct me if I'm wrong, but I believe entries need to be made to the public.xml to account for the new images added to the framework as well. Thats been my biggest hindrance in brining an accurate battery to loki, I always borke the public.xml entries. Ive booted without adding those lines and had no battery at all. Again, I may be wrong but I think those entries are necessary.
Sent from my Loki powered Vibrant on the XDA App

Br1cK'd said:
Correct me if I'm wrong, but I believe entries need to be made to the public.xml to account for the new images added to the framework as well. Thats been my biggest hindrance in brining an accurate battery to loki, I always borke the public.xml entries. Ive booted without adding those lines and had no battery at all. Again, I may be wrong but I think those entries are necessary.
Sent from my Loki powered Vibrant on the XDA App
Click to expand...
Click to collapse
Not if you're compiling it. Public.xml (or realistically resources.arsc) is updated automatically with any new additions to the drawable folders.

MWBehr said:
Not if you're compiling it. Public.xml (or realistically resources.arsc) is updated automatically with any new additions to the drawable folders.
Click to expand...
Click to collapse
I never knew that, I thought it had to be edited prior to compiling. (Facepalm) Behr, I may end up picking your brain on a couple more framework questions one of these days. And never officially said it, welcome to the team!
Sent from my Loki powered Vibrant on the XDA App

Br1cK'd said:
I never knew that, I thought it had to be edited prior to compiling. (Facepalm) Behr, I may end up picking your brain on a couple more framework questions one of these days. And never officially said it, welcome to the team!
Sent from my Loki powered Vibrant on the XDA App
Click to expand...
Click to collapse
Thanks I feel I should clarify, if you're needing to reference these new pngs in the classes.dex, then it would become neccessary to make the addition.

That brings up an interesting question I ran into a couple versions back. I took my framework, still compiled, added in the pngs I wanted to use for my battery, both necessary battery xmls provided by the creator of that particular mod, and pushed, when I rebooted I had no battery image at all. Booted without error, and the best battery mod ever, infinite! I almost released it as a joke. Then grumbled back to the lab in a vain attempt to fix it. I figured the only thing that could have been amiss was the public.xml entries. Could there have been a more obvious culprit that I overlooked?
Sent from my Loki powered Vibrant on the XDA App

Br1cK'd said:
That brings up an interesting question I ran into a couple versions back. I took my framework, still compiled, added in the pngs I wanted to use for my battery, both necessary battery xmls provided by the creator of that particular mod, and pushed, when I rebooted I had no battery image at all. Booted without error, and the best battery mod ever, infinite! I almost released it as a joke. Then grumbled back to the lab in a vain attempt to fix it. I figured the only thing that could have been amiss was the public.xml entries. Could there have been a more obvious culprit that I overlooked?
Sent from my Loki powered Vibrant on the XDA App
Click to expand...
Click to collapse
It's an issue with the compiled xmls themselves I believe. Pushing xmls from another framework has always been hit and miss in my experience, and abandoned the proccess altogether awhile back. A guarantee you, however, that if you decompile both, copy over the xmls and pngs, and recompile, that you'll have no issue what-so-ever.

MWBehr said:
It's an issue with the compiled xmls themselves I believe. Pushing xmls from another framework has always been hit and miss in my experience, and abandoned the proccess altogether awhile back. A guarantee you, however, that if you decompile both, copy over the xmls and pngs, and recompile, that you'll have no issue what-so-ever.
Click to expand...
Click to collapse
Its the recompiling I can never seem to get, never boots when I do and leaves out the compiled xml every time I try. We'll have to jump on Gtalk or pm, so we dont hijack birgers thread here, sorry roman. if you use Gtalk feel free to add me from my addy in my profile, its always on on my phone.
Sent from my Loki powered Vibrant on the XDA App

Br1cK'd said:
Its the recompiling I can never seem to get, never boots when I do and leaves out the compiled xml every time I try. We'll have to jump on Gtalk or pm, so we dont hijack birgers thread here, sorry roman. if you use Gtalk feel free to add me from my addy in my profile, its always on on my phone.
Sent from my Loki powered Vibrant on the XDA App
Click to expand...
Click to collapse
Don't see an address in your profile
Anyway, here's the trick to get it to compile for ya:
1. Use APK Manager
2. Make sure all .9.pngs are ok (easy way to check this is scroll through and make sure you have a thumbnail for every image).
3. When compiling, hit "y" when it asks if it's a system apk and then "y" again to build the "keep" directory.
4. Go to the "keep" directory and delete ONLY what you changed (you also must delete resources.arsc if moddifying xmls, classes.dex if moddifying smali, and Meta-INF folder if modding AndroidManifest.xml)
5. Don't sign unless you modified AndroidManifest.xml
That's it, should work with uncommon exceptions. Let me know if those exceptions come up

Battery Indicator Decrease Intervals
I'm sorry but I'm still having trouble getting my theme to decrease in 1% intervals rather than the 20% intervals the ROM came with. I know they mentioned decompile the theme first then what?
I decompiled it with apk manager then i replaced the stat_sys_battery.xml and stat_sys_battery_charge.xml and recompiled it and signed it but when I flashed the theme now I don't have a battery indicator on my status bar lol!
Any help is greatly appreciate it! if it makes it easier my gtalk is shadow3166. Thanks!

MeximCivic said:
I'm sorry but I'm still having trouble getting my theme to decrease in 1% intervals rather than the 20% intervals the ROM came with. I know they mentioned decompile the theme first then what?
I decompiled it with apk manager then i replaced the stat_sys_battery.xml and stat_sys_battery_charge.xml and recompiled it and signed it but when I flashed the theme now I don't have a battery indicator on my status bar lol!
Any help is greatly appreciate it! if it makes it easier my gtalk is shadow3166. Thanks!
Click to expand...
Click to collapse
First, never resign.
Second, assuming you were following the steps I outlined above, are you sure you deleted the xmls from the keep directory?
Third, did you copy over the 120ish pngs for the battery icons?
If you did all that, upload your framework and let me have a look.

MWBehr said:
Don't see an address in your profile
Anyway, here's the trick to get it to compile for ya:
1. Use APK Manager
2. Make sure all .9.pngs are ok (easy way to check this is scroll through and make sure you have a thumbnail for every image).
3. When compiling, hit "y" when it asks if it's a system apk and then "y" again to build the "keep" directory.
4. Go to the "keep" directory and delete ONLY what you changed (you also must delete resources.arsc if moddifying xmls, classes.dex if moddifying smali, and Meta-INF folder if modding AndroidManifest.xml)
5. Don't sign unless you modified AndroidManifest.xml
That's it, should work with uncommon exceptions. Let me know if those exceptions come up
Click to expand...
Click to collapse
Sorry bout that I forgot I hid it in my profile. I'll pm you.
Those are my steps, I use apk manager and do remove the resources.arsc when editing the xmls. Compile without errors. If I decompile again, the edited xml is just not there. I'll figure it out sooner or later, other apks give me no issue, just framework.
Sent from my Loki powered Vibrant on the XDA App

Br1cK'd said:
Sorry bout that I forgot I hid it in my profile. I'll pm you.
Those are my steps, I use apk manager and do remove the resources.arsc when editing the xmls. Compile without errors. If I decompile again, the edited xml is just not there. I'll figure it out sooner or later, other apks give me no issue, just framework.
Sent from my Loki powered Vibrant on the XDA App
Click to expand...
Click to collapse
But you're also deleting the individual xmls right?

MWBehr said:
But you're also deleting the individual xmls right?
Click to expand...
Click to collapse
Yes, from the keep folder when compiling, and also deleting the resources when the xml that was edited is in there.
Got ya added to gtalk. Thx.
Sent from my Loki powered Vibrant on the XDA App

Sending Log.txt and Framework
Ok so I continued to use this procedure but keep getting errors on the 9.png there's errors that appear constantly. below is my log file and my framework-res.apk let me know what I'm doing wrong I just want to be able to recompile the .apk with the new status_sys_battery.xml and status_sys_battery_charge.xml
Thank You!!!!

MeximCivic said:
Ok so I continued to use this procedure but keep getting errors on the 9.png there's errors that appear constantly. below is my log file and my framework-res.apk let me know what I'm doing wrong I just want to be able to recompile the .apk with the new status_sys_battery.xml and status_sys_battery_charge.xml
Thank You!!!!
Click to expand...
Click to collapse
are you using the bionix framework as a base?

"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime."
Thanks for the tutorial, in other words.

Related

[Q] Implement Theme in Rom

Hello!
I'm trying to make my own Rom right now. With dsixda's Kitchen it isn't very hard to do so I thought I'd just give it a try. I'm taking a rooted official Update (Version: 2.10.405.2) as my base. Adding busybox runparts, the /data/app functionality, a2sd+, the custom bootanimation functionality etc. isn't a problem. Removing some apps like Maps, Facebook, Teeter (and so on) and adding some like Rom Manager, Neocore or Quadrant isn't a problem, too. But if I want to implement a theme like the Carbon Espresso Mod or a theme I made with the UOT Kitchen I'm getting bootloops at booting the phone. Here's what I do: I unzip the folder (for example a theme made with the UOT Kitchen) and I copy over the framework-res.apk from the unzipped folder to my Working Folder of the Kitchen (to system/framework) and I overwrite the original framework-res.apk.
And NO: I didn't choose a battery mod or a bootanimation in the UOT Kitchen....
Hope you guys can help me
I might be wrong but doesn't the new file have to be signed? I know there is a signing option in the kitchen.
Sent from my PC36100 using Tapatalk
It's a system .apk so it doesn't have to be signed.
I can't shed any light on the subject, but here's a bump.
Are you replacing the whole "framework-res.apk" file? If so then you will need to resign your entire ROM. Why? When you change a system file ("framework-res.apk", "com.htc.framework.apk", "twframework-res", "rosie.apk", etc.) it no longer has a matching "signature" for all the files it serves images to. Plug your phone into your computer and open up "ddms" in your android_sdk > tools folder to watch what happens when the phone boots up.
A workaround (The way I do it, it's more fun IMHO) is to open up your .apk files in 7zip (or if you're on a mac BetterZip) and add the images from the themed .apk to your stock .apk. This way makes it so your original .apk has the same signature as your other system files yet has the new images from the other files that you wanted. I've had a lot of luck with this method. I don't know if it will still work if you change any .xml files as I have not messed with those yet.
I've subscribed to this thread so if you have any questions post back here or you can PM me if you want. I'm on XDA all day, every day so I'll try to help as much as I can.
Thanks for all the answers! Especially to you, mbobino. Is there a way to sign the whole Rom new? When I make my Rom at the End, the Kitchen signs it automatically, doesn't it? The idea with the images is very good, but if I want to implement a theme like Carbon Espresso it isn't that easy, 'cause Carbon Espresso isn't just a few images. There are several .xml's etc.
The reason you boot loop is mis matched resource ID's in the public.xml file. If you decompile the framework using apktool after adding your images using an archiver then recompile apktool will update the public file for you which saves you from pulling ID''s for every image. I have a video tutorial of how to set up apktool and decompile framework in my Rom thread. Changing images in app apk's won't cause you to boot loop just messing with the framework will.
Sent from my ADR6300 using XDA App
DomiKamp said:
Thanks for all the answers! Especially to you, mbobino. Is there a way to sign the whole Rom new? When I make my Rom at the End, the Kitchen signs it automatically, doesn't it? The idea with the images is very good, but if I want to implement a theme like Carbon Espresso it isn't that easy, 'cause Carbon Espresso isn't just a few images. There are several .xml's etc.
Click to expand...
Click to collapse
The kitchen signs the .zip that you flash when you build it. It does not sign any .apks for you on its own. However, there is an option to sign .apks within the kitchen.
In my opinion, taking all of the images and figuring out how it all works is fun. I feel like I've already learned quite a bit from just digging around and moving files around.
As for the .xml files, you can decompile the .apk and edit them and then recompile the .apk. I'm actually looking into this today. It sounds like some work but hopefully I'll get it figured out.
Sounds like fun indeed So, I'll just have to try it. Where can I find the "Settings" for the Notification Bar? Thanks
The variois status*.xml files in the res/layout folder of the framework-res.apk and the status*.smali files in the services.jar.
What? If I want to implement a Theme made with the UOT Kitchen (without battery) I should just copy over those files to my existing res-framework.apk OR copy over the whole res-framework.apk (the new one) and sign it?
EDIT: Just tried it with a theme from the UOT Kitchen and it worked perfectly. I've just signed the res-framework.apk and the htc.com.resources.apk (or whatever) in the Kitchen, flashed it on my Phone and it just worked like a Charm. But I have got a 50% Transparent Notification Bar and all the system icons (Battery and time/date) are still black and not transparent! Has anyone got a idea where to change this? (.xml or whatever)...And does anyone know where I can find the HTC Wallpapers? I want to change them a little bit
HeyItsLou said:
The reason you boot loop is mis matched resource ID's in the public.xml file. If you decompile the framework using apktool after adding your images using an archiver then recompile apktool will update the public file for you which saves you from pulling ID''s for every image. I have a video tutorial of how to set up apktool and decompile framework in my Rom thread. Changing images in app apk's won't cause you to boot loop just messing with the framework will.
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
HeyItsLou, I looked up your ROM thread but couldn't locate the video tutorial.... do you mind providing the url? Specifically, I am trying to add to the list of wallpapers in a ROM. (I have setup apktool but not sure where/which folder to add my wallpapers in Framework-res.apk Launcher.apk before recompiling/signing). Thanks.
You COULD use the Theme Porter by daneshm90. It will only port the PNG s for it so things like clock colour n stuff will be lost, but it will get you alot closer...
http://forum.xda-developers.com/showthread.php?t=737526
Sent from my HTC Hero using XDA App
Thanks! But like I've written before in my Edit, I made it. The bigger theme (Carbon Espresso) wasn't a problem, too. I just had to sign the .apk's in system/app and system/framework (the kitchen doesn't do it by itself. You have to choose the option to sign a single .apk and then look, where the system/framework .apk's are...). Works great now!
DomiKamp said:
Thanks! But like I've written before in my Edit, I made it. The bigger theme (Carbon Espresso) wasn't a problem, too. I just had to sign the .apk's in system/app and system/framework (the kitchen doesn't do it by itself. You have to choose the option to sign a single .apk and then look, where the system/framework .apk's are...). Works great now!
Click to expand...
Click to collapse
Isnt that what I said in the 2nd post -.- lol jk. Glad you got it working!
Yes! And that's why I tried it. And it worked! Thanks Husker and, of course, everybody else!
Glad you got it working. Welcome to the development side of android!
Sent from my PC36100 using XDA App
I don't sign system files or apps and apkmanager among other threads I've read say not to. Im on a rooted backflip. I find I only have to sign third party apps to install.
Why do you have to sign YOUR files?
Sorry for answering that late. Had a few things to do, so I wasn't online very often
If you want to cook an App into your Rom (NeoCore for example), then you don't have to sign it. You can just copy it into data/app. But if you want to change the whole framework-res.apk of the Rom, you have to sign it. 'Cause if you don't sign it, you'll get a Bootloop. The framework-res.apk is a very important part of the Rom, so it has to "fit" to the others. There are some ID's which have to match. Otherwise it won't work. That's how I understood it
Another Question: Has anybody got an Idea where to change the things that are coming, when you first start the phone with a new Rom (the "installation" of the Rom)? I wan't to write: "Welcome to DomiKamp's Rom!" Or something like that...
bestialbub said:
I don't sign system files or apps and apkmanager among other threads I've read say not to. Im on a rooted backflip. I find I only have to sign third party apps to install.
Why do you have to sign YOUR files?
Click to expand...
Click to collapse
I was curious about this too. I always edit the framework-res of any ROM I flash using a custom set of images I have and have never signed the apk afterwards and it has always worked. Maybe cause I'm only replacing images? I usually do this with framework-res and twframework-res and they both can sometimes grow by 1MB or more. Just my experience.
Sent from my SAMSUNG-SGH-I897 using XDA App
DomiKamp said:
Sorry for answering that late. Had a few things to do, so I wasn't online very often
If you want to cook an App into your Rom (NeoCore for example), then you don't have to sign it. You can just copy it into data/app. But if you want to change the whole framework-res.apk of the Rom, you have to sign it. 'Cause if you don't sign it, you'll get a Bootloop. The framework-res.apk is a very important part of the Rom, so it has to "fit" to the others. There are some ID's which have to match. Otherwise it won't work. That's how I understood it
Another Question: Has anybody got an Idea where to change the things that are coming, when you first start the phone with a new Rom (the "installation" of the Rom)? I wan't to write: "Welcome to DomiKamp's Rom!" Or something like that...
Click to expand...
Click to collapse
I think that in order to do the "welcome to" thing you'll have to edit the update-script file. I'm not 100% on it though. Look at a cm Rom and see what all is in there.
Sent from my HTC Evo 4G using XDA App

WIP - Porting MattedBlue to Bi-Winning - help please

What is this?
I am trying to learn how to port themes. I need your help.
Here is the theme I am trying to port: MattedBlue
I have solicited help from a couple of people and I think I now have the basics. I'm going to use this thread to ask more questions and eventually use it for the theme. If I am asking dumb questions, perhaps it will benefit and/or motivate others.
What I've done so far:
I have downloaded the stock theme zip for bi-winning
I have downloaded the MattedBlue theme (sadly, on my only attempt I used a version for the Evo, not the Fascinate... trying again tonight with this version).
I have used 7Zip to open both zips and the framework-res.apk
I have navigated to the drawable folders in each
I moved ALL files from the theme drawable folder, to the respective drawable folder of the stock theme zip... essentially a mass move/replace. I have since learned THIS may have been my issue.
I then closed everything up, uploaded the zip, flashed it... odd thing is it worked SORTA, the only image that changed (that I can recall) was the notification bar looked like the CM7 one... so, some progress, but the other 700+ images were still stock bi-winning.
I have been informed to move over the images in smaller batches and to try again, paying attention to the images more closely.
Questions:
I didn't see how I need to repackage/sign the zip... is that even needed?
Once I opened the framework-res.apk it created a folder/archive in 7zip... do I need to do something with that after I moved all the images over?
I ONLY touched framework-res.apk, not twframework-res.apk (because on my first attempt I was using mattedblue for the HTC Evo) and that was not in the theme obviously... NOW I am going to attempt the Fascinate port which I believe does have both framework.apk's.... perhaps that was also my problem?
How do I go about theming the system apps (the theme has this already), is it the same process for apps?
Thoughts:
This has been a great learning experience
It does seem easier than I first thought.... but also incredibly eye-opening at the talent/time some of you guys have. I can NOT imagine doing this from scratch.. porting is good starting point.
The android community is amazing. Everyone I have asked for help, has done so with open arms. I love that about our community, and it is one.
Would like to especially thank JunkDruggler, Birgertime and shreddentyres.
Alright first things first. Do you hate Samsung yet for making a separate twframework-res where they basically duplicated images? It's awesome, isn't it?
Next, that's the thing: a lot of the elements in the system drop down ARE in the twframework-res, and others are peacefully still in framework-res. It's a scavenger hunt of finding images 99% of the time. It's great.
Porting a theme from a Galaxy S ROM would be much easier than a NS or any other AOSP rom because you'd have to match up images yourself and go through a lot of trouble and a LOT of time.
s15274n said:
Questions:
I didn't see how I need to repackage/sign the zip... is that even needed?
Once I opened the framework-res.apk it created a folder/archive in 7zip... do I need to do something with that after I moved all the images over?
I ONLY touched framework-res.apk, not twframework-res.apk (because on my first attempt I was using mattedblue for the HTC Evo) and that was not in the theme obviously... NOW I am going to attempt the Fascinate port which I believe does have both framework.apk's.... perhaps that was also my problem?
Click to expand...
Click to collapse
ive never had to resign a flashable zip, normally i just pull the metainf folder out of the rom or another theme and modify the update script to suit my needs.
the reason 7zip is creating an archive is that apk's actually use the same file headers as .zip files which is why we are able to unpack apks just like we would unpack a zip. as such once you have completed your image editing you will want to rezip the folders using 7zip then rename to .apk
as for the issue with the evo version there is actually quite a bit of images that are handled by the twframework. the tab colors, color selection, pull down menu etc. personally i find it annoying that samsung broke it up this way but o well. if you want to build off the original cm7 theme it is doable. you will just have to meticulously go through the twframework and framework to make sure you copy the correct images, and may even have to modify some extra images that arent provided to fit the theme.
Cheers
May i add an important tip??
DON'T RE-SIGN ANYTHING.......ESPECIALLY if its going in the /system/ directory....when re-zipping an apk....use the option that retains the current signature...
Just a tip
Okay, I feel like using the fascinate port tonight will yield a lot more success.... it just seems like moving the images over and rezipping is ONE part of it... once I get that right I will need to figure out how to do the phone dialier, etc... is that the same process then, or can I Just take the themed .apk from the fascinate and replace the system app?
Hmm... actually, the stock bi-winning theme zip would not have those system app files, or does it? I HATE not being able to do this from my work pc.
s15274n said:
Okay, I feel like using the fascinate port tonight will yield a lot more success.... it just seems like moving the images over and rezipping is ONE part of it... once I get that right I will need to figure out how to do the phone dialier, etc... is that the same process then, or can I Just take the themed .apk from the fascinate and replace the system app?
Hmm... actually, the stock bi-winning theme zip would not have those system app files, or does it? I HATE not being able to do this from my work pc.
Click to expand...
Click to collapse
System apps are similar. Dialer is in DialerTabActivity, Phone is in Phone. All done similarly
you could try just using the applications from the fascinate theme worst case scenario you get a bootloop, but most likely you will just get some fc's
personally i would go through and modify the phone.apk and other applications on your own for a couple reasons.
1. it will give you more practice
2. it is much more satisfying
3. the modded files are much more likely to work.
normally the way i test is just by using root explorer to move my modded files into the correct directories as i work on them. i dont flash through cwm recovery until everything is ready to go and im ready to post. also heed Senior Apocalipsis's advice i learned that one the hard way.
matted BLUES
BLUES is right, this port will make your head spin. i have renamed over 1000 images from the original matted CM7 theme. Let me know where your at and i can send you the images i have and we can collab on it?
e-mail me
[email protected]
or pm me on xda -
georgegreco86​
Bump....
I reverted from CM7 back to Trigger.. guess I am going to try this project again. I failed too many times trying on bi-winning, just not knowing what I was doing... here is hoping I have better luck this time.
I'm downloading at a whopping 8kb using a sprint air card at the beach... awesome.
Read my sig. It involves pc and phone. Fairly easy. If u need help let me know.
s15274n said:
Bump....
I reverted from CM7 back to Trigger.. guess I am going to try this project again. I failed too many times trying on bi-winning, just not knowing what I was doing... here is hoping I have better luck this time.
I'm downloading at a whopping 8kb using a sprint air card at the beach... awesome.
Click to expand...
Click to collapse
Sent from my SGH-T959 using XDA App
Well, i have failed so miserably i can't even flash the zip file... just just stuck at installing update....
I guess I will check your thread, if that doesn't work. I may ask for some serious hand-holding or just let you guys do your thing.
Edit, alright, your thread seems much easier than what I was doing. I will try it out.
honestly i started with the settings apk, has very few images and all i wanted to do was to add some color to the old Bionix roms which didnt have the colored settings, once your comfortable u can take on the big boy (framework)...
s15274n said:
Well, i have failed so miserably i can't even flash the zip file... just just stuck at installing update....
I guess I will check your thread, if that doesn't work. I may ask for some serious hand-holding or just let you guys do your thing.
Edit, alright, your thread seems much easier than what I was doing. I will try it out.
Click to expand...
Click to collapse
Good new... Bad news....
I have failed again. I want to try the method rel500 mentioned but I don't have adb installed on this work laptop of my wifes... I may try again on another theme when I am home on my PC.
Good news,
Annex1, who actually knows what he is doing is working on porting this theme. Thank god someone is capable and willing.
http://edtdev.com/forum/topic/105-matted-blues/
I don't think annex would mind if I linked to his thread... I'm sure he will post it on xda soon and this thread can die!]
The image name and type may not be the same. You can look into the following apks and framework:
1. Contacts.apk
2. Phone.apk
3. TouchWiz30Launcher.apk
4. framework-res.apk
5. twframework-res.apk
Good luck
s15274n said:
Good new... Bad news....
I have failed again. I want to try the method rel500 mentioned but I don't have adb installed on this work laptop of my wifes... I may try again on another theme when I am home on my PC.
Good news,
Annex1, who actually knows what he is doing is working on porting this theme. Thank god someone is capable and willing.
http://edtdev.com/forum/topic/105-matted-blues/
I don't think annex would mind if I linked to his thread... I'm sure he will post it on xda soon and this thread can die!]
Click to expand...
Click to collapse
Off topic. How dI'd you get your avatar?
Sent from my SPH-D700 using XDA App
^^ I am going to keep trying.. not going to give up. I may on this theme now that annex has it posted. There are some talented/patient people on here, thank God.
^ google something like facemymanga or manga my face? Something like that.. they had a few country site
I posted a couple of wallpapers I had made for this theme/trigger.. you can get them on annex's thread.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Tested and running perfectly on Bionix 1.3.2!
The power control widget stayed the same color, but I don't mind it much! That's it so far, really.
Thank you for this!

noob who wants to learn

I want to learn how to theme. I've read this guide http://forum.xda-developers.com/showthread.php?t=916814
I Think i understand the process of editing images, I'm not a noob when it comes to photoshop, but i get a little frustrated when it comes to the topic of signing. I have a windows vista system, and section two of this https://docs.google.com/Doc?docid=0AcdxIJRSH9ypZGZzc2pxNDlfMjdnazk4OHNxZA&hl=en states that signing in vista causes bootloops unless you take other steps. The directions for XP seem so straight forward, is there a way to sign without all the hassle that vista seems to cause?
I've been told that if you use another theme for a base, resigning is not needed. I'm a noob at this also, really wanting to learn.
thenaut said:
I want to learn how to theme. I've read this guide http://forum.xda-developers.com/showthread.php?t=916814
I Think i understand the process of editing images, I'm not a noob when it comes to photoshop, but i get a little frustrated when it comes to the topic of signing. I have a windows vista system, and section two of this https://docs.google.com/Doc?docid=0AcdxIJRSH9ypZGZzc2pxNDlfMjdnazk4OHNxZA&hl=en states that signing in vista causes bootloops unless you take other steps. The directions for XP seem so straight forward, is there a way to sign without all the hassle that vista seems to cause?
Click to expand...
Click to collapse
When it comes to basic themeing, you don't need to sign anything....its a matter of extracting and re-zipping the apk without signing it so it keeps its original signature...then you would add all your themed apks in a CWM flashable zip(that isn't signed either).....use APK Manager....it works wonders for theme devs
Mr. Apocalypse said:
When it comes to basic themeing, you don't need to sign anything....its a matter of extracting and re-zipping the apk without signing it so it keeps its original signature...then you would add all your themed apks in a CWM flashable zip(that isn't signed either).....use APK Manager....it works wonders for theme devs
Click to expand...
Click to collapse
Thanks man,
If i'm understanding you correctly you are basically saying that if i take from an existing theme i don't have to sign. but i create my own theme based off of a rom i need to sign it?
EDIT: nevermind, i mixed both responses up and with my question. i'm a little off today
thenaut said:
Thanks man,
If i'm understanding you correctly you are basically saying that if i take from an existing theme i don't have to sign. but i create my own theme based off of a rom i need to sign it?
EDIT: nevermind, i mixed both responses up and with my question. i'm a little off today
Click to expand...
Click to collapse
Ok...let me try to clarify this...if you're new to theme developing, get "signing" out of your head
You would only need to sign an apk if it was being installed...
When you theme, nothing is being "installed", all of the original apks that are in your /system/ directory are replaced with your themed ones while flashing....
YOU NEVER SIGN AN APK THAT IS BEING SENT TO /system/ DIRECTORY
In reality, no themed apks are signed, because they are sent to the /system/ directory....its just a matter of extracting the stock apk, make your mods, and re-zip. As a said above, if you use Apk Manager, this will be a breeze
Mr. Apocalypse said:
Ok...let me try to clarify this...if you're new to theme developing, get "signing" out of your head
You would only need to sign an apk if it was being installed...
When you theme, nothing is being "installed", all of the original apks that are in your /system/ directory are replaced with your themed ones while flashing....
YOU NEVER SIGN AN APK THAT IS BEING SENT TO /system/ DIRECTORY
In reality, no themed apks are signed, because they are sent to the /system/ directory....its just a matter of extracting the stock apk, make your mods, and re-zip. As a said above, if you use Apk Manager, this will be a breeze
Click to expand...
Click to collapse
Thanks, You've helped a lot. can't wait to start. I have to go to work though, so tomorrow, hopefully.
thenaut said:
Thanks, You've helped a lot. can't wait to start. I have to go to work though, so tomorrow, hopefully.
Click to expand...
Click to collapse
If you have any other questions, PM me....i'm always willing to help someone who is willing to learn.
What I do when i want to change something... example I made my own lock screen.
If it was already explained how to do this... im sorry for wasting your and mine time... I only have about 5 minutes so I cant read everything before i post this... but this is what i do when i want to edit the theme.
I put the rom on my computer and extract it... locate the files I need to edit, (they are alwas going to be in the res folder of an extracted .apk and then in a drawable folder.) I take the files i want and I edit them. put them back on my phone... copy the framework-res.apk from systems>framework>framework-res.apk and then put it in a folder i created on my sdcard.
Using Astro File Manager I select my edited files and copy them.... then click on framework-res.apk and select browse and past my edited files into the framework-res.apk then using root explorer I then copy my edited framework-res.apk and paste it back in system>framework>framework-res.apk

[TOOL] Framework Flasher 1.1.4 (1/14/12) - Easily modify and flash framework-res.apk

Finally! After days of struggling to figure out how to modify my ROM's framework-res.apk and create a working flashable update.zip to install the framework-res.apk changes, I have finally figured out how (big thanks to the guys here: http://forum.xda-developers.com/showthread.php?p=20962080#post20962080) and have created an automated script to help others struggling with the same problem.
Framework Flasher 1.1.4
Feel free to download and experiment with it. This is my first gift to the XDA/Android Hacking community, and I plan on doing more. I just want to test the waters for now Feedback would be nice. Let me know if I've helped you in some way!
---------------------------
What does it do?
It extracts your framework-res.apk file and allows you to edit the files. After editing, the script will compile, sign the apk, create your update.zip with the correct structure for flashing, and then sign the .zip. Everything you need to modify and flash your framework-res.apk file.
How do I use it?
Download the .zip from the link below and extract it somewhere on your PC. Drag the framework-res.apk file that you want to modify and/or flash into the /place-framework-res-here/ directory. Double-click on RunMe.bat and off you go! Do the steps (1-5) in order and you shouldn't have any problems.
Who needs this?
A LOT of people according to how many google searches I did in the past 3-4 days.
Will it work for files other than framework-res.apk?
Currently, no. However it would be easy to implement that functionality if I saw that people would benefit from it.
I found a bug... what do I do?
Post it in this topic. I'll do what I can to make continual updates as long as I see people are benefiting from it. I'm sure there are bugs in it somewhere, so just let me know.
Where do I download this snazzy piece of software?
http://www.mediafire.com/?1nc14hkhs2yrqmt
The little disclaimer
If you download this tool, please say thanks! Not only does it motivate me to continue to improve this software, but it also let's me know how many users are using it! Thanks!
This script is mainly intended for use with editing script files (xml, etc.), and normal (non 9png) images. 9pngs have been successfully repacked using this tool! If you run into any problems, be sure to make it known!
This tools was created to work with the Droid X2. If you are experiencing problems using it, first ensure that you are in fact using a Droid X2.
Change Log
1.1.4 (1/14/12)
- Corrected the Log error. You can now see error logs!
- Corrected an error processing problem where Framework Flasher would instantly close without warning
1.1 (1/7/12)
- Made compatibility tweaks
- Removed unnecessary overhead
1.0 (1/6/12)
- Initial Release
When reporting errors, please ensure that there are no spaces in your file path, and include what ROM and version you are running.
Hello
This is an awesome little tool you got here. I haven't tried it yet but I'll likely give it a shot eventually.
You should add functionality for SystemUI.apk, that's the other "real big" file people like to edit. Just a suggestion based on what I know about theming
Very nice!
So r u telling me this will modify everything including the. 9 png images..also can u get into the xml files as well or images only...i use apk manager and with the. 9 pngs u cannot touch the 9 patches or change the image without using draw 9 patch to ensure the apk will recompile
Sent from my DROID X2 using xda premium
PoorCollegeGuy said:
Hello
This is an awesome little tool you got here. I haven't tried it yet but I'll likely give it a shot eventually.
You should add functionality for SystemUI.apk, that's the other "real big" file people like to edit. Just a suggestion based on what I know about theming
Very nice!
Click to expand...
Click to collapse
Thanks. I will definitely look into adding this. I'll update the OP with any changes or updates.
Kevin3328 said:
So r u telling me this will modify everything including the. 9 png images..also can u get into the xml files as well or images only...i use apk manager and with the. 9 pngs u cannot touch the 9 patches or change the image without using draw 9 patch to ensure the apk will recompile
Sent from my DROID X2 using xda premium
Click to expand...
Click to collapse
Not tested 9pngs with this, it's mainly intended for scripting (xml files, etc. along with normal non 9png images). I've updated the OP to include a little disclaimer stating this fact. Thanks for pointing that out.
.9.png seems to work
Thanks Wesf90 for the tool. I was curious about the .9.png myself. Looking at the script it decompiles and compiles using apktool just like the apkmanager script does so just by looking at your RunMe.bat it looks like it would be fine. I did test it out to be sure though. So I took the framework-res from eclipse 2.0.3 changes some 9.png files and recompiled without any issues. It is important to note that you need to be careful when editing 9.png files to NOT change the black "patches" around the edge of those images. Doing so will cause bad patches and will generate errors when re-compiling. So for example if you apply a filter to the entire image double check that the color value of the black patches are still 000000 (I've done this ). If you don't mess with the patches all should be fine. It also depends on the original framework-res you are starting with. If you use one that has broken 9.pngs in it to start then you will need to fix them before re-compiling (I've done this too ).
Nice work. I especially like that step 4 that creates the update.zip. That is not in apkmanager that I've been using. So following steps 1,2,3,4 sure does make it simpler for a beginner which was your goal. Keep up the good work!
hedwig34 said:
Thanks Wesf90 for the tool. I was curious about the .9.png myself. Looking at the script it decompiles and compiles using apktool just like the apkmanager script does so just by looking at your RunMe.bat it looks like it would be fine. I did test it out to be sure though. So I took the framework-res from eclipse 2.0.3 changes some 9.png files and recompiled without any issues. It is important to note that you need to be careful when editing 9.png files to NOT change the black "patches" around the edge of those images. Doing so will cause bad patches and will generate errors when re-compiling. So for example if you apply a filter to the entire image double check that the color value of the black patches are still 000000 (I've done this ). If you don't mess with the patches all should be fine. It also depends on the original framework-res you are starting with. If you use one that has broken 9.pngs in it to start then you will need to fix them before re-compiling (I've done this too ).
Nice work. I especially like that step 4 that creates the update.zip. That is not in apkmanager that I've been using. So following steps 1,2,3,4 sure does make it simpler for a beginner which was your goal. Keep up the good work!
Click to expand...
Click to collapse
Thanks for the test run. I've updated to OP to state that 9pngs have been tested.
Creating the update.zip was the hardest part for me, learning how to use update-script and updater-script. Hopefully this will help everyone else get on the right path.
is it possible, that after the editing was done, to simply push the framework to its place? without flashing recovery?
Dude XDA did a writeup on this.. but the article states there is no. 9 compatibility .... which is not true your program decompiles just like apk manager and apk tool do... .9 can be edited the patches simply can't be touched.. making this an awesome little tool !!!
Sent from my DROID X2 using xda premium
Sweet tool, just what I've been looking for
Just wanted to drop in and say thanks for this tool (button hit, donation forthcoming).
I tried this with my framework-res file from and ICS 4.0.1 ROM I'm running and it decompiles perfectly, but after I make edits and try and recompile, the script just closes.
I tried looking at the log in the folder of the tool and it didn't have any information except the date/time I ran the script.
Any thoughts? Would love to make use of this if you think it should work for me. Thanks again!
XT69 said:
is it possible, that after the editing was done, to simply push the framework to its place? without flashing recovery?
Click to expand...
Click to collapse
Yes, definitely possible if you have ADB access. I may add this feature, but the idea of the tool is primarily to allow users to create a flash-able file for their's, or others', phones. I'll put it on my to-do list though
Kevin3328 said:
Dude XDA did a writeup on this.. but the article states there is no. 9 compatibility .... which is not true your program decompiles just like apk manager and apk tool do... .9 can be edited the patches simply can't be touched.. making this an awesome little tool !!!
Sent from my DROID X2 using xda premium
Click to expand...
Click to collapse
Yeah I noticed that about the 9pngs in the article, however several people (including yourself) have stated that 9png's work fine. So hopefully XDA will eventually update the post.
zaxondis said:
Just wanted to drop in and say thanks for this tool (button hit, donation forthcoming).
I tried this with my framework-res file from and ICS 4.0.1 ROM I'm running and it decompiles perfectly, but after I make edits and try and recompile, the script just closes.
I tried looking at the log in the folder of the tool and it didn't have any information except the date/time I ran the script.
Any thoughts? Would love to make use of this if you think it should work for me. Thanks again!
Click to expand...
Click to collapse
Interesting. I plan on releasing another update soon, so send me the file you tried (I sent you a PM), I plan on weeding out small bugs quickly. Once the update is ready, hopefully I can have this bug fixed (or at least resolved)
Wes
zaxondis said:
Just wanted to drop in and say thanks for this tool (button hit, donation forthcoming).
I tried this with my framework-res file from and ICS 4.0.1 ROM I'm running and it decompiles perfectly, but after I make edits and try and recompile, the script just closes.
I tried looking at the log in the folder of the tool and it didn't have any information except the date/time I ran the script.
Any thoughts? Would love to make use of this if you think it should work for me. Thanks again!
Click to expand...
Click to collapse
had the same here!
other then that great tool
Ok to u guys having this happen... try to decompile and them recompile immediately ... if this works odds are u damaged a .9 png... those images have a black 1 pixel boarder that cannot be touched
Sent from my DROID X2 using xda premium
Maybe a dumb question but do we flash this in recovery or is this for pc use?Thanks I been itching to try this on my Iced Sam Vib...
Program is for PC use when u r done it will create a flashing zip for u
Sent from my DROID X2 using xda premium
Dougfresh said:
Maybe a dumb question but do we flash this in recovery or is this for pc use?Thanks I been itching to try this on my Iced Sam Vib...
Click to expand...
Click to collapse
Yes, you're absolutely correct. Once you go through the steps and create the update.zip file, simple place that file onto your sd card. Then flash the .zip in recovery.
Wes
Doesn't work for me. It says that echo is off.
Thanks wesf90. Going to DL, and check this out.
Work with any Android?
Will this work with any Android system, like the GS2? Sorry if I missed the answer somewhere above.
Thx.
disclaimernotice said:
Doesn't work for me. It says that echo is off.
Click to expand...
Click to collapse
Does this happen as soon as you start it?

[Q] Modifying framework-res.apk

Hello,
I'm just kind of playing around and I would like to modify the "intensity" of some of the haptic feedback. I found the following post:
http://forum.xda-developers.com/showthread.php?t=1796789
I guess my question is, will this process work the same for ICS? I see the same entries mentioned and presume they will have the same affect. I'm still a doing a little research to understand creating an APK I can then flash to replace my current framework-res.apk. Thanks to any help or explanation someone can provide.
Yes its the same process and in the same location.
Full-Throttle Team
I have a question if anyone can answer this. I am using apktool, following the following link for information:
http://forum.xda-developers.com/showthread.php?t=1753659
I have installed all the additional "framework" files (blur-res.apk, moto-res.apk, SystemUI.apk, and then framework-res.apk) via apktoolif. I can decompile framework-res.apk without issues, and for fun I simply recompiled it (no changes). The odd part is the resources.arsc is noticeably smaller in the "new" one I created (and this is extracted from the archive so no compression). Is that normal, or is there something I'm missing.
I know I should just take the plunge replace /system/framework/framework-res.apk with mine and see what happens, it just seems to me that my newly compiled resources.arsc should be exactly the same size shouldn't it? Or am I missing something?
Well I went ahead and loaded my new framedwork-res.apk, and it worked fine. So I guess all my worrying was for nothing, at least so far.
Ya its normal for it to shrink.
Full-Throttle Team
Thanks
thanks for the info bro! im modifying framework-res.apk for my project using apk-multi-tool.

Categories

Resources