This repo aims at documenting how to run GNU/Linux on a Google Pixel C (2015) device.
The Pixel C is a 10.2 inch Android tablet, made by Google, which was released on December 8, 2015. It didn't had much success apparently, but its hardware is definitively still a flagship killer.
Unfortunately it runs Android, which doesn't seem to be really a productive / development oriented operating system, therefore we decided to port a Linux distro to it, to make it more productive and fast.
Right now we've got Arch Linux Arm to work on the device. We haven't tried other distros yet, but PR are always welcome.
@q66 is planning a port of Void Linux.
We are still in an alpha stage, the device boots with the latest kernel (4.17-rc2 as of 2018-05-04) but has still many a couple of issues that makes it hard to use as a daily driver.
You can follow the issues here: if you happen to know how to solve one of these problems, please help us! Even the smallest comment may bring us one step forward.
We have a Telegram Group and an IRC channel on freenode (#linux-on-pixel-c
). Joining on the group or the channel is the same - the chats are linked together.
Google Pixel C (2015)
Plug the ethernet cable, then plug the USB Ethernet adapter to your Pixel C. As soon as the adapter is detected, the Pixel C (if it booted correctly) will get an IP address via DHCP. Use the IP to log-in
WARNING: You may void your warranty. I am not responsible for bricked devices, dead SD cards, or thermonuclear wars. Seriously though, if after a kernel modification you've made, the device gets too hot: you probably messed up with the thermal sensor and you may need to consider a force shutdown (by pressing Power + Vol- until the device powers itself off) before any damage may appear. Whilst I played around with my Pixel C on my own and never had any problem whatsoever, you may not be as lucky as I was. If you are not sure about a modification you've made, keep the device monitored. Don't put yourself in danger, we still need you.
WARNING: If you're going to put your rootfs in /data/
you need dm-verity and encryption OFF, or a newly formatted /data
partion. Otherwise the system won't be able to boot into Linux. You can still put the rootfs in /system
to avoid formatting the /data
partition.
Choose one of the following (the first one is strongly recommended):
Be aware that the official ALARM rootfs requires an USB Ethernet adapter since the Wireless connection to a "PixelC" hotspot isn't preconfigured. You will also need to configure your Desktop Manager and your Sessions, all without seeing anything on the screen.
Username | Password |
---|---|
alarm | alarm |
root | root |
Username | Password |
---|---|
alarm | pixelcalarm |
Username | Password |
---|---|
alarm | alarm |
NOTE: You may need this busybox binary, personally I had some troubles when extracting tar.gz
files with TWRP included busybox (returns "Killed" after some files extracted / has many segfaults). Therefore you may need to adb push busybox-armv6l /cache; chmod u+x /cache/busybox-armv6l
and then call /cache/busybox-armv6l tar -xvf ...
instead
This is the default setup, all the kernel releases (boot images) are created assuming you want to boot from /data/Arch
adb push arch-xfce-lightdm.tar.gz /data/
adb shell
(gets a shell into the device)cd /data
tar -xvf arch-xfce-lightdm.tar.gz
This is a different approach, it is useful because saves you the /data
partition (in case you don't want to wipe it), but the filesystem will be limited to 3.76GB and you'll need a different initramfs (therefore you'll need a different prebuilt boot.img).
adb push arch-xfce-lightdm.tar.gz /cache/
adb shell
(gets a shell into the device)mount -o rw /dev/block/mmcblk0p4 /system
(mounts /system
in r/w)rm -rf /system/*
(deletes the content of /system
)tar -xvf /cache/arch-xfce-lightdm.tar.gz -C /system
(extracts the FS to /system)Use this boot.img. Be aware, it is unsigned, therefore you can only use it with fastboot boot boot.img.unsigned
.
Prebuilt boot.img images aren't available yet, but you can still boot the system by putting the Pixel C in fastboot mode and doing
Prebuilt images are available here, just flash the latest boot.img with the following command.
Note: The images that use /system
instead of /data/Arch
are marked as Pre-Release
and are labelled as such.
fastboot flash boot boot.img
fastboot boot boot.img
Pull the dvitali/android-build-tools image with docker pull dvitali/android-build-tools
or build it yourself from this repository.
Run the container with:
docker run -v kernel:/kernel -it dvitali/android-build-tools:latest
This will give you a shell (zsh) from where you can compile the kernel - all the necessary tools are there.
If you need another shell, just do docker exec -it containerName zsh
(where containerName
is the name of the container, which can be found with docker ps
)
Run the following commands in the docker container:
cd /kernel
git clone https://github.com/denysvitali/linux-smaug/ -b linux-4.13-rc4 linux-smaug
cd linux-smaug/
make -j$(nproc)
./build-image.sh
wget https://ded1.denv.it/pixel-c/ramdisk.gz -O /kernel/ramdisk.gz
For the last command, you can use your own ramdisk, or compile it from my source.
Mount the kernel
dir in your home:
mkdir ~/kernel
sudo mount -o bind /var/lib/docker/volumes/kernel/_data ~/kernel
sudo fastboot boot ~/kernel/linux-smaug/Image.fit ~/kernel/ramdisk.gz
If your screen looks like this after booting the image, wonderful! It means that it is booting (don't be scared about the static).
I honestly was really scared at first, but don't worry, if my Pixel C didn't die after all I did, this won't be harmful
Arch Linux Forums: How to compile the Pixel C Kernel
Thierry's Blog: Booting a Pixel C tablet with a custom kernel
Git at Google: Kernel for Tegra
GitHub: Mathieu's Kernel for Smaug (4.11-RC1)
GitHub: Mathieu's Ramdisk
GitHub: My Kernel for Smaug (4.13-RC4)
GitHub: My initramfs
Pixel C partitions
Donate some money to the Linux Foundation or the EFF.
Give us some help by solving some of the issues! The more we are working on this project, the faster we could all enjoy the Linux experience on our tablets!
You can still help us! We've got you covered: in the dmesg folder we've put some dmesg outputs to help us find / spot some errors and fix some bugs. Take a look!