I'm testing with Lineage, and I managed to pass Safetynet with the bootloader blocked.
The steps I used were:
1 - Install Lineage with this guide, don't forget that it has to be with Lineage recovery and gapps:
wiki.lineageos.org
2 - Restart and skip all configuration.
3 - Restart to bootloader, and lock the bootloader "fastboot oem lock", if you wish, when blocking will then clean everything, but keeping the Lineage recovery.
4 - Wait for it to start and make your configuration.
5 - Enable Usb debugging and Rooted debugging in the Developer options.
- Reboot.
- Download latest ih8sn (
https://github.com/luk1337/ih8sn/releases/tag/latest) release for aarch64.
- Extract ih8sn-aarch64.zip and move the files in your adb folder.
- Replace ih8sn.conf file with:
this for cheeseburger:
https://drive.google.com/file/d/18VPCiS1wrR0LKeGumMHI63Pddq42Cy6l/view?usp=sharing
this for dumpling:
https://drive.google.com/file/d/1UG89uMB9Oaqjuc_x9zfPUfnysGoz_6jt/view?usp=sharing
- Connect your device to your computer.
- Run the following commands in your adb folder:
adb wait-for-device root
adb wait-for-device remount
adb wait-for-device push 60-ih8sn.sh /system/addon.d/
adb wait-for-device push ih8sn /system/bin/
adb wait-for-device push ih8sn.rc /system/etc/init/
adb wait-for-device push ih8sn.conf /system/etc/
adb enable-verity
- Reboot.
6 - Now check if the safetynet passes with YASNAC.
* This method survives Lineage OS updates.