Running phone without battery - General Questions and Answers

Hi,
I have a question about runnig my old Samsung (XCover 3 - SM-G388F) without battery.
I have connected wires (usb cable connected to charger) dierctly to pins under cover and it works fine. The problem is that system counts the battery load percentage down and when it reaches 0% the phone is shutting down. When I boot it up system shows again 100% and counts down.
Is there a way to bypass this (phone is rooted if it helps)? I need it runnig 24/7.

ok, my mistake
I was trying to serach an answear before I posted and didn't find anything.
But when I posted this question I got "suggested" thread with answear
"Here's how to fix the battery percentage going down:
-You have to be rooted
-Use the terminal emulator app
-Type SU (switches from $ to #)
-Type this command to keep the phone at 100%
dumpsys battery set level 100
-Type this command to tell the phone that the charger is plugged in
dumpsys battery set usb 1
Everytime you reboot it reverts to stock settings. So I use a tasker script that runs the above commands on every boot."
I leave it here for other
Chears

wouldnt it be possible to keep the battery in and just prevent it from charging ?

I tried that with an app called "Battery Charge Limit" but from time to time the phone was shutting down.

Related

Terrible idle battery life after update.

Hi!
After I've updated my phone to 18.5.C.0.25 the battery life went very bad. 2 minutes writing SMS - 1% of battery gone. During night 15-20%, when the phone is doing nothing! Clean install through PC Companion, reseting to the factory settings, charging to 90, 80, 70% and then up to 100% didn't work. How to fix it? Anyone else has this problem? Stamina is on, the signal is good. What can be the problem?
Which variant are you using?
Following methods worked for me to reduce battery usage:
# clean install by flasing stock ftf using flashtool (downloaded by xperifirm)
# changing network mode from auto to gsm only (only when you don't need to use 3g/4g data)
# rooting phone, removing unnecessary apps(also some system apps and bloatwares) and managing autostart apps by allowing least number of apps to be started when system boots up
# stamina mode on > extended standby and extended usage is on (located inside the stamina option)
# turn off location service if not necessary, turn off wifi during sleep(keep wifi on only when charging), disable scanning always available for wifi, wifi optimization on
# turn off auto sync if not necessary
# remove widgets which drains battery faster by refreshing repeatedly (for example i've removed weather widget from screens)
# use auto brightness on and chose battery saving mode if applicable (lol no need to mention i guess! )
(btw, i'm using my phone with auto-rotate and wifi on all the time, now my phone provides me 2days of backup with around +/-6hrs screen on time on an average)
D2203. I have preffered 3G set, because my SIM doesn't support LTE
"# rooting phone, removing unnecessary apps(also some system apps and bloatwares) and managing autostart apps by allowing least number of apps to be started when system boots up"
I will try that
"# stamina mode on > extended standby and extended usage is on (located inside the stamina option)"
In use from the very beginning
"# turn off location service if not necessary, turn off wifi during sleep(keep wifi on only when charging), disable scanning always available for wifi, wifi optimization on
# turn off auto sync if not necessary
# remove widgets which drains battery faster by refreshing repeatedly (for example i've removed weather widget from screens)"
Done.
"# use auto brightness on and chose battery saving mode if applicable (lol no need to mention i guess! )"
I don't know why, but the brightness is very often set near maximum. Bug? The light sensor is ok (checked in CPU-Z)
The next question is, why the charging from 99 to 100% is taking so long? The next irritating fact is that the battery can stay on 99% for several hours and suddenly it's down to 92% in one minute. Is there any option to calibrate the battery gauge?
Magnum44pl said:
D2203. I have preffered 3G set, because my SIM doesn't support LTE
"# rooting phone, removing unnecessary apps(also some system apps and bloatwares) and managing autostart apps by allowing least number of apps to be started when system boots up"
I will try that
"# stamina mode on > extended standby and extended usage is on (located inside the stamina option)"
In use from the very beginning
"# turn off location service if not necessary, turn off wifi during sleep(keep wifi on only when charging), disable scanning always available for wifi, wifi optimization on
# turn off auto sync if not necessary
# remove widgets which drains battery faster by refreshing repeatedly (for example i've removed weather widget from screens)"
Done.
"# use auto brightness on and chose battery saving mode if applicable (lol no need to mention i guess! )"
I don't know why, but the brightness is very often set near maximum. Bug? The light sensor is ok (checked in CPU-Z)
The next question is, why the charging from 99 to 100% is taking so long? The next irritating fact is that the battery can stay on 99% for several hours and suddenly it's down to 92% in one minute. Is there any option to calibrate the battery gauge?
Click to expand...
Click to collapse
Well.. I haven't faced screen brightness issue like this yet, but an incompatible custom kernel can cause that, are you using any?
Charging from 99 to 100% can take upto 20mins i guess, because the last 10% is called trickle charging (or something like that) which means, the system will charge the battery in a periodic manner to ensure battery health.
Sudden drop of battery level can be caused by several different reasons, if the physical status of your battery is ok, try to find out the culprit which is draining your battery that way (you can figure it out by going power management > battery usage, here it'll show the battery consumption rate of various apps. right now i'm using CM11, last night i found that my battery was drained around 17% while staying in idle mode for around 6hrs! then i've found that the culprit was the nfc app which caused the huge battery drainage! Then i just removed nfc app (lol! ) because nfc was not working in CM11 either!)
Finally, many says that you can calibrate your your battery by discharging your battery to 1% and then re-charge it again to 100% in continuous manner and repeat this process couple of times to calibrate battery... some also say to hard turn off your phone after 100% charging by pressing volume up + power key for few seconds and then switch it on again, in that case if you find your phone battery is below 100% then charge it again to 100% continuously... But the thing I believe, if you find your phone in this situation that it shows drastically reduced battery level after phone restart, it's not any app, it's the damaged battery which is causing poor battery performance.
Thanks for reading, I hope you find this post helpful!

Huawei T1 7.0+ Bypass 'Low Battery' Message @ RM

Do any of you know how to bypass the 'low battery' message and restriction when flashing a ROM via microSD?My problem is that whenever I try to boot up to recovery mode and try to flash a stock ROM onto my tablet which is in a bootloop,it tells methat I don't have enough charge.I cannot charge it because it always drains the battery whenever I charge it(when it reaches a certain amount of power,it boots up into a bootloop,starts to drain battery due to it trying to boot).That darn automatic boot...
Thanks!

Prevent my phone from being awake while charging

Hello everyone,
I have used so many times the XDA forums to find some answers and I have found mostly all the answers I needed on other threads. But for once, I might have a more complicated problem to submit to the experts on this forum.
My use case is to create the lightest app that can do a job (namely taking a picture) on a regular interval of time and consume the least battery possible to be able to run for the most time without external power source (that is to say, the phone plugged in a wall outlet).
From what I experienced so far, I managed to have my application run for about 10 straight days doing the job every 10 minutes on a rooted Moto G5 phone. To achieve this, I force the phone to go in Doze mode at the beggining, by calling :
Code:
dumpsys deviceidle force-idle
Doing that, I schedule my jobs using the AlarmManager with the "setExactAndAllowWhileIdle" method thus respecting the super-9 minutes window my alarms should respect in order to be triggered correctly while the phone gets in deep sleep (following the official documentation).
For the moment, this is working as expected, because when I make a bugreport and import it into the Battery Historian tool, I can see that the phone is awake only when my job is running (for around 1 minute) and all the rest of the time, the device is sleeping and even better when I look in logcat, the phone suspends the CPU's for most of the time, which is great to consume less battery when not needed.
Now comes my problem, in order to make the app run for a longer period of time without having a wall outlet nearby, AND without touching the phone, I want to extend my battery life by using an external power bank plugged into my phone. My problem is that I cannot manage to make the phone not be awake while charging the phone. I guess that the phone is keeping some kind of wakelock when charging, so the USB connection keeps the phone awake and make my phone consume 3x more than when it goes in deep sleep, suspending the CPUs and is not awake. I tried to put some flags in a lot of files in order to trick the phone to think nothing is connected to the USB port but it didn't work. I tried those files:
Code:
"echo 0 > /sys/class/power_supply/battery/charging_enabled"
"echo 0 > /sys/devices/virtual/android_usb/android0/enable"
"echo 0 > /sys/class/power_supply/usb/present"
"echo 0 > /sys/class/power_supply/usb/ch_present"
"echo 0 > /sys/class/power_supply/usb/online"
"echo 0 > /sys/class/android_usb/android0/enable"
"echo 0 > /sys/class/android_usb/android0/remote_wakeup"
The only thing that stops the charge is when I put a 0 in the following file:
Code:
"echo 0 > /sys/class/power_supply/battery/charging_enabled"
It effectively stops the charge but the CPUs are still in an "awake" state, meaning there is probably still a wakelock being kept.
Do you have any idea how can I do, only using software, other than what I tried to stop the phone from being awake while having a charger plugged in (even if not charging) ?
Thanks a lot in advance for your answers.
Hi,
I am Aurelien, a colleague of Rafouuuuuu. Some precisions:
We use a "always-on" battery.
Phone awake = cpu is not stopped.
According to the historian report, the wakeup reason is "unknown".
These lines:
Code:
"echo 0 > /sys/class/power_supply/usb/present"
"echo 0 > /sys/class/power_supply/usb/ch_present"
"echo 0 > /sys/class/power_supply/usb/online"
"echo 0 > /sys/class/android_usb/android0/enable"
disable usb connection and charge but the cpu is always on.
We try to stop adbd service (if adbd get a wakelock if usb plugged)
We try to disable developer option.

[Guide]Using the Advanced Charging Controller (ACC) Magisk Module with Pixel 3a XL

While I've had many Android phones, this is the first phone that I decided to use a battery charging controller to regulate how my battery is charged. I just wanted to share my journey with others and encourage others to try this out if you are not already.
Although there are several different battery charging controllers out there (and more than one named "ACC" which makes it even more confusing) I decided to use the Advanced Charging Controller module developed by VR25. I choose this module because I felt it provided the most customization.
Step 1 - Installation
Installing the module is easy. It is listed in the Magisk repository. Simply browse the available modules and find the one titled, "Advanced Charging Controller (acc) created by VR25 @ XDA-developers". There are several ACC modules, so make sure you install the one by VR25 to follow this thread.
Magisk will flash the module and start it automatically. You don't even need to reboot, although it is the only way to clear the Magisk notification that the module will be started at the next reboot.
Step 2 - Changing the Charging Switch Setting
I found that the default charging switch setting (auto) does not work reliably with our phones. Therefore I would suggest changing it using the commands below. Personally I have choose option 2 (battery/charge_disable 0 1) but I listed all the options with the quirks that I have found with each one.
Step 2.1 - open your preferred command line app - I use Terminal Emulator.
Step 2.2 - type "su" and hit enter to gain root
Step 2.3 - type "acc -s s" and hit enter - this is the command that allows us to select another charging switch
Step 2.4 - type what number of the charging switch you want to use.
Here are the available charging switches and the issues I have found with them:
1) Automatic - this switch tries to cycle through the available switches until if find one that "works".
- Passes the ACC switch test (type "acc -t"): Yes
- Charges and discharges according to the cooldownratio: No - I found that the phone would charge anytime it was plugged in and below the Pause threshold. It did not seem to wait until the battery level was below the Resume threshold.
- Works with battery idle mode (the phone will pull power from the AC power and not the battery when the battery reaches the Pause threshold): Yes
- Begins charging when phone reaches Resume threshold: Yes
- Charging "chime" and battery icons correctly reflect if the phone is charging or discharging: ???
- Suffers from wakelock issues when phone is plugged in but not charging: It does have a "overheat_mitigation" wakelock when on the battery idle mode, but because the phone is not using the battery power, it doesn't effect battery life and therefore I don't concern myself with this issue.
- Other issues:​
2) battery/charge_disable 0 1 :
- Passes the ACC switch test (type "acc -t"): Yes
- Charges and discharges according to the cooldownratio: Yes
- Works with battery idle mode (the phone will pull power from the AC power and not the battery when the battery reaches the Pause threshold): Yes
- Begins charging when phone reaches Resume threshold: Yes
- Charging "chime" and battery icons correctly reflect if the phone is charging or discharging: ???
- Suffers from wakelock issues when phone is plugged in but not charging: It does have a "overheat_mitigation" wakelock when on the battery idle mode, but because the phone is not using the battery power, it doesn't effect battery life and therefore I don't concern myself with this issue.
- Other issues:​3) battery/input_suspend 0 1:
- Passes the ACC switch test (type "acc -t"): Yes
- Charges and discharges according to the cooldownratio: Yes
- Works with battery idle mode (the phone will pull power from the AC power and not the battery when the battery reaches the Pause threshold): No - phone begins discharging from battery when Pause threshold is reached but the phone is still plugged in
- Begins charging when phone reaches Resume threshold: Yes
- Charging "chime" and battery icons correctly reflect if the phone is charging or discharging: No - may show charging icon when phone is really discharging, especially during cooldownratio times and the chime doesn't always ring when charging resumes.
- Suffers from wakelock issues when phone is plugged in but not charging: No
- Other issues: The phone seems to follow the cooldown charge/discharge times even before reaching the cooldown threshold. I find the phone pausing for 10 seconds (my cool down ratio) when the batter level might be a 50% - long before the 60% cooldown threshold I have set in the config file.​4) dc/input_suspend 0 1:
- Passes the ACC switch test (type "acc -t"): NO, so this switch doesn't work with ACC
- Charges and discharges according to the cooldownratio:
- Starts discharging when the phone reaches the Pause threshold:
- Begins charging when phone reaches Resume threshold:
- Charging "chime" and battery icons correctly reflect if the phone is charging or discharging:
- Suffers from wakelock issues when phone is plugged in but not charging:
- Other issues:​5) battery/charge_control_limit 0 1:
- Passes the ACC switch test (type "acc -t"): NO, so this switch doesn't work with ACC
- Charges and discharges according to the cooldownratio:
- Starts discharging when the phone reaches the Pause threshold:
- Begins charging when phone reaches Resume threshold:
- Charging "chime" and battery icons correctly reflect if the phone is charging or discharging:
- Suffers from wakelock issues when phone is plugged in but not charging:
- Other issues:​
Step 3 - Configuration
You can configure the ACC controller using a couple of different methods. You can do everything using command lines, you can use the beta ACC app (see note below), or you can edit a config file that ACC creates when it is installed. Personally I found that editing the config file was the quickest and easiest method to make general changes.
The ACC config file is found at /storage/emulated/0/acc The file is named "config.txt" You can open the file with a text editor. I personally use the app Root Explorer. I long click on the file name, and then press the three dot button in the upper right hand corner. Choose "Open in Text Editor" and the config file will open and allow changes to be made. Saving the file will automatically push the changes to ACC, you do not need to reboot or restart the ACC daemon for changes to take effect.
I won't go into a lot of detail about all of the different configuration options here as the developer's xda thread is the best place to get that type of information. But I will talk about the most basic setting - the "capacity" setting. It is the second setting listed in the config file and it should look something like "capacity=0, 60, 70-80". Here is a break down of what those numbers mean:
- The First Number (0): is battery level were the phone will shut off. The default setting of 0 means the phone will turn off when the battery level hits 0. Personally I don't want my battery completely draining, so I have it set at 5.
- The Second Number (60): is the battery level where the module starts it's "cool down" functionality. Cool down (listed as coolDownRatio in the config file) is where the phone will stop charging briefly and then restart charging. The default "cool down" setting is coolDownRatio=50/10 which means the phone will charge for 50 seconds, and then stop charging for 10 seconds before charging again for 50 seconds, etc, etc, etc. This is designed to keep the battery temps low. A battery with a charge level less than this number (60 in this example) will charge without pausing, but when the battery level gets to this number or above, the phone will charge and pause based on the coolDownRatio.
- The Third Number (70): is the "resume" value. If the phone's battery level is below this resume value, the phone will charge. If the battery level is at or above this resume value, the phone will not charge even while plugged in.
- The Fourth Number (80): is the "pause" value. This is the battery level where the phone will stop charging and should not charge above this value.​
The default settings are set this way because research has shown that a phone's battery will last the longest with the least amount of battery capacity loss if it is charged to a max of 80% of the battery's capacity, and allowed to discharge just a small amount (10%) before being charged again. I realize this goes against the old "wives tale" that our phone's batteries have a very limited number of charges and it is best to limit the number of charges by only charging the phone when it gets to a low level. This is not true in actual battery performance however and if you charge like this, you are actually decreasing your battery's life expectancy and performance.
Obviously the default settings may not be the best setting for you. The default settings are probably only practical for a device that is plugged in 100% of the time. Personally I have changed my capacity setting to capacity=5, 60, 70-90. This means my phone will turn off when the battery level reaches 5% (something it has never dropped to yet), it is charged to a max of 90% and will discharge to 70% before charging again, and the cooldown charging cycling starts when the battery is 60% or higher. Obviously I'm not on my charger all the time, so it is very common for my battery to drop below 70%. However, if the battery is below 70% and I have a charger at my disposal, I am going to charge the phone back to 90% rather than let it the battery levels continue to fall.
Final Notes and Misc Thoughts
There are lots of other options and commands you can use in ACC. Feel free to share any changes you like to make, or post if you are having problems getting the module to work as expected on the 3a. I hope this helps some people feel give the module a try.
There is an ACC app that is available now that allows you to control some of the settings from a nice GUI. I personally did not like using it as I found it would overwrite settings in the config file that I was not intending to be changed.
There is an ACC telegram group if you want to join and have direct communication with the developer and others.
Thanks to @jellopuddingstick for educating me on what the battery idle mode does and why it is beneficial to have it working!
sic0048 said:
I just wanted to share my journey with others and encourage others to try this out if you are not already.
Click to expand...
Click to collapse
Was doing the same research when this popped up -- great job!
Can you discuss more on what unintended settings were overwritten by the app....
Also, thoughts have seem to have standardized now to lop off 40% of usuable capacity by having the battery charge btw 20-80% to extend life, such as... "capacity=20, 60, 70-80".
How were the defaults for ACC set and why have you chosen otherwise?
duh1 said:
Was doing the same research when this popped up -- great job!
Can you discuss more on what unintended settings were overwritten by the app....
Also, thoughts have seem to have standardized now to lop off 40% of usuable capacity by having the battery charge btw 20-80% to extend life, such as... "capacity=20, 60, 70-80".
How were the defaults for ACC set and why have you chosen otherwise?
Click to expand...
Click to collapse
The app works by writing to the normal config file. But it also has three profiles loaded into memory automatically when you install it. This makes it very easy to press on one of the other profiles by accident and totally change your settings. I eventually deleted all the "extra" profiles, but the charging switch isn't changeable via the app either (it seems like it defaults to auto) so the app will overwrite that setting back to auto if you aren't paying attention.
In the long run I found that using the config file was extremely easy and I found myself having the check the config file anytime I used the app to make sure it wasn't changing unintended settings, so I decided to remove the app and just use the config file.
As far as capacity, I decided to run 5, 60, 70-90. I think it is a good compromise between having a decent amount of capacity available and also not charging the phone to 100% all the time. I could probably get away with a limit of 80 or 85, but ultimately decided on 90. I do try to charge my phone when it hits 70 or below if I have a charger available vs waiting to do a larger/longer single charge.
sic0048 said:
I do try to charge my phone when it hits 70 or below if I have a charger available vs waiting to do a larger/longer single charge.
Click to expand...
Click to collapse
Don't you think 70 is too high to begin charging just to bring it back to 90. Doesn't number of charge cycles kill battery life as much as heat and fast rate charging?
Any good apps you like that intuitively monitor battery health, besides just stats and charts, that does it like apple, as a percent of remaining chargeable capacity?
Btw OT question, looking to move over my wifi connections from the previous phone and can't find the wpa_supplicant.conf file in /data/misc/wifi in the 3a. No reference online mentions that it's been moved. Any idea where they're hiding it now? Thx...
duh1 said:
Don't you think 70 is too high to begin charging just to bring it back to 90. Doesn't number of charge cycles kill battery life as much as heat and fast rate charging?
Click to expand...
Click to collapse
According to this research (https://batteryuniversity.com/index.php/learn/article/how_to_prolong_lithium_based_batteries/), the more your battery discharges, the fewer discharge cycles it will survive before really negatively effecting battery performance. So discharging your phone just 10% might give you 6000 discharge cycles, while discharging your phone 60% might reduce these discharge cycles by 90%.
Obviously I have to rely on other people's research as there is no way I can adequately test this myself. But I do trust this research as accurate. I know with other phones I've had where I did not try to control the charging system I have had to replace the batteries with pretty regular occurrence. But I would leave the phone on the charger overnight (not a good thing for battery life) and try to discharge the battery a lot before charging it back again (also not a good thing for battery life). That's why I decided to finally look into using a charging controller like ACC with this new phone.
duh1 said:
Any good apps you like that intuitively monitor battery health, besides just stats and charts, that does it like apple, as a percent of remaining chargeable capacity?
Click to expand...
Click to collapse
I've been using the ExperimentalX helper app to track battery usage. (You don't need to use their kernel to use the helper app). I like it because it breaks the battery usage stats into two parts: when the screen is on, and when the screen is off, but it doesn't attempt to give a percent of remaining chargeable capacity. I'm not aware of an app that does that (although I too would be interested to know if such and app exists).
duh1 said:
Btw OT question, looking to move over my wifi connections from the previous phone and can't find the wpa_supplicant.conf file in /data/misc/wifi in the 3a. No reference online mentions that it's been moved. Any idea where they're hiding it now? Thx...
Click to expand...
Click to collapse
I think the info you are looking for is now stored at /data/misc/wifi/WifiConfigStore.xml.
As I use my phone more, I realize that none of the charging switches seem to work 100% of the time as expected. I'll continue to do trial and error tests, but please share if you find a switch that works consistently.
I've continued to edit my original post to provide as much information about the different charging switches and the issues I see with each one. Hopefully it is easy to understand.
I still find myself defaulting to the 3rd charging switch option and while it can act a little erratic sometimes, it does work normally most of the time.
Is it possible to disable/bypass the cool down period?
creeve4 said:
Is it possible to disable/bypass the cool down period?
Click to expand...
Click to collapse
The default setting is for it to be turned off I believe. Look in the config file for "coolDownRatio=" and see if it is blank. If it is not, you can remove everything after the equal sign.
Another way to do it is set the cooldown threshold number to be equal or higher than your "pause" threshold. So you might set this as "capacity=5, 100, 70-90". The 100 represents the value at which the cooldown process would start, which is higher than the pause threshold (at 90 in this example) and therefore would never kick in.
All this being said, I find that the #3 switch option seems to allow the cooldown pause/charge process to start below the set cooldown threshold. I have my cooldown threshold set at 60, yet find the phone pausing and charging at battery levels below this threshold. This should not be happening, but is something I can live with, so I haven't bothered to follow up with it.
After several more weeks of use, I've updated the initial post again. I found some quirks with the "automatic" charging switch, so I have gone back to selecting charging switch option 2 (battery/charge_disable 0 1).
Great job!
May I ask you whick kernel you are using for "battery idle mode" support? It should not be supported on stock kernel.
Thanks

Badly in Need of ACC / Smart Charging / Battery Charge Limit...

I tried so many way and failed to work smart charging on Latest Stock ROM. Did anyone able to work "Advanced Charging Controller (ACC)"?
I have used ACC for a while now. What problem are you facing?
I use the latest stock ROM with blu_spark kernel and the charging switch located at /sys/kernel/debug/google_charger/input_suspend
IntenseColor said:
I have used ACC for a while now. What problem are you facing?
I use the latest stock ROM with blu_spark kernel and the charging switch located at /sys/kernel/debug/google_charger/input_suspend
Click to expand...
Click to collapse
Can I use Battery Charge Limit App with "/sys/kernel/debug/google_charger/input_suspend,0,1"?
Why are you in badly need of "smart charging"?
Would also like an answer on this can't seem to get any of the acc settings to stick and it always charges past the % I set
In a terminal emulator on your phone run:
Code:
su
echo 80 > /sys/devices/platform/soc/soc:google,charger/charge_stop_level
This will make your phone stop charging at 80%. You can change the percentage by changing the number next to echo in the code above.
If you want to make this persistent, place the command as a script (a sample is attached) in
Code:
/data/adb/service.d
using a root browser. Note: you may need Magisk installed for this to work.
greatest125 said:
In a terminal emulator on your phone run:
Code:
su
echo 80 > /sys/devices/platform/soc/soc:google,charger/charge_stop_level
This will make your phone stop charging at 80%. You can change the percentage by changing the number next to echo in the code above.
If you want to make this persistent, place the command as a script (a sample is attached) in
Code:
/data/adb/service.d
using a root browser. Note: you may need Magisk installed for this to work.
Click to expand...
Click to collapse
How can i go back to default value after that?
Rafiul Bari Chowdhury said:
How can i go back to default value after that?
Click to expand...
Click to collapse
When you reboot, it automatically resets to the default value. This is why I run a script at boot.
You can also go back to the default value at any time by entering the following commands in a terminal emulator on your phone:
Code:
su
echo 100 > /sys/devices/platform/soc/soc:google,charger/charge_stop_level
greatest125 said:
When you reboot, it automatically resets to the default value. This is why I run a script at boot.
You can also go back to the default value at any time by entering the following commands in a terminal emulator on your phone:
Code:
su
echo 100 > /sys/devices/platform/soc/soc:google,charger/charge_stop_level
Click to expand...
Click to collapse
Thank you so so much. I have got everything.
greatest125 said:
In a terminal emulator on your phone run:
Code:
su
echo 80 > /sys/devices/platform/soc/soc:google,charger/charge_stop_level
This will make your phone stop charging at 80%. You can change the percentage by changing the number next to echo in the code above.
If you want to make this persistent, place the command as a script (a sample is attached) in
Code:
/data/adb/service.d
using a root browser. Note: you may need Magisk installed for this to work.
Click to expand...
Click to collapse
Well, either this script isn't working the way I thought it would or I did something wrong... but I think it's the former.
So I put that battery.sh script in /data/adb/service.d yesterday set the permissions & rebooted. I let the battery run down below 80% overnight and this morning I plugged it back in around 60%. Didn't charge at all, back didn't get warm & also didn't get the "Charging Rapidly" display on the always on display. Let it sit for at least an hour and it didn't charge a lick. Removed the script, rebooted, and voila charging again.
Obviously didn't do what it was supposed to... darn it
andyxo said:
Well, either this script isn't working the way I thought it would or I did something wrong... but I think it's the former.
So I put that battery.sh script in /data/adb/service.d yesterday set the permissions & rebooted. I let the battery run down below 80% overnight and this morning I plugged it back in around 60%. Didn't charge at all, back didn't get warm & also didn't get the "Charging Rapidly" display on the always on display. Let it sit for at least an hour and it didn't charge a lick. Removed the script, rebooted, and voila charging again.
Obviously didn't do what it was supposed to... darn it
Click to expand...
Click to collapse
Interesting... you have Magisk installed and you are trying this on a Google Pixel 4a? If so, a reason why this might not be working could be a permission issue. Using your root browser of choice, navigate to /data/adb/service.d and change the permissions of the script to 744. Please see the attached screenshot for more details (I use this root browser). After changing the permissions, drain your battery and try again. \
Hope this helps!
andyxo said:
Well, either this script isn't working the way I thought it would or I did something wrong... but I think it's the former.
So I put that battery.sh script in /data/adb/service.d yesterday set the permissions & rebooted. I let the battery run down below 80% overnight and this morning I plugged it back in around 60%. Didn't charge at all, back didn't get warm & also didn't get the "Charging Rapidly" display on the always on display. Let it sit for at least an hour and it didn't charge a lick. Removed the script, rebooted, and voila charging again.
Obviously didn't do what it was supposed to... darn it
Click to expand...
Click to collapse
It worked perfectly for me.
greatest125 said:
Interesting... you have Magisk installed and you are trying this on a Google Pixel 4a? If so, a reason why this might not be working could be a permission issue. Using your root browser of choice, navigate to /data/adb/service.d and change the permissions of the script to 744. Please see the attached screenshot for more details (I use this root browser). After changing the permissions, drain your battery and try again. \
Hope this helps!
Click to expand...
Click to collapse
Thanks kindly for your very detailed instructions post... indeed it seems to have been a permissions issue as previously I had all the squares checked off, not just the five in your screenshot. It has been working fine the past two days so hopefully I got it squared away now
Just curious to know though if it's normal (with this added .sh file) that with the phone still plugged in that the "Always On" Display says "80% - Charging rapidly" even though the charging has stopped at 80%?
And once the charging has stopped at 80% I am assuming that it's okay to just leave it plugged in for a while before heading out as the phone has stopped charging. Reason being, I don't want to hover over the phone thinking oh jeez, it's hit 80% now so I gotta unplug it right away to prevent battery damage. Cheers
andyxo said:
Thanks kindly for your very detailed instructions post... indeed it seems to have been a permissions issue as previously I had all the squares checked off, not just the five in your screenshot. It has been working fine the past two days so hopefully I got it squared away now
Just curious to know though if it's normal (with this added .sh file) that with the phone still plugged in that the "Always On" Display says "80% - Charging rapidly" even though the charging has stopped at 80%?
And once the charging has stopped at 80% I am assuming that it's okay to just leave it plugged in for a while before heading out as the phone has stopped charging. Reason being, I don't want to hover over the phone thinking oh jeez, it's hit 80% now so I gotta unplug it right away to prevent battery damage. Cheers
Click to expand...
Click to collapse
I honestly have no idea. I assume when it hits 80, the battery stops accepting charge although the "Rapidly Charging" label continues to be shown. Anyone have an idea why?

Categories

Resources