• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[MOD][XPOSED][2.3+] DisableCriticalBatteryShutdown - v1.0 [ABANDONED]

Search This thread

zst123

Inactive Recognized Developer
Aug 20, 2013
442
3,303
Singapore
DisableCriticalBatteryShutdown
(for Xposed Framework)


What?
Disables the Auto-Shutdown when Android detects a critical battery level


Why?
This is to prevent the auto-shutdown when you have 1% left of battery. It is useful for calibrating your battery by draining it completely, using Chinese Branded Batteries with terrible battery percentage detection or even lengthen the life of a phone with non-removable battery with terrible calibration.

Compatiblility
Not working on 4.3+
Tested only on AOSP 2.3, 4.0, 4.1

This project is abandoned, I will not add support for any other ROMs.

The App has no interface. It only shows a notification for the attempted shutdown (shown in the attachments)
 

Attachments

  • Screenshot_2013-12-24-22-14-06.png
    Screenshot_2013-12-24-22-14-06.png
    51.4 KB · Views: 18,127
Last edited:

zst123

Inactive Recognized Developer
Aug 20, 2013
442
3,303
Singapore
Disclaimer 1
I am not responsible for any damage to CPUs, SD cards, Internal Storages, or other failures that happened after your battery became flat and your phone abruptly dies.
By choosing to use this module, you are fully aware that this can cause damage to your phone especially when writing data to the SD Card or Internal Storage.

Disclaimer 2
Lithium-Ion batteries should not be drained everyday over a long period of time. Doing so WILL decrease the lifespan of your battery. Calibration may or may not be a placebo, however, it really depends on how you use and what type of battery you use. If it has no effect for you on the first "calibration", please do not continue to drain your battery everyday.

Download from Xposed Repo

This Xposed Module is open source!
Sources are found on my GitHub
This module is abandoned, however, if you would like to help in the development, you may do so and I will update the module if needed
 
Last edited:

zst123

Inactive Recognized Developer
Aug 20, 2013
442
3,303
Singapore
some questions from me:
1. if phone's battery goes '0' bar, will it shutdown automatically?
2. compatible with android 4.4.2 or not?

thanks in advance

1) No. Until your battery is completely dead
2) Yes, I haven't tested but it is compatible.
If it works, your phone will abruptly shutdown after receiving the "Blocked Shutdown X times"
If it doesn't work, you will see the shutdown dialog with the spinning wheel before your phone shuts down.

Sent from my GT-I9300 using XDA Premium 4 mobile app
 

exodius48

Senior Member
Apr 7, 2013
3,556
675
Yori's Heart
Xiaomi Mi 11 Ultra
1) No. Until your battery is completely dead
2) Yes, I haven't tested but it is compatible.
If it works, your phone will abruptly shutdown after receiving the "Blocked Shutdown X times"
If it doesn't work, you will see the shutdown dialog with the spinning wheel before your phone shuts down.

Sent from my GT-I9300 using XDA Premium 4 mobile app

Thanks for your explanation. So, Whats the side effect from this app to the battery life? not damage to the phone's battery, isn't?
 

zst123

Inactive Recognized Developer
Aug 20, 2013
442
3,303
Singapore
this might give an extra 5minutes juice, that's it?
Yea. Maybe more or less but long term usage will decrease your battery life. Only use it for calibration.

Thanks for your explanation. So, Whats the side effect from this app to the battery life? not damage to the phone's battery, isn't?
The side effect is allowing the battery to drain completely. Ususally used for calibration but if you use it everyday over a long period of time, it WILL decrease your battery life.
 

xdapowerapps

Senior Member
Jul 16, 2008
639
241
this might give an extra 5minutes juice, that's it?

Thanks for your explanation. So, Whats the side effect from this app to the battery life? not damage to the phone's battery, isn't?

Lithium-Ion batteries are NOT meant to be drained. You WILL decrease the life of your battery (since it weakens the anode bars physically). Draining works for Ni-Mh batteries. Android calibrates your battery between 80 and 90% so if you have Lithium ion batteries, calibration is a placebo. Correct me if I'm wrong. :good:
 
  • Like
Reactions: zviki

metalboy94

Senior Member
May 12, 2011
680
170
Bucharest
Lithium-Ion batteries are NOT meant to be drained. You WILL decrease the life of your battery (since it weakens the anode bars physically). Draining works for Ni-Mh batteries. Android calibrates your battery between 80 and 90% so if you have Lithium ion batteries, calibration is a placebo. Correct me if I'm wrong. :good:

Actually, if the battery metering chip (also known as the 'fuel gauge') is giving inaccurate results, calibration will make a world of difference. Here's an example - on my (generic Chinese) tablet, the meter often goes down quite slowly during usage, while voltage goes down normally (according to BMW). When the meter hits ~35%, the battery starts going down abruptly (~1%/second), until it gets to 0 and the tablet shuts down.

This doesn't mean at all that I have a flawed battery, since I am getting the same usage time as when I bought it (battery was flawed from the start? :silly: ) - the battery meter chip is simply inaccurate.

Thank you, OP, for this mod, it's gonna come in handy.
 

zst123

Inactive Recognized Developer
Aug 20, 2013
442
3,303
Singapore
Sorry for my ignorance but what is the difference between this & removing the batterystats.bin system file?
Removing battery stats is different. On a battery with a terrible calibration, it will not prevent Android from shutting down when it (wrongly) detects a low battery. This module disables the shutdown when you reach 1% and below. Long term usage of draining to 0% WILL lower your battery life. So use only for calibration

Sent from my GT-I9300 using XDA Premium 4 mobile app
 

JoeSyko

Member
Nov 14, 2010
5
3
Removing battery stats is different. On a battery with a terrible calibration, it will not prevent Android from shutting down when it (wrongly) detects a low battery. This module disables the shutdown when you reach 1% and below. Long term usage of draining to 0% WILL lower your battery life. So use only for calibration

Sent from my GT-I9300 using XDA Premium 4 mobile app

Thanks. I recently purchased an extended battery with twice the mAh as the stock battery but I am still getting roughly the same amount of time out of a full charge. I am hoping this will fix that. :good:
 

Rimmir

Senior Member
Jan 22, 2011
550
150
Ann Arbor, MI
My phone seems to have wonky battery life, it will jump from 14 to 12 to 10 to 3 percent then shut down.

This should help immensely for calibration if it does work.

Will report back. Happy holidays ☺

Sent from my One using Tapatalk



---------- Post added 28th December 2013 at 12:28 AM ---------- Previous post was 27th December 2013 at 11:47 PM ----------



Didn't seem to work for my Beanstalk 4.4.2 HTC One. I am 100% willing to beta test or provide any data if needed

(I installed and activated module, rebooted, let battery drain to 0 from 16, phone proceeded to shut off right away)

Sent from my One using Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 36
    DisableCriticalBatteryShutdown
    (for Xposed Framework)


    What?
    Disables the Auto-Shutdown when Android detects a critical battery level


    Why?
    This is to prevent the auto-shutdown when you have 1% left of battery. It is useful for calibrating your battery by draining it completely, using Chinese Branded Batteries with terrible battery percentage detection or even lengthen the life of a phone with non-removable battery with terrible calibration.

    Compatiblility
    Not working on 4.3+
    Tested only on AOSP 2.3, 4.0, 4.1

    This project is abandoned, I will not add support for any other ROMs.

    The App has no interface. It only shows a notification for the attempted shutdown (shown in the attachments)
    9
    i saw, but didnt work

    Seems not to work with 4.2.2 on android revolution hd 8.0

    Didn't work for me on a CM 11 4.4.2 Note 3. :( Very sad, cos I've wanted this feature on my android phones for years, but only recently learned of the awesomeness of xposed and modules.

    Thanks for the attempt, but it didn't work on my Samsung Galaxy S3, running Cyanogenmod 11 (M6), which is KitKat 4.4.2. After installing Xposed, then the (abandoned) module, then installing your version and rebooting, it still gives the message and shuts down on low battery.

    Please kindly revitalize this module to work for KitKat. Please.

    Agreed

    Sent from my GT-I9195 CarbonKat 4.4.2

    +1

    Sent from my awesome Galaxy Note 3!

    +1 I know someone there is capable of making this module work :)
    Try the test APK in the attachments.

    Test APK should work for Kitkat, Jellybean. (No guarantee though)
    If anyone wants to know the exact changes I have made, it is here:
    https://github.com/zst123/Xposed-DisableCriticalBatteryShutdown/commits/test_jbkk
    6
    Disclaimer 1
    I am not responsible for any damage to CPUs, SD cards, Internal Storages, or other failures that happened after your battery became flat and your phone abruptly dies.
    By choosing to use this module, you are fully aware that this can cause damage to your phone especially when writing data to the SD Card or Internal Storage.

    Disclaimer 2
    Lithium-Ion batteries should not be drained everyday over a long period of time. Doing so WILL decrease the lifespan of your battery. Calibration may or may not be a placebo, however, it really depends on how you use and what type of battery you use. If it has no effect for you on the first "calibration", please do not continue to drain your battery everyday.

    Download from Xposed Repo

    This Xposed Module is open source!
    Sources are found on my GitHub
    This module is abandoned, however, if you would like to help in the development, you may do so and I will update the module if needed
    5
    I just released v0.99 of my Battery Shutdown Manager module which contains the said feature to disable the device shutdown for Android 4.2+.
    I've tested it on an Android 5.0 device. It should work for pretty much all AOSP and CM-based ROMs. If the basic functionality of the module (the shutdown countdown dialog) works, the "Disable Shutdown" option should, too.

    Credits to @zst123 for initially coming up with this idea. I followed his approach with a notification which tells you that a shutdown got blocked but added a "Power Off" button so you can cancel it (see screenshots).

    Note that it's an experimental options for now, which does require a purchased pro version (in case sth. isn't working as expected I'll refund the purchase of course).
    Once it's been tested further I'll graduate it to the normal (free) version.

    LG ROMs are known to be incompatible with the module because LG changes some android internals, it's quite likely that more vendors did so.
    I'm planning to add support for LG ROMs but need to find the time.
    If your device is incompatible it just shouldn't work without negative side effects except a failure in the Xposed Log.
    In case you want please post in the module thead and I'll try to add support for your ROM, too.
    4
    This is a very useful tool but sad to say dev decided to stop. So for those who are asking for compatibility, it's clearly posted in the OP and i will quote again :p It will definitely won't run on kitkat of course, but if it do works on your phone running below 4.3, be kind enough to put it here so others will know. Thanks

    I agree. But with that said why doesn't someone else pick it up? I would but I really don't know what is what in Android as of right now.

    Sent from my HTC6435LVW using Tapatalk

    Because all the reply all available in first post.
    As said, not compatible with some versions of Android, and compatible with others, OK.
    The title of this thread says [ABANDONED] Which means, no more support here (unfortunately, because this is an awesome mod) and people will come here to ask questions about this module..

    Envoyé de mon Galaxy Nexus en utilisant Tapatalk

    Plese add support on kitkat.

    Inviato dal mio Nexus 4 utilizzando Tapatalk

    PLEASE READ THE ABOVE!!! ITS NOT WORKING BECAUSE YOUR ANDROID VERSION IS NOT SUPPORTED!!!

    He clearly says that android 4.3 and higher is NOT supported.

    Tried this, but didn't work, didn't notice any difference, 4.3.1 CM10.2

    Sent from my GT-I9195

    Not working on 4.4.X roms please add support

    Thisnis great app

    Sent from my MT11i

    Not work in tomato t2 exynos 5410 tablet with 4.2.2

    Enviado desde mi Tomato T2 mediante Tapatalk


    Try this in attachments. Should hopefully work on AOSP 4.3/4.4 and maybe on manufacturer roms.