The ability to boot an AOSP Generic System Image (GSI) on a compatible Android device is one of the best outcomes of Project Treble, but a similar achievement has yet to be made in the domain of generic kernel development. Google does mandate a minimum Linux kernel version requirement with each new release of Android, but you still can’t simply flash a generic ARM Linux distribution on your Android smartphone and expect it to work due to the fact that the majority of the Android devices are not using a mainline Linux kernel. There exists a community-driven project named UBports that aims to bring Ubuntu Touch (a mobile version of the popular Ubuntu Linux distribution) to Android devices, but their device support is fairly minimal to date.
XDA Recognized Developer erfanoabdi, however, is trying to tackle the situation from a different angle. Instead of waiting for device-specific patches to be landed in the mainline Linux kernel source tree, the developer has successfully created a GSI-esque, platform-agnostic Ubuntu Touch image that can be installed on any Project Treble compliant device.
Sounds familiar? Well, erfanoabdi is the person who managed to port Ubuntu Touch to the Xiaomi Redmi Note 7 a few months ago. Unlike that initial build, the current GSI (which is still based on Ubuntu 16.04 LTS) is almost daily-driver material. You can send/receive calls, connect with your Bluetooth peripherals, utilize the GPS, and even run Android apps, thanks to the built-in Anbox environment.
Is my device compatible with the Ubuntu Touch GSI?
Probably yes. The underlying vendor interface of this GSI is tested against an Android 9 Pie-based firmware, albeit the GSI might work on older Android 8.0 and 8.1-based vendor images as well. Moreover, you need to patch the stock kernel to make it compatible with Project Halium. This part is a little bit complicated, as there is no way to patch the existing boot image of your Android device on-the-fly as of yet. You can either build halium-boot from source or compile a standalone modified version of your stock kernel by manually applying the appropriate patches on top of the kernel source. Read more about it here.
Once you are done with the patching part, you should be able to install the Ubuntu Touch GSI just like any other Android GSI out there. The flashing process will require you to format your data partition, so do perform a backup beforehand.
Want more posts like this delivered to your inbox? Enter your email to be subscribed to our newsletter.