Hacking Homebrew Install a Unity 2017 Wii U built game ? ("repack" for retail Wii U)

DomyGX

Member
Newcomer
Joined
Nov 7, 2021
Messages
17
Trophies
0
Age
21
XP
34
Country
Italy
Short tutorial but it can work.
First, I use Unity 2017.1.2p3 with the WIi U Build Support (I use this version, because I didn't get any results with other versions)
In therms of tools I have CDecrypt with the tik_sys.bin of the dev kit (located in your cafe_sdk\system\bin\tool\mastering\resources\makemaster\tik_sys.bin), NUSPacker from rabisco and Kii U Generator with my title ID

Build the game & decrypt it
I build the game with Master [No Network] / Download Image / NAND.
After, I use CDecrypt to decrypt the dev files from your Unity Project/copyToSd/ with the DEV KEY (tik_sys.bin). Use the GUI version and select the tik_sys.bin (copy it to the CDecrypt GUI folder it better) and the title.tik from the in folder.

If you don't have a TitleID
The Wii U Title ID is different in one point : the UniqueID (normaly give by Nintendo, I think...).
Each Wii U TilteID is composed like that : 0x000500001 + UniqueID + VARIATION (don't know it's from Wii U App Config Tool)
So I just put random numbers to make my own UniqueID (note : it must be a HEX value) and check on This website if the TitleID was already used.

Generate the Title Key from TitleID with Kii U Generator
Start Kii U Generator.bat from my archive enter the WiiU Common Key (google it's somthing like D7B..........................656) enter your Title ID and generate. You will have 2 keys : Unencrypted title key and encrypted title key. We will use the unencrypted with NUSPacker.

Repack the game files
Place the code/meta/content folders from CDecrypte in /in/ in the NUSPacker. You will need to edit the file pack.bat. This file must contain the Title ID, Unencrypted Title Key & Wii U Common Key as arguments

Edit the file like that

java -jar NUSPacker.jar -in "in" -out "out" -skipXMLParsing -encryptWith "wiiucommonkey" -encryptionKey "your_unencrypted_titilekey" -tID your_title_id_here

After check if the encrypted title key shown by NUSPacker is the same as Kii U Generator, if yes, your game is ready to install to your WIi U. If not try a different Title ID in Kii U Generator and a different password (generally mypass or nintendo)

That the steps I used to install my own game on my Wii U.
I attach an archive with the tools CDecrypt and NUSPacker.
After launching on your Wii U be patient, sometimes I need to wait 30s-1minute on the startup screen before my game loads.
Just one question : Where do you get your Unity Install + licence and the Cafe SDK ?
Note : It has been one week I try that, and I managed to run my game this morning, I don't know the entire SDK, I just search for hours and hours.... If you need help, I am here.
i've got the unity install and license from archive.org, Nintendo removed the support for Unity a while ago. For the SDK i just downloaded it from the Nintendo Developer Website, the registration process is fearly easy but they are only letting developer download only the wii u and 3ds sdk. If you want the switch sdk you must follow a registration form where you present your game and if they accept you then you can download it. Anyway thanks for sharing the process, also i think this can be trimmed a bit and i've noticed that you can remove the -skipXMLParsing -encryptionKey and -tID like V10lator said, NUSPacker crashes because the app.xml is broken, you need to replace this line
<os_mask type="hexBinary" length="32">0</os_mask>
with
<os_mask type="hexBinary" length="32">0000000000000000000000000000000000000000000000000000000000000000</os_mask>
then it parses the file normally

That shouldn't be needed as CDEcrypt contains the dev key: https://github.com/VitaSmith/cdecrypt/blob/master/cdecrypt.c#L43-L44

This is completely overkill. Just use whatever key you want (or NUSPackers default). The Wii U won't calculate the key but just read it from the title.tik file.

NUSPacker should be able to read the title ID from the unencrypted files (when you don't use -skipXMLParsing). For the title key I would just leave it blank so NUSPacker uses its default. Will make it way more simple.

So correct, hassle free NUSpacker command:
Code:
java -jar NUSPacker.jar -in "in" -out "out" -encryptWith "wiiucommonkey"
;)

//EDIT: Even when off-topic as unneeded:

Here's the full password list. Then again you won't need this as NUSPackers default title key or any hex value you can imagine will work just fine: "mypass", "nintendo", "test", "1234567890", "Lucy131211", "fbf10", "5678", "1234", ""

//EDIT²: Also the current issue is not a wrongly packed title but something wrong witht the codes. Just look at the logs:
Code:
invalid access of 0x00000000
Code:
00;25;49;770: 0x12e927d8:   0x12e927f8    0x1005e060 coreinit.rpl|.bss+0xb1e0
00;25;49;770: 0x12e927f8:   0x12e92818    0x038ea2d8 unity-master|fread+0xd0
00;25;49;801: 0x12e92818:   0x12e92850    0x020fd434 unity-master|InitFromFile__Q2_10BootConfig4DataFPPCcUiPCc+0x114
00;25;49;811: 0x12e92850:   0x12e92900    0x020fca70 unity-master|InitFromFileFormatted__10BootConfigFPPCcUiPCce+0x114
00;25;49;821: 0x12e92900:   0x12e92938    0x020041b8 unity-master|PreInit__5unityFiPPc+0x64
00;25;49;830: 0x12e92938:   0x12e92960    0x020000d8 unity-master|main+0x98
00;25;49;840: 0x12e92960:   0x12e92978    0x02000424 unity-master|_start+0xac
00;25;49;849: 0x12e92978:   0x00000000    0x0101c570 coreinit.rpl|$TEXT+0x170
So fread does a Null pointer access. My guess is that this is cause InitFromFile tries to open a file which isn't there (and unity is missing correct error handling). In case a empty project should really work (which I still doubt, can someone confirm this?) your best bet would be to open the .rpx in Ghidra and look at unity-master|PreInit__5unityFiPPc+0x64 and unity-master|InitFromFileFormatted__10BootConfigFPPCcUiPCce+0x114 to see what file it tries to open.
i've also noticed the null pointer which means that actually the game booted. Before trying the blank project (i can confirm it's a vaild test, unity has it's own skeleton and a blank project can be built and run with no problem on windows, it just shows a skybox and nothing else) i also tried my own project and it gave the same error, maybe this version of unity want a manually placed file somewere...
 
Last edited by DomyGX,

DomyGX

Member
Newcomer
Joined
Nov 7, 2021
Messages
17
Trophies
0
Age
21
XP
34
Country
Italy
It was the only way for me to boot my games. Good to know about NUSPacker.
You downloaded Unity from archive.org.... You used this : https://archive.org/details/Unity2017.4.15f1 ?
I personnaly use the same version as https://archive.org/details/unityforwiiu40120171205 try with
yes, i'm using unity from that link. i'm currently installing the other unity version, i'll keep this thread updated

EDIT: it works... i don't know why... it booted in CEMU also there are less files then the other unity version
Post automatically merged:

it works on retail too
 
Last edited by DomyGX,

RetroAndDev

Well-Known Member
OP
Newcomer
Joined
Apr 9, 2023
Messages
75
Trophies
0
Age
16
Location
France
Website
github.com
XP
264
Country
France
Interesting, for me, it never worked in CEMU. Which version do you use ?
Post automatically merged:

To facilitate the conversion of development files for Wii U Retail. I'm coding a utility to facilitate this conversion.

I named it Wii U Cafe SDK Deluxe.

Here is a small preview:
wiiucafesdkdeluxe.png


With this tool you don't have to juggle between CDecryp and NUSPacker any more, it takes care of everything, even copying the files to the SD card

I think I'll release a test version in the week. It will be placed in your "Builds" folder of your Unity project, and you will just have to give it some info, create a version, and then launch the conversion with a single button... If this is not magic...
 
Last edited by RetroAndDev,

danny19901

Well-Known Member
Member
Joined
Feb 12, 2016
Messages
633
Trophies
0
Age
32
XP
1,569
Country
I'm actually glad this thread exists as I have Unity Wii U build and I'm gonna start with a Easy game like Tetris but gonna try and add multiplayer up to 4p and add specials to make it harder for opponents and it all varies from how many lines get cleared

Sent from my 2201122G using Tapatalk
 

XyzPixel

Member
Newcomer
Joined
Jan 9, 2022
Messages
22
Trophies
0
Age
45
XP
122
Country
Dominican Republic
There are guys that all this is interesting
one question, is it safe to use CDecryp and NUSPacker? two years ago I had done all my efforts to create a Wup Installer for Wiiu
Any advice from you or a tutorial on how to create the ID Title
and the WUP Installer correctly
thanks guys I leave you a Unity manual for wiiu
 

Attachments

  • UnityForWiiUTutorial_1.2.zip
    6 MB · Views: 40

punderino

aka Big-PeePee Swinger
Member
Joined
Jan 5, 2016
Messages
1,247
Trophies
0
Age
32
Location
Kansas City, Missouri
Website
www.anus.trade
XP
2,504
Country
United States
Hi,

I want to dev some games for fun for my Wiii U.
I have the official Unity License Key and Dev Kit from the Nintendo Dev Interface.

Before making my game, I wanted to test with an empty project to install it on my Wii U. I built the game with success and I tried to run it on Cemu, but the game shows the "loading image" and Cemu crashes. I think it was due to the emulator itself. But when I tried to run it with Loadiine, I got a black screen and the game never load (I wait for 20 minutes max). I have seen that the dev kit encrypt the game with a different key that the retail console. So I used CDecrypt to decrypt the game (in Wup format) with the dev key stored int the Wii U SDK (CafeSDK\SDK\cafe_sdk\system\bin\tool\mastering\resources\makemaster\tik_sys**.bin) but same issue.
When I try to install it to USB from WUP Installer, I have the error "Not a game, update or dlc"

I saw in this an reddit comment : "All he has to do is repack the demos he made for retail, pretty easy. If you want to learn how, I recommend asking in r/WiiUHacks" (found from some searches) that I need to "repack" the game, I wanted to know how to do that and play it on my retail Wii U

Some technical information:

Unity 2017.1.2p3 with Wii U Build support

Cafe SDK : 2.13.01 EN

Cafe "GHS Multi" : 5.3.27 EN/JA

Cafe HostBridge Software : 3.2.6.8 EN/JA

Wii U Hardware : Wii U Deluxe 32go (Europe)

Wii U Version : 5.5.5 (Europe)

Wii U Hack Version : Last version I think... (I installed it quickly to back up my NAND)

Thank you for reading/or for your help
Post automatically merged:

NEWS !
I tried with a different Title ID and other things (i don't know exactly what I do, it has been 4 hours of search of common keys, title ID, dev common key and many others) and the message in WUP Installer changed to "Verify WUP files are correct & complete. DLC/E-Shop require Sig Patch", so I installed Sig Patch 2 HBL from Homebrew App Store and the message stay.
Any idea how to install a Unity Wii U Build to a retail Wii U ?
You can use a hex editor and change the key in the sdk so it just creates its apps with the retail key :)
 

RetroAndDev

Well-Known Member
OP
Newcomer
Joined
Apr 9, 2023
Messages
75
Trophies
0
Age
16
Location
France
Website
github.com
XP
264
Country
France
There are guys that all this is interesting
one question, is it safe to use CDecryp and NUSPacker? two years ago I had done all my efforts to create a Wup Installer for Wiiu
Any advice from you or a tutorial on how to create the ID Title
and the WUP Installer correctly
thanks guys I leave you a Unity manual for wiiu
I don't see any tutorial about making a TitleID. Make one randomly (must be start with '00050000' and ends with '00' and 16 length), and you need to check with this website if any game uses the key. (Make a search with control+f). It needs to be like that : (replace, 10000 with what you want randomly or not must be a hexadecimal value)
Capture d’écran 2023-05-25 à 09.16.36.png

You can use a hex editor and change the key in the sdk so it just creates its apps with the retail key :)
With my tool no. It depack from dev files and repack it for retail Wii U. Here is the link of my tutorial with Wii U Cafe SDK Deluxe. You just need to import the tik_sys.bin (the dev key) in my tool, and you will be good. Follow my tutorial with Unity Build with options :

build.jpg
 

V10lator

Well-Known Member
Member
Joined
Apr 21, 2019
Messages
2,623
Trophies
1
Age
36
XP
5,460
Country
Germany
TitleID. Make one randomly (must be start with '00050000' and ends with '00' and 16 length), and you need to check with this website if any game uses the key.
After that install the title to NAND and see if it works. In case it does move it to USB and see if it still works.

I guess nobody knows why but some title IDs won't work from NAND while others won't work from USB. Normally one needs to try a few IDs before finding a good one.

is it safe to use CDecryp and NUSPacker?
These are open source tools used since years. So what are you afraid of? I mean even in case you don't trust the binary you can just review the source codes and compile from them for yourself. ;)
 

punderino

aka Big-PeePee Swinger
Member
Joined
Jan 5, 2016
Messages
1,247
Trophies
0
Age
32
Location
Kansas City, Missouri
Website
www.anus.trade
XP
2,504
Country
United States
I don't see any tutorial about making a TitleID. Make one randomly (must be start with '00050000' and ends with '00' and 16 length), and you need to check with this website if any game uses the key. (Make a search with control+f). It needs to be like that : (replace, 10000 with what you want randomly or not must be a hexadecimal value)
View attachment 373721

With my tool no. It depack from dev files and repack it for retail Wii U. Here is the link of my tutorial with Wii U Cafe SDK Deluxe. You just need to import the tik_sys.bin (the dev key) in my tool, and you will be good. Follow my tutorial with Unity Build with options :

View attachment 373723
I was just saying you could skip the whole need of an extra tool depacking and repacking the app if it was just packed with the correct key from the beginning. I don't have a Wii U set up anymore and haven't touched any of this stuff in like 3+ years so I could be wrong on where your tool deviates from normal SDK use :P
 

XyzPixel

Member
Newcomer
Joined
Jan 9, 2022
Messages
22
Trophies
0
Age
45
XP
122
Country
Dominican Republic
what's up guys and thanks for answering
My concern is that it will take many months from 2019 when I start trying to develop a game for Wiiu. of course when I signed up as a nintendo developer and got the SDK
and it took me a long time to get a WUP Installer built for retail console and I didn't have the $5,500 for the Dev Kit
I'm not a programming guru but I'm a fast learner and right now I can't get the RetroDev Tutorial started. I don't know if some steps are missing or RetroDev assumes that we know those steps that it skips
I did everything in the tutorial and I have installed the WIIU SDK correctly
I have considered starting the PC and restoring everything from scratch
and nothing I can't create my TitleID to install on my retail console
it says no to (started the App Configuration Tools)
if you can give me a hand. I'm like babies


02.jpg


JAVA, PYTHON

03.jpg


SDK
04.jpg


and I don't get to build a TitleID:nayps3:


CEMU EMULATOR
01.jpg

And if the error with the cemu emulator happens to someone when they build the files from unity and run them in CEMU and it fails, it is because it is downloading the package wrong, I build it as: MASTER OFFLINE, DLOWNLOAD IMAGE AND NAND
the Cemu emulator will load the RPX or the LEF and that's it
I hope this helps some with this problem
 

RetroAndDev

Well-Known Member
OP
Newcomer
Joined
Apr 9, 2023
Messages
75
Trophies
0
Age
16
Location
France
Website
github.com
XP
264
Country
France
Ok, from what I can see from yours pictures, you didn't locate the CafeSDK Location in Wii U Cafe SDK, it actually points to the default option. You named your Wii U SDK as "SDK" mine is "WiiUSDK". You have installed it in C:\Nintendo and the CafeSDK location will be C:\Nintendo\SDK (from the capture of the NDI)

And some tips about my tools.
With your fist capture, I can see your build folder like that
TesteWiiU>Build>(your unity wii u build here)
TesteWiiU>Build>WiiUCafeSDKDeluxe

I recomend you for the versions like that
TesteWiiU>Build>VersionA (or what you want)>(your unity wii u build here)
TesteWiiU>Build>WiiUCafeSDKDeluxe

And when you will create a version in the tool, name it like the Version folder who contains the Unity build files.

For the TitleID i will make a new tool (inside Wii U Cafe SDK Deluxe) to make one

Due to how you have installed my tools, I will remake a new tutorial about how to use it and install it.
If you have any questions, I am here ! (or in PM If you want a specific-case tutorial or a submit me a bug)
 

XyzPixel

Member
Newcomer
Joined
Jan 9, 2022
Messages
22
Trophies
0
Age
45
XP
122
Country
Dominican Republic
thanks RetroDev I already started the tutorial you uploaded. first restore pc system from windows home system to windows pro version
and follow your instructions step by step.
and thanks for the support. I'll keep asking questions if you don't mind

03.jpg



01.jpg


04.jpg


05.jpg



all good until this step and after I Generate the Title Keys I get an error. I would like to know what I am doing wrong or am I missing a step?

06.jpg


all good until this step and after I Generate the Title Keys I get an error. I would like to know what I am doing wrong or am I missing a step?
As I restarted the entire system and installed only what is in the RetroDev tutorial, what recommendation to finish building my TitleID that up to now the RetroDev instructions have worked!! Only now I'm standing at this point.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I leave this Unity + Wii U user guide for those who lost the files when Nintendo deleted them
I hope it works for you

thank you all :)
 

Attachments

  • UnityForWiiUTutorial_1.2.zip
    6 MB · Views: 28
Last edited by XyzPixel,

V10lator

Well-Known Member
Member
Joined
Apr 21, 2019
Messages
2,623
Trophies
1
Age
36
XP
5,460
Country
Germany
I wonder why nobody reads the NDA but signs it blindly.
Code:
Ownership of Materials.  “Materials” means all Nintendo owned or licensed content in any form, logos, designs, text, graphics, pictures, information, data, software, including software embedded in our development hardware, equipment or tools, and sound files. Materials are the property of Nintendo or its licensors and are protected under applicable intellectual property laws.
Code:
Except with respect to the license granted in this Agreement, no license or conveyance of any rights under any patent, copyright, trade secret, trademark or any other intellectual property right in or to the Nintendo Confidential Information is granted under this Agreement. Nintendo Confidential Information is and shall remain the sole property of Nintendo.
Code:
Protection of Information.  You agree to take reasonable steps under the circumstances to keep Nintendo Confidential Information secret and to use at least the same degree of care as you use with your own similar information to protect the Nintendo Confidential Information, but in no event less than a reasonable degree of care, and agree in particular that you will (i) only use Nintendo Confidential Information as authorized by this Agreement; (ii) communicate or disseminate Nintendo Confidential Information only to those employees, agents or contractors with a need to know for the Purpose
Code:
Without limitation to any other obligations, you shall encrypt Nintendo Confidential Information when appropriate and in any case (1) at rest and when transferred, communicated, or otherwise transmitted electronically outside your system;
Code:
If you have reason to believe that there has been unauthorized use or disclosure of Nintendo Confidential Information, you will immediately notify us. Upon notice to you, we (either Nintendo itself or through an independent auditor) may audit your use and protection of Nintendo Confidential Information to ensure your compliance with this Agreement. You agree to provide us with such access to your facilities, employees, information, and systems as is reasonably required for us to perform any such audit.
Code:
You acknowledge and agree that any breach of or default under this Agreement by you would cause irreparable harm to Nintendo, the extent of which would be difficult to ascertain. In the event of any such breach or default, or the threat of such breach or default, you agree that Nintendo will be entitled to injunctive relief, specific performance or available other remedy, without the necessity of showing actual damages or posting a bond or other security.
 

RetroAndDev

Well-Known Member
OP
Newcomer
Joined
Apr 9, 2023
Messages
75
Trophies
0
Age
16
Location
France
Website
github.com
XP
264
Country
France
all good until this step and after I Generate the Title Keys I get an error. I would like to know what I am doing wrong or am I missing a step?
Can you send me in PM the logs ? After running the title key generation ? Also, your installation looks good, but you use the default Java and Python path. You need to install them to make the tools working (mastering and Title ID Generation) use JDK 18 and Python (any versions) and install the module pycryptodome. And you need to locate the executable in the options
I wonder why nobody reads the NDA but signs it blindly.
if Nintendo were really careful, they wouldn't be available on the Internet Archive. I don't think they care about the Wii U and 3DS anymore. They're gradually shutting down their servers, and it's no longer possible to develop (and buy Wii U/3DS dev kits) via their portal.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Sonic Angel Knight @ Sonic Angel Knight: :ninja: