[Ubuntu Touch Development and Hacking] montolla:
[UNOFFICIAL][I9500][UBUNTU TOUCH][CM 10.1][GT-I9500][Develop][20140315v1]

Started at March 15th 2014

Last update April 4th 2014

**

Ubuntu Touch

**

**

Based on CyanogenMod 10.1

**

**

For Samsung Galaxy s4

**

**

GT-I9500

**

​

About Project

​

This project was created for build, develop and deploy Ubuntu Touch on Samsung Galaxy S4 GT-I9500.

Currently, there are other versions of S4 like quadcore based or specific region are officialy supported by CyanogenMod Team and some ones has Ubuntu Touch preview ready.

I used lubuntu 13.10 x64 to build the initial AOSP.

Objetives

​

Get source of Ubuntu Touch.

Get sources and documentation for I9500.

Get successful build of Ubuntu touch.

Get Ubuntu Touch running on I9500.

Get Ubuntu Touch successful working on I9500.

Make new applications for Ubuntu Touch.

Waiting for new release.

@TODO

​

To clone all git-hub repositories for i9500 device, hardware and kernel.

To create a new CM-10.2 Branch on all of them.

To Try again wiht the new cloned CM-10.2 Repositories.

@Observations

​

Into the device repository, There are some files about repository depends for i9500, How to compile for samsung specific "vendedor", and how to extract the property binaries and where they are.

Prepare the Build Environment

​

Package requirements

$ sudo add-apt-repository ppa:phablet-team/tools

$ sudo apt-get update && apt-get -y install bison build-essential curl flex git-core gnupg gperf libesd0-dev libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-6-jdk openjdk-6-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev phablet-tools android-tools-adb android-tools-fastboot nano curl ubuntu-dev-tools

Editing .bashrc

$ nano ~/.bashrc

Adding global variables

export PATH=${PATH}:~/
export USE_CCACHE=1
export CCACHE_DIR=~/ccache
export OUT_DIR_COMMON_BASE=~/out
export PATH=$PATH:~/bin

Save it

[Control][O] and press enter to confirm.

Apply them

$ mkdir ~/ccache
$ mkdir ~/out
$ mkdir ~/bin
$ sh ~/.bashrc

Getting the Repositories
​

Be sure to be on your home directory

$ cd ~

Initialize the repo and main git

$ repo init -u git://phablet.ubuntu.com/CyanogenMod/android.git -b phablet-10.1

On error use this and run las command egain

$ git config --global user.name "montolla"
$ git config --global user.email "montolla@montolla.tk"

Editing

$ nano .repo/manifests/default.xml

Edit the main repository

Find all entrys with Path="device andremove them

<!--
<project path="device/common" name="CyanogenMod/android_device_common" />
<project path="device/generic/armv7-a-neon" name="CyanogenMod/android_device_generic_armv7-a-neon" />
<project path="device/generic/armv7-a" name="CyanogenMod/android_device_generic_armv7-a" />
<project path="device/generic/common" name="CyanogenMod/android_device_generic_common" />
<project path="device/generic/goldfish" name="CyanogenMod/android_device_generic_goldfish" />
<project path="device/generic/mips" name="CyanogenMod/android_device_generic_mips" />
<project path="device/generic/x86" name="CyanogenMod/android_device_generic_x86" />
<project path="device/sample" name="CyanogenMod/android_device_sample" groups="device" />
<project path="device/ti/panda" name="CyanogenMod/android_device_ti_panda" groups="device" />
-->

In nano you can find with [control][w] type device and press enter, then egain

[control][w] enter and nano will find the next result.

Put between end of file and before </manifest> tag

<!--
i9500
-->
<project name="CyanogenMod/android_kernel_samsung_jf" path="kernel/samsung/i9500" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_kernel_samsung_exynos5410" path="kernel/samsung/exynos5410" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_hardware_samsung_slsi_exynos5410" path="hardware/samsung_slsi/exynos5410" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_hardware_samsung_slsi_exynos" path="hardware/samsung_slsi/exynos" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_hardware_samsung_slsi_exynos5-insignal" path="hardware/samsung_slsi/exynos5-insignal" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_hardware_samsung_slsi_openmax" path="hardware/samsung_slsi/openmax" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_samsung_i9500" path="device/samsung/i9500" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_samsung_jfltetmo" path="device/samsung/jfltetmo" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_samsung_msm8960-common" path="device/samsung/msm8960-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_samsung_jf-common" path="device/samsung/jf-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_kernel_samsung_jf" path="kernel/samsung/jf" remote="github" revision="cm-11.0" />
<!--
i9500
-->

Save it

[Control][O] and press enter to confirm.

Update the main repository with the new gits

$ repo init -m default.xml

Now lets start syncing all

$ repo sync

If you was done something wrong you can remove all entire repo folder and start again

$ rm -Rf .repo

But that just will delete the repo folder, not the source code, so if run repo sync again will be much more faster.

$ repo sync

Building
​

Applying patches

$ repo start ubuntu-touch device/samsung/i9500 ubuntu/uchroot

Check if device is connected and ready

$ adb devices

Getting some files from current devices (3 files for me)

$ cd ~/vendor/cm
$ ./get-prebuilts
$ cd ~

Start the process

$ chmod 777 ~
$ repo selfupdate
$ source build/envsetup.sh
$ breakfast i9500
$ cd device/samsung/i9500
$ ./extract-files.sh
$ croot
$ brunch i9500

Wait while build finish

There could be errors about low memory or no left space on disk.

You can fix/prevent that increasing your swap area, running a low graphics desktop enviroment (lxde) and use ccache component activated (I think it is already activated and setting up).

Documentation

​

http://wiki.cyanogenmod.org/w/I9500_Info

https://github.com/f69m/ubuntu-touch-tf300t/wiki/Build-Ubuntu-Touch-for-ASUS-Transformer-TF300T

http://wiki.cyanogenmod.org/w/Build_for_i9500

​