Early this year (2025), i had updated magisk from 28.1 to 29.0, but after the reboot i noticed that it now showed:
Magisk
Installed: N/A
Zygisk: Yes
Ramdisk: YesAnd i still had adb root access and the magisk daemon was still running (running magisk -v inside adb or a terminal emulator).
When i encountered it, i researched and found that it had already been reported and also seemingly merged, but no new version was published and i didnt want to manually compile magisk in fear of breaking things.
Now that 30.1 (beta) (and actually 30.2 (beta)) have been released, i updated the app, but to no surprise the output was still the same. So i got to investigation on how to manually upgrade the daemon.
I had not found any documentation on how to manually initiate a upgrade with the magisk cli, and only found "you need to manually patch boot.img", which is not something i wanted to do and potentially break my install with all data on it.
While somewhat aimlessly searching the filesystem for boot.img i came across /cache/magisk.log and noticed that the following
lines appear when i start the magisk app: (note that i dont have the exact lines anymore, so approximately)
08-07 20:03:05.677 975 977 W : Root access is disabled!
08-07 20:03:05.678 975 977 W : su: request rejected (2000)So i got to thinking, if i find the setting in the magisk config and change it, would it allow me to grant root acces again?
And thankfully, due to my searching around the repository issues, i had come across that magisk stores its config in
/data/adb/magisk.db, a sqlite database.
So i just pulled it to my desktop, investigated it, and found that i could set in table settings row root_access from 0 to 1.
After the modification i pushed the database (with a backup of the original of course) to the same place, rebooted the device, and voila, the magisk app had root access again and i could successfully upgrade the daemon to 30200.
Finally, now that i had successfully recovered from that situation, i wanted to share how i did it as there was no official guidance other than "patch boot.img manually".
- Update the magisk app (if no new stable version is out, change the update channel to
beta) - if there are multiple updates to the app, install those until you are at the latest (or know what you are doing)
- Open a adb shell (
adb shell) - verify that magisk is installed and running via
magisk -v- you should see something along the lines of
29.0:MAGISK:R
- you should see something along the lines of
- exit the adb shell
- verify that you can do
adb root- if it gives you a note that you can enable in developer settings, do it. If not, then this guide is not for you
- run
adb rootagain to restartadbdas root - open a shell as root:
adb shell - verify you are root via
whoami - navigate to
/data/adb/ - take a backup of the database via
cp magisk.db magisk.db.bak - run
magisk --sqlite "UPDATE settings SET value='1' WHERE settings.key='root_access';"- NOTE: i have not actually used this command, i first pulled the db to my desktop and modified the setting with
sqlitebrowser, then pushed the db back, but this should work equivalently
- NOTE: i have not actually used this command, i first pulled the db to my desktop and modified the setting with
- verify that the file has proper permissions(
-rw-------,u+rw) and has the same size as the backup, as the command should not have changed that - reboot the device
- open the magisk app and verify that it now show the daemon version again and is now not
Installed: N/Aanymore - update the magisk daemon install via the app
- reboot the device
- verify in the magisk app that the new magisk daemon has been installed
- you are done, if wanted change the "Superuser access"(key
root_access) back to the setting it was before in the magisk app settings.
This is not a official guide by the magisk team or endorsed by them. This has been entirely done on my own judement without even asking the team (as i didnt want to create another issue and discussions are disabled there).
For full context, this happened on Oneplus 9 Pro (lemonadep) with lineageos 22.1.