yashsingh1/xdaforums huggingface dataset:
[Magisk] nogaff:
Hmm, while the modified mcs script appears to run fine on my Pixel 2 and says the service is running, it doesn't actually seem to control the charging any more.

I wonder if it has anything to do with the fact that I've had to move it from /system/xbin to /system/bin as per this post?

Can't think why that would make any difference, but it's the only other thing that's changed...
[Magisk] J4jks:
It says mcs is running but doesn't stop charging at set limit.

Is this working fine for you all guys?

I'm on Redmi note 3 AEX N magisk+xposed
[Magisk] Franz Jakob Tim:
Same for my oneplus 5t
[Magisk] menoegy:
Working, thank you.
[Magisk] mistermojorizin:
Same her on Pixel 2 xl.

BUT - if i do mcs -d it stops the charging. So I know that there is something there, that it is capable of controlling the charging, it just won't control it automatically for some reason.

If i dont' change the xbin to /bin, my mobile networks don't show up (i.e., it stops being a phone).
[Magisk] Jaymin.0.1910:
I added only paths to newer loop devices for mcs to look for, nothing else is changed. If you don't trust me, check out the sources.

Also, if any of you is interested, I just a redefined version of my own 'My Charging Controller' to the official Magisk Repo. I just don't have a README.md right now, will update that soon. You might give that a try, it has better algorithms for charging control.

Regards from Jaymin Suthar.
[Magisk] dragoi90:
Dear Jaymin i just install your magisk module of mcc.I have a problem when i type : mcc 80 75

It gives me : sh : mcc : can'execute ; Permission denied

I have a oneplus 6 on lates oxygen os.

Thank you for your work!
[Magisk] guest4711:
Does it work if you try

su -c mcc 80 75

?
[Magisk] dragoi90:
It gives back :

FATAL ERROR : --error
[Magisk] Jon8RFC:
Is there a method to get this to work on devices without a cache partition? I believe that's why this module, and the "f2fs fix", doesn't work.

Pixel XL

8.1.0
[Magisk] mistermojorizin:
I feel dumb, but not seeing it in magisk repo
[Magisk] PsyCl0ne:
It might not have been pushed out yet especially if it just got submitted.
[Magisk] Jaymin.0.1910:
You need to wait for at least 120 seconds after your device has booted.

It should wrap up the passage to 'su', no need of suing.

Oops, just found two small bugs, one there for printing messages, and the other one for manual mode reverting. I will fix that soon.

Regards.

It is there, you just need to check that again (also try clearing Repo Cache).

Regards to all.
[Magisk] mistermojorizin:
Clearing cache was the first thing I tried. Checked many times (and just tried again). It's not there -- at least not in the Magisk app. I see it on github, but when I download it from github and try to install it I get "not a magisk module."
[Magisk] PsyCl0ne:
Hey JayminSuthar,

Honestly appreciate your help. Maybe 2 things.

1) we should maybe move chat over to your thread.

2) just like mistermojorizin was saying, I know I saw your module in the repo before but even after clearing cache and rebooting my phone it's still not listed. Please see attached screen shot for what I'm seeing. Now a side note it could be based off of region. I'm up in Canada.

Thanks for your help and picking up the charging module again. I'm sure we all appreciate it a lot.
[Magisk] mistermojorizin:
West coast USA here.
[Magisk] stevvie:
I've just noticed the same thing
[Magisk] dragoi90:
VR25 its so good to have you back.

I just tried the new module of mcs but it sais device unsupported.Im on OnePlus 6.Anyway im attaching the debbug file.

Thank you!
[Magisk] J4jks:
Wow it's working fine now

Thanks

Redmi note 3 AEX N magisk+xposed
[Magisk] Fdraco10:
This Module is perfect for Battery, AMAZING!!!

Thanks bro!
[Magisk] mistermojorizin:
I think it's working!
[Magisk] donny110:
I'm not sure if I did anything specific wrong but it's giving unsupported device again.. Running oneplus 3t.. Thanks for the help in advance!
[Magisk] derschnelle:
I get the same message as the other OP-users on my OP5, device not supported.
[Magisk] xda2018:
If you face the "device not supported" problem, try to reboot your phone and setup mcs in the terminal again. This has worked for my phone. Also dont charge your phone before mcs ask you to "detect charger".
[Magisk] gorilla p:
I'm using an AOSP custom ROM on my OnePlus 5T.

I installed the new version from Magisk repo. Rebooted to complete installation and bootloop.

Removed and reinstalled Magisk to be able to boot again. Tried it again and more bootloops.
[Magisk] THAAD.401:
7.1.2

magisk v17.7.

mcs working.

but invalid.

still charging to 100%.
[Magisk] guest4711:
It's hard to say anything to your problem because we are missing all necessary information like the magisk version you are using, your list of modules, ... etc.

Proper logs would help, too.

You should be able to boot without any modules (using "core only" mode) by touching /cache/.disable_magisk in recovery. Then you could test which module(s) conflict...

Installing "Magisk Manager for Recovery Mode" allows you to disable/enable modules when in recovery to get rid of boot loops.
[Magisk] .:Addicted:.:
How does it work.

Do i have to use terminal everytime i want to charge or terminal is needed only for 1st time setup.

How do i disable mcs incase i want normal behaviour of charging (upto 100% incase of a trip)

Anyway getting some error on setup.

Some "chmod unable to write to /system/xbin"

Here is log
[Magisk] taman89:
Unsupported device

Hey..like you gave instruction on first run mcs command on terminal emulator, i got unsupported devices result. So i attached debug file to get support for sony xperia m dual in next update. Waiting to test mcs.
[Magisk] wyc:
Pixel XL is still not supported.
[Magisk] .:Addicted:.:
After installing uninstalling magisk module few time(mostly to check mcc & mcs) reconfiguring 3-4 times(some error about cant write /system/xbin) finally got it working.(trial & error coz of less info & look at doc, there is also typo)

Good thing now its working ?.

mcc terminal interface seems better. That even can run in background.

mcs seems bit ahh anyway it works & gotta figure out better way to toggle things.(UI or something, will check later)

Thanks for your hard work.

Edit: you need to update script. "mcs -m 80 20" command searching for "/magisk" directory which isnt used anymore by magisk 16. [MENTION=5228676]VR25[/MENTION]
[Magisk] shyvanna:
So charging only stopped after i opened terminal emulator. The app was open when i turned the screen off and left it to charge. This also happens when i fc the terminal app and leave the terminal app on the background.

I have samsung E7 5.1.1 touchwiz magisk 16

Sidenote: it worked perfect when i used magisk beta 16.4
[Magisk] yoyo182:
Zenfone 2 (Z00A) not supported...
[Magisk] Mikes:
Still not working on Oreo.
[Magisk] derschnelle:
Well it does for me, OP5 on LOS 15.1.
[Magisk] Nitrogen:
Does not work on oneplus 3t
[Magisk] Nitrogen:
Does not working on oneplus 3t
[Magisk] gorilla p:
Magisk 17.0

Css Causes boot loop

Installed Mm for recovery and disabled all other modules except css. Boot loop continues.

Boots fine once css module is disabled.

Saved Magisk log but it doesn't have much info.
[Magisk] VR25:
Try the bootloop workaround -- run "touch /data/.bcs" and reinstall.

A new release is near. Stay tuned.
[Magisk] VR25:
A new build is up.

Please, re-read the first post!
[Magisk] PsyCl0ne:
So heat for any electronics is not a good thing. I believe that MCS is beneficial due to the fact that the battery doesn't get charged all the way to 100%. I remember reading somewhere that from I think it was 85% up to 100% is the hardest on your battery. Also that there are a limited number of charge cycles that the batteries go through before they start to deteriorate and end up holding less of a charge. By limiting the charge cycle you end up being able to maintain charge capacity and therefore longevity of the battery.
[Magisk] typhoonikan:
Ok, so I installed, and in terminal I navigated to mcs directory, then "su" and "su -- cs 70 35". Is that all that is needed to set the bounds to 70 and 35? Should I reboot or run the toggle command? I ran a charge but it went over 70% ? Thing I hate about Linux stuff is no user feedback after commands are given. ?
[Magisk] PsyCl0ne:
Hey so the first post has been updated. You should install the module. Plug the phone into the charger. Reboot.

Once your phone is booted up give it a minute and open up your terminal. I use termux from the fdroid app store. Then you enter "su" and press enter. The next line after pressing enter should end with a #. That's when you enter "mcs 70 35" and press enter.

Mcs will then check compatibility with your phone and then apply the settings and tell you that it's now using the new settings that you want.

Now you type in exit and press enter to get out of su access followed by typing exit and pressing enter then termux should tell you to press enter once again to exit.

Please see my screen shot. I use 80 20 but you can change it to what you want to use.
[Magisk] typhoonikan:
Ok thanks.

So what if I want to go back to pre-MCS? (i.e. 100%-0%)
[Magisk] PsyCl0ne:
Well my friend, you would uninstall the module.
[Magisk] gorilla p:
Using latest version on OnePlus 5T - 8.1 AOSP custom ROM, Magisk 16.7. All is now working perfectly.

Great job with the last update.
[Magisk] Sreekantt:
Sadly still unsupported on Huawei Honor 6x running on EMUI 8.0.
[Magisk] fekri1409:
I test on my device. But not supported.
[Magisk] deepak549:
Hello,

New build is not working properly on my Oneplus 5T. Earlier version was working fine but since last update my phone charging keep on fluctuating. I keep my setting as "mcs 70 80" i.e battery should charge till 80%. But Charging start fluctuating after 70% means phone charging will start and stop multiple times. This problem keep on continue on ever after 80%.

I have tried reinstalling module, deleting cache from recovery but problem is still persisting .

Pls check.

My OP5T has Magisk v16.0 , Xposed installed.
[Magisk] psychoela:
"mcs (high) (low)"
[Magisk] deepak549:
ohhh..

Sorry . Actually I have completely forgot to place values in right order.

Thanks for the update. :)
[Magisk] papoy1019:
Hello! The charging will activate if below the lower limit even if it is not charged!
[Magisk] VR25:
Not sure what you mean. Could you clarify, please?

**2018.8.1 (201808010)**

- General optimizations

- Improved debug()

- Striped down (removed unnecessary code & files)

- Updated documentation

IMPORTANT NOTE: untill further notice, I'm only supporting official, stable Magisk versions. The reasons being, other builds are actually behind most modules issues (yes, I said "modules") and I just don't have the time anymore to play with more stuff. So, do not report issues if you're not running an official and stable Magisk version.

Everyone still facing issues, please keep providing RECENT logs (that is, always those generated by the latest build), thanks.

P.S., please, keep re-reading the reference before updating, as new [important] info is added from time to time.
[Magisk] typhoonikan:
Hey again ;}

I ran the 80 35 threshold commands and saw it working when plugged into the dash charge. However I just noticed yesterday that while plugged into the car using Android Auto that the OnePlus 6 went up to 100, and actually had gotten slightly warm as a result.

Why would that be? Would it have anything to do with the car usb connection being different from that of the dash adapter?
[Magisk] tobby88:
Hi

I am using a OnePlus 5 with LineageOS 15.1. No modifications to the LOS-kernel. Tried MCS a while after it came out and just tried it again, but for me nothing has changed.

When the charging-limit is reached, the battery icon doesn't show the flash anymore, so it looks like it stopped charging. But the green led stays on, AccuBattery-app shows that the charging is still going on and after a while the percentage goes up.

I had this problem back then with LineageOS 14.1 and now with LineageOS 15.1. I think I also tested it with boeffla kernel, too, at the moment I use the standard kernel.

Anything I can try? Any debug output you need?

Current state:

Oneplus 5 (ONEPLUS A5000)

LineageOS 15.1-20180730-NIGHTLY-cheeseburger

Kernel: 4.4.100-lineage+

Magisk 16.7 (1671) with Magisk Manager 5.8.3 (129)

Modules: Android P Emojis v3, Cerberus as System app v10, Greenify4Magisk v4.1.1, Magic Charging Switch 2018.8.1, Magisk Google DNS 2.1.2, Unified Hosts Adblock 3.7, YouTube Vanced 13.28.54 (01.25.00)

Example output - just tested it with 81 and 79% to do a quick test:

$ su
OnePlus5:/data/data/com.termux/files/home # mcs 81 79
OnePlus5:/data/data/com.termux/files/home # mcs -i

POWER INFO

POWER_SUPPLY_NAME=battery
POWER_SUPPLY_INPUT_SUSPEND=1
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_CHARGE_TYPE=N/A
POWER_SUPPLY_CAPACITY=80
POWER_SUPPLY_CHARGE_NOW=0
POWER_SUPPLY_CHG_PROTECT_STATUS=0
POWER_SUPPLY_FASTCHG_STATUS=0
POWER_SUPPLY_FASTCHG_STARTING=0
POWER_SUPPLY_CUTOFF_VOLT_WITH_CHARGER=3250
POWER_SUPPLY_CHARGING_ENABLED=0
POWER_SUPPLY_INPUT_CURRENT_MAX=0
POWER_SUPPLY_IS_AGING_TEST=0
POWER_SUPPLY_SYSTEM_TEMP_LEVEL=0
POWER_SUPPLY_CHARGER_TEMP_MAX=803
POWER_SUPPLY_INPUT_CURRENT_LIMITED=0
POWER_SUPPLY_VOLTAGE_NOW=4118000
POWER_SUPPLY_VOLTAGE_MAX=4380000
POWER_SUPPLY_CURRENT_NOW=339000
POWER_SUPPLY_CONSTANT_CHARGE_CURRENT_MAX=1950000
POWER_SUPPLY_TEMP=392
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_STEP_CHARGING_ENABLED=0
POWER_SUPPLY_STEP_CHARGING_STEP=-1
POWER_SUPPLY_CHARGE_DONE=0
POWER_SUPPLY_PARALLEL_DISABLE=0
POWER_SUPPLY_SET_SHIP_MODE=0
POWER_SUPPLY_DIE_HEALTH=Cool
POWER_SUPPLY_RERUN_AICL=0
POWER_SUPPLY_DP_DM=0

CONFIG

charging limits
higherLimit=81
lowerLimit=79

power supply info
uevent=/sys/devices/soc/800f000.qcom,spmi/spmi-0/spmi0-02/800f000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/power_supply/battery/uevent

charging switch
switch=/sys/devices/soc/800f000.qcom,spmi/spmi-0/spmi0-02/800f000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/power_supply/battery/charging_enabled
onKey=1
offKey=0

daemon
autoRun=true
pauseDaemon=false

debugging
loopVerbose=false

OnePlus5:/data/data/com.termux/files/home #

Any ideas? Could it be an interference with AccuBattery? Anybody using this app?
[Magisk] papoy1019:
I manually added my switch for my Asus Selfie LOS 15.1 to the switches. Everything works fine for installation until setting it up.

The setting is:

High Limit 90

Low Limit 80

When it reach to 90, its all good it will stop charging. The charging icon is gone. But when the battery falls below the lower limit 80, the charging icon and charging led will turn on eventhough, the phone is not connected to a charger.

Thanks!:good:
[Magisk] PsyCl0ne:
So I've noticed on my oneplus 6 that if I configure mcs to 80 20 it work until I reboot the phone and then mcs doesn't halt charging. Here is the logs that I just got. If there is something else I can add to assist troubleshooting or testing please let me know.

Thank you in advance!
[Magisk] MajinkenSword:
[MENTION=5228676]VR25[/MENTION]

Tried using this but it still says incompatible device. I'm using a Huawei P20 Pro using RomAur v1.3

Here are the logs for your reference.

Thanks in advance!
[Magisk] PsyCl0ne:
Here is a bit of a weird thing that I haven't seen in a bit. So I tried running mcs 80 20 once again and I got an error that a file doesn't exist in xbin.

Attached are my termux output and the debut logs from this time.
[Magisk] Parnas72:
I know that beta Magisk is not supported, I just wanted to let you know that on my device (Xiaomi MI A1) after upgrading to Magisk 16.7 the module was not working...

I temporarily fixed it by changing the code in the "mcs" script where it looks for the mountpoint from

for loop_device in /dev/block/loop*

to

for loop_device in /sbin/.core/block/loop*

Cheers
[Magisk] tRippinthehead:
Hey guys,

If I use 80 70 values in settings so my battery stats won't reset (it will automatically resets when battery level at 90%+)

So how to make automically battery stats reset at 80%?

I tried mcs - b command but it didn't work for some reason :

lilac:/ # mcs -b

/system/xbin/mcs[792]: dumpsys: not found
[Magisk] typhoonikan:
So, I've noticed my phone is charging to 100%... I updated mcs and running the commands again, I get errirs that some bin folders doesn't exist. See image. Any ideas?
[Magisk] PsyCl0ne:
Instead of changing directories just do su and the mcs and whatever settings you want to use. Does that work?
[Magisk] asdor:
No wireless charge

I'm not the 1st one who is asking this question but can't find any answer. Is wireless charge supported by mcs? It works great with cord I mean stops charging at threshold I configured but when charging wirelessly it goes to 100%.

Xiaomi Mi Mix 2s.
[Magisk] quietsche:
Looks like an script error in latest mcs. Installing with Magisk 16.7
[Magisk] guest4711:
It looks like your ROM does not have the ability to create an ext4fs file system or make_ext4fs is not found in the search_path.

What ROM do you use on this device? What is the device's codename?
[Magisk] quietsche:
It's a Walleye (Pixel 2,Android 9). But working now. Dunno why...
[Magisk] oseiasrodrigues0:
Log
[Magisk] VR25:
Oh, completely forgot this... my bad. Upload a debug log generated by the latest version and I'll work on that. Thanks.

To everyone else,

- The dumpsys and other "not found" issue have been fixed. If you come across something else, plese let me know. Thanks.

- Those with inconsistent charging control, run mcs -x to pick a different control file.

- If you found a working control file which is not on mcs' database, please post its path. Thanks.

- Those who are still waiting for support, keep pushing recent logs. If you find a working control file for your device, you can set it with mcs -x /path/to/ctrl/file onValue offValue.
[Magisk] papypaprika:
Flashlight issue

Same here, flashlight stops working when using mcs. I'm on Samsung Galaxy A5 (2016) SM-A510F running Nougat 7.0
[Magisk] VR25:
Try changing your charging control file and see how things go. Run mcs -x and follow the instructions.
[Magisk] Lawrencetate1:
Where's the App?

Oh baby! This is the golden ticket! I have a 2016 Nexus 6p that I'm trying to keep alive until I replace the battery. I searched for something that does precisely what this does. It wasn't that easy to find this and it is the only one I can find ANYWHERE which surprised me.

Why isn't this wrapped in a UI and posted to the usual markets? Charge a Buck for it.
[Magisk] papypaprika:
Thank you very much for your answer !

I tried the other option given to me under mcs -x, but it seems it makes mcs not work as my phone got charged to 100% even though I set mcs to mcs 80 79.

Any other ideas ?
[Magisk] psychoela:
[MENTION=5228676]VR25[/MENTION] i have same issue. Charging not start at low limit, here log.tq
[Magisk] VR25:
Open source is the spirit. A graphical UI might come in the future. Though, it's mever been planed.

This is a device-specific issue. No idea why that's happening yet. Revert to the previous charging control file.

Does the issue persist when you use a different control file? (mcs -x). Also, what about when the screen is left on?
[Magisk] psychoela:
I already try another control file but still not work,n also with screen always on. Btw this issue started after new name Mcs, the last Cs 25/1 work very fine.
[Magisk] VR25:
Thanks. This could also be caused by your Magisk version. I'll take a closer look.
[Magisk] asdor:
I can't explain but for unknown reason wireless charging started working as it should. Still don't know why.
[Magisk] Specktäter:
Hello, I'm experiencing some problems here and I hope someone can help me :)

With newest MCS (2018.8.8) the daemon seems to work, but the console (and Tasker with Shell) waits forever after changing the charging limits. See "MCS 2018.8.8.png" - before taking this screenshot I have changed the values and the cursor for the next input doesn't come back. Tasker hangs in this line, too, and never ends the task properly.

And with MCS 2018.8.1 the daemon does not work properly. See "MCS 2018.8.1.png": I've set the max battery limit to 60%, the current level is 75%, but the charging will not be stopped. But with the command "mcs -d" the charging will be stopped. After enabling the daemon (mcs -s) it will be charged to 100% again, even if it shouldn't be charged due to the high battery level.

Had an old cs-version installed, which worked perfect until the newest Magisk beta...

My Phone: Samsung Galaxy S7 Edge, Android 7.0, Xposed 89, Magisk 16.7 (beta).

Thanks for your help! If you need additional information please ask me :angel:
[Magisk] ktmom:
I had a similar problem. Removing MCS from within Magisk, rebooting, re-enablng MCS then rebooting fixed it for me.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Magisk] Specktäter:
Thanks for the reply, I've tried again - did not help. Any other suggestions?
[Magisk] ktmom:
Assuming that when rebooting after enabling MSC, you had the phone being charged, then I guess it's time for debug logs. "mcs debug" in the terminal. If out completed you'll be given the path to the log. If it doesn't complete then I would repeat while capturing a logcat.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Magisk] Specktäter:
Here you go. This are the debug files for 2018.8.8 and 2018.8.1

Thanks for your help :o
[Magisk] RMarques:
Only version that is working ok on my OP5 of the July 24th one
[Magisk] Specktäter:
With 2018.7.24 I have the same issues like 2018.8.1

By the way, with 2018.7.24 + 2018.8.1: "mcs -d" works - this disables charging, "mcs -e" re enables it for me. But the service/daemon doesn't automatically switch the charging enabler/disabler with "mcs -s".
[Magisk] VR25:
Weird...

Update will come within a few days to address all issues reported, and add stuff. Thanks.

P.S., full official Magisk Beta support is back. A note on 16.7: verbose logs are null (Magisk issue). I'm on 16.6.
[Magisk] chibichuba:
Is it bad for the battery to maintain with "mcs -k #"? I'm using mcs -k 95 and it switches from 94 to 95 and back down every few minutes, playing the charging sound. How does this compare to the default settings of most batteries?
[Magisk] Specktäter:
Did someone report the little but confusing typo in the usage examples? Enable = e should be correct?

Thanks!
[Magisk] ronyscomparim:
I'd really like to use it, but all the commands I've tried do not work, can anyone please hear me? S8 oreo root rom Alexega

the installation was done, but I think cs is not installed.
[Magisk] ktmom:
This is a complaint, not a problem report or request for assistance.

The difference would be providing detailed information about your setup - including root method and version, how you installed MCS, install log (e.g. from TWRP), detailed information about what command you are using with the expected result and the actual result.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Magisk] ronyscomparim:
was installed via twrp module Magisk!
[Magisk] guest4711:
You forget to use the su command, either use

su
mcs

or

su -c mcs

. mcs needs root for execution and it is hidden for apps not running with root privileges.
[Magisk] ronyscomparim:
Not
[Magisk] ronyscomparim:
ready only make the proper settings! Removed from Magisk I restarted and installed Magisk modules.
[Magisk] ronyscomparim:
how can I adjust the time, is 3 hours difference, the correct is the status bar!
[Magisk] ktmom:
Are you in the BRT time zone? That is 3 hours behind the GMT reported by mcs.

I'm in EDT (eastern daylight time) which is 4 hours behind GMT. In November there will be 5 hour difference between my local time and GMT, when my time zone become sane and returns to standard time (EST).

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini