Hacking Official Corbenik - Another CFW for advanced users (with bytecode patches!)

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
OP
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
0
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,194
Country
United States
corbenik-logo.png

This is yet another CFW for the 3DS. It's a lot like cakes in that patches are separate from the CFW itself, and a great deal of inspiration (as well as the FIRM decryption code) comes from Cakes.

Unlike Cakes, it uses bytecode-based patches and a VM to run them (both in the CFW and Loader,) taking a few very good ideas from @yifan_lu (Thanks, seriously.)

To people who don't quite understand that - it means patches consist of actual, interpreted code much like compiled Java, .NET CIL or Lua bytecode. The patches are roughly based on how Luma applies them.

This allows for much greater flexibility than Cakes, while working with near anything like Luma/ReiNAND. Corbenik is mainly intended for developers, power users and control freaks, not newbies. It is highly experimental, and may not work correctly in all cases.

If you don't know your way around the 3DS (or computers), chances are this isn't for you. I strongly recommend people use Luma3DS if they want something foolproof and simple. There's nothing wrong with Luma - Corbenik just has the exact opposite design goals.

At the moment, all of the essentials are in and functional. This includes all the basic patches. Signatures, FIRM Protection - as well as TWL/AGB patch support, reboot hooking, Multi-EmuNAND (both Gateway/Redirected) and other patches applied by Loader such as Region Free, update blocking, etc. It's also relatively stable at this point in time.

Please actually read the README.md and FAQ very carefully, and search the topic for problems if you have one before posting.

If you encounter issues, enable Logging and Verbose and upload boot.log and loader.log somewhere. If you don't have either, then you'll have to step through manually by enabling 'Step Through' in the options and taking down any text before it crashes. I can't help you if you don't provide proper debugging information. If you don't provide logs, that isn't helping me to help you. There is absolutely zero uniquely identifiable information in logs, so there is no reason not to upload them.

Current release: v0.3.0
Source code: https://github.com/chaoskagami/corbenik
Releases (OLD, use hourlies): https://github.com/chaoskagami/corbenik/releases
Prefix-changed hourlies: https://j.chaos.moe

Q: Why would I want to use this...thing?
A: Don't ask me. In fact, I'm pretty sure you don't if this crossed your mind for even a second.

Q: Okay, smartass, is this a clone/fork of--
A: No. It does include code from some other stuff. README should explain that, but otherwise it's completely original.

Q: Why another CFW?
A: I wanted to try some weird shit and couldn't with Cakes, basically.

Q: It won't load my firmware.bin even though I put it in a native folder!
A: `native` is a file, and that file is the firmware. Without the firmware there is no native, and therefore no boot. Repeat. (Cookie if you got the reference.)

Q: It crashed! Halp.
A: Enable Logging, Verbose and upload boot.log and loader.log somewhere. If you don't have either, then you'll have to step through manually by enabling 'Step Through' in the options and taking down any text before it crashes. That said, I haven't seen a crash of that variety in a long time. Tab of recent log-preventing crashes: 1

Q: I enabled autoboot and can't get into the menu!
A: Hold R. It's the same as a PSP.

Q: I can't compile it! (running Windows)
A: Compiling on Windows was never supported to begin with. If you really want to do this, search through the topic. It's easier to just install Debian in VirtualBox, though. Read the README, first off. Compiling is rather involved. I've seen reported success with mingw/msys as well as WSL.

Q: Where can I get ahold of you?
A: Usually on freenode/#Cakey (which, contrary to popular belief, is more the generic arm9 dev channel now.) If it's a feature request or bug, use the issue tracker on github. Otherwise, there's plenty other methods. Email is likely to be slowest.

Q: Where can I donate a few bucks to you?
A: No. Associating cash with homebrew is a bad idea for multiple reasons. I don't want your money. I appreciate the thought, though.

Q: When will the next release be?
A: When I feel like it. I prefer to not do rapid releases unless there are actual bugs that need a fix or features that add value immediately. Until things stack up such that I feel like a release is warranted, either compile from git or use the Skeith build (and brave instability; though it's usually not THAT bad)

Q: What are your thoughts on the Nintendo Dev program?
A: You sign an NDA that forbids many things. Please do not contribute to my code if you are under this NDA. I'll grill any new contributors on the spot on this issue. If you do not pass (e.g. are under the NDA) I will be unable to accept your code no matter how good it is for the sake of my own legal safety. I don't want to open this can of worms.

Q: Why the name?
A: Because .hack > SAO, and it's totally appropriate naming.

Seriously? It's a CFW. It may have fancy menus, but there really isn't much to look at. These are all slightly out of date (get me new ones, please!)

The bland out-of-box experience:
screenshot.png


When I was testing the newer wallpaper code (yes the brightness is off):
screenshot.png

@yifan_lu For the absolutely insane and wonderful idea to use bytecode, as well as the open source loader replacement. https://github.com/yifanlu/3ds_injector
@mid-kid General inspiration from Cakes, FIRM decryption code, reboot assembly code, some code for text display. https://github.com/mid-kid/CakesForeveryWan
@Wolfvak Code segment dumping + loading, plus BootAnim9 which is cool.
@Aurora Wright RE work, patches, EmuNAND, and Reboot/Firmlaunch C code. https://github.com/AuroraWright/Luma3ds
@Reisyukaku For the 'Force TestMenu' patch, and RE work. Also coded ReiNand, which some parts of Luma are derived from and thus some parts of this.
@d0k3 start.s, recursive directory listing, RE work. https://github.com/d0k3/GodMode9
@TuxSH RE work, code, and patches. Some code in loader is based on his extensions to it.
@Steveice10 RE work, patch offsets.
@dark_samus3 RE work, screen init.
@b1l1s RE work, screen init.
@Normmatt RE work, screen init, and sdmmc.c/h
@delebile RE work, screen init, and also the A9LH version I personally use.
@smealum Pioneering the open source hax frontier. (No actual code of his is in this repo itself, but ctrulib is basically essential for everything.)
@TiniVi RE work, screen deinit.
@Temptress Cerise A LOT of testing which was really helpful.
@Crystal the Glaceon A LOT of testing which was really helpful.
CyberConnect2 Because the name originates from .hack, which you should go play.

This list isn't exhaustive. Checking the README is probably for the best.
 
Last edited by chaoskagami,

DjoeN

Captain Haddock!
Member
Joined
Oct 21, 2005
Messages
5,489
Trophies
0
Age
51
Location
Somewhere in this potatoland!
Website
djoen.dommel.be
XP
2,779
Country
Belgium
Code:
make -C patch
make[1]: Entering directory `/d/Z_Testing/corbenik/patch'
rm -f *.vco
../host/bytecode_asm.py aadowngrade.pco aadowngrade.vco
/usr/bin/env: python2: No such file or directory
make[1]: *** [aadowngrade.vco] Error 127
make[1]: Leaving directory `/d/Z_Testing/corbenik/patch'
make: *** [patch] Error 2
@chaoskagami
What do we need to build this ourself?
Python 2.x or Python 3.x, special not standard libs?
(Let's say, python 2 and 3 are installed and everything is already setup to build luma3ds/cakes/rxtools/decrypt9/etc...)
 
Last edited by DjoeN,

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
OP
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
0
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,194
Country
United States
Code:
make -C patch
make[1]: Entering directory `/d/Z_Testing/corbenik/patch'
rm -f *.vco
../host/bytecode_asm.py aadowngrade.pco aadowngrade.vco
/usr/bin/env: python2: No such file or directory
make[1]: *** [aadowngrade.vco] Error 127
make[1]: Leaving directory `/d/Z_Testing/corbenik/patch'
make: *** [patch] Error 2
@chaoskagami
What do we need to build this ourself?
Python 2.x or Python 3.x, special not standard libs?
(Let's say, python 2 and 3 are installed and everything is already setup to build luma3ds/cakes/rxtools/decrypt9/etc...)

You need python2. It doesn't rely on anything non-standard, but you probably need >=2.7. Some stuff I use is 3.x compatibity and doesn't exist if python is <2.7 Also, I have no clue if it will build on Windows (I suspect not, since I've done all testing on Linux)

If your python2 is named python, just change the shebang in host/bytecode_asm.py.

The Makefile also automatically adds $DEVKITARM to the PATH.

Other than devkitARM, ctrulib (for loader), and python2, nothing else is required as far as I know.
 
Last edited by chaoskagami,

laharl22

Well-Known Member
Member
Joined
Dec 19, 2014
Messages
1,765
Trophies
0
Age
35
XP
584
Country
France
i have put firm file on firmware/native but anyone can pm me a link of native key please ?the firmkey of cakes work ?
 
Last edited by laharl22,

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
OP
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
0
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,194
Country
United States
Yep, put the firmkey as native.key in the keys folder and you should be good.

I haven't seriously tested AGB or TWL yet (which is why they're excluded from the readme), but it should at least load them too.
 
  • Like
Reactions: laharl22

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
OP
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
0
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,194
Country
United States
And what is the difference between this and Luma3ds?

If you're asking this question, you're not the intended audience. :<

Anyways, A LOT. It's more like Cakes if you have to compare against something.

i have an error error to decrypt firmware aborting

You can hit any key during an abort to power off, just FYI. Can you post the exact message? Oh, and if you have a N3DS, you need Slot0x11Key96.bin too. On the root, like every other slot keyfile. Forgot that.
 
Last edited by chaoskagami,
General chit-chat
Help Users
    Julie_Pilgrim @ Julie_Pilgrim: i love how the crowd still cheered when thousand miles played lmao