1. Download our Official Android App: Forums for Android!

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

Discussion in 'Android Devices' started by mantera, Sep 3, 2011.

  1. mantera

    mantera Android Expert
    Thread Starter
    Rank:
    None
    Points:
    313
    Posts:
    1,319
    Joined:
    May 21, 2011

    May 21, 2011
    1,319
    1,587
    313
    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:

    [​IMG]

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

    [​IMG]

    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

    [​IMG]

    [​IMG]


    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
     

    Attached Files:


    Advertisement

    BSydz, medmansri, punkmaxx and 3 others like this.
  2. mantera

    mantera Android Expert
    Thread Starter
    Rank:
    None
    Points:
    313
    Posts:
    1,319
    Joined:
    May 21, 2011

    May 21, 2011
    1,319
    1,587
    313
    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.
     
  3. JollyRoger87

    JollyRoger87 Android Enthusiast
    Rank:
    None
    Points:
    53
    Posts:
    403
    Joined:
    Jul 27, 2011

    Jul 27, 2011
    403
    85
    53
    UPS
    Phoenix, Az
    Odexed and nothing changes at all, I'll flash the deodexed template and then reflash this and report back
     
  4. beaviskob1

    beaviskob1 Member
    Rank:
    None
    Points:
    18
    Posts:
    67
    Joined:
    Aug 1, 2011

    Aug 1, 2011
    67
    19
    18
    deodexed and no menu change after flash :( thanks for the try
     
  5. mantera

    mantera Android Expert
    Thread Starter
    Rank:
    None
    Points:
    313
    Posts:
    1,319
    Joined:
    May 21, 2011

    May 21, 2011
    1,319
    1,587
    313
    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.
     
    beaviskob1 likes this.
  6. beaviskob1

    beaviskob1 Member
    Rank:
    None
    Points:
    18
    Posts:
    67
    Joined:
    Aug 1, 2011

    Aug 1, 2011
    67
    19
    18
    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
     
  7. b_randon14

    b_randon14 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    910
    Joined:
    Aug 13, 2011

    Aug 13, 2011
    910
    628
    163
    Pizza Delivery Driver
    Somerset, KY
    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!
     
  8. mantera

    mantera Android Expert
    Thread Starter
    Rank:
    None
    Points:
    313
    Posts:
    1,319
    Joined:
    May 21, 2011

    May 21, 2011
    1,319
    1,587
    313
    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.
     

    Attached Files:

  9. b_randon14

    b_randon14 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    910
    Joined:
    Aug 13, 2011

    Aug 13, 2011
    910
    628
    163
    Pizza Delivery Driver
    Somerset, KY
    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!
     
  10. Austrie

    Austrie Android Expert
    Rank:
    None
    Points:
    213
    Posts:
    1,325
    Joined:
    Jan 16, 2011

    Jan 16, 2011
    1,325
    898
    213
    Male
    St.Thomas, US Virgin Islands
    OMG, WOW, I been thinking of doing this for 2 weeks now, I been busy lol.
     
  11. mantera

    mantera Android Expert
    Thread Starter
    Rank:
    None
    Points:
    313
    Posts:
    1,319
    Joined:
    May 21, 2011

    May 21, 2011
    1,319
    1,587
    313
    Glad to hear it worked for you. :)
     
  12. mantera

    mantera Android Expert
    Thread Starter
    Rank:
    None
    Points:
    313
    Posts:
    1,319
    Joined:
    May 21, 2011

    May 21, 2011
    1,319
    1,587
    313
    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.
     
  13. punkmaxx

    punkmaxx Android Enthusiast
    Rank:
    None
    Points:
    88
    Posts:
    475
    Joined:
    Aug 23, 2011

    Aug 23, 2011
    475
    291
    88
    Male
    Music Producer, Arborist, General Contractor
    West Virginia
    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)
     

    Attached Files:

  14. mantera

    mantera Android Expert
    Thread Starter
    Rank:
    None
    Points:
    313
    Posts:
    1,319
    Joined:
    May 21, 2011

    May 21, 2011
    1,319
    1,587
    313
    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).
     
  15. punkmaxx

    punkmaxx Android Enthusiast
    Rank:
    None
    Points:
    88
    Posts:
    475
    Joined:
    Aug 23, 2011

    Aug 23, 2011
    475
    291
    88
    Male
    Music Producer, Arborist, General Contractor
    West Virginia
    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....
     
  16. punkmaxx

    punkmaxx Android Enthusiast
    Rank:
    None
    Points:
    88
    Posts:
    475
    Joined:
    Aug 23, 2011

    Aug 23, 2011
    475
    291
    88
    Male
    Music Producer, Arborist, General Contractor
    West Virginia
    mantera likes this.
  17. b_randon14

    b_randon14 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    910
    Joined:
    Aug 13, 2011

    Aug 13, 2011
    910
    628
    163
    Pizza Delivery Driver
    Somerset, KY
    Okay so I got the mod to work, but whenever it reboots and goes to recovery, it does a hard reboot(it doesnt show the shutdown animation) this is much like what quick boot does, and overtime its not good for the system. Wonder if there is anyway to change the way it shutdowns?
     
  18. mantera

    mantera Android Expert
    Thread Starter
    Rank:
    None
    Points:
    313
    Posts:
    1,319
    Joined:
    May 21, 2011

    May 21, 2011
    1,319
    1,587
    313
    I'm not sure. I've run across some other threads of people complaining about the same thing in other phones' ROMS. I'll have to compare this with some others to see if there's any similarities. Otherwise, it might just have to be this way. We'll see.
     
  19. b_randon14

    b_randon14 Android Expert
    Rank:
    None
    Points:
    163
    Posts:
    910
    Joined:
    Aug 13, 2011

    Aug 13, 2011
    910
    628
    163
    Pizza Delivery Driver
    Somerset, KY
    Yeah I know the one for the intercept shutdown right but I don't really know what the difference is
    Ill look into it though!
     
  20. mantera

    mantera Android Expert
    Thread Starter
    Rank:
    None
    Points:
    313
    Posts:
    1,319
    Joined:
    May 21, 2011

    May 21, 2011
    1,319
    1,587
    313
    I figured out what the problem was. Updated OP with v1.1 of mod.
     
    punkmaxx likes this.
  21. punkmaxx

    punkmaxx Android Enthusiast
    Rank:
    None
    Points:
    88
    Posts:
    475
    Joined:
    Aug 23, 2011

    Aug 23, 2011
    475
    291
    88
    Male
    Music Producer, Arborist, General Contractor
    West Virginia
    Sweet!!!!
     
  22. agentc13

    agentc13 Daleks Über Alles
    Rank:
    None
    Points:
    923
    Posts:
    7,916
    Joined:
    Aug 31, 2011

    Aug 31, 2011
    7,916
    5,482
    923
    Skaro
    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?
     
  23. punkmaxx

    punkmaxx Android Enthusiast
    Rank:
    None
    Points:
    88
    Posts:
    475
    Joined:
    Aug 23, 2011

    Aug 23, 2011
    475
    291
    88
    Male
    Music Producer, Arborist, General Contractor
    West Virginia
    Thanks again for all your hard work mantera!!! I really appreciate you making the reboot and recovery MOD available.
     
  24. mantera

    mantera Android Expert
    Thread Starter
    Rank:
    None
    Points:
    313
    Posts:
    1,319
    Joined:
    May 21, 2011

    May 21, 2011
    1,319
    1,587
    313
    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.
     
  25. agentc13

    agentc13 Daleks Über Alles
    Rank:
    None
    Points:
    923
    Posts:
    7,916
    Joined:
    Aug 31, 2011

    Aug 31, 2011
    7,916
    5,482
    923
    Skaro
    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!
     

Share This Page

Loading...