Repository navigation
How to remove built in root others SU
Page [Restored from archive.org] 2022. Maybe outdated
Almost Android-x86 projects come with built-in SU. Other SU conflict with Magisk. It's recommended to remove these SU if you have Magisk.
Before removing built-in SU, system must be writeable. If your system is compressed, it will be read-only and cannot remount as read-write, you can boot into DEBUG mode and type extract_system command and press Enter to extract system.sfs to system.img.
For some reason, extracting system image in DEBUG mode might cause currupt system.img. If you unable to boot after extract system image, you can manually extract system image by following way:
- On Linux (or Ubuntu for Windows),
cdto Android directory and use this command:
7z x system.img
On Windows, use APT Tool [Link broken] to extract system image.
- Boot Android-x86 project with
initrd-magiskand DEBUG=1 flag. If you have GearLock, you can boot into Recovery Mode and openVirtual Terminal Command. - When root shell is showed up, type
unsucommand and press Enter to remove root. - Type
frebootto restart the system.
Flash unSU.zip [Link broken] from Magisk app.
Run these command in root shell (live Android system):
mount -o rw,remount $(magisk --path)/.magisk/mirror/system
mount -o rw,remount $(magisk --path)/.magisk/mirror/system_root
rm -rf $(magisk --path)/.magisk/mirror/system_root/system/*bin/su $(magisk --path)/.magisk/mirror/system/*bin/su
Although KernelSU doesn't conflict with Magisk, it will execute real SU if it exists in PATH, you can get RIP of KernelSU by using another kernel.