Tutorial  Updated

How to compile and install arm9loaderhax

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)
    python_windows_installation_customize_python.jpg
  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.
    tutorial copy.png
  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,
Compiled A9LH successfully and all that, moved the 3dsx to my ./3DS/ root and put the sd back in and ran it.
the 3dsx apparently installed successfully and then shut off my 3DS. (didn't stucked or showed errors.)

Now this happens:
N3DS with sdcard: only blue LED flashes shortly on, then goes off.
N3DS w/o sdcard: blue LED stays on, black screen, nothing else.

Did I brick? :(
 
Compiled A9LH successfully and all that, moved the 3dsx to my ./3DS/ root and put the sd back in and ran it.
the 3dsx apparently installed successfully and then shut off my 3DS. (didn't stucked or showed errors.)

Now this happens:
N3DS with sdcard: only blue LED flashes shortly on, then goes off.
N3DS w/o sdcard: blue LED stays on, black screen, nothing else.

Did I brick? :(

May I ask how exactly you compiled? I'm actually having issues with that step at the moment, "make" command does nothing.
 
May I ask how exactly you compiled? I'm actually having issues with that step at the moment, "make" command does nothing.

I had to download the zip 2 times, also be sure to use winrar to extract and don't copy-paste from zip into a folder, so it won't fuck up the makefiles, then just run "make" in the root folder of the sources, as in a path like "G:\Workspace\3DS\A9LH\arm9loaderhax-master\arm9loaderhax-master"
And be sure you have "make" installed! (it's in the requirements @ #1 post)

And NEVERMIND about the brick, I panicked at the last step, I just forgot about the arm9loaderhax.bin :wacko:
Works, took me 6 hours but finally. :lol:
 
So I am working on getting this compiled and I can't quite seem to get the make process to work.

Every time I try and run the make command I get an error saying that make is not a recognized command (even though I have added it to my paths) and even when it does continue, I am met with the following error: make: *** [firm0] Error 1

Anyone have any thoughts?
 
Compiled A9LH successfully and all that, moved the 3dsx to my ./3DS/ root and put the sd back in and ran it.
the 3dsx apparently installed successfully and then shut off my 3DS. (didn't stucked or showed errors.)

Now this happens:
N3DS with sdcard: only blue LED flashes shortly on, then goes off.
N3DS w/o sdcard: blue LED stays on, black screen, nothing else.

Did I brick? :(


I don't think you've bricked it (I have a bricked n3ds, because of a9lh, and led stay always on, whatever I do)

Just use it: https://gbatemp.net/threads/arm9loader-technical-details-and-discussion.408537/page-82
If a button is pressed, the 3ds will shut down, and that mean it's not bricked
 
Anyone have any thoughts?

I think either you didn't install devkitpro or path enviroment correctly.

Also make sure you have Python and PyCrypto installed.

Example Compile-Enviroment (you can batch it up)
Code:
set path=%path%;C:\devkitPro\devkitPPC\bin;c:\devkitPro\devkitARM\bin;c:\devkitPro\devkitPSP\bin;C:\devkitPro\msys\bin;C:\python
set DEVKITARM=/C/devkitPro/devkitARM
set DEVKITPPC=/C/devkitPro/devkitPPC
set DEVKITPRO=/C/devkitPro
cmd
 
I think either you didn't install devkitpro or path enviroment correctly.

Also make sure you have Python and PyCrypto installed.

Example Compile-Enviroment (you can batch it up)
Code:
set path=%path%;C:\devkitPro\devkitPPC\bin;c:\devkitPro\devkitARM\bin;c:\devkitPro\devkitPSP\bin;C:\devkitPro\msys\bin;C:\python
set DEVKITARM=/C/devkitPro/devkitARM
set DEVKITPPC=/C/devkitPro/devkitPPC
set DEVKITPRO=/C/devkitPro
cmd

I will give that a try when I get home and let you know. Thanks!
 
Hey all,

Man, been a minute since I signed in on here, huh? Anyways little bit of background: no stranger to modding in general (have been breaking open and bricking systems for over a decade now) and have done a good amount of 3DS stuff here and there, as well as created several video tutorials. Never done OTP. Also well versed enough in CMD to get by due to class/work/modding.

So I've successfully dumped my OTP however the problem I'm having now is compiling my A9LH. I've downloaded all the files listed and have the exact ones needed (the exact same build and x86-64 of Python, exact file needed for Pycrypto, MD5 verified my Make installer) however no matter what I do when running the "make" command I get:

View attachment 41386

So it looks like Windows doesn't know how to handle the "make" command on its own, because what I had to do was put the make.exe installed file in the same directory as well as the 2 DLLs it comes with just in case. Without doing that I don't even get the error.

What I've Tried:
- Copying installed Make files into directory and running from there
- Changing the Python part in Makefile to the specific Python directory installed
- Run this all in the DevKitARM folder
- Run this all in the arm9loaderhax source folder
- Verify that PATH is set properly and is pointing to the Python folder

However even with this understanding I don't think even doing something like setting Make in the path would help, as I said I directly used the exe that it installed and even when that is executed I get an Error 1 for firm0.

Anyone have any ideas on this? Theoretically, as shown in the guide, I should just need to install everything and then open up a CMD window to my A9LH working folder and run "make" but not only that does not work, but it also does not make any sense as to why that would work.
Hey, I got that error too. Never quite got it to work - I ended up using this script to compile - but try installing all the packages from devKitPro (not just devKitARM) and then trying just "make". Also, in the root directory makefile, at the top, change "python = python" into "python = C:/Python27/python.exe" or wherever you installed python.
 
So reporting back in, I managed to get the code to compile finally, and I am loving the <15 second boot times for Emunand.
 
I got: blah blah blah...
Code:
8+1 records out
4168 bytes (4.2 kB) copied, 0 seconds, Infinity B/s
FIRM0 done!
FIRM1 done!
Traceback (most recent call last):
  File "common/sector_generator.py", line 1, in <module>
    from Crypto.Cipher import AES
  File "c:\Python27\lib\Crypto\Cipher\AES.py", line 50, in <module>
    from Crypto.Cipher import _AES
ImportError: cannot import name _AES
make: *** [sector] Error 1
Are you sure that you have pycrypto? For me it work (on linux :P).
 
I've set everything up and when i type "make" it gives me this error:


Code:
C:\Users\Faolan\Desktop\arm9loaderhax-master>make
make[1]: Entering directory `/c/Users/Faolan/Desktop/arm9loaderhax-master/payloa
d_stage1'
linking payload_stage1.elf
built ... payload_stage1.bin
make[1]: Leaving directory `/c/Users/Faolan/Desktop/arm9loaderhax-master/payload
_stage1'
8+1 records in
8+1 records out
4168 bytes (4.2 kB) copied, 0 seconds, Infinity B/s
FIRM0 done!
FIRM1 done!
286814750876512408074908484702473903860
SECTOR done!
make -C screen_init
make[1]: Entering directory `C:/Users/Faolan/Desktop/arm9loaderhax-master/screen
_init'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `C:/Users/Faolan/Desktop/arm9loaderhax-master/screen_
init'
make[1]: Entering directory `C:/Users/Faolan/Desktop/arm9loaderhax-master/payloa
d_stage2'
makefile:9: /c/devkitPro/devkitARM/ds_rules: No such file or directory
make[1]: *** No rule to make target `/c/devkitPro/devkitARM/ds_rules'.  Stop.
make[1]: Leaving directory `C:/Users/Faolan/Desktop/arm9loaderhax-master/payload
_stage2'
make: *** [stage2] Error 2

C:\Users\Faolan\Desktop\arm9loaderhax-master>

I've never compiled anything before, but I've got through about 5 errors over a few hours but I can't figure this one out.
 
Last edited by Faolan,
Ok, how would I update a9lh? I can not seem to figure that one out, booting into a 9.2 emu where D9 works does not let the installer work. Then if I launch miniPasta it just hangs.

Edit: Got it to work.
 
Last edited by gudenau,

Site & Scene News

Popular threads in this forum