my doogee s96, with the TWRP no more able to boot, probably due to the dm-verity check.
I tried several things, install Magisk or patching boot.img, but I always failed. The phone starts and suddendly swicth to TWRP without launching Android.
With the suggestion of @alecxs I pulled the super partition through adb and umpacked with lpunpack.
The idea is to manually disable the avb/dm-verity control.
Now I have product.img + system.img + vendor.img.
I can open them with 7z and, for instance, i found many lines on /vendor.img/etc/fstab.mt6785 using avb:
system /system ext4 ro wait,,avb=vbmeta_system,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey
vendor /vendor ext4 ro wait,,avb,logical,first_stage_mount
product /product ext4 ro wait,,avb,logical,first_stage_mount
or the system.img/init.rc with the line
exec -- /system/bin/fsverity_init
and system.img/system/bin/fsverity_init:
# Enforce fsverity signature checking
echo 1 > /proc/sys/fs/verity/require_signatures
# Load all keys
for cert in /product/etc/security/fsverity/*.der; do
/system/bin/mini-keyctl padd asymmetric fsv_product .fs-verity < "$cert" ||
log -p e -t fsverity_init "Failed to load $cert"
done
# Prevent future key links to .fs-verity keyring
/system/bin/mini-keyctl restrict_keyring .fs-verity ||
log -p e -t fsverity_init "Failed to restrict .fs-verity keyring"
The question is:
Is it possible to manually edit the imgs, repack the super and adb push it to make my phone start again?
What should I do?
Thank you in advance!