Add a checksum to FRP partition

It will be hard to mandate the contents
of the FRP partition out of factory. Further, for upgrading
units, it would require that OEMs format the partition and then store
a bit saying that they've done so. This adds another attack vector.
Now defeating FRP means either compromising the FRP partition
OR wherever the OEMs decide to store that bit.

This patch adds a checksum to the FRP partition. If the checksum
is not valid, the partition is wiped - disabling OEM unlock.

This ensures that no matter what data comes on the partition, we will 
always disable OEM unlock by default. It also allows OEMs to not have to
worry about initializing the partition, as it happens automatically. 

Bug: 18322021
Change-Id: Ib30782baa771591c30ea95054d3b83f36fc08cc2
1 file changed