yashsingh1/xdaforums huggingface dataset:
[Magisk] saikoz:
Hi VR25,

Currently using the latest beta and my device is mi 8,

do i need to set specific command or i can just run the default settings?
[Magisk] paolocorpo:
Dear [MENTION=5228676]VR25[/MENTION]

I installed this last beta version

No issue with a charging over night using AC charger

I got max capacity (85 in my case)

I will test in my car soon

Ciao

Paolo

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] davidzam:
The commands for configuration are the same in this latest version of the beta?

Enviado desde mi SM-G550T1 mediante Tapatalk
[Magisk] Da-BOSS:
I would like to report a success with beta 2018.11.22 :victory: it is working wonderfully and I tested it for 2 days to be sure that is working ;) sorry if it took some time to report.. I was busy recently on my life :D but anyway.. there is just very very small thing... it will light up the screen when the cool down mechanism activates.. so I fixed it by downloading SnooZy Charger and it works perfect! keeps the screen turned off even if I physically unplugged the charger or plugging it.. it will keep your screen turn off ;)

Thank you BOSS! :fingers-crossed::highfive:

Anyway.. I am testing the new beta which is 2018.11.23 right now :)
[Magisk] paolocorpo:
Thanks la a lot for your workaround about the opened light screen during cooldown phase

It was really annoying overnight

Well done
[Magisk] VR25:
Yesterday, my connection went bad. :p

Changing settings is always optional. MCS is set to work out of the box.

Sometimes, updates will reset config.txt. In such cases, if your config had been customized, you have to edit it again. Otherwise, MCS works with default settings.

[MENTION=5056724]paolocorpo[/MENTION], keep the great reports coming.

Thanks :cool:

Yes, the commands are the same. Whenever the config format changes, I let everyone know. You don't have to worry about that every time an update is available. ;)

Nice! :D

The "screen lighting up on coolDown" behavior is another device-specific issue. My phone doesn't behave that way.

Perhaps changing the charging switch (mcs -s s) solves it.

Thanks for the report and app suggestion. I'll add a note to the documentation for the latter. :)

___

**2018.11.24-beta (201811240)**

- Daemon management syntax is now <mcs -D/--daemon [start/stop/restart]>.

- Enable/disable charging on demand (<mcs -e/--enable>, <mcs -d/--disable>) -- time and battery capacity conditions are supported (i.e., <mcs -d/--disable 80%>, <mcs -e/--enable #s/m/h>). A Chain of commands is also fine (i.e., <mcs -e 1h && mcs -d 120s && mcs -e 3m && mcs -e 80%>).

- General fixes & optimizations

- Minor cosmetic changes

- Updated documentation

Notes/tips

- If $switch is empty (config.txt), MCS daemon automatically evaluates available charging switches and sets working parameters.

- <mcs -s s> lists available charging switches and allows users to pick one.

- <mcs -s s [path] [onValue] [onValue]> sets custom charging switch parameters.

- config.txt will be overwritten.
[Magisk] paolocorpo:
Dear,

After the installation of that Apk I fixwd the problem of opened screen but I faced a small issue

My status bar disappears and I need to swipe from top edge to see it

Do you have same problem ?

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] Da-BOSS:
I don't have this problem at all... :confused: that's weird..:rolleyes:

Have you tried to hide the SnooZy charger notification? Maybe this will fix your issues :)
[Magisk] paolocorpo:
I tried to uninstall Snoozy charger but I have not fixed

It is not responsible ;)

I have to investigate more and in other side

[EDIT]

Probably the issue is related to AA_mirror apk ... I have to check more deeply but 95% It is the root cause

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] paolocorpo:
Dear [MENTION=5228676]VR25[/MENTION]

you have forgotten to update the title of this thread ... ;)

Ciao

P
[Magisk] paolocorpo:
Dear [MENTION=5228676]VR25[/MENTION],

no issue at all with your last beta using AC and USB charger

Well done :)
[Magisk] J4jks:
I set 8090 and put changing when going to bed, in morning when I see the battery is at 100%charged.

Tried to take log with MCs -l but struck as shown in screenshot, available logs attached.

Moto g 2014, magisk 17.3+ systemless xposed.

Thanks
[Magisk] VR25:
Thanks :D

If you want to save the most recent log to another file, run mcs -l cat >file, where "file" can be something like /sdcard/mcs.log. The generic syntax is mcs -l <editor [opts]>. If you omit <editor [opts]>, vim/vi is used.

Now, to the actual issue...

The log doesn't have 100% registered anywhere. In fact, the max capacity I saw was 33%.

Have you tried manually enabling and disabling charging with mcs -e and mcs -d, respectively?

What about another test in automatic mode?

Note: after running mcs -e/-d, you have to start the daemon (mcs -D start). It is automatically stopped to prevent interference.

Thanks
[Magisk] Da-BOSS:
I wanted to report that latest beta 2018.11.24 it is working wonderfully on my Note 9 :) no issues here ;):fingers-crossed:
[Magisk] dragoi90:
Hey VR25

I have a problem on my OP6.

The module installs on data/media/0/ not on data/media

If i copy the mcs folder on data/media the module works wonderfuly but after a reboot the folder goes back to data/media/0

Thank you for the great work
[Magisk] Lithesis:
[MENTION=5228676]VR25[/MENTION]

When flashing from Magisk it fails because it cannot mount magisk_merge.img. Installation log says it cannot find make_ext4. Poco F1 on LOS16 (pie).
[Magisk] jordiz86:
Galaxy s8+ F model. With 13/11 beta, in the morning I had the phone discharging from 100 (I set 90-100),and with the cable plugged in it was like I have unplugged, showing discharging from XX hours. With 24/11 beta it show the graphic at 100% but with usage of entire day before, without resetting. When I unplug the cable it reset. Is this normal or not? Thanks! :)

Screenshot attached. It show 11.30 a.m. But the charging finished about at 6/7 a.m. :)
[Magisk] b886b:
[MENTION=5228676]VR25[/MENTION] just tried the latest beta, it seems to have cause my device to charge for a while and then disconnect and then recharge again with the default charging switch, tried to change charging switch but changing that causes charging to 100 percent even if I set the limit to 80. Haven't find any solution yet, for now I would like to ask if I continue to use the default charging switch, will it has any negative impact on my battery and the phone?
[Magisk] VR25:
I'm afraid your system itself is moving the mcs folder to /data/media/0/.

Try the following:

1) Keep that folder in /data/media/0/.

2) Run su -c ln -s /data/media/0/mcs /data/media/.

3) Test and report.

Thanks

Either install the latest beta from post #3 (recommended) or try installing the latest stable from TWRP. Generally, Pie systems lack make_ext4 and resize2fs binaries. TWRP has both and mcs beta versions don't depend on these.

Some weirdness going on...

Please compress the whole /data/media/mcs/ folder and upload. The higher the compression ratio, the better (limited data plan).

Thanks

I believe that's the cool down algorithm in action. The purpose of this is reducing temperature and voltage induced stress. By default it kicks in when battery capacity >= coolDown capacity (default 60%) or temperature is between coolDown and max (40°C =< temp < 45°C). The default charge/pause ratio is 50/10 seconds.

This extends battery lifespan even more. In certain cases, its effect alone is more beneficial to the battery than simply halting charging at max capacity%.

If you came across the screen lighting up side effect, try the app suggested by Da-BOSS.
[Magisk] b886b:
Thanks for the detailed answer:good:, [MENTION=5228676]VR25[/MENTION] I checked and can confirm that it is the cool down mechanism kicks in, but one thing I noticed is that after 1 0 second pause the ampere ramps up very quickly.... On my device normally it charges with 1500ma but after pausing for 10 seconds it shows 3900 ma..... Is this a bug or do I need to worry about damaging my device？
[Magisk] VR25:
You're welcome. The rapid increase in charging current is a reading error -- nothing to worry about.
[Magisk] jordiz86:
2 days ago it worked as usual (wake up and the phone was discharging), today like my post, 100% until I disconnected the cable manually... It's weird... ? ? Uploaded the folder :)
[Magisk] VR25:
Hmm, interesting... ?

Before giving you the solution, though... you have to properly feed my curiosity in regards to the following:

You said... previously, battery was discharging after max capacity (as you expected). Now, its state is reported as "charging" non-stop... :rolleyes:

Did I get that right?

Also, does battery capacity drop below 100% right after unplugging (as if it were masked or frozen when plugged in) or does it stay the same (100%) for a while (suggesting it was actually kept at 100% for a long time)?
[Magisk] jordiz86:
It remain 100% for a while (depends if I use it or keep it on the table :D), so it's charged for sure! And yes, when I wrote my post it remains charged (without resetting graphic) until I unplugged the cable, yesterday morning I found it discharging (93% after about 8 hours) and graphic resetted when the phone reached 100%, this morning like other time again, 100% until I unplugged the cable... Ps:sorry for my English, I hope you understood what I mean ??
[Magisk] VR25:
Samsung and its eye-catching ingenuity... :D

Run mcs -s s, pick option 2 ("store_mode") and see how charging control goes.

Thanks
[Magisk] Da-BOSS:
Couldn't agree more..... :D:cowboy::cool::highfive::fingers-crossed:
[Magisk] jordiz86:
Done! (I had just to write 2 and enter right? :D)

Will report tomorrow! But I didn't understand, what you mean with eye-catching ingenuity? Like was a cosmetic issue? It didn't seem so... Anyway thanks for your work, very appreciated mate!! ✌?✌?
[Magisk] jordiz86:
This morning it worked right! Waked up and the phone was discharging. Will report in next days if it remain like this :)
[Magisk] Macusercom:
Running OxygenOS 9.0.2 on my OnePlus 6 and made a symbolic link at /data/media/ like you suggested. However, my device still charges to 100 percent over night while it appears to work over the day as it properly cuts of the charging at a certain percentage.

I've attached the mcs folder. Using the latest stable build from the Magisk repo.

Any help is appreciated. Love your module :)
[Magisk] mv0hra:
[MENTION=5228676]VR25[/MENTION], Is there an option for the phone to switch off when it reaches a certain percentage?
[Magisk] onliner:
No, but doing that, you can't control the % charge limit, so: limit reached, shutdown, charging again until 100%.
[Magisk] mv0hra:
I don't think I was clear on what I want to achieve.

Basically when the phone is not connected to the charger I do not want the battery to reach 0%. So when using the phone I would like the phone to switch off if battery level reaches 5% rather than 0%.

This is possible with another similar module however I have some other issue with that.
[Magisk] jordiz86:
By default, MCS is set to 5% for this ;) you can change from configuration file, first number on the line where you set cooldolwn and min/max capacity :)

[MENTION=5228676]VR25[/MENTION] update: today it worked "weird" as last time... Until I disconnect the cable, it remain charged with graphic of yesterday... See image.
[Magisk] jordiz86:
After a reboot with cable plugged in.. ?? Never seen...
[Magisk] TKork:
I'm using this on my moto g4 plus with lineageos 14.1 and exkernal. And it works like described.

But when the phone stops charging it still thinks its connected to a power source and keeps all battery saving measures off. So the battery drains at a massively increased rate until I disconnect the phone from the charger (Marked in red in the attached file).

Is it somehow possible to make the phone save power while its connected to a power source?
[Magisk] jordiz86:
One more thing.. I don't know if it's related.. But sometimes (after I've installed this module), many apps force close without using them. I mean, I'm on the home or in one app "x", and then many pop-ups appear, continuously, with a lot of apps (system and not) fc, and I have to reboot to stop them! And after a reboot sometimes wifi doesn't work, if I toggle on it keeping turn off, like wifi module was broke.. Reboot one or two time and it work again.. I think it's hard that is caused by MCS, but just to let you know... Anyway will do a clean install of the rom in these days and try again! :)
[Magisk] J4jks:
Today charging doesn't stop at set value.
[Magisk] mv0hra:
[MENTION=5228676]VR25[/MENTION], I think this has happened to me today.

I have 2 identical Oneplus 6,with the same ROM and kernel.

I installed and configured this module, on both, with success.

This worked on one device perfectly however the other one had its battery drained.

I removed the module and tried to reinstall it however it no longer installs. I have attached the log file.

EDIT: I have been able to install it via TWRP, but not via Magisk. My only issue now is if it will drain the battery.
[Magisk] paolocorpo:
Dear [MENTION=5228676]VR25[/MENTION]

Today morning after the night when the device was plugged to AC charger, I founded it at 87% so it means with 2 % more than my target

Is it a cosmetic issue or is it necessary to go deeply ?

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] Taracair:
Anyone knows how to make a working widget with certain command? I'm using Terminal Emulator but it doesn't work. When I use the widget with commands the window pop up with 3 empty lines.

I'd like to have a widget with 'su && cs - 99' command.
[Magisk] VR25:
A new version is up

- Nexus & Honor/Huawei users, please report whether it works.

[MENTION=4252833]Taracair[/MENTION], try Script Manager. Att., it's "cs 99" (no hyphen). I have a question for you -- why would you want charging to stop at 99%? That's roughly the same as doing nothing! You want your battery level between 40-60% - best, 20-80% - average, 10-90% - fair. ;)
[Magisk] flamingwolf6529:
I have it working with the argument "su -c" followed by cs; i.e.

su -c cs 99

Note that you have to locate full path to the "su"; i.e. in my device I point it to

/system/bin/sh/su

and the argument

su -c cs 99
[Magisk] CyberZeus1977:
Now different issue on Nexus 4

mako:/ $ su

mako:/ # cs -i

Battery Info

/system/xbin/cs[281]: cat: /sys/module/pm8921_charger/parameters/uevent: No such file or directory

mako:/ #

I checked. That file doesn't exist

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Magisk] Taracair:
Because when it reaches 99 the terminal emulator wants me to hit enter to continue. I don't hit enter because I'm sleeping at that time. Then when I wake up the battery is around 98% and ready for the whole day. No overcharging during the night.

Is that a bad idea?
[Magisk] deepak549:
Great module .. work like a charm .

But it is very painful to start terminal for every time you charge your phone. Probably a user interface will be much better.

Between excellent application . Cheers.
[Magisk] ChelseaFan257:
Hi there.

I've been trying to get your module working on my S7 Edge (Exynos) running Batman ROM, but it remains "unsupported". I've attached the debug files as directed.

I've been looking for something to control my charging cycles for a while now, big thanks!
[Magisk] VR25:
That file is somewhere else then. Could you upload the debugging data?

I see...

You're good then.

However, I suggest you limit your charging to a lower value (at least 90%) and recharge right after battery level drops below 11% to extend its lifespan. :)

I'm working on a Tasker project to automate the process. You don't even need a user interface. Simply import the XML file and forget. How does that sound?

You're welcome. Thanks for the debugging data.
[Magisk] CyberZeus1977:
Here they are... http://cloud.tapatalk.com/s/59e4c49d3549c/cs_debug.log

http://cloud.tapatalk.com/s/59e4c4a68be09/cs_debug.zip

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Magisk] VR25:
# v2017.10.16-3 (201710163)

- More accurate Tasker integration.

# v2017.10.16-2 (201710162)

- Fixed minor Tasker XML generation error (faulty cs second % value).

# v2017.10.16-1 (201710161)

- Additional devices support

- Auto-generate a Tasker project XML file for automation every time a `cs %` or `cs % %` command is executed. Note: The user has to disable "Beginner Mode" in Tasker settings, then import the project "cs_tasker".

- Fixed Nexus 4 (mako) "uevent not found".
[Magisk] CyberZeus1977:
Sorry to report at every release...

mako:/ $ su

mako:/ # cs -i

Battery Info

/system/xbin/cs[284]: cat: /sys/devices/platform/msm_ssbi.0/pm8921-core/pm8921-charger/power_supply/battery: Is a directory

mako:/ #

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Magisk] VR25:
Hopefully it's fixed now. Lol

The project moves forward that fast thanks to these reports! :)
[Magisk] CyberZeus1977:
Now it seems working. [emoji1]

I will tell you tomorrow cuz I'm going to test it this night [emoji6]

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Magisk] Sreekantt:
Updated bro.... We've made some real progress here without old errors but sadly, it doesn't stop charging... Tried multiple times. Attached ss & log files.. Btw is tasker mandatory for this mod to work?? ?
[Magisk] guest4711:
Thanks the developers and all supporters for this fine module.

Unfortunately the last update does not work for my tab2 (espressowifi), where I cannot simply replace a failed battery...

cs_debug.zip + cs_debug.log attached.
[Magisk] AlexBurnout77:
Hi, sir. Thanks for this excellent module. Is adding a graphical UI in your plans?
[Magisk] locuturus:
I tried the update and the result changed but still said unsupported device. In case it helps here are the new debug files.
[Magisk] CyberZeus1977:
I confirm it works on Mako. Thanks for your excellent work!

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Magisk] markpanget1:
Unsupported device :(

Alcatel flash plus 2

How to upload files here?
[Magisk] alextytan:
morning. these are from a leecco 1s x500.
[Magisk] mv0hra:
Same here [MENTION=5228676]VR25[/MENTION]. Yesterday it was fine however today the phone charged to 100% even though it is set to 80%,.

I noticed that the 'mcs' folder had disappeared from data\media
[Magisk] 912180343:
：困惑：can it use in Pie?
[Magisk] RMarques:
The 07/24th version of it is working ok on my OP5 along with the latest Hydrogen OS
[Magisk] VR25:
If your battery capacity can increase by 2% within 50 seconds of charging time, then yes.

I'll see whether this can be optimized further.

Meanwhile, try <mcs --set coolDown 30/4>.

Thanks

Some users on the Battery Charging Limit thread are reporting the same inconsistent charging limiting behavior. Try setting a different charging switch. Run <mcs -s s>. The first on the list is the default. Pick the second.

As for the folder issue... your system is also to blame. Check whether that folder is moved to /data/media/0. Perhaps I should tell mcs to look for it there as well.

You can try creating a symbolic link to /data/media/0/mcs is the path exists -- <ln -s /data/media/0/mcs /data/media/>.

Thanks
[Magisk] mv0hra:
You are right, there is a folder in /data/media/0.

As for creating a symbolic link, do I add this to the config.txt?
[Magisk] VR25:
No, don't add it. That's just a command for you to run (only once).
[Magisk] mv0hra:
OK, I did

su

ln -s /data/media/0/mcs /data/media/

I then get

ln: cannot create symbolic link from '/data/media/0/mcs' to '/data/media//mcs': File exists

As for using <mcs - s s> I do not get an option to select the second one
[Magisk] paolocorpo:
Thanks [MENTION=5228676]VR25[/MENTION]

No I don't think that my battery has this capability

It occurred once and so for now I leave all as currently set

I will see

Paolo

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] VR25:
There's only one switch available then, like on my harpia.

I forgot to mention that you must remove the newly created folder (/data/media/mcs) before executing ln.

___

Everyone (especially Pie users), please use the latest beta over the stable.

As you may have noticed by now, the beta branch is not being updated as frequently. In the current context, that's a sign of stability.
[Magisk] mv0hra:
I installed the latest beta version and I now do get 2 options with <mcs -s s>

I tried to set my own values but get the following

:/ $ su

:/ # mcs 80 76

MCS Utilities

Copyright (C) 2018, VR25 @ xda-developers

License: GPL V3+

Version: 2018.11.24-beta

Usage: mcs <options> <args>

-c/--config <editor [opts]> Edit config w/ <editor [opts]> (default: vim/vi)

-d/--disable <#%, #s, #m or #h (optional)> Disable charging or disable charging with <condition>

-D/--daemon <start/stop/restart> Manage daemon state

<no args> Show current state

-e/--enable <#%, #s, #m or #h (optional)> Enable charging or enable charging with <condition>

-i/--info Show power supply info

-l/--log <editor [opts]> Open <mcs-daemon-deviceName.log> w/ <editor [opts]> (default: vim/vi)

-r/--readme Open <README.md> w/ <editor [opts]> (default: vim/vi)

-s/--set <var> <value(s)> Set config parameters

-s/--set <resume-stop preset> Can be 4041/endurance+, 5960/endurance, 7080/default, 8090/lite 9095/travel

<s/switch> Pick a charging switch from a list

<no args> Show current config

:/ # mcs -s s

(i) Available charging switches

- Pick one

1) ./battery/charging_enabled 1 0

2) ./battery/input_suspend 0 1

#? 2
[Magisk] RMarques:
Edit:

It seems they everything is ok with the installation. However, I have it set to 80% 95% but it just doesn't work at all. It just charges my cellphone normally.
[Magisk] arifsukmaraga:
Can i setting reset battery stat after unplug charger, how?
[Magisk] paolocorpo:
+1 here

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] marsian0:
Can anybody tell me if this behaviour is healthy for battery life:

Because my battery capacity is big and my usage is not so heavy, i use to maintain my battery between 35 and 70% on average.

Will this help to prolong my battery lifespan or can have adverse effects?

TIA
[Magisk] onliner:
Your habit is very good for the health of your battery :fingers-crossed:.
[Magisk] javieracdc:
Might you explain about those 3 switch charging in mcs -s s options?

Enviado desde mi Redmi Note 5 mediante Tapatalk
[Magisk] mv0hra:
How do I set my own values in the latest beta version?
[Magisk] paolocorpo:
Open config.txt into root/data/media/mcs folder and edit it
[Magisk] mv0hra:
Thanks for that. So do I change the following if I would like it to charge upto 80% and then charge when below 75%?

capacity=5,60,75-80

The path was actually root/data/media/mcs
[Magisk] paolocorpo:
Correct

And sorry ... The path was wrong

You are right

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] :
Latest beta running fine without any issues on Oneplus 3T with NOS Pie for more then a week ?
[Magisk] mv0hra:
Unfortunately the latest beta version is not working for my Oneplus6. It seems rather erratic, from charging over the upper limit or continue to discharge even though connected to the charger.
[Magisk] paolocorpo:
I suggest to you to provide to VR25 here the log that you find into the same folder path
[Magisk] mv0hra:
[MENTION=5228676]VR25[/MENTION], the latest beta version does not seem to be working for me properly. It will either charge above the limit or continue to discharge even if connected to the charger.

Also the mcs folder does not get created in root/data/media. I created a link to the folder it creates on the internal memory.

I have attached the log file.
[Magisk] Da-BOSS:
Just wanted to say that it is been over 2 weeks on my Note 9 on the latest beta and everything is working correctly and as intended ;) it never failed me :)

I wish or I hope that it will still works wonderfully when the PIE update comes for my Note 9 :)

Thank you Boss! [MENTION=5228676]VR25[/MENTION]
[Magisk] itchydroid:
Just a heads up that the installer is broken with the new Magisk 18 released earlier today. There were some changes to path references so they need to be updated perhaps.
[Magisk] paolocorpo:
Thanks

I have not updated yet

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] :
<Wrong topic; can be deleted>