How to compile and install arm9loaderhax

Discussion in '3DS - Tutorials' started by lefthandsword, Feb 21, 2016.

Feb 21, 2016
  1. lefthandsword
    OP

    Member lefthandsword GBAtemp Regular

    Joined:
    Apr 6, 2015
    Messages:
    269
    Location:
    root
    Country:
    Hong Kong
    This guide is probably obsolete, use this instead. Just drag your otp.bin to your browser window and it will compile it for you, I'm leaving the original guide below for those who likes to DIY.

    Original post:

    Hopefully this guide should silence the whiners:P

    Before we begin I have to say this is my very first guide that I made from my experience and information from other Temp members, and English isn't my primary language so I might make mistakes. If you find any just tell me and I'll try my best to correct them. (The screenshot in the spoiler was taken in OS X with wineskin because I'm lazy, this guide is for Windows only)

    So you just dumped your OTP and wondering how do you compile A9LH for your 3DS? Here's a guide to instruct you how to compile and install the payload on your device. This guide assumes you know the basics of 3DS homebrew and Windows command prompt,and just stay away from this if you don't - menuhax is good enough for most people IMO. (I am serious)

    DISCLAIMER: Any modifications to your 3DS are done at your own risk. I am not responsible for any bricks that may occur during this process (use your common sense and read the guide carefully)

    0. Requirements:
    1. Preparation
    1. If you have an existing install of Python 3.x/32-bit 2.7.x, remove it first
    2. Install Python 2.7 x86-64, make sure you install "add python.exe to patch" sub feature during installation (it's not set by default)
      Warning: Spoilers inside!
    3. Install PyCrypto
    4. Install devkitPro 1.6.0, you will be be presented with tons of packages but the only ones we're interested are under devkitARM, simply uncheck everything else.
      Warning: Spoilers inside!
    5. Install Make, you should download the file with md5:8ae51379d1f3eef8360df4e674f17d6d
    2. Compile A9LH
    1. Extract the A9LH source to any directory
    2. Copy your OTP.bin to the data_input folder and overwrite the one that's included with the zip file
    3. Open a CMD window (Shift+right click on the explorer window or cd into it manually)at the root directory of the source files, type "make" (without quotes) and enter.
    4. Wait for a minute or so, a data_output folder will appear and there should be no errors
    5. Copy the arm9loaderhax.3dsx file from the newly created folder to /3ds/ on your SD card (the installer is built specifically for the 3DS you dumped its OTP from, if you want to install A9LH on more than one 3DS you will to recompile the payload with their respective OTP.bin files)
    3.1 Installing A9LH
    1. Ensure you have a dump of your SysNAND before you continue
    2. Enter hblauncher using an entry point of your choice
    3. Run arm9loaderhax.3dsx (see below if you're stuck on "exploiting arm9")
    4. The payload will be installed to your NAND and your 3DS will then be rebooted to black screens afterwards. Don't panic, turn off your 3DS
    3.2 "exploiting arm9" workaround (required for n3DS, not sure about o3DS)
    1. Download and copy the miniPasta 3dsx to your SD card
    2. Run miniPasta, the screen will turn black for a few seconds and you will be kicked back to home menu afterwards
    3. Re-enter hblauncher and try running the A9LH installer again
    4. Testing the payload + conclusion
    There's a test binary (forgot who made it) that will power off your 3DS upon pressing any buttons except ZL, ZR or home. Simply copy it to the root of your SD card, wait for a couple seconds and press a button. If your 3DS powers off, then A9LH is successfully installed and woking correctly (congrats:grog:). If your 3DS powers off the moment you turn it on, check if the file is named "arm9loaderhax.bin" and placed in the root directory, if it power led stay on and won't respond to button pressed then your 3DS is probably bricked :(
    If you want a cold boot (permanent) CFW (the reason to get A9LH in the first place), check out @Aurora Wright's ReiNand fork. She already documented it very well so I'm not going through it in this thread

    FAQ
    Q: I'm getting "python: command not found"
    A: Make sure you select "add python.exe to path" during installation, alternatively you can set the PATH variable manually by entering this in cmd (Thanks @Kever)
    Code:
    set PATH=C:\Python27;%PATH%
    Q: How to uninstall A9LH?[/SIZE][/SIZE]
    A: Restore a sysNAND backup made before running arm9loaderhax.3dsx
     
    Last edited by lefthandsword, Mar 6, 2016
    Sheep64, dollerbill, stl25 and 29 others like this.


  2. Misledz

    Member Misledz GBAtemp Advanced Fan

    Joined:
    Sep 3, 2015
    Messages:
    865
    Country:
    Philippines
    It's a crazy adventure I tell you, 6-7GB of NAND dumps for a 256 byte file.
     
  3. Wolfvak

    Member Wolfvak Wahoo!

    Joined:
    Oct 25, 2015
    Messages:
    696
    Location:
    Mira-Mira
    Country:
    Uruguay
  4. SomeGamer

    Member SomeGamer GBAtemp Guru

    Joined:
    Dec 19, 2014
    Messages:
    5,437
    Country:
    Hungary
    AFAIK it's an universal installer.
     
  5. Wolfvak

    Member Wolfvak Wahoo!

    Joined:
    Oct 25, 2015
    Messages:
    696
    Location:
    Mira-Mira
    Country:
    Uruguay
    Well if x86 builds work then he should link PyCrypto for 32bits as well

    Besides, there's that ^
     
    Last edited by Wolfvak, Feb 21, 2016
    SomeGamer likes this.
  6. jon2491

    Member jon2491 GBAtemp Regular

    Joined:
    Dec 14, 2014
    Messages:
    141
    Country:
    Spain
    Followed your tutorial, and when I make it prints stuffs and at the end:
    make[1]: Leaving directory `/c/Users/xxx/Desktop/compilar/arm9loaderhax-master/payload_stage1'
    8+1 records in
    8+1 records out
    4168 bytes (4.2 kB) copied, 0.004 seconds, 1.0 MB/s
    FIRM0 done!
    FIRM1 done!
    make: python: Command not found
    make: *** [sector] Error 127

    firm0.bin and firm1.bin are created but I guess something isn't right.
     
  7. shaneod

    Member shaneod GBAtemp Fan

    Joined:
    Mar 3, 2011
    Messages:
    336
    Country:
    Ireland
    Did you add C:/Python27 to your PATH?
     
  8. jon2491

    Member jon2491 GBAtemp Regular

    Joined:
    Dec 14, 2014
    Messages:
    141
    Country:
    Spain
    Nope, that should be added to the tutorial.
    edit: added, now seems to work.
     
    Last edited by jon2491, Feb 21, 2016
  9. VaiCorunthians

    Member VaiCorunthians GBAtemp Fan

    Joined:
    Oct 7, 2014
    Messages:
    448
    Country:
    Brazil
    The crucial point!
     
    Last edited by VaiCorunthians, Feb 21, 2016
  10. Urbanshadow

    Member Urbanshadow GBAtemp Maniac

    Joined:
    Oct 16, 2015
    Messages:
    1,201
    Country:
    Spain
    I volunteer to compile people's arm9loaderhax. I already compiled like five different arm9loaderhax, all working, to different users. I only need the otp.bin file.
     
  11. jon2491

    Member jon2491 GBAtemp Regular

    Joined:
    Dec 14, 2014
    Messages:
    141
    Country:
    Spain
    Sending you PM, paisano :)
     
  12. HenryLeonheart

    Member HenryLeonheart GBAtemp Regular

    Joined:
    Apr 10, 2014
    Messages:
    145
    Country:
    Portugal
    I volunteer as well.
     
  13. AkGBA

    Member AkGBA GBAtemp Regular

    Joined:
    Feb 14, 2007
    Messages:
    252
    Country:
    France
    Come on guys. Compile it yourselves, it's fun to do.
     
    CptPotato likes this.
  14. solsolis

    Member solsolis GBAtemp Regular

    Joined:
    Jan 9, 2016
    Messages:
    150
    Location:
    Outrealm
    Country:
    United States
    I'm trying to compile this on a windows box, but its giving me trouble. I'm not really familiar with windows at all so... I'm completely at loss with this compile error.
    Code:
    Traceback (most recent call last):
      File "common/sector_generator.py", line 1, in <module>
        from Crypto.Cipher import AES
      File "c:\Python27\lib\site-packages\Crypto\Cipher\AES.py", line 50, in <module
    >
        from Crypto.Cipher import _AES
    ImportError: DLL load failed: %1 is not a valid Win32 application.
    make: *** [sector] Error 1
    Anyone got some insight on this?
     
  15. Disharmony16

    Member Disharmony16 ~DooM-Master~

    Joined:
    Aug 31, 2015
    Messages:
    108
    Location:
    Troll Islands
    Country:
    United States
    can you tell me how you fix that?
     
  16. lefthandsword
    OP

    Member lefthandsword GBAtemp Regular

    Joined:
    Apr 6, 2015
    Messages:
    269
    Location:
    root
    Country:
    Hong Kong
    iirc PyCrypto requires VC redist 2008 and/or 2010 (not 100% sure since I'm writing this guide with Win10) installed in order to work properly.

    Someone else may have opinions better than mine
     
  17. solsolis

    Member solsolis GBAtemp Regular

    Joined:
    Jan 9, 2016
    Messages:
    150
    Location:
    Outrealm
    Country:
    United States
    Thanks, I'll check into that.

    EDIT:
    Seems I already had 2010 installed and installing 2008 didn't fix anything.
     
    Last edited by solsolis, Feb 21, 2016
    CWade3051 likes this.
  18. lefthandsword
    OP

    Member lefthandsword GBAtemp Regular

    Joined:
    Apr 6, 2015
    Messages:
    269
    Location:
    root
    Country:
    Hong Kong
    That's why I wrote this tutorial by collecting information shattered around GBATemp plus my own experiment then group them into one convenient thread, it's much safer this way compared to relying on someone else to do it for you because you can ensure the payload is compiled correctly for your own 3DS.
     
    VaiCorunthians likes this.
  19. DrCrygor07

    Member DrCrygor07 GBAtemp Advanced Maniac

    Joined:
    Sep 4, 2014
    Messages:
    1,599
    Country:
    Italy
    Good tutorial! Now we can say that the 3ds is more hacked than the psp. Anyway, if an update comes out, will I be able to install it without losing the exploit on the firm?
     
  20. VaiCorunthians

    Member VaiCorunthians GBAtemp Fan

    Joined:
    Oct 7, 2014
    Messages:
    448
    Country:
    Brazil
    learn is better. I needed help to compile it (somebody compiled it to me), but I'm trying compile another one, it myself.. to (maybe) help any friends.. :ha:

    (I'm getting error with "make: python: Comand not found") later I will try solve it..

    erro python comand.png
     

Share This Page