[MODS](ODEXED) CDMA XT912 1% Battery & Drop Toggles (PORTING GUIDE INCLUDED)

Search This thread

alteredlikeness

Senior Member
Mar 2, 2012
2,454
5,472
reflecting on Indra's net
Did this for a friend on the razr - but I'm on an Atrix 2, so it's not that much different... (original post can be found here)

Included are ODEXED versions (for your stock, rooted razr, if you so desire) of the 1% battery increments and horizontal scrollable quick panel toggles. This will also remove the carrier name from the pulldown menu (you're on your own for getting it back or removing it from the lockscreen if you want - this might help).

Screenshot_2012-08-11-02-00-42.png


NOTE: CDMA ONLY - This was made from and installed on DROID RAZR System version 6.16.211.XT912.Verizon.en.US on ICS 4.0.4 - not sure about cross-system compatibility, but I wouldn't try it without a backup plan..
I am not responsible for your phone.


Download & Install:
(The following is the way I installed it using whirleye's BootMenu app - feel free to unzip and/or use your own method to install)
-Download RAZR_ICS_ODEXED_1perBatt_DropTogs.zip to your sdcard
-Boot into recovery with BootMenu
-Wipe dalvik & cache partition
-Install zip & Reboot

Credits & Thanks:
I ported these both over to ICS from GB for the A2... then moved them over to the RAZR (it involves a lot of edits, additions, deodexing and re-odexing)
-Major credit goes to nitroglycerine33 for the scrollable toggles
-Thanks also to cogeary for bringing nitro's work to the A2
-Thanks to he_stheone64 for the battery icons (except the unknown (?) batt image, that was me:))
-Thanks to iwabashu for the use of the RAZR and the screenie :D
-----------------------------------------
Original post (but, very applicable to the RAZR variants): http://xdaforums.com/showthread.php?t=1803516
PORTING THE 1% BATTERY INCREMENTS & DROPDOWN (QUICK PANEL) TOGGLES TO YOUR SYSTEM VERSION

This guide is based on moving these mods for ICS to other similar ICS-running devices. The process varies a bit going from GB to ICS. Or ICS to JB..
You will need:
Your deodexed SystemUI.apk
Your deodexed services.jar
Copies of deodexed SystemUI.apk & services.jar with the mods
Apktool /Smali/Baksmali tools
Notepad++ or similar text editor
7-zip or similar archive manager
WinMerge or Meld or similar diff/compare tool (a very useful tool that allows you to compare two folders or files side-by-side, and points out the differences for you)

My “get started” thread may hold some tips for accomplishing the tasks below – check it out HERE

IMPORTANT: This guide is to help you get these mods to your system, for your personal use. If you take the toggles from above and decide to use them in a ROM, be certain to credit nitroglycerine33 for his work.

Don't forget to install your framework for apktool by putting your framework-res.apk next to apktool, cd to that folder (or hold-shift right-click), and do a:
Code:
apktool if framework-res.apk

SystemUI.apk:
-decompile your deodexed SystemUI.apk
-rename the one with the mods to something else like SystemUI2.apk, and decompile also

For the dropdown toggles:
-add quickpanel smali
Copy the “quickpanel” folder from the modded com\android\systemui\statusbar folder to the same location in your stock
Capture0.PNG


-add quickpanel_quick_settings.xml to layout folder
Open the modded SystemUI.apk\res\layout folder and copy the quickpanel_quick_settings.xml to your stock layout folder
NOTE: Some older toggle mods may not have this xml, all of the code was included in the status_bar_expanded.xml (Big thanks to nitroglycerine33 for the new xml code that is so much easier to work with)

-edit status_bar_expanded.xml or status_bar_tracking.xml for new qp xml (see below for options - some don't have the _tracking.xml - it's all in expanded, I think)
Open the modded SystemUI.apk\res\layout\status_bar_expanded.xml and add this line:
Code:
<include layout="@layout/quickpanel_quick_settings" />
(this will put the toggles between the date and notifications)
Capture9.PNG

OR
(this will put the toggles above the date, directly under the status bar)
Capture10.PNG

OR
delete the "include layout" line entirely from status_bar_expanded and open status_bar_tracking.xml
(this will put the toggles at the very bottom, attached to the close bar)
Capture11.PNG


-add 33 quickpanel images
Add or copy the 33 .png images associated with the quickpanel toggles from the modded SystemUI.apk\res\drawable-hdpi to your stock /drawable-hdpi folder
Capture2.PNG


-add qp lines to ids.xml
Open the modded SystemUI.apk\res\values\ids.xml and copy all of the quickpanel ids to your stock ids.xml (there should be 41 lines at the bottom of the xml – selected in the screenshot below)
Capture3.PNG


-add qp lines to strings.xml
Open the modded SystemUI.apk\res\values\strings.xml and copy all of the quickpanel strings to your stock strings.xml (there should be 15 lines at the bottom of the xml – selected in the screenshot below)
Capture4.PNG


-add qp to public.xml
(NOTE: The resource ID’s in the public.xml need to be unique – meaning that no two alpha-numeric IDs can be the same. If you are lucky, you can just use the trick below and copy the resource IDs entirely from the modded xml. So, before you copy and paste, check a few of the modded resource ID’s against your stock. If you need to assign new ID’s, just stop here, compile your SystemUI.apk, then decompile it again and look for the new IDs created in the public.xml – you will then need to copy those resource IDs over to the quickpanel smali files - with a lot of cross-referenceing.)
Open the modded SystemUI.apk\res\values\public.xml and copy the quickpanel lines from the public type = “drawable” (33 lines), “string” (15 lines), and “id” (41 lines) to your stock public.xml (do not worry about the drawables for the battery images)
Capture5.PNG
Capture6.PNG
Capture7.PNG


For the 1% Battery:
-add stat_sys battery xmls
Open the modded SystemUI.apk\res\drawable folder and copy stat_sys_battery.xml and stat_sys_battery_charge.xml to your stock drawable folder and overwrite the existing
Capture9a.PNG


-204 battery images
Add or copy the 204 .png images associated with the 1% battery increments from the modded SystemUI.apk\res\drawable-hdpi to your stock drawable-hdpi folder
Capture9b.PNG


-compile the SystemUI.apk (make sure that you saved your original signatures (META-INF folder), and do not compress the resources.arsc - meaning, take it out of the apk and re-add it to the apk in "store" mode with 7-zip)
-it is suggested to decompile the newly modded apk, and check that all of your new edits are still there


services.jar
For 1% battery mod only (toggles are done):
-baksmali the classes.dex from your services.jar, and rename the folder to my_classout, or something
-baksmali the classes.dex from the modded services.jar, and rename the folder to mod_classout, or whatever

-edit BatteryService.smali
Open the modded com\android\server\BatteryService.smali and your stock BatteryService.smali with WinMerge or Meld and compare the two files.

(What..? You didn't think I'd do it all for you, did you?)
Update: See HERE


-reassemble (smali) into a new classes.dex and copy to and overwrite the existing one in your services.jar with an archive manager


***ATTACHED ARE THE DEODEXED STOCK & MODDED XT912 FILES FOR YOUR REFERENCE AND TO COMPARE***


If this is for an ODEXED system, you must then re-odex the SystemUI.apk and services.jar. See HERE for how to do that

These were originally ported using a similar process from GB to ICS for the Atrix 2 (except I ended up re-doing all of the resource ID's in the quickpanel smali). Since then, I have used the above method to move both mods over to the RAZR. --- UPDATE 9/13/12: I also used this method to move the 1% battery increments over to CM10/JB for the A2... watch the v3, v4, etc, notation in the BatteryService.smali... pay attention to detail.

Please post questions or PM with complaints.

Big thanks to nitroglycerine33, cogeary, and whoever else first did the smali/xml coding, and all the devs/modders who came before..


EDIT (2012.12.25): Attached a zip below to restore stock odexed xt912 ICS files and remove this mod. Wipe dalvik cache and flash in custom recovery.
 

Attachments

  • RAZR912ICS_files2compare.zip
    8.6 MB · Views: 437
  • RAZR-xt912_RESTORE_StockODEXED_signed.zip
    2 MB · Views: 138
Last edited:

lrlooly

Member
Feb 7, 2012
41
2
Any confirmation from anyone that all toggles work? I would love to do this to my phone. Im on. 215 willing to try it. But what happens if it doesnt work. How do i revert back to normal? Sbf?

Sent from my DROID RAZR using xda app-developers app
 

alteredlikeness

Senior Member
Mar 2, 2012
2,454
5,472
reflecting on Indra's net
Any confirmation from anyone that all toggles work? I would love to do this to my phone. Im on. 215 willing to try it. But what happens if it doesnt work. How do i revert back to normal? Sbf?

Sent from my DROID RAZR using xda app-developers app

Not sure if it will work on .215..
But, you should always have a good backup just in case something goes wrong.. sbf should be a last resort.

Or you can create another zip package with your current working copies of the 4 files that will be replaced by this zip package. You can probably just use this zip package and drop your current apk/jar/odex files in there and put it on your sdcard also... And if it bootloops, go into recovery and flash the zip to restore your original files..
This might help - there's a small section at the end about making zip packages: http://xdaforums.com/showthread.php?t=1753659

Sent from my phone's mind
 
  • Like
Reactions: artur0588

lrlooly

Member
Feb 7, 2012
41
2
Wont install on. 215. Not sure if there is something i did wrong however.

Sent from my DROID RAZR using xda app-developers app
 

chris3582

Senior Member
Apr 21, 2010
122
32
42
wallingford
Did not work for me either, stock ics, rooted. I would love to get this on my phone.

Sent from my DROID RAZR using xda premium
 

alteredlikeness

Senior Member
Mar 2, 2012
2,454
5,472
reflecting on Indra's net
NOTE: CDMA ONLY - This was made from and installed on DROID RAZR System version 6.16.211.XT912.Verizon.en.US on ICS 4.0.4 - not sure about cross-system compatibility, but I wouldn't try it without a backup plan..
I am not responsible for your phone.


Wont install on. 215. Not sure if there is something i did wrong however.

Sent from my DROID RAZR using xda app-developers app


Did not work for me either, stock ics, rooted. I would love to get this on my phone.

Sent from my DROID RAZR using xda premium

If it's not the system version listed, it doesn't work for you.

chris3582 - what version are you? How are you trying to install?

And you guys all have recovery on boot working before trying these things, right?

Sent from my phone's mind
 
  • Like
Reactions: artur0588

chris3582

Senior Member
Apr 21, 2010
122
32
42
wallingford
If it's not the system version listed, it doesn't work for you.

chris3582 - what version are you? How are you trying to install?

And you guys all have recovery on boot working before trying these things, right?

Sent from my phone's mind

I am trying to flash it using safestrap.

Sent from my DROID RAZR using xda premium
 

Attachments

  • uploadfromtaptalk1344823212835.jpg
    uploadfromtaptalk1344823212835.jpg
    53.6 KB · Views: 471

alteredlikeness

Senior Member
Mar 2, 2012
2,454
5,472
reflecting on Indra's net
I am trying to flash it using safestrap.

Sent from my DROID RAZR using xda premium

Yea, that's what I was afraid of.. I do not have much experience with safestrap. It might just be that the updater-script needs to be revised... it's made for cwm recovery, and I used whirleyes BootMenu to install..

If someone with experience wants to convert this mod to work with safestrap.. please feel free

Sent from my phone's mind
 
  • Like
Reactions: DROIDESP

greeky510

Senior Member
Oct 3, 2011
377
62
Norwalk, CT
I tried it with my stock rooted vzw .215. It doesnt work. My phone would just stay in the start-up animation. I had to fastboot back to. 211.

Any confirmation from anyone that all toggles work? I would love to do this to my phone. Im on. 215 willing to try it. But what happens if it doesnt work. How do i revert back to normal? Sbf?

Sent from my DROID RAZR using xda app-developers app
 

DCDD85

Member
May 22, 2012
23
1
Yea, that's what I was afraid of.. I do not have much experience with safestrap. It might just be that the updater-script needs to be revised... it's made for cwm recovery, and I used whirleyes BootMenu to install..

If someone with experience wants to convert this mod to work with safestrap.. please feel free

Sent from my phone's mind

Can anyone let me know if this works with the Razr stock recovery and not just CWM?

Thanks!
 

DROIDESP

Senior Member
Sep 21, 2010
126
34
San Diego
Screenshot Included

Finally! - Thanks for letting me know that it does work on someone else's phone! I mean, with over 30 downloads you are the first to verify it works (besides my friend who I originally made it for).. thanks.. and enjoy :)

Sent from my phone's mind

Thanks again! Thought I would send a screenshot so you know! :)
 

Attachments

  • Screenshot_2012-08-14-14-20-17.jpg
    Screenshot_2012-08-14-14-20-17.jpg
    21.2 KB · Views: 406
  • Like
Reactions: alteredlikeness

alteredlikeness

Senior Member
Mar 2, 2012
2,454
5,472
reflecting on Indra's net
Can anyone let me know if this works with the Razr stock recovery and not just CWM?

Thanks!

Stock recovery? Probably not. Why not just install BootMenu?

Also, you guys can just take the apk/odex files from the zip and install them by different means.. like adb or root explorer.. just make sure that you set proper permissions, then reboot.

Sent from my phone's mind
 

Top Liked Posts

  • There are no posts matching your filters.
  • 24
    Did this for a friend on the razr - but I'm on an Atrix 2, so it's not that much different... (original post can be found here)

    Included are ODEXED versions (for your stock, rooted razr, if you so desire) of the 1% battery increments and horizontal scrollable quick panel toggles. This will also remove the carrier name from the pulldown menu (you're on your own for getting it back or removing it from the lockscreen if you want - this might help).

    Screenshot_2012-08-11-02-00-42.png


    NOTE: CDMA ONLY - This was made from and installed on DROID RAZR System version 6.16.211.XT912.Verizon.en.US on ICS 4.0.4 - not sure about cross-system compatibility, but I wouldn't try it without a backup plan..
    I am not responsible for your phone.


    Download & Install:
    (The following is the way I installed it using whirleye's BootMenu app - feel free to unzip and/or use your own method to install)
    -Download RAZR_ICS_ODEXED_1perBatt_DropTogs.zip to your sdcard
    -Boot into recovery with BootMenu
    -Wipe dalvik & cache partition
    -Install zip & Reboot

    Credits & Thanks:
    I ported these both over to ICS from GB for the A2... then moved them over to the RAZR (it involves a lot of edits, additions, deodexing and re-odexing)
    -Major credit goes to nitroglycerine33 for the scrollable toggles
    -Thanks also to cogeary for bringing nitro's work to the A2
    -Thanks to he_stheone64 for the battery icons (except the unknown (?) batt image, that was me:))
    -Thanks to iwabashu for the use of the RAZR and the screenie :D
    -----------------------------------------
    Original post (but, very applicable to the RAZR variants): http://xdaforums.com/showthread.php?t=1803516
    PORTING THE 1% BATTERY INCREMENTS & DROPDOWN (QUICK PANEL) TOGGLES TO YOUR SYSTEM VERSION

    This guide is based on moving these mods for ICS to other similar ICS-running devices. The process varies a bit going from GB to ICS. Or ICS to JB..
    You will need:
    Your deodexed SystemUI.apk
    Your deodexed services.jar
    Copies of deodexed SystemUI.apk & services.jar with the mods
    Apktool /Smali/Baksmali tools
    Notepad++ or similar text editor
    7-zip or similar archive manager
    WinMerge or Meld or similar diff/compare tool (a very useful tool that allows you to compare two folders or files side-by-side, and points out the differences for you)

    My “get started” thread may hold some tips for accomplishing the tasks below – check it out HERE

    IMPORTANT: This guide is to help you get these mods to your system, for your personal use. If you take the toggles from above and decide to use them in a ROM, be certain to credit nitroglycerine33 for his work.

    Don't forget to install your framework for apktool by putting your framework-res.apk next to apktool, cd to that folder (or hold-shift right-click), and do a:
    Code:
    apktool if framework-res.apk

    SystemUI.apk:
    -decompile your deodexed SystemUI.apk
    -rename the one with the mods to something else like SystemUI2.apk, and decompile also

    For the dropdown toggles:
    -add quickpanel smali
    Copy the “quickpanel” folder from the modded com\android\systemui\statusbar folder to the same location in your stock
    Capture0.PNG


    -add quickpanel_quick_settings.xml to layout folder
    Open the modded SystemUI.apk\res\layout folder and copy the quickpanel_quick_settings.xml to your stock layout folder
    NOTE: Some older toggle mods may not have this xml, all of the code was included in the status_bar_expanded.xml (Big thanks to nitroglycerine33 for the new xml code that is so much easier to work with)

    -edit status_bar_expanded.xml or status_bar_tracking.xml for new qp xml (see below for options - some don't have the _tracking.xml - it's all in expanded, I think)
    Open the modded SystemUI.apk\res\layout\status_bar_expanded.xml and add this line:
    Code:
    <include layout="@layout/quickpanel_quick_settings" />
    (this will put the toggles between the date and notifications)
    Capture9.PNG

    OR
    (this will put the toggles above the date, directly under the status bar)
    Capture10.PNG

    OR
    delete the "include layout" line entirely from status_bar_expanded and open status_bar_tracking.xml
    (this will put the toggles at the very bottom, attached to the close bar)
    Capture11.PNG


    -add 33 quickpanel images
    Add or copy the 33 .png images associated with the quickpanel toggles from the modded SystemUI.apk\res\drawable-hdpi to your stock /drawable-hdpi folder
    Capture2.PNG


    -add qp lines to ids.xml
    Open the modded SystemUI.apk\res\values\ids.xml and copy all of the quickpanel ids to your stock ids.xml (there should be 41 lines at the bottom of the xml – selected in the screenshot below)
    Capture3.PNG


    -add qp lines to strings.xml
    Open the modded SystemUI.apk\res\values\strings.xml and copy all of the quickpanel strings to your stock strings.xml (there should be 15 lines at the bottom of the xml – selected in the screenshot below)
    Capture4.PNG


    -add qp to public.xml
    (NOTE: The resource ID’s in the public.xml need to be unique – meaning that no two alpha-numeric IDs can be the same. If you are lucky, you can just use the trick below and copy the resource IDs entirely from the modded xml. So, before you copy and paste, check a few of the modded resource ID’s against your stock. If you need to assign new ID’s, just stop here, compile your SystemUI.apk, then decompile it again and look for the new IDs created in the public.xml – you will then need to copy those resource IDs over to the quickpanel smali files - with a lot of cross-referenceing.)
    Open the modded SystemUI.apk\res\values\public.xml and copy the quickpanel lines from the public type = “drawable” (33 lines), “string” (15 lines), and “id” (41 lines) to your stock public.xml (do not worry about the drawables for the battery images)
    Capture5.PNG
    Capture6.PNG
    Capture7.PNG


    For the 1% Battery:
    -add stat_sys battery xmls
    Open the modded SystemUI.apk\res\drawable folder and copy stat_sys_battery.xml and stat_sys_battery_charge.xml to your stock drawable folder and overwrite the existing
    Capture9a.PNG


    -204 battery images
    Add or copy the 204 .png images associated with the 1% battery increments from the modded SystemUI.apk\res\drawable-hdpi to your stock drawable-hdpi folder
    Capture9b.PNG


    -compile the SystemUI.apk (make sure that you saved your original signatures (META-INF folder), and do not compress the resources.arsc - meaning, take it out of the apk and re-add it to the apk in "store" mode with 7-zip)
    -it is suggested to decompile the newly modded apk, and check that all of your new edits are still there


    services.jar
    For 1% battery mod only (toggles are done):
    -baksmali the classes.dex from your services.jar, and rename the folder to my_classout, or something
    -baksmali the classes.dex from the modded services.jar, and rename the folder to mod_classout, or whatever

    -edit BatteryService.smali
    Open the modded com\android\server\BatteryService.smali and your stock BatteryService.smali with WinMerge or Meld and compare the two files.

    (What..? You didn't think I'd do it all for you, did you?)
    Update: See HERE


    -reassemble (smali) into a new classes.dex and copy to and overwrite the existing one in your services.jar with an archive manager


    ***ATTACHED ARE THE DEODEXED STOCK & MODDED XT912 FILES FOR YOUR REFERENCE AND TO COMPARE***


    If this is for an ODEXED system, you must then re-odex the SystemUI.apk and services.jar. See HERE for how to do that

    These were originally ported using a similar process from GB to ICS for the Atrix 2 (except I ended up re-doing all of the resource ID's in the quickpanel smali). Since then, I have used the above method to move both mods over to the RAZR. --- UPDATE 9/13/12: I also used this method to move the 1% battery increments over to CM10/JB for the A2... watch the v3, v4, etc, notation in the BatteryService.smali... pay attention to detail.

    Please post questions or PM with complaints.

    Big thanks to nitroglycerine33, cogeary, and whoever else first did the smali/xml coding, and all the devs/modders who came before..


    EDIT (2012.12.25): Attached a zip below to restore stock odexed xt912 ICS files and remove this mod. Wipe dalvik cache and flash in custom recovery.
    2
    Just an warning for GSM Users > Crackflasher as i'm, i had to try it :D

    Stuck on Bootanimation, so nandroid back :eek:
    1
    Any confirmation from anyone that all toggles work? I would love to do this to my phone. Im on. 215 willing to try it. But what happens if it doesnt work. How do i revert back to normal? Sbf?

    Sent from my DROID RAZR using xda app-developers app

    Not sure if it will work on .215..
    But, you should always have a good backup just in case something goes wrong.. sbf should be a last resort.

    Or you can create another zip package with your current working copies of the 4 files that will be replaced by this zip package. You can probably just use this zip package and drop your current apk/jar/odex files in there and put it on your sdcard also... And if it bootloops, go into recovery and flash the zip to restore your original files..
    This might help - there's a small section at the end about making zip packages: http://xdaforums.com/showthread.php?t=1753659

    Sent from my phone's mind
    1
    Just an warning for GSM Users > Crackflasher as i'm, i had to try it :D

    Stuck on Bootanimation, so nandroid back :eek:

    Yea.. cdma only - as it's the SystemUI.apk and services.jar getting changed.
    I updated the OP. Sorry bout that.

    Sent from my phone's mind
    1
    NOTE: CDMA ONLY - This was made from and installed on DROID RAZR System version 6.16.211.XT912.Verizon.en.US on ICS 4.0.4 - not sure about cross-system compatibility, but I wouldn't try it without a backup plan..
    I am not responsible for your phone.


    Wont install on. 215. Not sure if there is something i did wrong however.

    Sent from my DROID RAZR using xda app-developers app


    Did not work for me either, stock ics, rooted. I would love to get this on my phone.

    Sent from my DROID RAZR using xda premium

    If it's not the system version listed, it doesn't work for you.

    chris3582 - what version are you? How are you trying to install?

    And you guys all have recovery on boot working before trying these things, right?

    Sent from my phone's mind