[MOD] Disable low battery, battery temperature pop-ups and full battery notification

GalaxyS3man

Member
Aug 4, 2012
39
4
0
POP-UP IS GONE Finally.

Well, what can i say, wife kept botherin me..eh?! :banghead:.thank you, appreciated, i been here in xda only few days, newbie :p bare with me i'm a quick to catch up with things :rolleyes:

Sent from my GT-I9300 using xda app-developers app
 
Last edited:

GalaxyS3man

Member
Aug 4, 2012
39
4
0
Wondering why this hacked camera wont work with flash or at all after 5% battery. Also this automated brightness down to minimun when hitting 5%. Maybe someone fix those too, other than that im happy.

I never actually have my phone in charger coz i have this extra battery charger set by samsung, when reaching 1% its nice just to throw fresh 100% while old one back to external charger.
I recommend that set to all GS3 users :p

Thanks again.

Sent from my GT-I9300 using xda app-developers app
 
Last edited:

InfX

Senior Member
May 1, 2008
885
216
73
The camera refusing to turn the flash on, or itself on, is, quite obviously, the camera feature, it is unrelated to system ui in any way. Why would this patch change it?

Brightness decrease - ive never seen it happening to me. Maybe because i normally run out of battery at home and already on low brightness. Or, maybe its a feature on a newer ROM (i am on xxalf5 deodexed stock).
 

GalaxyS3man

Member
Aug 4, 2012
39
4
0
Yeah i am aware that it's feature on camera app itself, strange only coz that hyper mod cam app supposed to work even battery under 5%. You know the one with 30mbps fullhd mod version of the stock cam.

Lg camera from play market runs fine thou, well.. it did on my Galaxy S2, SGS3 seem not compatible yet with this camera app.

Sent from my GT-I9300 using xda app-developers app

---------- Post added at 11:47 AM ---------- Previous post was at 11:37 AM ----------

Ah, found the reason, it was a stockcam afterall, my mistake, heh. After restoring older backup there was not yet hyperx cam installed :p


Sent from my GT-I9300 using xda app-developers app

---------- Post added at 11:53 AM ---------- Previous post was at 11:47 AM ----------

GalaxyS3man, your apk is NOT odexed. Took me barely 2 minutes to apply the patch. Here we go...

PS: TBH, i've been under impression people on XDA are perfectly familiar applying and/or finding out this kind of stuff, really :)
Yeah, no wonder it was not odexed, i send u the original from the phone last night, other systemui.apk files i was messing with were on my laptop. It was the cmd giving me errors that made me scratch my head ;)

Sorry for the mixup, but im thankful to you, i owe you a :beer:

Sent from my GT-I9300 using xda app-developers app
 

zorro12010

Senior Member
Jul 2, 2010
99
6
0
System UI

The reason for this little hack is the fact those 2 pop-ups can become an extreme double-annoyance while driving in hot weather. Imagine, your battery is below 15%, yet scorching hot, beyond the charging cut-off threshold. Connect a charger and you get bombarded with the "charging paused, battery temperature too high" pop-ups. Disconnect it and you get a low battery ones. This little patch deals with the issue by simply disabling the annoying pop-ups.

Please note, this doesn't modify any functionality, it just disables the pop-ups. The battery will not and should not charge when overheated.

EDIT: Now also disables full battery notification.

So here we go:

  1. Fetch your "/system/app/SystemUI.apk" from the device.
  2. Decompile with apktool, locate the PowerUI.smali.
  3. Apply the patch below.
  4. Rebuild the apk.
  5. Rename your original SystemUI.apk and push the new one to the device.


Code:
*** PowerUI.smali.old    Thu Aug 03 00:00:00 2012
--- PowerUI.smali.new    Fri Aug 03 00:00:00 2012
***************
*** 1260,1269 ****
--- 1260,1271 ----
  
      .prologue
      const/4 v10, 0x0
  
      .line 561
+     return-void
+     
      iget-object v7, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
  
      const-string v8, "notification"
  
      invoke-virtual {v7, v8}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
***************
*** 1734,1743 ****
--- 1736,1747 ----
  
      iget-object v13, v0, Lcom/android/systemui/power/PowerUI;->mBatteryLevelTextView:Landroid/widget/TextView;
  
      if-nez v13, :cond_0
  
+     return-void
+ 
      const-string v13, "showing"
  
      :goto_0
      invoke-virtual {v15, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  
***************
*** 2203,2212 ****
--- 2207,2218 ----
  
      iget v6, p0, Lcom/android/systemui/power/PowerUI;->mBatteryHealth:I
  
      if-ne v5, v6, :cond_0
  
+     return-void
+     
      .line 467
      const v2, 0x7f0800a1
  
      .line 478
      .local v2, messageId:I


Hi InFX,

I've been looking like crazy for a solution to the Low batt pop ups etc.
Finally I found your thread but unfortunatly I could not manage the aspect with the apk tool.
Would you be so kind to mod my system ui?
Thanks in advance.
 

Attachments

InfX

Senior Member
May 1, 2008
885
216
73
Hi InFX,

I've been looking like crazy for a solution to the Low batt pop ups etc.
Finally I found your thread but unfortunatly I could not manage the aspect with the apk tool.
Would you be so kind to mod my system ui?
Thanks in advance.
Well... you could google a bit and manage it, really. It's not that complicated. If i could do it, anyone could after all.

In any case, attaching your apk with the patched classes.dex, sorry in advance if i did screw something up (unlikely, though). BTW, do specify in this thread what ROM is it coming from and with what mods applied, just in case someone else ends up finding it useful ;)
 

Attachments

zorro12010

Senior Member
Jul 2, 2010
99
6
0
Well... you could google a bit and manage it, really. It's not that complicated. If i could do it, anyone could after all.

In any case, attaching your apk with the patched classes.dex, sorry in advance if i did screw something up (unlikely, though). BTW, do specify in this thread what ROM is it coming from and with what mods applied, just in case someone else ends up finding it useful ;)


Hi InfX,

Thanks very much, I have not tried it yet (at work) but will do so soon.
It concerned a system ui taken from Dragon JB 1.7.
Mods: statusbar (center clock, bubble battery), green jb theme by Dragon, system tweaks, like supercharger, soundhack, no boot sound, etc.

Thanks again for your kind work.
 

DSA

Senior Member
May 15, 2011
4,759
5,778
263
I was using this mod in my previous rom - its a great mod

BUT, when the battery is fully charged, the battery icon and 'fully charged, remove charger' text doesn't disppear from the status bar

Im looking into it, will update when i have news...again, great mod
 

InfX

Senior Member
May 1, 2008
885
216
73
I was using this mod in my previous rom - its a great mod

BUT, when the battery is fully charged, the battery icon and 'fully charged, remove charger' text doesn't disppear from the status bar

Im looking into it, will update when i have news...again, great mod
If i remember correctly, the first "return-void" in the patch was the one that should make that no longer appear, at all. The method name there is VERY obvious, too. Note that there is another method nearby in the code that is intended to discard the notification when the charger is disconnected, it starts in a similar fashion. You may have accidentally patched that additional one.
 

DSA

Senior Member
May 15, 2011
4,759
5,778
263
If i remember correctly, the first "return-void" in the patch was the one that should make that no longer appear, at all. The method name there is VERY obvious, too. Note that there is another method nearby in the code that is intended to discard the notification when the charger is disconnected, it starts in a similar fashion. You may have accidentally patched that additional one.
I think you may be right ...
 

DSA

Senior Member
May 15, 2011
4,759
5,778
263
This isn't an app to install

This is a mod to a system file....you need to overwrite the original with the new modded version with a root file browser
 
  • Like
Reactions: InfX

threein99

Member
Sep 7, 2012
5
0
0
This isn't an app to install

This is a mod to a system file....you need to overwrite the original with the new modded version with a root file browser
ok thanks a million

---------- Post added at 03:09 PM ---------- Previous post was at 02:42 PM ----------

This isn't an app to install

This is a mod to a system file....you need to overwrite the original with the new modded version with a root file browser
 
Last edited: