That would be a neat tool. If you don't mind sharing I'd like to check it out sometime.
Sorry for the delay. Here the binary to use on a Pi2 or 3 :
https://www.dropbox.com/s/dgck6rflma155we/RasPS3_b3_Pi2-3?dl=1
Rename it "RasPS3".
If you want to play with the source code (very uggly, unpolished, not optimized, etc... it is as I left it two years ago) :
https://www.dropbox.com/s/sbad1b23tlnf6ku/rpi-tsop48-nand-b3.c?dl=0
Feel free to do what you want with that. I don't planed to do whatever else.
First of all be warned:
- it's a POC
- it as never been tested yet by me on a PS3 mainboard. Only tested on a naked unsoldered NAND chip. So,
use at your own risk. Better to test it on an YLODed console.
- it performs only basic operations : read chip ID, read/program page(s), erase block(s).
- it may be buggy
How to:
Code:
usage: sudo ./RasPS3 <delay> <command> ...
<delay> used to slow down operations (50 should work, increase if bad reads)
Commands:
read_id (no arguments) : read and decrypt chip ID
read_full <page #> <# of pages> <output file> : read N pages including spare
read_data <page #> <# of pages> <output file> : read N pages, discard spare
write_full <page #> <# of pages> <input file> : write N pages, including spare
write_data <page #> <# of pages> <input file> : write N pages, discard spare
erase_blocks <block number> <# of blocks> : erase N blocks
Notes:
This program assumes PAGE_SIZE == 2112
Run as root (sudo) required (for /dev/mem access)
As you can see you'll have to give some arguments like page number, block number.... it may be a little bit complicated. So i'll give you the basic sequence to dump then write a complete PS3 nand:
Note, you must remember two important numbers: the retail PS3 NAND's have
1024 blocks,
65536 pages
1- Read the chip ID data :
ensure the nand is correctly identified.
2- Dump the full NAND content:
Code:
sudo ./RasPS3 50 read_full 0 65536 yourdumpfile.bin
note: you may have a couple of "Page failed to read correctly! retrying" message. It's not an issue to have some of them. If you have too many failed, try increasing the delay parameter.
3- Erase the full NAND content:
It is mandatory before to write as the write command only set the '1' bits to '0'. So, all the bits must be set to '1' first (set all bytes to 0xFF) using the erase command.
Code:
sudo ./RasPS3 50 erase_blocks 0 1024
note: you may have some "Failed to erase block correctly! retrying" followed by "Too many retries. Perhaps bad block?". it's normal if your nand has some physical bad blocks.
4- Write the full NAND content.
Code:
sudo ./RasPS3 50 write_full 0 65536 yourdumpfile.bin
That's it. Enjoy
Edit :
@lord3490 you tested it some years ago. Maybe you could say a few words for the community
