Android rooting
Last updated : 21/11/2023 (Incomplete, requires further additions)
Introduction
This one had it coming since the PrivMod guide got rewritten to kingdom come, especially since Magisk stopped supporting full installations via TWRP & KernelSU gets bundled into some custom ROMs & kernels. For this one, unlocked bootloader is mandatory.
Prerequisites
Required stuff :
- An Android device with unlocked bootloader (and maybe custom recovery)
- One of these root solutions apps (while both can be run at the same time, it's highly recommended to stick to one)
Magisk
Old patch-in-the-recovery installation (viable up to 25.2, not working since 26.0)
- Boot to TWRP recovery & go to "Install"
- Browse to directory containing magisk.apk (rename .apk file extension to .zip if recovery doesn't support it) & flash it like a flashable zip
- Reboot to system & manually install magisk.apk.
New patch-in-the-recovery installation (post 26.0; only viable for device with boot ramdisk)
- Copy magisk.apk & rename said copy's .apk file extension to .zip - for example : Magisk-v26.3.apk > Magisk-v26.3.zip.
Yes, Magisk stopped supporting apk since flashable zip after 25.2.
- Boot to TWRP recovery & go to "Install"
- Browse to directory containing magisk.zip & flash it.
- Reboot to system & manually install magisk.apk.
- Open the Magisk app. It will prompt for a reinstallation. For that, tap on "Install" button (or just tap OK on the reinstallation prompt) & choose Direct Install in method tab. Afterwards, select the "LET'S GO" option & wait until Magisk finishes re-installing itself; and reboot after this.
Installation guide : (actually, use the official installation guide)
- Install latest Magisk app & open it.
- In the app, check if device has ramdisk or not. This guide's next steps are only tested on the X3N (which has ramdisk), so maybe browse the official installation guide for everything else.
- Extract boot image from custom ROM zip & copy it to device (or its external storage) if it isn't extracted from there
If custom ROM zip contains only payload.bin in lieu of boot.img (commonly found on A/B devices, such as OnePlus 6); extract that file & extract boot.img from it using this Python script in terminal & move it into the phone (or its external storage).
- In the Magisk app, press the Install button in the Magisk card
- Choose "Select and patch a file" in method tab & select the extracted boot image. Afterwards, select the "LET'S GO" option & wait until Magisk finishes patching the image.
- Flash the patched boot image. Of course, in the possible case you need to reflash your ROM (but not flash a different ROM), you can just skip everything else because you already have the patched boot image.
KernelSU
Installation guide :
- Flash custom kernel and/or ROM with inbuilt KernelSU (for non-GKI (4.9 - 4.19) kernels); or a suitable kernel file from KernelSU's GitHub Releases (for 5.x / GKI kernels)
If your custom ROM has inbuilt KernelSU, skip unless you have a custom kernel with inbuilt KernelSU that you want to flash.
- Boot to system & install KernelSU app.
Back to top
Android Privacy Mod - Basic
Index - cellphone
Main Page