Wiping Factory Reset Protection

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
NOTE: dd is called "Disk Destroyer" as a joke, but keep in mind you might irrecoverably brick your device by doing these steps incorrectly!

Further information:

Published by

Edit source on Github