Homebrew [Release] [Multi-platform GUI] HiyaCFW Helper

mondul

Well-Known Member
OP
Member
Joined
Aug 8, 2018
Messages
115
Trophies
0
Age
38
Location
Barranquilla
XP
767
Country
Colombia
In order to make things easier for me, and because I don't have Windows, I edited the HiyaCFW Helper Python script by @jerbear64 and LmN in order to add a graphical user interface to it.
What it does:
  • Allows you to browse for your NAND backup, no need to place it at the same folder.
  • Shows the option to choose the output destination, which should be a (preferably empty) FAT formatted SD card or any other folder.
  • Downloads the latest HiyaCFW release and decompress it.
  • Autodetects the console region from the NAND dump, downloads and decrypts its v512 launcher.
  • Creates the patched 00000002.app and bootloader.nds for the custom firmware.
  • Uses your platform's twltool (binaries for Linux and MacOS included) to decrypt the NAND.
  • Extracts the decrypted NAND to the chosen output destination.
  • Installs the HiyaCFW and the patched files on the the chosen output destination.
  • (Optional) installs the latest release of TWiLightMenu++ on the the chosen output destination.

NAND mode:
Clicking on the integrated circuit button will give you a NAND mode, where you can remove the No$GBA footer or add it.

Requirements:
Windows:
  • None, everything needed is included in the release archive.
Linux:
  • Python 3.5 or greater with the Tk library (I had to do sudo apt-get install python3-tk -y in my Ubuntu virtual machine; sudo dnf install python3-tkinter in Fedora, sudo pacman -S tk in Arch Linux). You might need to install the Python 3 distutils package also.
MacOS:
  • Python 3.5 or greater, you can install it with one of these options:
    • [Recommended] Homebrew (install homebrew by running /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" in a terminal window, then brew install python).
    • [Might have issues] The latest installer from the python.org releases page (3.8.0 at the time of this writing). NOTE: Using this option you might need to go to Applications > Python 3.<version> and run Install Certificates.command. This will avoid the "Could not get HiyaCFW" error.

What it includes:
  • 7za binaries for Windows, Linux and MacOS. It's used to decompress the HiyaCFW latest release as @Robz8 uploaded it as a 7z archive. Compiled from the LZMA SDK available from the kornelski's GitHub repo.
  • twltool binaries for Linux and MacOS. Compiled from the WinterMute's GitHub repo. For Windows the twltool included with HiyaCFW is used.
  • NDS bootloader creator binaries for Linux and MacOS (based off devkitPro's ndstool v1.27). Compiled from my GitHub repo. For Windows the ndstool included with HiyaCFW is used.
  • fatcat binaries for Windows, Linux and MacOS. Compiled from the Gregwar's GitHub repo.

How to use it:
Windows:
  • Go to the helper's folder.
  • Double-click on the HiyaCFW_Helper.exe file.
Linux:
  • Open a terminal.
  • cd to the helper's folder (cd ~/Downloads/HiyaCFW-Helper or whatever).
  • Run ./HiyaCFW_Helper.py.
MacOS:
  • Open a Terminal (⌘+Space and write terminal).
  • cd to the helper's folder (cd ~/Downloads/HiyaCFW-Helper or whatever).
  • Run ./HiyaCFW_Helper.py.

Thanks to:

Download it from the GitHub repo releases page.
 
Last edited by mondul, , Reason: Updated to match GitHub's readme

mondul

Well-Known Member
OP
Member
Joined
Aug 8, 2018
Messages
115
Trophies
0
Age
38
Location
Barranquilla
XP
767
Country
Colombia
Plans for the future:
  • Choose the output folder. Done!
  • Have the option to integrate the latest release of DSiMenu++ on the output folder. Done!
  • Have an advanced section for those people with a hardmod where you can do NAND stuff like install/uninstall unlaunch. Done!
  • Translate the code for that tool written by WB3000 used to get the decrypted launcher files in order to download them from the CDN directly and decrypt them. Done!
  • Make the GUI prettier.
 
Last edited by mondul,

mondul

Well-Known Member
OP
Member
Joined
Aug 8, 2018
Messages
115
Trophies
0
Age
38
Location
Barranquilla
XP
767
Country
Colombia
On Windows, I keep getting an error about OSFMount needing to be installed, and it is installed on my computer. I also tried with OSFMount open, but still it didn't work.
Please tell me the location of the OSFMount program folder and if it has the dot com file in it
 

brunocar

Well-Known Member
Member
Joined
Aug 14, 2017
Messages
785
Trophies
0
Age
38
XP
1,621
Country
Argentina
I'm also having the same issue regarding it not recognizing OSFmount on windows, but mine is the same drive as OSFmount
 

mondul

Well-Known Member
OP
Member
Joined
Aug 8, 2018
Messages
115
Trophies
0
Age
38
Location
Barranquilla
XP
767
Country
Colombia
Uploaded version 2.1 with the option to install the latest TWiLightMenu++ release and changed the way OSFMount is recognized in Windows.

EDiT: Link
 
Last edited by mondul,

mondul

Well-Known Member
OP
Member
Joined
Aug 8, 2018
Messages
115
Trophies
0
Age
38
Location
Barranquilla
XP
767
Country
Colombia
Another new release!

v2.3 with a couple of bug fixes:
  • Some people were having problems due the log list box wasn't working correctly, so changed it to a thread-safe text box.
  • Got reports again about the helper not opening on 64-bit Windows because it was unable to find OSFMount. I was searching for the install path on the registry, but because the bundle was made with a 32-bit version of PyInstaller, it was not accesing the 64-bit registry but a 32-bit mirror. Tried to change the detection method fom registry to using the REG command, but still was running 32-bit hence it was unable to find the right keys. So, I had to limit the search scope to the Program Files folder. In other words, now the script requires that OSFMount must be installed at its default location (%PROGRAMFILES%\OSFMount)
Also I would like to note that the launcher decryption is much slower in MacOS and Linux because it's using the pyaes library, which is written entirely in Python. Windows uses PyCrypto so is (a lot) faster.

Link
 
  • Like
Reactions: Tarmfot

jerbear64

Well-Known Member
Member
Joined
Dec 10, 2011
Messages
304
Trophies
0
Age
23
XP
360
Country
United States
I'm getting this error when installing TWiLight Menu++ with this tool on Fedora 28:
Code:
Exception in thread Thread-17:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 804, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 757, in run
    self.__target(*self.__args, **self.__kwargs)
  File "HiyaCFW_Helper.py", line 700, in clean
    remove(self.files.pop())
OSError: [Errno 2] No such file or directory: 'BOOT_fc.NDS'
BOOT_fc.nds shows up in the helper folder itself rather than the out folder for whatever reason, causing this error.

The tool successfully does its job otherwise, producing a proper out folder as expected once the binaries in the Linux folder are set to executable. You might want to chown/chmod the out folder/files at the end, though- I can't delete them without using sudo otherwise.
 
  • Like
Reactions: NullByte and mondul

mondul

Well-Known Member
OP
Member
Joined
Aug 8, 2018
Messages
115
Trophies
0
Age
38
Location
Barranquilla
XP
767
Country
Colombia
I'm getting this error when installing TWiLight Menu++ with this tool on Fedora 28:
Code:
Exception in thread Thread-17:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 804, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 757, in run
    self.__target(*self.__args, **self.__kwargs)
  File "HiyaCFW_Helper.py", line 700, in clean
    remove(self.files.pop())
OSError: [Errno 2] No such file or directory: 'BOOT_fc.NDS'
BOOT_fc.nds shows up in the helper folder itself rather than the out folder for whatever reason, causing this error.

The tool successfully does its job otherwise, producing a proper out folder as expected once the binaries in the Linux folder are set to executable.
The BOOT_fc.NDS file is not needed by the generated output, that's why I'm deleting it, but I don't know why is not deleting it though the script is running with elevated priveleges. I have in mind updating the script to extract only the files it needs, I will need to check if the 7-Zip extractor I'm using has that feature.
You might want to chown/chmod the out folder/files at the end, though- I can't delete them without using sudo otherwise.
For the permissions, I'm thinking of something that will only require sudo when it's about to mount and unmount the NAND, though I will have to request the sudo password in the script at some point, I hope Linux users will be comfortable with that.
 
  • Like
Reactions: JSMastah

mondul

Well-Known Member
OP
Member
Joined
Aug 8, 2018
Messages
115
Trophies
0
Age
38
Location
Barranquilla
XP
767
Country
Colombia
Fifth release!

@Robz8 changed his GitHub username to RocketRobz and the repos URLs got changed. Updated the script to reflect that. Also changed the 7zDec binary for the full 7za tool in order to decompress only what is needed from the HiyaCFW and TWiLightMenu++ releases.

Link

@jerbear64 I was unable to make the chmod change because it removes the read-only status of the TWLCFG0.dat and TWLCFG1.dat files.
 

mondul

Well-Known Member
OP
Member
Joined
Aug 8, 2018
Messages
115
Trophies
0
Age
38
Location
Barranquilla
XP
767
Country
Colombia
Sixth Release!

Read-only permissions are now correctly set for TWLCFG0.dat and TWLCFG1.dat when installing TWiLightMenu++

@jerbear64 in Linux, now the out folder gets its owner changed to the one who opened the terminal, so you don't need to run sudo to delete the folder. Also, thanks again for your script which this one is based from.

Link
 

mondul

Well-Known Member
OP
Member
Joined
Aug 8, 2018
Messages
115
Trophies
0
Age
38
Location
Barranquilla
XP
767
Country
Colombia
Seventh Release!

Added NAND mode for those with a hardmod, just click on the integrated circuit icon to access it. Thanks again @Sha8q for the idea and @jerbear64 for including this helper script on the DSi guide site.

Link
 
Last edited by mondul,

RocketRobz

Stylish TWiLight Hero
Developer
Joined
Oct 1, 2010
Messages
15,272
Trophies
2
Age
23
XP
18,034
Country
United States
So it seems this isn't patching the launcher .app correctly.
Some users are reporting that the CFW patches aren't working.

For the patches to work, their .app should contain this MD5 checksum:
072FC5FD27A113A64760DE005EC62C1A
and this SHA1 checksum:
D21D569184B6ED8B21AD5882CE7DF2B7517AE34D
Both are for non-JAP users.

For JAP users, their .app should contain this MD5 checksum:
1CCADB86C3E33E66F9E15AB9F7BC860F
and this SHA1 checksum:
92A2C90AFB5F3E010F823C25F0EBEC7162181096
 

ChampionLeake

NTR/TWL Exploiter
Member
Joined
Jan 19, 2016
Messages
209
Trophies
0
Age
23
XP
650
Country
United States
So it seems this isn't patching the launcher .app correctly.
Some users are reporting that the CFW patches aren't working.

For the patches to work, their .app should contain this MD5 checksum:

and this SHA1 checksum:

Both are for non-JAP users.

For JAP users, their .app should contain this MD5 checksum:

and this SHA1 checksum:
It also seems that tons of users are now experiencing hangs on the hiyaCFW-Helper at "Downloading launcher....". No matter what version you use, it'll just freeze.
 

mondul

Well-Known Member
OP
Member
Joined
Aug 8, 2018
Messages
115
Trophies
0
Age
38
Location
Barranquilla
XP
767
Country
Colombia
So it seems this isn't patching the launcher .app correctly.
Some users are reporting that the CFW patches aren't working.
Maybe I'm not detecting the console region accurately, or maybe an additional patch is needed. If possible I'd like to have a dump from one of those consoles to check better. Also it would be nice if I can get in touch with the users having that issue in order to assist them directly.

It also seems that tons of users are now experiencing hangs on the hiyaCFW-Helper at "Downloading launcher....". No matter what version you use, it'll just freeze.
It could be the way I'm detecting the console region. By sunday I will release a Windows version with the console available to check for any errors.

Thanks for these reports, they help me to give you all a better helper.
 

edo9300

Well-Known Member
Member
Joined
Aug 19, 2018
Messages
102
Trophies
0
Age
22
XP
1,045
Country
Italy
Hmm i tried the helper, and it seemed to work, the only downside i found is that on windows you are forced to have osfmount installed to even start the app, i think it would be good to add teh possibility to make the user manually mount the image at runtime in case he doesn't want to install osfmount or, like me, is already using another tool to moint images and installing osfmount would just be redoundant
 

ChampionLeake

NTR/TWL Exploiter
Member
Joined
Jan 19, 2016
Messages
209
Trophies
0
Age
23
XP
650
Country
United States
Hmm i tried the helper, and it seemed to work, the only downside i found is that on windows you are forced to have osfmount installed to even start the app, i think it would be good to add teh possibility to make the user manually mount the image at runtime in case he doesn't want to install osfmount or, like me, is already using another tool to moint images and installing osfmount would just be redoundant
Not just that, some of us already have OSFMount installed already and seems o not want to run at all. From both osfmount 32/64 bit versions.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    KenniesNewName @ KenniesNewName: Belifu Dual Channel TENS EMS Unit 24 Modes Muscle Stimulator for Pain Relief Therapy, Electronic...