yashsingh1/xdaforums huggingface dataset:
[Magisk] Jaymin.0.1910:
A new build is up

Hi,

Here is a new build which fixes the Magisk Manger crash / stuck at compatibility check issues ( finally )

The new build also adds support for the Pixel family, some Lenovo devices, and some weirdo Honor devices ( possible many others, too ), and I wish to thank all of the users who provided their feedback, co-operated on debugging which resultingly fixed more and more false compatibility checks

Thanks to all:)

[MENTION=8570610]MCMotherEffin'[/MENTION]
[Magisk] papoy1019:
Sorry my bad! Wrong thread! And I tried to install this but not compatible!

I attached the log.

It would be great if it will be compatible but anyways a big Thanks!
[Magisk] Jaymin.0.1910:
Reboot and try again, if again does not work, provide 'Magic Charging Switch' log for analyzing, you know, I removed that log generation a long time ago
[Magisk] papoy1019:
Ok, thanks!
[Magisk] piptron:
Please support
[Magisk] Abomb:
Installation works fine now, but when trying to start the daemon I get "- Abort :- Your device does not support these functionalities". I attached the relevant logs.
[Magisk] papoy1019:
The same result.

Here it is! Thanks!
[Magisk] Jaymin.0.1910:
Hey, I'm working to fix the algorithms, you know your device is supported

Oops, a small typo in the code, will fix that

I'm working on making the algorithms rock stable, please wait
[Magisk] nogaff:
Pixel 2

Gave the new 1.2.5 build a try and it passed the compatibility check (charging appeared to stop and start again) but after rebooting twice and testing a couple of times, my phone continues charging past 80%, so it doesn't seem like the module is actually switching correctly on my device.

Logs attached.
[Magisk] Jaymin.0.1910:
Please wait for the next build, I'm working on it
[Magisk] Jaymin.0.1910:
Fix A / B devices support

Hi,

Please some users who have A / B devices attach here the output of

grep '^/dev/block/loop[0-9] ' /proc/mounts

with at least one file Magic Mounted ??

Thanks
[Magisk] Abomb:
Output on my Moto X4:

/dev/block/loop0 /sbin/.core/img ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/framework/XposedBridge.jar ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/lib64/libxposed_art.so ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/lib64/libsigchain.so ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/lib64/libopenjdkjvm.so ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/lib64/libart.so ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/lib64/libart-disassembler.so ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/lib64/libart-compiler.so ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/lib/libxposed_art.so ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/lib/libsigchain.so ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/lib/libopenjdkjvm.so ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/lib/libart.so ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/lib/libart-dexlayout.so ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/lib/libart-compiler.so ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/lib/soundfx ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/bin/profman ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/bin/patchoat ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/bin/oatdump ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/bin/dexoptanalyzer ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/bin/dexlist ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/bin/dexdiag ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/bin/dex2oat ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/bin/app_process64 ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/bin/app_process32 ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/bin/mcc ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/etc/audio_effects.conf ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/etc/sysconfig/google_build.xml ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/etc/sysconfig/nexus.xml ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/etc/sysconfig/pixel_2017.xml ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/etc/sysconfig/pixel_2017_exclusive.xml ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/priv-app/ViPER4Android ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/vendor/etc/audio_effects.conf ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/block/loop0 /system/etc/hosts ext4 rw,seclabel,noatime,data=ordered 0 0
[Magisk] Jaymin.0.1910:
Thanks for the quick reply:victory:

anyone else ??
[Magisk] piptron:
If supported then why installing failed? Says doesn't support functionality.
[Magisk] lvbaal:
[MENTION=8570610]MCMotherEffin'[/MENTION] Sorry to see ¨your device does not support these functionalities¨. Any chance of supporting it soon: Huawei Mate 10 Pro stock rom & kernel? Thanks!

---------- Post added at 04:05 PM ---------- Previous post was at 03:42 PM ----------

[MENTION=8570610]MCMotherEffin'[/MENTION] Hi again. I posted earlier today that ¨my device is not supported¨. However, when i run the installer with the device not plugged in, the installer does not abort. Is this to be expected? I attach the install logs from both instances.
[Magisk] nogaff:
Pixel 2

walleye:/ # grep '^/dev/block/loop[0-9] ' /proc/mounts
/dev/block/loop0 /system/priv-app/Greenify ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/block/loop0 /system/app/YouTube ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/block/loop0 /system/bin/mcc ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/block/loop0 /system/bin/hosts ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/block/loop0 /system/etc/hosts ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/block/loop0 /vendor/app/Unified\040Hosts\040Manager ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/block/loop0 /sbin/.core/img ext4 rw,seclabel,relatime,data=ordered 0 0
[Magisk] Jaymin.0.1910:
I'm working on the algorithms, your device is supported means it has the capability of running mcc

Flash the same zip again to uninstall, a reboot might be able to fix that, and it is not expected, might be something else conflicting with it

so with A / B devices, Magisk takes care of it, thanks for your response
[Magisk] lvbaal:
[MENTION=8570610]MCMotherEffin'[/MENTION] So now I uninstalled using the trashbin in Magisk Manager Modules, not by ¨flashing the same zip again to uninstall¨ as you state above. After which I installed again without being plugged in. Again the install ends normally. Now how can I check MCC's functionality?
[Magisk] Estel78:
Hello, [MENTION=8570610]MCMotherEffin'[/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.

// Edit

Under latest magisk (16), LineageOs 14.1 and kccat6 device, the module doesn't function properly. It doesn't report errors or generate incompatibility logs, but:

a) every meaningful actions result in mcs report "no sysfs refferences being found", and re-creates them - report success (but repeating same command - even "--info" - result in re-creating again).

b) After every reboot, the module doesn't work (at all - charging isn't stopped at set trioggers), despite daemon process working. First invoking of mcc --info (or anything) re-creates sysfs references, and module starts to semi-work - charging is stopped at set level, but...

c) while the device nominally stops charging, the voltage is still "bumped" and "ac-powered" state appears.

It is worthwhile to add that the alternative module (mcs) works absolutely fine without need to change charging-control method. So, it is not about device or system being incompatible.

I would love to provide logs, but apart from described behavior, the module doesn't provide any (in my case), or at least any that I am aware of (it seems that module "thinks" it is working fine).

Cheers,
[Magisk] DenyDarko:
Hey [MENTION=8570610]MCMotherEffin'[/MENTION]

I'm having issues with the module using LG G5 H850 with stock v20s + Magisk v16.

The module while it detects charger and it's installing correctly, it won't save the values.

Check the Screenshot and the zip. The err file reports something.
[Magisk] DenyDarko:
Oh, I forgot the verbose log.

Here's it is.
[Magisk] Vishal.ahlawat.va:
Cant Understand How to use this

M using Redmi note 4 with miui pro custom rom

I want help in using this

Any one could help me

I just want to stop charging at 90% so I can leave it on charge overnight

Plz link if there are Any video on this
[Magisk] Jaymin.0.1910:
Some debugging ??

I forgot double-quotes at a place, which resulted in are_refs_set() always returning false, so no manualrun will work, and also if the daemon is running, it will keep sleeping until it sees are_refs_set() return true, which in fact, will never happen, so the daemon still running will not be functional

And for the voltage-based control, that is definitely possible for every device, and I was just waiting for someone to request such feature, and after I push an update with the mentioned and some other minor bugs fixed, I will start working on the feature, but I assume you are up for some testing and debugging, right ??

Read the above text, I will fix this

Hi,

You need to see the 'How to use' section, if that does not help, ask again and I'm here to answer you
[Magisk] RSDamasceno:
Hello!

Thanks for the great module.

About the above request ...

Is it possible to add a switch to pause charging that is determined by temperature?
[Magisk] Jaymin.0.1910:
In Android, there are a hell lot of temperatures available, so I'm assuming you talked about battery temperature, right ?? If that's the case, it'd be definitely possible, but your request is in the queue, so be sure to ask here again once I'm done doing the previously mentioned, and also I assume you like experimenting, right ??
[Magisk] dyingbread:
Any chance make this module support for mi pad 2? I tried install this module but failed, device does not support these functionalities
[Magisk] RSDamasceno:
Exactly!!

All right, I'll wait.

And I'll be ready to test and debug.

Thank you!
[Magisk] Jaymin.0.1910:
Wait for the next release, if that does not work, ask again

You're welcome

Can someone post the output of

dumpsys batterystats --reset

?? Note that it'd reset battery stats
[Magisk] papoy1019:
I flashed and its already compatible cause i flashed custom kernel to my device. I can set an argument, but it will not pause charging when it reached the upper limit. And when i try to run other command, it says no reference set.:(
[Magisk] DenyDarko:
Here
[Magisk] Estel78:
Definitelly, yes. I won't just request and run ;)
[Magisk] Jaymin.0.1910:
Can someone run the command

/data/adb/magisk/busybox ps >/cache/ps_out.tmp

from a root shell and attach /cache/ps_out.tmp here ??
[Magisk] Vishal.ahlawat.va:
Mcmothereffin

I have already readed the How to use but still didnt Understand How to use

I have installed the mod through magisk

Installed terminal emulator

I have Tried those instructions in the read me file but still I just cant Understand what to do in terminal emulator
[Magisk] DenyDarko:
There
[Magisk] rnadomuc:
Your installation says my device is incompatible, so I tried tried Magic Charging Switch instead and it is working perfectly.

I'd supply logs I don't see any log files in the paths listed in the OP.

I'm on a Nexus 5, using the Dirty Unicorns Oreo ROM that was released just yesterday and ElementalX 9.02 for my kernel.
[Magisk] Jaymin.0.1910:
It is so simple, run 'mcc -s 70 60' if you wish to set 70 60 as thresholds, run 'mcc -f -s 95 85' if you wish to force 95 85 as thresholds, threshold out of the range 15 - 85 must be forced using the -f ( or --force ) argument, if you wish to set shut to 15 %, then run 'mcc -p 15' and forcing is the same as with -s, if you wish to toggle auto shut OFF or ON, run 'mcc -tp' and it'd behave according to the current settings, if you wish to toggle auto switch ON / OFF, run 'mcc -ts', I think you would have basic terminal experience now, check the other available options by 'mcc --help' and be sure to ask back if you need and further assistance

Thanks, now if you don't mind, can you run

ps -o ppid=

I need the output cause I'm debugging an issue with the manual run option

Install the previous version of Magic Charging Switch and provide their debug logs, the newer MCS does not provide good logs, I will then look into your logs and add support for Nexus 5, also attach the screenshot of 'mcs -i' of Magic Charging Switch's
[Magisk] DenyDarko:
1|h1:/ # ps -o ppid=
bad pid '-o'
1|h1:/ #
[Magisk] Jaymin.0.1910:
Now, can you run

/data/adb/magisk/busybox ps -o ppid=

and report back, Thanks
[Magisk] DenyDarko:
Ready.
[Magisk] Jaymin.0.1910:
And now the last twos

/data/adb/magisk/busybox ps -o ppid= $(/data/adb/magisk/busybox ps | /data/adb/magisk/busybox awk '/ {mcc} /{ print $1 }')

and

/data/adb/magisk/busybox ps --help

Thanks
[Magisk] DenyDarko:
Attached

h1:/ # /data/adb/magisk/busybox ps --help
BusyBox v1.28.0-topjohnwu (2018-02-06 05:40:21 CST) multi-call binary.

Usage: ps [-o COL1,COL2=HEADER] [-T]

Show list of processes

-o COL1,COL2=HEADER Select columns for display
-T Show threads
h1:/ #

PS: Commands ran as root.
[Magisk] Jaymin.0.1910:
Thanks
[Magisk] Jaymin.0.1910:
A new release is up

Hi all, a new release has just been pushed with many bug fixes and complete re-analysis of the project, OP will soon be updated, but you can see the release note via Magisk Manager ( or at GitHub )

EDIT :- OP updated, see the OP for the release note
[Magisk] DenyDarko:
New version fixed my issues.

Awesome :)
[Magisk] Jaymin.0.1910:
Thanks, and I would also like to thank you for help with the time-based manual run bug debugging
[Magisk] Abomb:
With version 1.3 install works fine, when running mcc --info I get "references could not be set", logs attached.
[Magisk] Jaymin.0.1910:
Was the charger connected ?? If not, please try again with it connected and report back

EDIT :- Thanks to you, I found a small spelling mistake in the Installer
[Magisk] Abomb:
Glad I could help :)

When I ran this it was connected to my PC, tried again with it connected to a wall socket, now it did work. Just one more thing, it says the daemon is not running, when I start it it says it did start, but --info still shows daemon as not running.
[Magisk] Jaymin.0.1910:
Can you try the build attached above ??
[Magisk] Jaymin.0.1910:
The 'daemon not running' issue seems weirder, can you run

/data/adb/magisk/busybox ps

so that I can analyze the running processes ??
[Magisk] Abomb:
I attached the output.

When I try to install the zip in magisk manager I just get:

- Copying zip to temp directory
! Installation failed

Edit: forgot attachment
[Magisk] Jaymin.0.1910:
Did the installation fail with the attached zip ?? From the output, mcc actually is not running, do you have any Task Killer or something like that ?? Also screenshot mcc --info and attach
[Magisk] Abomb:
Yes, the install of the attached zip fails. 1.3 "regular" version (downloaded/installed in magisk manager) is still installed though.

I attached the mcc --info output (did it from my PC as it's easier to capture the output, but output is the same when running on device.

I also ran "/data/adb/magisk/busybox ps" again after running mcc --info, I might have done that the previous time before running mcc --info. Oh and I don't use a task killer or anything similar.

Edit: I left my phone charging over night and apparently it works, mcc --info also says the daemon is running.
[Magisk] sandaljrpit:
seems to be going well..

Thanks :)
[Magisk] pat357:
The new v1.23 in OP is a corrupt zip file (fails standard zip CRC check).

Can you fix this please ?
[Magisk] pliniohcc:
Version 1.3 installed and working perfectly after 2 reboots on Moto X Play (lux).

Thanks a lot for the module!
[Magisk] Jaymin.0.1910:
It wouldn't be, I signed that one using test keys by [MENTION=4544860]osm0sis[/MENTION]' handy shellzip signing tool for Linux

Are you talking about the version 1.3 ?? that one was signed completely manually
[Magisk] RSDamasceno:
Hey, friend.

In this last version I had super heating followed by soft reboots and I believe it is related to its module. Since after uninstalling it, I can fully charge without this behavior.

Are the log files cited enough or do you need something more in this case?

Moto G 2014

DotOS

Android 7.1.2
[Magisk] Jaymin.0.1910:
Got the culprit, I will include a fail-safe check for that, thanks for reporting

I will create a script that would gather me logs for if the device is supported by the module, I will ask you back when that's done coding, is it OK ?
[Magisk] lvbaal:
Perfectly fine, thanks! Looking forward to resolving this on my device. It's such a great mod :)
[Magisk] RSDamasceno:
Take your time. ;)
[Magisk] piptron:
Still fails. Please help
[Magisk] Jaymin.0.1910:
I am working on a compatibility debug logs script, will ask you back:)

See above:)

EDIT :- Meanwhile, can you check if any directory upto the file /sys/devices/soc.0/78b8000.i2c/i2c-4/4-0055/power_supply/battery/uevent is a symlink ??
[Magisk] Jaymin.0.1910:
Definitely good, but not for you until now, can you check for the symlinks ?? See my previous post
[Magisk] piptron:
device and subsystem folder have symlinks symbols beside them
[Magisk] Jaymin.0.1910:
OK, got it, can you upload the file that I quoted in the previous post ??
[Magisk] lvbaal:
Terminal output [[ command

[Mention=8570610]MCMotherEffin' [/Mention] Earlier today you asked me in pm to supply output of [[ command. I replied but don't see reply in sent items, so I'm not sure if it reached you. Here's the screencopy in attachement.
[Magisk] Jaymin.0.1910:
Got the output, thanks
[Magisk] Zohair.ul.hasan:
Got till here, couldn't find anything called "78b8000.i2c".

Also, the folder name was soc0, not SOC.0.
[Magisk] Jaymin.0.1910:
[MENTION=4299075]Estel78[/MENTION],

Are you up for testing ??
[Magisk] piptron:
Here you go. Just rename and remove the ".zip"
[Magisk] pat357:
flash via TWRP - signature verification

[MENTION=8570610]MCMotherEffin'[/MENTION]

Signature verification failed. Details in attached recovery log.

Recovery log :
[Magisk] Estel78:
[MENTION=8570610]MCMotherEffin'[/MENTION]

Yes I am, just give a sign when the voltage-dependent things are ready for a test run. If it would include a way to disabler vanilla 0%-shutdown, it would be great, too (I'm using "Battery Shutdown Manager" xposed module for that, but it is not ideal - at 0%, fuel_alerted keeps device awake, prohibiting deep sleep. At this point, I am at around two days of active use juice left, mind you).
[Magisk] Jaymin.0.1910:
ShutDown disabler would not be possible, since mcc is written into Shell, but for the voltage-based control, can you upload your uevent file ??
[Magisk] Jaymin.0.1910:
[MENTION=1861039]lvbaal[/MENTION], [MENTION=8833564]piptron[/MENTION], I have attached the debugger script in the 4th post, run it and upload the resulting file for me to analyze
[Magisk] lvbaal:
Uploading 'mcc_debugger.log'

That's what the XDA Forums app tells me anyway. But I doubt it's doing the job

I will post from pc in a while...

[Mention=8570610]MCMotherEffin' [/Mention] here's the log in attachement (can you confirm by the way that this uploading is not supported in the Android XDA Forums app?)
[Magisk] Jaymin.0.1910:
The log file says there is no writable switch in your device, also your device follows non-standard naming system, I have updated the debugger according to those, try that and report back
[Magisk] lvbaal:
Script reports a syntax error. Can you confirm?

see attached screenshot
[Magisk] Jaymin.0.1910:
It got updated just now, can you try that, BTW, the older did not have any errors, might that be Shell portability issue, try the new one
[Magisk] lvbaal:
Here's the new log in attachement
[Magisk] piptron:
Here
[Magisk] Jaymin.0.1910:
It again got updated, try the newer, apologies for the inconvenience

It again got updated, try the newer, apologies for the inconvenience
[Magisk] piptron:
What do you mean updated? Where is the new debugger? I tried in the 4th post mostly permission denied. See my log above
[Magisk] lvbaal:
Here's the log again in attachement
[Magisk] Jaymin.0.1910:
Permission denied ? where ?? The updated one is in the 4th post

Thanks, can I send you a test build ??
[Magisk] piptron:
New log
[Magisk] Davin093:
Hello sir!

Right straight to the problem: The auto shutdown is not working for me. My phone is Xiaomi Mi 5s Plus running official Lineage 15.1. Hope you are happy to help! Thanks
[Magisk] emcuevas:
can you make a GUI for this?
[Magisk] Jaymin.0.1910:
[MENTION=8833564]piptron[/MENTION], [MENTION=1861039]lvbaal[/MENTION], the test build is attached
[Magisk] piptron:
I got these.
[Magisk] lvbaal:
Yes please
[Magisk] lvbaal:
Installation failed - here's the install_log
[Magisk] Jaymin.0.1910:
Attach these log file, /cache/mcc_env.log, /cache/mcc_err.log, and /sbin/.core/img/mcc/cache/verbose.log

The current solution is based on Shell scripting, and I am currently working on writing a C program for this, so this will become fast as hell and will no longer be dependant on BusyBox, if the binary works fine, I will write a GUI for this, too

mcc could not verify that the switch could resume charging, I will send you a new build with a little workaround

The worst is that your device actually does not have the ability to stop charging, it is missing a switch for that
[Magisk] papoy1019:
How to know if there is a switch or not? What file is that?
[Magisk] lvbaal:
Hmm, so mcc will never work on my device then? It's a pity. Or will you be looking into it further and find a workaround maybe?
[Magisk] Jaymin.0.1910:
In Unix, everything is a file, and a switch is just a file which that can switch charging status, mcc parses through uevent files to find the device ( driver ) or the module that handles charging and then tests all the boolean switches if they switch charging status

The entire mechanism is written in set_ctrl_refs() function in the Main

If the driver does not support the feature, there is no workaround rather than to develop a new driver, which, is not possible
[Magisk] papoy1019:
Ah, I guess my device Asus Zenfone Selfie Z00T running LOS 14.1 doesnt have that driver or module, that's why incompatible.

Anyways, thanks?:good:
[Magisk] Jaymin.0.1910:
Not sure, some devices have the ability, but do not report charging re-enabled, and mcc usually discard them, logs will be nice to tell exactly
[Magisk] papoy1019:
May I post my log here? For you to check.
[Magisk] Jaymin.0.1910:
That is a sure thing
[Magisk] papoy1019:
Thanks ahead!
[Magisk] Davin093:
Hello sir!

also mcc_err.log is empty(0byte) so couldn't upload it here.