# 14, 15 eMMC Boot Guide

### Prerequisites <a href="#pre-requisite" id="pre-requisite"></a>

* Full eMMC Backup (boot0/1 and rawnand.bin)
* (Partition Manager) PC
* (Partition Manager) hekate v6.4.0 or later
* (Manual) PC running Linux
* (Manual) GParted, gdisk

### WARNINGS

* Repartitioning, resizing, and flashing your eMMC will destroy your HOS (stock Switch OS) install; you MUST have a backup if you ever intend to use HOS again (this can be achieved with hekate (Tools -> Backup eMMC -> eMMC BOOT0 & BOOT1, eMMC RAW GP)
* You currently cannot dual boot Android installs on SD and eMMC due to a `super` partition lookup bug in Android
* We recommend this to advanced users only--the gain is marginal and not worth accidentally nuking your Switch

### Installation (Partition Manager) <a href="#installation" id="installation"></a>

This approach uses hekate's built-in eMMC partition manager, added in hekate v6.4.0. We recommend this solution as it is easy, robust, and officially supported.

1. Follow installation instructions ([nx](https://wiki.lineageos.org/devices/nx/), [nx\_tab](https://wiki.lineageos.org/devices/nx_tab/)) up until SD partitioning step (files should be in `switchroot/install` and `switchroot/android`)
2. Adjust `bootloader/android.ini` from installation instructions to include `emmc=1`.
3. Enter hekate's eMMC partition manager by pressing and holding the "Partition SD Card "button (Tools -> Partition SD Card) for 5 seconds
4. Adjust partitions to your liking (we recommend 16GB for Android, though it should be usable with >=8GB)
5. Press Flash Android to flash the files in `switchroot/install/` (the files will be erased after flash)
6. Press "Continue" to reboot into Android recovery

### Installation (Manual) <a href="#installation" id="installation"></a>

This approach does not utilize hekate's built-in eMMC partition manager and is mostly here for legacy documentation and support. We recommend using the above method.

#### eMMC preparation <a href="#emmc-preparation-for-android-and-linux-alongside-hos-on-a-larger-emmc" id="emmc-preparation-for-android-and-linux-alongside-hos-on-a-larger-emmc"></a>

1. Erase your eMMC or shrink the USER partition
2. In hekate go to USB Tools -> Set Read-Only to OFF -> Mount eMMC RAW GPP
3. In a new Terminal run `sudo gdisk /dev/<disk>` (where \`\<disk>\` is your the mounted eMMC)
4. x (enter expert mode) -> s (resize partition table) -> 128 (set max entries to 128) -> w (write changes to disk) -> y (confirm write)
5. In GParted open your disk and create the following partition in the same order

| Partition Name | Size    | File system |
| -------------- | ------- | ----------- |
| boot           | 64MiB   | unformatted |
| recovery       | 64MiB   | unformatted |
| dtb            | 1MiB    | unformatted |
| misc           | 3MiB    | unformatted |
| cache          | 60MiB   | unformatted |
| super          | 5922MiB | unformatted |
| userdata       | Custom  | ext4        |

#### Flashing the eMMC <a href="#flashing-the-emmc" id="flashing-the-emmc"></a>

1. In a terminal use dd to flash the following partition accordingly e.g. `sudo dd if=boot.img of=/dev/<disk><boot_partition_number> bs=32M`

| File            | GPT Name |
| --------------- | -------- |
| `boot.img`      | boot     |
| `recovery.img`  | recovery |
| `nx-plat.dtimg` | dtb      |

2. Create the following file on your SD Card in `bootloader/ini/android.ini`

```
[LineageOS]
l4t=1
boot_prefixes=switchroot/android/
id=SWANDR
icon=switchroot/android/icon_android_hue.bmp
logopath=switchroot/android/bootlogo_android.bmp
r2p_action=self
usb3_enable=1
emmc=1
```

3. The rest of the guide can be followed as-is


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.switchroot.org/wiki/android/android-14-15/14-15-emmc-boot-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
