Boot into a custom recovery, bootloader must be unlocked.
I used LineageOS recovery for the Xperia XZ2 Compact.
Must be root.
$ getprop ro.frp.pst
/dev/block/bootdevice/by-name/frp
$ blockdev --getsize64 /dev/block/bootdevice/by-name/frp
Gives size in bytes, e.g. 50000
Insert that size as count
argument and set block size (bs
) to 1 for 1 byte.
dd if=/dev/zero of=/dev/block/bootdevice/by-name/frp bs=1 count=50000
Further information: