Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyi committed Aug 31, 2020
2 parents 0dcb0a4 + 468237f commit 1e890c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2560,6 +2560,7 @@ bool erase_ubi_block(STRUCT_RKDEVICE_DESC &dev, u32 uiOffset, u32 uiPartSize)
UINT uiReadCount,uiStartBlock,uiEraseBlock,uiBlockCount,uiErasePos;
int iRet;
DWORD *pID=NULL;

if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM))
return false;
pComm = new CRKUsbComm(dev, g_pLogObject, bRet);
Expand All @@ -2578,6 +2579,7 @@ bool erase_ubi_block(STRUCT_RKDEVICE_DESC &dev, u32 uiOffset, u32 uiPartSize)
goto EXIT_UBI_ERASE;
}
pID = (DWORD *)flashID;

if (*pID==0x434d4d45)//emmc
{
bSuccess = true;
Expand Down Expand Up @@ -3212,6 +3214,7 @@ bool handle_command(int argc, char* argv[], CRKScan *pScan)
if (is_sparse_image(argv[3]))
bSuccess = write_sparse_lba(dev, part_offset, part_size, argv[3]);
else {

bSuccess = true;
if (is_ubifs_image(argv[3]))
bSuccess = erase_ubi_block(dev, part_offset, part_size);
Expand Down

0 comments on commit 1e890c4

Please sign in to comment.