topjohnwu / Magisk

The Magic Mask for Android
GNU General Public License v3.0
48.28k stars 12.33k forks source link

root not valid on Android 11 #3631

Closed ddkwork closed 3 years ago

ddkwork commented 3 years ago

tested on mimax pro,is is lineageos18.1 Android11,tested app: es file explore get root request. i writed twrp4,then install magisk and patch boot.img, and flash to boot with twrp,last running es file explore request root,but root was not work etc.

zgfg commented 3 years ago

What does it exactly mean for you that root does not work?

If you test with Root checker, does it recognize root?

If you have SAR with read-only System or if your Sytem is (nearly) full, you will never be able to write/make changes. Only by use of the Systemless approach (Magisk dynamically mounting required changes on every reboot) - if not familiar with this new Android 10/11 issues and concepts, please read the Magisk Documentation here on Gothub

ZhouYingSASA commented 3 years ago

I meet the same situation... My device is Xiaomi Mi 10 ultra and the system is MIUI 12.5 (20.12.29) Android 11. I've tried to give the root access and direct install, to patch the whole zip file, and to patch the "boot.img" and then flash it. All processes worked successfully and finally the magisk manager still can't recognize the magisk. I have no idea if my system is read-only, but it still has a lot of space.

lasted   20.4 (20400)            A/B   No
Installed   N/A                  SAR   Yes
Ramdisk   Yes                    Crypto   File
> fastboot flash boot .\magisk_patched_oIuAU.img
Sending 'boot' (51960 KB)                          OKAY [  1.142s]
Writing 'boot'                                     OKAY [  0.151s]
Finished. Total time: 1.515s

> fastboot reboot

Here are the logs and the boot img. I can provide the whole rom if needed. Thanks in advance whether solved or not.

logs_and_img.zip

zgfg commented 3 years ago

I meet the same situation... My device is Xiaomi Mi 10 ultra and the system is MIUI 12.5 (20.12.29) Android 11. I've tried to give the root access and direct install, to patch the whole zip file, and to patch the "boot.img" and then flash it. All processes worked successfully and finally the magisk manager still can't recognize the magisk. I have no idea if my system is read-only, but it still has a lot of space.

lasted   20.4 (20400)            A/B   No
Installed   N/A                  SAR   Yes
Ramdisk   Yes                    Crypto   File
> fastboot flash boot .\magisk_patched_oIuAU.img
Sending 'boot' (51960 KB)                          OKAY [  1.142s]
Writing 'boot'                                     OKAY [  0.151s]
Finished. Total time: 1.515s

> fastboot reboot

Here are the logs and the boot img. I can provide the whole rom if needed. Thanks in advance whether solved or not.

logs_and_img.zip

For A11 (hence MIUI 12.5) you must use Magisk Beta or Canary 212xx, not the ancient Stable 20.4 - change Update Channel to Beta, first update Magisk Manager, then patch the boot.img (with Recovery unticked), etc


Btw "lot of space" - where? On Storage - it doesn't mean that your /system filesystem has lot of empty space.

If you have approproate TWRP (or once you install Magisk, then use some root file explorer), open /vendor/etc/fstab.* file and find if your /system or / is wr (read-write) or ro (read only). By use of df command in Terminal you can see how much space is really available on your system

But first properly install Magisk (using Canary or Beta), then please read about SAR limitations for A11 and how to use systemless root from Magisk documentation

ZhouYingSASA commented 3 years ago

Thanks a lot! I installed 212 Magisk by direct install successfully. I find my /system directory is described read-only in fstab and for df command, it says my / dir has no space and /system/bin is empty. I'm finding more that I should do. Thanks again!

zgfg commented 3 years ago

Thanks a lot! I installed 212 Magisk by direct install successfully. I find my /system directory is described read-only in fstab and for df command, it says my / dir has no space and /system/bin is empty. I'm finding more that I should do. Thanks again!

Btw, for my MIUI 12.5 (Mi 9T), the best MiXPlorer version is MiXplorer_v6.49.5-Beta_B21010120.apk from XDA MiXPlorer thread, OP posts

For any other version I tried, access to /sdcard/Android/data, /sdcard/Android/obb, /data/user/0 or /data/user/999 or something else failed (it did not show all the content)