TWRP 2.8.3.0 Available for Supported Devices

The TeamWin Recovery Project (or TWRP, for short) has quickly become one of the most popular … more

Easily Generate and Export Material Design Palletes

For many people, it can be pretty difficult to create a palette of complementary colors. … more

Android One Expanding to Bangladesh, Nepal, and Sri Lanka

At Google I/O 2013, Google proudly announced that the Android operating system was … more

Android 5.0.2 Fixes 2012 Nexus 7! Sony’s Making a Google Glass Competitor? – XDA TV

Android 5.0.2 Lollipop is available for the … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[GUIDE] [MOD] How to add battery % in Stock ROM

OP ramon20

3rd May 2014, 09:15 PM   |  #1  
ramon20's Avatar
OP Senior Member
Flag Teresina-PI
Thanks Meter: 80
 
116 posts
Join Date:Joined: Apr 2014
Hi, i will learn how to add battery porcentage for Stock 4.4.2 ROM of Moto X, works with others roms too!

Screenshot:


Requires:
Code:
- SystemUI.apk deodexed
- apktool v2.0.0b9
Let's start:

1 - Decompile SystemUI.apk

2 - Download this smalis > click here

3 - Put the folder "erryy" in "SystemUI > smali > com"

4 - Go to "SystemUI > res > layout" and open "status_bar.xml"

5 - Find this line:
Code:
<include android:id="@id/signal_cluster"
6- Below this line put this line of code:
Code:
<com.erryy.BatteryText android:textSize="12.0dip" android:textColor="#ffffffff" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:paddingStart="2.0dip" />
7 - Now, find this line:
Code:
<com.android.systemui.BatteryMeterView
and replace the entire line for this line:
Code:
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="6.0dip" android:layout_height="15.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="4.0dip" />
8 - Compile the SystemUI.

That's all!
The Following User Says Thank You to ramon20 For This Useful Post: [ View ]
4th May 2014, 12:00 AM   |  #2  
Junior Member
Flag Feira de Santana
Thanks Meter: 6
 
11 posts
Join Date:Joined: Jul 2013
More
Very Good!!
4th May 2014, 02:55 AM   |  #3  
ramon20's Avatar
OP Senior Member
Flag Teresina-PI
Thanks Meter: 80
 
116 posts
Join Date:Joined: Apr 2014
Quote:
Originally Posted by Tenigima

Very Good!!

Thanks
4th May 2014, 05:11 AM   |  #4  
Senior Member
Thanks Meter: 163
 
652 posts
Join Date:Joined: Aug 2010
Nice work, but why not just install gravity box?

Sent from my Dev Edition Moto X
4th May 2014, 05:21 AM   |  #5  
ramon20's Avatar
OP Senior Member
Flag Teresina-PI
Thanks Meter: 80
 
116 posts
Join Date:Joined: Apr 2014
Quote:
Originally Posted by Schaweet

Nice work, but why not just install gravity box?

Sent from my Dev Edition Moto X

This is for we devs! We work for the users just install our custom rom and use it, we don't want that the user set a lot of things! and i don't like the xposed and gravity
4th May 2014, 08:26 AM   |  #6  
EVOSerb's Avatar
Senior Member
Flag Chicago
Thanks Meter: 32
 
161 posts
Join Date:Joined: Jan 2011
https://play.google.com/store/apps/d...oid4batpercent

It's not same as this but it works for non rooted devices.
Sent from my XT1056 using XDA Free mobile app
The Following User Says Thank You to EVOSerb For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes