[HTC One X] matt95:
Do not follow these steps, they're old. I'm updating the post in a few days.

HOW TO SETUP THE DEVELOPMENT ENVIRONMENT

Packages Needed

$ 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 ubuntu-dev-tools tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool bsdiff

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

Ok the first thing we're going to do is of course downloading the sources. The sources that Ubuntu-touch uses are the same as the CyanogenMod but they have only C/C++ files.

Download the sources

phablet-dev-bootstrap (-j4) ubuntu-touch

This will download all the sources in the ubuntu-touch directory, it will take a while so take it easy :)

Once finished you need to download all the extra repos for the HTC One X

$ cd ubuntu-touch
$ . build/envsetup.sh
$ breakfast endeavoru

It should start downloading all the extra files automatically.

We need one more thing to begin the editing part, the vendor files. To get them we need to add some lines in the local_manifest of the ubuntu-touch/.repo/ directory, inside of it there should be a file named roomservice.xml or something similar and we need to edit that one

$ gedit ubuntu-touch/.repo/local-manifest/roomservice.xml

Now a text editor should come up, delete everything that's inside of it and replace it with this one

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_htc_endeavoru" path="device/htc/endeavoru" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_kernel_htc_endeavoru" path="kernel/htc/endeavoru" remote="github" revision="cm-10.1" />
<project name="TheMuppets/proprietary_vendor_htc.git" path="vendor/htc" remote="github" revision="cm-10.1" />
</manifest>

Save the file and finally type

$ repo sync (-j4)

This will donwload the lastest files we need.

Changes Needed

Ok right now that our directory contains all the needed files we need to edit some of them to compile this without any issue.

I'll write down what i have edited (the same things that the ubuntu site says) but as you know the output .zip won't pass the bootanimation process so we all guess that there's more to edit to get everything working.

NOTE: I won't explain WHY we need to edit these files, if you want to know this refer to the ubuntu official porting guide :rolleyes:

First of all we need to edit the fstab.endeavoru that can be found in the ubuntu-touch/device/htc/endeavoru/ramdisk directory. We need to delete the nosuid from the /data partition and in the end it should look like this

# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro,barrier=0 wait
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 noatime,nodev,noauto_da_alloc,barrier=0 wait,encryptable=/dev/block/platform/sdhci-tegra.3/by-name/DUM
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,barrier=0 wait
/dev/block/platform/sdhci-tegra.3/by-name/RCA /rca ext4 noatime,ro,barrier=0 wait
/dev/block/platform/sdhci-tegra.3/by-name/RFS /rfs ext4 noatime,rw,barrier=0 wait
/dev/block/platform/sdhci-tegra.3/by-name/DLG /devlog ext4 nosuid,nodev,barrier=0 defaults

Next we need to add some more features to the Kernel, go to the ubuntu-touch/kernel/htc/endeavoru/arch/arm/configs directory and edit the file named cyanogenmod_endeavoru_defconfig. We need to add these strings

CONFIG_SYSVIPC=y

CONFIG_NAMESPACES=y

CONFIG_UTS_NS=y

CONFIG_IPC_NS=y

CONFIG_USER_NS=y

CONFIG_PID_NS=y

CONFIG_NET_NS=y

CONFIG_DEVTMPFS=y

CONFIG_DEVTMPFS_MOUNT=y

CONFIG_DEVPTS_MULTIPLE_INSTANCES=y

CONFIG_FSNOTIFY=y

CONFIG_DNOTIFY=y

CONFIG_INOTIFY_USER=y

CONFIG_FANOTIFY=y

CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y

CONFIG_SWAP=y

# CONFIG_ANDROID_PARANOID_NETWORK is not set

CONFIG_VT=y

CONFIG_VT_CONSOLE=y.

I'll directly attach mine in a .txt file so that you can compare the two

At this point we need to change the init.rc located in the ubuntu-touch/device/htc/endeavoru/ramdisk, i'll attach mine in a .txt file so that you can replace it with the original one

Next we need to add some more code to the ubuntu-touch/kernel/htc/endeavoru/fs/proc/array.c file, in particular we need to add these lines here

static void task_vpid(struct seq_file *m, struct task_struct *task)
{
struct pid_namespace *ns = task_active_pid_ns(task);
seq_printf(m, "Vpid:\t%d\n", ns ? task_pid_nr_ns(task, ns) : 0);
}

task_vpid(m, task);

You'll find my file again attached down here

Finally we need one more file to compete the editing process, the ubuntu-touch/build/core/main.mk. This file is the one that "controls" the build process so it is very important, if you do not edit this file the compile process will break at some point. We need to add two lines in the right place and order

external/wpa_supplicant_8_ti \

vendor/htc \

Again, you'll find my file attached in a .txt file, where to put these lines is very intuitive though.

Now we are good to compile it, navigate to the ubuntu-touch directory and type

$ cd ubuntu-touch
$ . build/envsetup.sh
brunch endeavoru

At this point the terminal will begin to compile the base. When it finishes you will find the base in the out/target/product/endeavoru folder

NOTE: Everytime you want to compile again, make sure to type

$ cd ubuntu-touch
$ make clean

Hope this helps, good luck and report if you discover something important :)