Remove All Ads from XDA

Linux on Pixel C : Running ubuntu xenial in a LXC container (27 september)

41 posts
Thanks Meter: 123
By Samt434, Member on 4th July 2016, 09:22 AM
Post Reply Email Thread
Hi guys,

Today i wanted to share with you some of my work to run linux on the pixel C.

First of all i'm not responsible for anything, so try this but i can't guarantee that it works for you and that you won't break your tablet (even though normally it should work ).
Secondly this thread is for people who know how to use correctly adb, fastboot and linux console, instructions are not very detailed here, so if you're stuck try a bit to search, you will learn a lot !

So first what is LXC ?

LXC (Linux Containers) is an operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel. (wikipedia)

We are gonna use this technology to run ubuntu on Pixel C (we will even be able to access to the GPU drivers in the future, i'm currently working on it)

So first, we need a special kernel where cgroups are activated.

Please download and flash my modified stock kernel for nrd90r :

fastboot flash boot boot.img
Try to see if you can run su in the tablet, otherwise you will have to install supersu.

Now, install busybox so that we have some tools to help us a bit :

Download now lxc compiled with PIE support for Pixel C and the ubuntu rootfs (here is a 32bit version, 64bit is also working fine on my tablet ) :

send it to the pixel C :
adb push lxc.tar.gz /sdcard/
Now extract the archive in /data
adb shell
tar xvzf /sdcard/lxc.tar.gz -C /data/
Now run ubuntu and enjoy !
# open a terminal as root on the tablet
# execute :
If everything goes well, you will see ubuntu booting
Welcome to Ubuntu 16.04 LTS!

Set hostname to <u3>.
[ OK ] Reached target Remote File Systems (Pre).
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Listening on Journal Socket.
[ OK ] Listening on udev Control Socket.
[ OK ] Reached target Swap.
[ OK ] Listening on Journal Audit Socket.
[ OK ] Reached target Remote File Systems.
[ OK ] Listening on Journal Socket (/dev/log).
[ OK ] Reached target Encrypted Volumes.
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ OK ] Listening on Syslog Socket.
[ OK ] Listening on udev Kernel Socket.

user : ubuntu
password :ubuntu

Internet will work out of box if your tablet has a net access, you can install, remove things using apt

What is going on for this project :

I'm currently trying to use the GPU drivers using libhybris so that in the future we can run wayland on pixel C and have a fully working linux environnement ! (KDE, gnome)
see here for KDE, we need to port this :
I need help for this (because it's difficult). For this, we will have to patch bionic so that we can use libhybris. All the devs can contribute here )

If you're happy of this work and you want to have more detailed instructions please pay me a beer ! Because developing for Pixel C is time consuming
The Following 20 Users Say Thank You to Samt434 For This Useful Post: [ View ] Gift Samt434 Ad-Free
4th July 2016, 09:26 AM |#2  
OP Member
Thanks Meter: 123
Donate to Me

For people that just want to use lxc alone building there own images, here is a lxc version with PIE support enabled :
4th July 2016, 04:21 PM |#3  
Flag Hagenberg
Thanks Meter: 19
works perfekt, thanks
4th July 2016, 06:21 PM |#4  
Junior Member
Thanks Meter: 0
Whenever you get around to posting the 6.X kernel, I'd be happy to help test this on Dirty Unicorns 10.3 stable. I've wanted a non-virtualized Ubuntu install on my Pixel C for a while so I can use it to replace my laptop for research, and an LXC seems like a great way to make that happen.

Thanks for taking the time to work on this!
6th July 2016, 06:00 PM |#5  
Senior Member
Thanks Meter: 72
Great work, thank you! It works as described on preview 4. It would be awesome to see a full Linux desktop on the Pixel C. I'd be glad to test - if there's a way back
13th August 2016, 08:19 PM |#6  
Senior Member
Flag murcia
Thanks Meter: 9
Donate to Me
after flash boot.img the tablet is not boot. i am use last update .
16th August 2016, 02:50 PM |#7  
pivotraze's Avatar
Senior Member
Flag Belcamp, MD
Thanks Meter: 10
Donate to Me
I'm looking forward to using this on my Pixel C once there is a graphical environment.

While you are working on the GPU, is it possible to install XServer/Gnome/etc along with a VNC server and connect to it via a VNC client on Android? If so, could you quickly explain how to do it with this?
24th August 2016, 10:09 AM |#8  
Kyuubi10's Avatar
Senior Member
Thanks Meter: 515
Yo OP, wouldn't it be better to use Arch Linux for this project? You know, considering the better documentation for Arch, and bigger cooperation of the community?
Great attempt though, if I get a Pixel C as planned I would like to test this!

---------- Post added at 09:09 AM ---------- Previous post was at 09:06 AM ----------

@Samt434 forgot to quote you lol.
The Following User Says Thank You to Kyuubi10 For This Useful Post: [ View ] Gift Kyuubi10 Ad-Free
16th September 2016, 09:19 AM |#9  
OP Member
Thanks Meter: 123
Donate to Me
Hi guys, sorry for the late answer. I will update everything so that LXC can run on the lastest android version soon !
There is a great anoucement coming Stay tuned !
The Following 6 Users Say Thank You to Samt434 For This Useful Post: [ View ] Gift Samt434 Ad-Free
16th September 2016, 09:25 AM |#10  
TheBready's Avatar
Flag Berlin
Thanks Meter: 24
Originally Posted by Samt434

Hi guys, sorry for the late answer. I will update everything so that LXC can run on the lastest android version soon !
There is a great anoucement coming Stay tuned !

Yeah, can't wait.
19th September 2016, 09:42 PM |#11  
Junior Member
Thanks Meter: 0
How does this compare to Linux Deploy? I've got Ubuntu running with Linux Deploy using the android XSDL X server for display and it runs pretty well.
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes