Angry [GUIDE][HOW] Add Battery Percentage On Lockscreen Permanently

Here's A New Guide To Add Battery Percentage On Lockscreen

By Me [Kartik Verma]


Requirements -:


1. android.policy.jar

2. framework-res.apk


PHP Code:
First,We Edit "framework-res.apk"  present here (system/framework/framework-res.apk)

Decompile framework-res.apk Through Apktool (if you dont know how to decompile,See on XDA How to Decompile,Recompile Or Ask Someone)

After Decompiling -> Go Here 
framework-res/res/values/string.xml

PHP Code:
Open String.xml in Notepad++

After Opening -> Hit These Two Keys (ctrl+f)

And 
Copy This____  Charging  ____  Then Hit Enter

Change The Charging Text To____  Charge Status _____ 
-> After Changing -> Save it

Now,Main Work Here in Smali

PHP Code:
Decompile "android.policy.jar" present here (system/framework/android.policy.jar)

After Decompiling -> Open This smali file Through Notepad++

android.policy/com/android/internal/policy/impl/KeyguardUpdateMonitor.smali

Open   KeyguardUpdateMonitor
.smali

Search 
For This Line Through Notepad++ By Hitting Ctrl+
PHP Code:
.method public shouldShowBatteryInfo()
The Whole Code Looks Like....


PHP Code:
.method public shouldShowBatteryInfo()Z
    
.registers 2

    
.prologue
    
.line 1000
    sget v0
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mBatteryInfoState:I

    
if-eqz v0, :cond_6

    
const/4 v00x1

    
:goto_5
    
return v0

    
:cond_6
    
const/4 v00x0

    
goto :goto_5
.end method 

After Editing It Looks Like....

PHP Code:
.method public shouldShowBatteryInfo()Z
    
.registers 2

    
.prologue
    
.line 1000
    sget v0
Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mBatteryInfoState:I

    
if-eqz v0, :cond_6

    
const/4 v00x1

    
:goto_5
    
    
const/4 v00x1
    
    
return v0

    
:cond_6
    
const/4 v00x0

    
goto :goto_5
.end method 

ENJOY.......!!!!!!!!!!