topjohnwu / Magisk

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

Magisk 21102 gets root but fails to mount system as WR #3589

Closed Alpamayo57 closed 3 years ago

Alpamayo57 commented 3 years ago

Oukitel wp5 pro MTK device Android 10 A/B no SAR Yes Ramdisk yes

With this latest build I was finally able to root my device, but I immediately found out I was unable to rename or delete the bootanimation.zip under product/media. Something is wrong.

osm0sis commented 3 years ago

Not every device can be mounted rw anymore. Unless you provide some useful information this issue will be closed.

Alpamayo57 commented 3 years ago

magisk_log_2020-12-21T07_25_35Z.log Thanks osm0sis for the reply. I'm adding the log file hoping it can be helpful. If I can add anything else please advice. I'm willing to cooperate although I'm no expert here.

zgfg commented 3 years ago

By using root explorer (like MiXPlorer), open (textual file) /vendor/etc/fstab.* (usually named after the chipset, like fstab.qcom) and find how the filesystem /system (or root / ) is defined: ro = read only or rw = read write

Even if rw, it can be nearly "full" (e.g. no space for custom /etc/hosts file for ad-blocking). You can check with df command from Terminal app

It's common for A10 and A11 (even A9 e.g. Huawei phones), and that's why Magisk provides systemless root - consult the Magisk Documentation here on Github

Alpamayo57 commented 3 years ago

Thanks zgzf. The filesystem is defined wr. And you are correct: it is full. https://ibb.co/d5g5qBy https://ibb.co/RQRnxKL Pardon my non-expert question: does that mean even if the system is wr I can NOT do anything? I wanted in fact add a hosts file and change the bootanimation.zip. I noticed if I attempted to edit the fstab.* file it wouldn't allow the operation with a popup "insufficient memory".

Thanks for your time Mike

zgfg commented 3 years ago

In Magisk Manager Settings (don't forget to enable Magisk hide - if you didn't yet), enable Systemless hosts and reboot. Then, Magisk will mount on every reboot /system/etc/hosts to /data/adb/modules/system/etc/hosts file, hence you can make your changes to the hosts. It will also work for AdAway

Similarly Magisk can mount for you other changes to /system, /vendor, /product - but mounting appears during the Magisk initialization (hence probably too late for boot animations). Read in Magisk Docs about systemless root and how it works (Magisk modules are also based on)

You shouldn't change the fstab file - only from TWRP (if available for your device), but then you would have to format the redefined partitions (AFAIK). Insufficient memory is bcs SAR = System As Root, /system/vendor and yours is full

Alpamayo57 commented 3 years ago

Thank you zgfg for your kind explanations. You are a lifesaver!!

I'm avidly reading all documentation available on Magisk as per your recommendation. I want to learn more because I'm clearly a noobie. Thanks to you I fixed the hosts file. I guess I will have to give up - from what I understand - on the possibility to change the bootanimation. Oh well ... (Just to clarify I had NO intention to change the fsab file: I was just testing if I could save it, and I saw I couldn't).

One last question: I installed Flashfire but it stops at the following screen: https://ibb.co/SrwR2PC Is it because of SAR? Cheers Mike

zgfg commented 3 years ago

IDK about FladhFire, not using (don't know if it supports SAR). But maybe you just did not grant root access - open Superuser tab in Magisk Manager and if you find FlashFire just enable

Btw, since there was no bug, pls close this Issue

You can continue discussing about Magisk eg on https://forum.xda-developers.com/t/magisk-general-support-discussion.3432382

Alpamayo57 commented 3 years ago

Thanks (by the way I did grant root access to Flashfire). I'll close this issue.