• 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)

mantera

Android Expert
May 21, 2011
1,319
1,587
This MOD now has the following features:
- Reboot and Recovery options on the Power Menu
- 1% battery icons on status bar
- Power Control Widgets on notification menu
- Power Control Widgets Settings Application

DISCLAIMER: Use this mod at your own risk. By downloading these files, you are accepting all risk of anything happening to your phone.

To use this mod, you need to be using a de-odexed rom/template. There are 12 (11 working) notification bar menu Power Control Widgets available. The default from left to right are:

screenshot_10.png


toggleGPS|toggleWifi|toggleBluetooth|toggleBrightness|toggleSound|toggleMobileData
The remaining 6 are:

screenshot_13.png


toggleAirplane|toggleAutoRotate|toggleLockScreen|toggleScreenTimeout|toggleSleepMode|toggleSync

However the toggleAirplane widget doesn't work right on the Triumph so don't use it. Use the option on the power menu instead.

You can change which widgets show up by editing the widgets.txt file located in the /system/customize folder on the phone. You can have at MAX 6 widgets but you can have fewer if you want. When editing the widget.txt file, list the widgets that you want to use all on one line with no spaces and each widget name is separated by the pipe character (|)--like how I have the widget labels listed by the screenshots. You can edit the file in a few different ways:

1. directly using a file manager capable of mounting /system/ read-write, such as ES File Explorer or Root Explorer.
2. edit it on your computer and then adb push it to your phone.
3. edit it on your computer and put it in a flashable Zip file and flash it in CWM.

For reference, when editing widget.txt file, here is the complete list of available widgets with an explanation of what each of them does:

toggleAirplane - DOES NOT WORK PROPERLY
toggleAutoRotate - disables landscape mode
toggleBluetooth - toggles bluetooth on/off
toggleBrightness - toggles screen brightness (3 tiers)
toggleGPS - toggles gps
toggleLockScreen - enables/disables lockscreen
toggleMobileData - toggles mobile data on/off
toggleScreenTimeout - enables/disables screen timeout
toggleSleepMode - puts phone to sleep
toggleSound - toggles sound on/off
toggleSync - toggles data autosync on/off
toggleWifi - toggles wifi on/off

Also included with this mod is the PowerControl Widgets Configuration app that was developed by JsChiSurf to control the behavior of some fo the toggles available on the Power Control Widgets, such as Brightness Levels, Screen Timeout, etc. The App is in your app drawer; check it out. You can also read more about it from this post on xda:
[App] Power Control Widgets Settings Application - xda-developers

This mod makes many changes to your framework. If you flash this over an existing theme, you will overwrite it and most likely result in bootloops. You will either need to add these changes to your themed files or wait until your themer/developer does it.
Installation instructions:

MAKE SURE YOU ARE USING A DEODEXED TEMPLATE/ROM!

1. Download the Zip file and flash it in CWM.

The first time booting will take about 2 - 3 minutes while the new framework is set up. I would recommend rebooting your phone a couple of times more after the first boot and it will be smoother after that.

powermenu_batterymod-v1_3.zip
powermenu_batterymod-v1_3.zip

powermenu_batterymod-v1_3-undo.zip - use this file to undo the mod and go back to the stock deodexed files in case you bootloop.
powermenu_batterymod-v1_3-undo.zip

I've also attached a flashable zip file at the end of the post for the widget.txt file if you wish to make edits to it and then flash it in CWM.

You can use the b_randon14's de-odexed template here:
http://androidforums.com/triumph-all-things-root/405899-theme-stock-triumph-deodex-template.html
or his stock deodex ROM here:
http://androidforums.com/triumph-al...eodex-roms-triumph-now-resets-splash-img.html

screenshot_14.png


screenshot_12.png



Thanks goes to:
b_randon14 for the de-odexed rom/template.
ziggy46 for pointing me in the right direction for the power widgets controls
96blkgsr for the port that this is based on
JsChiSurf for the original mod and the PowerControl Widgets Configuration app
untermensch for the reboot/recovery instructions
KBanause and kalpik for the battery mod instructions
Fightspit for the battery mod icons
 

Attachments

  • widget_text.zip
    156 KB · Views: 82
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

1.2 (unreleased)
- added Honeycomb digital clock on lockscreen
- thanks to dhiru1602 for the instructions for the clock port.

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?


v1.1
This v1.1 zip has both the reboot, recovery power menu and the 1% battery icon and it now does a graceful shutdown:

https://zipsend.com/download/bHlDRm...lVag/44c2d8a52aa565fbfa69e0f6708e7657b2c0d025

If you are using a previous version of this mod in a theme/rom, you just need to update the android.policy.jar and framework.jar files from this Zip file. The framework-res.apk file was not touched in this update.
 
Upvote 0
deodexed and no menu change after flash :( thanks for the try

Are you using the deodexed template from b_randon?

So here's what I did to test.
1. I reflashed back to my nandroid pre-deodexing using b_randon's template.
2. I flashed the new power menu. Result: nothing changed in the power menu.
3. I flashed b_randon's template.
4. I then reflashed the new power menu flash. Result: The two new options showed up as in the screenshot.
 
  • Like
Reactions: beaviskob1
Upvote 0
Are you using the deodexed template from b_randon?

So here's what I did to test.
1. I reflashed back to my nandroid pre-deodexing using b_randon's template.
2. I flashed the new power menu. Result: nothing changed in the power menu.
3. I flashed b_randon's template.
4. I then reflashed the new power menu flash. Result: The two new options showed up as in the screenshot.

I forget who's deodex I used :eek:. I am using one where wifi works. I will try again.


I ended up starting over with stock flash as just changing deodex caused phone to reboot holding power button. Now working as designed. Thanks
 
Upvote 0
Hey i tried to reboot to recovery, and it froze then reboot normally on me. I guess you may need to tweak the reboot recovery mod. But nice work on the battery icons!

That's weird. I'm able to boot into recovery without a problem by hitting the Recovery option on the menu.

When you hit the Recovery menu option, does it always reboot only for you?

I'm assuming that the Reboot menu option works ok?

Have you had any other mods on along with this?

What recovery are you using? I have the orange font one that uses the "menu" softkey to select (I can't remember if that was Isaac's or TJStyle's). I've attached it for you in case you are using something different or if you want to try it to see if it makes a difference.

Are you using a custom splash screen or boot up animation?

My setup is I have stock everything except for your deodex template and the boot up and shutdown sounds are the silent ones + the reboot/recovery menu and battery icons.
 

Attachments

  • recovery.zip
    4.7 MB · Views: 77
Upvote 0
Well im using issac's cwm. But it freezes and does a force reboot. Like it doesn't go thru the shutdown progress on either reboot or recovery. So I may have gotten a bad flash. I have edited the framework, but that shouldnt have messed it up, I just changed the battery icons and charging icons. I'll look into it though cause I need it for my bROM i'm making!
 
Upvote 0
Well im using issac's cwm. But it freezes and does a force reboot. Like it doesn't go thru the shutdown progress on either reboot or recovery. So I may have gotten a bad flash. I have edited the framework, but that shouldnt have messed it up, I just changed the battery icons and charging icons. I'll look into it though cause I need it for my bROM i'm making!

Most of the shutdown code itself is in the android.policy.jar file. Did you change anything in there?

Yeah, the two menu options and the battery icon were the two of the features of a custom rom that I missed the most. So figured I'd take the initiative and make them so anyone who wants can include them in their roms. Hopefully, you figure out what's going on in your situation.
 
Upvote 0
Here, Try this out: Themed_powermenu_batterymod.zip
its a themed version of your MOD with notification icons & a new Lockscreen. Thanks again to mantera.
(Fonts not included)

Nice! I personally prefer the battery icon compared to the circle but your themed version looks great.

If you want, i can add it to the OP (credited to you of course).
 
Upvote 0
Nice! I personally prefer the battery icon compared to the circle but your themed version looks great.

If you want, i can add it to the OP (credited to you of course).

Sure thanks, Give me a bit to finish it and a few more & i'll upload multiple copies with different battery icons & different notification packs. I'll post more links & update the original static link in the next couple of hours.EDIT: or Minutes Check New Post....
 
Upvote 0
  • Like
Reactions: mantera
Upvote 0
I really like the way this looks, but I am using the CM7 ROM. Any chance you could do the same for that (both the battery circle and the batter icon with the number)? Or are they issues with that being possible?

I haven't even tried flashing CM7 yet. I've been waiting for it to be "done" before messing with it (or at least get to "alpha/beta" stage.
 
Upvote 0
I haven't even tried flashing CM7 yet. I've been waiting for it to be "done" before messing with it (or at least get to "alpha/beta" stage.

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!
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones