FORUMS
Remove All Ads from XDA

[Dev-Only]Ubuntu-Touch

5,963 posts
Thanks Meter: 2,389
 
Post Reply Email Thread


That said, Hello everyone!
As you may know the latest Ubuntu previews are much more better than the first ones (obviously, this is called development ) and they can be used, maybe , pretty much as a good daily system. In fact many of the things that weren't working before have been fixed and they work now
I wanted to create this post in order to discuss about the Ubuntu development in one single place which is right here.


>>>>>OFFICIAL UBUNTU PORTING GUIDE<<<<<
>>>>>USEFUL GUIDE<<<<<

I'll write down what to do in order to begin developing, most of you won't need it in fact this will be more as a check guide to make sure that you did every thing right, but just in case.


DEVELOPMENT PROGRESS:
Code:
...Coming Soon...

The Following 46 Users Say Thank You to matt95 For This Useful Post: [ View ] Gift matt95 Ad-Free
 
 
20th June 2013, 04:00 PM |#2  
matt95's Avatar
OP Senior Member
Flag Milan
Thanks Meter: 2,389
 
Donate to Me
More
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
Code:
$ 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
Code:
$ 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
Code:
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
Code:
$ 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
Code:
$ 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
Code:
<?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
Code:
$ 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
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
Code:
# 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
Code:
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);
}
Code:
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
Code:
external/wpa_supplicant_8_ti \
Code:
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
Code:
$ 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
Code:
$ cd ubuntu-touch
$ make clean
Hope this helps, good luck and report if you discover something important
Attached Files
File Type: txt cyanogenmod_endeavoru_defconfig.txt - [Click for QR Code] (90.4 KB, 88 views)
File Type: txt main.mk.txt - [Click for QR Code] (33.3 KB, 86 views)
File Type: c array.c - [Click for QR Code] (13.5 KB, 82 views)
File Type: txt init.txt - [Click for QR Code] (22.3 KB, 131 views)
The Following 18 Users Say Thank You to matt95 For This Useful Post: [ View ] Gift matt95 Ad-Free
20th June 2013, 04:01 PM |#3  
matt95's Avatar
OP Senior Member
Flag Milan
Thanks Meter: 2,389
 
Donate to Me
More
CREDITS
Huge thanks goes to these guys who helped developing this project thumbup for them!
>>>>>@Thunder07<<<<<
>>>>>@Jhinta<<<<<
@TToivanen
@utopykzebulon
@One-X-master
ISSUES
#Overheat (Depends on the usage)
#Phone Call
#Sms
#Some icons don't show up
#Phone Network
#Camera

DOWNLOADS
Android Layer
boot.img
Ubuntu Package (Download the armhf.zip.)
HOW TO INSTALL
1- Full-Wipe
2- Flash Android Layer in recovery
3- Flash Ubuntu Package in recovery
4- Flash Provided boot.img
5- Reboot

The Following 14 Users Say Thank You to matt95 For This Useful Post: [ View ] Gift matt95 Ad-Free
20th June 2013, 04:06 PM |#4  
Guest
Thanks Meter: 2,159
 
More
You have to build them mate...and not port it..

Sent from my HTC One using xda premium
The Following 2 Users Say Thank You to razer1224 For This Useful Post: [ View ] Gift razer1224 Ad-Free
20th June 2013, 04:09 PM |#5  
matt95's Avatar
OP Senior Member
Flag Milan
Thanks Meter: 2,389
 
Donate to Me
More
Quote:
Originally Posted by razer1224

You have to build them mate...and not port it..

Sent from my HTC One using xda premium

Yeah you're right i'll change the title

EDIT: should be ok now, however it could be considered as a kind of porting but this is not the point
The Following 4 Users Say Thank You to matt95 For This Useful Post: [ View ] Gift matt95 Ad-Free
20th June 2013, 11:56 PM |#6  
matt95's Avatar
OP Senior Member
Flag Milan
Thanks Meter: 2,389
 
Donate to Me
More
Tomorrow i'll post my source code so everyone can clone it to wherever he wants

EDIT: i run into some problems with github, i'll probably upload it on the weekend. Sorry guys
The Following 3 Users Say Thank You to matt95 For This Useful Post: [ View ] Gift matt95 Ad-Free
21st June 2013, 11:17 AM |#7  
matt95's Avatar
OP Senior Member
Flag Milan
Thanks Meter: 2,389
 
Donate to Me
More
OP updated, if someone wants to try, i have wrote down a little guide on how to begin compiling this... need to finish it though give me about half an hour and all will be written

EDIT: Finished, everything should be ok now
The Following 4 Users Say Thank You to matt95 For This Useful Post: [ View ] Gift matt95 Ad-Free
21st June 2013, 01:27 PM |#8  
DeeZZ_NuuZZ's Avatar
Senior Member
Flag Hanover
Thanks Meter: 4,431
 
Donate to Me
More
Quote:
Originally Posted by gianmarco957

Does data, phone, messages etc work?

if boot is working then maybe some other things are working too...but mhm i also don't know

---------- Post added at 02:27 PM ---------- Previous post was at 02:14 PM ----------

we need ubuntu on pc for those packages right? if yes i have to install it the next days then i also can try it :P
The Following 2 Users Say Thank You to DeeZZ_NuuZZ For This Useful Post: [ View ] Gift DeeZZ_NuuZZ Ad-Free
21st June 2013, 01:28 PM |#9  
matt95's Avatar
OP Senior Member
Flag Milan
Thanks Meter: 2,389
 
Donate to Me
More
Quote:
Originally Posted by One-X-master

[/COLOR]we need ubuntu on pc for those packages right? if yes i have to install it the next days then i also can try it :P

yes, >12.04 ubuntu needed
The Following User Says Thank You to matt95 For This Useful Post: [ View ] Gift matt95 Ad-Free
21st June 2013, 01:43 PM |#10  
DeeZZ_NuuZZ's Avatar
Senior Member
Flag Hanover
Thanks Meter: 4,431
 
Donate to Me
More
Quote:
Originally Posted by matt95

yes, >12.04 ubuntu needed

ok will install and try it the next days how much space do i need for all those packages which are in OP, i mean which i need download from the repos?
21st June 2013, 01:44 PM |#11  
matt95's Avatar
OP Senior Member
Flag Milan
Thanks Meter: 2,389
 
Donate to Me
More
Quote:
Originally Posted by One-X-master

ok will install and try it the next days how much space do i need for all those packages which are in OP, i mean which i need download from the repos?

i'll say about 20Gb to be sure
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes