topjohnwu / Magisk

The Magic Mask for Android
GNU General Public License v3.0
47.6k stars 12.09k forks source link

su randomly dissapears #2031

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hello, I'm running Magisk and Manager versions 20.2-7da97489 and 7.4.1-7da97489 (Canary Debug channel, although this I can reproduce on the release channel) on LineageOS 16.0 dipper 20191103 nightly, and occasionally, some time after boot, the su binary disappears from /sbin:

1|dipper:/ $ ls /sbin
chargeonlymode charger magisk magiskhide magiskinit magiskpolicy resetprop supolicy ueventd watchdogd
dipper:/ $ # ran in an ADB shell, but reproducible through termux

Invoking /sbin/magisk su still causes the superuser request prompt to appear and, upon granting permission, the root shell to work. There's nothing interesting in the Magisk log, attached below, and so far the only thing I noticed that was off about Magisk is that single executable going missing.

Logs and ls /sbin here

I've done more elaborate testing beforehand but, sadly, I had to reflash Lineage, and with it Magisk, so I discarded the results as out of date.

Another possibly useful detail is that I had formatted data at one point before this started happening, but clean reinstalling Magisk (and now reflashing + reinstalling Magisk, without wiping data) didn't help.

I've noticed that Magisk Manager works until it's unloaded by removing it from recent apps, presumably because it already has a shell open with libsu or something. I can even enable/disable/install/update modules!

EDIT: When it comes to Magisk Hide configuration, almost nothing is hidden, just the default parts of Google Play Services.

topjohnwu commented 4 years ago

That is 100% just some random fluke, as it seems the daemon started up just fine, and other applets also exists

ghost commented 4 years ago

I'd not be so sure, since I've been getting this for quite a while (actually, a few days, around the time I wiped /data) now consistently. Yes, the daemon runs fine, but after ~20min (last time around) the su binary alone disappears

EDIT: The time to reproduction seems to be based on use, and I can't get solid reproduction steps, but the result is always the same: su is gone, magisk su works, other applets are there