准备工作

并非所有设备都可以运行 Ubuntu Touch。在开始之前对您的目标设备需要做点研究。

要确定你的设备的规格,请在 GSM Arena 或者 Device Specification 上搜索他。

We encourage the following specifications:

Kernel

Ubuntu Touch currently requires a device with a Linux kernel version greater than or equal to 3.15. According to the systemd v255 README, older device kernels are not compatible with systemd v255 or newer. You may learn your device’s kernel version by finding “Kernel Version” in the About page of your Android settings. The kernel version can also be found in the Makefile at the top level of any Linux kernel source tree.

RAM

At least 1GB is required for Operating System to work. 3GB or higher is recommended for a better end-user experience.

Storage

At least 16GB of storage is required. Devices with less storage will likely not have enough space for a full Ubuntu Touch installation.

查找相关指南和其他信息

If your desired target device complies to the above, the next thing to do is locate the available guides and other documentation. This step will help you later on when you run into issues developing your port. For now, the main thing to look for is how to unlock your bootloader. (See below).

前往 LineageOS Wiki. 找到你的设备,并且阅读并且给列出的指南加个书签。 尝试在网络上搜索额外的信息, 特别是他的零售型号以及 LineageOS 网站上给出的设备代号。要注意检查你收集到的信息是否适用于你的特定设备,要牢记,许多设备都有许多硬件规格不同变体(variants)出售。

另一个资源丰富的信息来源是 XDA 开发者论坛

解锁 bootloader

供应商通常在锁定的引导程序状态下提供他们的设备。这是一种软件 “密封”,旨在防止直接修改操作系统和系统软件。如果你解锁引导程序,你将能够进行这样的修改,但在这种状态下,你的设备的保修可能是无效的。选择权在你,但如果你想在设备上安装 Ubuntu Touch,这一步骤是强制性的。

设备不同,没有涵盖所有品牌和型号的通用方法。因此,你需要查看上述指南,了解如何解锁你的特定设备的引导程序。

安装 TWRP recovery

你需要安装一个定制的 recovery 镜像到你的设备是,从而能处理格式化并刷入镜像文件到设备上,前往 Team Win Recovery Project ,找到适合你的设备的图像文件。按照网站上提供的安装说明进行操作。

备注

Some devices do not have a TWRP image available. While it is technically possible to port a device without a recovery, it makes the process a lot more complicated, especially when debugging early in the porting process.

对主机/编译用 PC 的建议

The remainder of this guide presumes you are using a build PC running Linux. Although high performance always is nice, stability and sufficient RAM and harddisk space are the main concerns here. You do not need the latest and the best hardware, nor do you need the latest distribution release. In fact, it is not uncommon to run into issues when choosing the very newest release, as some of the software needed may not yet have been built for it. For example, using a Ubuntu LTS release, or a LTS release of another distribution, is often a good choice.

在完成上述步骤后,你现在已经准备好搭建你的编译环境并开始移植过程本身(下一章节)。