prerequisites: first, make sure bootloader is unlocked. if not unlocked, it leaves you no choice to factory reset again. enable OEM unlocking in developer options, reboot into bootloader and unlock from fastboot.
1) next download latest TWRP. you have boot.img of cheryl-p-release-7083 therefore it's safe to flash twrp into both slots. This is easier than the official instructions. you can just restore boot.img once in TWRP.
Code:
fastboot devices
fastboot flash boot_a twrp-3.7.0_9-0-cheryl.img
fastboot flash boot_b twrp-3.7.0_9-0-cheryl.img
reboot the phone. it has no choice other than boot into TWRP. if TWRP doesn't work, try again with older version.
2) once in TWRP restore the boot.img of cheryl-p-release-7083 from adb. do this while in TWRP
Code:
adb devices
adb push boot.img /tmp
adb shell
# dd if=/tmp/boot.img of=/dev/block/bootdevice/by-name/boot_a
# dd if=/tmp/boot.img of=/dev/block/bootdevice/by-name/boot_b
exit
3) now the boot.img is restored, you can proceed installing TWRP and Magisk (in this order)
a) copy files to phone (note that apk is renamed to zip)
Code:
adb push twrp-installer-3.7.0_9-0-cheryl.zip /tmp
adb push Magisk-v25.2.apk /tmp/Magisk-v25.2.zip
b) prepare Magisk settings
Code:
adb shell
# echo 'KEEPVERITY=false' > /cache/.magisk
# echo 'KEEPFORCEENCRYPT=true' >> /cache/.magisk
# echo 'PATCHVBMETAFLAG=true' >> /cache/.magisk
# exit
c) install TWRP from menu - install - navigate to /tmp - twrp-installer-3.7.0_9-0-cheryl.zip - swipe to confirm
d) install Magisk from menu - install - navigate to /tmp - Magisk-v25.2.zip - swipe to confirm
e) finally, just in case something did go wrong, get the recovery.log
Code:
adb pull /tmp/recovery.log
you can now reboot.
4) when phone booted successfully, install Magisk-v25.2.apk to get rooted. done.
(you can reboot into TWRP recovery from Magisk reboot menu any time)