Question Fork Magisk for Vivo Devices

Search This thread

NextGenMagisk

Member
May 22, 2022
44
6
you can try to use avbctl, it's helped me to boot in vndklite variant

./avbctl disable-verity
./avbctl disable-verification
thanks, both checks are now disabled using avbctl.

I tried to flash "lineage-19.1-20220719-UNOFFICIAL-a64_bgS.img"

Fastboot automatically resized 'system' partition, and after flash completed, device got into boot loop.

I must be flashing wrong builds, how to know which build is correct?
 

Pervokur

Senior Member
Feb 15, 2022
227
62
thanks, both checks are now disabled using avbctl.

I tried to flash "lineage-19.1-20220719-UNOFFICIAL-a64_bgS.img"

Fastboot automatically resized 'system' partition, and after flash completed, device got into boot loop.

I must be flashing wrong builds, how to know which build is correct?
can you boot in FT after disable-verity disable-verification? upload vbmeta here, it's better to compare original vbmeta with pached, so you would know which bits are added for disable-verity disable-verification.


maybe you shoud try A11 gsi, los
or aosp
 
Last edited:

Pervokur

Senior Member
Feb 15, 2022
227
62
did you try to flash newest ota, shouldn't it be A12? maybe you can boot with it in gsi 12
 

NextGenMagisk

Member
May 22, 2022
44
6
can you boot in FT after disable-verity disable-verification? upload vbmeta here, it's better to compare original vbmeta with pached, so you would know which bits are added for disable-verity disable-verification.
Yes, I can boot into Funtouch OS after disabling verity and verification using avbctl.

Now I will try to install LOS 18.x and see how it goes.

Update: Magisk is working on LOS 18.x arm64.
 
Last edited:

NeonzGamingYT

Member
Dec 5, 2020
33
2
Redmi 9A
thanks, both checks are now disabled using avbctl.

I tried to flash "lineage-19.1-20220719-UNOFFICIAL-a64_bgS.img"

Fastboot automatically resized 'system' partition, and after flash completed, device got into boot loop.

I must be flashing wrong builds, how to know which build is correct?
Ok the problem is right now, ur using a64 instead of arm64 🤣 thats why it doesn't boot!
 
  • Like
Reactions: NextGenMagisk

NeonzGamingYT

Member
Dec 5, 2020
33
2
Redmi 9A
IMG_20220802_214939_745.jpg

No su :(
 

NeonzGamingYT

Member
Dec 5, 2020
33
2
Redmi 9A

Pervokur

Senior Member
Feb 15, 2022
227
62

Pervokur

Senior Member
Feb 15, 2022
227
62

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    This post seeks attention of Senior XDA developers who are contributors of Magisk:

    I have been struggling to fix Magisk mount and SU execution on VIVO devices.

    Magisk issue #5148


    I am ready to work together to the best of my technical capacity.

    I will pay for your test device and a special bounty for your hard work and development efforts.

    Interested developers please reach out to me.
    2
    Is there any way to run this locally on a the device having debug build?
    vivo y31, LineageOS 19.1, userdebug

    magisk 24.3 can inject code in init.rc, can't mount /system /vendor /oem

    magisk >24.3 can't inject code, because magisk switched to new method wich requires mounting /system. Zygisk is broken since 2431*

    If you want to have adb root, then you can use phh-su(if you use gsi) and execute in termux

    su -c setprop service.adb.root 1
    su -c setprop service.adb.tcp.port 5555
    su -c stop adbd
    su -c start adbd
    adb wait-for-device
    adb shell whoami

    Without phh-su you would need to split screen [termux + developer options/wifi debugging] and pair with code
    one time in termux

    adb pair localhost:port code

    no need to split screen anymore

    then off -on wifi debugging

    adb connect localhost:newport
    adb root

    off-on wifi debugging again
    adb kill-server
    adb connect localhost:newnewport

    gz! you're root

    Another way is to edit init.rc. Just look at magiskrc.inc from the source code.


    I have no problems with zygisk and modules on 24.3 magisk. I just mounting overlayfs on top of /system and then just copy all modules into /system.

    Here is my .rc script which I pushed in boot.img like this

    ./magiskboot unpack boot.img
    ./magiskboot cpio ramdisk.cpio 'add 0644 overlay.d/ofs.rc ofs.rc'
    ./magiskboot repack boot newboot.img

    script

    on load_persist_props_action
    exec u:r:su:s0 -- /system/bin/mount -t overlay overlay -o lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow /system

    on zygote-start
    exec u:r:su:s0 -- /system/bin/mount /sbin/.magisk/zygisk/app_process32 /system/bin/app_process32
    exec u:r:su:s0 -- /system/bin/mount /sbin/.magisk/zygisk/app_process64 /system/bin/app_process64

    Then just create two folders
    /data/system/ou
    /data/system/ow

    And copy modules files in upper layer(real system will not be modified)

    su -c cp -r /sbin/.magisk/modules/*/system/* /system

    If you need to revert changes then you can delete two folders and create them again. Or you can delete module files like this
    cd /sbin/.magisk/modules/{Module Name}/system/
    find -exec rm /system/{} \;
    cd /data/system/ou
    find . -type d -empty -delete

    If you want to boot with real /system then just rename two folders
    1
    mount -t overlay
    overlay on /system type overlay (rw,seclabel,relatime,lowerdir=/system,upperdir=/data/system/ou,workdir=/data/system/ow)

    mount | grep " / "
    /dev/block/dm-0 on / type ext4 (ro,seclabel,nodev,relatime,discard)
    1
    This is extremely helpful and has given me a very clear path to solve problems with Vivo root. I will implement these suggestions. Thanks a lot.
    Another tip from me. There is a way to have system rw for magisk root. At least it works for me on LOS19.1 userdebug gsi, vndklite variant, magisk24.3

    Normaly
    magisk-su: mount -o rw,remount /
    operation not permitted

    adb root:mount -o rw,remount /
    ok

    but / is still ro for magisk-su

    Then I just kill surfaceflinger which leads to zygote restart(aka soft reboot)

    su -c killall surfaceflinger

    After booting / is rw for magisk-su and you can work with partition in file manager like Total Commander.
    1
    We do have a Magisk forum here on XDA. Here is the Magisk support/discussion thread. There are several very knowledgeable people such as @pndwal @ipdev and others that may be able to help with this issue.