bkerler / edl

Inofficial Qualcomm Firehose / Sahara / Streaming / Diag Tools :)
GNU General Public License v3.0
1.59k stars 372 forks source link

Ensure integrity of gpt header partitions #523

Closed bongbui321 closed 6 months ago

bongbui321 commented 6 months ago

@bkerler, this is an enhancement to the setactiveslot command, it ensures the integrity of the primary gpt header by checking the header crc32 and partition table crc32. if the primary gpt header is corrupted or doesn't match its crc32 value with that of backup gpt header, it would recover from the backup gpt header.

I have also made it possible to update the backup gpt header as well, but I think it is best practice to make it get updated by the xbl partition during boot up process. I'm not sure this mechanism is available for other qualcomm chipset, but definitely for sdm845