yashsingh1/xdaforums huggingface dataset:
[Magisk] ugvpkn:
$ su

getprop | grep -E 'product|build|kernel|cpu' <

[persist.audio.product.identify]: [angler]

[ro.bootimage.build.date]: [di 20 feb 2018 9:56:27 CET]

[ro.bootimage.build.date.utc]: [1519116987]

[ro.bootimage.build.fingerprint]: [google/angler/angler:8.1.0/OPM1.171019.018/kantje02200956:userdebug/test-keys]

[ro.build.characteristics]: [nosdcard]

[ro.build.date]: [di 20 feb 2018 9:56:27 CET]

[ro.build.date.utc]: [1519116987]

[ro.build.description]: [angler-user 8.1.0 OPM3.171019.014 4503998 release-keys]

[ro.build.display.id]: [OPM1.171019.018]

[ro.build.fingerprint]: [google/angler/angler:8.1.0/OPM3.171019.014/4503998:user/release-keys]

[ro.build.flavor]: [angler-userdebug]

[ro.build.host]: [Phoenix]

[ro.build.id]: [OPM1.171019.018]

[ro.build.product]: [angler]

[ro.build.selinux]: [0]

[ro.build.tags]: [release-keys]

[ro.build.type]: [user]

[ro.build.user]: [kantjer]

[ro.build.version.all_codenames]: [REL]

[ro.build.version.base_os]: []

[ro.build.version.codename]: [REL]

[ro.build.version.incremental]: [eng.kantje.20180220.095627]

[ro.build.version.preview_sdk]: [0]

[ro.build.version.release]: [8.1.0]

[ro.build.version.sdk]: [27]

[ro.build.version.security_patch]: [2018-02-05]

[ro.product.board]: [angler]

[ro.product.brand]: [google]

[ro.product.cpu.abi]: [arm64-v8a]

[ro.product.cpu.abilist]: [arm64-v8a,armeabi-v7a,armeabi]

[ro.product.cpu.abilist32]: [armeabi-v7a,armeabi]

[ro.product.cpu.abilist64]: [arm64-v8a]

[ro.product.device]: [angler]

[ro.product.first_api_level]: [23]

[ro.product.locale]: [en-US]

[ro.product.manufacturer]: [Huawei]

[ro.product.model]: [Nexus 6P]

[ro.product.name]: [angler]

[ro.vendor.build.date]: [Fri Dec 15 01:24:03 UTC 2017]

[ro.vendor.build.date.utc]: [1513301043]

[ro.vendor.build.fingerprint]: [google/angler/angler:8.1.0/OPM3.171019.014/4503998:user/release-keys]

[ro.vendor.product.brand]: [google]

[ro.vendor.product.device]: [angler]

[ro.vendor.product.manufacturer]: [Huawei]

[ro.vendor.product.model]: [Nexus 6P]

[ro.vendor.product.name]: [angler]
[Magisk] priantomo:
Any solution about my log? I can't install this tweak in xiaomi mi a1 using nougat citrus-caf rom
[Magisk] ugvpkn:
Suggest you read the previous few posts. MCC cannot be installed with the latest magisk.
[Magisk] Jaymin.0.1910:
New release is up

Hi users,

A new build is up in Magisk repo, which includes fixes, improvements and features, this build includes some internal changes that are not compatible with any previous build, so if you are upgrading from a previous build, I'm afraid you will lose your previous settings, also some pieces of code has been re-written to improve performance and reliability, I have also rebased some tests ( internal ) on the wide experience I have gained while developing this module

Hi developers,

If some developer here at XDA is using SuperSU to root their device and is willing to port this mod to be used with SuperSU root, I have some ideas about that ( I never have used SuperSU, just a little week I put my hands on SuperSU ), please PM me about that and I'm sure it will be available for SuperSU users, too

The complete changelog is here

version Name :- 1.2.1

version Code :- 201802251

* All previous versions are considered incompatible

* Fix installations for Magisk Manager 5.6.0+

* Fix some faulty busybox setup code

* Correct some terminology ( see 'Arguments can be' )

* Improve the [ --re-daemon ] option

* Change defaults to 80 70 ( it be optimal )

* Rewrite README ( which directly means [ --help ] )

* Add messages to UI for some tasks

* Reduce checking intervals to 10ms

* Reduce max switches to two from four

* Add error handling for new code

* Port commit from Magisk to mcc Installer

* --> 'Round sizes to nearest integer'

* --> also repair image first if found

* Put errors to a separate logfile

* Rebase some tests on common observations

* Remove and re-write some pieces of code

* For developers

* --> Revert the source mcc feature, to keep the code clean
[Magisk] pat357:
I can't get this new version to work on my Sammy S8+.

The phone and "mcc -info" both tell the battery is charging, but it stays at exactly the same level.

It looks like the charging process is keeping the battery level at a constant value : even after 2h charging the level is the same.

Is this a matter of taking the "wrong" switch ?

I do not understand this problem because an earlier version was working perfect.

See my post https://xdaforums.com/showpost.php?p=75305932&postcount=3

Phone specs : see sig.

What can I do to debug this ?
[Magisk] Jaymin.0.1910:
Hi,

From the description, it seems like a "wrong" charging switch has been set

So firstly please run

mcc --reconf

as it is meant to re-configure all the kernel refs

Even after that the issue persists, reboot the device and run that again and attach /sbin/.core/img/mcc/mcc.conf and /sbin/.core/img/mcc/cache/*

EDIT :- I removed some code that handled permissions of kernel refs, that might be causing the issue since not all kernels give standard permissions, but let's check the above one first
[Magisk] Ali.G:
I installed the latest version but I cannot get it to force charge it to 98/99% and disable @ 80%

Is there a new code for it?
[Magisk] Jaymin.0.1910:
Hi,

What did you run ??

In the newer version, you wil need to run

mcc --force --switch 98 80
[Magisk] MoHed:
Latest version did not work.

Used previous version OK.

One Plus 3T OB22, Magisk 16, Xposed, stock kernel.

Installed latest version. Install OK. Configured (new config) OK.

Latest version did not stop charging after threshold was reached. Continued charging after it was due to stop.

ScreenShot included. This has been taken immediately after manual disconnection from charger.

Reverted to old version (after downgrading Magisk), working well without problems.
[Magisk] Ali.G:
I did force reset! Thx for the answer
[Magisk] pat357:
You mean this part :

# Make sure all switches are readable
for i in 1 2 3 4; do
switch=$(sed -n s/^switch_$i=//p ${0%/*}/mcc.conf | awk '{ print $1 }')
if [[ $switch == dummy_Path ]]; then break; fi
chmod u+r $switch
done

I did a "mcc -reconf" again, restarted the phone and did another "mcc -reconf" : at this moment it didn't start charging (although it should).

So I did a another reboot and did --reconf again.

Now it charges, but went over the upper limit (it went straight to 100% full as I was not looking).

"mcc -info" shows everything is running and on.

The mcc.conf + the cache dir is in the attached zip.
[Magisk] chaostrodamis:
Same here, followed these same procedures and got that same result. Charged straight to 100
[Magisk] JustinTrouble:
I upgraded to the new version, and it's now ignoring the upper limit too. I tried a reconf and force too.
[Magisk] Ali.G:
Looks like it is ignoring the top threshold.
[Magisk] pat357:
I want to report a discrepancy between what is shown by "mcc --info" and "--re-daemon".

First I did a mcc --info and it reported the daemon as ON.

Right after this I did a mcc --re-daemon and it told me the daemon was NOT running and was now launched.

I saw in the code that all values like the state from the daemon are almost real-time.

So I wonder what could have caused the above.
[Magisk] Jaymin.0.1910:
Hey, in mcc --info, you see that under 'Current settings' which means its enabled in the mcc.conf, nothing more than that, while mcc --re-daemon checks for the process and shows output

EDIT :- I will include a note about it in the next build

EDIT_2 :- I'm glad you looked into the code, most people don't even see what's the truth before posting things
[Magisk] Jaymin.0.1910:
Hi all,

I mistakenly wrote a _ instead of a - in the service script ( I was lacking a tea ), so you all will have to manually run

mcc --re-daemon

after rebooting or else the daemon will not be launched, it's nothing related to wrong switches or something since I have programmed it to be quite intelligent, The next build contains this and some other fixes, too

It's just a matter of a sign ( a single sign breaks it all in programming )

Please forgive me this
[Magisk] kamilmirza:
[MENTION=8570610]MCMotherEffin'[/MENTION]

tried installing v1.2.1 (from MM) - failed to install

attaching magisk logs

oneplus3 - Xtended ROM - permissive - 8.1
[Magisk] Jaymin.0.1910:
Yes, I meant that code and some other from the Main mcc script

debugging is no longer needed, was just a matter of a wrong sign in the service script that prevented daemon from being launched

You can replace

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

with

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

if you don't want to wait for the next update and the daemon will be good launching at boot

BTW, since mcc daemon was not launched after booting, the issues you experienced are completely unrelated to mcc
[Magisk] Jaymin.0.1910:
It works well with OP3, but it might be that permission issue since I can't see anything in the logs, please wait for the next update :)

Also it doesn't matter permissive or what, different kernels have different code for handling charger connections, that's why I'm asking which kernel ??
[Magisk] kamilmirza:
mady's Xtended - baked in ROM

here's the link

https://xdaforums.com/oneplus-3/one...lopment/kernel-mady-s-xtended-kernel-t3739378
[Magisk] pat357:
Can I do the replace directly in /magisk/mcc/service.sh ?

Or should I correct in the .zip and reflash the .zip ?
[Magisk] Jaymin.0.1910:
Do it directly, but use some good text editor that doesn't mess up
[Magisk] pat357:
I use Qedit Pro from PS.

Excellent editor, well worth it's price.
[Magisk] sandaljrpit:
Work fine in my device MI4 LTE Cancro.

:)
[Magisk] DerMetzgermeister:
I used the code editor from MiX file explorer and now it's fine. Thank you.
[Magisk] kamilmirza:
well I tried Caesium kernel for OnePlus 3

still the installation failed

Caesium kernel link : https://xdaforums.com/oneplus-3/one...pment/kernel-caesium-kernel-op3-op3t-t3672090
[Magisk] Trevomader:
Hello, i was able to install it in my A910f but typing mcc with any argument only returns the number 1 in the next line.

Ie typing mcc --info only returns 1 in the next line.

Any ideas?
[Magisk] Jaymin.0.1910:
Can I send you a test build ??
[Magisk] Jaymin.0.1910:
Flash the latest zip and see again, if you still get the same result, ask again
[Magisk] Trevomader:
Well this issue happened with the latest version available at magisk, and there doesn't seems to be an update so the problem persists, anyway thanks for the help.
[Magisk] Jaymin.0.1910:
Hey,

Please provide magisk logs and /cache/mcc_env.log ( if it is there )
[Magisk] Jaymin.0.1910:
Reverting Magic Mount

Hi all users,

mcc has a feature "Flash again to uninstall", which is quite self-explanatory, and as mcc supports boot mode installation only, to perform a complete uninstallation, it will need to revert the Magic Mounted /system/xbin/mcc live from booted Android, I've wrote some code for this for Magisk >= 1410 ( beta 14.1 ), but to implement this to Magisk 1400 ( stable 14.0 ), I need your help as topjohnwu has changed the Magic Mount algorithms

If you are running the Magisk 14.0 stable version, please provide me the output of followings

grep ' /system/.bin/mcc ' </proc/mounts
grep ' /system/.bin ' </proc/mounts
[Magisk] Jaymin.0.1910:
New release is up

Hi all,

here is a new release which improves code, fixes bug and compatibilty for some devices, but adds no new feature

What's New

# 1.2.2

* Fix daemon not being launched at boot ( was my bad )

* Fix some faulty image resizing code in mcc Installer

* Fix unwanted power-offs for when no references are set

* Fix regression opened by [MENTION=4970217]pat357[/MENTION]

* --> show daemon status ( runnning or what ) in [ --info ]

* Add perms handling for non Stock / near Stock kernels

* Increase checking intervals from 10ms to 100ms

* --> which is likely to fix some compatibility check failures

* Add double checking for uevent file

* --> which is likely to fix some compatibility issues

* Flash again to uninstall feature now performs a complete uninstall

* --> 1) remove files 2) kill mcc processes and 3) revert Magic Mount

* --> it will revert Magic Mount live from booted Android!!!

* --> the last one is available only for magisk versionCode >= 1410

* --> as topjohnwu has changed the Magic Mount algorithms many times

* --> for those older versions, mcc will yield "It's uninstalled"

Note

I still need help regarding the above post titled 'Reverting Magic Mount'
[Magisk] kamilmirza:
yes sure

EDIT: lol sorry saw the update

will try and report back

cannot find MCC in Magisk repo, why removed?
[Magisk] Abomb:
After updating to 1.2.2 I just get the error "- Abort :- Your device don't support these functionalities" when running mcc --info. 1.2.1 worked fine. Here are the logs (magisk, mcc-env and mcc-error): https://transfer.sh/8WVso/logs.zip
[Magisk] kamilmirza:
installation failed with v1.2.2 , Magisk v16

attached the log

OnePlus 3 | Xtended 8.1 ROM | Caesium kernel
[Magisk] sandaljrpit:
Hallo...

1.2.2 not work :)

I use Magisk Manager 5.6.1 and magisk v16.0
[Magisk] yeye.phone:
hello,

i want to try this module but when i install it trought TWRP i have the message :

abort : please install in boot mode.

In when i install directly with Magisk Manager i have this :

- Copying zip to temp directory
- Installing MCs_Charging_Controller-1.2.2.zip

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

MC's Charging Controller

by MCMotherEffin' @ XDA Developers

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

- Please make sure the device is charging

- Checking compatibility...

sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
cat: read error: Invalid argument
cat: read error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
- OK

- Creating /data/adb/magisk_merge.img...

Creating filesystem with parameters:
Size: 67108864
Block size: 4096
Blocks per group: 32768
Inodes per group: 4096
Inode size: 256
Journal blocks: 1024
Label:
FLEX_BG size: 0
Blocks: 16384
Block groups: 1
Reserved block group size: 0
Created filesystem with 11/4096 inodes and 1286/16384 blocks
- Mounting /data/adb/magisk_merge.img...

losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
- Abort :- Could not mount /data/adb/magisk_merge.img

Failed!
! Installation failed

I use MagiskManager 5.6.1 and magisk v16.0, MCC 1.2.2 and busybox (module magisk) 1.28.1

Best regards
[Magisk] pat357:
Thanks for the new version !

I took a quick look at the code and noticed the following minor things :

1. In --launch-daemon (L523)

while $(auto_shut) || $(auto_switch) && $(daemon_mode); do

Because && has priorty over || , this is equivalent to :

while $(auto_shut) || { $(auto_switch) && $(daemon_mode) ; }; do

But I suppose you want this instead:

while { $(auto_shut) || $(auto_switch) ; } && $(daemon_mode); do

2. under charge() you have (L380) :

if reset_perms; is_charging; then switch_ OFF; fi;

It might work like that, but this is more clear I guess :

reset_perms; if is_charging; then switch_ OFF; fi;

Also because reset_perms() has no return value.

3. In set_ctrl_refs() you have (L274) :

if grep -q ^POWER_SUPPLY_NAME=.*batt.*$ $uevent && grep -q ^POWER_SUPPLY_STATUS=Charging$ $uevent; then

Maybe this change is made intentionally : is it true that POWER_SUPPLY_STATUS can only be exact "Charging", when charging ?

In earlier version you used POWER_SUPPLY_STATUS=.*[Cc]harging$ ...which allows all different variants, but also matches "Not Charging" :cyclops:

4. Why you've started adding a ; after each command ?

I know you have to do it when you write different commands one the same line, but for only one command on a line ?

usleep 10000;
[Magisk] Jaymin.0.1910:
Identified as a typo in busybox setup code, will be fixed with the next update
[Magisk] Jaymin.0.1910:
I will fix that in the next build
[Magisk] Jaymin.0.1910:
Again typo in busybox setup code, will be fixed
[Magisk] Jaymin.0.1910:
It seems you have no free loop devices, can you post the output of

for i in 0 1 2 3 4 5 6 7; do losetup /dev/block/loop$i; done;
[Magisk] Jaymin.0.1910:
Hi,

Thanks for the detailed report

Firstly, there is no priority btw && and ||, they are boolean operators, and which is parsed first ( by the shell ), gets evaluated first, and my implementation will first check is auto shut is toggled ON, if yes it'd skip auto switch and check for if daemon is toggled ON, if yes, execute the loop, else break, and if auto shut is not toggled ON, it'd check for auto switch and if that's ON, it's check for daemon and then the same, I used || first and then && just to avoid the need of those curly brackets because using them is unreliable with boolean operators in shell ( even though so many developers do that, oogh )

You are right about the code being clear, will do that, but just for correction, in shell, return code of a function is the return code of the last command in that function, so reset_perms() does have a return value, but has no effect as we called is_charging() after that

Yes, I made it intentionally because after seeing so many devices ( incl. weird ones ), I couldn't find any device that has 'charging' instead of 'Charging', but I'd also include 'charging' from now, and for the previous version, I lacked a tea while coding that one, so I mistakenly included 'Not charging' or 'Discharging', too ( was my bad )

Yep, I don't need them, but I have also started coding in Java, C, and other languages, so with different langs comes different styles, so i started adding ';' in my projects written in shell, too, please understand
[Magisk] yeye.phone:
Thanks, see text file.

What i need to do to have free loop ?
[Magisk] Jaymin.0.1910:
Which modules / root apps are you using to save space on your sdcard or control your sdcard storage usage ??

Also, can you post the output of

for i in 0 1 2 3 4 5 6 7; do grep " /dev/block/loop$i " /proc/mounts; done;
[Magisk] yeye.phone:
With

for i in 0 1 2 3 4 5 6 7; do grep " /dev/block/loop$i " /proc/mounts; done;

i have :

127|a3xelte:/data/data/com.termux/files/home #
rep " /dev/block/loop$i " /proc/mounts; done; <
1|a3xelte:/data/data/com.termux/files/home #

To save space i use SD Maid and this which is integrated in samsung phone.
[Magisk] Jaymin.0.1910:
Hey,

I want to apologize for the code asked you to run was faulty, please post the output of

for i in 0 1 2 3 4 5 6 7; do grep "^/dev/block/loop$i " /proc/mounts; done;
[Magisk] yeye.phone:
ok, i have :

2|a3xelte:/data/data/com.termux/files/home #
rep "^/dev/block/loop$i " /proc/mounts; done; <
/dev/block/loop0 /system/etc/sysconfig/google.xml ext4 rw,seclabel,relatime 0 0
/dev/block/loop0 /system/priv-app/Greenify ext4 rw,seclabel,relatime 0 0
/dev/block/loop0 /system/xbin/busybox ext4 rw,seclabel,relatime 0 0
/dev/block/loop0 /sbin/.core/img ext4 rw,seclabel,relatime 0 0
1|a3xelte:/data/data/com.termux/files/home #
[Magisk] Jaymin.0.1910:
OK, so I think some bad app / script might have messed up, now you simply need to run

for i in 1 2 3 4 5 6 7; do losetup -d /dev/block/loop$i; done;

and all the loop devices will be detached, and you can install mcc afterwards

remember to not include '0' this time, or it'd mess up Magic Mount
[Magisk] yeye.phone:
I do the command, but i have again the same errors.

With twrp

abort : please install in boot mode.

directly with Magisk Manager :

- Copying zip to temp directory
- Installing MCs_Charging_Controller-1.2.2.zip

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

MC's Charging Controller

by MCMotherEffin' @ XDA Developers

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

- Please make sure the device is charging

- Checking compatibility...

sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
cat: read error: Invalid argument
cat: read error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
sh: write error: Invalid argument
- OK

- Creating /data/adb/magisk_merge.img...

Creating filesystem with parameters:
Size: 67108864
Block size: 4096
Blocks per group: 32768
Inodes per group: 4096
Inode size: 256
Journal blocks: 1024
Label:
FLEX_BG size: 0
Blocks: 16384
Block groups: 1
Reserved block group size: 0
Created filesystem with 11/4096 inodes and 1286/16384 blocks
- Mounting /data/adb/magisk_merge.img...

losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
losetup: /data/adb/magisk_merge.img
- Abort :- Could not mount /data/adb/magisk_merge.img

Failed!
! Installation failed

Is there no mistake in the command ?
[Magisk] Jaymin.0.1910:
No, you need to flash the zip right after detaching all the loop devices, without rebooting
[Magisk] yeye.phone:
ok, i flash directly with magisk manager detaching all the loop devices and i have a different error :mad: see log.
[Magisk] Jaymin.0.1910:
Firstly, make sure device is charging

Then, Which device, ROM, kernel are you using ??
[Magisk] yeye.phone:
Yes my phone is charging. But while MCC try to install, something stop charging. I need restart my phone to charge again.

I'am on Samsung galaxy A3 2016 (sm-a310f) stock rom and kernel on android 7.0
[Magisk] Jaymin.0.1910:
That's mcc's compatibility check which stopped charging, do you mind some debugging / testing ??
[Magisk] Jaymin.0.1910:
New features

Hi users,

I just want to ask which new features do you wish to see in the next mcc build ?? Quote this post.

The developer,
[MENTION=8570610]MCMotherEffin'[/MENTION]
[Magisk] yeye.phone:
Sure, see below

The phone stop charging during "checking compatibility"
[Magisk] Jaymin.0.1910:
Looking t the screenshots, something running in background is taking up all the loop devices, you might need to find what or you wouldn't be able to flash any Magisk module
[Magisk] Jaymin.0.1910:
New version released

See the OP and the second post for what's new, zip file will be pushed soon
[Magisk] kamilmirza:
tried installing v1.2.4

stuck at

Checking Compatibility...

OnePlus 3 | Xtended 8.1 ROM | Caesium kernel
[Magisk] JustinTrouble:
Same here. At work so can't provide logs.
[Magisk] Abomb:
Same here. Where would logs be saved? Magisk Manager just crashes after a while and does not generate any logs for the module installation.
[Magisk] pat357:
Where do you guys get the new v1.24 zip file ?

I can't see any links to it in OP ... :confused:
[Magisk] sandaljrpit:
tried installing v1.2.4

stuck at

Code:

Checking Compatibility..

1.2.1 work fine in my xiaomi MI4 LTE
[Magisk] cambr1an:
Same here. Stuck at Checking Compatibility, then Magisk crashes.
[Magisk] Abomb:
I don't have the file, I was just installing through Magisk Manager.
[Magisk] Jaymin.0.1910:
Fixing regression

See the next post
[Magisk] Jaymin.0.1910:
Fixing regression

Hi

Here is a build that will provide me verbose logs to find out what is bad with the new build, please install it and attach /cache/mcc_install.log

Thanks

[MENTION=8570610]MCMotherEffin'[/MENTION]