• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [MOD] [FROYO] Reboot and Recovery options, 1% battery icon, power control widgets (updated 11-19)

Minus the GPS and a few minor bugs (well, minor in my opinion) it is in workable daily use sort of shape. CM7 has the different boot/shutdown options that you added to the stock rom. But the battery icon changes would be pretty cool when/if you ever work on that let me know!
You can get battery % icons with cm7 themes i think....pretty sure
 
Minus the GPS and a few minor bugs (well, minor in my opinion) it is in workable daily use sort of shape. CM7 has the different boot/shutdown options that you added to the stock rom. But the battery icon changes would be pretty cool when/if you ever work on that let me know!

I took a look. The battery icons should be easy enough to do. Which icons did you want exactly? The original ones? or one of the ones from Punkmaxx's themed ones?
 
You can get battery % icons with cm7 themes i think....pretty sure
There is an option in the standard build, but I don't really like the way it looks.
If you know of a link with instructions to do it yourself you can just link it. I can figure the stuff out, I was just curious if anyone knew how hard it would be to do for CM7.

I took a look. The battery icons should be easy enough to do. Which icons did you want exactly? The original ones? or one of the ones from Punkmaxx's themed ones?
The ones from Punkmaxx. Specifically the first one that is the circle and the icon with the number in it. Not the gas gauge looking one. And like I said above, I can probably do it myself, just need to find a tutorial.
 
Here. Try this and see if it works to add the battery dial to the 9/12 Tickerguy cm7 build. I have not tested it. Let me know if it works and I'll add it to the OP.

Basically, if you want to do it yourself, here's the steps:

1. Decompile the framework-res.apk file in the attached zip.
2. save the stat_sys_battery.xml file in \res\drawable\
3. Save any of the battery icons from \res\drawable-hdpi\ that you want to keep--the names all start with stat_sys_battery_xx.png where xx is a number.
4. Decompile the updated framework-res.apk file from the new rom.
5. Copy the files you saved into their respective folders in the new decompiled framework-res.apk.
6. Recompile the new framework-res.apk.
7. Replace the file in flashable Zip with the new version and then flash it OR you can just adb push it if you want to do that as well.

Alternatively, this MAY work without needing to decompile/recompile but I haven't tried it:
1. Open the framework-res.apk file in a Zip utility such as 7-zip or WinZip.
2. browse to the respective locations inside the .apk file noted above and replace the already compiled stat_sys_battery.xml file and .png files with the files and images that you want (basically the ones from the attached file--make sure you do NOT decompile the original files first or you will probably bootloop--just copy and paste straight from the old framework-res.apk file into the new framework-res.apk file)
3. Save the updated .apk file and then flash it or adb push it.
 
Updated OP:

Changelog:
v1.3
- added power control widgets to notification bar
- thanks to 96blkgsr on sdx for the port based on JsChiSurf's port.
- thanks to ziggy46 for pointing me in the right direction.
- added Power Control Widgets Settings Application by JsChiSurf
 
how did i know mantera was going to get this to work! :D great work man! this will be great for an upcoming rom ;)

EDIT: to anyone whom might care... you can look forward to a new and improved thunder rom showing up soon. this mod will be in it and themed
 
Mantera = one_love_420 for the triumph = complete genius :). bROM v1.1 will also feature this with many mods and fixes. I got it running very smooth!!!
 
Hey where all still noobs! I sure am! But i mean the proof is there you figured it out! I could not, and one_love didnt get it his first try!

Im bout to test where I added it to my theme. I figured it would be easier to just add it to my theme then remake my theme off yours lol!

Hey on the clock text, you didn't change anything in the services or framework that changed anything to do with the lockscreen clock did you?
 
Hey where all still noobs! I sure am! But i mean the proof is there you figured it out! I could not, and one_love didnt get it his first try!

Im bout to test where I added it to my theme. I figured it would be easier to just add it to my theme then remake my theme off yours lol!

Hey on the clock text, you didn't change anything in the services or framework that changed anything to do with the lockscreen clock did you?

All of the changes related to the lockscreen clock text:

Name Path
AndroidClock.ttf fonts\
AndroidClock_Highlight.ttf fonts\
AndroidClock_Solid.ttf fonts\
DigitalClock$AmPm.smali framework\
DigitalClock$FormatChangeObserver.smali framework\
DigitalClock$TimeChangedReceiver$1.smali framework\
DigitalClock$TimeChangedReceiver.smali framework\
DigitalClock.smali framework\
keyguard_screen_tab_unlock.xml framework-res\layout\
keyguard_screen_tab_unlock_land.xml framework-res\layout\
keyguard_screen_unlock_landscape.xml framework-res\layout\
keyguard_screen_unlock_portrait.xml framework-res\layout\
ids.xml framework-res\values\
public.xml framework-res\values\
 
What's different about the clock?

And I got it working on my theme but all my icons show up as distorted battery icons! Did you have to include the resource I'd number for the icons inside the jar files somewhere kinda like with the reboot recovery mod?
 
What's different about the clock?

And I got it working on my theme but all my icons show up as distorted battery icons! Did you have to include the resource I'd number for the icons inside the jar files somewhere kinda like with the reboot recovery mod?


I had added this to the OP stealthily; the screenshot I posted doesn't show the contrast as much as it actually looks:

quoted from dhiru1602:
What's so special in this Digital Clock?

This is an obvious question. Why to port the digital clock when a simple TTF font file replacement could do the job? Hmm.. Have you noticed that the Clock uses 2 font colors? A TTF file generally contains the font, but the color attribute is specified in the XML file. Hence, the Digits in the clock can only carry one color attribute. The Digital Clock in Honeycomb uses special rendering to display 2 font colors. Its relatively simple.

There are 2 TTF file which contain distinct digits. Hence 2 types of Clock Text with 2 different font faces are rendered. They are overlapped on each other and using XML attributes each "Textview" is assigned a different text color. This is what creates the funky looking digits. Pretty Cool eh?

As for the resource id's, yes, you need to add it to widgets files in the widgets folder.
 
Ah that's where my problem was. I didn't even think about changing the resource ids lol! I think I'm going to make the background for mine instead of having black background have it use a custom image!
Yeah after I posted that I realized it was up there lol!
 
Hey man were you able to change the indicator color on your power widgets. I finally got the icons straightened out, but whenever I tried to change the indicator color from cyan to green it stayed cyan!
 
Yes, it worked for me when I tried it. I was able to turn the cyan color on the buttons to a reddish color and it stuck.
 
I had to reboot and it changed it. I am having some issues though with gps won't turn gps off, and the screen brightness don't work at all. I built it off of your framework, and wifi won't turn it off, it just disconnects me from my network. I don't know if I messed something up by messing with it cause I removed the clock mod, and changed the layout of the widgets(I moved them to the top of the expanded statusbar, and changed it to use a custom background and some other little things) or what is going on!
 
Removing the clock mod shouldn't mess with it too much. The only interaction between the two mods is that in the public.xml file, the clock mod uses this one line:

<public type="id" name="timeDisplayForeground" id="0x010202c2" />

If you removed that, then you need to make sure that the id number for the next id type item is in sequential order; I assume you know this already but just reiterating it, just in case.

As for why some of your buttons don't work right, in the services.jar file in com\android\server\status\StatusBarService.smali there's a whole lot of little edits of goto_xx and linexxx etc that you need to copy over also. For this instance, you do need to copy those over from the files and make sure they match.
 
Dude my phone is acting so crazy. Like when I first flashed my PW theme based off your with the clock removed and it themed like my current bROM theme, only some of the widgets work. Now they all work, and everything is fine, except whenever I have my phone charging, when I try to reboot, it just freezes and force reboots, not shutting down the proper way, and it does it with recovery. reboot and shutdown. But when it's not charging its fine!

Hey mantera could you flash yours and see if yours does that or if it's just something I messed up lol!!
 
Dude my phone is acting so crazy. Like when I first flashed my PW theme based off your with the clock removed and it themed like my current bROM theme, only some of the widgets work. Now they all work, and everything is fine, except whenever I have my phone charging, when I try to reboot, it just freezes and force reboots, not shutting down the proper way, and it does it with recovery. reboot and shutdown. But when it's not charging its fine!

Hey mantera could you flash yours and see if yours does that or if it's just something I messed up lol!!

Mine works fine shutting down, reboot, and reboot recovery while connected and charging on usb.

Something being messed up in the framework.jar in the shutdownthread.smali would be my first guess.
 
Yeah I don't even know anymore. I believe I have got something all messed up. It may be in the ROM or something. I am trying to get bROM v1.1 out, but I keep running into problems. Just when I said it didn't shutdown improperly off charge, it failed to shutdown correctly off charge. But I have been dealing with little bugs like this for a while now. Sometimes the next alarm time that shows up on the lock screen won't show up, and sometimes it will and never go away lol! Its in my theme I believe. I think I need to start all over from scratch as far as decompiling and adding everything in. Which apk tool(or apk manager) do you use to do your theming? I use apk manager 4.9.
 
Yeah I don't even know anymore. I believe I have got something all messed up. It may be in the ROM or something. I am trying to get bROM v1.1 out, but I keep running into problems. Just when I said it didn't shutdown improperly off charge, it failed to shutdown correctly off charge. But I have been dealing with little bugs like this for a while now. Sometimes the next alarm time that shows up on the lock screen won't show up, and sometimes it will and never go away lol! Its in my theme I believe. I think I need to start all over from scratch as far as decompiling and adding everything in. Which apk tool(or apk manager) do you use to do your theming? I use apk manager 4.9.

I was using 4.9 but I switched to 5.0.2 a while back. However, for this v1.3 mod, I ended up having to upgrade to APK Multi-Tool:

APK Multi-Tool

5.0.2 wasn't compiling correctly for me. Some of the libraries were outdated in the the previous versions and so the framework-res.apk wouldn't compile properly for me since I had to add so many new id's for the power widgets.
 
DO you do it on linux or windows? I use windows and I have thought maybe that was causing problems but I dont even know anymore!
 
Alright. Well I just went back to my non power widgets theme, and its still doing it, so I guess its in some of the changes I made to my ROM base or something! Lol it's driving me crazy though its been so buggy lately!
 
yea it shouldnt be your computer... im running windows 7 ultimate 32 bit and everything works fine for me. :D im going to start updating thunder rom to see if i can get more bites! LOL :D

@b-randon- when i remake thunder rom i keep getting updater script errors... i have no idea how to make those :( i know pretty much everything else though.


my windows 7!

WINDOWS7.png
 
Back
Top Bottom