how to mod your battery for percentage? - EVO 4G Themes and Apps

im running steelh and i have the blue epic style battery. how can i get the battery percentage into that without using different icons? i tired the online kitchen but my phone is stuck in a bootloop.

anybody? the kitchen just gives me errors.

ive used the online kitchen before with no issues, but id like to know how to this manually.
Sent from my panty-dropper.

ericwgarza1 said:
ive used the online kitchen before with no issues, but id like to know how to this manually.
Sent from my panty-dropper.
Click to expand...
Click to collapse
i cannot get it to work no matter what i do. can any dev help out here? i want the blue epic style battery with percentage. aside from the png's what files do you need to get this working on a sense rom? all of this hassle is making me want to go back to cm6, at least on that we can use the settings to accomplish alot of things we cannot on sense roms.

can you add the battery percentage mod into a rom that doesn't by default come with it? i heard about needing a modded services.jar file? or do i have to go with a different rom here for what i need? the online kitchen will simply not work for me.

The battery mods are accomplished by editing xmls and pngs in framework-res.apk

SteelH said:
The battery mods are accomplished by editing xmls and pngs in framework-res.apk
Click to expand...
Click to collapse
i have the png's but i have no clue how to mod xml files. im pretty good at Frankensteining themes together but for the life of me i cannot get this to work.

A couple of things: are you using a deodexed or odexed rom? Are you trying to add the circle battery to your existing theme or are you just trying to add the battery period?
I made a "dummy" flash file a while back that "prepped" odex roms before flashing the battery percentage mods.
You can also decompile the framework you want and transfer over the pngs and xmls for the battery mod into your existing framework.
Decompiling would be the best route as you would have to recompile it with the new xmls added to the resource list.
I would/could help but I won't flash anything on my evo right now since I currently have it hooked up to debug an app. Just send me the framework file from your phone and the battery mod you want and I can take a look at them and hopefully recompile it for you.

lovethyEVO said:
A couple of things: are you using a deodexed or odexed rom? Are you trying to add the circle battery to your existing theme or are you just trying to add the battery period?
I made a "dummy" flash file a while back that "prepped" odex roms before flashing the battery percentage mods.
You can also decompile the framework you want and transfer over the pngs and xmls for the battery mod into your existing framework.
Decompiling would be the best route as you would have to recompile it with the new xmls added to the resource list.
I would/could help but I won't flash anything on my evo right now since I currently have it hooked up to debug an app. Just send me the framework file from your phone and the battery mod you want and I can take a look at them and hopefully recompile it for you.
Click to expand...
Click to collapse
its the steelh deodexed rom. i have alot of themes going on and i do not want to loose them. i just want the battery with the percentage in it. ive attached what you may need, thank you.

I'll take a look at them now.
Give me some time.

lovethyEVO said:
I'll take a look at them now.
Give me some time.
Click to expand...
Click to collapse
thanks for taking the time!

Found a clue about the problem.
The online kitchen I believe has a disclaimer about .9pngs in the framework.
Basically if some .9s are not edited correctly it can cause an error in the decompile/compile process.
The framework you gave me throws an error when trying to compile. I have seen this error many times before and it always results in the changed files (xml and pngs) not being inserted into the newly compiled framework.
I decompiled/compiled three times, same error and the changed files were not inserted into the compiled apk.
Your problem lies in the framework and the tools ability to properly process the .9s.
Also, the epic zip you gave me does not have any xml files to tell the framework what png to display and it has 80 more pngs for the battery charge animation.
This is not something I want to spend more time on right now but the info I'm giving will hopefully get you in the right direction.

I think the two .xmls that needs to be edited are:
stat_sys_battery.xml
stat_sys_battery_charge.xml
Decompile a framework-res that already has the mod included and you should get an idea of what to do.
Someoneplease let me know if I'm wrong. Thanks!

ericwgarza1 said:
I think the two .xmls that needs to be edited are:
stat_sys_battery.xml
stat_sys_battery_charge.xml
Decompile a framework-res that already has the mod included and you should get an idea of what to do.
Someoneplease let me know if I'm wrong. Thanks!
Click to expand...
Click to collapse
There are actually 3 xmls needed for the battery mod.
The op stated he has a theme going and he doesn't want to lose it. The only way to incorporate the battery mod and keep his theme is to add the battery to his existing framework.
As I explained above, .9s are special pngs and if they are not edited correctly will cause the decompile/compile tool to throw an error. Themers will edit .9s and although they will show properly on the phone the tool used to decompile/compile the apks will notice if the .9s are incorrect.
What the online kitchen does and what I did manually are the same thing and more than likely with the same tools. The epic pngs the op supplied did not have any xmls and so im surprised the online kitchen was able to produce an apk.
If I spent more time on it I could probably figure it out but I am already occupied with another time consuming task.

What is the other .xml named?
I'd like to personally (for learning purposes) add the battery percentage to a stock framework-res.apk manually. Thanks!

Try this. I give no guarantees at all since I manually inserted the xmls and pngs. Also since there are 80 more pngs for the charge animation there's no way of telling how it will look.

lovethyEVO said:
There are actually 3 xmls needed for the battery mod.
The op stated he has a theme going and he doesn't want to lose it. The only way to incorporate the battery mod and keep his theme is to add the battery to his existing framework.
As I explained above, .9s are special pngs and if they are not edited correctly will cause the decompile/compile tool to throw an error. Themers will edit .9s and although they will show properly on the phone the tool used to decompile/compile the apks will notice if the .9s are incorrect.
What the online kitchen does and what I did manually are the same thing and more than likely with the same tools. The epic pngs the op supplied did not have any xmls and so im surprised the online kitchen was able to produce an apk.
If I spent more time on it I could probably figure it out but I am already occupied with another time consuming task.
Click to expand...
Click to collapse
Good explanation thank you. I think I have the similar problem I unzipped my framework and changed my battery and it worked. The only problem is I can only use the six charging animations. A little research last night and I realized I needed to edit the xml. Decompiling my framework would not work and I think your explanation helps me understand why.

ericwgarza1 said:
What is the other .xml named?
I'd like to personally (for learning purposes) add the battery percentage to a stock framework-res.apk manually. Thanks!
Click to expand...
Click to collapse
maybe public.xml

Related

Anybody know how to change the color of the time?

I need to change the color of the clock in the Taskbar, but I need to know where its at and what to modify. Anybody? If you know what file i'll rip it apart myself...Thanks!
obannvi said:
I need to change the color of the clock in the Taskbar, but I need to know where its at and what to modify. Anybody? If you know what file i'll rip it apart myself...Thanks!
Click to expand...
Click to collapse
I wanna say htcresources but I can't remember if that includes the clock or not. I know that it is the taskbar icons. that color is more than likely set in the xml which can't be edited.
Kcarpenter said:
I wanna say htcresources but I can't remember if that includes the clock or not. I know that it is the taskbar icons. that color is more than likely set in the xml which can't be edited.
Click to expand...
Click to collapse
It can be edited, I just wanted too know where it was...LOL I'll have a look in that .apk.
Anybody...??
While looking in the MetaMorph, 'Post your morphs', thread I saw this:
Check out amacs thread for info on how to get white text in the notification bar and more customization options.
The thread is 30 pages long though so I didn't read through it... Hope this helps?
Many people including myself tried with no success I think in order to change the color in the taskbar clock you need to edit the service.odex. There is a way to decompile the odex but when I tried to recompile it back I get an error message.
Maybe you will have better luck with it. Here is a video on how to Creating Android Themes for the G1. Video 2 shows how to change the clock color.
Hope this helps you.
http://forum.xda-developers.com/showthread.php?t=593932
chubbzlou said:
Many people including myself tried with no success I think in order to change the color in the taskbar clock you need to edit the service.odex. There is a way to decompile the odex but when I tried to recompile it back I get an error message.
Maybe you will have better luck with it. Here is a video on how to Creating Android Themes for the G1. Video 2 shows how to change the clock color.
Hope this helps you.
http://forum.xda-developers.com/showthread.php?t=593932
Click to expand...
Click to collapse
Thanks for the vids. It looks like in services.jar there is suppose to be a classes.dex file, but for some reason the ROMS aren't including this file...hmmm weird. I also noticed the videos didnt have sound... LOL Im gonna give it a shot.
obannvi said:
Thanks for the vids. It looks like in services.jar there is suppose to be a classes.dex file, but for some reason the ROMS aren't including this file...hmmm weird.
Click to expand...
Click to collapse
That's because our ROMs have a services.odex instead of services.jar. I've tried a few times to decompile and re-compile the services.odex file with no success.
daryelv said:
That's because our ROMs have a services.odex instead of services.jar. I've tried a few times to decompile and re-compile the services.odex file with no success.
Click to expand...
Click to collapse
Ahh that makes sense. I do see a services.odex file. Now I gotta figure out how to deodex them. LOL
So does anyone know yet?
VinceOB said:
Ahh that makes sense. I do see a services.odex file. Now I gotta figure out how to deodex them. LOL
Click to expand...
Click to collapse
I'm pretty sure you're going to need Baksmali and Smali for that. I was looking around on Jesus-Freke's website and saw "How to deodex with Baksmali" but I never clicked it since CyanogenMOD is deodexed.
heres the file you helped me edit Vince lol. I made it gray instead of black.
nm this is for older fresh style roms. they probably changed the new ones hadnt ripped em open since running froyo and you can edit clock color in the cm settings.

[Q] MORPH: getting bootloops with cyrcle battery (selfmaid theme)

Hi,
I'm working on a theme for the nigtlies for myself (is going to be released later).
It is based on a GalaS theme with lots of elements of nextheme, some sense stuff, basically a mix of what i like from every theme i once applied for different roms...
My problem:
I'm getting bootloops after i changed the battery png's to cyrcle battery even though same number of pictures....
Does anybody know what i need to do to add the cyrcle battery style to my morph? Do i need another xml file which basically tells the ui that now it is a cycle battery?
Any help is appreciated..
i'm kind of lost here...
You should make sure you are saving them with the exact name of the stock icon files. They need to be a png 32 file with a transparent bg. Also make sure the name of the theme zip file is the same as your xml file.
As long as its the same number of files with the same name you should be good. Search in the morph sticky at the top of the forum and tear a couple of battery morphs apart and compare.
Well i tried that, no luck so far. Gonna compare some battery morphs later on.
tr.slate said:
You should make sure you are saving them with the exact name of the stock icon files. They need to be a png 32 file with a transparent bg. Also make sure the name of the theme zip file is the same as your xml file.
As long as its the same number of files with the same name you should be good. Search in the morph sticky at the top of the forum and tear a couple of battery morphs apart and compare.
Click to expand...
Click to collapse
Sent from my Nexus One using XDA App

Theming guide anyone???

Need help from a fellow liberty theme. I've been having problems theming .9.png's. It doesn't seem to matter if I decompile, theme, and recompile, or just use gimp/photoshop in or out of the file. I'm using an existing theme already I'm not building xmls or anything using the same resources. I'm also using draw9patch to draw the patches for when i decompile it. After recompiling it and or flashing it it either bootloops or it'll boot up but EVERYTHING will force close or all of the .9.png's are stretched weird and show the black lines I put in with draw9patch. Is there any themer that could share a step by step guide on how they do it or how to deal with theming .9.png's. any how to out there is not working and its getting really difficult not to give up. I'm sure it is probably my fault but theres no guides on this and I'm really trying to learn
Sent from my DROIDX using XDA App
It may not be the images causing your bootloops or FC's, but a different issue when recompiling. When you recompile, do you get .9 error messages? If not, try pulling out your images and adding them to the original framework-res.apk just through 7zip. If you do get error messages from the .9's while compiling then it is an issue with the guides not being drawn correctly.
UnkleDuke said:
It may not be the images causing your bootloops or FC's, but a different issue when recompiling. When you recompile, do you get .9 error messages? If not, try pulling out your images and adding them to the original framework-res.apk just through 7zip. If you do get error messages from the .9's while compiling then it is an issue with the guides not being drawn correctly.
Click to expand...
Click to collapse
I didn't get any errors this last time. And I used archive manager on Linux to pull the images from the drawable hdpi folder to the one in the themes folder I'm using as a base and it is a liberty 1.5 theme and I'm using liberty 1.5 and everything was fc'ing
Sent from my DROIDX using XDA App
First, read this thoroughly:
http://developer.android.com/guide/developing/tools/draw9patch.html
You take a .9, rename it to a regular .png. Open it, edit it, save it. (as .png still) open that .png inside of draw9patch, add your lines. Save the image (as a .9.png). Put the image into eclipse to recompile the image. (Make an unsigned .apk, and pull it)
This is the only way I've ever done it, and it works every single time. People saying that you should add the lines in photo shop or anything else are lucky I guess, caues I've never got that to work for me.
joe772 said:
First, read this thoroughly:
http://developer.android.com/guide/developing/tools/draw9patch.html
You take a .9, rename it to a regular .png. Open it, edit it, save it. (as .png still) open that .png inside of draw9patch, add your lines. Save the image (as a .9.png). Put the image into eclipse to recompile the image. (Make an unsigned .apk, and pull it)
This is the only way I've ever done it, and it works every single time. People saying that you should add the lines in photo shop or anything else are lucky I guess, caues I've never got that to work for me.
Click to expand...
Click to collapse
I use draw9patch save it and put it in the drawable hdpi used apktool to compile and then just pulled em to the other drawable hdpi grrrrr
Sent from my DROIDX using XDA App
http://androidforums.com/droid-x-all-things-root/246462-theme-help-tutorial.html
sometimes i take the png they give, open it up in photoshop and draw over the layers. that way the size resolution and other things remain the same except for the image

[HOW TO] Animated Status Bar Pulldown for GB Roms

I saw this in an article on droid-life: Here
Original Thread: Animated status bar pulldown for GB roms
Hope this could help some devs/themers get this going for us EVO users
The Author of this is: Alastrionia
Youtube Demo
MODS: If this should not be here, please remove, and my sincere apologizes.
Animated status bar pulldown for GB roms
First off this should work with all GB based roms that use systemui.apk
there may be subtle differences but the basics should be the same all around.
after much trial and error and ripping what little hair I have left out
success was mine and it's time to share this with everyone
and it's so simple that you'll love how fast you can integrate this into ROM's / themes / whatever your heart desires
1. take your systemui.apk and decompile it
2. navigate to layout folder
3. grab "status_bar_tracking.xml" and open it up in your editor
(now for the fun)
4. to the first line - "com.android.systemui.statusbar.TrackingView" add this ""android:background="@drawable/...anim.xml""
<com.android.systemui.statusbar.TrackingView android:background="@drawable/...anim.xml...>
5. after saving that, navigate back into the drawable folder and add your animation.xml file there
5a. next navigate into the drawable/hdpi folder and add your animated images
6. also in the drawable/hdpi folder find and open up the shade_bg.png with your editor and make it 100% transparent
7. now it's time to recompile your apk , following all the usual directions with that
8. enjoy your newly created systemui.apk with a pretty animated background. new and fresh and unlike anything before
that's it. done deal. it's super easy and fast and breathes life into true customization.
I used the stat_sys_upload.xml from the framework-res.apk as my base
all I had to do was change the timing and change the image names.
also you'll notice above - don't copy it word for word on the xml.
I did the "..." meaning whatever you decide to name your file.
I'll try to throw up a video shortly of my success with this so everyone can see it.
Click to expand...
Click to collapse
You lost me at "decompile"
SantinoInc said:
You lost me at "decompile"
Click to expand...
Click to collapse
I think by that he means to open the systemui.apk
I used 7zip to open a cm7 nightly just now and it's located in the system/app folder. Inside the .apk theres:
res (folder)
AndroidManifest.xml
classes.dex
resources.arsc
Inside the res folder:
anim (folder)
drawable (folder)
drawable-hdpi (folder)
layout (folder)
xml (folder)
Hopefully some themers can get some pretty nice/cool things done with this.
No you would have to decompile the apk with a apk decompiler..Unzipping it will not work.Thats just for replacing images.
1 Aw3s0m3 M0d!!
i'll help people if they're having trouble. probably won't do this personally.
and yeah, to see .xml files correctly, you need an apk decompiler.
Nice find! Will definitely try this.
forgive me if im not reading this right.... is this for aosp of sense?
What will they think of next
Evolutionmods said:
forgive me if im not reading this right.... is this for aosp of sense?
Click to expand...
Click to collapse
I believe this is for AOSP but reading through the entire thread someone says "this also works on the com.htc.resources.apk for sense ROMs."
Subbed and Definitely Interested!
More demos with different animations are starting to appear. This is looking really awesome.
http://www.youtube.com/watch?v=gf7lFsAkxFA
http://www.youtube.com/watch?v=vte37qjSiEc
Oh yeah. I got big plans for this one. Cant wait to get some time to sit down and code it. It really is as simple as stated.
It's not just for gingerbread. I shot this with my crappy 5 year old digicam.
Another demo:
http://www.youtube.com/watch?v=HAHoKJ2N0Xw
Has anyone given this a go on the EVO yet??
Yeah, I got it working...Needs some tweaking. I tried it with a 24 frame boot animation.. very laggy. I suspect that a 8-15 frame animation would do well
blassilando said:
Another demo:
http://www.youtube.com/watch?v=HAHoKJ2N0Xw
Has anyone given this a go on the EVO yet??
Click to expand...
Click to collapse
The vid I posted above yours is on an evo.
Would either of you mind posting your xml so i could use it as a reference? Not totally clear on that part of it. Thanks.
http://www.dropbox.com/referrals/NTEyOTE1MzA3OQ
http://www.youtube.com/watch?v=HEKsfTiaif0
Ill gladly be a testbot for anyone working on this for our evos
would be nice to get a zip we can flash. so everyone including us noobs can get this mod.
thanks for the info great job

[Script] [Updated] Framework Utility for Gingerbread

Do you love creating icons and mods but just can't get them on your new Gingerbread update? This script is for you.
It's a modded Framework script that has been in the community for quite some time. I updated it to work with the SystemUi.apk found in Gingerbread.
allows you to modify your status bar icons (Does not modify the battery icon, That is still located in framework-res.apk)
Instructions in the zip file Enjoy!
Note: Don't try to flash this zip. Extract it to you PC okay?
NEW VERSION: Works with all of the EVO Gingerbread Frameworks now
This allows applying full customization including Battery Mods
Will this allow me to enable transparent notification tray background?
I've been having trouble getting that to work on 2.3
Provided you have your xml files and png's edited properly. It should work
This tool simply provides a quick interface to decompile/Recompile/Install changes to the SystemUI.apk
townsenk said:
Provided you have your xml files and png's edited properly. It should work
This tool simply provides a quick interface to decompile/Recompile/Install changes to the SystemUI.apk
Click to expand...
Click to collapse
Is this for Windows or ubuntu?
Evolutionmods said:
Is this for Windows or ubuntu?
Click to expand...
Click to collapse
Windows...
The readme file say this needs clockworkmod rec, anyone test it with amon ra?
Hmm, could this be used to actually remove some of the Sense icons? Namely the useless alarm icon (which shows up even if you have an alarm for 5 days from today) and the Location Services reticle icon?
Many ROMs remove the latter, I actually followed a guide to using smali for removing the alarm icon on my current Froyo ROM but I guess they changed the location of all that stuff on GB... I haven't really taken a look at it to see if I could figure out the new locations on my own, not much time to tinker lately, if the script can automate that task it'd be awesome...
You'd still have to edit the xml's or make transparent icons. I would assume that what you need is in the decompiled layout directory. I could be wrong. I wanted people to be able to take an existing mod and apply it to their phone without having to memorize multiple command lines. Any xml editing at this point is strictly manual
Ultimately yes I want the script to have the ability to install preedited "mod packs" to simplify the process of applying common mods. Where a user would select the desired mods ala-carte and the script would combine them and compile a new framework
I believe I did it thru an xml edit last time since a transparent icon would just leave a blank space, erich I've never had. But yea, seems I'll just have to dig in and figure out the equivalent directory in GB... Might just wait until I upgrade to the EVO 3D.

Categories

Resources