diff --git a/balong-usbdload.c b/balong-usbdload.c index ac17732..5179536 100644 --- a/balong-usbdload.c +++ b/balong-usbdload.c @@ -491,7 +491,9 @@ for(bl=0;bl<2;bl++) { } // Удаление процедуры flash_eraseall if (!cflag) { - res=pv7r2(blk[bl].pbuf, blk[bl].size)+ pv7r11(blk[bl].pbuf, blk[bl].size) + pv7r1(blk[bl].pbuf, blk[bl].size) + pv7r22(blk[bl].pbuf, blk[bl].size) + pv7r22_2(blk[bl].pbuf, blk[bl].size); + res=pv7r2(blk[bl].pbuf, blk[bl].size) + pv7r11(blk[bl].pbuf, blk[bl].size) \ + + pv7r1(blk[bl].pbuf, blk[bl].size) + pv7r22(blk[bl].pbuf, blk[bl].size) \ + + pv7r22_2(blk[bl].pbuf, blk[bl].size) + pv7r22_3(blk[bl].pbuf, blk[bl].size); if (res != 0) printf("\n\n * Удалена процедура flash_eraseal по смещению %08x",res); else { printf("\n Процедура eraseall не найдена в загрузчике - используйте ключ -с для загрузки без патча!\n"); diff --git a/loader-patch.c b/loader-patch.c index 21afe16..5f9882d 100644 --- a/loader-patch.c +++ b/loader-patch.c @@ -74,6 +74,12 @@ fclose(in); //================================================================================== +res=pv7r22_3(buf, fsize); +if (res != 0) { + printf("\n* Найдена сигнатура типа V7R22_3 по смещению %08x",res); + goto endpatch; +} + res=pv7r22_2(buf, fsize); if (res != 0) { printf("\n* Найдена сигнатура типа V7R22_2 по смещению %08x",res); diff --git a/patcher.c b/patcher.c index 1ae2f47..a65abf8 100644 --- a/patcher.c +++ b/patcher.c @@ -52,6 +52,10 @@ const char sigburn_v7r22_2[]={ 0x18, 0x30, 0x94, 0xE5, 0x10, 0x20, 0x94, 0xE5, 0x0D, 0x00, 0xA0, 0xE1, 0x30, 0x40, 0x84, 0xE2, 0x14, 0x30, 0x8D, 0xE5, 0x10, 0x20, 0x8D, 0xE5}; +const char sigburn_v7r22_3[]={ + 0x10, 0x30, 0x94, 0xE5, 0x0D, 0x00, 0xA0, 0xE1, 0x10, 0x30, 0x8D, 0xE5, + 0x18, 0x30, 0x94, 0xE5, 0x14, 0x30, 0x8D, 0xE5}; + const char sigburn_v7r11[]={ 0x00, 0x00, 0x50, 0xE3, 0x70, 0x80, 0xBD, 0x08, 0x00, 0x30, 0xA0, 0xE3, 0x4E, 0x26, 0x04, 0xE3, 0xE0, 0x3F, 0x44, 0xE3, 0x55, 0x22, 0x44, 0xE3, @@ -73,6 +77,7 @@ const char sigbad[]={0x04, 0x10, 0x8D, 0xE2, 0x04, 0x00, 0xA0, 0xE1}; struct defpatch patch_v7r22={sigburn_v7r22, sizeof(sigburn_v7r22), -37}; struct defpatch patch_v7r22_2={sigburn_v7r22_2, sizeof(sigburn_v7r22_2), 0}; +struct defpatch patch_v7r22_3={sigburn_v7r22_3, sizeof(sigburn_v7r22_3), 0}; struct defpatch patch_v7r11={sigburn_v7r11, sizeof(sigburn_v7r11), 4}; struct defpatch patch_v7r2={sigburn_v7r2, sizeof(sigburn_v7r2), 16}; struct defpatch patch_v7r1={sigburn_v7r1, sizeof(sigburn_v7r1), 0}; @@ -88,5 +93,6 @@ uint32_t pv7r11 (uint8_t* buf, uint32_t fsize) { return patch(patch_v7r11, buf, uint32_t pv7r1 (uint8_t* buf, uint32_t fsize) { return patch(patch_v7r1, buf, fsize,0); } uint32_t pv7r22 (uint8_t* buf, uint32_t fsize) { return patch(patch_v7r22, buf, fsize,1); } uint32_t pv7r22_2 (uint8_t* buf, uint32_t fsize) { return patch(patch_v7r22_2, buf, fsize,0); } +uint32_t pv7r22_3 (uint8_t* buf, uint32_t fsize) { return patch(patch_v7r22_3, buf, fsize,0); } uint32_t perasebad (uint8_t* buf, uint32_t fsize) { return patch(patch_erasebad, buf, fsize,0); } diff --git a/patcher.h b/patcher.h index 4b35328..4131f07 100644 --- a/patcher.h +++ b/patcher.h @@ -19,6 +19,7 @@ uint32_t patch(struct defpatch fp, uint8_t* buf, uint32_t fsize, uint32_t ptype) uint32_t pv7r22 (uint8_t* buf, uint32_t fsize); uint32_t pv7r22_2 (uint8_t* buf, uint32_t fsize); +uint32_t pv7r22_3 (uint8_t* buf, uint32_t fsize); uint32_t pv7r2 (uint8_t* buf, uint32_t fsize); uint32_t pv7r11 (uint8_t* buf, uint32_t fsize); uint32_t pv7r1 (uint8_t* buf, uint32_t fsize);