Changes

3,005 bytes removed ,  20:21, 9 December 2023
m
Line 1: Line 1: βˆ’
==Description==
+
'''/dev/flash''' provides a raw interface to the NAND flash memory to update [[boot1]] and test usable blocks. It was previously used by homebrew to get a raw NAND dump, although this was not very useful due to the keys being encrypted, which led to retail IOSes being binary patched to treat opening this device as opening a file.
βˆ’
/dev/flash provides a raw interface to the NAND flash memory. No file system permissions restrict the access to the NAND memory, however, the contents are encrypted.
      
Be careful when using these interfaces! Calling the wrong ioctl (or calling write() instead of read()) could have unfortunate results.
 
Be careful when using these interfaces! Calling the wrong ioctl (or calling write() instead of read()) could have unfortunate results.
   βˆ’
=== Reading ===
+
== Reading ==
 
/dev/flash may be read to get the raw, encrypted contents of the Wii NAND flash chip. You must either read with a block size of 2048 or 2112 (2048 + 64); the former will give you the normal contents of one page, and the latter will give you the same data plus the 64 bytes of OOB / spare / ECC data. The read buffer must be 32 Byte aligned, because a hardware engine is used for copying data. If you hope to use this to eventually restore the contents of your Wii, you MUST back up the spare data.
 
/dev/flash may be read to get the raw, encrypted contents of the Wii NAND flash chip. You must either read with a block size of 2048 or 2112 (2048 + 64); the former will give you the normal contents of one page, and the latter will give you the same data plus the 64 bytes of OOB / spare / ECC data. The read buffer must be 32 Byte aligned, because a hardware engine is used for copying data. If you hope to use this to eventually restore the contents of your Wii, you MUST back up the spare data.
    
In between each read, you should seek() to the page number you are trying to read; for example, seeking to 0x200 would put you at page 0x200, the start of the encrypted filesystem. That is to say, you must seek before every access, and the "file position" is in terms of pages, not bytes. There are 256K (262,144) total pages.
 
In between each read, you should seek() to the page number you are trying to read; for example, seeking to 0x200 would put you at page 0x200, the start of the encrypted filesystem. That is to say, you must seek before every access, and the "file position" is in terms of pages, not bytes. There are 256K (262,144) total pages.
   βˆ’
=== Ioctls ===
+
== Ioctls ==
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 25: Line 24:  
| 0  
 
| 0  
 
| 0x198 bytes  
 
| 0x198 bytes  
βˆ’
| ?
+
| get some data of the current ios' nand error log
 
|-
 
|-
 
| 3  
 
| 3  
Line 37: Line 36:  
| check_bad_block: if return value is -13, indicates that the block at the current fpos is bad  
 
| check_bad_block: if return value is -13, indicates that the block at the current fpos is bad  
 
|}
 
|}
βˆ’
=== Return Codes ===
+
 
 +
== Return codes ==
 
(These names were taken from a NAND flash diagnostic program scraped from flash)
 
(These names were taken from a NAND flash diagnostic program scraped from flash)
   Line 55: Line 55:  
* -128: NAND_RESULT_FATALERROR
 
* -128: NAND_RESULT_FATALERROR
   βˆ’
=== Example Dump Code ===
+
== Example dump code ==
βˆ’
 
   
Here is an example code for dumping complete NAND including ECC:
 
Here is an example code for dumping complete NAND including ECC:
   Line 127: Line 126:     
[[Category:Wii Filesystem]]
 
[[Category:Wii Filesystem]]
βˆ’
  βˆ’
== Why You Should Always Trust Yourself ==
  βˆ’
  βˆ’
Trust yourself. You know more than you think you do. Benjamin SpockAs time passes by and the more work you will do on discovering and improving yourself, the more you will realize that the ancient Latin quotation: Ne te quaesiveris extra - Do not look outside of yourself for the truth, is true.
  βˆ’
  βˆ’
[[http://goodvillenews.com/Why-You-Should-Always-Trust-Yourself-TR2gYW.html Why You Should Always Trust Yourself]]
  βˆ’
  βˆ’
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
  βˆ’
  βˆ’
== Why You Should Always Trust Yourself ==
  βˆ’
  βˆ’
Trust yourself. You know more than you think you do. Benjamin SpockAs time passes by and the more work you will do on discovering and improving yourself, the more you will realize that the ancient Latin quotation: Ne te quaesiveris extra - Do not look outside of yourself for the truth, is true.
  βˆ’
  βˆ’
[[http://goodvillenews.com/Why-You-Should-Always-Trust-Yourself-TR2gYW.html Why You Should Always Trust Yourself]]
  βˆ’
  βˆ’
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
  βˆ’
  βˆ’
== 6 Steps Towards Living a Life Free of Fear and Full of Hope ==
  βˆ’
  βˆ’
There are two basic motivating forces: fear and love. When we are afraid, we pull back from life. When we are in love, we open to all that life has to offer with passion, excitement, and acceptance. We need to learn to love ourselves first, in all our glory and our imperfections. If we cannot love ourselves, we cannot fully open our ability to love others or our potential to create. Evolution and all hopes for a better world rest in the fearlessness and open-hearted vision of people who embrace life. ~ John Lennon
  βˆ’
  βˆ’
[[http://goodvillenews.com/6-Steps-Towards-Living-a-Life-Free-of-Fear-and-Full-of-Hope-dnAp.html 6 Steps Towards Living a Life Free of Fear and Full of Hope]]
  βˆ’
  βˆ’
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
  βˆ’
  βˆ’
== Disney Brings "Cars" To Life With Cars Land ==
  βˆ’
  βˆ’
After five years in the making, Disney California Adventure is finally ready to rev up the engines on Cars Land. Disneys latest creation, based on the hit Pixar movie, brings the popular characters to life at Disney California Adventure.
  βˆ’
  βˆ’
[[http://goodvillenews.com/Disney-Brings-Cars-To-Life-With-Cars-Land-YfdwZj.html Disney Brings "Cars" To Life With Cars Land]]
  βˆ’
  βˆ’
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
  βˆ’
  βˆ’
== 11 Things You Should Start Doing for Yourself Today ==
  βˆ’
  βˆ’
Enjoy everything that happens in your life, but never make your happiness or success dependent on an attachment to any person, place or thing. Wayne DyerYou deserve to live a more balanced, harmonious and happier life, starting today and starting now. Today, not tomorrow, nor the day after tomorrow is where your life is, where your life starts.
  βˆ’
  βˆ’
[[http://goodvillenews.com/11-Things-You-Should-Start-Doing-for-Yourself-Today-e883xI.html 11 Things You Should Start Doing for Yourself Today]]
  βˆ’
  βˆ’
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]