Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,530 Members 42,116 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] Create your own Ubuntu Touch Image for TF101

Tip us?
 
TomTcom
Old
(Last edited by TomTcom; 19th June 2013 at 11:14 AM.)
#1  
TomTcom's Avatar
Recognized Contributor - OP
Thanks Meter 458
Posts: 1,049
Join Date: Mar 2011
Default [GUIDE] Create your own Ubuntu Touch Image for TF101

This guide is designed to help you compile and flash your own Ubuntu Touch builds for the Asus TF-101.

All source links located in the XDA OP: http://forum.xda-developers.com/show....php?t=2168473
Original Instructions and Additional Information: https://wiki.ubuntu.com/Touch/Devices/tf101

Required: Ubuntu 12.04 13.04 (VM should work without issue)
Required: CWM Recovery or TWRP Recovery (No version restriction that I know of)

I take no credit for creating anything other than making it easier for the community to have fun and help contribute, please see the XDA OP and thank other members who are working hard to make this happen including JHoltom and Onkel Bebu.

If you are new to Linux please read these directions carefully. I have segmented them into "Setting Up Your Development Environment", "Building The Image", "Sync Repos and Update, "Common Commands and Actions"

Please note the directory locations are important. ~/ represents your home directory. So on my box my full path is /home/thomas/Build/Images/UbuntuTouch (you do not need to include Build, Images, or UbuntuTouch. Just make sure you replace "thomas" with your username or a suitable directory location of your choice but I reccommend using "UbuntuTouch" as your main directory. I will refer to ~/UbuntuTouch and sub-directories so you understand the paths.
The Following 9 Users Say Thank You to TomTcom For This Useful Post: [ Click to Expand ]
 
TomTcom
Old
(Last edited by TomTcom; 17th June 2013 at 01:58 PM.)
#2  
TomTcom's Avatar
Recognized Contributor - OP
Thanks Meter 458
Posts: 1,049
Join Date: Mar 2011
Setting Up Your Development Environment

1. Open Terminal and copy/paste the command below. These are the packages needed to create the build before flashing.
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
2. The PPA has the tools and dependencies to support Precise, Quantal, and Raring. Add the Ubuntu Touch PPA (personal package archive) by adding the following custom source list entry to your /etc/apt/sources.list file.

2a. From Terminal, execute this command:
sudo add-apt-repository ppa: phablet-team/tools (remove space between colon and the p in phablet, if I didn't put a space it would show a smiley face instead)
2b. (optional) If the above command does not work, you can manually edit your sources.list using an editor of your choice:
deb http://ppa.launchpad.net/phablet-team/tools/ubuntu [dist-codename] main
deb-src http://ppa.launchpad.net/phablet-team/tools/ubuntu [dist-codename] main
*Note: replace [dist-codename] with precise, quantal or raring
3. From Terminal, execute these 2 commands:
sudo apt-get update
sudo apt-get install phablet-tools android-tools-adb android-tools-fastboot
4. This next command is important but can be misleading. The Ubuntu Touch porting guide indicated running the command without options first. I had to use -c option to get it to work. If you are experimental do however you wish otherwise if you are new like me just stick with the first command I have listed.

4a. From Terminal, execute the following command:
phablet-dev-bootstrap -c ~/UbuntuTouch
(When prompted, enter name, no need to enter email, prompts for identity press Y if correct, choose Y for color display). This steps takes a fairly long time depending on network speed and your computer speed. It could be an hour or two.
4b. (optional)Alternatively try this: phablet-dev-bootstrap

5. From Terminal, execute the following commands:
mkdir -p ~/UbuntuTouch/device/asus
mkdir -p ~/UbuntuTouch/kernel/asus
6. Clone the following repositories into the directory ~/UbuntuTouch/device/asus/ and ~/UbuntuTouch/kernel/asus/ where git clone will be performed for the device and kernel git's respectively.

6a. From terminal, cd to "device" and "kernel" directories respectively to clone the repo into the right locations.
git clone https://github.com/jholtom/android_d...asus_tf101.git tf101 (this clones the git repo into ~/UbuntuTouch/device/asus/
git clone https://github.com/jholtom/kernel_asus_tf101-lumpy.git tf101 (this clones the git repo into ~/UbuntuTouch/kernel/asus/
The Following 5 Users Say Thank You to TomTcom For This Useful Post: [ Click to Expand ]
 
TomTcom
Old
(Last edited by TomTcom; 19th June 2013 at 01:35 AM.)
#3  
TomTcom's Avatar
Recognized Contributor - OP
Thanks Meter 458
Posts: 1,049
Join Date: Mar 2011
Building and Installing The Image

1. From Terminal, cd to ~/UbuntuTouch

1a. From Terminal, execute the following command:
. build/envsetup.sh
2. From Terminal, execute the following command:
choosecombo release cm_tf101 eng && make -j{number of cores}+1 otapackage
To be clear, your command without quotes is based on single core, dual core, or quad core (the -j option adding 1) "choosecombo release cm_tf101 eng && make -j5 otapackage" (I have a quad core processor, if you had a dual core processor it would be make -j3)
2a. If you get an error regarding signapk.jar, the file is not in the directory the make file is looking for.

2b. From Terminal, execute the following command:
cp ~/UbuntuTouch/prebuilts/sdk/tools/lib/signapk.jar ~/UbuntuTouch/out/host/linux-x86/framework
3. Your new build will be called "cm_tf101-ota-eng.root.zip". The file will be located in ~/UbuntuTouch/out/target/product/tf101/.

4. To install your newly created image, boot your tf101 into Recovery.
Wipe data, factory reset. In this order only, first flash cm_tf101-ota-eng.root.zip (your newly created image).
Now download the preinstalled-phablet-armhf.zip from here: http://cdimage.ubuntu.com/ubuntu-tou...alled/current/ OR here: http://cdimage.ubuntu.com/ubuntu-touch-preview/quantal/
Now flash this file.
Clear cache and reboot the tf101.
5. After your first image is made, it is up to you to choose a new daily build of preinstalled-phablet-armhf.zip and then simply repeat steps in this section.

6. To build the image again, all you need to do is execute steps 1, 1a., and 2.
The Following 4 Users Say Thank You to TomTcom For This Useful Post: [ Click to Expand ]
 
TomTcom
Old
(Last edited by TomTcom; 18th June 2013 at 01:10 AM.)
#4  
TomTcom's Avatar
Recognized Contributor - OP
Thanks Meter 458
Posts: 1,049
Join Date: Mar 2011
Sync Repos and Updates

1. At any given time, the repos maintained on JHoltom's github may have updates. If you notice an update when you go to the github site, you will want to sync your local repos before building the image again.

1a. From Terminal, execute the following commands in the respective repo directories (either device OR kernel).
git pull (from ~/UbuntuTouch/device/asus/tf101)
git pull (from ~/UbuntuTouch/kernel/asus/tf101)
The Following 3 Users Say Thank You to TomTcom For This Useful Post: [ Click to Expand ]
 
TomTcom
Old
(Last edited by TomTcom; 17th June 2013 at 01:51 PM.)
#5  
TomTcom's Avatar
Recognized Contributor - OP
Thanks Meter 458
Posts: 1,049
Join Date: Mar 2011
Common Commands and Actions

This section answers some of the question about how and "now what" type things.
Source: https://wiki.ubuntu.com/Touch/ReleaseNotes
Additional Sources: Posts on XDA by JHoltom and Onkel Bebu
***NOTE***The password in all of these images you download is "phablet".

1. How do I access Ubuntu Touch local directories from my desktop using ADB?

1a. From Terminal, execute the following commands in order:
adb root
adb shell
ubuntu_chroot shell
sudo su -
ls
2. How do I pull a log when the dev asks me to get a log?

2a. From Terminal, execute the following commands in order:
adb root
adb shell "for f in /data/ubuntu/home/phablet/.ubuntu-session/logs/*.log ; do echo \$f: ; cat \$f; echo ; done" > tf101.log
adb shell ls -la /data/ubuntu/etc/ubuntu-session.d/ >> tf101.log
3. How do I install open-ssh server on the tablet?

3a. From Terminal, execute the following commands:
adb shell
ubuntu_chroot shell
sudo su -
apt-get install openssh-server
4. How do I SSH into my tablet?

4a. You can SSH from the command line via Terminal OR install FileZilla on your Desktop/Laptop PC.

4b. From Terminal, execute the following commands:
adb shell
ubuntu_chroot shell
sudo su -
ip addr show wlan0
ssh phablet@ipaddress_of_device (This is the command for Terminal, otherwise open FileZilla and make your connection there. See question 5 for port forwarding.)
5. How do I do SSH port forwarding for accessing the TF101 over USB/ADB SSH?

5a. From Terminal, execute the following commands:
adb forward tcp:8888 tcp:22
ssh phablet@localhost -p 8888
6. I want to exit adb shell, how do I do it?

6a. From Terminal, you can type several "exit" commands or Ctrl + D till you are back to your home prompt.

7. How do I mount or see system files/directories?

7a. From Terminal in adb shell, execute this command:
sudo mount -t proc proc /proc
The Following 3 Users Say Thank You to TomTcom For This Useful Post: [ Click to Expand ]
 
macpherson1999
Old
#6  
Member
Thanks Meter 13
Posts: 69
Join Date: Dec 2011
Quote:
Originally Posted by TomTcom View Post
Not finished yet, this is a WIP and I'll et you know when everything is done and good to go.
Amazing Work man! Hope this help developers to get functional Ubuntu on our Transformer!
The Following 2 Users Say Thank You to macpherson1999 For This Useful Post: [ Click to Expand ]
 
bfmetcalf
Old
#7  
bfmetcalf's Avatar
Senior Member
Thanks Meter 129
Posts: 293
Join Date: Feb 2011

 
DONATE TO ME
Quote:
Originally Posted by TomTcom View Post
-Snip-
Required: Linux 12.04 13.04 (VM should work without issue)
-snip-
Looks good, just one thing, you may want to change the wording of this part from Linux to Ubuntu as most linux distro's won't be version 12.04 or 13.04 and your guide is written for Ubuntu specifically. Other than that great write up
TF101! - Running a somewhat working PAC-man built on my beautiful ArchLinux box! - My Dev-Host - My GitHub
Samsung Galaxy S4 - Stock sadly

I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious. - Vince Lombardi

The Following User Says Thank You to bfmetcalf For This Useful Post: [ Click to Expand ]
 
TomTcom
Old
#8  
TomTcom's Avatar
Recognized Contributor - OP
Thanks Meter 458
Posts: 1,049
Join Date: Mar 2011
Quote:
Originally Posted by bfmetcalf View Post
Looks good, just one thing, you may want to change the wording of this part from Linux to Ubuntu as most linux distro's won't be version 12.04 or 13.04 and your guide is written for Ubuntu specifically. Other than that great write up
You're right! Done, thanks!

Sent from my SGH-T999 using Tapatalk 2
The Following User Says Thank You to TomTcom For This Useful Post: [ Click to Expand ]
 
gvrayden
Old
#9  
Junior Member
Thanks Meter 1
Posts: 4
Join Date: Sep 2012
Great job! Thanks!

Sent from my Transformer TF101 using Tapatalk 4 Beta
The Following User Says Thank You to gvrayden For This Useful Post: [ Click to Expand ]
 
JahRush
Old
#10  
Junior Member
Thanks Meter 1
Posts: 2
Join Date: Aug 2012
Default github Authentication

It asks for github Username and Password when trying to clone. Do i have to create account with them or what?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes