Tutorial  Updated

Haxchi Mod - Custom redNAND Launch Title

Just to keep myself safe from blame...
PLEASE DO NOT ATTEMPT THIS UNLESS YOU KNOW WHAT YOU ARE DOING

I decided to just make a new thread dedicated to everything I've modified and created to have a "custom title" on sysNAND that launches redNAND
It makes use of Haxchi, a DS VC exploit originally released by @smealum and then modified by @FIX94 to launch HBL and work for other games.

UPDATE: The latest commit for FIX94's haxchi includes a version with cfwbooter built in, omitting the need for cfwboot.elf. Files and instructions have been updated to reflect this.

Latest install.py version: 2.1.1
New in this version:
  • Fixed bug in uploading config.txt (for some reason I made it upload to config.ini -_-)
Features:
  • Allows input of any low ID, meaning it will automatically work with future exploit games (and can possibly be used to inject DS games, untested)
  • Makes sure the game and location provided actually exist before attempting to install
  • Automatically downloads and modifies meta.xml with user-defined name
  • Installs files from SD instead of uploading over network, which greatly increases speed (especially for the larger .tga meta files)

As for the modified iosuhax, you will have to compile a new fw.img from the github below
https://github.com/TheCyberQuake/iosuhax



NEW INSTALLER AND INSTALL PROCESS:
Finally got around to fixing up the installer.
It's now a universal installer, and should work automatically with future exploit games.

Download install.py from below, and place in the same folder as wupclient.py
https://mega.nz/#!xVVAHRgL!cMJdtZD6sLp0TIQ7q6BIjNzk5xB25jr8qamy423zUoE

From there you can either download a pre-made install pack from below and place it's files onto the SD card within a folder called haxchi (i.e. sd:/haxchi), or you can place any rom.zip and config.txt in /haxchi, and meta files within /haxchi/meta (excluding meta.xml, which will automatically be modified later).
https://mega.nz/#F!lRFgzSJY!ANFeNyPwRM_SjlH23ca4Zg
At this point I recommend grabbing the official haxchi from fix94, at least until I can rework my install packs or find a better way to do it while still being user friendly.

From there you can run wupserver on the Wii U (by loading fw.img with CFW Booter or haxchi).

You can then either double-click install.py, or type "python install.py" into command prompt/terminal

Enter the low ID of the game you wish to install to (can be found on this github page, it's the last 8 characters of the full 16 character title ID), and then enter the games install location (USB or NAND).
From there the script will install haxchi's rom.zip from sd:/haxchi, and the meta files from sd:/haxchi/meta. After that it will download meta.xml over the network to the PC, and then ask for what you wish the custom name to be (i.e. the name that shows up on home menu), then modify meta.xml to meta.xml.tmp, and then finally upload back to the Wii U.

Finally, the script will attempt to install config.txt, which is needed for the latest haxchi versions made by FIX94. If it succeeds (meaning the file existed on SD) it will also apply chmod 0x644 to the file to make it properly work with haxchi.
 
Last edited by TheCyberQuake,

soulkyo

Well-Known Member
Newcomer
Joined
Nov 3, 2013
Messages
47
Trophies
1
XP
224
Country
United States

naughty_cat

Well-Known Member
Member
Joined
Dec 19, 2013
Messages
218
Trophies
1
Age
36
XP
612
Country
Egypt
Yeah is the same guide as here.
Or if you're in a hurry there's one already compiled on that iso site.

Thanks mate! I've been struggling with all all that compiling stuff all night long...

Promotions that some people had that others did not for what ever the reason.

Maybe it has something to do with territory? Or purchase history?? Btw I downloaded Brain Age just today, and it only cost 6.99$ (as opposed to every one of the other titles that can be used, each cost 9.99$)... Though now that I know that some people are actually getting it for free, I don't feel so proud about having saved the 2$ any more... :D
 
Last edited by naughty_cat,
  • Like
Reactions: soulkyo

TheCyberQuake

Certified Geek
OP
Member
Joined
Dec 2, 2014
Messages
5,012
Trophies
1
Age
28
Location
Las Vegas, Nevada
XP
4,432
Country
United States
Finally said screw it, I'll make it a little less user friendly to save my sanity.
New version should be basically the final version for now.
It's now just 1 single install.py, which asks for the low title ID (the last 8 digits) and for install location (NAND or USB) and from there will automatically do everything else. That way it will automatically support any new games that come out.
I'll have to update OP in a little bit, got IRL stuff to deal with right now.
https://mega.nz/#!RMsn0TSL!RRk4W7dz-YnRvotnvUxUhg4YXT8u-jv-0vINEv5TOSs

Code:
import sys
import wupclient

if __name__ == '__main__':
    installid = raw_input("VC lower ID (last 8 chars): ")
    installLocation = raw_input("VC Location (NAND, USB): ")
    if(installLocation.lower() == "nand"):
        location = "mlc01"
    elif(installLocation.lower() == "usb"):
        location = "usb01"
    else:
        print("'" + installLocation + "' is not a suitable answer")
        input()
        sys.exit()
    print("Connecting to wupserver")
    w = wupclient.wupclient()
    if(w.s == None):
        print("Failed to connect to wupserver!")
        exit()
    print("Connected!")
    wupclient.w = w
    print("Mounting SD")
    ret = wupclient.mount_sd()
    if(ret == 0):
        print("Failed to mount SD!")
    else:
        print("Mounted! Installing Haxchi from SD")
        ret = w.cp("/vol/storage_sdcard/haxchi/rom.zip", "/vol/storage_" + location + "/usr/title/00050000/" + installid + "/content/0010/rom.zip")
        if(ret == 0):
            print("Failed to install Haxchi!")
        else:
            print("Installing Meta files")
            ret = w.cpdir("/vol/storage_sdcard/haxchi/meta", "/vol/storage_" + location + "/usr/title/00050000/" + installid + "/meta")
            if(ret == 0):
                print("Failed to install Meta files!")
            else:
                print("Downloading meta.xml for modification")
                ret = w.dl("/vol/storage_" + location + "/usr/title/00050000/" + installid + "/meta/meta.xml")
                if(ret == 0):
                    print("Download failed!")
                else:
                    customname = raw_input("Custom title name: ")
                    print("Modifying meta.xml")
                    linecount = 0
                    f1 = open('meta.xml', 'r')
                    f2 = open('meta.xml.tmp', 'w')
                    for line in f1:
                        linecount = linecount + 1
                        if(72 <= linecount <= 77 or 79 <= linecount <= 82):
                            customline = line[0:42] + customname + line[-15:]
                            f2.write(customline)
                        elif(linecount == 78 or linecount == 83):
                            customline = line[0:43] + customname + line[-16:]
                            f2.write(customline)
                        else:
                            f2.write(line)
                    f1.close()
                    f2.close()
                    print("Uploading modified meta.xml")
                    ret = w.up("meta.xml.tmp", "/vol/storage_" + location + "/usr/title/00050000/" + installid + "/meta/meta.xml")                   
                    if(ret == 0):
                        print("Meta.xml upload failed!")
                    else:
                        print("Attempting to upload config.txt")
                        ret = w.cp("/vol/storage_sdcard/haxchi/config.txt", "/vol/storage_" + location + "/usr/title/00050000/" + installid + "/content/config.ini")
                        if(ret == 0):
                            print("Config.ini upload failed, normal for older haxchi versions")
                        else:
                            print("Applying chmod to config.txt")
                            ret = w.chmod("/vol/storage_" + location + "/usr/title/00050000/" + installid + "/content/config.txt", 0x644)
                            if(ret != 0):
                                print("Install complete!")
                            else:
                                print("chmod failed!")
    if(w.fsa_handle != None):
        w.close(w.fsa_handle)
        w.fsa_handle = None
    if(w.s != None):
        w.s.close()
        w.s = None
print("Press enter to exit")
input()
 
  • Like
Reactions: KiiWii

pietempgba

Well-Known Member
Member
Joined
Jun 9, 2016
Messages
1,049
Trophies
0
XP
1,515
Country
United States
Finally said screw it, I'll make it a little less user friendly to save my sanity.
New version should be basically the final version for now.
It's now just 1 single install.py, which asks for the low title ID (the last 8 digits) and for install location (NAND or USB) and from there will automatically do everything else. That way it will automatically support any new games that come out.
I'll have to update OP in a little bit, got IRL stuff to deal with right now.
https://mega.nz/#!RMsn0TSL!RRk4W7dz-YnRvotnvUxUhg4YXT8u-jv-0vINEv5TOSs

Code:
import sys
import wupclient

if __name__ == '__main__':
    installid = raw_input("VC lower ID (last 8 chars): ")
    installLocation = raw_input("VC Location (NAND, USB): ")
    if(installLocation.lower() == "nand"):
        location = "mlc01"
    elif(installLocation.lower() == "usb"):
        location = "usb01"
    else:
        print("'" + installLocation + "' is not a suitable answer")
        input()
        sys.exit()
    print("Connecting to wupserver")
    w = wupclient.wupclient()
    if(w.s == None):
        print("Failed to connect to wupserver!")
        exit()
    print("Connected!")
    wupclient.w = w
    print("Mounting SD")
    ret = wupclient.mount_sd()
    if(ret == 0):
        print("Failed to mount SD!")
    else:
        print("Mounted! Installing Haxchi from SD")
        ret = w.cp("/vol/storage_sdcard/haxchi/rom.zip", "/vol/storage_" + location + "/usr/title/00050000/" + installid + "/content/0010/rom.zip")
        if(ret == 0):
            print("Failed to install Haxchi!")
        else:
            print("Installing Meta files")
            ret = w.cpdir("/vol/storage_sdcard/haxchi/meta", "/vol/storage_" + location + "/usr/title/00050000/" + installid + "/meta")
            if(ret == 0):
                print("Failed to install Meta files!")
            else:
                print("Downloading meta.xml for modification")
                ret = w.dl("/vol/storage_" + location + "/usr/title/00050000/" + installid + "/meta/meta.xml")
                if(ret == 0):
                    print("Download failed!")
                else:
                    customname = raw_input("Custom title name: ")
                    print("Modifying meta.xml")
                    linecount = 0
                    f1 = open('meta.xml', 'r')
                    f2 = open('meta.xml.tmp', 'w')
                    for line in f1:
                        linecount = linecount + 1
                        if(72 <= linecount <= 77 or 79 <= linecount <= 82):
                            customline = line[0:42] + customname + line[-15:]
                            f2.write(customline)
                        elif(linecount == 78 or linecount == 83):
                            customline = line[0:43] + customname + line[-16:]
                            f2.write(customline)
                        else:
                            f2.write(line)
                    f1.close()
                    f2.close()
                    print("Uploading modified meta.xml")
                    ret = w.up("meta.xml.tmp", "/vol/storage_" + location + "/usr/title/00050000/" + installid + "/meta/meta.xml")                  
                    if(ret == 0):
                        print("Meta.xml upload failed!")
                    else:
                        print("Attempting to upload config.txt")
                        ret = w.cp("/vol/storage_sdcard/haxchi/config.txt", "/vol/storage_" + location + "/usr/title/00050000/" + installid + "/content/config.ini")
                        if(ret == 0):
                            print("Config.ini upload failed, normal for older haxchi versions")
                        else:
                            print("Applying chmod to config.txt")
                            ret = w.chmod("/vol/storage_" + location + "/usr/title/00050000/" + installid + "/content/config.txt", 0x644)
                            if(ret != 0):
                                print("Install complete!")
                            else:
                                print("chmod failed!")
    if(w.fsa_handle != None):
        w.close(w.fsa_handle)
        w.fsa_handle = None
    if(w.s != None):
        w.s.close()
        w.s = None
print("Press enter to exit")
input()
it says NameError: 'raw_input' is not defined when i open a command window here; when I just double click on it it doesn't open at all
 

Dungeonseeker

Well-Known Member
Member
Joined
Mar 28, 2016
Messages
440
Trophies
0
Age
42
XP
1,689
Country
Works like a charm though I did encounter a few bugs along the way

Running the script by double clicking it caused the script to freeze at mounting SD Card, fixed by running from command window instead.

Script was unable to see the haxchi folder on my SD card until I rebooted my Wii U.

Script didn't work first time it was sucessful, I rebooted and brain training was unchanged. Ran it a second time and it worked.

Could not get the modified fw.img to boot my redNAND and could not understand why, it would reboot the console to the Wii U screen then stay on that screen forever. I fixed it by adding the original fw.img to the root of my SD and booting into redNAND using the HBL > CFWBoot method which still worked as it always had so I rebooted my Wii U and tried it again and it worked?

Thanks for your hard work, now I can access redNAND without the internet :)
 
Last edited by Dungeonseeker,

naughty_cat

Well-Known Member
Member
Joined
Dec 19, 2013
Messages
218
Trophies
1
Age
36
XP
612
Country
Egypt
Maybe you should try another SD card?? I have a 2GB card that I always use for vwii, and it's working perfectly on pc as well...I tried to use it yesterday with the wii u HBL, but it didn't work at all, and I got a similar error message about not being able to open HBL...
 

Dungeonseeker

Well-Known Member
Member
Joined
Mar 28, 2016
Messages
440
Trophies
0
Age
42
XP
1,689
Country
Maybe you should try another SD card?? I have a 2GB card that I always use for vwii, and it's working perfectly on pc as well...I tried to use it yesterday with the wii u HBL, but it didn't work at all, and I got a similar error message about not being able to open HBL...
See my edit, I fixed it by rebooting the Wii U and trying gain.
 

TheCyberQuake

Certified Geek
OP
Member
Joined
Dec 2, 2014
Messages
5,012
Trophies
1
Age
28
Location
Las Vegas, Nevada
XP
4,432
Country
United States
hello anybody here?
Sorry, I've been busy. After having my code being completey shat on yesterday by wii u devs I decided to try to "clean up" my code. No thanks to them, because even when I asked for help stating I was new to python they still offered no advice or tips. Instead I got a PM from someone with actual help and guidance.
Anyway, try this new version and see what happens.
https://mega.nz/#!lJlEjSSI!eP1DhmmqsSgMdCdgHaHGBF5o4PFh2b28kVSA8bEajnY

Maybe if Wii U devs would actually help guide new coders instead of just insult them, we would have more devs for the Wii U.
ce2.png
 
Last edited by TheCyberQuake,

pietempgba

Well-Known Member
Member
Joined
Jun 9, 2016
Messages
1,049
Trophies
0
XP
1,515
Country
United States
Capture5.PNG
Sorry, I've been busy. After having my code being completey shat on yesterday by wii u devs I decided to try to "clean up" my code. No thanks to them, because even when I asked for help stating I was new to python they still offered no advice or tips. Instead I got a PM from someone with actual help and guidance.
Anyway, try this new version and see what happens.
https://mega.nz/#!cc0AxSYA!LJbaIY2iYf8q1Fo4sv-ymSba49xnLt6bZwvH8lHJ1ko

Maybe if Wii U devs would actually help guide new coders instead of just insult them, we would have more devs for the Wii U.
ce2.png
also while your still there what's modified in your cfw

--------------------- MERGED ---------------------------
 
Last edited by pietempgba,

TheCyberQuake

Certified Geek
OP
Member
Joined
Dec 2, 2014
Messages
5,012
Trophies
1
Age
28
Location
Las Vegas, Nevada
XP
4,432
Country
United States
also while your still there what's modified in your cfw
The only thing modified is where fw.img tries to find itself, i.e. changing it's location. Maybe it's been changed in newer versions, but fw.img needs to be modified if you want to change where it is on the SD card. If you don't, you'll end up originally booting into fw.img, but then with a soft reset (entering and exiting system settings) it will try to reload fw.img from the original location, which is the root of the SD. Which means unless that was updated, users trying to launch fw.img from different locations other than root will not be able to soft reset back into it, at least from my testing it won't
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    The Real Jdbye @ The Real Jdbye: ballcock