John Wu, better known as topjohnwu, has been working on improving Magisk since he got back from his military training last month. As a result of Wu's efforts, we now have a new Magisk beta and this is a major update.

Magisk v16.6 will retain root access even after a factory reset has been performed. In a factory reset, the data, cache and dalvik cache partitions are wiped. Magisk relies on files in /data to function properly. Because the necessary Magisk files located in the data partition get cleaned in a factory reset, Magisk doesn't work after a device has been reset.

In v16.6 of Magisk, a stub Magisk Manager is placed in magiskinit. At the time of booting, a check for the presence of Magisk Manager will be performed. If Magisk Manager isn't installed, the stub will download and install the full Magisk Manager, and it will also rebuild the entire root environment. This automatic process retains root access and saves the user from the effort of reinstalling Magisk after a factory reset. Not only this, the process also ensures that root access is preserved when switching between different Generic System Images (or GSI for short). This also implies that same device users can share pre-rooted boot images since root access will be restored using the above process.

In older versions of Magisk, several users, including myself, randomly lost root access. Wu discovered an edge case and has included a fix for the same in v16.6. Additionally, there are fixes to prevent root loss happening due to daemon crashing.

The developer-written changelog for Magisk v16.6 and Magisk Manager v5.8.0 are given below. The changelogs can also be accessed from within the About section of the Manager.

Magisk v16.6 Beta Changelog

• Magisk Manager will preserve the random package name when upgrading within the app. Magisk will no longer prefer the package name com.topjohnwu.magisk over repackaged (hidden) Magisk Manager to prevent malware from targeting this specific package name. If you have a repackaged Magisk Manager installed, com.topjohnwu.magisk will be forcefully denied root access. You can use Restore Magisk Manager in settings, or uninstall the repackaged Magisk Manager to unlock com.topjohnwu.magisk.

• The logic to calculate free space in ext4 images is replaced with new extremely precise methods, hopefully no more module installation failures caused by images should happen. All modules using template 1500 will automatically benefit from the new free space calculation method on Magisk v16.6+, no additional changes are needed.

Krittin Kalra is a 20 year old Android freak. Striving for passions, chasing down his dreams and living a life without regrets is his sole mantra. A bit moody, he also does custom ROM reviews for AndroGuider. Currently pursuing his B.Tech, he aspires to follow his heart.