Switch from STA to edk2-msm UEFI

This commit is contained in:
timoxa0 2024-02-19 18:15:07 +05:00
parent 0bfd2220d6
commit ee4944b011
9 changed files with 101 additions and 118 deletions

View file

@ -4,6 +4,7 @@
# Запуск Linux на Xiaomi Pad 5
## Язык
Русский | [English](README.md)
## ⚠️ Предупреждение
Мы не несем ответственности за сломанные устройства, отсутствующие разделы, плохих работников на линии производства Xiaomi, мёртвые карты памяти, мёртвые чипы управления питанием, мёртвую ОЗУ, мёртвые контроллеры экрана, мёртвые процессоры, мёртвых кошек и собак и ядерные войны.
@ -16,8 +17,6 @@
- [Установка](guide/install-selection.md)
- [Настройка двойной загрузки](guide/dualboot-selection.md)
- [Удаление](guide/uninstall-selection.md)
## Разное
@ -26,6 +25,3 @@
- [Переустановка](guide/reinstalling-selection.md)
## Разработчики
-
-

View file

@ -1,26 +1,21 @@
<img align="right" src="./assets/nabu.png" width="425" alt="Linux Running On A Xiaomi Pad 5">
# Running Linux on the Xiaomi Pad 5
## Language
[Русский](README-RU.md) | English
## ⚠️ Warning
## ⚠️ Warning
We're not responsible for bricked devices, missing recovery partitions, dead xiaomi factoryline workers cowboys, dead microSD cards, dead pmics, dead ram, dead display ics, dead cpus, any xiaomi shenanigans, dead cats or dogs, nuclear wars or you getting fired because you forgot to boot back in to android for the alarm.
This project is in an early stage, all the files here have been contributed by other users, here you will find a guide with the working files we managed to get. This is a delicate process, do it under your own risk and follow all the steps carefully.
**IF YOU AREN'T COMFORTABLE MODDING YOUR TABLET OR ITS PARTITION TABLE OR YOU ARE PARANOID OF BRICKING YOUR DEVICE CLICK AWAY NOW!!! YOU HAVE BEEN WARNED, YOU ARE ON YOUR OWN IF YOU BRICK YOUR DEVICE!!! AGAIN! YOU HAVE BEEN WARNED!!!**
## Get Started
- [Installation](guide/install-selection.md)
- [Dualboot Setup](guide/dualboot-selection.md)
- [Uninstallation](guide/uninstall-selection.md)
@ -29,8 +24,3 @@ This project is in an early stage, all the files here have been contributed by o
- [Project Status](guide/status-selection.md)
- [Reinstallation](guide/reinstalling-selection.md)
## Contributors
-
-

View file

@ -1,37 +0,0 @@
<img align="right" src="../../assets/nabu.png" width="425" alt="Linux Running On A Xiaomi Pad 5">
# Running Linux on the Xiaomi Pad 5
## [](install-en.md) Dualbooting Android and Linux seamlessly
### Prerequisites
- Brain
- Rooted Android
- [boot-loader.tar.xz](https://mega.nz/folder/CVMGEAiB#7oazR3wpkKdAH2eZChtRTg) (Ubuntu-V0.91 recommended)
### Android side of Dual Boot
1) Install [`linuxswitch.apk`](https://github.com/timoxa0/Switch2Linux-Nabu/releases/download/v1.0.2/linuxswitch.apk) to device.
2) Open installed app and grant root access
3) Tap "Dump android images"
4) Move `android.boot.img` and `andoid.dtbo.img` to PC from `/sdcard/linux/`
5) Rename linux boot to `linux.boot.img` and put it to `/sdcard/linux/`
6) Now you can tap "Switch to Linux" to boot linux
### Linux side of Dual boot
1) Download [`s2a.zip`](https://github.com/timoxa0/Switch2Linux-Nabu/releases/download/v1.0.1/s2a.zip)
2) Unzip `s2a.zip` in linux
3) Put `android.boot.img` and `andoid.dtbo.img` into `s2a` folder
4) Install with command
```console
sudo ./install.sh
```
5) Now you can reboot to android with Switch2Android app
## Finished!

View file

@ -8,23 +8,56 @@
### Prerequisites
- Brain
- [rootfs.img.xz](https://mega.nz/folder/CVMGEAiB#7oazR3wpkKdAH2eZChtRTg) (Ubuntu-V0.91 recommended)
- Rooted Android
- [Rootfs image](https://timoxa0.su/share/nabu/images) (ubuntu.img или arch.img)
- [Kernel image](https://timoxa0.su/share/nabu/images/linux-6.1.10-nabu.boot.img)
- [UEFI installer](https://timoxa0.su/share/nabu/uefi-installer-nabu.zip)
### Installation
#### Extract `rootfs.img` from `rootfs.img.xz`
#### Reboot to fastboot to start installing linux
#### Reboot to fastboot to install installing linux
#### Flash linux image via fastboot
```cmd
fastboot flash linux <rootfs.img>
```
> Replace <rootfs.img> with path to rootfs.img
> Replace <rootfs.img> with path to ubuntu.img or arch.img
#### Reboot to android to setup dualboot
#### Reboot to bootloader
```sh
fastboot reboot bootloader
```
#### Erase dtbo
```sh
fastboot erase dtbo
```
#### Temporary boot linux from PC
```sh
fastboot boot <linux-boot.img>
```
> Replace <linux-boot.img> with path to kernel image
#### Complete initial setup and reboot the tablet into bootloader
#### Restore dtbo backup
```sh
fastboot flash dtbo <dtbo.img>
```
> Replace <dtboboot.img> with path to dtbo backup
#### Reboot tablet into android
```sh
fastboot reboot
```
### [Last step: Setup Dualboot](dualboot-en.md)
### Set up dualboot
#### Flash UEFI installer via Magisk or recovery
> After rebooting, a menu will appear in which you can navigate using the volume and power buttons
### Готово!

View file

@ -28,13 +28,15 @@
#### Flash vbmeta_disabled.img via fastboot
```sh
fastboot flash vbmeta_ab <путь/к/vbmeta_disabled.img>
fastboot flash vbmeta_ab <vbmeta_disabled.img>
```
> Replace <vbmeta_disabled.img> with path to vbmeta_disabled.img
#### Boot Orange Fox recovery through PC
```sh
fastboot boot <recovery.img>
```
> Replace <recovery.img> with path to recovery.img
#### Start ADB shell
```sh
@ -74,7 +76,7 @@ parted /dev/block/sda
> If userdata size is 16 GB, then X = 10.9 + 16 = 26.9 \
> So command is `mkpart userdata ext4 10.9GB 26.9GB`
#### Create efi partition (for future use)
#### Create efi partition
```
mkpart esp fat32 XGB YGB
```
@ -90,6 +92,12 @@ mkpart esp fat32 XGB YGB
> `mkpart linux ext4 27.9GB 126GB` for 128 GB model \
> `mkpart linux ext4 27.9GB 254GB` for 256 GB model
#### Create dtbo backup
```
adb shell "dd if=/dev/block/platform/soc/1d84000.ufshc/by-name/boot$(getprop ro.boot.slot_suffix) of=/tmp/normal_dtbo.img"; adb pull /tmp/normal_dtbo.img
```
> Backup will be saved to current directory
#### Check if Android still starts
just restart the tablet, and see if Android still works
If isn't boot or looping or animation, use MIUI recovery or other recoveries for wiping data.

View file

@ -1,38 +0,0 @@
<img align="right" src="../../assets/nabu.png" width="425" alt="Linux Running On A Xiaomi Pad 5">
# Windows на Xiaomi Pad 5
## [](install-ru.md) Двойная загрузка Android и Linux
### Требования
- Мозги
- Android с root-правами
- [boot-loader.tar.xz](https://mega.nz/folder/CVMGEAiB#7oazR3wpkKdAH2eZChtRTg) (рекомендуется Ubuntu-V0.91)
### На стороне Android
1) Установите [`linuxswitch.apk`](https://github.com/timoxa0/Switch2Linux-Nabu/releases/download/v1.0.2/linuxswitch.apk) на устройство.
2) Откройте программу и выдайте root-права
3) Нажмите "Dump android images"
4) Сохраните `android.boot.img` и `andoid.dtbo.img` на компьютер из `/sdcard/linux/`
5) Распакуйте `boot-loader.tar.xz`
6) Достаньте из распакованного aрхива `boot_xiaomi-nabu_sda33.img` и, назвав его `linux.boot.img`, положите в `/sdcard/linux/`
7) Перезагрузитесь в linux, нажав "Switch to Linux"
### На стороне Linux
1) Скачайте [`s2a.zip`](https://github.com/timoxa0/Switch2Linux-Nabu/releases/download/v1.0.1/s2a.zip)
2) Распакуйте `s2a.zip` в Linux
3) Положите android.boot.img и andoid.dtbo.img в папку s2a
4) Запустите терминал в папке с install.sh и выполните команду
```console
sudo ./install.sh
```
5) Перезагрузитесь в android, запустив "Switch2Android" и меню приложений
## Готово!

View file

@ -7,24 +7,57 @@
### Требования
- Мозги
- Android с root-правами
- [rootfs.img.xz](https://mega.nz/folder/CVMGEAiB#7oazR3wpkKdAH2eZChtRTg) (рекомендуется Ubuntu-V0.91)
- [Образ rootfs](https://timoxa0.su/share/nabu/images) (ubuntu.img или arch.img)
- [Образ ядра](https://timoxa0.su/share/nabu/images/linux-6.1.10-nabu.boot.img)
- [Установщик UEFI](https://timoxa0.su/share/nabu/uefi-installer-nabu.zip)
### Установка
#### Извлеките `rootfs.img` из `rootfs.img.xz`
#### Перезапустите планшет в fastboot для прошивки
#### Прошейте образ linux через fastboot
```cmd
fastboot flash linux <rootfs.img>
```
> Замените <rootfs.img> на путь к rootfs.img
> Замените <rootfs.img> на путь к ubuntu.img или arch.img
#### Перезапуститесь в android для настройки дуалбута
#### Перезапуститесь в bootloader
```sh
fastboot reboot bootloader
```
#### Очистите dtbo
```sh
fastboot erase dtbo
```
#### Временно запустите linux с ПК
```sh
fastboot boot <linux-boot.img>
```
> Замените <linux-boot.img> на путь к образу ядра
#### Пройдите первоначальную настройку и перезагрузите планшет в bootloader
#### Восстановите резервную копию dtbo
```sh
fastboot flash dtbo <dtbo.img>
```
> Замените <dtboboot.img> на путь к резервной копии dtbo
#### Перезагрузите планшет в android
```sh
fastboot reboot
```
### [Последний шаг: Установка дуалбута](dualboot-ru.md)
### Настройка dualboot
#### Прошейте установщик UEFI через Magisk или recovery
> После перезагрузки появляется меню, в котором вы можете ориентироваться, используя кнопки громкости и питания
### Готово!

View file

@ -28,13 +28,15 @@
#### Прошейте vbmeta_disabled.img
```sh
fastboot flash vbmeta_ab <путь/к/vbmeta_disabled.img>
fastboot flash vbmeta_ab <vbmeta_disabled.img>
```
> Замените <vbmeta_disabled.img> на путь к vbmeta_disabled.img
#### Запустите рекавери с компьютера при помощи команды
```sh
fastboot boot <recovery.img>
```
> Замените <recovery.img> на путь к recovery.img
#### Перейдите в консоль recovery
```sh
@ -74,7 +76,7 @@ parted /dev/block/sda
> Если на андроид выделяем 16 GB, то X = 10.9 + 16 = 26.9 \
> Соответственно, команда выглядит так: `mkpart userdata ext4 10.9GB 26.9GB`
#### Создайте раздел efi (на будушие)
#### Создайте раздел efi
```
mkpart esp fat32 XGB YGB
```
@ -90,6 +92,12 @@ mkpart esp fat32 XGB YGB
> `mkpart linux ext4 27.9GB 126GB` для модели на 128 GB \
> `mkpart linux ext4 27.9GB 254GB` для модели на 256 GB
#### Сделайте резервную копию dtbo
```
adb shell "dd if=/dev/block/platform/soc/1d84000.ufshc/by-name/boot$(getprop ro.boot.slot_suffix) of=/tmp/normal_dtbo.img"; adb pull /tmp/normal_dtbo.img
```
> Резервная копия будет создана в текущей директории
#### Проверьте, запускается ли Android
Просто перезапустите планшет и убедитесь, что Android запускается Если система не запускается или вы получили цикличную перезагрузку, используйте режим восстановления MIUI или другой режим восстановления чтобы отформатировать раздел `data`.

View file

@ -1,10 +0,0 @@
<img align="right" src="../assets/nabu.png" width="425" alt="Linux Running On A Xiaomi Pad 5">
# Running Linux on the Xiaomi Pad 5
## Dualbooting Android and Linux seamlessly
### Select your language
- [English](English/dualboot-en.md)
- [Russian](Russian/dualboot-ru.md)