topjohnwu / Magisk

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

[dumpling] [Lineage 16] [log] Magisk Manager losing root #1430

Closed bthylafh closed 5 years ago

bthylafh commented 5 years ago

Logcat and Magisk Manager log attached per the wiki's troubleshooting article. I'd post in the XDA thread as directed but my logcat file is much too large for Pastebin.

Device: OnePlus 5T (dumpling) Operating system: Lineage 16 2019-05-04 Problem: I lose root at unpredictable times. I've set Magisk Manager to not have its battery optimized, and I've verified that it's not listed in Greenify.

magisk.log

2019-05-05-18-33-06.txt

rawlife56 commented 5 years ago

Can confirm this too on Beryllium (Poco) after the Magisk 19 stable update with the latest Lineage build.

bthylafh commented 5 years ago

Happened again sometime overnight. Set of logs for this incident attached.

FWIW when I woke the phone this morning there was a notification that there's a new build of Magisk Manager. I'm pretty sure it did this yesterday also. Mentioning in case the update function could be involved.

2019-05-06-22-17-07.txt magisk.log

bthylafh commented 5 years ago

Updated to newest Manager.

magisk.log 2019-05-07-19-41-40.txt

bthylafh commented 5 years ago

Data point: as a workaround I created a MacroDroid job to reboot my phone at 0500 local daily, which requires root and therefore that Magisk be working. This morning it worked as expected, which narrows down the window of when Magisk goes catatonic to between 0500 and 0630, when my alarm goes off.

androidacy-user commented 5 years ago

Sounds like the magisk daemon is getting killed to me, which a command from terminal or reboot would solve

TLATER commented 5 years ago

@alexa-v2 That's most likely the issue, but it's really annoying to reboot your phone every 5 hours. Especially if it handily prompts you that you need to install the already-installed magisk every time it happens (I want update notifications, not my-daemon-crashed-again notifications).

It would be really nice if there was a documented workaround or even a patch to resolve this, so the issue remains relevant.

bthylafh commented 5 years ago

@alexa-v2, do you have a terminal command that someone should try?

I gave up on it and went back to using Lineage's su instead, which doesn't do as much as Magisk, but will at least do it reliably.

androidacy-user commented 5 years ago

You could issue the magisk --daemon command to start the magisk daemon

Problem is, you need a root shell to do anything with magisk daemon.

My advice would be to set ro.secure=0 and ro.adb.secure=0 (via magiskhide props config module or similar). That way, adb shell always be root and can be used to manage magisk. The next issue to tackle would be to run the magisk --daemon command regularly, but if you had a PC you could start it via adb

Another solution is to use termux: type su to get a root shell and leave open. Issue the command as necessary

Ironically I could never get los su to work right but I tried on Resurrection Remix

androidacy-user commented 5 years ago

I've never had issues on RR, even with aggressive battery on

Please note that the actual magisk daemon isn't part of manager and whitelisting it may not help

topjohnwu commented 5 years ago

1423