Build an Ubuntu touch Environment

Source: Internet
Author: User
Tags ubuntu touch

Recently, I started the multirom manger of Nexus 5 and experienced Ubuntu touch and Android L. The overall experience is good. However, the NFC driver of android l still has problems, and Ubuntu touch is still not optimized, the screen has a card and the backlight cannot be turned off. So I came up with the idea of taking part in Ubuntu touch driver development. I think work is a kind of interest.

Ubuntu touch for Nexus 5 is unofficial, and only nexus and 10 are official. We can download the latest version for Nexus 5 from the multirom manager.

Since there are no relevant tutorials in the Chinese blog, you can only refer to the official documents set up in the Ubuntu touch environment:

Https://wiki.ubuntu.com/Touch/Building

 

The following is a record of how I set up Ubuntu touch (follow the Wiki above ).

2014-9-22:

Document progress: early translation

Actual progress: the source code has been pulled down, but there are still some problems with sync.

Building Ubuntu touch Android pieces from source

Whether you want to build Ubuntu touch for the currently supported nexus devices or want to port it to a new target, you need to set up your working environment to build android from source. this setup is more or less the same whether you are building aosp or a project based on it such as cyanogenMoD, seandroid or Ubuntu touch.

If you are new to building Android sources you may want to check out this document and others in the Getting Started section on the Google Documentation Site, as it covers the basics and terminology of aosp building. while Ubuntu touch uses some helper scripts as detailed below, if will nonetheless be helpful to understand what is going on under the hood especially if you want to work on this part of the project.

Http://source.android.com/source/initializing.html

For Ubuntu touch, you can find all the needed Android git repositories at the https://code-review.phablet.ubuntu.com/#/admin/projects. this is basically a mirror of aosp 4.4.2 _ R1, but containing only the needed low level services used by Android (e.g. no Dalvik at all ).

For any android related project on our git server, you'll find a branch phablet-4.4.2_r1. this branch contains a static known git head and the required changes needed for Ubuntu, including our custom Android manifest.

Compile the android part of ubuntu touch from the source code

Whether you want to compile a supported nexus device or port Ubuntu touch to a new device, you need to build a compiling environment to compile the android source code. This tutorial is similar to compiling aosp (Android open source project) or aosp-based projects, such as cyanogenmod, seandroid or Ubuntu touch.

If this is the first time you compile the android source code, you may need the following documents, and other related documents on the Google documentation website getting started, which explains the basics and terms of aosp compilation. In the following sections, UBUNTU touch will use some auxiliary scripts. If you are planning to develop related projects, you will be more aware of what to do next by browsing these documents.

Http://source.android.com/source/initializing.html

You can use the android git repositories required by touch (repo is a multi-Git project management tool, which is very difficult to use in the unstable network of tianchao ). This is an image based on aosp 4.4.2 _ R1, but it only contains the services required for low-level android running (for example, there is no Dalvik ).

On any Android-related project on our git server, you'll find a branch called phablet-4.4.2_r1, this branch contains a git head and manifest including custom Android manifest (repo manifest of ubuntu touch, including all basic git projects of ubuntu touch) and other code to be modified for Ubuntu. (This section does not quite understand what to say)

 

Set up your Development Environment

At this moment we're using the android code base provided by Android aosp.

Everything we take from Android is just C/C ++, So you'll notice that your android build environment will be way smaller than when comparing to the traditional Android builds.

For development you can run any 64-bit desktop version of ubuntu between 12.04 lts and 13.04.

It's not strictly necessary, but it's helpful to install ccache. (http://source.android.com/source/initializing.html#ccache in the general Android Setup Guide shocould help with this .)

Additional packages which are used to build the host tools:

  • $ sudo apt-get install git gnupg flex bison gperf build-essential   zip bzr curl libc6-dev libncurses5-dev:i386 x11proto-core-dev   libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386   libgl1-mesa-dev g++-multilib mingw32 tofrodos   python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool

On utopic (and maybe other) the 4.8 version of G ++ is needed:

  • $ sudo apt-get install g++-4.8-multilib

Before 14.04 trusty you'll also need to set up the tools PPA.

Then you need to install phablet-tools:

  • $ sudo apt-get install phablet-tools

This will also installRepoTool, used to sync the android repositories. Learn more about the repo tool. If you already have a repo tool in your$ PathFrom previous Android development, be sure to remove it or make sure it's after the system repo command in the path. to check that the right repo command is used, you can issue$ Which Repo. This shoshould return/Usr/bin/Repo.

You can check out the source code using the repo and git tools already familiar to Android Rom developers, as described here

Https://wiki.ubuntu.com/Touch/AndroidDevel

Alternately, all the android code can be downloaded using the phablet-Dev-Bootstrap tool provided by the phablet-tools package installed in the previous step. this tool is a python wrapper around und repo and used to also check out bzr repositories before all code was managed by repo and git. for the purposes of getting the source code for development it is no longer needed.

To get the code setup run:

  • phablet-dev-bootstrap [target_directory]

If for some reason the sync ends midway, you can continue the sync with-CSwitch, so the command wocould be:

  • phablet-dev-bootstrap -c [target_directory]

Alternatively, if you are just building an image for an already supported device, you can specify-VSwitch:

  • phablet-dev-bootstrap -v [device codenames] [target_directory]

ThePhablet-Dev-BootstrapCommand will automatically useRepoTool with the Ubuntu touch preview custom manifest to download all the GIT repositories and needed data.Be aware that this step takes a long time and requires at least 15 GB (plus 2-3 GB for the binary output).

Build your compilation environment

Copyright. For more information, see the source:

Http://www.cnblogs.com/sickworm/p/3985296.html

 

Build an Ubuntu touch Environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.