mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 19:31:12 +00:00
Allow verification cancel. Backup still remains.
This commit is contained in:
parent
1392e6eaf4
commit
04ac8ebd43
2 changed files with 25 additions and 9 deletions
|
@ -57,18 +57,18 @@ PATCHSET_DEF(_secmon_4_patchset,
|
||||||
|
|
||||||
PATCHSET_DEF(_secmon_5_patchset,
|
PATCHSET_DEF(_secmon_5_patchset,
|
||||||
// Patch package2 decryption and signature/hash checks.
|
// Patch package2 decryption and signature/hash checks.
|
||||||
{ 0xDA8 + 0x9D8 , _NOP() }, //package2 structure.
|
{ 0xDA8 + 0x9D8, _NOP() }, //package2 structure.
|
||||||
{ 0xDA8 + 0x9E4 , _NOP() }, //Version.
|
{ 0xDA8 + 0x9E4, _NOP() }, //Version.
|
||||||
{ 0xDA8 + 0xC9C , _NOP() }, //Header signature.
|
{ 0xDA8 + 0xC9C, _NOP() }, //Header signature.
|
||||||
{ 0xDA8 + 0x1038 , _NOP() } //Sections SHA2.
|
{ 0xDA8 + 0x1038, _NOP() } //Sections SHA2.
|
||||||
);
|
);
|
||||||
|
|
||||||
PATCHSET_DEF(_secmon_6_patchset,
|
PATCHSET_DEF(_secmon_6_patchset,
|
||||||
// Patch package2 decryption and signature/hash checks.
|
// Patch package2 decryption and signature/hash checks.
|
||||||
{ 0xDC8 + 0x820 , _NOP() }, //package2 structure.
|
{ 0xDC8 + 0x820, _NOP() }, //package2 structure.
|
||||||
{ 0xDC8 + 0x82C , _NOP() }, //Version.
|
{ 0xDC8 + 0x82C, _NOP() }, //Version.
|
||||||
{ 0xDC8 + 0xE90 , _NOP() }, //Header signature.
|
{ 0xDC8 + 0xE90, _NOP() }, //Header signature.
|
||||||
{ 0xDC8 + 0x112C , _NOP() } //Sections SHA2.
|
{ 0xDC8 + 0x112C, _NOP() } //Sections SHA2.
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -840,6 +840,7 @@ out:
|
||||||
int dump_emmc_verify(sdmmc_storage_t *storage, u32 lba_curr, char *outFilename, emmc_part_t *part)
|
int dump_emmc_verify(sdmmc_storage_t *storage, u32 lba_curr, char *outFilename, emmc_part_t *part)
|
||||||
{
|
{
|
||||||
FIL fp;
|
FIL fp;
|
||||||
|
u32 btn = 0;
|
||||||
u32 prevPct = 200;
|
u32 prevPct = 200;
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
|
@ -898,7 +899,7 @@ int dump_emmc_verify(sdmmc_storage_t *storage, u32 lba_curr, char *outFilename,
|
||||||
default:
|
default:
|
||||||
se_calc_sha256(&hashEm, bufEm, num << 9);
|
se_calc_sha256(&hashEm, bufEm, num << 9);
|
||||||
se_calc_sha256(&hashSd, bufSd, num << 9);
|
se_calc_sha256(&hashSd, bufSd, num << 9);
|
||||||
res = memcmp(hashEm, hashSd, 0x20);
|
res = memcmp(hashEm, hashSd, 0x10);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (res)
|
if (res)
|
||||||
|
@ -921,6 +922,21 @@ int dump_emmc_verify(sdmmc_storage_t *storage, u32 lba_curr, char *outFilename,
|
||||||
|
|
||||||
lba_curr += num;
|
lba_curr += num;
|
||||||
totalSectorsVer -= num;
|
totalSectorsVer -= num;
|
||||||
|
|
||||||
|
btn = btn_wait_timeout(0, BTN_VOL_DOWN | BTN_VOL_UP);
|
||||||
|
if ((btn & BTN_VOL_DOWN) && (btn & BTN_VOL_UP))
|
||||||
|
{
|
||||||
|
gfx_con.fntsz = 16;
|
||||||
|
WPRINTF("\n\nThe verification was cancelled!");
|
||||||
|
EPRINTF("\nPress any key...\n");
|
||||||
|
msleep(1500);
|
||||||
|
|
||||||
|
free(bufEm);
|
||||||
|
free(bufSd);
|
||||||
|
f_close(&fp);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
free(bufEm);
|
free(bufEm);
|
||||||
free(bufSd);
|
free(bufSd);
|
||||||
|
|
Loading…
Reference in a new issue