Building iosuhax on windows

Discussion in 'Wii U - Tutorials' started by FIX94, Nov 1, 2016.

Nov 1, 2016

Building iosuhax on windows by FIX94 at 9:09 PM (31,117 Views / 31 Likes) 193 replies

  1. FIX94
    OP

    Global Moderator FIX94 Global Moderator

    Joined:
    Dec 3, 2009
    Messages:
    6,748
    Location:
    ???
    Country:
    Germany
    In this tutorial I will go over how to build iosuhax from either my branch (for wupserver only) or dimoks branch (for rednand and signature patches) without having anything related installed yet.

    Getting python
    The first thing you want to do is download python, for this guide you will click download python 3.5, this will give you the current 3.5 32bit installer of python. If you already have a python 2 installation and you dont want to uninstall for python 3 then skip this step but note that you may have to add the python installation path into the PATH variable yourself if you didnt do that during that installation.
    After opening the 3.5 32bit installer make sure to enable "Add Python 3.5 to PATH" because we want to be able to call python from anywhere, now let it install.

    Installing pycrypto
    To easly install pycrypto we will install it from this github page for the current 3.5 or this page for 2.7 if you have that. Open up a command prompt by for example pressing windows+r and typing in "cmd", in this command prompt you want to enter the following (just copy paste this depending on your python version):
    Warning: Spoilers inside!
    This will automatically install pycrypto for your python version, just let it finish up.

    Getting devkitARM
    Download the devkitpro updater from here and start it up, it will give you quite a few options on things to install, all you need to select is "Minimal System" and "devkitARM", you can uncheck everything else. Now just let it download and install everything.

    Getting armips
    For armips you can just download my pre-compiled exe and put it into "C:\devkitPro\msys\bin" so it can be directly used on compilation.

    Downloading and preparing iosuhax
    Depending on what you want head over to my branch or dimoks branch, click on "Clone or download" and if you have git then clone it, if you dont have git just click "Download ZIP" and extract the contents of it into a new folder on your computer. Make sure that new full folder path does not contain any spaces, a wrong path would be "C:\my folder\iosuhax", a correct folder would be "C:\my_folder\iosuhax".

    Now if you have "the 2 keys" already you can edit the getfwimg from the little guide below:
    Warning: Spoilers inside!
    If you dont have "those 2 keys" you can easly get them from your wiiu itself like this without having to edit any scripts:
    Warning: Spoilers inside!

    Now that you finally prepared iosuhax its time to compile it! Shift-right click in the iosuhax main folder, click on "Open command window here" and just type in "make" and press enter, this will get you a fw.img as output which you can put on you sd card root and use in cfw booter! If it failed to compile because of commands being unknown you may have to reboot your computer to make sure it properly installed all of the software.

    I hope with this you were able to successfully compile iosuhax, now have fun with it :)

    Note by Cyan:
    Dimok branch can now build both CFW with and without NAND redirection to SD card, while Fix94 branch only compile a SysNAND CFW.

    Fix94 branch : sysNAND. doesn't have latest cfw patches, but fix94 version contain new wupserver command instead.
    Dimok branch : sysNAND and redNAND. This branch has currently more features than fix94 branch (allows HBL channel version installation, unrestricted NAND FTP access, NAND to SD dump, FAT32 USB mount support, etc.)

    When you are at the compiling step,
    fix94 sysNAND, type : make
    dimok sysNAND, type : make cfw
    dimok redNAND, type : make redNAND
    by default, typing only "make" on dimok branch, it will build redNAND
     
    Last edited by Cyan, Dec 4, 2016 - Reason: Added new compile steps and differences between Fix94 and Dimok branches.
    Deniii, Pachee, XanLoves and 28 others like this.


  2. Giodude

    Member Giodude Ruler of Italy

    Joined:
    May 17, 2015
    Messages:
    2,604
    Location:
    New York
    Country:
    United States
    thanks! I couldnt for the life of me figure out what i was doing wrong. Now for that damn iv......
     
  3. RandomUser

    Member RandomUser What has gotten into you Rosie?

    Joined:
    May 9, 2010
    Messages:
    444
    Country:
    United States
    Is it normal to get an error?
    Code:
    Traceback (most recent call last):
      File "scripts/anpack.py", line 222, in <module>
      fw.write(open(output_fn, "w+b"))
      File "scripts/anpack.py", line 148, in write
      hash = self.encrypt(file, 0x200)
      File "scripts/anpack.py", line 175, in encrypt
      buffer += enc
    TypeError: Can't convert 'bytes' object to str implicitly
    make: *** [fw.img] Error 1
    I do see that the fw.img is indeed in the root of the compilation folder.
     
  4. x65943

    Member x65943 Hobby Artist

    Joined:
    Jun 23, 2014
    Messages:
    2,248
    Location:
    Indiana
    Country:
    United States
    I didn't get an error. Are you sure you input the correct iv and key in anpack.py? Can I have a screenshot of your command prompt?
    [​IMG]
     
  5. eric_ruas

    Newcomer eric_ruas Newbie

    Joined:
    Nov 1, 2016
    Messages:
    5
    Country:
    United States
    I'm getting an error when compiling from either fix94 or dimok's branch. I'm running Windows 10 x64:


    make[1]: Entering directory `/c/Users/nicol/Documents/iosuhax-master/wupserver'
    make[1]: mkdir: Command not found
    make[1]: *** [dirs] Error 127
    make[1]: Leaving directory `/c/Users/nicol/Documents/iosuhax-master/wupserver'
    make: *** [wupserver/wupserver.bin] Error 2

    Did you use Cygwin or anything similar to properly process the makefile?
     
  6. FIX94
    OP

    Global Moderator FIX94 Global Moderator

    Joined:
    Dec 3, 2009
    Messages:
    6,748
    Location:
    ???
    Country:
    Germany
    commands like mkdir are included in the devkitpro installation (its in C:\devkitPro\msys\bin) so you possibly did not check the tickmarks I wrote in that guide to check.
     
  7. VinLark

    Member VinLark Check this 5

    Joined:
    Jun 11, 2016
    Messages:
    3,543
    Location:
    4chan and other wonders of the internet
    Country:
    United States
    Damn. Can't seem to find the iv key. Is it the vWii common key because that's all I see when I look for it.
     
  8. x65943

    Member x65943 Hobby Artist

    Joined:
    Jun 23, 2014
    Messages:
    2,248
    Location:
    Indiana
    Country:
    United States
    It's not vwii common key. It's kind of hard to find. If you have found any precompiled fw.imgs around the net it will already have a modified scripts/anpack.py which you can get the iv out of.
     
  9. RandomUser

    Member RandomUser What has gotten into you Rosie?

    Joined:
    May 9, 2010
    Messages:
    444
    Country:
    United States
    Okay, I got it to compile without any errors. It looks exactly like your screenshot, except different file location. What happened was, when I downloaded the updated dimok git repo, I forgot to input the keys for the newly downloaded repo.
     
    x65943 likes this.
  10. alecocr20

    Newcomer alecocr20 Newbie

    Joined:
    Jul 21, 2016
    Messages:
    7
    Country:
    Canada
    Hello,

    I'm trying to build it but "make" doesn't exist.
    What do you guys use cygwin or MiniGW or anything else ?

    Thanks in advance
     
  11. VinLark

    Member VinLark Check this 5

    Joined:
    Jun 11, 2016
    Messages:
    3,543
    Location:
    4chan and other wonders of the internet
    Country:
    United States
    I use cygwin, but have you installed Python 3.5 to PATH?
     
  12. alecocr20

    Newcomer alecocr20 Newbie

    Joined:
    Jul 21, 2016
    Messages:
    7
    Country:
    Canada
    Yes python is in the PATH, I can run python scripts in cmd without issues
     
  13. RandomUser

    Member RandomUser What has gotten into you Rosie?

    Joined:
    May 9, 2010
    Messages:
    444
    Country:
    United States
    Don't need to use Cygwin or MingGW. You use Windows built in command prompt. You need Devkitpro v1.6.0, then choose FULL download and install.
     
  14. soulkyo

    Newcomer soulkyo Member

    Joined:
    Nov 3, 2013
    Messages:
    36
    Country:
    Peru
    Sorry for the question. I installed Python in the PATH but keep getting a " make is not recognized as an internal or external command...." I installed devkit pro only selecting "Minimal System" and "devkitARM". That could be the problem?
     
  15. FIX94
    OP

    Global Moderator FIX94 Global Moderator

    Joined:
    Dec 3, 2009
    Messages:
    6,748
    Location:
    ???
    Country:
    Germany
    minimal system should add it in, you may just want to reboot your pc if it did not refresh the environment variables automatically.
     
    soulkyo likes this.
  16. eric_ruas

    Newcomer eric_ruas Newbie

    Joined:
    Nov 1, 2016
    Messages:
    5
    Country:
    United States
    So I did check "Minimal System" and "devkitARM". CMD is able of locating mkdir inside the directory that you've mentioned

    where mkdir - C:\devkitPro\msys\bin\mkdir.exe

    C:\devkitPro\msys\bin;C:\devkitPro\devkitARM\bin are the first directories in my system PATH. Any other clues as to why make is not reaching mkdir?
     
  17. RandomUser

    Member RandomUser What has gotten into you Rosie?

    Joined:
    May 9, 2010
    Messages:
    444
    Country:
    United States
    I think it's best to select "Full" install. so that way you will have everything you will ever need.
     
    Last edited by RandomUser, Nov 2, 2016
    VinLark likes this.
  18. FIX94
    OP

    Global Moderator FIX94 Global Moderator

    Joined:
    Dec 3, 2009
    Messages:
    6,748
    Location:
    ???
    Country:
    Germany
    Do you happen to maybe have other software which includes commands such as "make" already? those might cause problems in this case and have to be taken out of your PATH variable/uninstalled.
     
  19. sup3rgh0st

    Member sup3rgh0st Top Tier Ghost

    Joined:
    Apr 22, 2010
    Messages:
    247
    Country:
    United States
    When building using the makefile, it runs fine until it says "make[1]: Entering directory `/d/My Documents/GitHub/dimokiosu/ios_fs'" and it spits out "error: Documents/GitHub/dimokiosu/ios_fs/libs: No such file or directory". The directory exists, is there something that's supposed to be there that's not? [screenshot]
     
  20. FIX94
    OP

    Global Moderator FIX94 Global Moderator

    Joined:
    Dec 3, 2009
    Messages:
    6,748
    Location:
    ???
    Country:
    Germany
    that path has a space in it so that'll mess it up, put iosuhax directly on a drive root or something to prevent that error.
     
    sup3rgh0st and x65943 like this.

Share This Page