Help with update decryption

Discussion in '3DS - Homebrew Development and Emulators' started by Sosser, Aug 2, 2016.

  1. Sosser
    OP

    Sosser Newbie

    Newcomer
    1
    0
    Aug 2, 2016
    Brazil
    Hello guys,

    I am with a small Smash Bros project which is basically getting my replays to play on Citra and record them in high definition for showing on my video channel (along with the direct sound output recording from the 3DS itself). I have dumped the ROM from my original cartridge over a year ago using the 3DS of a friend at the time, built a special version of Citra that supports the full version of Smash Bros, decrypted my replays with extdata_dump and managed to get a full speed 60FPS footage of the game by recording each rendered OpenGL frame to pictures using apitrace, then putting them to play sequentially. The result is a perfect 3DS speed footage, created entirely using Citra. You can check my progress so far over here:



    Using all of this progress, If I could play my replays, I would have pretty cool HD videos of them to show around! Except... my game is updated to the latest patch, 1.1.6, so the 1.0 version running on Citra obviously won't play any of my replay files, as evidenced by the video.

    Now, I've stumbled into a wall trying to deal with this update, so that I can have it over on Citra. I have searched up and down for ways to decrypt it and merge it into my 1.0 ROM, and everywhere I look, I need to use Decrypt9 to do it, and for that I would need my firmware to be on 9.2. However I am but a simple smasher trying to give some edge to his replays, and I have no intention of going beyond userland in my homebrew endeavors. As such, my firmware is the latest 11.0.0-33U, and everything I did up to now involving homebrew was nothing more than simple things such as running the launcher payload through browserhax and menuhax to decrypt a few files. For me, downgrading my 3DS is absolutely out of question. Besides it being a pain, I am not really a developer who would benefit from this and I'm not interested in pirating 3DS games either.

    So, I have here with me a CIA with the 1.1.6 update, which seems encrypted, as ctrtool doesn't understand the CXI part of it at all, and I also have this update in encrypted TMD and APP files from my SD Card, which are used by the game in the 3DS. Is there anything at all that I can do, involving only userland homebrew (9.2+) and my PC?

    I don't want to have the work I put on this cute little project going to waste because of an update I am utterly unable to decrypt. Somebody please help me, I am even willing to accept help in private, if a 9.2 3DS is absolutely necessary and anyone is willing to help me with theirs for decryption...

    Thank you for your attention.
     
    Last edited by Sosser, Aug 2, 2016
  2. Merch

    Merch Tutorial God, Apparently.

    Banned
    225
    63
    Feb 9, 2016
    United States
    Music Park, Mushroom Kingdom
    Yo. Can any mods or anyone answer this question? This might as well deserve a bump.
     
  3. Joom

    Joom  ❤❤❤

    Member
    4,034
    2,735
    Jan 8, 2016
    United States
    Isn't there a way to pack the update into the CIA? I honestly don't know and am only making this guess based on CIA releases I've seen that included the update.
     
  4. Merch

    Merch Tutorial God, Apparently.

    Banned
    225
    63
    Feb 9, 2016
    United States
    Music Park, Mushroom Kingdom
    If only I knew. Most things I've seen had an update separate from it.
     
  5. Joom

    Joom  ❤❤❤

    Member
    4,034
    2,735
    Jan 8, 2016
    United States
    I've seen releases on the ISO site for things like MK7 that had the update included in the CIA. I don't know if this only applies to legit CIAs or if it can be done with others.
     
  6. Merch

    Merch Tutorial God, Apparently.

    Banned
    225
    63
    Feb 9, 2016
    United States
    Music Park, Mushroom Kingdom
    Like I said, if only I knew. I just wish there was some possible way to extract the contents of the update.
     
  7. Uwabami

    Uwabami GBAtemp Advanced Fan

    Member
    614
    582
    Feb 4, 2014
    Germany
  8. Merch

    Merch Tutorial God, Apparently.

    Banned
    225
    63
    Feb 9, 2016
    United States
    Music Park, Mushroom Kingdom
    Funny enough, I tried this for the Smash 1.1.6 Update & got nothing out of it. Saying this, because I had installed mods on my copy of Smash, & Bayo & Kamui happened to be in the mix, so as you all know, DLC doesn't run on base firmware, & mine happened to be on base firmware. I'm using HANS on 11.0/11.1 to do this, so I necessarily don't have an advantage, because I'm unable to downgrade.
     
  9. MegaAbsol

    MegaAbsol Newbie

    Newcomer
    7
    0
    Jan 27, 2017
    United States
    Doing a bump here, i think that this project deserves
     
  10. Uwabami

    Uwabami GBAtemp Advanced Fan

    Member
    614
    582
    Feb 4, 2014
    Germany
  11. Hayleia

    Hayleia GBAtemp Maniac

    Member
    1,485
    1,135
    Feb 26, 2015
    France
    Sorry to bump this but does anyone know what files to copy from the decrypted and unpacked update into the decrypted and unpacked game?
    I feel like copy-pasting contents without thinking would lead to problems. There is a dt file in the romfs that is 1GB in the game, and not even 400MB in the update, so replacing 1GB with 400MB seems like losing data...

    There is another dt file in romfs/patch in the decrypted and extracted game though, 44MB. And replacing that one seems more like adding data.
    And I actually tried to do that, (and replacing other files) and got a game that I managed to install on my 3DS, but it froze at the Nintendo 3DS logo...

    So anyone knows?
     
  12. erman1337

    erman1337 GBAtemp Maniac

    Member
    1,211
    931
    Sep 27, 2015
    Belgium
    Brussels
    Try concatenating the files
     
  13. Hayleia

    Hayleia GBAtemp Maniac

    Member
    1,485
    1,135
    Feb 26, 2015
    France
    Actually, this explains how to combine the data from dt and ls files https://gbatemp.net/threads/smash3ds-updated-rom-hacking-guide.439533/
    There is just a big problem with this tutorial. It assumes people are trying to play on a real 3DS with Luma and stuff, which is not what we're trying to do here.

    So, is there a way to repack the dt and ls files once extracted and mixed? Or I guess I can patch the code.bin from Smash to use with SaltySD? I'll try that this afternoon but if in the meantime someone tells me that there is a way to repack dt and ls, I like that solution better.
     
  14. Hayleia

    Hayleia GBAtemp Maniac

    Member
    1,485
    1,135
    Feb 26, 2015
    France
    Eh, seems like SaltySD only works on code.bin from updates, not code.bin from the base game. But if we were able to use updates on citra, we would actually not need SaltySD...

    So the only way seems to be repacking the dt and ls files. Any tool for that or is it still something to be done?
    Or is there a way to get SaltySD to work on the base game with no update?
     
    Last edited by Hayleia, Apr 30, 2017