This repository generates ZIP installers (for Magisk/Recovery) to enable dual booting on the Xiaomi Pad 5.
There are two options for dual booting:
- If the tablet is (re)booted with the
magnetic cover closed
, the Android kernel will start. - If the tablet is (re)booted with the
magnetic cover open
, UEFI from Project-Aloha will start.
2. Using a software boot manager (like rEFInd):
- The tablet will always boot to the software boot menu with an option to
Reboot to Android
. - When the
Reboot to Android
option is selected, the tablet will reboot, and the Android kernel will start.
- Download the ZIP file in the variant you need (
installer_{case/bootmanager}_{SB/NOSB}.zip
) and flash it using Magisk Manager or TWRP recovery. - (For the software boot manager option only) Install the boot manager and the
Reboot to Android
app in your EFI System Partition (ESP). For rEFInd, the partition should contain the following structure:
[ESP Partition]
└── EFI
├── BOOT
│ ├── BOOTAA64.EFI (renamed from refindaa64.efi)
│ ├── icons (rEFInd icons directory)
│ └── refind.conf (rEFInd configuration file)
└── android
└── Reboot2Android.efi
The Android kernel in boot.img
is patched to include both the Android kernel and UEFI, along with a small selection logic to jump to a specific section of the binary (Android kernel or UEFI).
In the magnetic cover option, this selection logic checks the status of the magnetic sensor on the tablet to decide which section to boot.
In the boot manager option, the selection logic reads a specific memory address and checks if a certain pattern is present at that address. If the pattern is not found (as happens on every cold boot), UEFI is launched. When the Reboot to Android
app is launched, that pattern is written to the memory address, and a warm reboot is triggered. On the next boot, the selection logic will find the matching pattern and boot the Android kernel.