[GUIDE] Create your own Ubuntu Touch Image for TF101

Search This thread

TomTcom

Senior Member
Mar 27, 2011
1,192
535
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://xdaforums.com/showthread.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.
 
Last edited:

TomTcom

Senior Member
Mar 27, 2011
1,192
535
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_device_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/​
 
Last edited:

TomTcom

Senior Member
Mar 27, 2011
1,192
535
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-touch/daily-preinstalled/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.
 
Last edited:

TomTcom

Senior Member
Mar 27, 2011
1,192
535
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)​
 
Last edited:

TomTcom

Senior Member
Mar 27, 2011
1,192
535
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​
 
Last edited:

TomTcom

Senior Member
Mar 27, 2011
1,192
535
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
 
  • Like
Reactions: shiangti

JahRush

New member
Aug 16, 2012
2
1
github Authentication

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

TomTcom

Senior Member
Mar 27, 2011
1,192
535
It asks for github Username and Password when trying to clone. Do i have to create account with them or what?

I don't think you have to.

Are you typing the command exactly as the guide is?

You can go directly to the link through the browser. I just checked that. Try being root and git clone?

Sent from my SGH-T999 using Tapatalk 2
 

JahRush

New member
Aug 16, 2012
2
1
I don't think you have to.

Are you typing the command exactly as the guide is?

You can go directly to the link through the browser. I just checked that. Try being root and git clone?

Sent from my SGH-T999 using Tapatalk 2

Heh, was entering link as git clone ht tps://github.com/jholtom/android_d...asus_tf101.git
All good now, thanks!
 
  • Like
Reactions: TomTcom

shiangti

New member
Mar 18, 2013
1
0
Noob lost

Sorry if this stupid but I am getting this error and I don't know what to do next. I am trying to learn Linux and this stuff goes over my head.

ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
Can't find toolchain for unknown architecture:
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.


Thanks.
 

TomTcom

Senior Member
Mar 27, 2011
1,192
535
Sorry if this stupid but I am getting this error and I don't know what to do next. I am trying to learn Linux and this stuff goes over my head.

ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
Can't find toolchain for unknown architecture:
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.
ls: cannot access device/*/tf101/cm.mk: No such file or directory
build/core/product_config.mk:234: *** Cannot locate config makefile for product "full". Stop.


Thanks.

You might have missed some stuff. Go back through the guide and tell me what you think worked and didn't work.

Just remember quantal was the only build actually allowing the device to boot however new updates have broke it for our devices so you may want to try something else.

Besides the developer preview is old and fairly useless. Neon graphics engine was the issue. It's not supported on tegra 2.

Even if you build the file the device probably won't boot just so you know.

Sent from my SGH-T999 using Tapatalk 4
 
  • Like
Reactions: shiangti

Banetbc

Member
Jul 25, 2013
14
9
Very nice write up. Would this be usable for something like running siriproxy? (I know, a iOS thing on Linux, eek!)
 
  • Like
Reactions: TomTcom

TomTcom

Senior Member
Mar 27, 2011
1,192
535
Very nice write up. Would this be usable for something like running siriproxy? (I know, a iOS thing on Linux, eek!)

I suppose any thing's possible however I'm not a dev. Just dangerous enough to compile and tell others how to do it.

Personally don't use this guide unless you can figure out the new merges, put it together, and even get it to boot. See my post above, it doesn't even boot except on an old quantal build so save yourself time and headache.

Without the neon support for graphics even a successful build of the file only gives a black screen on boot up for non quantal builds.

Sent from my SGH-T999 using Tapatalk 4
 

TomTcom

Senior Member
Mar 27, 2011
1,192
535
Additionally it's based off an old developer preview and many functions and features are non existent on it.

Sent from my SGH-T999 using Tapatalk 4
 

TomTcom

Senior Member
Mar 27, 2011
1,192
535
It's tough to say since many important features we would use were not available. I would characterize the working quantal build as just about "ok".

Sent from my SGH-T999 using Tapatalk 4
 
  • Like
Reactions: Exnor

ink55

New member
Dec 27, 2013
3
1
Thank you for your guide!
I got an error message when i was trying to run choosecombo (step 2 of Building and Installing The Image).
I already used your 2b command. The signapk.jar file is in the ~/UbuntuTouch/out/host/linux-x86/framework directory.
It tells me that it can't find the choosecombo command. What's wrong?
My OS is: Ubuntu 13.04 32 bit
Thank you for your help!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    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://xdaforums.com/showthread.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.
    5
    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_device_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/​
    4
    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-touch/daily-preinstalled/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.
    3
    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)​
    3
    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​