HuskyDG / magic_overlayfs

Make system partition become read-write (it is also possible without Magisk)
763 stars 193 forks source link

On KernelSU, Overlayfs by this module is evaporated? #7

Closed h88782481 closed 1 year ago

h88782481 commented 1 year ago

overlayfs.log

h88782481 commented 1 year ago

The module installed is the latest version 2.6

HuskyDG commented 1 year ago

Which file explorer did you use?

h88782481 commented 1 year ago

mt

HuskyDG commented 1 year ago

Try this version, modify mode.sh and set OVERLAY_MODE=1 (read-write)

h88782481 commented 1 year ago

Try this version, modify mode.sh and set OVERLAY_MODE=1 (read-write)

Still read/write failure image image

HuskyDG commented 1 year ago

Reboot then?

h88782481 commented 1 year ago

Reboot then?

It still doesn't work.

HuskyDG commented 1 year ago

use material files instead of MT Manager https://github.com/zhanghai/MaterialFiles

h88782481 commented 1 year ago

use material files instead of MT Manager https://github.com/zhanghai/MaterialFiles

image

h88782481 commented 1 year ago

I'm using kernelSU

HuskyDG commented 1 year ago

add files to root of /system, /vendor, ... is not supported only subdirectories such as /system/bin, /system/etc, ...

h88782481 commented 1 year ago

add files to root of /system, /vendor, ... is not supported only subdirectories such as /system/bin, /system/etc, ...

image

HuskyDG commented 1 year ago

Send /cache/overlayfs.log ?

HuskyDG commented 1 year ago

Turn off all modules except magisk_overlayfs

h88782481 commented 1 year ago

overlayfs.log

h88782481 commented 1 year ago

Turn off all modules except magisk_overlayfs

I'll give it a try

HuskyDG commented 1 year ago

If it works, then it's KernelSU problem. Please report to KernelSU instead

h88782481 commented 1 year ago

Turn off all modules except magisk_overlayfs

image image Can't

HuskyDG commented 1 year ago

Open Termux/Terminal and send output of mount command (send as file)

HuskyDG commented 1 year ago

It's weird, overlayfs.log shows that your overlayfs is mounted

overlay /system/media overlay rw,seclabel,noatime,lowerdir=/system/media,upperdir=/mnt/overlay_system/upper/system/media,workdir=/mnt/overlay_system/worker/system/media 0 0
overlay /system/bin overlay rw,seclabel,noatime,lowerdir=/system/bin,upperdir=/mnt/overlay_system/upper/system/bin,workdir=/mnt/overlay_system/worker/system/bin 0 0
overlay /system/app overlay rw,seclabel,noatime,lowerdir=/system/app,upperdir=/mnt/overlay_system/upper/system/app,workdir=/mnt/overlay_system/worker/system/app 0 0
overlay /system/data-app overlay rw,seclabel,noatime,lowerdir=/system/data-app,upperdir=/mnt/overlay_system/upper/system/data-app,workdir=/mnt/overlay_system/worker/system/data-app 0 0
overlay /system/fonts overlay rw,seclabel,noatime,lowerdir=/system/fonts,upperdir=/mnt/overlay_system/upper/system/fonts,workdir=/mnt/overlay_system/worker/system/fonts 0 0
overlay /system/etc overlay rw,seclabel,noatime,lowerdir=/system/etc,upperdir=/mnt/overlay_system/upper/system/etc,workdir=/mnt/overlay_system/worker/system/etc 0 0
overlay /system/apex overlay rw,seclabel,noatime,lowerdir=/system/apex,upperdir=/mnt/overlay_system/upper/system/apex,workdir=/mnt/overlay_system/worker/system/apex 0 0
overlay /system/xbin overlay rw,seclabel,noatime,lowerdir=/system/xbin,upperdir=/mnt/overlay_system/upper/system/xbin,workdir=/mnt/overlay_system/worker/system/xbin 0 0
overlay /system/usr overlay rw,seclabel,noatime,lowerdir=/system/usr,upperdir=/mnt/overlay_system/upper/system/usr,workdir=/mnt/overlay_system/worker/system/usr 0 0
overlay /system/lib64 overlay rw,seclabel,noatime,lowerdir=/system/lib64,upperdir=/mnt/overlay_system/upper/system/lib64,workdir=/mnt/overlay_system/worker/system/lib64 0 0
overlay /system/priv-app overlay rw,seclabel,noatime,lowerdir=/system/priv-app,upperdir=/mnt/overlay_system/upper/system/priv-app,workdir=/mnt/overlay_system/worker/system/priv-app 0 0
overlay /system/lib overlay rw,seclabel,noatime,lowerdir=/system/lib,upperdir=/mnt/overlay_system/upper/system/lib,workdir=/mnt/overlay_system/worker/system/lib 0 0
overlay /system/framework overlay rw,seclabel,noatime,lowerdir=/system/framework,upperdir=/mnt/overlay_system/upper/system/framework,workdir=/mnt/overlay_system/worker/system/framework 0 0
overlay /system/cust overlay rw,seclabel,noatime,lowerdir=/system/cust,upperdir=/mnt/overlay_system/upper/system/cust,workdir=/mnt/overlay_system/worker/system/cust 0 0
overlay /vendor/radio overlay rw,seclabel,noatime,lowerdir=/vendor/radio,upperdir=/mnt/overlay_system/upper/vendor/radio,workdir=/mnt/overlay_system/worker/vendor/radio 0 0
overlay /vendor/lost+found overlay rw,seclabel,noatime,lowerdir=/vendor/lost+found,upperdir=/mnt/overlay_system/upper/vendor/lost+found,workdir=/mnt/overlay_system/worker/vendor/lost+found 0 0
overlay /vendor/framework overlay rw,seclabel,noatime,lowerdir=/vendor/framework,upperdir=/mnt/overlay_system/upper/vendor/framework,workdir=/mnt/overlay_system/worker/vendor/framework 0 0
overlay /vendor/rfs overlay rw,seclabel,noatime,lowerdir=/vendor/rfs,upperdir=/mnt/overlay_system/upper/vendor/rfs,workdir=/mnt/overlay_system/worker/vendor/rfs 0 0
overlay /vendor/overlay overlay rw,seclabel,noatime,lowerdir=/vendor/overlay,upperdir=/mnt/overlay_system/upper/vendor/overlay,workdir=/mnt/overlay_system/worker/vendor/overlay 0 0
overlay /vendor/lib overlay rw,seclabel,noatime,lowerdir=/vendor/lib,upperdir=/mnt/overlay_system/upper/vendor/lib,workdir=/mnt/overlay_system/worker/vendor/lib 0 0
overlay /vendor/lib64 overlay rw,seclabel,noatime,lowerdir=/vendor/lib64,upperdir=/mnt/overlay_system/upper/vendor/lib64,workdir=/mnt/overlay_system/worker/vendor/lib64 0 0
overlay /vendor/bin overlay rw,seclabel,noatime,lowerdir=/vendor/bin,upperdir=/mnt/overlay_system/upper/vendor/bin,workdir=/mnt/overlay_system/worker/vendor/bin 0 0
overlay /vendor/firmware overlay rw,seclabel,noatime,lowerdir=/vendor/firmware,upperdir=/mnt/overlay_system/upper/vendor/firmware,workdir=/mnt/overlay_system/worker/vendor/firmware 0 0
overlay /vendor/etc overlay rw,seclabel,noatime,lowerdir=/vendor/etc,upperdir=/mnt/overlay_system/upper/vendor/etc,workdir=/mnt/overlay_system/worker/vendor/etc 0 0
overlay /vendor/camera overlay rw,seclabel,noatime,lowerdir=/vendor/camera,upperdir=/mnt/overlay_system/upper/vendor/camera,workdir=/mnt/overlay_system/worker/vendor/camera 0 0
overlay /vendor/app overlay rw,seclabel,noatime,lowerdir=/vendor/app,upperdir=/mnt/overlay_system/upper/vendor/app,workdir=/mnt/overlay_system/worker/vendor/app 0 0
overlay /system_ext/apex overlay rw,seclabel,noatime,lowerdir=/system_ext/apex,upperdir=/mnt/overlay_system/upper/system_ext/apex,workdir=/mnt/overlay_system/worker/system_ext/apex 0 0
overlay /system_ext/framework overlay rw,seclabel,noatime,lowerdir=/system_ext/framework,upperdir=/mnt/overlay_system/upper/system_ext/framework,workdir=/mnt/overlay_system/worker/system_ext/framework 0 0
overlay /system_ext/lost+found overlay rw,seclabel,noatime,lowerdir=/system_ext/lost+found,upperdir=/mnt/overlay_system/upper/system_ext/lost+found,workdir=/mnt/overlay_system/worker/system_ext/lost+found 0 0
overlay /system_ext/lib64 overlay rw,seclabel,noatime,lowerdir=/system_ext/lib64,upperdir=/mnt/overlay_system/upper/system_ext/lib64,workdir=/mnt/overlay_system/worker/system_ext/lib64 0 0
overlay /system_ext/app overlay rw,seclabel,noatime,lowerdir=/system_ext/app,upperdir=/mnt/overlay_system/upper/system_ext/app,workdir=/mnt/overlay_system/worker/system_ext/app 0 0
overlay /system_ext/lib overlay rw,seclabel,noatime,lowerdir=/system_ext/lib,upperdir=/mnt/overlay_system/upper/system_ext/lib,workdir=/mnt/overlay_system/worker/system_ext/lib 0 0
overlay /system_ext/bin overlay rw,seclabel,noatime,lowerdir=/system_ext/bin,upperdir=/mnt/overlay_system/upper/system_ext/bin,workdir=/mnt/overlay_system/worker/system_ext/bin 0 0
overlay /system_ext/priv-app overlay rw,seclabel,noatime,lowerdir=/system_ext/priv-app,upperdir=/mnt/overlay_system/upper/system_ext/priv-app,workdir=/mnt/overlay_system/worker/system_ext/priv-app 0 0
overlay /system_ext/etc overlay rw,seclabel,noatime,lowerdir=/system_ext/etc,upperdir=/mnt/overlay_system/upper/system_ext/etc,workdir=/mnt/overlay_system/worker/system_ext/etc 0 0
overlay /product/framework overlay rw,seclabel,noatime,lowerdir=/product/framework,upperdir=/mnt/overlay_system/upper/product/framework,workdir=/mnt/overlay_system/worker/product/framework 0 0
overlay /product/media overlay rw,seclabel,noatime,lowerdir=/product/media,upperdir=/mnt/overlay_system/upper/product/media,workdir=/mnt/overlay_system/worker/product/media 0 0
overlay /product/data-app overlay rw,seclabel,noatime,lowerdir=/product/data-app,upperdir=/mnt/overlay_system/upper/product/data-app,workdir=/mnt/overlay_system/worker/product/data-app 0 0
overlay /product/lost+found overlay rw,seclabel,noatime,lowerdir=/product/lost+found,upperdir=/mnt/overlay_system/upper/product/lost+found,workdir=/mnt/overlay_system/worker/product/lost+found 0 0
overlay /product/bin overlay rw,seclabel,noatime,lowerdir=/product/bin,upperdir=/mnt/overlay_system/upper/product/bin,workdir=/mnt/overlay_system/worker/product/bin 0 0
overlay /product/etc overlay rw,seclabel,noatime,lowerdir=/product/etc,upperdir=/mnt/overlay_system/upper/product/etc,workdir=/mnt/overlay_system/worker/product/etc 0 0
overlay /product/app overlay rw,seclabel,noatime,lowerdir=/product/app,upperdir=/mnt/overlay_system/upper/product/app,workdir=/mnt/overlay_system/worker/product/app 0 0
overlay /product/priv-app overlay rw,seclabel,noatime,lowerdir=/product/priv-app,upperdir=/mnt/overlay_system/upper/product/priv-app,workdir=/mnt/overlay_system/worker/product/priv-app 0 0
overlay /product/overlay overlay rw,seclabel,noatime,lowerdir=/product/overlay,upperdir=/mnt/overlay_system/upper/product/overlay,workdir=/mnt/overlay_system/worker/product/overlay 0 0
h88782481 commented 1 year ago

output.txt

h88782481 commented 1 year ago

I'm curious, too

HuskyDG commented 1 year ago

maybe mount namespace problem

HuskyDG commented 1 year ago

try https://github.com/HuskyDG/magisk_overlayfs/actions/runs/4651446330

h88782481 commented 1 year ago

image image overlayfs.log

h88782481 commented 1 year ago

I'm going to rest, and the rest of the test may not be done until tomorrow

HuskyDG commented 1 year ago

Try kill zygote by setprop ctl.restart zygote. After that send mount output.

H1mJT commented 1 year ago

Screenshot_20230409-221833_Material Files Adaway successfully updated the host file, so system is rw but material files still shows as read only. KSU version 10736.

H1mJT commented 1 year ago

Okay it is working with Xplore manager by selecting root access as superuser + mount writable.

h88782481 commented 1 year ago

Okay it is working with Xplore manager by selecting root access as superuser + mount writable.

image

h88782481 commented 1 year ago

My kernelSU version is 10738

h88782481 commented 1 year ago

Try kill zygote by setprop ctl.restart zygote. After that send mount output.

Try kill zygote by setprop ctl.restart zygote. After that send mount output.

out.txt This is the output of the mount after zygote is killed

HuskyDG commented 1 year ago

The result of this command? su -c nsenter -t 1 -m mount

h88782481 commented 1 year ago

The result of this command? su -c nsenter -t 1 -m mount

Sorry, su on kernelSU doesn't have the -t parameter

h88782481 commented 1 year ago

image

HuskyDG commented 1 year ago

su -c "nsenter -t 1 -m mount"

h88782481 commented 1 year ago

su -c "nsenter -t 1 -m mount"

out.txt

h88782481 commented 1 year ago

Is it because of the kernel? I use a third party kernel

HuskyDG commented 1 year ago

OverlayFS is unmounted by kernelsu? https://github.com/tiann/KernelSU/blob/main/kernel/core_hook.c

h88782481 commented 1 year ago

OverlayFS is unmounted by kernelsu? https://github.com/tiann/KernelSU/blob/main/kernel/core_hook.c

I don't know, the author of ksu originally planned to have the function of mounting system partitions, but it was cancelled for some reason

HuskyDG commented 1 year ago

May you send kernelsu logs?

h88782481 commented 1 year ago

KernelSU_bugreport_2023-04-10_10_26.tar.gz

HuskyDG commented 1 year ago

I suggest you report this problem to KernelSU

h88782481 commented 1 year ago

image I think this module will not support ksu for the time being

h88782481 commented 1 year ago

I think we should first remove the statement that supports ksu

HuskyDG commented 1 year ago

It will be supported if ksud doesn't umount all overlayfs

HuskyDG commented 1 year ago

https://github.com/HuskyDG/KernelSU/commit/d435de9385a6a035b4050e92b67b2645c8ba9e27 (ignore)

HuskyDG commented 1 year ago
[    6.825705] KernelSU: on_post_fs_data already done
[    7.530333] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/media': -2
[    7.530484] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/bin': -2
[    7.530641] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/app': -2
[    7.530802] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/data-app': -2
[    7.530966] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/fonts': -2
[    7.531089] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/etc': -2
[    7.531294] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/apex': -2
[    7.531472] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/xbin': -2
[    7.531636] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/usr': -2
[    7.531762] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/lib64': -2
[    7.531921] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/priv-app': -2
[    7.532163] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/lib': -2
[    7.532338] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/framework': -2
[    7.532508] overlayfs: failed to resolve '/mnt/overlay_system/upper/system/cust': -2
[    7.532661] overlayfs: failed to resolve '/mnt/overlay_system/upper/vendor/radio': -2
[    7.532812] overlayfs: failed to resolve '/mnt/overlay_system/upper/vendor/lost+found': -2
[    7.532965] overlayfs: failed to resolve '/mnt/overlay_system/upper/vendor/framework': -2
[    7.533110] overlayfs: failed to resolve '/mnt/overlay_system/upper/vendor/rfs': -2
[    7.533260] overlayfs: failed to resolve '/mnt/overlay_system/upper/vendor/overlay': -2
[    7.533407] overlayfs: failed to resolve '/mnt/overlay_system/upper/vendor/lib': -2
[    7.533532] overlayfs: failed to resolve '/mnt/overlay_system/upper/vendor/lib64': -2
[    7.533678] overlayfs: failed to resolve '/mnt/overlay_system/upper/vendor/bin': -2
[    7.533838] overlayfs: failed to resolve '/mnt/overlay_system/upper/vendor/firmware': -2
[    7.533991] overlayfs: failed to resolve '/mnt/overlay_system/upper/vendor/etc': -2
[    7.534145] overlayfs: failed to resolve '/mnt/overlay_system/upper/vendor/camera': -2
[    7.534292] overlayfs: failed to resolve '/mnt/overlay_system/upper/vendor/app': -2
[    7.534519] overlayfs: failed to resolve '/mnt/overlay_system/upper/system_ext/apex': -2
[    7.534692] overlayfs: failed to resolve '/mnt/overlay_system/upper/system_ext/framework': -2
[    7.534840] overlayfs: failed to resolve '/mnt/overlay_system/upper/system_ext/lost+found': -2
[    7.535013] overlayfs: failed to resolve '/mnt/overlay_system/upper/system_ext/lib64': -2
[    7.535162] overlayfs: failed to resolve '/mnt/overlay_system/upper/system_ext/app': -2
[    7.535358] overlayfs: failed to resolve '/mnt/overlay_system/upper/system_ext/lib': -2
[    7.535593] overlayfs: failed to resolve '/mnt/overlay_system/upper/system_ext/bin': -2
[    7.535804] overlayfs: failed to resolve '/mnt/overlay_system/upper/system_ext/priv-app': -2
[    7.535969] overlayfs: failed to resolve '/mnt/overlay_system/upper/system_ext/etc': -2
[    7.536133] overlayfs: failed to resolve '/mnt/overlay_system/upper/product/framework': -2
[    7.536260] overlayfs: failed to resolve '/mnt/overlay_system/upper/product/media': -2
[    7.536384] overlayfs: failed to resolve '/mnt/overlay_system/upper/product/data-app': -2
[    7.536506] overlayfs: failed to resolve '/mnt/overlay_system/upper/product/lost+found': -2
[    7.536629] overlayfs: failed to resolve '/mnt/overlay_system/upper/product/bin': -2
[    7.536757] overlayfs: failed to resolve '/mnt/overlay_system/upper/product/etc': -2
[    7.536879] overlayfs: failed to resolve '/mnt/overlay_system/upper/product/app': -2
[    7.537004] overlayfs: failed to resolve '/mnt/overlay_system/upper/product/priv-app': -2
[    7.537126] overlayfs: failed to resolve '/mnt/overlay_system/upper/product/overlay': -2
HuskyDG commented 1 year ago

Try https://github.com/HuskyDG/magisk_overlayfs/actions/runs/4654631831

h88782481 commented 1 year ago

Try https://github.com/HuskyDG/magisk_overlayfs/actions/runs/4654631831

Do you need to update the kernel?