yashsingh1/xdaforums huggingface dataset:
[Magisk] Sreekantt:
don't mine my data :p lol

btw...i tested it to stop charging at specific percent...doesn't work bro...may b it gets fixed in coming updates :fingers-crossed:
[Magisk] VR25:
Have you tried v2017.10.15-1 yet?

If so, copy the attached file to the root of your SD card (internal storage) and try running cs again.
[Magisk] CyberZeus1977:
Same results on Mako with the latest version:

mako:/ $ su

mako:/ # cs -i

/system/xbin/cs[282]: s=/sys/module/pm8921_charger/parameters/disabled: not found

/system/xbin/cs: /sdcard/cs_ctrl.txt[2]: s=/sys/module/pm8921_charger/parameters/disabled: not found

(!) cs: The specified control file doesn't exist

1|mako:/ #

Hope this helps you solving it

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Magisk] Sreekantt:
Yes bro... On latest update

Screenshots attached - 1st & 2nd pic is without d text file u mentioned

3rd pic - with text file in root of sd card
[Magisk] CyberZeus1977:
Fyi, I made this script

#!/system/bin/sh

cat /sys/module/pm8921_charger/parameters/disabled

And it shows 0

Don't know what is wrong with yours

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Magisk] VR25:
[MENTION=1513326]CyberZeus1977[/MENTION], [MENTION=7388797]guanto96[/MENTION], [MENTION=7042702]sreekantt[/MENTION], what about build 201710152 (pushed just now)?
[Magisk] CyberZeus1977:
mako:/ $ su

mako:/ # cs -i

cut: expected a list of bytes, characters, or fields

cut: expected a list of bytes, characters, or fields

(!) cs: The specified control file doesn't exist

1|mako:/ #

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Magisk] Sreekantt:
Results uploaded...still unsupported....i think we made some progress as huawei charger enable-not found is gone... Attached files
[Magisk] locuturus:
Hello. My Nexus 10 running Lineage OS 14.1 seems to be unsupported. I do have busybox so I think it's not that. The command I tried was cs -i and that generated the debug files I attached.

~cheers
[Magisk] VR25:
**2018.11.5-beta (201811050)**

- Config can be edited with <mcs -c [editor [opts]]>. If <editor [opts]> is not specified, vi/vim is used. An usage example is <mcs -c nano -l>. The terminal utility has additional features and it is self-documented. Run <mcs> for details.

- Cool down seconds/ratio is managed internally and automatically.

- Custom charging switch parameters can be set in config.txt.

- Major optimizations

- maxTemp set to 500 (50ºC)

- Simplified config

- Stripped down to the bone for speed and efficiency

- Updated building and debugging tools

- Updated documentation, installer and support links

* Release note: from now on, installed builds (beta/stable/both) will be automatically replaced.
[Magisk] paolocorpo:
Dear [MENTION=5228676]VR25[/MENTION],

I have right now installed your last beta

First of all and as usual thank you so much for your effort in this direction !!

I have edited the resume capacity (from 70 to 75)

It looks as there is not the possibility to edit the cooldown ratio

It is true ??

If yes ... Which is the reason why ?

The default value is 5/25 (5 pause and 25 charging) but I was using with success the value 10/50

Paolo

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] paolocorpo:
Trial with last beta

I plugged the device 58% to lighter adapter of car

The device switched itself OFF but charging was ON

I switched ON the device; the charging become OFF

I rebooted the device and charging become ON

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] VR25:
You're welcome!

I removed the option to edit cooldownratio in favor of a universal and more effective approach. The default charge/pause ratio is 25/5, as you said. This is similar to 50/10. You see that I've dived the values by 2. This reduces battery stress even further, as charging is paused more frequently. That's also more effective, since the pause value doesn't have to be higher. Consequently, battery charges faster but under less stress.

Hmm... strange... ?️

What's the output of <su -c mcs -s>?

Also, I'm curious about what's in the logs. :rolleyes:

Thanks
[Magisk] paolocorpo:
Thanks

Here is the log

On next topic the attachment

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] paolocorpo:
The attachment

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] alfan.y:
Can you make it for non-Magisk? I was try this module in Magisk, so i think will be better if can accommodate for non-Magisk also :)
[Magisk] paolocorpo:
Last beta

I am facing the same issue (of what I already noticed few hours ago)

I plugged to the charger the device 57% but the charging didn't start

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] jeb101:
I'm not sure if I'm doing this right or not.. I had MCS stable, and it worked fine, quick console on reboot. Completely removed all mentions of MCS and installed the latest beta, it comes up in console, but I am unable to get it to function. I do see the new file / config appear, but it doesnt seem to use it, or function with it's stock settings. What could I do, or possibly what am I missing to get this going?

Thanks
[Magisk] VR25:
It can be done.

I have a few questions for you.

- How do you want it to run without Magisk?

- Would you rather have it not starting automatically?

- Why exactly would it be better to have it running/auto-starting without Magisk?

Thanks

I'm not experiencing this issue myself. It's under investigation. Thanks for the information.

Have you tried <su -c mcs --daemon restart>?

Could you please share logs (/data/media/mcs/logs/) and the output of <su -c mcs -s>?

Thanks
[Magisk] guest4711:
1. Using supersu or LOSsu-addon.

2. No, it should start.

3. Because some older devices (like SII i9100) are not supported by magisk cause they rely on a kernel 3.0 (which does not have some needed features for magisk).
[Magisk] ronyscomparim:
what is the command line that changes the values? I can not access the menu through the teminal.
[Magisk] phantom146:
[MENTION=5228676]VR25[/MENTION] as I have seen you on BCL thread, I have the same problem facing my nexus 6p right after it reaches 80. It does not go to sleep as qpnp-smbcharger-17 remains to partially wake the system. I dont really know if theres a workaround here.

And another one on new beta, the charging wont start as well. I got everything right and charged it to 80 and then it dropped, charged it again and it doesnt charge mine anymore. On n6p if this helps.
[Magisk] psychoela:
This version work great, no issue for my n6, thanks:victory:
[Magisk] paolocorpo:
Dear [MENTION=5228676]VR25[/MENTION]

New trial over the night ... New bug

I plugged device 20% to the AC charger

Charging started

After around 7 hours ... I founded devoce at 57%

It looks as the charging stopped at 60% as attached picture

Thank you

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

Here a new trial by me and my Mi A1

I plugged the device 56% to the lighter adapter and the device switched OFF !!

This is the second time

The charging was ON

I switched On the device but the charging became OFF

I switched OFF the device and charging rebecame ON charging up to 82%

That is

Thanks for

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] VR25:
I'm convinced. :highfive:

Thanks

You have two ways: mcs -s <variable> <value> or mcs -s <preset>. Presets are: 8070/default, 5960/endurance, 4041/endurance+ and 9080/lite.

Examples:

mcs -s lite

mcs -s maxCapacity 85

mcs -s resumeCapacity 80

<mcs -s> without arguments outputs your config.

Run mcs for more details.

Yeah, that's a bummer. I'm investigating this issue. Please, keep sharing details.

Thanks

But you don't need to set a customSwitch. Yours is already in mcs database! :p

[MENTION=5056724]paolocorpo[/MENTION], thank you for such awesome reports!

---

I just realized the <dumpsys battery> command can't be trusted at all; especially when screen is off. It's unreliable for the job I set it to do. So far, that's the only reason I found - why charging control is being inconsistent for some of you. I'm switching back to the stone age way of getting the job done - using cat and the /sys interface. Hopefully you guys have cats... :rolleyes:
[Magisk] psychoela:
After i delete customswitch,mcs not working, this ss i take during charging plug on, without customswitch n after put customswitch mcs back to online.thanks
[Magisk] VR25:
That's my fault. I programmed mcs to interpret customSwitch=<path> <onValue> <offValue> as DISABLED. So, instead of simply deleting <switch 1 0>, you should've replaced that with <path> <onValue> <offValue>.

And I forgot to clean this mess! :p

Thanks for the reminder.
[Magisk] paolocorpo:
A new trial with last beta

Plugged to AC charger the charging starts but finish up to around 60%

Obligated to switch Off the device

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] marsian0:
Hi , i hope somebody can help me

i have latest module installed, with parameters 80 - 75 and usually leave the phone connected overnight.

i have noticed that once that the charge reachs 80, it stops charging but if stays plugged, it drains about 5-6% in a matter of 2 or 3 hrs, resulting in recharging two times from 75-80 in the night

Instead, if i unplug the phone when it reaches 80%, it drains 1-2% in about 8 hrs

this was not the case with february version, but i can not install such old version cause magisk gives error at installing it.

Is there any other switch /option that i have to set in order to avoid draining fast with phone plugged after reaching high level?

thanks
[Magisk] VR25:
**2018.11.7-beta (201811070)**

- Automatic battery cool down applies to regular USB charging as well.

- Fixed <customSwitch> issues. Now it can be disabled by commenting out the line.

- New command, <mcs -i> - power supply info

- No longer relying on <dumpsys battery> for battery data. This command proved to be unreliable on some devices. A more universal and foolproof method consists on using <cat battery/<property>> with <PWD> set to </sys/class/power_supply/>.

- Only write to control files when necessary.

- Reverted maxTemp value to 450 (45ºC).

- Rewritten ctrl_charging() for the sake of readability and efficiency.

- Save device-specific diagnostic info to </data/media/mcs/logs/> as opposed to </sdcard/>.

- Start daemon as soon as possible. Do not wait until system has fully booted.

Legacy support (older systems, init.d and SuperSU) is in the works.

---

This seems to be the device-specific wakelock issue reported earlier. It's under investigation. Recall that it has nothing to do with mcs itself. One thing you can try is setting a different/custom control file. Which device are you using?

Thanks
[Magisk] paolocorpo:
Dear [MENTION=8835590]VR85[/MENTION]

First of all, many thanks for your effort

I installed last beta

First trials

Into the car and using lighter adapter charger the charge looks well (probably not fast as 2018.11.2 beta was ... But I am not sure at all)

At home and using AC charger the maximum capacity has been reached and (this is strange) exceeded too !

I personally founded the device with 85% and the charging was alternating with pause (each one for few seconds)

Attached Ampere reports referred to this strange state

Best regards

Paolo

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] psychoela:
[MENTION=5228676]VR25[/MENTION] with latest beta it looks like not working properly. Charging not stop even until maxcapacity n charging only stuck in the situation cooldowncapacity.
[Magisk] paolocorpo:
New trial with last beta

Using the car lighter adapter charger I faced the same issue as I faced with AC charger few hours before

The charging exceed the max capacity target reaching (in this example) 82%

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] VR25:
[MENTION=6263858]psychoela[/MENTION], [MENTION=5056724]paolocorpo[/MENTION], does the issue persist if you run <mcs --daemon restart>?

Note: keep the terminal running.

Thanks
[Magisk] paolocorpo:
I will have a trial soon
[Magisk] paolocorpo:
The issue persists

Below the attachment

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] psychoela:
Yes still not work
[Magisk] marsian0:
Xiaomi max 3, thanks for your time. Anyway your work is awesome, i used this module in a few devices without any issues.
[Magisk] alfan.y:
Well...sounds great:good:
[Magisk] VR25:
**2018.11.8-beta (201811080)**

- Do not suppress enable_charging() and disable_charging() errors.

- General improvements

- Fixed <wrong logic for [re-]enabling charging>

- If battery temperature is greater or equal to <maxTemp>, sleep for 90 seconds after disabling charging. This gives the battery some time to cool down, while minimizing system resources usage.

- More intuitive commands, run <mcs> for details.

---

Telegram channel for announcements and updates: https://t.me/vr25_xda/
[Magisk] paolocorpo:
Thanks as susual for your effort

I will come back soon with my trials of this last beta

Ciao

Paolo
[Magisk] Estebanium:
Hi there, I use 2018.8.8 on LineageOS 15.1. I was able to install MCS, even the commands are working. The only issue is, that the service seems to fall a sleep. Sometimes I plug in the cable, but the phone is not charging. I have to open the terminal and type su MCS 80 70, then I can plug it in again and it starts charging.

Can someone help me?
[Magisk] VR25:
**2018.11.8.1-beta (201811081)**

- Fixed flawed cool down loop causing capacity% to exceed maxCapacity%

- Updated support links

[MENTION=6867525]Estebanium[/MENTION], try the latest beta.
[Magisk] paolocorpo:
Trial with this beta version

Plugged to AC charger look as unable to reach the max capacity

Stuck on around 76 %

I will try with the new one 2018.11.8.1

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] ronyscomparim:
Test
[Magisk] J4jks:
I'm trying beta on Moto G 2014

Thanks a lot for mcs and

Thanks for Telegram channel. Can u upload modules in channel too..
[Magisk] J4jks:
I set to 9080 and it was stopped at 70.

Then I disconnected and reconnected charger , it started charging but sometimes it shows charging and sometimes not charging. But charged to 100%.

I couldn't upload service.sh.log here directly so https://ufile.io/1neiq
[Magisk] VR25:
According to the data provided, your battery capacity seem to have jumped from 76 to 100 like magic. It only took literaly a second for that to happen.

Could you confirm this?

What's the state of your battery?

How old is it?

Does it hold charge for long?

The log also suggests that charging was stopped and re-enabled at the right conditions. Obviously, mcs couldn't do it at 90% capacity, since there was a jump from 76% straight to 100%, which is strange!

Try setting coolDownCapacity to 100 (su -c mcs --set coolDownCapacity 100) and see whether the issue persists.

Thanks

P.S., the "sometimes not charging" behavior is intended to cool battery down (reduce voltage spikes and temperature).
[Magisk] paolocorpo:
Dear [MENTION=5228676]VR25[/MENTION],

A new trial with last beta

I plugged the device to AC charger overnight but it has been unable to reach 85% (I modified the value to 85/75)

Others trials done yesterday look to confirm this issue ... As you can observe by attachment

Thanks for your time

Paolo

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] J4jks:
That I'm not sure from 76 to 90.

Didn't change the battery, which is original battery of the phone ( Moto G 2014).

Battery backup is good.

I'll try and report

Thanks
[Magisk] psychoela:
This version work fine here, no issue so far, thanks:D
[Magisk] paolocorpo:
This attachment clarify as the 76% has been reached and maintained versus a target of 85%

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] paolocorpo:
A new trial with last beta

Plugged to lighter car adapter ... Unable to exceeds over 76%

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] VR25:
[MENTION=5056724]paolocorpo[/MENTION], I'm working on a major update. Meanwhile, could you zip </data/media/mcs/logs/> and upload? Including logs on every new report is greatly appreciated!

Thanks

---

**2018.11.9-beta (201811090)**

- Default coolDown (charge/pause ratio) set to 50/10 seconds (can be edited).

- Major changes and new config format -- these simplify setup to a great extent and bring back advanced functionality.

- Removed log size watchdog in favor of a more resource-friendly algorithm. Whenever max capacity is reached, $log is automatically copied to $log.old and zero'd out if its size exceeds $maxLogSize.
[Magisk] paolocorpo:
Dear [MENTION=5228676]VR25[/MENTION]

Attached the log related to previous beta version 2018.11.8.1

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] phantom146:
Will help as well for my fellow kababayan
[Magisk] ronyscomparim:
this is my setup, but the boot for at 70%, What could be wrong?
[Magisk] VR25:
Does this still happen if you comment out (disable) the <coolDown> line?
[Magisk] ronyscomparim:
which procedure to disable?

I changed the values, and I'm doing a test.
[Magisk] paolocorpo:
I installed last beta

The issue is present always

It is not able to exceed 75%

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] J4jks:
Latest beta stopped at 71

I set to 9080
[Magisk] VR25:
[MENTION=3335876]ronyscomparim[/MENTION], [MENTION=5056724]paolocorpo[/MENTION], [MENTION=6697942]J4jks[/MENTION], see if changing coolDown= to #coolDown= in </data/media/mcs/config.txt> solves the problem.

Thanks
[Magisk] paolocorpo:
I will try soon

Thanks

Paolo

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] J4jks:
Now it is fine charged to set 90 and stopped there showing not charging.

Felt like charging from 71-90 a fast.

On Redmi note3 when set target reached it showed charger disconnected but on Titan is not like that, battery symbol on status bar is charger connected and in settings in battery shows not charging

Thanks
[Magisk] VR25:
Disabling <coolDown> allows battery to charge faster at the cost of more temperature and voltage induced stress. All smartphones do that by default, unfortunately. MCS came to save the day, but it won't do it today, as its cooling engine is broken.

Regarding "charging" indicator still there after max capacity is reached... that's easy to handle. Future versions will disable it.

Thanks
[Magisk] paolocorpo:
Disabling cooldown ratio strategy I was able to reach the max capacity (85% as I set)

But ... What does it mean ??

I would like to use correctly and entirely the module as I was able to do with 2018.10.12.1 version [MENTION=5228676]VR25[/MENTION] Is there any chance ??

Thanks

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] VR25:
This only means the cooling mechanism is broken. I'm working on a fix.

That's one of the top features. I'll never get rid of it. :)

P.S., if you are going to use an older version for now, remove the currente build and /data/media/mcs*/ first!
[Magisk] paolocorpo:
Thanks for suggestions but for now I remain on last beta version wo cooldown strategy

I stay tuned and waiting your relevant update ;)

Paolo

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] J4jks:
Will disabling cooling, also affects discharge like charging
[Magisk] VR25:
No, it won't.

---

**2018.11.10-beta (201811100)**

- Additional setup info in config.txt

- <coolDown> can be configured for capacity (voltage) only, temperature only or both. There's also <coolDownUSB> now, which is exactly what the name suggests.

- Default maxLogSize set to ~1MB

- General fixes

- Improved daemon manager (su -c mcs -d <start/stop/restart>); </dev/mcs/running> now contains the daemon's PID (Process ID).

- Pause for 1 second after toggling each switch, for better accuracy and efficiency.

- Updated documentation

* Release notes: I tried disabling charging indicators. It worked. However I immediately realized this is a bad idea. It interferes with charging control. About the broken cooling engine... I've made major changes to that. So far, I had no issues getting it to function. Now It's up in the wild for you guys to test.
[Magisk] hyborian:
Phone Reboots when charge top limit reached

My Xiaomi Note 4X MTK phone reboots when charge top limit reached ... tried it twice, same happened.

Any suggestions ?

P.S. Using latest beta of MCS, and latest Release version of Magisk from Canary channel. I only used the config.txt to just change the limit, nothing else touched.
[Magisk] VR25:
Logs, please... logs... /data/media/mcs/logs/... I want 'em all! :D

Grab these right after the reboot happens and we'll be happy.

Thanks
[Magisk] hyborian:
Here they are attached, thanks.
[Magisk] VR25:
Thanks... you missed <service.sh.log.old>, though. Since your device rebooted, that's the most relevant log file to look at.

Anyway, replace </sbin/.core/img/mcs/switches.txt> with the attached file and test again. Setting permissions is unecessary.
[Magisk] hyborian:
Ok, I will try that. In the meantime, I will send you the .old file, but I will replace .old with a .c as this xda does not allow uploading .old, only these :

7z apk bz2 c cab cab2 diff face gif gz h img jar jpe jpeg jpg log mtz patch pdf png psd rar tar torrent txt watch xap xls xlsx xml xsd zip
[Magisk] hyborian:
.old file

Here is the .old ...
[Magisk] hyborian:
Reinstalled beta and changed switches.txt, still same problem.

I now tried the stable mcs version on my other phone Xiaomi Redmi 4A, it doesn't stop the charging, it just makes a sound when charging cable is connected. Anyway, this problem for later.
[Magisk] paolocorpo:
Ciao [MENTION=5228676]VR25[/MENTION]

Every morning when I stand-up Chech this topic in order to verify the presence of an update and today ... As usual ... I got it ;)

Let me try it and as usual I will came back with report and log

Cross fingers about cooldown strategy and its effect to the reached max Capacity

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

Good news with last beta ;)

I plugged the device to AC charger when it was 40%

The device reached 85% (I set 85 as max capacity)

The cooldown system looks as running well :)

Well done developer !!!

Inviato dal mio Mi A1 utilizzando Tapatalk
[Magisk] J4jks:
Used latest with all defaults and stopped the charging at set value.

It reached 81 and stopped there

Here are logs

Thanks a lot..
[Magisk] Da-BOSS:
I have Note 9 128GB with 6GB RAM..

I used your latest beta version and I set it to stop at 87% & resume charging at 85%

The problem is... it reached to 70% and it stopped there while charging... :(

Here is the logs from the attachment... :)
[Magisk] hyborian:
The latest beta version is good with my Xiaomi 4A, thanks.

Now that leaves just the Xiaomi Note 4X (MTK version) phones having a problem. I don't know if this helps in debugging, besides the logs, but they are different from the 4A and my other non-Xiaomi phones, they don't have /sys/class/power_supply/battery/charging_enabled file. Must be a Mediatek thing.
[Magisk] VR25:
I always look forward to seeing your feedbacks.

Thanks for all the interest and enthusiasm! :p

I assume it stopped at 1% above 80 due to the cooling engine being a little late to shut down. That's not a big deal though. It'll will get better. :)

Thanks

Damn, this thing is really advanced af! Just the tech involved in controlling power supply alone is mesmerizing and pleasing to look at.

Samsung has indeed learned a lot with the Note 7 battery fiasco. This is hands down, the most advanced charging tech I've seen so far!

I'll analyze your logs deeply.

Meanwhile, edit your config by adding an hashtag before coolDown and coolDownUSB, respectively (#coolDown=, #coolDownUSB=). This will take care of the "charging stopping too soon" issue for now.

This issue is common to MTK devices. These come with limited flexibility in this regard. Will see how the next mcs builds go about that. I may ask you to perform additional tests.

Thanks
[Magisk] Da-BOSS:
I will do that :) thank you for taking your time to analyze and hopefully you can fix it ;) as I wanted to have a good care about this big battery :D

Thank you! :)