[Xiaomi Mi 8 ROMs, Kernels, Recoveries, & Other Dev] itagizade:
View attachment 5376913

What is it? What is Ubuntu Touch?

Ubuntu Touch, as comes from naming, is Ubuntu managed to run on phone.

Well, Canonical abandoned it, so community organization, UBports, now develops, maintains, and ports UT to new devices.

And this is what the thread is about. The amount of devices able to run UT was 63(as written on website at the time of writing this post). But now it is 64 devices.

The 64th port to Xiaomi Mi 8.🥳
​

So, lets talk now what works, and what is not(you will also be able to see that on website, as soon as merge request will be accepted).

​

What works:

Actors​

Manual brightness(auto seems not supported by UT, idk)​

Notification LED​

Vibration​

Torchlight​

Camera​

Flashlight​

Photo​

Video​

Switch between front and rear cameras​

Cellular​

Carrier info​

Calls​

SMS​

Audio routings (switching between main speaker, and phone speakers)​

Volume control​

Misc

Battery percentage

Online charging(while phone is on, or in sleep/standby state)

UBports recovery

Network

WiFi(2.4GHz, 5GHz)

Bluetooth

Hotspot(partially, seems that 5G is not supported)

Flight Mode

Sensors

Fingerpring

GPS

Rotation

Touchscreen(ofc, otherwise I would write this post)

Sound

Microphone

Earphones

Loudspeaker

Volume Control

USB

ADB

MTP

Several things, are not tested, such as Wireless Display, NFC, SIM PIN Unlock, MMS, Dual SIM.

Non working features are Offline Charging, Auto-brightness, Proximity Sensor(you need to click the Power Button, that won't stop the call).

Big thanks to TheKit who helped me with the port.

TheKit's Gitlab and UBports forum profile.

Right now, config for UBports Installer is waiting approval of pull request, and merge request for devices.ubuntu-touch.io is still not approved, you will have to do everything manually. UBports Installer config PR finally merged, but only Global versions are supported, since firmware files that are flashed by Installer are for Global. If you do install, be sure to flash vendor and firmware packages for your variant after.

WARNING! YOU MUST HAVE UNLOCKED BOOTLOADER! EVERY THING YOU DO, YOU DO ON YOUR RISK, IF YOU BRICKED DEVICE, THATS YOUR FAULT, NOT MY! I DO NOT TAKE ANY RESPONSIBILITY FOR YOUR BRICKED DEVICE!

Preparations before installation.

Flash TWRP recovery

You need to download and flash stock firmware and vendor from Android 9, MIUI V11.0.6.0.PEAMIXM(be aware that this Vendor+Fw is for Global, if your Device is Chinese or Russian variant, or any other, flash vendor package according your phone variant). It is compressed into ZIP file, so you will have to flash it though TWRP. Do not use adb sideload, push file to any directory you want, and install it from phone.

Download boot.img, system.img, recovery.img from here.

In TWRP go to "Wipe" ==> "Format Data" ==> Type "yes" ==> Enter. Then go to Reboot ==> Recovery. After restarted. Again go to Wipe ==> Advanced Wipe, and select all partition except USB-OTG

Now we have two ways of installation, from TWRP, and from Fastboot.

TWRP

On PC:

$ adb push system.img /tmp
$ adb push boot.img /tmp/

Now go to "Install"

Get to /tmp/ directory

"Install Image"

Flash boot.img to Boot partition, system.img to System.

Then reboot to system.

If system works, reboot to TWRP again and push recovery.img to /tmp/, then flash it to Recovery partition.

Fastboot method:

#Simple as that
$ fastboot flash boot boot.img
$ fastboot flash system system.img
$ fastboot flash recovery recovery.img
#Flash recovery only after you are sure system works.

Or you can just install a installable zip archive I've recently made. All my builds will be hosted on GitHub Releases on my repo. New builds will come by every new official OTA release. UBports recovery is not included, installation goes proceeds from TWRP, install just as simple as custom ROM installation. Btw, do you want me to add notch patches to system image, so it doesn't look awkward?

Note: this zip is not signed, so disable signature verification before installing, or installation will fail.

Optionally you can adjust your panel so it doesn't look weird. Rn idk how to move panel below the notch(display cutout, I hate Apple for that). It moves buttons in Panel below, and adjusts height of the panel. This repo will do everything for you. Just download it to device. And run apply-notch-hax.sh. It will automatically find device name, apply patches, and restart Unity.

Note: run the script as standard user, not root.

Note2: if you get bootloop, wipe system, format data, restart bootloader, flash everything again, but before rebooting to system try flashing SELinux permissiver. And don't flash Magisk, it's useless, and may destroy your system.

Device source: Gitlab

Kernel source: Gitlab

Gitlab CI build artifacts: Gitlab

Join Telegram support group if you need any help.

See all supported devices at official website.

P.S. Since you have to use fastboot, and UBports Installer uses fastboot, there may be some difficulties for Ryzen CPU users. I attached zip file with executable (.bat file). It will allow you use fastboot with USB 3.x + Ryzen. Unpack it. And run .bat file as admin. Reboot. Voila, fastboot works as should.

Linux users should either use another laptop with Intel CPU, or flash from Windows, or use USB 2.0 hub.

P.S.S. Ok, I managed to get GitHub CI to work, so now if any of you want to test fixes and new features, head to this GitHub repo, and download artifacts from "Make OTA images"(in Actions tab), and flash them using fastboot.