Hacking Official [Release] CakesFW

mid-kid

GBAtemp spamBOT
OP
Member
Joined
Aug 2, 2012
Messages
879
Trophies
0
Age
25
XP
1,163
Country
I'm getting this error while compiling cakes

Code:
ImportError: No module named 'yaml'
Makefile:79: recipe for target 'out/cakes/patches/emunand.cake' failed
make: *** [out/cakes/patches/emunand.cake] Error 1

What this error means? I forgot a program? (I have the python 3)

Install the python3 version of PyYAML for whatever OS you have. I should probably update the Readme.
 
  • Like
Reactions: Gray_Jack

mid-kid

GBAtemp spamBOT
OP
Member
Joined
Aug 2, 2012
Messages
879
Trophies
0
Age
25
XP
1,163
Country
The fools day has passed so why dont you remove it and keep only the explanation for lite and pro version (if its real)

Nah, it'll scroll by when new releases come, and it's got a big fat watning that everything described there is fake (no there won't be a pro or lite version, it'll stay open source. Who do you think I am?). If I could hide it in a big spoiler, I'd do that, but github releases doesn't let me do so.
mid kid why i have the error firmware cant be decrypted ?i have the good files
You tell me. If you've gotten the right firmware.bin and firmkey.bin for the correct console in your cakes folder, it should work. Please tell me at what stage decryption fails (the last two or three lines on the bottom screen should be enough), your console, and a checksum for the firmware.bin and firmkey.bin you have.
 

pikatsu

Well-Known Member
Member
Joined
Apr 16, 2014
Messages
845
Trophies
0
Age
39
XP
1,163
Country
Argentina
Nah, it'll scroll by when new releases come, and it's got a big fat watning that everything described there is fake (no there won't be a pro or lite version, it'll stay open source. Who do you think I am?). If I could hide it in a big spoiler, I'd do that, but github releases doesn't let me do so.

You tell me. If you've gotten the right firmware.bin and firmkey.bin for the correct console in your cakes folder, it should work. Please tell me at what stage decryption fails (the last two or three lines on the bottom screen should be enough), your console, and a checksum for the firmware.bin and firmkey.bin you have.

Good to know that you are a nice guy with the sence of humor. Anyway in terms of safety (risk of bricking or whatever) what do you suggest stay on v138 or tho go on the latest nightly
 

mid-kid

GBAtemp spamBOT
OP
Member
Joined
Aug 2, 2012
Messages
879
Trophies
0
Age
25
XP
1,163
Country
What is the $PATH?
https://en.wikipedia.org/wiki/PATH_(variable)
Basically, make sure the directory where the python binary is located is in that variable, or specify the PYTHON variable when running make, like: "make PYTHON=path/to/python".

Good to know that you are a nice guy with the sence of humor. Anyway in terms of safety (risk of bricking or whatever) what do you suggest stay on v138 or tho go on the latest nightly

There's usually no bricking risk involved with Cakes nightlies, so safety is pretty much indifferent. The only problem with nightlies is some of the new features might not be complete or otherwise lacking in functionality/have bugs. If you find any such things that aren't already reported in the bug tracker, please report them.
 

Gray_Jack

Well-Known Member
Member
Joined
Jan 13, 2016
Messages
732
Trophies
0
XP
407
Country
https://en.wikipedia.org/wiki/PATH_(variable)
Basically, make sure the directory where the python binary is located is in that variable, or specify the PYTHON variable when running make, like: "make PYTHON=path/to/python".

Now I get this error:
Code:
/bin/sh: 3: /usr/bin: Permission denied
Makefile:79: recipe for target 'out/cakes/patches/emunand.cake' failed
make: *** [out/cakes/patches/emunand.cake] Error 126

I command
Code:
sudo make PYTHON=/usr/bin DEVKITARM=/otp/devkitpro/devkitARM
 

mid-kid

GBAtemp spamBOT
OP
Member
Joined
Aug 2, 2012
Messages
879
Trophies
0
Age
25
XP
1,163
Country
Now I get this error:
Code:
/bin/sh: 3: /usr/bin: Permission denied
Makefile:79: recipe for target 'out/cakes/patches/emunand.cake' failed
make: *** [out/cakes/patches/emunand.cake] Error 126

I command
Code:
sudo make PYTHON=/usr/bin DEVKITARM=/otp/devkitpro/devkitARM

Should be PYTHON=/usr/bin/python3 (python should already be in $PATH regardless, though.
 

Gray_Jack

Well-Known Member
Member
Joined
Jan 13, 2016
Messages
732
Trophies
0
XP
407
Country
Should be PYTHON=/usr/bin/python3 (python should already be in $PATH regardless, though.

Well, I have everything installed and I tried everything to compile it :(

I really wanted to ry the new reboot patch

I guess I'll wait to the next nightly
 

mid-kid

GBAtemp spamBOT
OP
Member
Joined
Aug 2, 2012
Messages
879
Trophies
0
Age
25
XP
1,163
Country
Little info on the new nightly:
Added support for loading a patched AGB_FIRM through the reboot patches.
However, this only works on o3ds for now. I've been trying to get it working on n3ds, but testing remotely is insanely time-consuming.
I've created some actual patches for the AGB_FIRM, which are available here: https://github.com/mid-kid/lgy_cakes
And here are some builds:
agb_signatures.cake (disables signatures): http://chunk.io/f/5ec311b795d44f9e89bd29ccc397153f.cake
agb_bootscreen.cake (displays the cool boot logo when loading GBA games): http://chunk.io/f/550d86027afa44519419d81b4b41d9e4.cake
As I've said above, both only work on o3ds right now. Also nice to keep in mind is that I haven't been able to figure out emunand patches for AGB_FIRM, and as such you have to install your games on both sysnand and emunand, and boot sysnand after booting a game, to make sure it is saved. Or just play them on sysnand.

To enable AGB_FIRM patching, get these files: https://raw.githubusercontent.com/mid-kid/CakesForeveryWan/master/agb_firmurl
Place the former as agb_firmware.bin in the cakes folder, and the latter as agb_cetk.
To decrypt the agb_cetk from a9lh, a little workaround is booting sysnand, extracting the SD card, putting both files in the cakes folder, entering system settings and leaving again. This should reboot into cakes, which will then decrypt the cetk.
 
Last edited by mid-kid,

temper999

Well-Known Member
Member
Joined
Sep 22, 2015
Messages
327
Trophies
0
XP
520
Country
Gambia, The
Only few line above:
To enable AGB_FIRM patching, get these files: https://raw.githubusercontent.com/mid-kid/CakesForeveryWan/master/agb_firmurl
Place the former as agb_firmware.bin in the cakes folder, and the latter as agb_cetk.
To decrypt the agb_cetk from a9lh, a little workaround is booting sysnand, extracting the SD card, putting both files in the cakes folder, entering system settings and leaving again. This should reboot into cakes, which will then decrypt the cetk.
 
  • Like
Reactions: Gray_Jack

mid-kid

GBAtemp spamBOT
OP
Member
Joined
Aug 2, 2012
Messages
879
Trophies
0
Age
25
XP
1,163
Country
So, time for a new nightly.
N3DS support for AGB_FIRM patching alongside some fixes to the firmware.bin decryption on n3ds.
For this to work you need to have the reboot patch enabled.
Here are the updated AGB cakes that also work on n3ds:
agb_signatures.cake: http://chunk.io/f/6060f6a6decb4f26afcf638170903bcf.cake
agb_bootscreen.cake: http://chunk.io/f/8468a371cb26400285e91b3db1278382.cake
Most of the info on how to install from previous nightly is still valid: http://gbatemp.net/threads/release-cakesfw.391200/page-145#post-6229995
Get the agb_firmware.bin and agb_cetk from here: https://raw.githubusercontent.com/mid-kid/CakesForeveryWan/master/agb_firmurln3ds
Please report any and all shortcomings you may find.

I know it's a bit shitty how I go around putting cakes to download on random posts, but that won't be the case for long. I want some central place where my and other people's cakes can be featured and downloaded from, either a site or just another thread. I'll be working to make that a thing soon enough. I just don't want to bloat the "core" set of cakes. 5 is more than enough.
I've removed the "future hopeful features" from the OP, as I haven't been updating it properly, and isn't quite as accurate anymore.
Next thing to work on will be TWL, after which I'll probably fix the userland .cake files. @WhoAmI? almost finished the website, after which I'll have to start filling it with content.

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

Oh, and here goes asking for people if they can still reproduce this problem in nightly 157: https://github.com/mid-kid/CakesForeveryWan/issues/28
@GothicIII, could you check?
 

GothicIII

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
831
Trophies
0
Age
36
XP
2,236
Country
Gambia, The
@mid-kid: Good job, works now :) Can you explain what you did to make it working please? I checked your source and forked parts of it but I didnt understand why the decryption process failed. Your aes functions were way beyond my understanding. I instead disabled the checks and just wrote the plain firmware.bin dump into the RAM and loaded it. In the original code it always failed at decrypt_arm9bin() returning not zero.

However nightly 157 works now. Maybe you can make the reboot patch compatible with fw9.0. It fails to enable it.
 

mid-kid

GBAtemp spamBOT
OP
Member
Joined
Aug 2, 2012
Messages
879
Trophies
0
Age
25
XP
1,163
Country
@mid-kid: Good job, works now :) Can you explain what you did to make it working please? I checked your source and forked parts of it but I didnt understand why the decryption process failed. Your aes functions were way beyond my understanding. I instead disabled the checks and just wrote the plain firmware.bin dump into the RAM and loaded it. In the original code it always failed at decrypt_arm9bin() returning not zero.

However nightly 157 works now. Maybe you can make the reboot patch compatible with fw9.0. It fails to enable it.

I messed up when writing decrypt_arm9bin before. I used keyslot 0x16 to decrypt the older firmwares, instead of 0x15.
 
  • Like
Reactions: GothicIII

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty
    what are you looking at?
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
    SylverReZ @ SylverReZ: @AncientBoi, https://www.youtube.com/watch?v=7jUWpmU-X8k