Hacking RELEASE Argon NX - Payload chainloader

  • Thread starter Thread starter FR0ZN
  • Start date Start date
  • Views Views 67,466
  • Replies Replies 139
  • Likes Likes 10
Odd... Just do us a favour... Think I need to do a mkdir.

Make a folder called "screenshots" - lower case - in SD root and try it again. Pretty please!

Yes, that's fixed it - you need to add a check to see if the screenshot dir exists - then if not, create it.
 
Thanks, that's working - I've attached the uf2 so those with modchips (atsamd21 based), can just drag and drop to the chip.

One thing though is that - now the name of the payload is under the icon - can you revert to remove that - the icon already shows what the payload is.

--------------------- MERGED ---------------------------

Can you add a config file, so the name of the payload doesn't show under the icon?
 

Attachments

Last edited by mrdude,
Thanks, that's working - I've attached the uf2 so those with modchips (atsamd21 based), can just drag and drop to the chip.

One thing though is that - now the name of the payload is under the icon - can you revert to remove that - the icon already shows what the payload is.

--------------------- MERGED ---------------------------

Can you add a config file, so the name of the payload doesn't show under the icon?

Done
 

Attachments

  • Like
Reactions: lordelan
I changed the touch screen code slightly, as when (for example, plugged in to USB), touches weren`t being registered.

So, instead of just checking for a multi-touch event (it will sense a change in capacitance on touchpanel), it sometimes failed if there was not any noticeable change. You could ground yourself, or touch a screw on the console then it would work...

However, if we reset the stack at every poll, it will be able to see if anything is different... Result - touches now noticed. At least in my tesats anyway.

Hope people find it useful. I had loads of stuff planned and most of it was / is implemented. But it isn`t my project. And I don`t want to take the pi$$. It`s down to the creator to add stuff he wants I guess...

So, nutshell time... Above bin & UF2, (if you haven`t read back to last page)...

Multiple screenshots - saved in SD root, Screenshots folder.
New font
Touchscreen hopefully improved

Good night all! Bed time in UK

:)
 
I changed the touch screen code slightly, as when (for example, plugged in to USB), touches weren`t being registered.

So, instead of just checking for a multi-touch event (it will sense a change in capacitance on touchpanel), it sometimes failed if there was not any noticeable change. You could ground yourself, or touch a screw on the console then it would work...

However, if we reset the stack at every poll, it will be able to see if anything is different... Result - touches now noticed. At least in my tesats anyway.

Hope people find it useful. I had loads of stuff planned and most of it was / is implemented. But it isn`t my project. And I don`t want to take the pi$$. It`s down to the creator to add stuff he wants I guess...

So, nutshell time... Above bin & UF2, (if you haven`t read back to last page)...

Multiple screenshots - saved in SD root, Screenshots folder.
New font
Touchscreen hopefully improved

Good night all! Bed time in UK

:)
Fantastic work, thank you so much! If only you could add controller support as well (at least accepting the A button to launch the first icon), that would be cool.
Although ... controllers can't be used before Horizon boots up, right? :(
 
Fantastic work, thank you so much! If only you could add controller support as well (at least accepting the A button to launch the first icon), that would be cool.
Although ... controllers can't be used before Horizon boots up, right? :(

I doubt it - you'd need to load the drivers for them, and the flash space is limited. Probably that's why Hekate and Lockpic-RCM etc use the volume and power buttons. To be honest though, it's far easier using touch screen than using those. Also if you want to boot the same payload most of the time - just put a payload.bin in the root or the Argon directory. You can always just rename that (or press 'volume down' when booting) if you need to go to the boot menu.
 
Fantastic work, thank you so much! If only you could add controller support as well (at least accepting the A button to launch the first icon), that would be cool.
Although ... controllers can't be used before Horizon boots up, right? :(
Not without Bluetooth. Could probably do it with serial, but of course they need to be attached.
 
  • Like
Reactions: lordelan
@mattytrog,

Can you do me a favour and in /src/main.c

This line: bool cancel_auto_chainloading = btn_read() & BTN_VOL_DOWN;

Change to bool cancel_auto_chainloading = btn_read() & BTN_VOL_UP;

Can you change that so that it checks the volume + button instead to ignore payload.bin

I know you need to press vol + power to launch rcm, however it's a pain to also hold vol minus when you can just keep your finger on volume +. I don't know if this would work - but I assume it would as that's what so ox use to get to the configuration menu.

Also if it's possible - in /src/core/custom-gui.c
Could you change it so these:
s32 width = 720;
s32 height = 1280;

So the width is 1280 and the height is 720 - that way when the screenshot is saved it displays properly without needing rotated?

Thanks.
 
Last edited by mrdude,
@mattytrog,

Can you do me a favour and in /src/main.c

This line: bool cancel_auto_chainloading = btn_read() & BTN_VOL_DOWN;

Change to bool cancel_auto_chainloading = btn_read() & BTN_VOL_UP;

Can you change that so that it checks the volume + button instead to ignore payload.bin

I know you need to press vol + power to launch rcm, however it's a pain to also hold vol minus when you can just keep your finger on volume +. I don't know if this would work - but I assume it would as that's what so ox use to get to the configuration menu.

Also if it's possible - in /src/core/custom-gui.c
Could you change it so these:
s32 width = 720;
s32 height = 1280;

So the width is 1280 and the height is 720 - that way when the screenshot is saved it displays properly without needing rotated?

Thanks.
Yep will do. Just sorting out my poorly 5 year old. He has a very Nasty tummy bug
 
  • Like
Reactions: mrdude and lordelan
@mattytrog,

Can you do me a favour and in /src/main.c

This line: bool cancel_auto_chainloading = btn_read() & BTN_VOL_DOWN;

Change to bool cancel_auto_chainloading = btn_read() & BTN_VOL_UP;

Can you change that so that it checks the volume + button instead to ignore payload.bin

I know you need to press vol + power to launch rcm, however it's a pain to also hold vol minus when you can just keep your finger on volume +. I don't know if this would work - but I assume it would as that's what so ox use to get to the configuration menu.

Also if it's possible - in /src/core/custom-gui.c
Could you change it so these:
s32 width = 720;
s32 height = 1280;

So the width is 1280 and the height is 720 - that way when the screenshot is saved it displays properly without needing rotated?

Thanks.
I`ll need to test this.

As to flip the shot the right way around, it goes from top/bottom to middle (reversing values, ie endianness). this could lead to display corruption. I will implement it so its flipped the right way.

But I`ll make it so both buttons cancel chainloading.
 
  • Like
Reactions: lordelan
I`ll need to test this.

As to flip the shot the right way around, it goes from top/bottom to middle (reversing values, ie endianness). this could lead to display corruption. I will implement it so its flipped the right way.

But I`ll make it so both buttons cancel chainloading.

No rush mattytrog, I'm pretty busy today doing DIY so I'm in no hurry - just take your time and post when you want me to test it out.

Thanks.

Edit - I compiled this myself - changing the button to vol up works fine, holding the volume loads the menu, releasing boots the default payload.bin. You were correct about the screenshot corruption though, the image was flipped but it was corrupted.

Also can you give me your modded code when you're done so I can make my own version, I changed some stuff so that my icons were central - as I don't want anymore than 4, I changed the rows to 1 instead of 2 and changed the margins, also I removed Reboot RCM from the menu as I don't need that. I also changed the location of payload.bin to the argon payloads folder and renamed it to autoboot.bin as I didn't see the need for a duplicate payload in another folder.

This is the layout I'm using now:
K33gnGs.jpg


Screenshot seems to work fine (but still needs rotated) and isn't back to front? weird as I never changed any code for that.
 
Last edited by mrdude,
  • Like
Reactions: lordelan
Lol I know you didn`t.

I did.

;)

I got the code from Argon nx github, did you do a commit on that?

Also I figured out how to write the licence.dat to the sd card now - so it's always stored on the chip (just incase). I added this function and called it from the menu page:

Code:
static int tool_makehex(void* param)
{
    FIL fp;
    if (f_stat("license.dat", NULL)) {
        char hexval[] = "\xAA\x9E\x68\x69\xC3\x3E\xF2\xAD\x03\xB9\xA7\xE9\x2A\x8A\x5D\x11\x7A\xBE\x90\xE0\x03\x17\xAD\x06\x93\xD4\xF4\xD9\x17\x22\xFC\x4F\x6A\xC5\xFB\x39\xD8\xB2\x43\xAF\xEA\xB5\x54\xC5\x27\xA6\x09\x7C\x14\x42\x4B\x17\x69\x86\xF4\xC7\x08\x0E\x4F\xE1\x1A\x5E\x42\x3E\x9D\xF8\x7A\x8D\xA5\x87\xC2\x21\x1B\xF7\x47\x05\x26\x62\x81\xDF\xBA\x18\xAD\x22\x79\xF4\x77\x76\x9F\xC7\x58\xEC\xEA\x41\x0B\x24\x44\xE1\x16\xF0\xD8\xC2\x29\xE9\x37\x54\xB6\x36\x63\xB5\xD6\x91\xA8\xCC\x17\x6C\x5F\xCD\x9E\xF9\x52\xD8\x11\x81\x46\x70\x15\x99\x23\x7B\x37\x3F\x1C\x77\x14\xBE\xF4\xC5\xE9\x61\x3E\x28\xEE\x00\x76\xDF\xDA\xA0\x11\x36\x31\x89\x29\x3B\x6E\x35\xAA\x48\xA4\x1C\x1B\x02\x9F\xA9\xC4\xC6\x57\x34\xE0\x96\xDB\xC8\x2B\xC1\x0B\x2F\xB5\xFD\x2D\x15\xDA\x02\xC7\x59\xF4\x5A\x52\xF4\x5C\xC9\x54\x8F\x85\x20\x1F\x22\x0B\x26\x66\x3A\x48\x96\xA4\x4F\x38\x87\x36\x5B\x1D\xE6\xEB\x3C\x90\x76\x26\x76\x49\x6D\xAC\x1A\x3C\xCF\xD4\x9D\xAB\x0C\x7F\xB2\x4A\x25\x29\x88\xD4\x25\xEE\x6E\xAC\x24\x6C\x65\xC0\xD0\x92\xCE\xCA\xD8\xCB\x45\x18\xEB\xF5\xD9\x01\x15\xB7\xF2";
        sd_save_to_file(hexval, 256, "license.dat");
        f_mkdir("SXOS-Licence");
        sd_save_to_file("MAZZXXHY2XXX", 12, "SXOS-Licence/OSCode.txt");
        gfx_con_init(&g_gfx_con, &g_gfx_ctxt);
        gfx_printf(&g_gfx_con, "%kSXOS licence data files generated%k", 0xFFFFDD00, 0xFFCCCCCC);
                }
    else {
        gfx_con_init(&g_gfx_con, &g_gfx_ctxt);
        gfx_printf(&g_gfx_con, "%klicense.dat already exists!%k", 0xFFFFDD00, 0xFFCCCCCC);
        }
 
    return 0;
}

Obviously, once compiled it's easy to just use a hex editor and paste your own licence into the generated argon-nx bin file, or edit the above to add your own licence data.

I also created the same function, but containing the sxos payload, so it's embedded in the chip and can easily be restored on the micro sd card and then booted from :-), which is handy for me if you don't have any argon files/folders on your sd card, I didn't see the point in putting hekate or atmos in the chip as these change too much, but I suppose you could put your modded hekate version on the chip - to aid in recovery as your chip will always be embedded in your device :-).
 
Last edited by mrdude,
  • Like
Reactions: lordelan
I got the code from Argon nx github, did you do a commit on that?

Also I figured out how to write the licence.dat to the sd card now - so it's always stored on the chip (just incase). I added this function and called it from the menu page:

Code:
static int tool_makehex(void* param)
{
    FIL fp;
    if (f_stat("license.dat", NULL)) {
        char hexval[] = "\xAA\x9E\x68\x69\xC3\x3E\xF2\xAD\x03\xB9\xA7\xE9\x2A\x8A\x5D\x11\x7A\xBE\x90\xE0\x03\x17\xAD\x06\x93\xD4\xF4\xD9\x17\x22\xFC\x4F\x6A\xC5\xFB\x39\xD8\xB2\x43\xAF\xEA\xB5\x54\xC5\x27\xA6\x09\x7C\x14\x42\x4B\x17\x69\x86\xF4\xC7\x08\x0E\x4F\xE1\x1A\x5E\x42\x3E\x9D\xF8\x7A\x8D\xA5\x87\xC2\x21\x1B\xF7\x47\x05\x26\x62\x81\xDF\xBA\x18\xAD\x22\x79\xF4\x77\x76\x9F\xC7\x58\xEC\xEA\x41\x0B\x24\x44\xE1\x16\xF0\xD8\xC2\x29\xE9\x37\x54\xB6\x36\x63\xB5\xD6\x91\xA8\xCC\x17\x6C\x5F\xCD\x9E\xF9\x52\xD8\x11\x81\x46\x70\x15\x99\x23\x7B\x37\x3F\x1C\x77\x14\xBE\xF4\xC5\xE9\x61\x3E\x28\xEE\x00\x76\xDF\xDA\xA0\x11\x36\x31\x89\x29\x3B\x6E\x35\xAA\x48\xA4\x1C\x1B\x02\x9F\xA9\xC4\xC6\x57\x34\xE0\x96\xDB\xC8\x2B\xC1\x0B\x2F\xB5\xFD\x2D\x15\xDA\x02\xC7\x59\xF4\x5A\x52\xF4\x5C\xC9\x54\x8F\x85\x20\x1F\x22\x0B\x26\x66\x3A\x48\x96\xA4\x4F\x38\x87\x36\x5B\x1D\xE6\xEB\x3C\x90\x76\x26\x76\x49\x6D\xAC\x1A\x3C\xCF\xD4\x9D\xAB\x0C\x7F\xB2\x4A\x25\x29\x88\xD4\x25\xEE\x6E\xAC\x24\x6C\x65\xC0\xD0\x92\xCE\xCA\xD8\xCB\x45\x18\xEB\xF5\xD9\x01\x15\xB7\xF2";
        sd_save_to_file(hexval, 256, "license.dat");
        f_mkdir("SXOS-Licence");
        sd_save_to_file("MAZZXXHY2XXX", 12, "SXOS-Licence/OSCode.txt");
        gfx_con_init(&g_gfx_con, &g_gfx_ctxt);
        gfx_printf(&g_gfx_con, "%kSXOS licence data files generated%k", 0xFFFFDD00, 0xFFCCCCCC);
                }
    else {
        gfx_con_init(&g_gfx_con, &g_gfx_ctxt);
        gfx_printf(&g_gfx_con, "%klicense.dat already exists!%k", 0xFFFFDD00, 0xFFCCCCCC);
        }
 
    return 0;
}

Obviously, once compiled it's easy to just use a hex editor and paste your own licence into the generated argon-nx bin file, or edit the above to add your own licence data.

I also created the same function, but containing the sxos payload, so it's embedded in the chip and can easily be restored on the micro sd card and then booted from :-), which is handy for me if you don't have any argon files/folders on your sd card, I didn't see the point in putting hekate or atmos in the chip as these change too much, but I suppose you could put your modded hekate version on the chip - to aid in recovery as your chip will always be embedded in your device :-).
Yes I submitted a pull request a few weeks back. Will take a look at your code later when Emmerdale finished
 
  • Like
Reactions: lordelan
I got the code from Argon nx github, did you do a commit on that?

Also I figured out how to write the licence.dat to the sd card now - so it's always stored on the chip (just incase). I added this function and called it from the menu page:

Code:
static int tool_makehex(void* param)
{
    FIL fp;
    if (f_stat("license.dat", NULL)) {
        char hexval[] = "\xAA\x9E\x68\x69\xC3\x3E\xF2\xAD\x03\xB9\xA7\xE9\x2A\x8A\x5D\x11\x7A\xBE\x90\xE0\x03\x17\xAD\x06\x93\xD4\xF4\xD9\x17\x22\xFC\x4F\x6A\xC5\xFB\x39\xD8\xB2\x43\xAF\xEA\xB5\x54\xC5\x27\xA6\x09\x7C\x14\x42\x4B\x17\x69\x86\xF4\xC7\x08\x0E\x4F\xE1\x1A\x5E\x42\x3E\x9D\xF8\x7A\x8D\xA5\x87\xC2\x21\x1B\xF7\x47\x05\x26\x62\x81\xDF\xBA\x18\xAD\x22\x79\xF4\x77\x76\x9F\xC7\x58\xEC\xEA\x41\x0B\x24\x44\xE1\x16\xF0\xD8\xC2\x29\xE9\x37\x54\xB6\x36\x63\xB5\xD6\x91\xA8\xCC\x17\x6C\x5F\xCD\x9E\xF9\x52\xD8\x11\x81\x46\x70\x15\x99\x23\x7B\x37\x3F\x1C\x77\x14\xBE\xF4\xC5\xE9\x61\x3E\x28\xEE\x00\x76\xDF\xDA\xA0\x11\x36\x31\x89\x29\x3B\x6E\x35\xAA\x48\xA4\x1C\x1B\x02\x9F\xA9\xC4\xC6\x57\x34\xE0\x96\xDB\xC8\x2B\xC1\x0B\x2F\xB5\xFD\x2D\x15\xDA\x02\xC7\x59\xF4\x5A\x52\xF4\x5C\xC9\x54\x8F\x85\x20\x1F\x22\x0B\x26\x66\x3A\x48\x96\xA4\x4F\x38\x87\x36\x5B\x1D\xE6\xEB\x3C\x90\x76\x26\x76\x49\x6D\xAC\x1A\x3C\xCF\xD4\x9D\xAB\x0C\x7F\xB2\x4A\x25\x29\x88\xD4\x25\xEE\x6E\xAC\x24\x6C\x65\xC0\xD0\x92\xCE\xCA\xD8\xCB\x45\x18\xEB\xF5\xD9\x01\x15\xB7\xF2";
        sd_save_to_file(hexval, 256, "license.dat");
        f_mkdir("SXOS-Licence");
        sd_save_to_file("MAZZXXHY2XXX", 12, "SXOS-Licence/OSCode.txt");
        gfx_con_init(&g_gfx_con, &g_gfx_ctxt);
        gfx_printf(&g_gfx_con, "%kSXOS licence data files generated%k", 0xFFFFDD00, 0xFFCCCCCC);
                }
    else {
        gfx_con_init(&g_gfx_con, &g_gfx_ctxt);
        gfx_printf(&g_gfx_con, "%klicense.dat already exists!%k", 0xFFFFDD00, 0xFFCCCCCC);
        }
 
    return 0;
}

Obviously, once compiled it's easy to just use a hex editor and paste your own licence into the generated argon-nx bin file, or edit the above to add your own licence data.

I also created the same function, but containing the sxos payload, so it's embedded in the chip and can easily be restored on the micro sd card and then booted from :-), which is handy for me if you don't have any argon files/folders on your sd card, I didn't see the point in putting hekate or atmos in the chip as these change too much, but I suppose you could put your modded hekate version on the chip - to aid in recovery as your chip will always be embedded in your device :-).

I understand what you were getting at now. I did a "very" similar thing my my modded Hekate (Switchboot). How it worked, was to copy the licence.dat into the UF2 with a hex editor. Then send UF2 to chip. Then I had a choice... Use hardware (vol+ option) to regenerate it, or a menu option in Hekate.

However, it became a choice between that and dumping all keys (bolting and integrating Lockpick). Can`t have both, as there isn`t the space in the stack. Lockpick won.

Hekate is a pillar of the open-sores community and if I put that option in there, it would raise eyebrows, and I don`t need the aggro from all the doogooders on here, seeing as many see SXOS as the enemy.

So it became an easy choice in the end.
 
Last edited by mattytrog,
  • Like
Reactions: mrdude and peteruk

Site & Scene News

Popular threads in this forum