Stop the Full Charge Notifications

AwfulFaded

Senior Member
Feb 27, 2010
94
23
0
Kansas City, KS
For anybody who wants to run a stock (but rooted) ROM and wants to remove probably the dumbest feature ever: the Full Charge Notification. This is affectionately known as the 3am wake-up call.


If you don't know what I'm talking about, consider yourself lucky. If you know what I'm talking about, you have options. One way is to install an app to silence the notifications such as the free "Battery Charged Silencer" app (thanks JimSmith94 for pointing this out), this app allows you to silence the notification sound only. For the more adventurous types out there here's another way to put an end to it, which also allows you to choose whether or not to leave the screen-on and status bar notification:

1. Download Auto-Deodexer, http://forum.xda-developers.com/showthread.php?t=598026
2. Extract Auto-Deodexer
3. Copy /system/app/SystemUI.apk and system/app/SystemUI.odex to your sdcard
4. Copy /system/framework/ to your sdcard
5. Copy the contents of the framework folder from sdcard to the framework folder of Auto-Deodexer
6. Copy SystemUI.apk and SystemUI.odex to the app folder of Auto-Deodexer
7. Run deoall.bat, choose option 1 and wait for it to finish. Use option 6 to exit
8. Open deodexed_APK/SystemUI.apk with 7-zip and extract classes.dex to your root deodexer folder (the one with baksmali in it)
9. Open a command prompt and navigate to the folder where you have extracted Auto-Deodexer
10. Use the following command: java -jar baksmali-1.2.3.jar -o dexout/ classes.dex
11. Open dexout/com/android/systemui/statusbar/policy/StatusBarPolicy.smali in your favorite text editor
12. Find the .method private addFullChargeNotification method.

13. What you do next depends on your version of Android.
If you are running Android 2.3.4, remove the following lines:
to remove the sounds, remove: "invoke-direct {p0, v0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->playTone(Landroid/net/Uri;)v"
to stop the screen from turning on, remove: "invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->turnOnScreenWithForce()v"
to remove the status bar icon, remove: "invoke-virtual {v0, v1, v2}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)v"

If you are running 2.3.6 (you have the EK02 update), remove the following lines:
to remove the status bar icon, remove: "invoke-virtual {v0, v1, v2}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V"
to stop the screen from turning on, remove: "invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->turnOnScreenWithForce()V"​

14. Use the following command: java -Xmx512M -jar smali-1.2.3.jar dexout/
15. Rename out.dex to classes.dex
16. Replace the classes.dex in the deodexed SystemUI.apk with the one you just created
17. Rename the new deodexed SystemUI.apk to SystemUI.apk.new and push it to your phone
18. Copy SystemUI.apk.new to your /system/app folder
19. Set the permissions for the file to owner: Read/Write, group: Read, others: Read (644 for those who know what that means)
20. Rename SystemUI.odex to SystemUI.odex.old
21. Rename SystemUI.apk to SystemUI.apk.old (you will start seeing frequent errors at this point, this is normal and expected. Don't panic just hit Force Close to dismiss the errors and continue)
22. Rename SystemUI.apk.new to SystemUI.apk
23. Reboot
24. Enjoy uninterrupted sleep.​

For anybody running stock 2.3.6 you can grab the file below and skip steps 1-16. This will stop both the screen-on and the status bar icon.

If you are running a custom ROM and you don't have this notification (I'm not sure why you read this far but...) please thank your dev. If you do have this notification, I imagine these steps would still work for you.

If these changes don't work for you, you find a full nights sleep to be annoying, you think sleep is for weak minded individuals, etc. you're in luck. Reverting back is simple:

1. Rename SystemUI.odex.old to SystemUI.odex
2. Rename SystemUI.apk to SystemUI.apk.new
3. Rename SystemUI.apk.old to SystemUI.apk
4. Reboot​


Thanks:
Thanks to pulser_g2 for fixing this issue on the international GSII
Thanks to Mic_88 for writing a portal article about pulser_g2's work), I also linked to the image you used
Thanks to Sboulema for your step by step directions (largely copy/pasted above)
Thanks to afilopou for some edits you made to those directions
Thanks to countless others here at XDA who freely share their knowledge and selflessly donate their time to make life better for others
 

Attachments

Last edited:

phatmanxxl

Senior Member
Dec 30, 2008
5,008
1,105
0
Thanks, I wouldn't be surprised if this was some kind of federal regulation from the EPA or something like that. I noticed a lot of newer phones do this now, and tell you to unplug your phone. Like I really want to head to work with 80% battery.
 

AwfulFaded

Senior Member
Feb 27, 2010
94
23
0
Kansas City, KS
Thanks, I wouldn't be surprised if this was some kind of federal regulation from the EPA or something like that. I noticed a lot of newer phones do this now, and tell you to unplug your phone. Like I really want to head to work with 80% battery.

That's crazy enough to be true.

I haven't busted out my DMM yet, but I'm pretty sure the phone throttles the charge current down once the charge hits a certain threshold (the brick cools down). It also takes *forever* to charge from 99% to 100%, I found that while testing this fix and waiting for the phone to fully charge. If the phone is throttling the charge current, there's no reason to expect it won't turn into a trickle to keep the phone at max.

It's also interesting that 2.3.4 had sound + screen on + status bar icon while 2.3.6 dropped the sound. I figured that change had to be in response to complaints, but couldn't figure out why they'd leave the screen on (since that can be just as annoying). Some obscure federal regulations would explain why the screen on was left in there. I wish policy makers didn't live such a sheltered life so we could get some common sense legislation.
 

AwfulFaded

Senior Member
Feb 27, 2010
94
23
0
Kansas City, KS
This free "Battery Charged Silencer" app works well for me: https://market.android.com/details?id=cz.psencik.simple.silencer&hl=en
You're absolutely right. I saw several people referencing that when I was looking around for how to do this. I will probably add this to the original post. If you want to use an app for this, that's your prerogative. We should be free to make our own decisions, but it's not really a choice if you only have one option to choose from. Speaking for myself, I'd prefer not to clutter up my device with a bunch of use-once-and-forget apps if there's an alternative.

I approached this wanting to learn how to do something for myself instead of always relying on the work of others, so I leaned heavily on the work of others. Once I had it working, I decided to pass it along in the hopes that somebody else can benefit.

I think Samsung gave us one hell of a phone to work with but there are a few things I find annoying: battery charge notification, camera sounds, etc. Thanks to XDA I'm confident I'll be able to tweak and tune this device until it meets my definition of perfect, what remains to be seen is how much of this other people help me with vs how much other people do for me. However, I'm not saying my approach is better than yours.
 
Last edited:

phatmanxxl

Senior Member
Dec 30, 2008
5,008
1,105
0
I do know there was a law passed a few years ago about camera sounds. That every phone with a camera must have a sound that can't be silenced when taking pics, for privacy reasons lol but we can have our keystrokes secretly logged and sent to an unknown server.

Thanks for this though, I think the charge light turning blue is plenty of notification that im %100.
 

gershee

Senior Member
Oct 19, 2006
1,718
637
143
Miami, Florida
is it bad for the phone or battery to leave the phone on the charger after it is fully charged for an extensive period of time?

if i'm running custom rom (calkulin's) will this have any adverse affects? will it potentially break anything?
 
Last edited:

phatmanxxl

Senior Member
Dec 30, 2008
5,008
1,105
0
is it bad for the phone or battery to leave the phone on the charger after it is fully charged for an extensive period of time?

if i'm running custom rom (calkulin's) will this have any adverse affects? will it potentially break anything?
Unless your using an SBC kernel (which our phones don't have yet), no you'll be fine. The circuitry in the phone controls the voltage to the battery when its full.
 
Last edited:

AwfulFaded

Senior Member
Feb 27, 2010
94
23
0
Kansas City, KS
is it bad for the phone or battery to leave the phone on the charger after it is fully charged for an extensive period of time?

if i'm running custom rom (calkulin's) will this have any adverse affects? will it potentially break anything?
I don't believe so for a couple reasons:
1) Different types of rechargeable batteries perform differently. Where Ni-Cad batteries would develop a memory if you only discharged them to a certain level (if you frequently drained them to 75% before you charged them, eventually you'd only get 25% use out of them). Continuously charging a Ni-Cad battery to keep it topped off would result in a battery that wouldn't hold a charge. The batteries in our phones are Li-ion. I think Li-ion batteries are supposed to operate better at full charge and last longer when they get frequent charges instead of running them down before charging them back up.

2) While I haven't seen any specific discussion on the topic, I believe the phone throttles down the charge current as it approaches 100% (the transformer brick cools down because there is less current flowing through it). If that is the case, I would hope the Samsung engineers have the phone either turning off the charge current or only allowing a trickle charge when the phone reaches 100%.

However I'm not an battery engineer, so feel free to do your own research.
 

gershee

Senior Member
Oct 19, 2006
1,718
637
143
Miami, Florida
Unless your using an SBC kernel (which our phones don't have yet), no you'll be fine. The circuitry in the phone controls the voltage to the battery when its full.
yea i figured as much. as long as it's not sbc kernel the battery protection should suffice.

now, my 2nd question, will this have an adverse affects if flashed on a custom rom? i'm running calkulin's
 
Last edited:

AwfulFaded

Senior Member
Feb 27, 2010
94
23
0
Kansas City, KS
Since I don't know whether or not calkulin has a modified SystemUI.apk, I think it would be safer if you made the changes manually but you're welcome to try it. Caulkins is pretty popular so if you find out it works you'll save a lot of people a lot of grief. Switching back and forth is pretty simple, just a matter of renaming files and rebooting.
 

gershee

Senior Member
Oct 19, 2006
1,718
637
143
Miami, Florida
Since I don't know whether or not calkulin has a modified SystemUI.apk, I think it would be safer if you made the changes manually but you're welcome to try it. Caulkins is pretty popular so if you find out it works you'll save a lot of people a lot of grief. Switching back and forth is pretty simple, just a matter of renaming files and rebooting.
wish there was an easier way to edit the settings to try this. i am at work and don't have access to a computer to deodex.. any other way to modify these settings in the systemui.apk?
 

AwfulFaded

Senior Member
Feb 27, 2010
94
23
0
Kansas City, KS
Upload your files, the apk and odex, and I'll take a look. It might not work if you're still on 2.3.4 or caulkin has made significant changes to the framework.

I wish I'd kept my 2.3.4 files and framework...

Sent from my SPH-D710 using xda premium
 

gershee

Senior Member
Oct 19, 2006
1,718
637
143
Miami, Florida
Upload your files, the apk and odex, and I'll take a look. It might not work if you're still on 2.3.4 or caulkin has made significant changes to the framework.

I wish I'd kept my 2.3.4 files and framework...

Sent from my SPH-D710 using xda premium
i must be deodexed because i dont have any odex files in my /system/app..
will my systemui.apk help you?


UPDATE:
latest calkulin's 2.0.1a is 2.3.6 btw (that's what i am on).. and i mentioned this mod in his thread.. and maybe this thread should be moved to android development? also, thanks alot! i hit the button.
 

Attachments

Last edited:

AwfulFaded

Senior Member
Feb 27, 2010
94
23
0
Kansas City, KS
It looks like the sound and screen-on is gone so I removed the status bar icon.

1. Copy this SystemUI(Calkulin).apk to your /system/app folder
2. Set the permissions for the file to owner: Read/Write, group: Read, others: Read (644 for those who know what that means)
3. Rename SystemUI.apk to SystemUI.apk.old (you will start seeing frequent errors at this point, this is normal and expected. Don't panic just hit Force Close to dismiss the errors and continue)
4. Rename SystemUI(Calkulin).apk to SystemUI.apk
5. Reboot
6. Enjoy​

Please try this out and let me know how it works. Thanks!
 

Attachments

gershee

Senior Member
Oct 19, 2006
1,718
637
143
Miami, Florida
It looks like the sound and screen-on is gone so I removed the status bar icon.

1. Copy this SystemUI(Calkulin).apk to your /system/app folder
2. Set the permissions for the file to owner: Read/Write, group: Read, others: Read (644 for those who know what that means)
3. Rename SystemUI.apk to SystemUI.apk.old (you will start seeing frequent errors at this point, this is normal and expected. Don't panic just hit Force Close to dismiss the errors and continue)
4. Rename SystemUI(Calkulin).apk to SystemUI.apk
5. Reboot
6. Enjoy​

Please try this out and let me know how it works. Thanks!
OK, done. much appreciated. now i have to wait till i get home and charge my phone. will let you know in a few hours. also will give me time to see if i get any adverse effects! so far so good!