Update ports for Ubuntu Touch 20.04¶
Ubuntu Touch 20.04 introduces a lot of changes underneath, which requires changes from the porters. This document is intended to serves as an overview on how to make your port runs on Ubuntu Touch 20.04. However, every port is different, and may requires more than what is outlined in this document. We’ll be available in the UBports porting Telegram group to answer any question that might occur during process.
For GitLab CI-based ports: inspect your overlay in Android partitions¶
Many ports overlay the files in Android partitions to makes the port work. This is often achived by overlaying the mount-android.conf
Upstart job to either contain the code itself, or to call another script. Since Ubuntu Touch 20.04 no longers use Upstart (sees below), the code will no longer run. If your port ships your overlay files under /opt/halium-overlay
or /usr/share/halium-overlay
, the new overlay system will take care of it automatically, except when the new file is added in which case you may need .halium-overlay-dir
(see Overlay file method).
Alternatively, you may want to consider moving your port completely to use the overlaystore system. However the migration is not straight forward and it will make your port incompatible with 16.04 (unless you have another branch). Contact @peat-psuwit in the UBports porting group for more info.
For Halium 7 ports or older: update bluetooth-touch script¶
The way bluetooth-touch script used to work is inherently tied to Upstart. In Ubuntu Touch 20.04, bluetooth-touch is migrated to use Systemd. So, instead of overlaying bluetooth-touch-android.conf
Upstart job, you’ll have to overlay /usr/share/bluetooth-touch/android.sh
. Note that the script will be run by /bin/sh
, so avoid Bash-ism here.
Halium 9 ports doesn’t require this, as Bluebinder replaces bluetooth-touch
by directly talking to HIDL service to provide Bluetooth host interface.
For everyone: configure usb-moded¶
usb-moded replaces setupusb
script in setting and managing USB modes. We’ve written a specific page for that. See Configuring usb-moded.
For everyone: check custom Upstart jobs¶
Some ports has custom Upstart jobs to do certain things on boot. Those jobs has to be converted to Systemd units in order to run at all in Ubuntu Touch 20.04. One may find Ubuntu’s guide on this topic <https://wiki.ubuntu.com/SystemdForUpstartUsers#Job_vs._unit_keywords> useful.
Alternatively, instead of writing custom Systemd units, use devicehack
script which will run on every boot after the Android container runs. The path is /usr/libexec/lxc-android-config/device-hacks
, and the script will be run with /bin/sh
.