The iPhone Wiki is no longer updated. Visit this article on The Apple Wiki for current information. |
Difference between revisions of "NAND"
m (Well...2048 was too much.) |
m (Updating.) |
||
Line 14: | Line 14: | ||
== Jailbreaking == |
== Jailbreaking == |
||
{{main|Jailbreak}} |
{{main|Jailbreak}} |
||
− | Jailbreaking, in it's simplest form, involves modifying [[/private/etc/fstab]] before being parsed by the [[kernelcache|kernel]] to mount the [[/|root partition]] as read-write (<code>rw</code>), as opposed to read-only (<code>ro</code>). The only use of a so called "bare-bones" jailbreak is a proof-of-concept. A semi known example (the only publicly disclosed) of a "bare-bones" jailbreak is the [[ |
+ | Jailbreaking, in it's simplest form, involves modifying [[/private/etc/fstab]] before being parsed by the [[kernelcache|kernel]] to mount the [[/|root partition]] as read-write (<code>rw</code>), as opposed to read-only (<code>ro</code>). The only use of a so called "bare-bones" jailbreak is a proof-of-concept. A semi known example (the only publicly disclosed) of a "bare-bones" jailbreak is the [[K66AP|Apple TV 2G]] from [[Mojave 8M89 (AppleTV2,1)|4.0]] (4.1) to [[Jasper 8C150 (AppleTV2,1)|4.1]] (4.2). Not all jailbreak payloads modify [[/private/etc/fstab]], some of them remount the [[/|root partition]] manually. |
== Data Layout == |
== Data Layout == |
Revision as of 08:08, 15 October 2015
NAND, so called because of its use of NOT AND (NAND) gates, is a type of non-volatile memory chip that is used in all iDevices. This chip is where all the storage of the device is located. In the case of iOS, the chips can range anywhere from 4 GiB to 128 GiB.
Contents
Partitions
In the case of iOS, it is split into two partitions, a root partition ranging from 256(?) MiB to ~2 GiB, and a user partition occupying the rest. The root partition is located first on the chip and is mounted to the root of the filesystem (/
). The user partition is located after the root partition on the chip and is mounted to /private/var.
Size of Partitions
The size of the root partition has varied throughout iOS's history, while the user partition just fills the rest of the space of the NAND chip. Here is a comparison of the size of the root partition compared to iOS version:
- 256 MiB: ?
- 512 MiB: ? - 4.0
- 1024 MiB: 4.0 - 8.0
- 2048 MiB: 8.0 - present
Jailbreaking
- Main article: Jailbreak
Jailbreaking, in it's simplest form, involves modifying /private/etc/fstab before being parsed by the kernel to mount the root partition as read-write (rw
), as opposed to read-only (ro
). The only use of a so called "bare-bones" jailbreak is a proof-of-concept. A semi known example (the only publicly disclosed) of a "bare-bones" jailbreak is the Apple TV 2G from 4.0 (4.1) to 4.1 (4.2). Not all jailbreak payloads modify /private/etc/fstab, some of them remount the root partition manually.
Data Layout
As NAND chips are not hard drives, their "sector" sizes are different than that of a typical hard drive. In fact, they aren't even called sectors, but instead called a "page".
The difference between a page and a sector is that a modern hard drive sector contains either 512 or 4096 bytes of data with anywhere from roughly 30 to 250 bytes of error correction code (ECC) data, while a page contains 8192 bytes of data and no ECC. ECC is most likely not used as flash memory uses transistors, which are more reliable than magnetism to store data. It has, however, been proposed to implement ECC in flash memory as the smaller fabrication process has shrunk to the width of about 150 helium atoms (.14 nm
, or 22 nm
total).
The next level up from a page is a block which is a collection of 128 pages (1 MiB). A block can be compared to a 4K sector hard drive that emulates 512 byte sectors.
The layout of an 8 GiB chip containing iOS has been documented by CPICH. He notes that an iPhone 4 is documented, but it could easily be adapted to any other device or firmware. He uploaded the document to FreePDFHosting, but it was later removed after 30 days as per their policy. MuscleNerd rasterized the document's pages and uploaded the images here:
See Also
External Links
- NAND Layout of iPhone 4 (dead link) documented by CPICH
- SOGETI ESEC-Labs on the encryption of iOS devices