Magisk Receives an Update to v11, Introduces MagiskSU and More

Magisk Receives an Update to v11, Introduces MagiskSU and More

XDA Recognized Developer and Contributor topjohnwu has been working hard lately and has just rolled out a substantial update to the Magisk Android mod. The biggest new feature here is the addition of MagiskSU, as this turns Magisk into its own rooting solution. The code for this new feature is based on phh’s approach to update the CM Superuser, but is said to be significant enough to be its own solution. The goal here was to achieve SuperSU standards and the developer feels the functionality should be nearly equivalent.

 The only concern right now is compatibility, which will be worked on with subsequent updates in the future. For those who still want to stick with Chainfire’s root solution, Magisk 11 will still work with SuperSU (and has been tested with SuperSU v2.79-SR3). To go along with the new MagiskSU root solution, topjohnwu says they’ve re-factored Magisk’s sepolicy-inject tool. With the help of Chainfire’s documentation, Magisk should now follow the same syntax as SuperSU’s supolicy tool.
To increase compatibility of Magisk with custom ROMs, and to give the community additional options, Magisk v11 has what topjohnwu is calling Pseudo SELinux Enforce Mode. This will be an option within the settings menu that will set SELinux to permissive while making the status show as enforced. Even though some consider it a bad practice to have this set to permissive, some custom ROMs require it to be set this way. So now the user will have the option to have SELinux set as enforcing or pretend that it’s set as enforcing.
Back in version 4 of Magisk, topjohnwu removed the ability to use general purpose boot scripts because they were wanting people to use per-module scripts instead. This feature has now been brought back and scripts should be placed in /magisk/.core/post-fs-data.d and /magisk/.core/service.d. For those interested, here’s the full changelog for Magisk version 11. . .
  • [Magic Mount] Support replacing symlinks. Symlinks cannot be a target of a bind mounted, so they are treated the same as new files
  • [Magic Mount] Fix the issue when file/folder name contains spaces
  • [BusyBox] Updated to v1.26.2. Should fix the black screen issues of FlashFire
  • [resetprop] Support reading prop files that contains spaces in prop values
  • [MagiskSU] Adapt communication to Magisk Manager; stripped out unused data transfer
  • [MagiskSU] Implement SuperUser access option (Disable, APP only, ADB Only, APP & ADB) phh Superuser app has this option but the feature isn’t implemented within the su binary
  • [MagiskSU] Fixed all issues with su -c “commands” (run commands with root) This feature is supposed to only allow one single option, but apparently adb shell su -c “command” doesn’t work this way, and
  • lenty of root apps don’t follow the rule. The su binary will now consider everything after -c as a part of the command.
  • [MagiskSU] Removed legacy context hack for TiBack, what it currently does is slowing down the invocation
  • [MagiskSU] Preserve the current working directory after invoking su Previously phh superuser will change the path to /data/data after obtaining root shell. It will now stay in the same directory where you
  • alled su
  • [MagiskSU] Daemon now also runs in u:r:su:s0 context
  • [MagiskSU] Removed an unnecessary fork, reduce running processes and speed up the invocation
  • [MagiskSU] Add -cn option to the binary Not sure if this is still relevant, and also not sure if implemented correctly, but hey it’s here
  • [sepolicy-inject] Complete re-write the command-line options, now nearly matches supolicy syntax
  • [sepolicy-inject] Support all matching mode for nearly every action (makes pseudo enforced possible)
  • [sepolicy-inject] Fixed an ancient bug that allocated memory isn’t reset
  • [uninstaller] Now works as a independent script that can be executed at boot Fully support recovery with no /data access, Magisk uninstallation with Magisk Manager
  • [Addition] Busybox, MagiskHide, hosts settings can now be applied instantly; no reboots required
  • [Addition] Add post-fs-data.d and service.d
  • [Addition] Add option to disable Magisk (MagiskSU will still be started)
Source: XDA

About author

Doug Lynch
Doug Lynch

When I am passionate about something, I go all in and thrive on having my finger on the pulse of what is happening in that industry. This has transitioned over the years from PCs and video games, but for close to a decade now all of my attention has gone toward smartphones and Android.