Compare commits
16 commits
Author | SHA1 | Date | |
---|---|---|---|
|
94c64be5fc | ||
|
da10adacc0 | ||
|
88a47840b9 | ||
|
1e874b7fd3 | ||
|
f91adfbe37 | ||
|
c32e94b200 | ||
|
f42defbc06 | ||
|
1900c30287 | ||
|
501c10deb3 | ||
|
e90f3f09cf | ||
|
77670a4b49 | ||
|
3456e486f0 | ||
|
15ecb0938a | ||
|
57a6d9d701 | ||
|
179dc047a5 | ||
|
a2064b6042 |
46
README-RU.md
Normal file
46
README-RU.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
# Linux switch для Mi Pad 5 (форк [Windows Switch](https://github.com/entaromia/mi-pad5-windows-switch))
|
||||
|
||||
|
||||
## Отличия от Windows Switch
|
||||
- Добавлена кнопка в быстрые настройки
|
||||
- Добавлена возможность сохранить boot и dtbo от android
|
||||
- Очищает dtbo при перезагрузке в linux
|
||||
|
||||
|
||||
## Требования:
|
||||
|
||||
- Рутированный android
|
||||
|
||||
- Уже установленный linux
|
||||
|
||||
- [vbmeta_disabled.img](https://timoxa0.su/share/nabu/manual/vbmeta_disabled.img)
|
||||
|
||||
- [Образ boot Linux](https://git.timoxa0.su/timoxa0/Guide-Linux-Nabu/src/branch/main/guide/English/linuxswitch-en.md)
|
||||
|
||||
|
||||
## Установка
|
||||
|
||||
### Android:
|
||||
1) Прошейте `vbmeta_disabled.img` через fastboot
|
||||
```console
|
||||
fastboot flash vbmeta_ab <path/to/vbmeta_disabled.img>
|
||||
```
|
||||
> [!Warning]\
|
||||
> Данное дейставие может привести к необходимости wipe data в recovery
|
||||
|
||||
2) Установите последнюю версию `linuxswitch.apk` с [релиза](https://github.com/timoxa0/Switch2Linux-Nabu/releases)
|
||||
3) Запустите приложение и предоставьте root доступ
|
||||
4) Нажмите "Dump android images"
|
||||
5) Достаньте `android.boot.img` и `andoid.dtbo.img` из `/sdcard/linux/`
|
||||
6) Назовите boot от linux `linux.boot.img` и положите в `/sdcard/linux/`
|
||||
7) Перезагрузитесь в linux, нажав "Switch to Linux"
|
||||
|
||||
### Linux:
|
||||
1) Скачайте последнюю версию `s2a.zip` с [релиза](https://github.com/timoxa0/Switch2Linux-Nabu/releases)
|
||||
2) Распакуйте `s2a.zip` в linux
|
||||
3) Положите `android.boot.img` и `andoid.dtbo.img` в папку `s2a`
|
||||
4) Запустите терминал в папку с `install.sh` и выполните команду
|
||||
```console
|
||||
sudo ./install.sh
|
||||
```
|
||||
5) Перезагрузитесь в android, запустив "Switch2Android" и меню приложений
|
55
README.md
55
README.md
|
@ -1,28 +1,45 @@
|
|||
# Linux switch for Mi Pad 5 ([Windows Switch](https://github.com/entaromia/mi-pad5-windows-switch) fork)
|
||||
# Linux switch for Mi Pad 5 ([Windows Switch](https://github.com/entaromia/mi-pad5-windows-switch) fork) ([RU](./README-RU.md))
|
||||
|
||||
|
||||
## Differences from original windows switch
|
||||
- Added Quick Settings tile
|
||||
- Added quick settings tile
|
||||
- Added ability to dump android images
|
||||
- Flashes dtbo with boot
|
||||
- Cleans dtbo on reboot
|
||||
|
||||
|
||||
## Pre-requirements
|
||||
|
||||
- Rooted android
|
||||
|
||||
- Already installed linux
|
||||
|
||||
- [vbmeta_disabled.img](https://timoxa0.su/share/nabu/manual/vbmeta_disabled.img)
|
||||
|
||||
- [Linux boot image](https://git.timoxa0.su/timoxa0/Guide-Linux-Nabu/src/branch/main/guide/English/linuxswitch-en.md)
|
||||
|
||||
## Installation
|
||||
1) Install app from [Releases](https://github.com/timoxa0/Switch2Linux-Nabu/releases)
|
||||
2) Open app and grant root access
|
||||
3) Tap "Dump android images"
|
||||
4) Move `android.boot.img` and `android.dtbo.img` to PC from `/sdcard/linux/`
|
||||
5) Place images:
|
||||
|
||||
### Android side:
|
||||
1) Flash `vbmeta_disabled.img` via fastboot
|
||||
```console
|
||||
fastboot flash vbmeta_ab <path/to/vbmeta_disabled.img>
|
||||
```
|
||||
linux boot.img -> /sdcard/linux/linux.boot.img
|
||||
vbmeta_disabled.img -> /sdcard/linux/linux.vbmeta.img
|
||||
```
|
||||
6) Tap "Switch to Linux"
|
||||
7) Download s2a.zip from [Releases](https://github.com/timoxa0/Switch2Linux-Nabu/releases)
|
||||
8) Unzip s2a.zip in linux
|
||||
9) Place `android.boot.img` and `andoid.dtbo.img` to `s2a` folder
|
||||
10) Install switcher
|
||||
> [!Warning]\
|
||||
> This may result in the need to wipe data in recovery.
|
||||
|
||||
2) Install `linuxswitch.apk` from [Releases](https://git.timoxa0.su/timoxa0/Switch2Linux-Nabu/releases)
|
||||
3) Open installed app and grant root access
|
||||
4) Open app again and tap "Dump android images"
|
||||
5) Move `android.boot.img` and `andoid.dtbo.img` to PC from `/sdcard/linux/`
|
||||
6) Rename linux boot to `linux.boot.img` and put it to `/sdcard/linux/`
|
||||
7) Now you can tap "Switch to Linux" to boot linux
|
||||
|
||||
### Linux side:
|
||||
1) Download `s2a.zip` from [Releases](https://github.com/timoxa0/Switch2Linux-Nabu/releases)
|
||||
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
|
||||
```
|
||||
11) Run Switch2Android and enter your password
|
||||
|
||||

|
||||
5) Now you can reboot to android with Switch2Android app
|
||||
|
|
|
@ -54,15 +54,13 @@ class MainActivity : AppCompatActivity() {
|
|||
|
||||
val suffix: String = Shell.cmd("getprop ro.boot.slot_suffix").exec().out[0].toString()
|
||||
|
||||
buttonS2L.isEnabled = true
|
||||
if (!isFileExist("/sdcard/linux/")) {
|
||||
Shell.cmd("mkdir /sdcard/linux/").exec()
|
||||
} else if (!isFileExist("/sdcard/linux/linux.vbmeta.img")) {
|
||||
showToast("linux.vbmeta.img bot found", applicationContext)
|
||||
finish()
|
||||
} else if (!isFileExist("/sdcard/linux/linux.boot.img")) {
|
||||
}
|
||||
if (!isFileExist("/sdcard/linux/linux.boot.img")) {
|
||||
showToast("linux.boot.img not found", applicationContext)
|
||||
finish()
|
||||
} else {
|
||||
buttonS2L.isEnabled = true
|
||||
}
|
||||
|
||||
textSlot.text = this.resources.getString(R.string.slot_text).format(suffix[1])
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
Loading…
Reference in a new issue