[Nexus Player Original Android Development] fcipaq:
This is a guide to install Debian Linux on your Nexus Player

NOTE: This guide is for advanced users

This is NOT VNC nor chroot nor Android X server nor anything else like that, but running Linux natively.
​

D I S C L A I M E R

----------------------------------------------------------------------------

Use this at your OWN RISK. Experimental software may harm you, your device and others around you. I cannot be held responsible for any damage done. You have been warned!

Installing Linux will most likely VOID YOUR WARRANTY! (If warranty still applies to a five year old device...)

P R O L O G U E

----------------------------------------------------------------------------

I have adapted the Nexus Player's kernel to meet GNU/Linux, namely Debian 10, requirements so far that it has become quite stable by now.

Since the processor is Intel x86 compliant you can run a regular distribution, receive updates, load software, etc. etc. This makes the Nexus Player virtually a desktop PC.

You can install Debian onto a USB stick and dual boot along with Android OR you may install Debian to the device's internal storage (and speed up things significantly).

H A R D W A R E S U P P O R T

----------------------------------------------------------------------------

What is NOT working:

* Suspend/standby

* Screen off (DPMS off)

What is working:

* Hopefully anything else...

R E Q U I R E M E N T S

----------------------------------------------------------------------------

* Nexus Player (obviously) w/ unlocked bootloader

* USB OTG cable and mirco USB cable

* A USB Hub

* An empty USB stick (I suggest at least 16 GB of storage and 40 MB/s read and 20 MB/s write speed. 8 GB is the minimum requirement though.)

* Input devices (i.e. mouse, keyboard)

* Linux PC (or virtual machine)

* Basic Linux/ROM tinkering knowledge, some time and patience...

Ready?! Let's go!

S T E P 1: Install the Linux boot image

----------------------------------------------------------------------------

a) Unlock your Nexus Player's bootloader (there are guides online in case you don't know how to do that)

b) Reboot to bootloader, attach the Nexus Player to your PC and flash the device specific Linux boot image to the boot partition.

fastboot flash boot fugu_bootimage.img_EXTERNAL

Hint: This will be the only change to your Nexus Player.

Note: You may revert the changes by flashing the stock boot image.

S T E P 2: Prepare USB stick(done on the Linux PC)

----------------------------------------------------------------------------

a) Format the partition on the USB stick with the ext4 file system.

b) Manually mount the partition to e.g. /mnt

c) Download the attached root file system creator, untar it and change to the directory.

d) Create the rootfs (need to be root): ./fugu_rootfs_creator /mnt

Note: The process sometimes fail, you might have to try more than once.

Note: This will take a long time. To speed things up, you may create the rootfs into a disk image on your HDD and afterwards write the image to the USB stick.

d) Connect the USB stick to the Nexus Player/hub.

e) That's it, if you now boot your Nexus Player, it will actually boot into Linux.

S T E P 3 (optional): Install Linux to the internal storage

----------------------------------------------------------------------------

If you are keen enough to purge Android completely, you may read on:

a) Boot into Linux from the USB stick.

b) IMPORTANT: Make a backup (preferably a dd copy of the entire internal storage). Since you alter the partition table in the next step, this is very important in case you want to go back to Android

c) Use gparted to delete the following partitions: cache, system, data

d) Use the freed storage to create one "large" ext4 partition.

e) Flash the file system image to the new partition.

g) Flash the boot new image to the boot partition: fastboot flash boot fugu_bootimage.img_INTERNAL

h) Reboot.

P O S T I N S T A L L A T I O N A N D I S S U E S

----------------------------------------------------------------------------

a) Compositing

On fugu, Mate's window manager "Marco" is NOT hw accelerated. Compositing is slow. When watching Videos or browsing the internet, you may disable compositing (use mate-tweak) to increase performance.

If you need hw accelerated compositing you may use kwin-x11 but this takes up 1GB of disk space...

b) Chromium

Chromium is accelerated with X11/EGL, but buffer management does not work properly. When resizing the window you may need to restart Chromium, because the buffer allocation may fail.

Chromium does have support for WebGL.

c) Firefox

Firefox is not hw accelerated but still gives you decent performance when browsing or watching movies (tested Youtube FullHD and Netflix, works fine).

However when using WebGL, Chromium is much faster.

d) VLC media player

Video playback is hw acceleration is not supported. To achieve decent performance anyways do as follows:

I) Choose Tools --> Preferences --> Video

II) As "Output" choose "X11 video output (XCB)" and for "Fullscreen Video Device" select "hwcomposer" for best performance.

Q & A

----------------------------------------------------------------------------

Q: There is no text console shown during boot process, how can I get it?

A: Unfortunately the Nexus Player's bootloader appends "console=none" to the kernel command line, effectively disabling the console. If you want to have a console you need to rebuild the kernel and enable a built-in command line which cannot be overridden by the bootloader.

Q: Does graphics acceleration work?

A: Yes, OpenGL ES does work, however a lot of programs do depend on desktop OpenGL which is NOT supported. Graphics acceleration is achieved through libhybris which makes it possible to use Android graphics drivers in GNU/Linux.

Q: What is graphics performance like?

A: Depends. When a program supports OpenGL ES, you get decent performance (e.g. Kwin-X11 window manager, Chromium). Performance is sufficient to watch FullHD movies in Firefox or with VLC or browse the internet. Chromium supports accelerated WebGL.

Q: What is system performance like?

A: Depends. Bottle neck of system performance is the speed of the storage used. Using the internal storage gives huge speed improvements vs. an external USB storage (Nexus Player only has USB 2.0, so max ~ 30 MB/s). With internal storage simple tasks like file management, office applications etc. work fine. RAM is limited tough.

Q: Why? Why would you wanna turn your AndroidTV into a subpar desktop PC? Tell me why, I ask of thee!

A: Well... Linux on the Nexus Player is actually a by-product. I develop this for the Dell Venue 7040 which is basically - silicon wise - the same device. But the Nexus Player has the more recent software. So I did this to run Linux on the Dell. But I thought, hey, maybe someone is in to it...

S O U R C E C O D E

----------------------------------------------------------------------------

* Halium - https://github.com/halium

* Libhybris - https://github.com/NotKit/ and https://github.com/libhybris/

* Debian - https://www.debian.org/

* Kernel - https://android.googlesource.com/kernel/x86_64/+/refs/heads/android-x86_64-fugu-3.10-nougat-hwbinder , https://github.com/fcipaq/android_kernel_asus_fugu

* Lineage OS - https://github.com/lineageos

C R E D I T S

----------------------------------------------------------------------------

Special thanks goes to the Halium team, especially JBB and NotKit

And to Hybris, Debian and the LOS team

ROM OS Version: Debian 10

ROM Kernel: Linux 3.10.20

ROM Firmware Required: 8.0.0 (OPR2.170623.027, Nov 2017)

Graphics drivers based On: Lineage OS 14.1

Version Information

Status: Stable

Created 2020-01-30

Last Updated 2020-02-08