FORUMS
Remove All Ads from XDA

[MOD][Xposed][Sense6][Feb 18] Stock battery with percentage [4.x - 6.0]

3,573 posts
Thanks Meter: 1,795
 
Post Reply Email Thread
A very simple mod I threw together to replace the stock Sense 6 battery images with ones that have a numeric percentage embedded. This module will most likely only work on HTC devices running Sense 6 (m7, m8, etc), but might work on older devices running Sense 5/5.5 as HTC hasn't changed their battery image resource names in a while.

v1.3


v1.4.1




Install steps:
  1. Make sure you have the latest Xposed Framework installed (ARHD offers it in the AROMA installer).
  2. Make sure you enable the app_process from within Xposed Installer and reboot
  3. Install attached apk, just like you would any other apk
  4. Enable module in Xposed Installer and either reboot, or restart the shell (adb shell 'stop;start' or Soft reboot)
  5. Enjoy

If you'd rather customize (or have the ability to) the entire statusbar, check out my other module here.
For those running XSBM, I've put together an iconpack with this battery set here.

Also available in the Xposed Repo

Thanks to @jsmith8858 for the excellent BatteryIconMaker tool. It makes generating images so much easier/faster!

Changelog
  • 1.1
    • Increased percent numbers to 22pt, removed bold to enhance readability
  • 1.2
    • Added gray fill to battery background to make numbers more visible on light and dark backgrounds
  • 1.3
    • Increased font size to 27pt, and all numbers are black. Should be very visible now on all backgrounds except pure white.

  • 1.4
    • Battery icons provided by @brianhill1980 - numbers are outlined with transparent background
  • 1.4.1
    • Now with larger numbers and more defined outline
  • 1.5.0 - Only for LP roms!
    • First release with LP support. Follow install instructions below!

Install instructions for 1.5.0 on Lollipop roms (tested on MaximusHD 50):
  • Remove any prior installs of Sense 6 Battery Percent
  • Make sure you have a working install of Xposed Framework (XposedBridge v61) and Xposed Installer v3.0 Alpha 1. If you have not figured out how to do this, please see the official Xposed for Lollipop thread
  • Install the Sense6BatteryPercent_v1.5.0.apk, but do not reboot yet
  • Once the notification of a new module has shown up, go to Xposed Installer->Modules and enable Sense 6 Battery Percent
  • Tap on the Sense 6 Battery Percent list entry to open the "preferences" activity. There aren't actually any preferences, but I'm using that activity to unpack the images
  • Tap on the Unpack and Hide Launcher button, which will unpack the battery images and hide this specific launcher
  • Go back to Xposed Installer->Framework and either pick Soft Reboot or Reboot

I had issues forwarding resources from my module's assets, so I worked around it by creating a scaled-down version of XSBM for just the battery images in this module. It seems to work ok, but definitely not the cleanest approach. If/when this gets resolved in the framework (or I figure out how to do it correctly), I'll rewrite this module. Also, I tested the module with SElinux both enforcing and permissive, and it seems to function regardless.
The Following 19 Users Say Thank You to agentdr8 For This Useful Post: [ View ] Gift agentdr8 Ad-Free
 
 
28th June 2014, 03:20 PM |#2  
ahac85's Avatar
Senior Member
Thanks Meter: 245
 
More
Hi is it possible to make the percentage size a bit bigger as i find it quite small and difficult to make out what it says?
28th June 2014, 09:16 PM |#3  
agentdr8's Avatar
OP Senior Member
Flag Cowtown, CA
Thanks Meter: 1,795
 
Donate to Me
More
Quote:
Originally Posted by ahac85

Hi is it possible to make the percentage size a bit bigger as i find it quite small and difficult to make out what it says?

Sure. Give me a day or two.
The Following 2 Users Say Thank You to agentdr8 For This Useful Post: [ View ] Gift agentdr8 Ad-Free
29th June 2014, 10:50 PM |#4  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by agentdr8

Sure. Give me a day or two.

pls and thank you, waiting for that badly

i attached a .zip, could you pls do this one??

thanks
Attached Files
File Type: rar drawable-xxhdpi.rar - [Click for QR Code] (51.7 KB, 84 views)
30th June 2014, 09:28 AM |#5  
khriztianjs's Avatar
Senior Member
Flag Madrid
Thanks Meter: 47
 
More
thanks working in maximus hd
The Following User Says Thank You to khriztianjs For This Useful Post: [ View ] Gift khriztianjs Ad-Free
1st July 2014, 12:37 AM |#6  
agentdr8's Avatar
OP Senior Member
Flag Cowtown, CA
Thanks Meter: 1,795
 
Donate to Me
More
Quote:
Originally Posted by realatombu

pls and thank you, waiting for that badly

i attached a .zip, could you pls do this one??

thanks

Don't have the time to hand-edit 100+ images to change the font size. I use the BatteryIconMaker utility to do the numbers and battery background generation, and then combine them with ImageMagick scripts. It takes a few minutes this way, instead of hours/days the other way.
1st July 2014, 01:15 AM |#7  
agentdr8's Avatar
OP Senior Member
Flag Cowtown, CA
Thanks Meter: 1,795
 
Donate to Me
More
New version on OP has larger (and easier to read) numbers now.
The Following 4 Users Say Thank You to agentdr8 For This Useful Post: [ View ] Gift agentdr8 Ad-Free
1st July 2014, 03:42 AM |#8  
Senior Member
Flag King George VA
Thanks Meter: 215
 
More
Hey op thank you for this mod. I thought I was never gonna get to have percent stock battery on stock rom lol...also thanks for the update enlarging percentage. Anyway you could change the percent color to something besides black? Maybe grey. Reason is once any app is launched and battery is below certain percent and status bar is no longer transparent you can only see one of the two digits if that makes any sense lol. Made much better sense in my head
1st July 2014, 06:38 PM |#9  
agentdr8's Avatar
OP Senior Member
Flag Cowtown, CA
Thanks Meter: 1,795
 
Donate to Me
More
Quote:
Originally Posted by Johnny424

Hey op thank you for this mod. I thought I was never gonna get to have percent stock battery on stock rom lol...also thanks for the update enlarging percentage. Anyway you could change the percent color to something besides black? Maybe grey. Reason is once any app is launched and battery is below certain percent and status bar is no longer transparent you can only see one of the two digits if that makes any sense lol. Made much better sense in my head

Hmm, that is a problem. I'll play around with the colors and see if I can come up with something that looks ok on both light and dark backgrounds.
The Following User Says Thank You to agentdr8 For This Useful Post: [ View ] Gift agentdr8 Ad-Free
1st July 2014, 07:25 PM |#10  
agentdr8's Avatar
OP Senior Member
Flag Cowtown, CA
Thanks Meter: 1,795
 
Donate to Me
More
Updated version on OP. Let me know if that helps with number visibility.
1st July 2014, 09:44 PM |#11  
ziaulh.ch's Avatar
Senior Member
Flag Dhaka
Thanks Meter: 1,273
 
Donate to Me
More
Bro thanks a lot but the text is too smallà if bigger then would be very nice! Also inverted batt would be good too!
Post Reply Subscribe to Thread

Tags
battery, statusbar, xposed

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes