Welcome! Log In Create A New Profile

Advanced

IOS Check revision?

Posted by pokeglobe 
IOS Check revision?
December 16, 2009 07:09PM
How can I chek the IOS revision loaded? I know I could print it off with prinf (iosrevision); or something like that. And use an if something == revnumber ?

Would this work? and if not how would I?

(Excuse fail typing)
Re: IOS Check revision?
December 16, 2009 07:44PM
You know you don't have to call IOS_ReloadIOS() to be able to see the revision of an IOS ;-)

So, you're basically trying to see how to printf() the revision of any IOS?
Re: IOS Check revision?
December 16, 2009 08:19PM
Basicly... I want this:

You load IOS (I need it to load IOS35) (Complete)
Check revision (Complete)
Print revision (Complete)
Compare it to whatever revision I put (Stuck D:)

Here is an example ! (Not real code lol)
if (revision = 2910);
{
// This
}

Something similar to this would be perfect. Unfortunately I can't get it right.
Re: IOS Check revision?
December 16, 2009 08:39PM
s32 Title_GetTMD(u64 tid, signed_blob **outbuf, u32 *outlen) {
    void *p_tmd = NULL;

    u32 len;
    s32 ret;

    /* Get TMD size */
    ret = ES_GetStoredTMDSize(tid, &len);
    if (ret < 0)
        return ret;

    /* Allocate memory */
    p_tmd = memalign(32, round_up(len, 32));
    if (!p_tmd)
        return -1;

    /* Read TMD */
    ret = ES_GetStoredTMD(tid, p_tmd, len);
    if (ret < 0)
        goto err;

    /* Set values */
    *outbuf = p_tmd;
    *outlen = len;

    return 0;

err:
    /* Free memory */
    if (p_tmd)
        free(p_tmd);

    return ret;
}

s32 Title_GetVersionNObuf(u64 tid) {
    signed_blob *p_tmd = NULL;
    tmd *tmd_data = NULL;

    u32 len;
    s32 ret;

    /* Get title TMD */
    ret = Title_GetTMD(tid, &p_tmd, &len);
    if (ret < 0)
        return ret;

    /* Retrieve TMD info */
    tmd_data = (tmd *)SIGNATURE_PAYLOAD(p_tmd);

    /* Set values */
    ret = tmd_data->title_version;

    /* Free memory */
    free(p_tmd);

    return ret;
}



IOS_ReloadIOS(53);
WPAD_Init();
int rr=Title_GetVersionNObuf(0x0000000100000035ll);
printf("IOS 53, revision: %d", rr);
if(rr ==2910)
printf("\nYou have a stubbed IOS 53!");
Re: IOS Check revision?
December 16, 2009 09:50PM
Brilliant! Thanks a bunch!
Re: IOS Check revision?
December 18, 2009 06:25AM
since you are checking the version and revision AFTER you load the ios, you can just say
IOS_ReloadIOS(35);
printf("IOS: %d (v%d)",IOS_GetVersion(), IOS_GetRevision());

you only need to use the signed blobs and ES calls if you want to check a IOS version and what not BEFORE you load it.
Sorry, only registered users may post in this forum.

Click here to login