Welcome! Log In Create A New Profile

Advanced

Problems trying to read from NAND.

Posted by DementedHacker 
Problems trying to read from NAND.
August 30, 2010 03:54PM
Hey all. I'm currently trying to write a software library which allows unrestricted access to the NAND filesystem for things like import/export of saves and other things. Unfortunately, I seem to have hit a snag - I can't get the NAND to return any data.

I've attached code for a test program, which is supposed to read the first page in the NAND and output the first 16 bytes. The low level read-write code is based on (or rather, stolen from,) MINI's i/o code and other information I've found online. But no matter what I try, I always get the same output:

AES Key: (aes key here)
HMAC Key: (hmac key here)

NAND_Reset()
NAND_SendCommand(ff, 0, 8000, 0) -> 80ff0000
NAND: Error on wait
NAND_SendCommand(0, 1f, 0, 0) -> 9f000000
NAND: Error on wait
DMA to 0x80224700: address 80224700
DMA to 0x80224f80: address 80224f80
NAND_SendCommand(30, 0, 4000b000, 840) -> c030b840
First 0x10 bytes: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Done

I'm guessing the errors are the source of my woes, but I'm not sure what to do. Also, the program won't close itself and return to the loader, meaning I have to unplug the Wii. Any suggestions?

Here's what I have so far: http://www.mediafire.com/?z2hd6453wadoitt
Re: Problems trying to read from NAND.
August 30, 2010 04:26PM
Make sure the IOS you're running in the background has NAND permissions.
Re: Problems trying to read from NAND.
August 30, 2010 05:45PM
I'm afraid that's no help to me, since I'm bypassing the IOS and manipulating the registers directly from Broadway. I know I have AHBPROT enabled, since I managed to get the keys from the OTP in the same way, (plus there's a piece of code in the program that checks AHBPROT on startup).
Re: Problems trying to read from NAND.
September 10, 2010 07:17AM
I think, you should come to it from another side.
Instead of creating your own code to access NAND, you may patch IOS you are running in memory to remove NAND access restriction. After that you will be able to read/write any file you want using standard ISFS IOS calls.
Sorry, only registered users may post in this forum.

Click here to login