rxtools/source/features/cfw.c
void DevMode(){
    u8* firm = 0x24000000;
    nand_readsectors(0, 0xF0000/0x200, firm, FIRM0);
    if(strncmp((char*)firm, "FIRM", 4))
    nand_readsectors(0, 0xF0000/0x200, firm, FIRM1);

    unsigned char sign1[] = {0xC1, 0x17, 0x49, 0x1C, 0x31, 0xD0, 0x68, 0x46, 0x01, 0x78, 0x40, 0x1C, 0x00, 0x29, 0x10, 0xD1};
    unsigned char sign2[] = {0xC0, 0x1C, 0x76, 0xE7, 0x20, 0x00, 0x74, 0xE7, 0x22, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F};
    unsigned char patch1[] = { 0x00, 0x20, 0x4E, 0xB0, 0x70, 0xBD };
    unsigned char patch2[] = { 0x00, 0x20};

    for(int i = 0; i < 0xF0000; i++){
        if(!memcmp(firm + i, sign1, 16)){
            memcpy(firm + i, patch1, 6);
        }
        if(!memcmp(firm + i, sign2, 16)){
            memcpy(firm + i, patch2, 2);
        }
    }
    softreset();
}
//Just patches signatures check, loads in sysnand
Just patches signatures check, loads in sysnand
Just patches signatures check loads in sysnand
void DevMode(){
    u8* firm = 0x24000000;
    nand_readsectors(0, 0xF0000/0x200, firm, FIRM0);
    if(strncmp((char*)firm, "FIRM", 4))
    nand_readsectors(0, 0xF0000/0x200, firm, FIRM1);
    unsigned char sign1[] = {0xC1, 0x17, 0x49, 0x1C, 0x31, 0xD0, 0x68, 0x46, 0x01, 0x78, 0x40, 0x1C, 0x00, 0x29, 0x10, 0xD1};
    unsigned char sign2[] = {0xC0, 0x1C, 0x76, 0xE7, 0x20, 0x00, 0x74, 0xE7, 0x22, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F};
    unsigned char patch1[] = { 0x00, 0x20, 0x4E, 0xB0, 0x70, 0xBD };
    unsigned char patch2[] = { 0x00, 0x20};
    for(int i = 0; i < 0xF0000; i++){
        if(!memcmp(firm + i, sign1, 16)){
            memcpy(firm + i, patch1, 6);
        }
        if(!memcmp(firm + i, sign2, 16)){
            memcpy(firm + i, patch2, 2);
        }
    }
    softreset();
}
void DevMode ( ) { u8 * firm = 0x24000000 ; nand_readsectors ( 0 , 0xF0000 / 0x200 , firm , FIRM0 ) ; if ( strncmp ( ( char * ) firm , " " , 4 ) ) nand_readsectors ( 0 , 0xF0000 / 0x200 , firm , FIRM1 ) ; unsigned char sign1 [ ] = { 0xC1 , 0x17 , 0x49 , 0x1C , 0x31 , 0xD0 , 0x68 , 0x46 , 0x01 , 0x78 , 0x40 , 0x1C , 0x00 , 0x29 , 0x10 , 0xD1 } ; unsigned char sign2 [ ] = { 0xC0 , 0x1C , 0x76 , 0xE7 , 0x20 , 0x00 , 0x74 , 0xE7 , 0x22 , 0xF8 , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0x0F } ; unsigned char patch1 [ ] = { 0x00 , 0x20 , 0x4E , 0xB0 , 0x70 , 0xBD } ; unsigned char patch2 [ ] = { 0x00 , 0x20 } ; for ( int i = 0 ; i < 0xF0000 ; i ++ ) { if ( ! memcmp ( firm + i , sign1 , 16 ) ) { memcpy ( firm + i , patch1 , 6 ) ; } if ( ! memcmp ( firm + i , sign2 , 16 ) ) { memcpy ( firm + i , patch2 , 2 ) ; } } softreset ( ) ; }
Just patches signatures check, loads in sysnand
Just patches signatures check loads in sysnand