Hacking RELEASE Kosmos - A Hekate CFW-package

Clydefrosch

Well-Known Member
Member
Joined
Jan 2, 2009
Messages
6,022
Trophies
2
XP
4,619
Country
Germany
since there are always a few bumps in the road after any atmosphere update, I was just wondering if there were any this time and if it's a good time to update kosmos
 

tomGER

Well-Known Member
OP
Member
Joined
Feb 6, 2017
Messages
347
Trophies
0
XP
1,222
Country
Germany
since there are always a few bumps in the road after any atmosphere update, I was just wondering if there were any this time and if it's a good time to update kosmos
I mean, it's on nearly newest atmos still (at least last release atmos)

I prefer ReiNX over it. I am happy with my CFW. No problem so far.
Cool ... ? Don't get what you're trying to tell me here lol
 
  • Like
Reactions: tiliarou

alba93

Well-Known Member
Newcomer
Joined
Feb 2, 2019
Messages
77
Trophies
0
Age
45
XP
885
Country
France
Hello,
A friend of mine has just bought a non patched switch.
He has put the Kosmos package into his SD card but each time he try to launch the CFW under hekate he get a black screen.
He tried different version of Kosmos but each time the same result
He tried also to restore the NAND but always the same problem
At last in the launch configuration he can select payloads and select fusee payload to start Atmosphere.
To sum up he succeed in starting Atmosphere but not Kosmos
What coud be the issue?
thanks
 

realg123

Well-Known Member
Member
Joined
Aug 9, 2010
Messages
239
Trophies
1
XP
466
Country
Canada
Yes. That's what I'm doing.

Make a backup of your boot.dat (or download one from the SX OS website).
Install Python 3 if you didn't already.
Place your boot.dat in the same folder as the hekate_ctcaer_x.x.bin from here (or from Kosmos of course).

Create an empty text file and insert this (credits to CTCaer):
Code:
###############################################
# TX SX Pro Custom Payload Packer - by CTCaer #
###############################################
import struct
import hashlib
from os import unlink
"""
typedef struct boot_dat_hdr
{
unsigned char ident[0x10];
unsigned char sha2_s2[0x20];
unsigned int s2_dst;
unsigned int s2_size;
unsigned int s2_enc;
unsigned char pad[0x10];
unsigned int s3_size;
unsigned char pad2[0x90];
unsigned char sha2_hdr[0x20];
} boot_dat_hdr_t;
"""
def sha256(data):
sha256 = hashlib.new('sha256')
sha256.update(data)
return sha256.digest()
boot_fn = 'boot.dat'
# Custom payload filename.
stage2_fn = 'hekate_ctcaer_4.6.bin'
boot = open(boot_fn, 'wb')
with open(stage2_fn, 'rb') as fh:
stage2 = bytearray(fh.read())
stage2 = bytes(stage2)
# Re-create the header.
header = b''
# Magic ID.
header += b'\x43\x54\x43\x61\x65\x72\x20\x42\x4F\x4F\x54\x00'
# Version 2.5.
header += b'\x56\x32\x2E\x35'
# Set sha256 hash of stage2 payload.
header += sha256(stage2)
# Set stage2 payload destination to 0x40010000.
header += b'\x00\x00\x01\x40'
# Stage2 payload size.
header += struct.pack('I', len(stage2))
# Disable Stage2 encryption.
header += struct.pack('I', 0)
# Add padding. Stage3 size is 0.
header += b'\x00' * 0xA4
# Add header's sha256 hash.
sha256 = hashlib.new('sha256')
sha256.update(header)
header += sha256.digest()
# Write header and the plaintext custom payload.
boot.write(header)
boot.write(stage2)
boot.close()

Whenever you're planing on updating or you want to use any other payload with your SX Pro, just find and edit this line:
Code:
stage2_fn = 'hekate_ctcaer_4.6.bin'

After saving and closing that textfile, rename it to something like sxpro_custompayload.py and run it.
Look at the boot.dat in the same folder. It should be significantly smaller now. That's fine.
Now copy the boot.dat and the hekate_ctcaer_x.x.bin to the root of your SD card. That's it.

One note on that: You won't be able to boot into SX OS any longer when you do this. You can download SX OS as a payload bin file from their website but even if you chainload that through hekate or fire it up with TegraSmash, it won't boot as it's looking for an unaltered (!) boot.dat on your SD.

So if you want to preserve yourself the possibility to boot into SX OS, stick to your original boot.dat (or re-download it from their website) and use their boot menu instead to launch hekate from there.
To access their bootmenu just hold VOL+ while using the SX Pro to boot.
Btw: It's VOL- for hekate (if you want to re-enter the menu in case you enabled autoboot).
Another option would be to have both boot.dat files on your SD:
Code:
bootsxos.dat
boothekate.dat
One of them is named boot.dat which is your default one and you keep renaming them (e.g. from within NX-Shell) before your reboot.
I wrote TX about that problem but it can't be helped. Someone there recommended me this in dongle in a PM: click me - maybe you wanna go for that one instead.

I already wrote that in just that post that you quoted lol. Take the python split script I linked there, put it in the same folder as the NSP you want to split. I'd recommend to rename the NSP to something short and simple. For example:
Code:
zeldabotw.nsp
instead of
Code:
The Legend of Zelda - Breath of the Wild [v0].nsp
Then run the script and you should end up with a folder which has a name that ends with .nsp where you used the script.
Don't let that bother you. Just treat that folder as a nsp file.
Put it along all other NSPs on your SD and install it right away. I still recommend n1dus for that but it seems Goldleaf does the job now as well.

Thanks a million
 

susi91

Well-Known Member
Member
Joined
Sep 13, 2018
Messages
341
Trophies
0
XP
1,354
Country
Germany
Thank you @tomGER for your great sd package. ^_^

For update from Kosmos v9 to newest v11, drag/drop/overwrite with the new release files is a propper solution? Or maybe better delete all corresponding folders? :unsure:
 

ZachyCatGames

Well-Known Member
Member
Joined
Jun 19, 2018
Messages
3,398
Trophies
1
Location
Hell
XP
4,209
Country
United States
Thank you @tomGER for your great sd package. ^_^

For update from Kosmos v9 to newest v11, drag/drop/overwrite with the new release files is a propper solution? Or maybe better delete all corresponding folders? :unsure:
Deleting all the old files and copying over the new ones would probably be better. Overwriting them would probably work though
 
  • Like
Reactions: susi91

alba93

Well-Known Member
Newcomer
Joined
Feb 2, 2019
Messages
77
Trophies
0
Age
45
XP
885
Country
France
Hello,
A friend of mine has just bought a non patched switch.
He has put the Kosmos package into his SD card but each time he try to launch the CFW under hekate he get a black screen.
He tried different version of Kosmos but each time the same result
He tried also to restore the NAND but always the same problem
At last in the launch configuration he can select payloads and select fusee payload to start Atmosphere.
To sum up he succeed in starting Atmosphere but not Kosmos
What coud be the issue?
thanks

Any idea how to fix this issue?
thanks
 

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,787
Trophies
1
Age
44
XP
6,517
Country
Germany
Hello,
A friend of mine has just bought a non patched switch.
He has put the Kosmos package into his SD card but each time he try to launch the CFW under hekate he get a black screen.
He tried different version of Kosmos but each time the same result
He tried also to restore the NAND but always the same problem
At last in the launch configuration he can select payloads and select fusee payload to start Atmosphere.
To sum up he succeed in starting Atmosphere but not Kosmos
What coud be the issue?
thanks
Uh oh, I smell random trying.

Also what do you mean by "he succeed in starting Atmosphere but not Kosmos"?
Kosmos is actually nothing but a compilation of hekate + Atmosphère (including sigpatches) and a few other things.
So he can boot Atmosphère, what more does he want?
Or does your "he succeed in starting Atmosphere but not Kosmos" still leads to a black screen?
 

alba93

Well-Known Member
Newcomer
Joined
Feb 2, 2019
Messages
77
Trophies
0
Age
45
XP
885
Country
France
Uh oh, I smell random trying.

Also what do you mean by "he succeed in starting Atmosphere but not Kosmos"?
Kosmos is actually nothing but a compilation of hekate + Atmosphère (including sigpatches) and a few other things.
So he can boot Atmosphère, what more does he want?
Or does your "he succeed in starting Atmosphere but not Kosmos" still leads to a black screen?

thanks for your feedback
in fact i gave him a Kosmos package and games under nsp format.
On my side all is running well. i can select cfw in the hekate menu and it starts atmosphere, the kips and so on.
i can install the nsp files with tinfoil or goldleaf without any problem.
With the same Kosmos package my friend get a black screen after selecting cfw and i don't understand why.
He succeed in starting the original "Atmosphere" by selecting fusée gelée payload.
But once started he get errors when he try to install some games.
I think that all the extra features (sigpatches, ...) are not applied.
How do he has to proceed to add this features?
What could be the root cause leading to this black screen issue?
thanks
 

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,787
Trophies
1
Age
44
XP
6,517
Country
Germany
thanks for your feedback
in fact i gave him a Kosmos package and games under nsp format.
On my side all is running well. i can select cfw in the hekate menu and it starts atmosphere, the kips and so on.
i can install the nsp files with tinfoil or goldleaf without any problem.
With the same Kosmos package my friend get a black screen after selecting cfw and i don't understand why.
He succeed in starting the original "Atmosphere" by selecting fusée gelée payload.
But once started he get errors when he try to install some games.
I think that all the extra features (sigpatches, ...) are not applied.
How do he has to proceed to add this features?
What could be the root cause leading to this black screen issue?
thanks
While this sounds really odd to me, the good thing is that Atmosphère boots.
There's two options now:
  1. If your friend is fine with "just" having Atmosphère without hekate, he could just add the sigpatches manually and should be able to install and play any NSPs:
    https://gbatemp.net/threads/i-heard-that-you-guys-need-some-sweet-patches-for-atmosphere.521164/
    Just unpack that to the SD.
  2. If your friend wants to give Kosmos another shot:
    I would try removing anything (except the Nintendo and switch folder) from the SD and then extract Kosmos freshly from the newest release zip again to it. Then use the included hekate*.bin while the Switch is in RCM and hekate should boot. From there, the CFW now should be usable. Worth a try.
    As a sidenote: As stupid as that may sound: Trying another SD card could lead to success. SD cards are real divas sometimes.
 

alba93

Well-Known Member
Newcomer
Joined
Feb 2, 2019
Messages
77
Trophies
0
Age
45
XP
885
Country
France
While this sounds really odd to me, the good thing is that Atmosphère boots.
There's two options now:
  1. If your friend is fine with "just" having Atmosphère without hekate, he could just add the sigpatches manually and should be able to install and play any NSPs:
    https://gbatemp.net/threads/i-heard-that-you-guys-need-some-sweet-patches-for-atmosphere.521164/
    Just unpack that to the SD.
  2. If your friend wants to give Kosmos another shot:
    I would try removing anything (except the Nintendo and switch folder) from the SD and then extract Kosmos freshly from the newest release zip again to it. Then use the included hekate*.bin while the Switch is in RCM and hekate should boot. From there, the CFW now should be usable. Worth a try.
    As a sidenote: As stupid as that may sound: Trying another SD card could lead to success. SD cards are real divas sometimes.

thanks again for your help
We've already tried different versions of Kosmos without success
We also tried different SD format (FAT32 and exFAT) => same result
Unfortunatly he doesn't have an other SD card to test.

Now as proposed he can add sigpatches manually and see if it fulfills his expectations.

I've another friend who doesn't succeed in starting atmoshpere, reinx, .... anymore
At first all was OK but his SD failed while he was copying a file on it.
He replaced the SD card (still under warranty) and Kosmos was runing well again.
He removed the SD card to add files but now he get the error "failed to init SD card" or something like this when he selects launch under hekate.
 
Last edited by alba93,

lordelan

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
5,787
Trophies
1
Age
44
XP
6,517
Country
Germany
He removed the SD card to add files but now he get the error "failed to init SD card" or something like this when he selects launch under hekate.
Umm... please don't tell me he did that without shutting down the console completely.
Shutting down the Switch and using the reject feature in Windows before pulling it out there is a must to avoid data corruption.
Format the card again (FAT32 with GuiFormat with 32 k cluster size) and put a fresh Kosmos on it.
 

W9qI8k5QMf

Well-Known Member
Newcomer
Joined
Feb 11, 2019
Messages
68
Trophies
0
Age
35
XP
1,080
Country
United States
Hello,
A friend of mine has just bought a non patched switch.
He has put the Kosmos package into his SD card but each time he try to launch the CFW under hekate he get a black screen...
thanks


I had same problem.

Problem was: my sdcard was exfat.

had to reformat it to fat32.
download some program to format the sdcard to fat32.

fresh copy all the kosmos files over to fat32 sdcard (i used this site hxxps%\\vvv.sdsetup.cum/console?switch ).
dont add any nsps or anything else, not yet.

launch cfw. no more black screen.

I'm guessing this is same issue you are facing, but maybe not, I dunno.

after launching cfw, update switch to firmware that has exfat compatibility with that
ChoiDujourNX
nro.
 
Last edited by W9qI8k5QMf,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: This movie rip so werid has 1080p quality but the audios ripped with movie theater audio quality