SciresM / boot9strap

Boot9/Boot11 code execution.
GNU General Public License v3.0
944 stars 64 forks source link

Key0x24 troubles #5

Closed d0k3 closed 7 years ago

d0k3 commented 7 years ago

http://gbatemp.net/threads/download-decrypt9-open-source-decryption-tools-wip.388831/page-221#post-7329881

This in essence means that key 0x24 is no more set up the way it was before (aka the way the system expects it). While the keyX is set by bootrom, keyY is set by NATIVE_FIRM. The handling is correct on N3DS (meaning you most likely set the keyY according to P9 I know that the key is also in P9, but I'm unsure how it is set on O3DS consoles).

d0k3 commented 7 years ago

Might be user error: http://gbatemp.net/threads/download-decrypt9-open-source-decryption-tools-wip.388831/page-221#post-7330199 I'll find out more about it, and eventually close this

ozesnoloco commented 7 years ago

I can provide info if needed in order to discard any user error

d0k3 commented 7 years ago

So... you had the same issure? Can you describe what you encountered?

ozesnoloco commented 7 years ago

Yes. As the user on the gbatemp post says, I encounter a message when I try to dump a gbc vc game: WARNING: current CMAC does not match. I updated my N3DSXL from arm9loaderhax to boot9strap. I'm using Luma 7.5. The message is displayed no matter what game save I try to dump, but still, I can dump correctly the save, exported as gbavc.sav on the root of my SD card. If I imported it with VBA emulator, make a change and saving the game, those changes are still in effect on the .sav file, but if I inject that file on my 3DS, even if I receive the message "Injection succedded", those changes are not reflected on the game itself, showing, in return, the same save game that I dumped

d0k3 commented 7 years ago

@SciresM: this means that key0x24y (/x?) used by the system is different from the one boot9strap sets. I'll doublecheck the GM9 source, but I'm pretty sure that issue is not in there.

d0k3 commented 7 years ago

@ozesnoloco - can you get a good aeskeydb.bin, one that contains 0x24y, put that in your SD root and try again?

ozesnoloco commented 7 years ago

@d0k3 I can try to redownload my 0x24y and build the aeskeydb.bin with Decrypt9... that will work?

d0k3 commented 7 years ago

You can also just provide slotx0x24keyY.bin

ozesnoloco commented 7 years ago

Ok... I put the Slot0x24keyY.bin in the root of my SD, tried again to inject but I have the same result than before

ozesnoloco commented 7 years ago

Can I help you more to solve this?

d0k3 commented 7 years ago

Okay... only reason I can think about, key0x24Y is set up in a different way via boot9strap + Luma than it is was earlier, via just a9lh + Luma.

I've got on more thing to try, @ozesnoloco . Remove / rename all aeskeydb.bin / slot0x??key?.bin you've got, then try again.

ozesnoloco commented 7 years ago

@d0k3 : I did as you suggest: remove all slot0x??key?.bin and tried again, but this time, dumping or injecting was not possible because Decrypt9 ask for slot 0x24keyY.bin. If I put it back on SD root, same result as before... Same "WARNING: current CMAC does not match.", same "Injection succedded" message after injection and still, changes on the save are not reflected on game. If I try with Godmode9, I need to trimm my save file, because the one VBA generate is 64kb. After trimming, I can paste the file on [S]:SYSNAND, but it seems to happend like Decrypt9... injection seems to be successful, but the game does not reflect any change at all.

trbocode commented 7 years ago

Works fine on N3DS with and without the aeskeydb.bin file using GM9

ozesnoloco commented 7 years ago

@trbocode : But If I try to paste a 64kb file on [S]:SYSNAND, a message says there is no space, and if I trimm it, changes doesn´t reflect. With Decrypt9, I still got the"CMAC does not match" and even when Decrypt9 says the injection is successful, it is not reflected on the actual game

d0k3 commented 7 years ago

Okay, let's try to get behind this, shall we?

@trbocode - is this on sighax / boot9strap?

@ozesnoloco:

ozesnoloco commented 7 years ago

@d0k3 :

By the way...

https://github.com/d0k3/Decrypt9WIP/issues/138

User greenDarkness commented on 29 Dec 2016 the exact same problem I have (third comment)

d0k3 commented 7 years ago

Wait, you launch D9 via MSET, did I get that right? Why not use boot9strap?

Anyways, what about the injection in GM9, does that work for? If you copy gbavc.sav to S;/, is the file still in the directory upon leave and reenter?

ozesnoloco commented 7 years ago

@d0k3 : Well... I enter and exit System Settings to enter GM9 because I don´t know another way to do it without turning off my console.

Something odd happen with the injection using GM9. First, I dumped, edited and trimmed a Castlevania Aria of Sorrow save (trimmed because if I try to paste the 64kb file, GM9 says the file is larger than space available and fail to paste in S:/). I copy and paste that gbavc.sav file 3 or 4 times for... you know... only to be sure. After launching again the game, the changes are reflected .

After that, I try to do the same thing, using the same steps with Castlevania Harmony of Dissonance, but when I launch the game after the injection, the changes are not reflected on the actual game.

d0k3 commented 7 years ago

Alright. You should really run GM9 via the Luma chainloader, or any other way directly from boot9strap. These old entrypoints will be deprecated soon. There will be, however, a method of running GM9 via a shortcut from your home menu (which will actually reboot the console).

Anyways, this is not really a boot9strap issue, as I initially suspected. @SciresM - I'm closing this now.

@ozesnoloco - the file is displayed as 64kB, but you can't inject 32kB, is that correct? Please try the most recent GodMode9 hourly, but run it via the Luma chainloader: https://transfer.sh/W4I8N/GodMode9-20170531-220019.zip

If the problems persist, open an issue over at the GM9 repo.