# PinePhone

## Terms

- [JumpDrive](https://github.com/dreemurrs-embedded/Jumpdrive)

JumpDrive is software used to boot the PinePhone so that the onboard eMMC can be written to for replacing the currently installed OS.

- [eMMC](https://en.wikipedia.org/wiki/MultiMediaCard#eMMC)

This is the onboard storage used for most Smartphones and Tablets (like the PinePhone and the PineTab)

- [MMC (microSD/SD)](https://en.wikipedia.org/wiki/SD_card)

This is a storage device used to store data and in this case an OS.

<<Note("eMMC storage will be noticeably faster when compared to a microSD card.")>>

### Needed Items

- PinePhone
- 1x 4GB microSD card to be the JumpDrive
- 1x 32GB or larger microSD card for the OS

The 3rd item is useful for trying different OSes as you just need to write the OS, swap out the card then power on the PinePhone. If you want to try more then two OSes (the one on the microSD card and on the eMMC) at a time.

#### Creating the JumpDrive

1. Connect the microSD card to your system.
2. Download the latest release of JumpDrive for the PinePhone (it will be labeled pine64-pinephone.img.xz) from their [releases page](https://github.com/dreemurrs-embedded/Jumpdrive/releases).
3. Open the Disks application then left-click the microSD card from the left side list
4. Left-click on the three dot menu in the top right of the Disks application
5. Left-click the "Restore Disk Image..." option from that menu
6. Left-click the pine64-pinephone.img.xz image from your Downloads folder
7. Contine though the prompts and let the process complete

#### Booting from the JumpDrive

1. Plug the microSD card into the PinePhone's microSD card slot
2. Power on the PinePhone (connecting the power cable should do this as well if you don't want to put the device together)

#### Flashing the eMMC

1. Connect the PinePhone to your system
2. Once booted to the JumpDrive you should see the PinePhone's eMMC in the Disks application.
3. Follow the same steps from creating the JumpDrive but instead of selecting the microSD card left-click the eMMC and use the pinephone.img.xz file of the OS that you want to install.

This [page](https://wiki.pine64.org/wiki/PinePhone_Software_Releases) is a common place to find PinePhone OSes. For example if I wanted Arch with Phosh for the original PinePhone I would download the "archlinux-pinephone-phosh-20211212.img.xz" image from this [page](https://github.com/dreemurrs-embedded/Pine64-Arch/releases).

---

# Pinebook Pro

## Installing Armian 22.08

### Installing to microSD card

1. Download the image file from [here](https://www.armbian.com/pinebook-pro/).
2. You can use the Disks application if you are on GNOME or similar desktops similar to the steps in this System76 [article](https://support.system76.com/articles/live-disk#making-the-bootable-drive).

### Booting from microSD card

1. Download the image file again to the microSD card while booted from it.
2. Now write the image to the eMMC using this command:

```
xzcat Armbian_22.08.1_Pinebook-pro_jammy_current_5.15.63.img.xz | sudo dd of=/dev/mmcblk2 bs=4M status=progress
```

### Mount the eMMC install

1. Run this command:

```
sudo mount /dev/mmcblk2p1/
```

From there download this replacement file using this command:

```
wget http.kali.org/dists/kali-dev/main/installer-arm64/current/images/device-tree/rockchip/rk3399-pinebook-pro.dtb
```

Then replace it:

```
sudo mv rk3399-pinebook-pro.dtb /mnt/boot/dtb/rockchip/
```

Now shutdown to remove the microSD card and reboot into the eMMC:

```
sudo shutdown now
```

Credits: [https://forum.pine64.org/showthread.php?tid=17215](https://forum.pine64.org/showthread.php?tid=17215)
