Hacking Official [Release] CakesFW

Don Ravioli

Active Member
Newcomer
Joined
Mar 25, 2016
Messages
41
Trophies
0
Age
32
XP
82
Country
France
Hmm, you might want to run it with NTR CFW or FreeMultiPatcher, but I guess it's just broken, if it was a region issue, it wouldn't even show up.

I guess I'll try getting an EU version Smash and see if it works. Tomorrow though, it's 00:30 AM and I'm kinda done. :P
 

Don Ravioli

Active Member
Newcomer
Joined
Mar 25, 2016
Messages
41
Trophies
0
Age
32
XP
82
Country
France
Well, I can now confirm : it IS indeed region problems, an EU version immediatly booted up with online ToS accepted. The more you know ! Now to find someone to make a custom CIA...
 

seijinshu

...
Member
Joined
Jan 6, 2016
Messages
483
Trophies
0
Location
...
XP
248
Country
United States
Well, I can now confirm : it IS indeed region problems, an EU version immediatly booted up with online ToS accepted. The more you know ! Now to find someone to make a custom CIA...
Get config and modify the ToS setting to the us ones. I don't use that method as I'm in US and my NNID works on US and Japan servers.
Forgot the Id for us tos
 

regnad

Button Masher
Member
Joined
May 19, 2008
Messages
2,527
Trophies
1
Age
53
XP
3,731
Country
Japan
untitled_drawing_by_loenabelle-d8ybmrs.png

cakes-png.37267

Credits: @mashers

Um4vTS0.png

Credits: @subcon959

c52cb984eac54b60bc9729c18dfcbcbe.png

This is a CFW solution me and @b1l1s have been working on for a while.

For users:

Features right now:
  • SPIDER 4.x-9.2, MSET 4.x and 6.x and Ninjhax 1/2 (up to firmware 9.2) support for old 3ds/xl/2ds.
  • MSET 4.x and Ninjhax 1/2 (up to firmware 9.2) support for new 3ds/xl.
  • Options to boot to sysNAND and emuNAND up to 10.6.
  • Emunand supports redNAND and GW emuNANDs.
  • Sig patches
  • Patches are contained in "cakes". The .cake format is a simple format that bundles FIRM patches, and tells the patcher what those patches need to work.
  • Autoboot.
  • Supports multiple NATIVE_FIRM versions (see this for an explanation).
Future hopeful features:
  • Porting CakeHax to homemenuhax, to run idependently from the hax payload.
  • Loading NATIVE_FIRM from the NAND.
  • AGB/TWL FIRM patching (and trying to patch them for emuNAND, if possible).
  • CIA installing over network (b1l1s actually already has a POC for this. Check out the "dhs" branch.)
  • Region free.
  • Rainbows.

How to install:
Just copy all the files to the root of your SD card, and launch it with either spider, MSET or Ninjhax.
Files and stuff are on the bottom of the post.
Copy the firmware.bin linked at the bottom of the post to the cakes directory. Do the same with cetk.
If you have an old 3ds with a firmware lower than 7.0, and you plan to use a emuNAND version 7.0 or higher, you need to get a file named slot0x25keyX.bin from the internet, and place it on the root of your SD card, and make sure you enable the "Load 7.x NCCH crypto key" patches.
If you have a new 3ds with a firmware lower than 9.6, and you plan to use a emuNAND version 9.6 or higher, you need to get a file named slot0x11key96.bin from the internet, and place it on the root of your SD card.

For MSET on 4.x or 6.x, I've modified zoogie's ROP installer to work with this. There's even a code.bin to install the rop via spider in the downloads page.
For MSET on newer firmwares, first downgrade the MSET app to the 4.x or 6.x version (there's tutorials on this site for doing that), then use the CakesROP.nds or code.bin on the downloads page to install the correct ROP.
For spider, see the bottom of the post for a launcher page.
NOTE: The code.bin installs the correct ROP based on your firmware version. If you're on firmware 6.x or higher, the ROP for MSET 6.x will be installed.
NOTE: Never rename the Cakes.dat. The arm9 payload is located there and the code expects it to be named like that.

How to use:

In the "Select patches" menu, you select the features you want/may not want to enable.
In the "More options..." menu, there's two submenus:
  • Toggleable options. This menu contains two options:
    • Autoboot: This will skip the menu when cakes starts, and automatically load the CFW (way faster than usual). Hold the "L" button while booting to enter the menu.
    • Force saving patched firmware: This option is mainly used for debugging, but may also be needed if there's a problem with autobooting/the reboot patches. Cakes tries everything possible to not to have to write firmware_patched.bin, but it may not always be right. This option forces cakes to do it (this option isn't saved in the config file).
  • Select emuNAND. This menu allows selecting which emuNAND will be booted if you enable the emuNAND patches, if you have more than one emuNAND available.
In the "Version info" menu, you can check your CakesFW and firmware versions.
Once done, you select "Boot CFW", and the options you've selected will be saved and the CFW will boot.

For developers:

Contributions are welcome on my github: https://github.com/mid-kid/CakesForeveryWan
Just don't be scared if I end up rewriting/restructuring your code as I see fit.
You may happily fork the project if you don't agree with something. I just ask you to rename it, give credits, publish source, and actually add/change something useful (a.k.a. don't be a smartass).

FAQ:

Q: Why should I use this?
A: If you ask yourself that question, this is probably not for you. Other projects already provide a lot of stuff this provides.

Q: Can I eat it?
A: Stop being so funny.

Q: Is it possible to boot on sysNAND mode without using another SD card that doesn't have emuNAND set-up?
A: Yes.

Q: what does [reboot patches] mean? It won't restart after closing smash? Or will GBA and smash work together (since the patched rxtools gives you one or the other)
A: The reboot patches are required to start smash. The console actually performs a reboot when starting it, and clears the patched firmware if these patches are not present.

Q: Smash/Monster Hunter don't work on my old 3ds!
A: Enable the reboot patches.

Q: Are these patches or "cakes" analogous to NTR CFW plugins?
A: No. NTR plugins are ARM11 userland code, cakes are FIRM patches.

Q: I want to update/downgrade my console. Can I disable firmlaunch?
A: No. This, however, isn't a problem anymore with recent versions of sysUpdater. Cakes doesn't block writing NATIVE_FIRM like Gateway does, so you're fine.

Q: Does cakes support ds carts in emunand?
A: Apparently they do on n3ds. They don't on my o3ds, but you may try. In any case disable the reboot patches for that to wok, as the current ones are sure to block it.

Q: Cakes tells me about an error on the bottom screen and I don't know what it's about because it's not about something I was specifically trying to get to work. Am I going crazy? Have I confirmed illuminati? How do I fix this error because I can't use Cakes with an error?
A: If Cakes doesn't shove that error up your face on the top screen and the error that shows on the bottom screen has nothing to do with what you were trying to do (or you don't know what it means) you can safely ignore it (and you should).
Q: But it looks really important...
A: NO.

Q: Halp, I forgot how to enter the menu after configuring autoboot.
A: Hold "L" and get your alzheimer checked.

Q: Just updated my n3ds emuNAND from 9.5 to [anything higher than 9.6], but I'm getting a black screen, what do?
A: Get the latest firmware.bin from the downloads section. Don't forget to select the patches again after swapping the firmware.bin.

Q: I am getting yelled at about "Failed to decrypt the CETK Please make sure the CETK is right." even though I have the correct one. I am using arm9loaderhax to load CakesFW.
A: CakesFW doesn't support decrypting the CETK from an arm9loaderhax environment as of right now. Either boot CakesFW once without arm9loaderhax or get a firmkey.bin for your console from the internet.

Qr code for spider:
cakesqr.png

http://dukesrg.no-ip.org/3ds/cakes?Cakes.dat
(Thanks to @duke_srg)

To load the code.bin, use this:
codeqr.png

http://dukesrg.no-ip.org/3ds/cakes?code.bin

Downloads (Yes, I am a link. Click me.)
Nightlies (Not recommended, check logs to see what changed. Don't ask questions about these. Only report bugs if something's not working.)
Report bugs on GitHub.
(Releases are numbered by commit number. Changelogs can be found on the github.)
firmware.bin and cetk download urls for old 3ds
firmware.bin and cetk download urls for new 3ds
Rename the numbered file to firmware.bin yourself after download.

MD5 checksums for keys:
slot0x25keyX.bin: 817fd1bffba60f79cf8cdf19caf28923
slot0x11key96.bin: af6dd85a583dbe1471661d2f3b90df15

Join us at #Cakey on freenode. webchat link

A temper recently set up A9LH on his N3DS with Cakes, and proceeded to brick it when updating SysNAND without the Block Firm Updates patch set. It seems he likely checked it, but instead of hitting start he just backed out assuming it was set.

I went into my Cakes menu to see if it really requires start to set a patch, which it does, however backing out and reentering shows the box still checked even though it has not been set.

A suggestion to avoid this easily caused brick in future updates:

1) ideally I would think Block Firm Updates patch should be set to on by default, and would need to be manually set to off. After all, some FWs like AuReiNAND have it set to on without even any way to unblock it (that I know of).

2) in addition, how about some sort of affirmation that it has been set, such as a list showing set patches on the main menu?
 
Last edited by regnad,

jazzcactus

New Member
Newbie
Joined
Mar 27, 2016
Messages
3
Trophies
0
Age
104
XP
51
Country
United States
I just followed https://github.com/Plailect/Guide/wiki to the very end installed OTP. Everything is working great and I boot right up. However I notice some .CIA's after installed do not show up on the home menu, so this must be a region problem. I can play them through the Big Blue Menu loader but thats it. Does cakes support different regioned .cias? Did I miss a step?
 

3xkrazy

Well-Known Member
Member
Joined
Jun 2, 2013
Messages
299
Trophies
0
XP
279
Country
United States
A temper recently set up A9LH on his N3DS with Cakes, and proceeded to brick it when updating SysNAND without the Block Firm Updates patch set. It seems he likely checked it, but instead of hitting start he just backed out assuming it was set.

I went into my Cakes menu to see if it really requires start to set a patch, which it does, however backing out and reentering shows the box still checked even though it has not been set.

A suggestion to avoid this easily caused brick in future updates:

1) ideally I would think Block Firm Updates patch should be set to on by default, and would need to be manually set to off. After all, some FWs like AuReiNAND have it set to on without even any way to unblock it (that I know of).

2) in addition, how about some sort of affirmation that it has been set, such as a list showing set patches on the main menu?

Well, set it, back out, and then check it again by going back into the menu options. Takes like 1 sec.
 

mid-kid

GBAtemp spamBOT
OP
Member
Joined
Aug 2, 2012
Messages
879
Trophies
0
Age
25
XP
1,163
Country
A temper recently set up A9LH on his N3DS with Cakes, and proceeded to brick it when updating SysNAND without the Block Firm Updates patch set. It seems he likely checked it, but instead of hitting start he just backed out assuming it was set.

I went into my Cakes menu to see if it really requires start to set a patch, which it does, however backing out and reentering shows the box still checked even though it has not been set.

A suggestion to avoid this easily caused brick in future updates:

1) ideally I would think Block Firm Updates patch should be set to on by default, and would need to be manually set to off. After all, some FWs like AuReiNAND have it set to on without even any way to unblock it (that I know of).

2) in addition, how about some sort of affirmation that it has been set, such as a list showing set patches on the main menu?

https://github.com/mid-kid/CakesForeveryWan/blob/master/source/menu.c#L128
Start and backing out do the exact same thing in this case (I just don't list "B" as an option in the text, because... I don't know.)

Setting it by default is not an option, as Cakes isn't made to depend on the possible fact that patches are available in the patches folder. Also would be pretty stupid for bricks caused by people wanting to update their sysnands without a9lh (though admittedly I could check for that).

Showing a list of patches in the main menu, while that is an option, it would clutter the main menu with too much text, and depending on how many there are I might not be able to show them all. But hell, you have the same list two button presses away.

I'm sorry for any bricks caused by misunderstandings like this, but CakesFW isn't made with a lot of stupidity in mind. Sure the error messages are informative (I hope), but I can't make sure a patch is enabled if a user intends on doing something, but forgot to make sure the patch was enabled himself.

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

I just followed https://github.com/Plailect/Guide/wiki to the very end installed OTP. Everything is working great and I boot right up. However I notice some .CIA's after installed do not show up on the home menu, so this must be a region problem. I can play them through the Big Blue Menu loader but thats it. Does cakes support different regioned .cias? Did I miss a step?

Not yet™ (but it's so close I can almost taste it)
 
Last edited by mid-kid,

GBHAKC75

Well-Known Member
Member
Joined
Jan 26, 2008
Messages
406
Trophies
0
XP
563
Country
France
https://github.com/mid-kid/CakesForeveryWan/blob/master/source/menu.c#L128
Start and backing out do the exact same thing in this case (I just don't list "B" as an option in the text, because... I don't know.)

Setting it by default is not an option, as Cakes isn't made to depend on the possible fact that patches are available in the patches folder. Also would be pretty stupid for bricks caused by people wanting to update their sysnands without a9lh (though admittedly I could check for that).

Showing a list of patches in the main menu, while that is an option, it would clutter the main menu with too much text, and depending on how many there are I might not be able to show them all. But hell, you have the same list two button presses away.

I'm sorry for any bricks caused by misunderstandings like this, but CakesFW isn't made with a lot of stupidity in mind. Sure the error messages are informative (I hope), but I can't make sure a patch is enabled if a user intends on doing something, but forgot to make sure the patch was enabled himself.

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



Not yet™ (but it's so close I can almost taste it)

Oh, I hear some Machinima sound here...

Anyway, couldn't you add a config option in patches file to select it by default ? That way we could enable the FIRM patch by default for example. Because, yes, the bricks are stupid, but let's be honest, most of bricks here are stupid.
 

regnad

Button Masher
Member
Joined
May 19, 2008
Messages
2,527
Trophies
1
Age
53
XP
3,731
Country
Japan
https://github.com/mid-kid/CakesForeveryWan/blob/master/source/menu.c#L128
Start and backing out do the exact same thing in this case (I just don't list "B" as an option in the text, because... I don't know.)

Setting it by default is not an option, as Cakes isn't made to depend on the possible fact that patches are available in the patches folder. Also would be pretty stupid for bricks caused by people wanting to update their sysnands without a9lh (though admittedly I could check for that).

Showing a list of patches in the main menu, while that is an option, it would clutter the main menu with too much text, and depending on how many there are I might not be able to show them all. But hell, you have the same list two button presses away.

I'm sorry for any bricks caused by misunderstandings like this, but CakesFW isn't made with a lot of stupidity in mind. Sure the error messages are informative (I hope), but I can't make sure a patch is enabled if a user intends on doing something, but forgot to make sure the patch was enabled himself.

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



Not yet™ (but it's so close I can almost taste it)

On the thread we were trying to determine how the guy bricked. I tested on mine to see what would happen -- selecting a patch and then backing out with B appears to do it, as you can go back to the main menu and then go back to the options page to check, and it remains selected. But then I powered down and re-entered Cakes menu -- keep in mind at no time did I press start -- and the box was no longer ticked. So I'd say this is actually pretty easy to confuse yourself with. You absolutely have to press start. Ticking the box and backing out leaves the box ticked for the duration of the time you are in Cakes menu, but it's not actually applied without start.

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

Well, set it, back out, and then check it again by going back into the menu options. Takes like 1 sec.

If that were the case it'd be great, but it's not. See above.
 

mid-kid

GBAtemp spamBOT
OP
Member
Joined
Aug 2, 2012
Messages
879
Trophies
0
Age
25
XP
1,163
Country
On the thread we were trying to determine how the guy bricked. I tested on mine to see what would happen -- selecting a patch and then backing out with B appears to do it, as you can go back to the main menu and then go back to the options page to check, and it remains selected. But then I powered down and re-entered Cakes menu -- keep in mind at no time did I press start -- and the box was no longer ticked. So I'd say this is actually pretty easy to confuse yourself with. You absolutely have to press start. Ticking the box and backing out leaves the box ticked for the duration of the time you are in Cakes menu, but it's not actually applied without start.

Did you try the same thing with the start button, instead of the B button? :3
Protip: The config is only saved once you press "Boot CFW".

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

Oh, I hear some Machinima sound here...

Anyway, couldn't you add a config option in patches file to select it by default ? That way we could enable the FIRM patch by default for example. Because, yes, the bricks are stupid, but let's be honest, most of bricks here are stupid.

Yes I could, but that'd have the side-effect I mentioned before: Upgrading sysNAND without a9lh would cause a brick.
 

GBHAKC75

Well-Known Member
Member
Joined
Jan 26, 2008
Messages
406
Trophies
0
XP
563
Country
France
Did you try the same thing with the start button, instead of the B button? :3
Protip: The config is only saved once you press "Boot CFW".

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



Yes I could, but that'd have the side-effect I mentioned before: Upgrading sysNAND without a9lh would cause a brick.

I meant, an option to enable them by default IF conditions are filled (like A9LH present). And why would anyone update SysNAND without A9LH... ?

Also, @mid-kid, any plans to integrate this : http://yifan.lu/2016/03/28/3ds-code-injection-through-loader/ ?
It sounds like a really great idea !
 
Last edited by GBHAKC75,

mid-kid

GBAtemp spamBOT
OP
Member
Joined
Aug 2, 2012
Messages
879
Trophies
0
Age
25
XP
1,163
Country
And why would anyone update SysNAND without A9LH... ?
To upgrade to 9.x from an earlier firmware, for example.

Also, @mid-kid, any plans to integrate this : http://yifan.lu/2016/03/28/3ds-code-injection-through-loader/ ?
It sounds like a really great idea !

Fun fact: I was planning on doing something like this for userland patches. Just hooking into the loader code instead of replacing it entirely (this is what palantine/yls8's CFW and dhs do to patch the dlp service). However, replacing it entirely is a better method, so I've moved my efforts onto injecting 3ds_injector into FIRM cleanly (I'd like to be able to have it ready before 1st of april... but I'm not entirely sure if I can manage).
 
Last edited by mid-kid,

bakageta

Well-Known Member
Newcomer
Joined
Feb 5, 2016
Messages
77
Trophies
0
XP
169
Country
United States
I meant, an option to enable them by default IF conditions are filled (like A9LH present). And why would anyone update SysNAND without A9LH... ?
It's also possible they updated in sysnand accidentally, by leaving emunand unchecked. Updating sysnand accidentally would suck, but not as bad as bricking.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=5aRVjiaM88Y