yashsingh1/xdaforums huggingface dataset:
[Magisk] hriday f:
Small letters worked, it says cs service running, now working with new values.

I think it worked. Thanks a lot for the support. Now I can close the terminal and no root required right?

Can I do more awesome things with terminal? Like trying to hack my WiFi with security wpa2 ?

Love u dude for Ur support
[Magisk] guest4711:
Glad it worked.

Yes, you may close the terminal now.

The terminal gives you the full power of the Linux shell. But it may be dangerous for the sanity of your device, even when started without root, if you don't really know what you are doing.
[Magisk] hriday f:
Where can I learn about it
[Magisk] guest4711:
This is becoming OT here. So in short: Look at a good book like "Linux for dummies" https://www.iiitd.edu.in/~amarjeet/Files/SM2012/Linux Dummies 9th.pdf or take a look at XDA university https://xdaforums.com/showthread.php?t=2056323&p=35662068
[Magisk] dyingbread:
Latest version is not working for me.

Set cs 90 80 (default). When battery at 90% charging stop for a second and then charging again.

Try cs -d but not working, charging still enabled.
[Magisk] whezzel:
I've had one issue with this so far. When I have my phone plugged in to my computer and it hits the charging limit, it disables charging, like it's supposed to, but it also disables the USB connection to my computer.

This isn't a huge problem, more of a slight inconvenience. I just have to disable cs when plugged into my computer. I'll probably set up a Tasker job in the future if it bugs me enough.
[Magisk] VR25:
Ok, but this time, you should at least have the file /data/cs_debug.log. "cs debug" works fine for me.

Fixed. Please, upload /data/cs_debug*.
[Magisk] Eng.Raman:
My cs_debug.log
[Magisk] guanto96:
I repleaced the cs debug zip, it stills present the error. Am I doing wrong?
[Magisk] DuskGolem:
[MENTION=5228676]VR25[/MENTION], i can confirm this working now on Xperia Z5 Premium Dual, on 32.4.A.0.160
[Magisk] Eng.Raman:
Upload your cs_debug.log as the OP said.
[Magisk] guanto96:
How to do that? Sorry for the question, I don't know too much
[Magisk] VR25:
Find the file cs_debug.zip in /data and upload it here. If it doesn't exist, cs_debug.log should be there as a backup. The first includes the second.
[Magisk] guanto96:
Thank you. Here it is
[Magisk] VR25:
And here you have it...

[MENTION=5818781]Eng.Raman[/MENTION], what's the output of cat "/sys/devices/pci0000:00/0000:00:08.1/i2c-2/2-0036/power_supply/battery/battery_soh"? (You can paste that directly on terminal.
[Magisk] guanto96:
Thank you very much ;)
[Magisk] Eng.Raman:
The output is 97 ( attached below with two terminal app: Termux and Material Terminal ).
[Magisk] dft601:
I am on S8 with batman Rom.

I get as follows.

3C Toolbox Pro (terminal)
========================
=======================
cs -i (su)
=======================

Battery Info

=======================
cs 80 50 (su)
=======================
(!) cs: Unsupported device

=======================
cs debug (su)
=======================

(i) Gathering data...

(i) Archive integrity

Done

/system/xbin/cs[260]: zip: not found
mv: bad 'cs_debug.zip': No such file or directory

Mike

Edit:

Sorry I am new to terminal. Managed a zip program to run. There were several failures but I got a file.

http://cloud.tapatalk.com/s/59dd2b092df2b/cs_debug.zip
[Magisk] VR25:
[MENTION=5818781]Eng.Raman[/MENTION], unfortunately, the last command I asked you to run didn't give me the ultimate answer for supporting your device.

[MENTION=238314]dft601[/MENTION], Eng.Raman, the latest version (2017.10.10) has an enhanced debugging tool (cs debug). Generated files are /sdcard/cs_debug.log & /sdcard/cs_debug.zip. Try it to see if we can get better data.

EDIT: [MENTION=238314]dft601[/MENTION], I just saw your update. Will take a look...
[Magisk] dft601:
Managed to get a zip
[Magisk] Eng.Raman:
Installed the latest version 2017.10.10 ( cs debug command generated cs_debug.log attached, but cs_debug.zip not found).
[Magisk] guanto96:
I repleaced the old zip with this new one but it says the same error, unsupported device
[Magisk] VR25:
A new version is up. [MENTION=5818781]Eng.Raman[/MENTION], zip should work for you now. It seems your system doens't have busybox installed. So, cs will use Magisk's internal busybox to counter that. Now, to everybody -- if your device is unsupported, the module will automatically gather debugging data, tell you exactly where files are and what to do with them.
[Magisk] dft601:
For the case that in your new version there is something different. LOG was created automatically. [

Gesendet von meinem SM-G950F mit Tapatalk
[Magisk] guanto96:
Tried but it stills charge over the limit
[Magisk] Eng.Raman:
I'm already had busybox installed ( meefik busybox which is compatible with magisk).

But even when uninstall it then I installed the "osm0sis busybox module" with the latest "cs v2017.10.11", the result is the same (cannot generate cs_debug.zip only log which is attached below).
[Magisk] sandaljrpit:
Halloo...

Not support with my device MI4 LTE ( Cancro ).

:)
[Magisk] Jaymin.0.1910:
Hi,

It seems like you posted it in the wrong thread, for MC's Charging Controller, the support / discussions thread is at https://xdaforums.com/apps/magisk/mcs-charging-controller-t3739371
[Magisk] sandaljrpit:
Ohh no.. im sorry sir! :o
[Magisk] Jaymin.0.1910:
No problem at all, the issue you faced has been fixed with version 1.2.1, but I mistakenly introduced a new issue which won't launch the daemon after reboot, so you will have to manually run

mcc --re-daemon

after each reboot:)
[Magisk] sandaljrpit:
Wow...

can it be fixed with init.d ?

Sorry if i still post here.. :highfive:
[Magisk] Jaymin.0.1910:
To fix this, just replace the line

(sleep 120; no_file_logs=true mcc --launch_daemon;) &

with

(sleep 120; no_file_logs=true mcc --launch-daemon;) &

in /sbin/.core/img/mcc/service.sh

It was just a matter of a sign ( I was lacking tea :) )

No problem for now, fella, but please post in the right thread ( my thread ) :) the next time since so many people take it seriously :mad: ( Oogh, the ownership of thread, we develop / share for our own peace :angel:, not to tease others "Oh, see I did this" :p )
[Magisk] brqndon:
Anyone have the issue with the phone not charging unless a command is typed in?

For example, I'm at 50%, I plug in my phone, and it doesn't charge unless I type 'cs 60 55' in command. It's as if it forgets the settings. I have to type in the command each time for it to charge.

I have a Nexus 6.
[Magisk] Trevomader:
Mine doesn't seem to be respecting the threshoulds, i can stop charging successfully with -d but with my battery at 84% and with 90/80 threshoulds it won't stop charging at all.

**

Alright, did some research.

The script seems to have some logic error, i didn't want to get to the root cause, just "hacked" my way as a proof of concept.

First i changed "auto_run=true" to "auto_run=false" prop in /data/media/cs/config

Then i manually started the script in the terminal with the command "setsid /system/xbin/cs 80 70"

This way the script keeps running in the background and correctly computes and disables charging when the threshould is met.

Obviously the auto_run logic seems to be incorrect, at least in my device.

Another issue is the name of the "executable", at least in my system there's already a binary executable at /system/bin named "cs" so if you only use cs instead of /system/xbin/cs it ends up executing /system/bin/cs.
[Magisk] A Good Kid:
xperia x oreo

doesnt work on oreo.. it bootloops
[Magisk] Trevomader:
Well i actually found the bug, which is related to the /system/bin/cs file in my device (Samsung A910f).

In /magisk/cs/service.sh the original code is "(cs service) &" which as stated above is executing /system/bin/cs instead of /system/xbin/cs so i just changed the code to "(/system/xbin/cs service) &" and now it's working perfectly.

For those complaining that only typing "cs" in terminal isn't working, this bug is affecting you.

Cheers!
[Magisk] Trevomader:
Only one issue left, it seems if the charging is interrupted this way the phone's flashlight stops working until i reboot.

Actually flashlight only stops working if charging is interrupted by software, if i reconnect the charger and the script doesn't interrupt charging the flashlight works.
[Magisk] aricandra56:
Still looping after enable module and pluggin the charger

my phone still looping when pluggin the charger and it's wont boot up. Is my phone is unsupported device?

sorry for my bad English
[Magisk] urbanboymne:
Huawei P10 doesnt work.
[Magisk] LOLFreely:
on devices one plus 5t work at first time after charging again this module not working.

oreo stock rom 5.0.3
[Magisk] Ridsever:
Latest version not working on my Huawei P8 Lite. Please add support for it. Here is the log
[Magisk] urbanboymne:
Here you go my "uevent" file you ask me iz zip file. Huawei P10
[Magisk] last_nooby:
Hi folks, here with my Pixel 2 XL magisked, I'd like to slow charging of my battery to empower it lifespan.

Eg. I'd like to put on charge every evening and have my battery ready next morning after 8h slow charge.

Is there a module that do it?

Thank you
[Magisk] nico785:
Thanks for you help I have à same problem in Samsung G925f but after change code "(cs service) &" to "(/system/xbin/cs service) &" cs don't work in terminal it's work only for setsid /system/xbin/cs and in reboot my gsm cs don't start automatically
[Magisk] cambr1an:
Thanks for this wonderful app!

My phone is frequently attached to a computer for hours. I use 'cs 80 78' because ASUS recommends the same settings for their laptops. I hope this is a good setting to prolong my phone battery's health.

I wonder if 'cs -k 80' is a better setting?
[Magisk] VR25:
**2018.3.6 (201803060)**

- Additional devices support

- Major optimizations

- Renamed executable to `mcs` (formerly `cs`)

- Reworked control file testing logic

- Upgraded debugging engine

- Updated documentation

*Release Note*

- Current settings will be reverted to defaults.

----------------------

I've been very busy lately. The worst: accessing the internet has just become much more difficult and expensive in my current location. As a result, my online presence is greatly restricted, but I'll still keep pushing updates and providing support whenever possible.
[Magisk] n1r0:
The generated Tasker profile still uses the old "cs" command
[Magisk] Ridsever:
Huawei P8 Lite still not supported...
[Magisk] LOLFreely:
not working for one plus 5t with Magisk v.15.3 - 16 on stock rom 5.0.3

pls check my cs report.
[Magisk] marsian0:
Nexus 6, last version doesn't work resume, but previous version works fine, thanks to developer !
[Magisk] RieGo:
new version doesn't work on Galaxy S8. installed previous and everything is fine.
[Magisk] piptron:
Still not supported. :( Please Help
[Magisk] Trevomader:
Latest version keeps waking up the device because it's probably disabling end reenabling charging every 12 seconds or something.
[Magisk] Estebanium:
Samsung S7 Edge not supported

Hi there I want to share my log file. I am on Batman Rom on a Galaxy S7 Edge.
[Magisk] Mesmurized:
Not for me. With screen on, it toggles on/off charging too often.

I assumed (incorrectly I guess), smart trickle charge was available -- like found w/nicer car battery chargers where the charge varied to match the current load.

As a work around, I use cs 80 77
[Magisk] cambr1an:
Thanks! We have almost the same setting. Speaking of screen on, do you know of an option to disable waking the screen when charging is enabled?
[Magisk] papoy1019:
Pls support! Thanks!
[Magisk] Mesmurized:
Nothing that I can find even with LiquidRemix ROM. Can only disable sound.

I might expand the range to 80/75 or 80/70 to reduce the frequency of this annoyance.
[Magisk] cambr1an:
It turns out GravityBox has that option, but I couldn't get it to work on TouchWiz. Even if it did, it requires Xposed, which will trip SafetyNet.
[Magisk] Adnan008:
thanks your great work, im using this for nearly a week, 2018.3.6 doesn't work for me, it says unsupported device, even gave me a bootloop, had to delete magisk and reinstall, while 2018.1.27 works absolutely fine (which im using now), cs 85 84 and im good to go.

using oneplus 5t oos 5.0.4 blu.spark r102, magisk v16

i added the log from 2018.3.6
[Magisk] RieGo:
been looking quite a lot for that feature. if you need it to work on TW try this: https://xdaforums.com/xposed/modules/mod-xposed-tweaks-cm-t3279109

i agree it would be great if this could be integrated into this module, but i don't even know if this is possible without xposed....
[Magisk] cambr1an:
Thank you! It says for Android 5.0. Would you know if it works for Marshmallow?
[Magisk] RieGo:
well the not wake up on charge part works perfectly fine on my oreo, so i'm pretty sure it would work on MM :D
[Magisk] Estel78:
Hello, [MENTION=5228676]VR25[/MENTION] and thank you for such great module!

I have small request - would it be possible to add option that based device shutdown (and, if possible, start/stop charging triggers) based on reported battery *voltage*, not capacity %, as seen by system?

I have a situation* where my device can work for day(s) after system "think" it is 0% capacity. Thus, such option would be very helpful.

*I'm using Galaxy S5 Plus (kccat6), which, by default, uses some silly bumped voltage LiIon - 3.85V average, charged up to 4.35V, shuts down around 3.30V. Hoever, I am using custom-build battery made from 6x 18650's (totaling up to around 20 000 mAh *real* capacity, might I add, for around same price as regular 2800 mAh samsun battery for said model...), hardwired instead of default battery. Thus, using your module, I've hacked system to charge only up to standard ~4.2V, and disabled critical battery shutdown completely (device works perfectly fine up to 3.0V at least, under that my DIY-added hardware keyboard shuts itself down, device faints due to low power at just under 2.9V). Having possibility to set up automatic shutdown at something like 3.1V would be very convenient.
[Magisk] rnadomuc:
The new update is working super well, thanks!
[Magisk] sharp3r:
Thanks for the new version. It works on my device. I just want to know if it is on autostart or not? Without any commands will it charge until 90% and then it stops?

Thanks
[Magisk] thearcher4:
Hi can you check why the OnePlus 5T is unsupported? The log is attached, thanks!
[Magisk] 24shorty:
Hi. Huawei Mate S is unsupported. Can u please change that?
[Magisk] LOLFreely:
how to find mac log files and where are location ? my oneplus 5t not working but i can't find msc file
[Magisk] guest4711:
See post#1:

- If your device is incompatible, cs auto-generates the file /sdcard/cs_debug-DEVICE.log.
[Magisk] Schroeder09:
Is anyone using the latest version 2018.3.6 on a Google pixel 2 XL?

So all I have to do is download the module, reboot, open terminal, and then enter my high limit for charging and how low it'll allow the battery to drop before the charging kicks back in? For example, if I want charging to stop at 85% and I will allow it to drop to 82% before charging kicks back in I type "cs 85 82" into my terminal emulator?

EDIT: what does this do for the stock battery monitor it settings? The stock battery monitor gives information and SOT from "the last full charge." I notice this is a bit misleading because if you top your battery off a lot the stats don't take that in to account. They truly only count from the last time the battery was charged to 100%. It ignores all the little top-off charges. So you could make this stat have 100+ hrs SOT.

If I cap this at X% will I be seeing 100+ hrs SOT in the settings battery monitor, or does this module affect that reading too and then consider the new top charge limit the X% value as the last "full charge" so the stats show true numbers? I hope that makes sense and you all know what I'm talking about.
[Magisk] LOLFreely:
i don't see this.

but my devices not working i reinstall module > connect plugin > reboot but not work my battery charging to 100% every time.

is it about rom and kernel too?
[Magisk] NetSoerfer:
On my OnePlus 5T running LineageOS 15.1 (Android 8.1) mcs appears to work, but it still charges above the set limit quite frequently. The battery symbol and charging LED show not charging, but I can hear the charger make noise (which I can't if it's not active) and after a while the charging LED activates. The phone frequently charges above the upper threshold of 85%.

I've attached a log - do you need any more info?
[Magisk] Schroeder09:
I'm on pixel 2 XL. I installed it via magisk manager, plugged the charging cord in, and pressed "reboot.". Upon reboot I went into the terminal emulator. Here's what I typed in and what came back.
[Magisk] Schroeder09:
I was looking over the instructions in the magisk module and it says we now have to enter "mcs". Here's what I tried after finding that. You can see the terminal emulator told me that this command isn't valid. Then I tried "su" as it's own command to get me into super user access. Then I typed "-c 87 80". The terminal emulator gave me the same error that the command wasn't found.

Does anyone have this working on a pixel 2 XL?
[Magisk] ikelos:
I'm still having trouble with the OnePlus 5 mcs not working directly after boot until it's rerun manually (version 2018.3.6). I discovered that if I was fast enough during boot, it determined it was an unsupported device, but a minute later would happily say that it was supported. I've captured two logs (one from being unsupported and the other after it was detected as supported). Hopefully they'll help diagnose the problem? It seems that every time I first rerun mcs, it checks compatibility (which fits with it not believing it's compatible when run immediately at boot time). Let me know if there's any other tests required...
[Magisk] GammelBS:
Yes, try this path:

su -c /magisk/cs/system/xbin/mcs -i

This should only work until reboot because mcs is not in $PATH, so service.sh can't start it.

Do you have other modules using xbin folder?

Magisk has problems with creating folders in system:

If you want more modules that install in xbin you can try rename folder inside module from xbin to bin in recovery. Magisk Manager for Recovery Mode by VR25 is very usefull for this (mount magisk.img in recovery). Try this or add full path to /magisk/cs/service.sh.

P.S.: most other devices do bootloop if magisk creates new folder in system (i.e. Nexus 4 with unlegacy android 8.1), Pixel 2 XL stock rom seems to be an exeption. So I don't think it will be fixed by magisk.
[Magisk] Schroeder09:
I tried the full path command and it didn't work. It gave me a bunch of errors.

I'm trying to look through xbin in the root directory and see if I can tell if other modules are using xbin. There is a lot of great information to unpack in your post. Am I correct that basically you're suggesting I need to move the files from the module and then re-route everything so the terminal sees it there? Attached are some screenshots of what I tried in the terminal and what it told me. I may be following up to this post with some PMs to you. I'd REALLY like to get this module working. Thanks, GammelBS.
[Magisk] Schroeder09:
Darn it! Did it again! I posted before putting the attachment on. who ever is in charge of XDA phone app can you make it so you can add stuff when editing a post? Here's what the terminal showed me and maybe more importantly, what I typed in. I copied the command directly from your post and pasted it in the terminal. The left pic is the first bit of input and the right pic is the same terminal scrolled down to the last command I entered.
[Magisk] Nick James:
(Sorry to dig this up from the dead)

I did try additional switches but did not have such luck. I'll try the wakelock blocker next.

Curious what the rest of the OnePlus community has done with this wakelock when mcs kills the charging connection but it still connected to the charger.

ALSO, I updated over the weekend and my OnePlus5 is no longer supported. Looks like there are already a lot of OnePlus devices reporting the issue as well. Here are my logs just in case.
[Magisk] GammelBS:
Sorry, command should be:

su -c /magisk/cs/system/xbin/mcs -i

I tried to rename the module xbin folder in android, not the best way but seems to work:

Open /magisk/cs/system/ in your root fileexplorer and rename xbin folder to bin. Reboot immediately!

While booting up connect charger. In android open terminal and try

su -c mcs -i
[Magisk] Schroeder09:
Awesome! I can't speak yet to if it's actually working, but the commands all worked and generated action in the terminal emulator. I have seeveral modules installed. What if one of them was using the xbin folder that I changed to the "bin" folder? Will there be lost functionality? Thanks so much for your help. I'll report back to let you know if it's working. Are you using any delay settings and any of the other complicated options in the module for increasing the life of your battery? Are the delay options in the charging supposed to constitute a trickle charge? That would be a cool option.

EDIT: the charging switch DOES appear to be working. Thanks so much, GammelBS. Now the only question that remains is what else was affected by the "xbin" name change to "bin"? Will this continue working if I update to the new TWRP, re-flash EX kernel, and re-flash magisk?
[Magisk] piptron:
Please support my device, thank you.
[Magisk] GammelBS:
Renaming inside /magisk/cs changed this module only. It sticks until mcs gets an update. Flashing of TWRP, kernel and re-flash magisk is no problem if you don't wipe data partition or magisk.img

No. I use 90 80 on taimen and 60 40 on shamu. 60 40 because it stays on wireless charger all the time.
[Magisk] Schroeder09:
Awesome. Thanks so much. I get such great battery life with this phone I may start with mcs 70 65. I charge everyday due to wanting smaller top-off charges as prescribed by places like battery University, and I'll never run through that much juice on a normal day. The goal is to stay near the 40% range if possible right? Maybe I should even start lower than that....
[Magisk] pdppdp:
First thank you for such a great module.

Secondly I wanted to give a suggestion for further functions.

Have you considered to implement time schedule and/ or profiles?

Some examples to explain why I think this would be helpful:

- Night (4am - 6am): load to constant rate X% so device is 'fully' loaded for the day

- Evening (6pm - 11pm) load until X% is reached (dismiss minimum charge limit) so device loaded to go out

Or maybe there is a chance to build in a quick tile to dismiss the minimum charge limit? Or a way to realize this with tasker?

Thanks
[Magisk] Pipodi93:
OP5 not supported on LineageOS 8.1 latest Nightly. I can't get the debug zip because I can't find it anywhere.
[Magisk] DrPhant0m:
I just got an LG V30 (US998), and since it has a permanent battery, I installed this magisk mod to keep the battery from fully charging, in attempt to try to preserve the life of the battery. This mod works on the cable (left it at default 90/80 so far), however, I put the phone on a standard 5W Qi charger (not the newer 10W or 15W) overnight, and when I woke in the morning, the battery was at 100%. The phone wasn't hot, but it was warm.

I'm not a dev, but I am an enthusiast, and I'm no stranger to pulling logs, etc. Let me know what I can do to contribute for my device and any similar devices that might be affected.
[Magisk] deepak549:
CS service not running error coming after updating to latest version on Oneplus 5T .

How to fix this issue ??

Update: Just noticed that command has been changed to "mcs" from "cs" . Everything is working fine.