Skip to content

Xiaomi Pad 5

Installation

Prerequisites

Installation requires fastboot (android-tools)

Make sure the bootloader is unlocked, download the latest Pocketblue release from releases and extract the archive, then proceed to installation.

Warning

Your current OS, all your files and your custom partitions will be deleted

Variants

Some nabu variants can't boot the main Pocketblue images. Usually this happens when the device has a Samsung UFS.

Try the main image first, (pocketblue-xiaomi-nabu-*-43). If it doesn't boot or you experience UFS-related issues, try one of the pocketblue-xiaomi-nabu-*-43-samsung images, which ship a patched kernel.

Automatic installation

Danger

If you are flashing a Samsung UFS Pocketblue image, the installation script will repartition the device. Read the installation script before running it and make sure you are fine with the partition changes.

If the installation script crashes while in TWRP recovery, do not reboot the device. Run adb shell command and repair the partition table if needed.

Boot into fastboot, connect your device to your computer via usb, and run the installation script:

  • on Linux: flash-xiaomi-nabu.sh
  • on Windows: flash-xiaomi-nabu.cmd

After installation is finished, your device will reboot and boot into Pocketblue automatically.

It will take the device several minutes to reboot into the system. DO NOT reboot via the power button: this can result in not all data being properly written to storage.

Manual installation

List of provided images and files

All archives contain the following images:

  • vbmeta-disabled.img - vbmeta partition image disabling verified boot, generated using avbtool
  • fedora_boot.raw - Fedora /boot partition, contains kernels, initrd images, bootloader configs, etc
  • fedora_esp.raw - EFI System Partition, contains EFI executables
  • fedora_rootfs.raw - root partition

The main images also ship:

  • uboot.img - U-Boot, a bootloader implementing the UEFI API (source, GPLv2)

Samsung UFS images also ship:

  • aloha.img - Aloha, UEFI implementation (source, BSD-2-Clause)
  • twrp.img - TWRP recovery image by ArKT-7 (source)
  • dtbo.img - Lineage OS DTBO image (source, GPLv3)
  • sgdisk - static sgdisk binary (build scripts, sgdisk license - GPLv2)
  • parted - static parted binary (build scripts, parted license - GPLv3)

The main images can be flashed into existing partitions:

  • vbmeta - images/vbmeta-disabled.img
  • boot - U-Boot (images/uboot.img)
  • rawdump - ESP (images/fedora_esp.raw)
  • cust - /boot partition (images/fedora_boot.raw)
  • userdata - root partition (images/fedora_rootfs.raw)

Samsung UFS variant requires creating at least one new partition at least 300 MiB in size for the ESP (fedora_esp.raw). /boot and rootfs images can still be flashed into vendor partitions. A recovery (e.g. TWRP) can be used to repartition the device.

rawdump and cust partitions

rawdump (partition for dumping crash data on qualcomm devices) and cust (partition for region-specific configurations and preloads) partition contents aren't required for the device to function correctly and thus they can be used to store Fedora data.

Flashing

Boot into fastboot, connect your device to your computer via usb, and install the system:

Erase dtbo:

fastboot erase dtbo_ab

Disable verified boot:

fastboot flash vbmeta_ab images/vbmeta-disabled.img

Flash UEFI:

fastboot flash boot_ab images/uboot.img

# or

fastboot flash boot_ab images/aloha.img

Flash Fedora partitions:

fastboot flash </boot partition> images/fedora_boot.raw
fastboot flash <ESP partition>   images/fedora_esp.raw
fastboot flash <root partition>  images/fedora_rootfs.raw

Reboot, this may take a while. DO NOT reboot via the power button: this can result in not all data being properly written to storage.

fastboot reboot

Default credentials

  • default username: user
  • default password: 123456

Images, updates and packages

Learn how to upgrade the system and install packages in the following guide: Installing packages

You can rebase to a different image, for example to switch your desktop environment. To do this, run:

rpm-ostree reset
sudo bootc switch <IMAGE>

Available images:

  • Gnome desktop - quay.io/pocketblue/xiaomi-nabu-gnome-desktop:43
  • Gnome mobile - quay.io/pocketblue/xiaomi-nabu-gnome-mobile:43
  • Plasma desktop - quay.io/pocketblue/xiaomi-nabu-plasma-desktop:43
  • Plasma mobile - quay.io/pocketblue/xiaomi-nabu-plasma-mobile:43
  • Phosh - quay.io/pocketblue/xiaomi-nabu-phosh:43

Known issues

Cracking sound

Sometimes sound may start cracking. It can be fixed by rebooting the device, or by using headphones.

Pen charging on Samsung UFS Pocketblue images

Samsung UFS images currently don't ship a driver for pen charging.

Uninstall Fedora and get stock ROM back

  • download and unpack the MIUI 14.0.8.0.TKXMIXM archive from here
  • [opnional] restore the original partition table: fastboot flash partition:0 images/gpt_both0.bin
  • run bash flash_all.sh
  • reboot and enjoy the stock ROM

Enabled copr repositories