[XT1033][STOCK] Imaged battery moto g

Search This thread

sidharth.gtm

Senior Member
May 11, 2012
222
395
Patna

IMAGED BATTERYMOD
MOTO G XT1033 ASIA


FkuIm5d.jpg

BATTERY BLUE WHITE TEXT


Gv8SoGc.jpg

GLOWING BATTERY

I have created the base ..
now its your turn to mod and come up with different battery mods
always give credits
PRESS THANKS IF YOU LIKED MY WORK

HOW THINGS WORK

ADAPTED FROM ORIGINAL POST
I basically used files from Android 4.3 to make Image theme on Stock XT1033.

I have modded PhoneStatusBar.smali.
used BatteryController.smali from Android4.3.
msim_status_bar.xml for imageview of @id/battery


AREA OF INTEREST :
PhoneStatusBar.smali line no : 8520

Code:
.line 1190
new-instance v0, Lcom/android/systemui/statusbar/policy/BatteryController;

iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

invoke-direct {v0, v2}, Lcom/android/systemui/statusbar/policy/BatteryController;-><init>(Landroid/content/Context;)V

iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;

[color=red]iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;

iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

const v4, 0x7f07002d

invoke-virtual {v0, v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;

move-result-object v0

check-cast v0, Landroid/widget/ImageView;

invoke-virtual {v3, v0}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V[/color]

.line 1194
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mIsMultiSimEnabled:Z

if-eqz v0, :cond_3e

.line 1195
new-instance v0, Lcom/android/systemui/statusbar/policy/MSimNetworkController;

IMPORTANT FILES :
ORIGINAL PHONESTATUSBAR.SMALI


BASED ON THE BEAUTIFUL WORKS OF MASTER @Ticklefish
And thanks to the guy who sent me SystemUI from JB4.3 !!
 

Attachments

  • Battery_Blue_White_TEXT.zip
    1.6 MB · Views: 235
Last edited:

Ticklefish

Recognized Themer
Oct 27, 2011
6,773
8,627
Hampshire, UK
THIS IS HALF BAKED ONLY FOR DEVELOPMENT (REGULAR USER PLZ DONT DOWNLOAD)

I basically used files from Android 4.3 to make Image theme on Stock XT1033.

I have modded PhoneStatusBar.smali.
used BatteryController.smali from Android4.3.

End Result :

UwQ8PP4.jpg


some how this mod does not shows network icons :p

FILES : IMAGED BATTERY

AREA OF INTEREST :
PhoneStatusBar.smali line no : 8520

Code:
.line 1190
new-instance v0, Lcom/android/systemui/statusbar/policy/BatteryController;

iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

invoke-direct {v0, v2}, Lcom/android/systemui/statusbar/policy/BatteryController;-><init>(Landroid/content/Context;)V

iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;

[color=red]iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;

iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

const v6, 0x7f07002d

invoke-virtual {v0, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;

move-result-object v0

check-cast v0, Landroid/widget/ImageView;

invoke-virtual {v3, v0}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V[/color]

.line 1194
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mIsMultiSimEnabled:Z

if-eqz v0, :cond_3e

.line 1195
new-instance v0, Lcom/android/systemui/statusbar/policy/MSimNetworkController;

Removing red lines and compiling again bring backs the Network icon (Signal Cluster)

IMPORTANT FILES :
ORIGINAL PHONESTATUSBAR.SMALI
MODIFIED PHONESTATUSBAR.SMALI

Hmm..smali. Yuck.

I'll be honest, I don't know what's caused this. My understanding of smali is only about 10% or so.

But I can make a suggestion. If removing the red lines solves the issue, it's worth finding out if you actually need to remove all of them.

So remove the first red line, recompile, see what happens. If you get a FC or your statusbar goes wrong, remove the second line instead, recompile and see what happens then.

Tedious but that way you can narrow down precisely which bits of code are causing your signal icons to vanish. Then you'll be that bit closer fo working out what to do about it.
 

sidharth.gtm

Senior Member
May 11, 2012
222
395
Patna
Hmm..smali. Yuck.

I'll be honest, I don't know what's caused this. My understanding of smali is only about 10% or so.

But I can make a suggestion. If removing the red lines solves the issue, it's worth finding out if you actually need to remove all of them.

So remove the first red line, recompile, see what happens. If you get a FC or your statusbar goes wrong, remove the second line instead, recompile and see what happens then.

Tedious but that way you can narrow down precisely which bits of code are causing your signal icons to vanish. Then you'll be that bit closer fo working out what to do about it.

Thanks Sir !
I was finally able to make this mod working !
Thanks for your support !!
 

sidharth.gtm

Senior Member
May 11, 2012
222
395
Patna
Anytime :cool:

Which line(s) did you end up removing?

Sent from my C6603 using Tapatalk

Sir ,
i changed
Code:
const v6, 0x7f07002d
invoke-virtual {v0, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->fin
move-result-object v0
TO
Code:
const v4, 0x7f07002d
invoke-virtual {v0, v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->fin
move-result-object v0

Frankly speaking sir , i dont come from programming background.. everything i have learnt here is from you and your guides ..
 
  • Like
Reactions: Ticklefish

Ticklefish

Recognized Themer
Oct 27, 2011
6,773
8,627
Hampshire, UK
Sir ,
i changed
Code:
const v6, 0x7f07002d
invoke-virtual {v0, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->fin
move-result-object v0
TO
Code:
const v4, 0x7f07002d
invoke-virtual {v0, v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->fin
move-result-object v0

Frankly speaking sir , i dont come from programming background.. everything i have learnt here is from you and your guides ..

Interesting, I wonder why that worked...hmm...

I did study software engineering but that was a long time ago and I'm a bit out of date. Smali still puzzles me..lol

Good to see you got it working, I'm going to have to try this on the Sony Xperia KK rom. That's got a partial xml solution, because Sony did things a little differently, but it'd be nice to get it working fully.

Guess I'll be learning from you. ;)

Oh, and you need to edit the op. It's still asking about the signal cluster..
 

w arun kumar

Member
Aug 31, 2013
9
0
duliajan
i try to port this mod in 4.4.4 as you said where you did changes i did the same but i end up with systemui force close. can you suggest me how can i port this. please i need this mod ):
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6

    IMAGED BATTERYMOD
    MOTO G XT1033 ASIA


    FkuIm5d.jpg

    BATTERY BLUE WHITE TEXT


    Gv8SoGc.jpg

    GLOWING BATTERY

    I have created the base ..
    now its your turn to mod and come up with different battery mods
    always give credits
    PRESS THANKS IF YOU LIKED MY WORK

    HOW THINGS WORK

    ADAPTED FROM ORIGINAL POST
    I basically used files from Android 4.3 to make Image theme on Stock XT1033.

    I have modded PhoneStatusBar.smali.
    used BatteryController.smali from Android4.3.
    msim_status_bar.xml for imageview of @id/battery


    AREA OF INTEREST :
    PhoneStatusBar.smali line no : 8520

    Code:
    .line 1190
    new-instance v0, Lcom/android/systemui/statusbar/policy/BatteryController;
    
    iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
    
    invoke-direct {v0, v2}, Lcom/android/systemui/statusbar/policy/BatteryController;-><init>(Landroid/content/Context;)V
    
    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
    
    [color=red]iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
    
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
    
    const v4, 0x7f07002d
    
    invoke-virtual {v0, v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
    
    move-result-object v0
    
    check-cast v0, Landroid/widget/ImageView;
    
    invoke-virtual {v3, v0}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V[/color]
    
    .line 1194
    iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mIsMultiSimEnabled:Z
    
    if-eqz v0, :cond_3e
    
    .line 1195
    new-instance v0, Lcom/android/systemui/statusbar/policy/MSimNetworkController;

    IMPORTANT FILES :
    ORIGINAL PHONESTATUSBAR.SMALI


    BASED ON THE BEAUTIFUL WORKS OF MASTER @Ticklefish
    And thanks to the guy who sent me SystemUI from JB4.3 !!
    3
    Hmm..smali. Yuck.

    I'll be honest, I don't know what's caused this. My understanding of smali is only about 10% or so.

    But I can make a suggestion. If removing the red lines solves the issue, it's worth finding out if you actually need to remove all of them.

    So remove the first red line, recompile, see what happens. If you get a FC or your statusbar goes wrong, remove the second line instead, recompile and see what happens then.

    Tedious but that way you can narrow down precisely which bits of code are causing your signal icons to vanish. Then you'll be that bit closer fo working out what to do about it.

    Thanks Sir !
    I was finally able to make this mod working !
    Thanks for your support !!
    3
    Thats awesome .. plz share pngs :)
    here :cool:

    took so much time to rename/edit . :p
    2
    THIS IS HALF BAKED ONLY FOR DEVELOPMENT (REGULAR USER PLZ DONT DOWNLOAD)

    I basically used files from Android 4.3 to make Image theme on Stock XT1033.

    I have modded PhoneStatusBar.smali.
    used BatteryController.smali from Android4.3.

    End Result :

    UwQ8PP4.jpg


    some how this mod does not shows network icons :p

    FILES : IMAGED BATTERY

    AREA OF INTEREST :
    PhoneStatusBar.smali line no : 8520

    Code:
    .line 1190
    new-instance v0, Lcom/android/systemui/statusbar/policy/BatteryController;
    
    iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
    
    invoke-direct {v0, v2}, Lcom/android/systemui/statusbar/policy/BatteryController;-><init>(Landroid/content/Context;)V
    
    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
    
    [color=red]iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
    
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
    
    const v6, 0x7f07002d
    
    invoke-virtual {v0, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
    
    move-result-object v0
    
    check-cast v0, Landroid/widget/ImageView;
    
    invoke-virtual {v3, v0}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V[/color]
    
    .line 1194
    iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mIsMultiSimEnabled:Z
    
    if-eqz v0, :cond_3e
    
    .line 1195
    new-instance v0, Lcom/android/systemui/statusbar/policy/MSimNetworkController;

    Removing red lines and compiling again bring backs the Network icon (Signal Cluster)

    IMPORTANT FILES :
    ORIGINAL PHONESTATUSBAR.SMALI
    MODIFIED PHONESTATUSBAR.SMALI

    Hmm..smali. Yuck.

    I'll be honest, I don't know what's caused this. My understanding of smali is only about 10% or so.

    But I can make a suggestion. If removing the red lines solves the issue, it's worth finding out if you actually need to remove all of them.

    So remove the first red line, recompile, see what happens. If you get a FC or your statusbar goes wrong, remove the second line instead, recompile and see what happens then.

    Tedious but that way you can narrow down precisely which bits of code are causing your signal icons to vanish. Then you'll be that bit closer fo working out what to do about it.
    1
    @sidharth.gtm
    try do not delete red lines and do some changes:
    #if-eqz v0, :cond_3e

    see what happend

    Did not help !