10 levels battery Status - Sony Xperia P, U, Sola, Go

I'm currently working on my idea of having 10 levels battery status instead of 100%. It'll work as 9s, 8s, 7s etc. 100% of battery levels divided into 10 pieces. I don't like 100% battery percentage. It's like a torture to me. I don't have a problem with who likes it or made it, it's your choice. No issues. But I need help with this. I don't know how to edit SystemUI and make these changes. Anyone who's interested in helping me, please come forward. I'll give you full credit.
http://forum.xda-developers.com/showpost.php?p=31158863&postcount=92
This is that SystemUI.
And finally thanks to vr5411

Vtrendzzy said:
I'm currently working on my idea of having 10 levels battery status instead of 100%. It'll work as 9s, 8s, 7s etc. 100% of battery levels divided into 10 pieces. I don't like 100% battery percentage. It's like a torture to me. I don't have a problem with who likes it or made it, it's your choice. No issues. But I need help with this. I don't know how to edit SystemUI and make these changes. Anyone who's interested in helping me, please come forward. I'll give you full credit.
http://forum.xda-developers.com/showpost.php?p=31158863&postcount=92
This is that SystemUI.
And finally thanks to vr5411
Click to expand...
Click to collapse
in that SystemUI I believe it is a matter of just replacing the right png's
if I give you the pictures to edit would you be able to?
EDIT: when you say 9s 8s etc
do you mean you want it to be 10 then 20 the 30?
or what?

Me‎ said:
in that SystemUI I believe it is a matter of just replacing the right png's
if I give you the pictures to edit would you be able to?
EDIT: when you say 9s 8s etc
do you mean you want it to be 10 then 20 the 30?
or what?
Click to expand...
Click to collapse
It's also editing some xml files. Specifically strings
Sent from my ST25i using xda app-developers app

Andrewasth said:
It's also editing some xml files. Specifically strings
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
not 100% necessary
if OP explains what he means by 9s 8s etc I could do it

That's easy. No need smali editing. But I don't have time for this. Sorry. But, others can help you too
Sent by typing on my Xperia Sola with my fingers using xda premium

I think you should see and read http://forum.xda-developers.com/showthread.php?t=1434061 <<< this!
Enjoy!
p.s.-I changed my battery style with that tool and "evikal" style. :angel:
/heavy modded stock ics inside white sola/

Decompile SystemUI.apk with apktool. Then go to res/drawable folder.
The files you need to edit are stat_sys_battery.xml & stat_sys_battery_charging.xml
Just open them with Notepad++ and add the required Battery Levels you need in the format of each file.
eg : (in 1st file)
<item android:drawable="@drawable/stat_sys_battery_10" android:maxLevel="10" />
<item android:drawable="@drawable/stat_sys_battery_20" android:maxLevel="20" />
<item android:drawable="@drawable/stat_sys_battery_30" android:maxLevel="30" />
etc..
After saving both, you need to add each image, stat_sys_battery_10.etc in res/drawable-hdpi or res/drawable-xhdpi folders. (If you want to use for Xperia P, xhdpi folder is must)
Finally, go to res/values/public.xml. The ids like '0x7f020041' are hexadecimal values. (Read Wikipedia if you have doubts) Find the largest hexadecimal id for type="drawable" then add new lines like this underneath :
<public type="drawable" name="stat_sys_battery_30" id="0x7f020042" />
The name should be the same filename you mentioned in the res/drawable xmls and also the files in res/drawable-hdpi folder. And the id's should be in increasing order. If the highest id you found for drawable is 0x7f020042, you need to add in order 0x7f020043, 0x7f020044,.... 0x7f02004a, 0x7f02004b... etc
If you have any doubts, let me know Hapy Modding !
Cheers

Min3r said:
Decompile SystemUI.apk with apktool. Then go to res/drawable folder.
The files you need to edit are stat_sys_battery.xml & stat_sys_battery_charging.xml
Just open them with Notepad++ and add the required Battery Levels you need in the format of each file.
eg : (in 1st file)
<item android:drawable="@drawable/stat_sys_battery_10" android:maxLevel="10" />
<item android:drawable="@drawable/stat_sys_battery_20" android:maxLevel="20" />
<item android:drawable="@drawable/stat_sys_battery_30" android:maxLevel="30" />
etc..
After saving both, you need to add each image, stat_sys_battery_10.etc in res/drawable-hdpi or res/drawable-xhdpi folders. (If you want to use for Xperia P, xhdpi folder is must)
Finally, go to res/values/public.xml. The ids like '0x7f020041' are hexadecimal values. (Read Wikipedia if you have doubts) Find the largest hexadecimal id for type="drawable" then add new lines like this underneath :
<public type="drawable" name="stat_sys_battery_30" id="0x7f020042" />
The name should be the same filename you mentioned in the res/drawable xmls and also the files in res/drawable-hdpi folder. And the id's should be in increasing order. If the highest id you found for drawable is 0x7f020042, you need to add in order 0x7f020043, 0x7f020044,.... 0x7f02004a, 0x7f02004b... etc
If you have any doubts, let me know Hapy Modding !
Cheers
Click to expand...
Click to collapse
well this mod includes 100 step battery so all he really needs is to delete lines from the files you mentioned
if I understood what he wanted correctly

No. I mean 10, 9, 8, 7 like this. Suppose the current battery is 95% then it should show 9 only.

What you said is true but you need to delete all the other lines, then the corresponding files & finally edit the public.xml to remove the extra lines.. And trust me, putting in the correct ids in Public.xml is annoying as hell
@Vtrendzzy, just make sure that the image you provide for each case shows only the 9 or 8

No problem mate. You can edit it whenever you've time and release it if you like my idea.

Yes, I deleted those extra lines but when I'm trying to recompile it, it's not working. And honestly, I'm new to this modding subject. I just have this idea but don't have knowledge to apply to it.

OMG! I'll have to take a class for that. Besides i'm a lil busy with my studies. Can you do it? Take full credit. I would've done it but I don't have it's basic knowledge even

Vtrendzzy said:
OMG! I'll have to take a class for that. Besides i'm a lil busy with my studies. Can you do it? Take full credit. I would've done it but I don't have it's basic knowledge even
Click to expand...
Click to collapse
easiest way would be to replace all 70-79 with same pic that says 7
80-89 with same pic that says 8 and so on
without touching any of the xml files
what do you want it to say between 0-9?

Okay I'll try it today. Between 0-9, I call it 1. See the circle around these digits will act as 100% but these digits will change when the voltage drops by 10%. So when it is showing 1, the critical battery level will be shown in red by the circle.

Vtrendzzy said:
Okay I'll try it today. Between 0-9, I call it 1. See the circle around these digits will act as 100% but these digits will change when the voltage drops by 10%. So when it is showing 1, the critical battery level will be shown in red by the circle.
Click to expand...
Click to collapse
I see
ok so 0-9 is 1
10-19 also 1 (?)
20-29 is 2 (?)
...
90-99 is 9 (?)
100 is 10 (?)

Oh I think that's a bug. 0-10 = 1, 11-20 = 2, 21-30 = 3 .... 91-100 = 10 like this.

Related

Add Wimax toggle to Power Widget

I have been helping Sinistertensai with his ShenduOS port for the HTC EVO 4G. I got Wimax to work and was wanting to see if anyone knows how to add a Wimax toggle to the power widget dropdown from the status bar. The port is CM7 based. In the SystemUI.apk I see there is WimaxButton.smali. I have tried adding the ids for it in public.xml and creating pngs for the toggle. I get no errors on compile but I get reboots or force closes when I try to bring up the power widget dropdown. I have very limited experience with editing smail code. I have also tried copying over the resources, classes, and xmls to the original apk with the same results. I have researched how to edit smali but I could just be doing it wrong or leaving something out. This has been driving me to madness. If anyone could help out that would be amazing!
Is there a reason you can't rebuild from source with Wimax enabled?
Sent from my SCH-R760 using Tapatalk 2
The ShenduOS SystemUI has been changed drastically and I cannot find the source code. That would require me to completely redo what Shendu has done and is well beyond my capabilities. The functionality for the wimax is there, I just need to find a way to add the toggle button. The actual widget has a wimax toggle which works, just not the one in the status bar.
Sent from my EVO using xda premium
I have only done smali a few times. How I did it was for example get a cm build going. Remove all wimax toggle related noti widget elements. Compile. Now you have a systemui base. Now build with the wimax toggle. You have a wimax toggle systemui.
Then use a program like beyond compare and after apktooling both systemui in their own folders. Compare the smali differences. Should get you pretty close. Of course there will be some trial and error if the systemui is different then that of cm.
Sent from my Galaxy Nexus using xda premium
The code is quite different that the CM7 code. I have found what needs to be edited, it just results in reboots upon clicking on the status bar to open the powerwidget dropdown. Here are the steps I take:
Decompile SystemUI.apk
In PowerWidget.smali -> replace both instances of toggleNetworkMode with toggleWimax
In WimaxButton.smali -> write down ids from method updateState (0x7f0200ca is off, 0x7f0200cb is on)
In public.xml -> Removed bad APKTOOL_DUMMYs for above ids. Add the following lines:
<public type="drawable" name="stat_wimax_off" id="0x7f0200ca" />
<public type="drawable" name="stat_wimax_on" id="0x7f0200cb" />
In res/drawable-hdpi -> Created on/off images and placed them there
In drawables.xml -> Removed bad APKTOOL_DUMMYs for above ids that were set to false. Add the following lines:
<item type="drawable" name="stat_wimax_off">true</item>
<item type="drawable" name="stat_wimax_on">true</item>
Recompiled
Pushed to phone with adb and cleared dalvik cache
Reboot
I have also tried pushing the changes and overwriting the ones in the original using Archive Manager(Ubuntu) with the same issues. If someone could point out what I am doing wrong that would help alot! I could have broken my tools(Android Utility/apktool). Feel free to give it a shot if you want. Once I/someone gets it right I will write up a tutorial.

How to make any text touch responsive

Suppose you want that a text should change it's color when you put your finger on it ,, like you want your carrier label to turn blue when you keep your finger on it and white when you remove,,, This is common in pngs, but what about text,, well theres a way for that too
This is a very easy mod,, all you need is to use your brain, information and search skills to find the right xml with the right string
Let us begin with an easy one,,, Open your status_bar_tracking.xml if you have bottom carrier label text and status_bar_expanded.xml if you have it above
now ,, search the line having
<com.android.systemui.statusbar.CarrierLabel
and add an android:textColor="@color/carrier_text" ,,,
Save and close
now let us begin what we need to do to make it blue when we keep our finger on it
Open note pad or note pad ++
Paste this
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="#ddff00"
<item android:color="#ffffff" />
</selector>
save with the name carrier_text and add xml as extension in plce of txt to make it an xml file,, now make a folder named color in SystemUI.apk/res
and recompile.....
And then you got it,, white in normal state and ICS blue when pressed.
NOW SPREAD THE KNOWLEDGE LIKE A FLU!!!!!!
But do press the thanks button first if i helped you,, help me rise so i will be inspired to do more
Thanks for this! gonna try it out ^^
Thanks for this awesome share
Want To Ask Question? Ask Here
Thanks,
TechnoSavie
W W
I never knew that this is possible.
Well it is bro!!!!!!!
The android system has a lot of possibilities and if you had seen the lidroid-res.apk or framework-res.apk's xmls in colors folder (or Mms.apk) or just saw its amazing matching with drawable xmls (just replace drawable with color and all image paths to color codes )
YOu would have known too!!!!
One mistake in your post...
In status_bar_tracking.xml, we should add a line
Code:
android:textColor="@color/carrier_text"
and not
Code:
android:textColor="@color/carrier_text.xml"
Ganesh A said:
One mistake in your post...
In status_bar_tracking.xml, we should add a line
Code:
android:textColor="@color/carrier_text"
and not
Code:
android:textColor="@color/carrier_text.xml"
Click to expand...
Click to collapse
NO NO NO bro,, the extensions of xmls and pngs are never displayed ,,, that is the job of the tags (android:textColor) to do the job,, if you write,, u will only face an error while recompiling,, i have already studied it bro,, if you dont believe just open tab_indicator.xml in Contacts.apk/res/layout-finger......
But still it is good that you asked,, your doubt is solved
Thanks for this! This will definitely go into my new Custom ROM.
Sent from my GT-S5360 using xda app-developers app
mvsdroid said:
NO NO NO bro,, the extensions of xmls and pngs are never displayed ,,, that is the job of the tags (android:textColor) to do the job,, if you write,, u will only face an error while recompiling,, i have already studied it bro,, if you dont believe just open tab_indicator.xml in Contacts.apk/res/layout-finger......
But still it is good that you asked,, your doubt is solved
Click to expand...
Click to collapse
Yeah, the extensions of xml's and png's are never displayed but YOU HAVE GIVEN
android:textColor="@color/carrier_text.xml"
AND IT SHOULD BE
android:textColor="@color/carrier_text"
Regards,
Ganesh
Yeah,,, you are right,, i will edit ,it thankyou
certainly,, but give proper credits
THank you,,, it has been fixed
Ganesh A said:
Yeah, the extensions of xml's and png's are never displayed but YOU HAVE GIVEN
android:textColor="@color/carrier_text.xml"
AND IT SHOULD BE
android:textColor="@color/carrier_text"
Regards,
Ganesh
Click to expand...
Click to collapse
Thank you for pointing,, it has been set all right now
Can you tell us also how to hide icon app like cpucontrol in Hyperion ROM?? I want to hide the stock mms.apk only the app icon..
Sent from my GT-S5360 using xda premium
Did it work. I am not able to make this work..
!!!...F4t3rn!Ty L!3S W!T}{ ET3rn!Ty...!!!!
***LooK WithiN YourselF***
#CAN U DIG THIS SUCKAAAA#

CellBroadcast Receiver for CM 10 with Menu in Settings

Hi there !!
This is called CellBroadcast Receiver. no doubt everyone having a phone knows what it is... its real time update receiver from your network. and in a emergency situation its the most reliable and fasted method than regular SMS.
Everyone might not like this one. for some it will be useless. but for some it will be handy. all depend of the geographical location where you live and the network you use. so if it's useless to you then bye and have a nice day
ok for those who likes it this is for you . i have seen this in JB 4.2 Rom but never in 4.1 .
there are 3 options for you to have this app.
1. move app to system/app and use it - you will not get a menu but once u receives a notification then u can select the Settings options.
2. u can move app as well as Settings app . - you will have a menu in your settings under Wireless and Network
3. u can follow the tutorial in Post #2 and add it to your Settings menu. this way u can add it either on a main menu or in a sub menu
CellBroadcastReceiver app
Settings app with Cell broadcast menu
Hope you will like it
like to thank @Ticklefish for his wonderful tool @saqib nazm @Diaz1999 for there tutorials about how to add expended settings and tips
ok lets do the tutorial..............
things u need
1. Settings app from your ROM zip. ( system/app)
2. tool can be used to decompile and recompile . My recommendation TickleMyAndroid by @Ticklefish
3 Notepad +
============================================================================
1 Decompile Settings app
2 go to res\xml\settings_headers
3 find
<header android:icon="@drawable/ic_settings_data_usage" android:id="@id/data_usage_settings" android:title="@string/data_usage_summary_title" android:fragment="com.android.settings.DataUsageSummary" />
Click to expand...
Click to collapse
4 add
<header android:icon="@drawable/ic_settings_cell" android:id="@id/cell_settings" android:title="@string/cell_settings_title">
<intent android:targetPackage="com.android.cellbroadcastreceiver" android:action="android.intent.action.MAIN" android:targetClass="com.android.cellbroadcastreceiver.CellBroadcastListActivity" />
</header>
Click to expand...
Click to collapse
5 so it will look like this
<header android:icon="@drawable/ic_settings_data_usage" android:id="@id/data_usage_settings" android:title="@string/data_usage_summary_title" android:fragment="com.android.settings.DataUsageSummary" />
<header android:icon="@drawable/ic_settings_cell" android:id="@id/cell_settings" android:title="@string/cell_settings_title">
<intent android:targetPackage="com.android.cellbroadcastreceiver" android:action="android.intent.action.MAIN" android:targetClass="com.android.cellbroadcastreceiver.CellBroadcastListActivity" />
</header>
Click to expand...
Click to collapse
6. save
Go to Res\values\ids.xml
1 find
<item type="id" name="wireless_settings">false</item>
Click to expand...
Click to collapse
2 add
<item type="id" name="cell_settings">false</item>
Click to expand...
Click to collapse
3 so it will look like this
<item type="id" name="wireless_settings">false</item>
<item type="id" name="cell_settings">false</item>
Click to expand...
Click to collapse
4 save
Go to res\valus\strings.xml
1 . find
string name="status_wifi_mac_address">Wi-Fi MAC address</string>
Click to expand...
Click to collapse
2 add
<string name="cell_settings_title">CellBroadcast Receiver</string>
Click to expand...
Click to collapse
3 so it will be look like this
<string name="status_wifi_mac_address">Wi-Fi MAC address</string>
<string name="cell_settings_title">CellBroadcast Receiver</string>
Click to expand...
Click to collapse
4 Save
download this png and copy to res\drawable-hdpi folder
ok now recompile and move to system/app . no need to reboot as soon as u set correct permissions ( RW-R-R) settings will be displayed with the changes you have made
NOTE- above was based on my settings app where i prefer cellbroadcast menu in a main menu as shown in the pictures. if u like u can set the menu under some sub menu . eg- inside More in wireless and network menu.
this is mine too
cool, bro! nice contribution!!! (with TuT & all )
but just for interest can u tell me a example for practical use of cellbroadcastreciver-messages, as my friend also asked i never had to do with this app ???
bejunk said:
cool, bro! nice contribution!!! (with TuT & all )
but just for interest can u tell me a example for practical use of cellbroadcastreciver-messages, as my friend also asked i never had to do with this app ???
Click to expand...
Click to collapse
thanks bro well in some network operators send alerts to mobile which is cell broadcast messages. for eg. warning messages/ news and weather alerts / location info etc. it really matters where you live and the network operator u use. as i know its very much in Use in United States. if u go through the 2nd picture u can see type of messages it receives. and Cell broadcast is real when it comes to SMS based alert system cos you maybe knowing in an emergency situation most networks SMS and voice get jammed.
but all depend of the network. in my country i get only location names as broadcast messages. meaning when i travel i receive name of the place by this app. LOL and 95 % it can be described as a useless feature but then again for some people its real value feature
give it a try and see what u get from ur phone operator

[How-to] Maximum StatusBar Brightness 4.4.2

[How-to] Maximum StatusBar Brightness 4.4.2
This guide is based on the KK 4.4.2 Galaxy S5 builds.
I noticed that Samsung always make the statusbar notification areas a bit dim. Probably to help with battery conservation.
This requires decompiling SystemUI.apk.
SystemUI/res/values/dimens.xml edit
Code:
Change these three lines
New values are in BLUE
<item type="dimen" name="status_bar_icon_drawing_alpha">[COLOR="Blue"]100.0%[/COLOR]</item>
<item type="dimen" name="system_icon_area_alpha">[COLOR="Blue"]1.0[/COLOR]</item>
<item type="dimen" name="notification_icon_area_alpha">[COLOR="Blue"]1.0[/COLOR]</item>
Note:
Screenshots are best viewed from a PC so you can rapidly swap images to see the difference.
Nice.
Thanks
Weird. I have no values/dimens.xml file. Using to rootexplorer.
cAase said:
Weird. I have no values/dimens.xml file. Using to rootexplorer.
Click to expand...
Click to collapse
As stated in the OP, this requires being able to decompile the system file SystemUI.apk to make the edits.
This thread is now part of the GALAXY S5 UNIFIED MODS THREAD - GUIDES & LINKS. Check it out when you have time.
Where i can find your teme for status bar ?.
Thanks
Great mod tdunham thank you very much for this tutorial. Working on my S3 using your old method found here. This may be the lazy way but it worked a lot easier for me to just make vrtheme flashables for this instead of doing a full release.
The reason they do this i think is not to save battery but to stop screen burn in of the statusbar icons. Doesnt matter on roms that have changeable icons or colors i suppose but doing this on a standard systemui with white icons may increase the chance of burn in.
I may be wrong but thought it worth mentioning
Sent from my SM-G900F using Tapatalk

How to change battery percentage text color?

Hello everyone,
I got Galaxy S5 running Lollipop. So far I have extracted SystemUI.apk and I have made some changes to Wifi/ Signal icons in my GS5 like making these look like Nexus 6. And Now I want to make my battery percentage text from white to black. I know to do it, we have to change some text in some XML file. But I can't find that file. So would anyone help me with this?
thanks
galaxyuser15 said:
Hello everyone,
I got Galaxy S5 running Lollipop. So far I have extracted SystemUI.apk and I have made some changes to Wifi/ Signal icons in my GS5 like making these look like Nexus 6. And Now I want to make my battery percentage text from white to black. I know to do it, we have to change some text in some XML file. But I can't find that file. So would anyone help me with this?
thanks
Click to expand...
Click to collapse
I haven't personally looked at it because I use 3minit battery. A good guess would be colors.xml in values folder or systemui? Not for sure though. There are a lot of color changes in there. Good luck!
If it is like JB...
You should go to res/layout/status_bar.xml (maybe its called "tw_staus_bar.xml") and find this line:
Code:
<TextView android:textSize="16.0sp" android:textColor="#ffffffff" android:id="@id/percentage" android:paddingLeft="4.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" />
You should change "android:textColor="#anycolour"" to the colour you want.
I hope this helps :good:
XDA Rule
galaxyuser15 said:
Hello everyone,
I got Galaxy S5 running Lollipop. So far I have extracted SystemUI.apk and I have made some changes to Wifi/ Signal icons in my GS5 like making these look like Nexus 6. And Now I want to make my battery percentage text from white to black. I know to do it, we have to change some text in some XML file. But I can't find that file. So would anyone help me with this?
thanks
Click to expand...
Click to collapse
Please post on the right forum.
Any questions you may have should be posted in this forum:
http://forum.xda-developers.com/galaxy-s5/help
#XDA Rule No. 15

Categories

Resources