topjohnwu / Magisk

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

Magisk cannot handle oplus.fstab #3663

Closed logotoy closed 3 years ago

logotoy commented 3 years ago

After Installation 21.2. or Canary phone won't boot. There are several fstabs in boot.img. fstab. default, fstab.emmc and oplus.fstab. In cmdline androidboot.fstab_suffix = default. I managed to install magisk and start the phone after copying some of the code from oplus. fstab to fstab.default. Sections with the first_stage_mount flag. And added apex folder. stock_boot.zip mod_boot.zip cmdline.txt

Is it possible to somehow automate the installation process? Can ODM change be added via modules?

ricardojsaraiva commented 3 years ago

I have the same problem on a Realme X50 Pro with UI 2.0 Android 11.

Device: Realme X50 Pro (RMX2075) Android version: Android 11 RMX2075EU_11_C.20 Magisk version code: 23000

qianmo-xw commented 3 years ago

OPPO A9 also has this problem And oplus.fstab use loop@ to mount partition. When I copy code to fstab.mt6771 Devices only auto reboot. Screenshot_2021-06-04-16-47-45-251_bin mt plus

osm0sis commented 3 years ago

As can be seen in #4313 the devices can contain both fstab.qcom and oplus.fstab. Workarounds found were to take the oplus contents and add them to fstab.qcom or fstab.mtxyza, so presumably magiskinit just needs to process them both together.

vvb2060 commented 3 years ago

app-debug.apk rename to apk, install. https://github.com/vvb2060/Magisk/commit/ab095781decdfaa827c22eaca8ac79773f105b5a I don't know if this will work, I need you to test it. If it doesn't work, I need the kernel log(/proc/kmsg).

ricardojsaraiva commented 3 years ago

app-debug.apk rename to apk, install. vvb2060@ab09578 I don't know if this will work, I need you to test it. If it doesn't work, I need the kernel log(/proc/kmsg).

Tried on a Realme X50 Pro 5G, it's bootloop.

boot.zip

magisk_patched-23001_N22eQ.zip

vvb2060 commented 3 years ago

app-debug.apk rename to apk, install. https://github.com/vvb2060/Magisk/commit/7cf026fbcedf11418712efa175fc0bbff62517a4 Add unlink("oplus.fstab");, tested on realme X7 Pro. If it doesn't work, I need the kernel log(/proc/kmsg).

vvb2060 commented 3 years ago

@daeSundae Is your device boot loop? If so, I need the kernel logs.

daeSundae commented 3 years ago

I unpacked the boot image, removed those lines (avb_keys=/vendor/etc/oplus_avb.pubkey) from oplus.fstab, added its contents to normal fstab and then used normal magisk v23.0 release to patch the boot image and it worked. Here's a video from someone who tested it:

Video Link

osm0sis commented 3 years ago

@daeSundae He's trying to fix this the right way, not that hack, though it may have given some more clues. Please just use the test builds provided to see if it's resolved and if not then upload the requested logs.

logotoy commented 3 years ago

app-debug.apk rename to apk, install. vvb2060@7cf026f Add unlink("oplus.fstab");, tested on realme X7 Pro. If it doesn't work, I need the kernel log(/proc/kmsg).

It works on Realme 6 pro. No fstab change.

daeSundae commented 3 years ago

app-debug.apk rename to apk, install. vvb2060@7cf026f Add unlink("oplus.fstab");, tested on realme X7 Pro. If it doesn't work, I need the kernel log(/proc/kmsg).

It is working on Realme 6

sarthakroy2002 commented 3 years ago

app-debug.apk rename to apk, install. vvb2060@7cf026f Add unlink("oplus.fstab");, tested on realme X7 Pro. If it doesn't work, I need the kernel log(/proc/kmsg).

Wew it works on Realme 7 and Realme C3... Thanks

crazo7924 commented 3 years ago

app-debug.apk rename to apk, install. vvb2060@7cf026f Add unlink("oplus.fstab");, tested on realme X7 Pro. If it doesn't work, I need the kernel log(/proc/kmsg).

Confirmed working on Realme 8 5G

asp345 commented 3 years ago

Realme X CN (RMX1901) RealmeUI 2 F.03 not working. It boots but does not mount images in oplus.fstab kmsg.txt

f03stock.zip patched.zip

/odm and /my_manifest (both whose images are in /vendor/euclid) is somehow mounted? Screenshot_20210729-000452

<14>[ 2.292943] (6)[1:init]init: [libfs_mgr]superblock s_max_mnt_count:65535,/dev/block/by-name/system <12>[ 2.292983] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <6>[ 2.295056] (6)[1:init]EXT4-fs (sda11): mounted filesystem without journal. Opts: barrier=1 <14>[ 2.295082] (6)[1:init]init: [libfs_mgr]__mount(source=/dev/block/by-name/system,target=/system_root,type=ext4)=0: Success <12>[ 2.295098] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.295546] (6)[1:init]init: [libfs_mgr]superblock s_max_mnt_count:65535,/dev/block/by-name/vendor <12>[ 2.295560] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <6>[ 2.297124] (6)[1:init]EXT4-fs (sde15): mounted filesystem without journal. Opts: barrier=1 <14>[ 2.297145] (6)[1:init]init: [libfs_mgr]__mount(source=/dev/block/by-name/vendor,target=/vendor,type=ext4)=0: Success <12>[ 2.297164] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <11>[ 2.297216] (6)[1:init]init: [libfs_mgr]Failed to open 'loop@/system/euclid/my_product.img': No such file or directory <12>[ 2.297227] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297304] (6)[1:init]init: [libfs_mgr]__mount(source=loop@/system/euclid/my_product.img(missing),target=/my_product,type=ext4)=-1: No such file or directory <12>[ 2.297316] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297325] (6)[1:init]init: Failed to mount /my_product, ignoring mount for no_fail partition <11>[ 2.297336] (6)[1:init]init: [libfs_mgr]Failed to open 'loop@/system/euclid/my_heytap.img': No such file or directory <12>[ 2.297345] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297390] (6)[1:init]init: [libfs_mgr]__mount(source=loop@/system/euclid/my_heytap.img(missing),target=/my_heytap,type=ext4)=-1: No such file or directory <12>[ 2.297400] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297407] (6)[1:init]init: Failed to mount /my_heytap, ignoring mount for no_fail partition <11>[ 2.297418] (6)[1:init]init: [libfs_mgr]Failed to open 'loop@/system/euclid/my_company.img': No such file or directory <12>[ 2.297427] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297468] (6)[1:init]init: [libfs_mgr]__mount(source=loop@/system/euclid/my_company.img(missing),target=/my_company,type=ext4)=-1: No such file or directory <12>[ 2.297479] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297487] (6)[1:init]init: Failed to mount /my_company, ignoring mount for no_fail partition <11>[ 2.297497] (6)[1:init]init: [libfs_mgr]Failed to open 'loop@/system/euclid/my_preload.img': No such file or directory <12>[ 2.297507] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297549] (6)[1:init]init: [libfs_mgr]__mount(source=loop@/system/euclid/my_preload.img(missing),target=/my_preload,type=ext4)=-1: No such file or directory <12>[ 2.297561] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297569] (6)[1:init]init: Failed to mount /my_preload, ignoring mount for no_fail partition <11>[ 2.297578] (6)[1:init]init: [libfs_mgr]Failed to open 'loop@/system/euclid/my_stock.img': No such file or directory <12>[ 2.297587] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297628] (6)[1:init]init: [libfs_mgr]__mount(source=loop@/system/euclid/my_stock.img(missing),target=/my_stock,type=ext4)=-1: No such file or directory <12>[ 2.297637] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297656] (6)[1:init]init: Failed to mount /my_stock, ignoring mount for no_fail partition <11>[ 2.297667] (6)[1:init]init: [libfs_mgr]Failed to open 'loop@/system/euclid/my_region.img': No such file or directory <12>[ 2.297677] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297719] (6)[1:init]init: [libfs_mgr]__mount(source=loop@/system/euclid/my_region.img(missing),target=/my_region,type=ext4)=-1: No such file or directory <12>[ 2.297730] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297738] (6)[1:init]init: Failed to mount /my_region, ignoring mount for no_fail partition <11>[ 2.297748] (6)[1:init]init: [libfs_mgr]Failed to open 'loop@/system/euclid/my_carrier.img': No such file or directory <12>[ 2.297757] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297798] (6)[1:init]init: [libfs_mgr]__mount(source=loop@/system/euclid/my_carrier.img(missing),target=/my_carrier,type=ext4)=-1: No such file or directory <12>[ 2.297809] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297816] (6)[1:init]init: Failed to mount /my_carrier, ignoring mount for no_fail partition <11>[ 2.297824] (6)[1:init]init: [libfs_mgr]Failed to open 'loop@/system/euclid/my_engineering.img': No such file or directory <12>[ 2.297833] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297874] (6)[1:init]init: [libfs_mgr]__mount(source=loop@/system/euclid/my_engineering.img(missing),target=/my_engineering,type=ext4)=-1: No such file or directory <12>[ 2.297885] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.297893] (6)[1:init]init: Failed to mount /my_engineering, ignoring mount for no_fail partition <11>[ 2.297903] (6)[1:init]init: [libfs_mgr]Failed to open 'loop@/vendor/euclid/odm.img': No such file or directory <12>[ 2.297913] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <6>[ 2.306702] (6)[1:init]EXT4-fs (loop0): mounted filesystem without journal. Opts: <11>[ 2.306757] (6)[1:init]init: [libfs_mgr]Failed to open 'loop@/vendor/euclid/my_manifest.img': No such file or directory <12>[ 2.306773] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <6>[ 2.311538] (6)[1:init]EXT4-fs (loop1): mounted filesystem without journal. Opts: <14>[ 2.312620] (6)[1:init]init: [libfs_mgr]superblock s_max_mnt_count:10,/dev/block/by-name/opporeserve2 <12>[ 2.312636] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.312949] (6)[1:init]init: [libfs_mgr]superblock s_max_mnt_count:10,/dev/block/by-name/opporeserve2 <12>[ 2.312963] (6)[1:init]init: [libfs_mgr]save_log:Unable to open /mnt/vendor/opporeserve/fs_mgr_log <14>[ 2.313008] (6)[1:init]init: [libfs_mgr]check_fs(): mount(/dev/block/by-name/opporeserve2,/mnt/vendor/opporeserve,ext4)=-1: No such file or directory <14>[ 2.313059] (6)[1:init]init: [libfs_mgr]Not running /system/bin/e2fsck on /dev/block/sdf7 (executable not in system image) <6>[ 2.314553] (6)[1:init]EXT4-fs (sdf7): mounted filesystem with ordered data mode. Opts: barrier=1 <14>[ 2.314573] (6)[1:init]init: [libfs_mgr]__mount(source=/dev/block/by-name/opporeserve2,target=/mnt/vendor/opporeserve,type=ext4)=0: Success <11>[ 2.315532] (6)[1:init]init: Could not get mount point for '/' in /proc/mounts, /system will not be available for overlayfs
vvb2060 commented 3 years ago

@CNLM @qianmo-xw https://github.com/vvb2060/Magisk/actions/runs/1076127393

alextrack2013 commented 3 years ago

@CNLM @qianmo-xw https://github.com/vvb2060/Magisk/actions/runs/1076127393

Bootloop on Realme X2 Pro. Realme UI 2.0. kmsg.txt

asp345 commented 3 years ago

@CNLM @qianmo-xw https://github.com/vvb2060/Magisk/actions/runs/1076127393

Working on Realme X RUI2 CN F.03 and F.05 (SD710 / has loop@ entry)

vvb2060 commented 3 years ago

@alextrack2013 For some of the devices that use loop@xxxxxxx.img, even manually mounting img gives errors, I think there is a problem with the kernel of these devices. These devices will still bootloop unless someone gives a solution. As far as I know, they are all MediaTek devices. photo_2021-07-29_15-30-36

vvb2060 commented 3 years ago

For devices that do not have loop entries in oplus.fstab, or Qualcomm devices, you can download the latest release build at https://github.com/vvb2060/magisk_files/tree/alpha , or download the CI build at https://github.com/vvb2060/Magisk/actions/workflows/build.yml?query=branch%3Aalpha .

Jowat97 commented 3 years ago

@alextrack2013 For some of the devices that use loop@xxxxxxx.img, even manually mounting img gives errors, I think there is a problem with the kernel of these devices. These devices will still bootloop unless someone gives a solution. As far as I know, they are all MediaTek devices. photo_2021-07-29_15-30-36

The Realme X2 Pro is a Qualcomm device (Snapdragon 855+). Actually, all devices that have been reported as working here in the comments, are MediaTek devices. Only exception is Realme X. It also bootooped until you provided your second patch. Will it help you, if we provide the firmware or the stock boot.img etc.? Realme also released the kernel source code for the X2 Pro.

vvb2060 commented 3 years ago

I'm just guessing. Maybe it has nothing to do with the Soc vendor, but something else. Anyway, unless there is a clear solution, or the init source code from oppo (vendor/oplus/system/core/oppo_fs_mgr/oppo_fstab_utils.cpp), I won't keep trying. Here is my patch for this issue: https://github.com/vvb2060/Magisk/commit/4fef57475a5e7ae156d0d9b580adbde0ca28aa0b

ricardojsaraiva commented 3 years ago

Estou apenas adivinhando. Talvez não tenha nada a ver com o vendedor Soc, mas outra coisa. De qualquer forma, a menos que haja uma solução clara ou o código-fonte init do oppo (vendor / oplus / system / core / oppo_fs_mgr / oppo_fstab_utils.cpp), não vou continuar tentando. Aqui está meu patch para esse problema: vvb2060 @ 4fef574

Realme X50 Pro 5G 2075 - Boot and Boot with Patch on UI 2.0, stays in bootloop.

What information can I provide and how, I am a layman in these things.

https://github.com/topjohnwu/Magisk/issues/3663#issuecomment-886227756

alextrack2013 commented 3 years ago

@alextrack2013 For some of the devices that use loop@xxxxxxx.img, even manually mounting img gives errors, I think there is a problem with the kernel of these devices. These devices will still bootloop unless someone gives a solution. As far as I know, they are all MediaTek devices. photo_2021-07-29_15-30-36

The Realme X2 Pro is a Qualcomm device (Snapdragon 855+). Actually, all devices that have been reported as working here in the comments, are MediaTek devices. Only exception is Realme X. It also bootooped until you provided your second patch. Will it help you, if we provide the firmware or the stock boot.img etc.? Realme also released the kernel source code for the X2 Pro.

boot.zip firmware images: https://www.dropbox.com/s/j9ydg1esdb3wac0/firmware.zip?dl=0

ricardojsaraiva commented 3 years ago

Realme X50 Pro 5G with the RMX2075 C.18 version, Root was working

zuhailkhan commented 3 years ago

I'm able to mount those images using "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx"

doing a soft restart gets things working.

osm0sis commented 3 years ago

Yeah I think the ro might be key, similar to with apex

zuhailkhan commented 3 years ago

I'm able to mount those images using "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx"

doing a soft restart gets things working.

@zillionaire13 Which Realme Device are you using? @alextrack2013 Did this work for you?

I this works for the X2 Pro / X50 Pro we could patch Magisk to solve this issue.

I'm using realme X2 pro. everything works except Fingerprint on Display. my_product.img is where biometrics are located and it needs to be mount early boot.

Idk about other devices. but in realme X2 pro only issue was missing apps/gapps/biometrics when rooted. Device boots and runs fine. the images in oplus.fstab were not mounted when rooted.

alextrack2013 commented 3 years ago

I'm able to mount those images using "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx"

doing a soft restart gets things working.

Where do you put this line? In boot?

zuhailkhan commented 3 years ago

I'm able to mount those images using "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" doing a soft restart gets things working.

Where do you put this line? In boot?

execute them from ADB shell. terminal commands are also executed but are not reflected after soft reboot, don't know why

busybox killall system_server to soft reboot

I tried magisk boot scripts but the same effect as a terminal execution.

alextrack2013 commented 3 years ago

I'm able to mount those images using "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" doing a soft restart gets things working.

Where do you put this line? In boot?

execute them from ADB shell. terminal commands are also executed but are not reflected after soft reboot, don't know why

busybox killall system_server to soft reboot

I tried magisk boot scripts but the same effect as a terminal execution.

Do you run this before installing magisk in recovery?

iamkgehlot commented 3 years ago

I'm able to mount those images using "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" doing a soft restart gets things working.

Where do you put this line? In boot?

execute them from ADB shell. terminal commands are also executed but are not reflected after soft reboot, don't know why busybox killall system_server to soft reboot I tried magisk boot scripts but the same effect as a terminal execution.

Do you run this before installing magisk in recovery?

This works after installing magisk and running "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" in adb shell with su. The following partition needs to be mounted from adb-

mount -o ro,bind,loop /system/euclid/my_product.img /my_product mount -o ro,bind,loop /system/euclid/my_heytap.img /my_heytap mount -o ro,bind,loop /system/euclid/my_company.img /my_company mount -o ro,bind,loop /system/euclid/my_preload.img /my_preload mount -o ro,bind,loop /system/euclid/my_stock.img /my_stock mount -o ro,bind,loop /system/euclid/my_region.img /my_region mount -o ro,bind,loop /system/euclid/my_carrier.img /my_carrier mount -o ro,bind,loop /system/euclid/my_engineering.img /my_engineering

And than system needs soft reboot . All this needs to be done after installing magisk and running these commands in adb shell when system is booted .

iamkgehlot commented 3 years ago

I'm able to mount those images using "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" doing a soft restart gets things working.

Where do you put this line? In boot?

execute them from ADB shell. terminal commands are also executed but are not reflected after soft reboot, don't know why busybox killall system_server to soft reboot I tried magisk boot scripts but the same effect as a terminal execution.

Do you run this before installing magisk in recovery?

This works after installing magisk and running "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" in adb shell with su. The following partition needs to be mounted from adb-

mount -o ro,bind,loop /system/euclid/my_product.img /my_product mount -o ro,bind,loop /system/euclid/my_heytap.img /my_heytap mount -o ro,bind,loop /system/euclid/my_company.img /my_company mount -o ro,bind,loop /system/euclid/my_preload.img /my_preload mount -o ro,bind,loop /system/euclid/my_stock.img /my_stock mount -o ro,bind,loop /system/euclid/my_region.img /my_region mount -o ro,bind,loop /system/euclid/my_carrier.img /my_carrier mount -o ro,bind,loop /system/euclid/my_engineering.img /my_engineering

And than system needs soft reboot . All this needs to be done after installing magisk and running these commands in adb shell when system is booted .

@osm0sis can you modify magisk for these commands so that everything is mounted on early boot.

osm0sis commented 3 years ago

Nope. Not something I would know how to add. But someone else might be able to, and hopefully be able to have it automatically parse them from the fstab or wherever.

vvb2060 commented 3 years ago

https://github.com/vvb2060/Magisk/commit/d031062aa043e31cac6944022fc80f36a4b52ead#diff-4839f4feec52c6f58bb7987550ed3121a8d9f6f975a3a1cfa8d964130751effaR147-R149 I already let original init handle them, but I don't know why this doesn't work for some devices. Need someone to give me a kmsg

alextrack2013 commented 3 years ago

I'm able to mount those images using "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" doing a soft restart gets things working.

Where do you put this line? In boot?

execute them from ADB shell. terminal commands are also executed but are not reflected after soft reboot, don't know why busybox killall system_server to soft reboot I tried magisk boot scripts but the same effect as a terminal execution.

Do you run this before installing magisk in recovery?

This works after installing magisk and running "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" in adb shell with su. The following partition needs to be mounted from adb-

mount -o ro,bind,loop /system/euclid/my_product.img /my_product mount -o ro,bind,loop /system/euclid/my_heytap.img /my_heytap mount -o ro,bind,loop /system/euclid/my_company.img /my_company mount -o ro,bind,loop /system/euclid/my_preload.img /my_preload mount -o ro,bind,loop /system/euclid/my_stock.img /my_stock mount -o ro,bind,loop /system/euclid/my_region.img /my_region mount -o ro,bind,loop /system/euclid/my_carrier.img /my_carrier mount -o ro,bind,loop /system/euclid/my_engineering.img /my_engineering

And than system needs soft reboot . All this needs to be done after installing magisk and running these commands in adb shell when system is booted .

Sorry but I still don't know where I would run the adb commands. In custom recovery adb shell?

crazo7924 commented 3 years ago

I'm able to mount those images using "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" doing a soft restart gets things working.

Where do you put this line? In boot?

execute them from ADB shell. terminal commands are also executed but are not reflected after soft reboot, don't know why busybox killall system_server to soft reboot I tried magisk boot scripts but the same effect as a terminal execution.

Do you run this before installing magisk in recovery?

This works after installing magisk and running "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" in adb shell with su. The following partition needs to be mounted from adb-

mount -o ro,bind,loop /system/euclid/my_product.img /my_product mount -o ro,bind,loop /system/euclid/my_heytap.img /my_heytap mount -o ro,bind,loop /system/euclid/my_company.img /my_company mount -o ro,bind,loop /system/euclid/my_preload.img /my_preload mount -o ro,bind,loop /system/euclid/my_stock.img /my_stock mount -o ro,bind,loop /system/euclid/my_region.img /my_region mount -o ro,bind,loop /system/euclid/my_carrier.img /my_carrier mount -o ro,bind,loop /system/euclid/my_engineering.img /my_engineering

And than system needs soft reboot .

Sorry but I still don't know where I would run the adb commands. In custom recovery adb shell?

Magisk needs to be running. Android System's adb shell it is.

alextrack2013 commented 3 years ago

Some news on the X2 Pro. I flashed last OTA from custom recovery, format data and flashed magisk build from @vvb2060. It booted well, even FOD worked without adb shell commands, but after a reboot, FOD won't work anymore. This is probably caused by "my_product.img" file. Any better fixes than early mounting?

@vvb2060 A possible fix would be mounting my_product.img before any other file, if you make a build with that fix I will try it myself

alextrack2013 commented 3 years ago

I'm able to mount those images using "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" doing a soft restart gets things working.

Where do you put this line? In boot?

execute them from ADB shell. terminal commands are also executed but are not reflected after soft reboot, don't know why busybox killall system_server to soft reboot I tried magisk boot scripts but the same effect as a terminal execution.

Do you run this before installing magisk in recovery?

This works after installing magisk and running "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" in adb shell with su. The following partition needs to be mounted from adb-

mount -o ro,bind,loop /system/euclid/my_product.img /my_product mount -o ro,bind,loop /system/euclid/my_heytap.img /my_heytap mount -o ro,bind,loop /system/euclid/my_company.img /my_company mount -o ro,bind,loop /system/euclid/my_preload.img /my_preload mount -o ro,bind,loop /system/euclid/my_stock.img /my_stock mount -o ro,bind,loop /system/euclid/my_region.img /my_region mount -o ro,bind,loop /system/euclid/my_carrier.img /my_carrier mount -o ro,bind,loop /system/euclid/my_engineering.img /my_engineering

And than system needs soft reboot . All this needs to be done after installing magisk and running these commands in adb shell when system is booted .

So, I tried using adb shell and these commands but i got /etc/fstab error. 1|RMX1931L1:/ $ mount -o ro,bind,loop /system/euclid/my_product.img /my_product mount: bad /etc/fstab: No such file or directory It doesn't get read

zuhailkhan commented 3 years ago

I'm able to mount those images using "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" doing a soft restart gets things working.

Where do you put this line? In boot?

execute them from ADB shell. terminal commands are also executed but are not reflected after soft reboot, don't know why busybox killall system_server to soft reboot I tried magisk boot scripts but the same effect as a terminal execution.

Do you run this before installing magisk in recovery?

This works after installing magisk and running "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" in adb shell with su. The following partition needs to be mounted from adb-

mount -o ro,bind,loop /system/euclid/my_product.img /my_product mount -o ro,bind,loop /system/euclid/my_heytap.img /my_heytap mount -o ro,bind,loop /system/euclid/my_company.img /my_company mount -o ro,bind,loop /system/euclid/my_preload.img /my_preload mount -o ro,bind,loop /system/euclid/my_stock.img /my_stock mount -o ro,bind,loop /system/euclid/my_region.img /my_region mount -o ro,bind,loop /system/euclid/my_carrier.img /my_carrier mount -o ro,bind,loop /system/euclid/my_engineering.img /my_engineering

And than system needs soft reboot . All this needs to be done after installing magisk and running these commands in adb shell when system is booted .

So, I tried using adb shell and these commands but i got /etc/fstab error. 1|RMX1931L1:/ $ mount -o ro,bind,loop /system/euclid/my_product.img /my_product mount: bad /etc/fstab: No such file or directory It doesn't get read

You need to run inside a root shell. Before trying the commands run

adb shell

Then

su

Then

command to run as root

or simply

adb shell su -c command_to_run

alextrack2013 commented 3 years ago

I'm able to mount those images using "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" doing a soft restart gets things working.

Where do you put this line? In boot?

execute them from ADB shell. terminal commands are also executed but are not reflected after soft reboot, don't know why busybox killall system_server to soft reboot I tried magisk boot scripts but the same effect as a terminal execution.

Do you run this before installing magisk in recovery?

This works after installing magisk and running "mount -o ro,bind,loop /system/euclid/my_xxxx.img /my_xxxx" in adb shell with su. The following partition needs to be mounted from adb- mount -o ro,bind,loop /system/euclid/my_product.img /my_product mount -o ro,bind,loop /system/euclid/my_heytap.img /my_heytap mount -o ro,bind,loop /system/euclid/my_company.img /my_company mount -o ro,bind,loop /system/euclid/my_preload.img /my_preload mount -o ro,bind,loop /system/euclid/my_stock.img /my_stock mount -o ro,bind,loop /system/euclid/my_region.img /my_region mount -o ro,bind,loop /system/euclid/my_carrier.img /my_carrier mount -o ro,bind,loop /system/euclid/my_engineering.img /my_engineering And than system needs soft reboot . All this needs to be done after installing magisk and running these commands in adb shell when system is booted .

So, I tried using adb shell and these commands but i got /etc/fstab error. 1|RMX1931L1:/ $ mount -o ro,bind,loop /system/euclid/my_product.img /my_product mount: bad /etc/fstab: No such file or directory It doesn't get read

You need to run inside a root shell. Before trying the commands run

adb shell

Then

su

Then

command to run as root

or simply

adb shell su -c command_to_run

It still doesn't work, nothing seems to get mounted. Any ideas? This is what I was trying:

adb shell RMX1931L1:/ $ su mount -o ro,bind,loop /system/euclid/my_product.img /my_product mount -o ro,bind,loop /system/euclid/my_heytap.img /my_heytap mount -o ro,bind,loop /system/euclid/my_company.img /my_company mount -o ro,bind,loop /system/euclid/my_preload.img /my_preload mount -o ro,bind,loop /system/euclid/my_stock.img /my_stock mount -o ro,bind,loop /system/euclid/my_region.img /my_region mount -o ro,bind,loop /system/euclid/my_carrier.img /my_carrier mount -o ro,bind,loop /system/euclid/my_engineering.img /my_engineering

zuhailkhan commented 3 years ago

did you run a soft restart after mounting.

run it with

busybox killall system_server

or run

adb shell su -c stop

then

adb shell su -c start

zuhailkhan commented 3 years ago

@vvb2060 your latest alpha release (31) is working on realme x2 pro (Qualcomm) but breaks Fingerprint after some reboots.

vvb2060 commented 3 years ago

4601

osm0sis commented 3 years ago

Next Canary.