How To Guide Limit Charge

Search This thread

snovvman

Senior Member
Jun 6, 2008
1,530
511
Does this command require root?

Other than prolonging the battery condition/longevity, is there another reason to set a charge limit?

Last question: The command stays in effect until reboot?

Thanks.
 

rickysidhu_

Senior Member
Apr 1, 2016
1,894
830
Vancouver
Does this command require root?

Other than prolonging the battery condition/longevity, is there another reason to set a charge limit?

Last question: The command stays in effect until reboot?

Thanks.
I believe it does require a root, yes

I don't know any other benefit for limiting charge other than preserving the battery's long-term, overall health. Not allowing your battery to go too low or too high will help keep its maximum charge for a longer time

And yes, the setting will revert back to the default 100 after a reboot. I use Tasker to run the command on each boot, gotta love automation!
 

roirraW "edor" ehT

Forum Moderator
Staff member
If anyone is wondering how to stop the Pixel from charging at a certain percentage, it's the following command:

Code:
echo 90 > /sys/devices/platform/google,charger/charge_stop_level

Replace 90 with whatever percentage you want to stop charging at!
Thank you!

For what it's worth, this works with the Battery Charge Limit [ROOT] app (XDA thread). Go into the app's settings, enable Configurable CTRL File Data, click Configure Control Data, click I Understand, paste "/sys/devices/platform/google,charger/charge_stop_level" (without quotes) in the Set Path to Desired File, and since this app expects you to set values for Enabled and Disabled, I set both to 75, since that's what I want my battery to charge up to.

If I start using an automation app like Tasker, then I can set it a different way, but I kinda like this app method anyway.

Edit:
Now I am using the Advanced Charging Controller (ACC) Magisk Module and the AccA app which is a front-end/GUI for configuring the module.
 
Last edited:

dms76

Senior Member
Sep 28, 2009
437
39
Akron, OH
Forgive my ignorance I have not paid much attention to the forums over the last couple of years.

Is there a benefit to limiting the charge percent? is 90 the default recommendation?
 
Last edited:

EeZeEpEe

Senior Member
Aug 13, 2010
4,431
1,273
Tampa, FL
www.twitter.com
Google Pixel 6 Pro
Forgive my ignorance I have not paid much attention to the forums over the last couple of years. Picked up a job where I can't slack and read ll day long.. LOL

Is there a benefit to limiting the charge percent? is 90 the default recommendation?
The point is to limit battery degradation. Tesla does it with their cars. Personally, I'd rather just have an alert to notify me and I use AccuBattery Pro for that. I rarely charge overnight but if I actually do, I let adaptive charging handle handle the slow charging.
 
  • Like
Reactions: j2002 and dms76

boxemall

Member
Feb 2, 2012
36
11
You can use this in Tasker with a "run shell" task when the device boots since this reverts to 100 if you ever reboot the device.
i did that but it won't do anything. it still charges above my set value, so i was wondering.

what i did in tasker:

created a profile > event > system event > device boot
created a task > run shell > "echo 65 > /sys/devices/platform/google,charger/charge_stop_level"

i rebooted to make sure tasker was running (had battery optimization disabled on tasker), and tasker seems to run but it won't work. the "65" value was just set while i was testing it and since my phon was below 50% charge i did not want to wait that long so i started with 55, then 60 and so on. as i write this i'm waiting for it to hit 65% and hopefully stop charging. all i can think of is that i probably used the wron profile in tasker?

regards
 

rickysidhu_

Senior Member
Apr 1, 2016
1,894
830
Vancouver
Thank you!

For what it's worth, this works with the Battery Charge Limit [ROOT] app (XDA thread). Go into the app's settings, enable Configurable CTRL File Data, click Configure Control Data, click I Understand, paste "/sys/devices/platform/google,charger/charge_stop_level" (without quotes) in the Set Path to Desired File, and since this app expects you to set values for Enabled and Disabled, I set both to 75, since that's what I want my battery to charge up to.

If I start using an automation app like Tasker, then I can set it a different way, but I kinda like this app method anyway.
No problem!

Yeah for sure, that’s the beauty of android, there are several ways of going about things.

I use Tasker because that way it’s just one less app that I have on my phone. I like to have as many things inside of Tasker as possible to keep things organized and consolidated.

Although I’m currently back on iOS after being on Android for six years! I didn’t like the 6 Pro enough to keep it and I’m not going to get into details because there’s already a lot of hate threads for it - and I don’t want to add to that.

Let’s just say that I’ve been enjoying iOS more than I thought I would, especially considering I’ve been on android for so many years. So we’ll see what Google cooks up for the 7 series.

Anyways, back to topic, definitely going to miss Tasker for how much that can be done with it! The Shortcuts app on iOS is the closest thing to Tasker and it’s nowhere near as robust lol
 
  • Like
Reactions: roirraW "edor" ehT

boxemall

Member
Feb 2, 2012
36
11
If anyone is wondering how to stop the Pixel from charging at a certain percentage, it's the following command:

Code:
echo 90 > /sys/devices/platform/google,charger/charge_stop_level

Replace 90 with whatever percentage you want to stop charging at!
does this work without root? i tried this using tasker but it did not work. how did u test it?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    If anyone is wondering how to stop the Pixel from charging at a certain percentage, it's the following command:

    Code:
    echo 90 > /sys/devices/platform/google,charger/charge_stop_level

    Replace 90 with whatever percentage you want to stop charging at!
    5
    If anyone is wondering how to stop the Pixel from charging at a certain percentage, it's the following command:

    Code:
    echo 90 > /sys/devices/platform/google,charger/charge_stop_level

    Replace 90 with whatever percentage you want to stop charging at!
    Thank you!

    For what it's worth, this works with the Battery Charge Limit [ROOT] app (XDA thread). Go into the app's settings, enable Configurable CTRL File Data, click Configure Control Data, click I Understand, paste "/sys/devices/platform/google,charger/charge_stop_level" (without quotes) in the Set Path to Desired File, and since this app expects you to set values for Enabled and Disabled, I set both to 75, since that's what I want my battery to charge up to.

    If I start using an automation app like Tasker, then I can set it a different way, but I kinda like this app method anyway.

    Edit:
    Now I am using the Advanced Charging Controller (ACC) Magisk Module and the AccA app which is a front-end/GUI for configuring the module.
    4
    You can use this in Tasker with a "run shell" task when the device boots since this reverts to 100 if you ever reboot the device.
    4
    Does this command require root?

    Other than prolonging the battery condition/longevity, is there another reason to set a charge limit?

    Last question: The command stays in effect until reboot?

    Thanks.
    I believe it does require a root, yes

    I don't know any other benefit for limiting charge other than preserving the battery's long-term, overall health. Not allowing your battery to go too low or too high will help keep its maximum charge for a longer time

    And yes, the setting will revert back to the default 100 after a reboot. I use Tasker to run the command on each boot, gotta love automation!
    3
    You can also set the adaptive charging "on" and program a silent alarm for 2-3 hours after you normally get up. I set mine for 10:00 even though I normally get up at 7:30 and my phone is usually at about 85%