Use this tag for issues related to systemless rooting (which does rooting without modifying /system partition). All latest Magisk zips provide systemless root by default and latest SuperSU zips (BETA from v2.56; STABLE from v2.76)
What is Systemless rooting?
System-less rooting is the state-of-the-art way of rooting any new Android device.
Generally, before Android 6.0, devices can be rooted easily by placing the su files in the /system partition, setting appropriate permissions and starting the su daemon when Android boots (without requiring to modify the boot partition).
Since Marshmallow, Google strengthened the security policies, thus making the only way to start the su daemon while booting up is by patching the /boot partition to modify the SE policies to start the su daemon and also disabling the verified boot.
Also the problem that arises when the /system partition is modified is that the OTA hash checks fail since the partition's hash changes when it's modified, hence the OTA updates refuses to patch.
This is overcome by not placing the su files and binaries in the /system partition; hence arises the name systemless-root.
This way, the OTAs don't fail when the /system partition's integrity is checked. Some OTAs also check for the integrity of the /boot partition. For this reason, many of these rooting methods backup the stock boot.img before patching the /boot partition so that when we need to apply OTA updates, we can uninstall the systemless-root, which reflashes the original boot.img
Generic steps to systemlessly root any Android device
Requirements
- Unlocked bootloader
- Custom recovery like TWRP (see below)
Steps
- Download the latest Magisk Manager
apkfile - Install the apk and check Ramdisk + SAR info (system-as-root)
- Choose "Select and Patch a File" and patch the stock boot image
- Flash magisk_patched.img to your device
If your device has boot ramdisk, you can also install with Custom Recovery
- Download the latest Magisk zip to your sdcard
- Boot into custom recovery and flash the zip file
- To manage the root access, install the Magisk Manager
apkfile
(Caution: These are general steps to root any device; it may vary for different devices.)