Lomiri - the graphical UI

Now that you have gained access to your newly booted device, there remain a number of things to be configured before Ubuntu Touch will be fully functional on your device. The first is to add udev rules which are required for the graphical UI to be able to launch.

What are udev rules?

On your running system there is a continuously running udev daemon which governs how the system handles events on peripheral devices, e.g. connecting the device to a PC via USB cable. This daemon needs a set of rules, the udev rules, to tell it what to do for each possible event. These rules must observe a specific format and they are stored in a file which needs to be generated for each specific device.

添加 udev 規則

The correct way to do this is by storing these settings in overlay files (Overlay file method), and not by making the root directory writeable, as described below. However, in order to quickly set up udev rules which are necessary to complete subsequent steps, you can use the method detailed here for first time setup.

Make / (root) writable

Before you make any changes to the rootfs (which will be required for the next steps), you’ll need to remount your root directory (/) with write permissions. Do this by running the following command:

sudo mount -o remount,rw /

Create and add udev rules

You must create some udev rules to allow Ubuntu Touch software to access your hardware.

To do this, you can use the commands below, replacing [CODENAME] with your device’s codename:

sudo -i # And enter your password
DEVICE=[CODENAME]
cat /var/lib/lxc/android/rootfs/ueventd*.rc /vendor/ueventd*.rc | grep ^/dev | sed -e 's/^\/dev\///' | awk '{printf "ACTION==\"add\", KERNEL==\"%s\", OWNER=\"%s\", GROUP=\"%s\", MODE=\"%s\"\n",$1,$3,$4,$2}' | sed -e 's/\r//' >/etc/udev/rules.d/70-$DEVICE.rules

現在,重新啟動裝置。 如果一切順利,您最終會看到 Ubuntu Touch 微調器,然後是 Unity 8。您的鎖密碼與您為 SSH 設置的密碼相同。

When Unity 8 is first brought up on your device, you will probably notice that everything is very small. The 顯示器設定 section describes how to deal with this.