yashsingh1/xdaforums huggingface dataset:
[Magisk] Schroeder09:
Is anyone running these shell commands through tasker? I was considering doing something where it charged for 15 minutes and stopped charging for 30 mins up until the battery level was 85% with the resume point being 80% IF the charge time was 9pm or later Monday through Thursday night.

If the charger was plugged in any other time the max charge of 85% with the 80% resume point with uninterrupted rapid charge enabled would be the standard. This potential profile would give me a "trickle" charge through the week while I'm most likely sleeping. If the charger is plugged in any other time it means I need a quick top off and I wouldn't want the charger to only work 15mins at a time. Anyone doing this?
[Magisk] deepak549:
Not working after latest update on OP5T running on latest OOS.

pls check.
[Magisk] asanidar:
Good job with MCS, but my nVidia shield tablet seems to be not supported.

Log : pastebin.com/4yTDpAm6

Pardon my removal of the https, I can't post links yet

Thanks in advance
[Magisk] PixPi:
Also can't get it working on latest beta oos on 5t
[Magisk] RMarques:
OP5 Rolling with xXx10.0 (Android 8.1 based) + Latest BluSpark kernel. It's working without any problems whatsoever so far.
[Magisk] beeshyams:
[MENTION=5228676]VR25[/MENTION] or anybody else who can pitch in

Thanks for an excellent module :)

I have an MiA1 which receives monthly updates and have installed Magisk today hoping to follow a thread that explains how I can continue to get updates while being rooted

Very NOOB question

Will this module make changes to the system preventing monthly updates?
[Magisk] pippoaacc:
I can't find a way to get Tasker XMLs imported. Generated with -t, imported as projects out of Beginner mode, it doesn't import, returns "failed to import profile data". Already tried to resave as UTF8 via Notepad++ on computer. Anyone?
[Magisk] Schroeder09:
Just curious, what kind of profile are you trying to make? A page back or so I asked if anyone was making tasker tasks with this. I think I'd like a profile for charging Monday through Thursday 9pm-5am with a max charge rate of 85% and a minimum fall level to 80%. The profile would charge every 15 mins and then shut off charging for 20 mins or so. This is the closest thing I could think of as a trickle charge.

If plugged in at any other time the chargers only limit would be a max of 85% with a low limit value of 80%.
[Magisk] Biggie_still:
Cs not found Htc one m7 international
[Magisk] wkwk:
The command is mcs?. I dont see cs, has something changed in the module thats not captured in the instructions?.

mcs command works fine for me.
[Magisk] MoHed:
Command mcs works well. cs returns error

Command cs -x doesn't work. Command mcs -x works flawlessly .:D:D

(no space after -).
[Magisk] guest4711:
The command has been 'cs' in the begginning until it turned out that on some device there is a command 'cs' already. So it was renamed to 'mcs'.
[Magisk] pippoaacc:
I'm trying to use the mcs - t command which will generate an automatic tasker profile using current saved mcs setup. My goal is to create a scene which will show a panel with different options that I can choose among depending on what I'm doing, I want 70 30 as a daily driver, charge to 100 for long haul, keep 50 for navigation. I also want a if-then rule that, when in 70-30 will charge first of battery is above 50 or leave it discharge to 30 first if battery is below 50. I know how to do these but it seems that using shell codes blocks a tasker a task because the shell routine stays open when charging.

---------- Post added at 06:39 PM ---------- Previous post was at 06:38 PM ----------

I'm trying to use the mcs - t command which will generate an automatic tasker profile using current saved mcs setup. My goal is to create a scene which will show a panel with different options that I can choose among depending on what I'm doing, I want 70 30 as a daily driver, charge to 100 for long haul, keep 50 for navigation. I also want a if-then rule that, when in 70-30 will charge first of battery is above 50 or leave it discharge to 30 first if battery is below 50. I know how to do these but it seems that using shell codes blocks a tasker a task because the shell routine stays open when charging.
[Magisk] ChronoReverse:
I'm curious, is it also possible to add functionality to turn off quick charging but continue with regular charging? That would also be in line with the goal of reducing battery wear.
[Magisk] sailsell:
Aaah Sorry bro I am a Noob I didn't realized that ?
[Magisk] hackel:
Google Pixel (sailfish) unsupported?

I was surprised to discover no one had submitted debug info for the Pixel yet. Hope it can be added in the near future. Thank you!
[Magisk] pippoaacc:
I couldn't find any info about this behavior: I have a bacon on Los 15.1. When mcs stops charging, in any way, - k, - d, or percentage reached, the battery percentage will freeze at that point and never go down again unless I reboot. Anyone?
[Magisk] lcd4linux:
Honor 9 unsupported since Android O

After upgrading to OREO mcs isn't working anymore.

Here's the *.log
[Magisk] Macusercom:
I have a OnePlus 5T on LOS 15.1 and for me it charges it with "mcs 90 80" to 80 percent and half an hour later it is charged to 100 percent. Then it never discharges again until I unplug it. Anyone else experiencing this?
[Magisk] mucomuco:
How can i disable auto shutdown ? I have redmi note 3 and my phone shutdown at %20 battery. I couldnt find a command for that.
[Magisk] Jaymin.0.1910:
Does Magic Charging Switch have that feature ??? or are you posting in the wrong thread ??
[Magisk] mucomuco:
These 2 mods have very similar names. :/ First i was thinking i was using MC's Charging Controller and make post on that thread. Then i realized that it was magic charging switch. MC's Charging Controller has feature to disable auto shutdown but i couldnt make it work with my Redmi note 3 . Magic charging switch working with my phone but it shutdowns my phone at %20 power and i dont know how to disable it. :/
[Magisk] yomama163:
Honestly, ditch the -t command. It's way easier using Run Shell than using the command provided for -t, only requirement is mcs running after device boot. I did the following:

1st you make a profile that starts after device boot: wait 10s, run shell [su -c mcs -s (output to %MCS)], if %MCS -R paused then run the command again. (the if clause is only a fail-safe for the case mcs has already been started)

Then you do you second profile with run shell [su -c mcs (e.g. -k 40)] and voila, no more problems with being stuck in run shell anymore.

I have got multiple profiles with the run shell command for different occasions: one for during sleep (battery should stay between 40 to 60%), 1 hour before alarm (to make a full charge), one for normal daily usage and one for driving (stay at 42%). I encountered the same problem that you had. It was because the mcs service wasn't automatically starting after boot. After I input mcs -s and then I input anything with mcs, shell won't make any problems because of the shell service already running. Hope it helps

Edit: just found out a second method:

You create yourself an init.d script and put the mcs -s command in there. You only have to see if there is a possibility to check the status of mcs (similar to what I did at the 1st method). I can't provide you with the code because I don't know how to make the script, maybe you know how to do it...
[Magisk] pippoaacc:
Very illuminating. I'm for now actually finding useful to use just - e and - d and let tasker manage percentages. Any advantages in using the internal switcher instead?
[Magisk] yomama163:
It's a matter of preference and how you usw -d and -e or the internal switcher. There are no real advantages.

I for example use the internal switch for a sleeping task that has got over 50 steps and multiple internal loops (it checks how mich time is left until the alarm rings and also checks if there is even an alarm set cause of a bug in the Autoalarm plugin), using -d and -e in that case doesn't work since I need a one shot task to manage my battery level. I also made a task which starts 1 hour before my alarm to charge my phone to full. Using -e is possible on that case, I set it to 100 and 90 just because of convenience.

I have to check how to use mcs on my navigation profile because using mcs 42 42 for example (-k is somehow bugged, it rapidly flashes the LED and I can't change the charging mode until I restart the phone) causes my phone to heat up to 80°C... I don't know how long my processor will handle that.

As you can see it really depends on what you want to do with it.
[Magisk] Nick James:
Is this working for Oreo yet? Currently running Oneplus5 and 8.0
[Magisk] psychoela:
Depending on the device you are using. Working fine here with 8.1.0
[Magisk] DrPhant0m:
I've got a V30, and I'm running the latest version from the magisk repo. When I charge wirelessly, it still goes to 100%, even though I'm on the default 90/80 settings. Charging on the wire stops @ 90 and resumes @ 80 as it's supposed to. Any help?
[Magisk] Zafrkant:
Firstly I want to thank developer for great contribution :)

How to restore to device defaults?
[Magisk] guest4711:
Simply deactivate the module in MagiskManager and reboot...
[Magisk] kkolokol:
Running stock on HTC u11 2.42.617.6(after update). Charging Switch not working after update to mcs from cs. It keeps charging over the threshold set(tried many combinations). So, next fix would be just appreciated.
[Magisk] Azims Lives:
My device is still charging when I turned the USB tethering on.
[Magisk] Sudarchikov:
Hi, VR25!

Could you help me with my lovely Asus Z00A? It is incompatible with mcs (( Debugging log is attached. Thanks in advance
[Magisk] mdssmario:
Currently facing issues in my device, used to work well before.

Can you take a look a the logs?

Thanks in advance.
[Magisk] baabafadil:
Great job VR25.

Will try on my Sm-n900v
[Magisk] baabafadil:
How do I tell its working coz I don't c anything while charging after the flash
[Magisk] runkel:
HTC U Ultra unsupported with cs-2018.1.27.zip

Interesting thing: as I tried "Magic_Charging_Switch_cs-2017.10.21.zip" charging control worked (!), but with inverted functionality:

e.g.

Battery 20 %

cs 15 -> started charging

cs 70 -> stopped charging

When MCS tried to start charging it did the opposite.

With cs-2018.1.27.zip it fails setup, because of incompatibility. With well known charging triggers (charging_enabled, battery_charging_enabled) no charge control is possible. I am curious how "Magic_Charging_Switch_cs-2017.10.21.zip" changed the charge state, but I still couldn't find it out.

Found two other users in the thread with an HTC 10. They also mentioned that enable and disable were reversed in effect. I found the following line, which I will try su -c cs -c /sys/devices/soc/qpnp-smbcharger-16/power_supply/battery/charging_enabled.

Guess this must be su -c cs -x /sys/devices/soc/qpnp-smbcharger-16/power_supply/battery/charging_enabled now to change the switch.
[Magisk] emcuevas:
how can I automatically reset the battery stats after reaching the higher limit I set?

I have not yet checked my device if it supports automatic reset after the pause, just asking if there is another way.
[Magisk] sandaljrpit:
Thank you very much :o :highfive:

Xiaomi MI4 LTE MIUI 9.5
[Magisk] ilhsyysyk:
I very much hope that it will be able to make a manager, because I think the setup method is complicated for many people!
[Magisk] gautamajay52:
Showing unsupported.Eager to try this. Plzzz fix

Log:-
[Magisk] gautamajay52:
How will I know that it has been fixed for me?
[Magisk] papoy1019:
Sir!

Please try to include this switch for asus selfie! Thanks!

/sys/class/power_supply/usb/present

enabled=1

disabled=0
[Magisk] papoy1019:
Thanks Sir! I edited the switches myself, and it works! Thanks Again!
[Magisk] DrPhant0m:
My phone doesn't stop charging at 80% when charging wirelessly. Do I need to share a log file or try a new profile from the database (-x) ? I'm hesitant to do the latter, in case it might stop the other functions from working. Can anyone help? Thanks
[Magisk] XDAMaxe:
OnePlus 5 with Open Beta 7 unfortunately not supported, see att.
[Magisk] priyeshbhawsar:
Has the battery drain bug been fixed?
[Magisk] zorraf:
If you make for this device I'll be so thankful
[Magisk] jemail:
Request for nVidia shield tablet (original) compatibility.
[Magisk] mistermojorizin:
No answer to this?
[Magisk] RMarques:
Is the "-s" command (enable-disable) working ok to everyone?
[Magisk] candiesdoodle:
Hi..is it possible to control the actual charging current using this module?

If not any suggestions how I can limit the charge current to, say 500 ma.
[Magisk] jkaart:
Change charger to 500mA model?!

Maybe eldrod16's Maxlife do this also but it's not Magik module...
[Magisk] emabertax:
This command work when phone is turned off completly or only when is turned on? I usually recharge battery when phone is off
[Magisk] pippoaacc:
Hi all. I'm using the switcher commands - e and - d through Tasker. Everytime the upper threshold is reached and the - d command is issued, charging correctly stops but the gauge stays at that percentage, never going down until unplug. Oneplus one Tuga 11.1 8.1.1
[Magisk] RMarques:
Anyone?

Is there another more effective way to activate/deactivate the service without having to restart the cellphone? Even after restarting, sometimes it just don't deactivate at all.
[Magisk] TGHH:
What about to set the upper limit to 100% - then it's like been switched off.
[Magisk] RMarques:
If you set from, let's say 20 to 100, it'll only start to charge once 20 is reached
[Magisk] piptron:
Please! Support my device, i beg of you, I really want to make this module work for me.
[Magisk] papoy1019:
Try to find the charging switch file of your phone.
[Magisk] piptron:
How? Where to start? Im new to this.
[Magisk] pippoaacc:
Anyone? This is a show stopper because if the gauge is stuck at the target percentage, it'll create effectively a memory effect until reboot.
[Magisk] aqua_hopps:
- ( ! ) Unsupported Device error

By entering mcs -x

(i) Please wait...

- Fetching known control files for htc_htc_pmeuhl...

[1] /sys/devices/soc/qpnp-smbcharger-16/power_supply/battery/charging_enabled

[2] /sys/devices/soc/qpnp-smbcharger-16/power_supply/battery/battery_charging_enabled

[3] /sys/devices/soc/qpnp-smbcharger-16/power_supply/dc/charging_enabled

Selected 1 and configured mcs successfully, but charging didn't stop after reaching the upper limit.

Device is HTC 10, quick charging is enabled.

Android Version: 8.0.0 Oreo

MCS Version: 2018.3.6

Please help.

---------- Post added at 09:53 PM ---------- Previous post was at 09:48 PM ----------

Attached debug log

*Edit* the XDA Lab app crashes when I try to attach any file.

Here is the Google drive link: https://drive.google.com/file/d/1GqkhBN3xVoPIBSDDPOz2_-77jhgGbNXu/view?usp=drivesdk
[Magisk] guest4711:
Did you grant storage permissions to XDA Lab app? (End Of OT)
[Magisk] aqua_hopps:
Yes.
[Magisk] jayp3281:
Somehow getting unsupported device on Pixel XL. Attaching log:
[Magisk] Droid_JD:
Happens to me too, on every version SINCE 11-25 debug 2.
[Magisk] Droid_JD:
Duplicate post
[Magisk] yoritana:
Incompatible device - Xiaomi Mix 2 (Chiron)

goo,gl/uuhyzS

Sorry for the comma, I can't post links as a new user.
[Magisk] svenkerst:
My Honor View 10 is not compatible

Or am I doing something wrong?
[Magisk] Spaceoid:
Module installed and activated on my S4 Mini. After reboot, if i start the Terminal and Type "su [Enter] cs -i", i always get the message "cs not found". What am I doing wrong?

Edit: Service seems to be working now after I used "mcs" instead of "cs". I set start and end values via Terminal. I can now close Terminal and do not need to open Terminal/start cs after every reboot, right? Or did I understand sth wrong?
[Magisk] dirtyreturn:
Hello [MENTION=5228676]VR25[/MENTION] , I own a nexus 6p and am using the stock ROM. Does this not work on stock?? Previously, I was using this mod on a custom 8.1 ROM without a problem.

Also, what and how do I get you the required log? If you could help I'd appreciate it. Thanks

And edit ** - I saw that you had changed from cs to mcs
[Magisk] Deadmau73:
It's not working on my pixel 8.1 april patch ! .
[Magisk] hellerpop:
Yes, you don't need to do that after a reboot.
[Magisk] Spaceoid:
Though MCS is now activated on my S4 Mini (values set to 82 and 70), my phone keeps overcharging. What am I doing wrong? Is my phone not supported yet? Do I have to leave the terminal open while charging?
[Magisk] dirtyreturn:
Don't take this as me being stupid, please. But, after gaining root for terminal and issuing mcs 82 70, did you see the confirmation dialogue that the new settings have been saved??
[Magisk] Spaceoid:
Yeah, I saw that. It also said that MCS is already active.
[Magisk] dirtyreturn:
I, at least, have no other idea. Well, I guess, did you try deactivating the module then activating it again? Or, uninstalling and reinstalling? Maybe, just the mcs command for it to return to default value?
[Magisk] repulse:
Anything else to do beside flashing ?
[Magisk] Spaceoid:
Yup, tried all that... I do not have to leave the terminal open/active during charging, or do anything special before plugging the phone in, right?
[Magisk] dirtyreturn:
No, from the short time i was able to use it, personally, the only time terminal had to be open was upon set-up.

I have a nexus 6p and was using a custom 8.1 ROM and it did exactly what is described!

Anyway, maybe just a compatibility issue. On 8.1 stock ROM, for myself anyway, when I have mcs module ticked in Magisk and then go run the setup command - it tells me there is no mcs.

---------- Post added at 07:47 AM ---------- Previous post was at 07:41 AM ----------

https://r.tapatalk.com/shareLink?ur...share_tid=3557002&share_fid=3793&share_type=t

This app is similar to the module.
[Magisk] Spaceoid:
Yup, I tried that one beforehand. It did not work, either. My Phone kept overcharging...
[Magisk] asdf2:
I've got an 'unsupported device' with NVIDIA Shield Tablet K1
[Magisk] cetoo:
I tried this module with mi max lineage os 14.1 android nougat blitzwolf quick charge 3.0 with fully quickly charge support example 2500ma around. I set it 15 percent it stopped in 15. Than stared charging again 1 min around. Then stopped and started again. Cant stop that permanently. I think maybe it caused fast charging. Dont know why. Is there anyone like me or a solution?

Also when i unplug the device it was 18. If i could not unplug it will continue gaining.
[Magisk] lenana:
Command not found help! Anyone
[Magisk] guest4711:
Try "mcs" instead.
[Magisk] lenana:
Lol still commands don't work (OnePlus 3t android 7.1.1)
[Magisk] guest4711:
You did try with "su", eg.

jactivelte:/ $ su
jactivelte:/ # mcs

? If you get an error after typing "su" you probably did not grant "root" to terminal emulator or your installation of Magisk and MagiskManager is incorrect...
[Magisk] lenana:
Thanks but I've given up. Too complicated
[Magisk] kamilmirza:
updated my ROM+kernel and mcs is unsupported now

it was working great previously

oneplus3, xtended ROM, Caesium kernel
[Magisk] noviedeha:
magic charging (magisk module)

allow me to try it
[Magisk] lauralbaby:
I noticed this too.

---------- Post added at 07:42 AM ---------- Previous post was at 07:39 AM ----------

All you need to do is type "su -c mcs 80 50" or yr preferred numbers

Not that hard surely.
[Magisk] gorilla p:
So I have a OnePlus 5T on an 8.1 AOSP Rom. I installed and everything appears OK. I adjusted the settings (90 85) and everything appeared to be fine. Then I woke up and battery is at 100%...

OnePlus5T:/ $ su -c mcs 90 85

(i) Checking compatibility...

- Waiting for charger...

-- Charger detected

- Please wait...

- Congratulations, your device is supported!

(i) New settings saved.

- MCS service is already running.

-- Now working with the new values.

OnePlus5T:/ $
[Magisk] supermaxkato:
use with supersu and not magisk?

[MENTION=5228676]VR25[/MENTION] Your module works great on my Android 7.0 device, thank you! But I have several Android 4.4 devices that Magisk will not work on. Do you have a version that will work on older devices with supersu and twrp instead of magisk?
[Magisk] lenana:
Hey, thanks though its still not working. Not found error
[Magisk] lenana:
Still not working for me on Oneplus 3T 7.1.1. See screenshot. P. S why did the dev ditch the initial app?
[Magisk] Didgeridoohan:
That's because you're trying to call su twice... Pick:

Either you first enter su, and then the command.

su
mcs 95 90

Or, you enter it all at once by using su -c.

su -c mcs 95 90
[Magisk] guest4711:
It looks like your device is not rooted (properly)...
[Magisk] menoegy:
is that working when the device power off?
[Magisk] lauralbaby:
What root tool do you use?
[Magisk] lenana:
Magisk 15.3
[Magisk] lauralbaby:
Ahhh, yes, you don't need to type 'su' more than once, as said above. Hope you get it!
[Magisk] NetSoerfer:
Doesn't seem to work on Android 8 at all. It appears to from the shell output and the charging indicator, but it actually continues charging to 100%.

Gesendet von meinem ONEPLUS A5010 mit Tapatalk
[Magisk] kamilmirza:
not true at all - it works perfectly (90 80)

i'm on Android 8.1 with 1+3T
[Magisk] gorilla p:
I just tried installing it again and it looks like it's working.

I installed, rebooted and didn't do anything.

Now I plugged it in and it stopped at 90%. It's at 88% right now and not charging so I'll report back after a few days of use.
[Magisk] docps4:
sh: mcs: not found

How to solve this?
[Magisk] davekra:
Same here. I'm running Android 8.1, LOS 15.1 on One+5.

I can set MCS to some value, it will look like charging has stopped (icon changes) but Accubattery still shows full charging current. If left connected, battery percentage doesn't increase then when power disconnected percentage doesn't drop for long time.

I've tried mcs -x to select both of the control files with the same results.

The other two charge control apps exhibit the same behavior.

Any ideas?
[Magisk] gorilla p:
By reading the module info or using the search function.
[Magisk] lenana:
Thanks, let me try again
[Magisk] RSDamasceno:
"Unsupported device" message.

But I've already used this module on the same device in other ROMs and it worked perfectly.

I'm on XtendedROM.
[Magisk] guest4711:
It depends heavily on the kernel used. Other ROMs may use other kernels even for the same device...
[Magisk] hooks024:
Any chance on support for pixel devices?
[Magisk] Lightdm123:
Could someone help my properly deinstall the module?

I installed it but realized that I need 100% when I unplug my phone. So I deactivated the service with "mcs -s" (with su before) and deinstalled in magisk manager and rebooted. After that my phone would sometimes say that it is charging (the led at the top of my phone is lit and the sign in the bar at the top of the screen is coloured. My phone's signs for charging) but my Lockscreen, "ampere" (an app to show the charging current) and the battery percentages lowering showed that it wasn't charging. So I installed the module again and just set it to stop charging at 100 and and start charging at 100. Since that isn't a really clear finish I would like to be able to properly deinstall it.

I am on a LeEco Le Max 2

Resurrection remix 5.8.5

Android 7.1.2
[Magisk] Hastaloego:
[MENTION=5228676]VR25[/MENTION] hi just wondering, is this project dead? would be a pity :( also are there any special kernels which don't support mcs? cause it worked nice on oos but doesn't seem to work on RR

Edit: seems to work with Flash Kernel