by Thomas Polasek
My goal was simple, install a full linux os on my Nook Color tablet. I was surprised to find out that nobody has bothered to run an Xorg server on the android device itself, practically all solutions went through VNC to access the Xorg server.
I will show you how to boot up an Arch Linux distro with mouse and keyboard support that runs the Xorg server on the linux framebuffer (/dev/graphics/fb0).
Root your Nook Color
Install Clockwork Recovery Mod
Install the Nook Color Cm7.2-RC1 MiRaGe rom
Install the Nook Tweaks app from the google market
com/store/apps/details?id=com. dalingrin.nookcolortweaks&hl= en
Install the SSHDroid app (optional) from the google market
com/store/apps/details?id= berserker.android.apps. sshdroid&hl=en
Part 2. (Linux OS)
Plug in 4GB+ MicroSD Card (with an Ext4 partition)
Mount the SD Card on your OSX or Linux OS
mkdir -p /mnt/sdcard
mount /dev/sdb1 /mnt/sdcard (Replace /dev/sdb1 with your sdcard device)
Download and Extract Arch Linux distro for ARM7 OMAP to your SD Card
Part 3.tar xvzf ArchLinuxARM-omap-smp-
latest.tar.gzrm -f ArchLinuxARM-omap-smp- latest.tar.gz
Connect the MicroSD to your Nook Color Tablet
Run the SSHDroid app or connect via adb shell
Connect to your Nook Color via SSH from your linux machine and make sure our SDCard is writeable/executable
cd /mnt/sdcard (this is the mounted directory of your MicroSD card with arch linux on it, yours might be different)
mount -o remount,rw,exec /mnt/sdcard
Chroot into your arch linux distro (you should probably make this a script)
If you need additional/supplementary
information here is a good link
export mnt=/mnt/sdcard/arch (This is your Arch Linux distro location)
# mount linux essentials to our chroot environmentmount -o bind /dev $mnt/devmount -t devpts devpts $mnt/dev/ptsmount -t proc none $mnt/procmount -t sysfs sysfs $mnt/sys
# export environmental variables for our chrootexport PATH=/sbin:/bin:/usr/bin:/usr/
sbin:/usr/local/bin:$PATHexport TERM=xtermexport HOME=/rootexport USER=root
#chroot into our arch linux distrochroot $mnt /bin/bash
Part 4. (in your arch chroot environment)
Setup our DNS (only have to do this once)
echo "nameserver 126.96.36.199" > /etc/resolv.confecho "nameserver 188.8.131.52" >> /etc/resolv.conf
Install Xorg and LXDE on your Arch Linux Chroot
Edit your /etc/X11/Xorg.conf filepacman -S xorg-xinit xf86-video-fbdev xf86-input-evdev lxde
sudo wget http://y.uk.to/files/xorg.conf (or try http://pastebin.com/raw.php?i=8CM7NKhd)
You may need to edit the device references for the keyboard and mouse in Xorg.conf! (/dev/input/event5 and /dev/input/event4 might be different)Go on your Nook Tablet and Run the Nook Tweaks app
More information is found below
Turn on USB-Settings ---> USB Host ModeTurn on USB-Settings ---> External VBus
Connect your USB devices to your Nook Color Tablet
If you need to figure out what devices your keyboard and mouse are on, thenObtain a female to female usb connectorConnect a hub to one side of the female connectorConnect a usb keyboard/mouse to the hubConnect a mini-usb to the nook and then to the other side of the female connector
run the cat command on each input* .... and check if your keyboard/mouse input results in a change on the output from cat
for example, when I press a key on my keyboard cat /dev/input/event5 outputs some binary characters.
Now we will setup our linux framebuffer (****UPDATE 1****)
pikpok sent me this suggestion in the comments section.
pikpok sent me this suggestion in the comments section.
You can use "setprop ctl.stop media & setprop ctl.stop zygote" in adb shell to kill zygote server and media, if you want to return to android you can replace stop with start and run again, it's much better than chmod :)Now we will setup our linux framebuffer (hack)
Try pikpok's suggestion first, if it doesn't work then try out this hack of mine.
Temporary hack to stop the android system from accessing the frame buffer device. I plan on writing a patch that toggles access to this framebuffer from linux. But right now what I do is
I change permissions on the framebuffer and then wait for the android system to lose connection to the framebuffer device.
Once android loses the connection I run the Xorg server on the framebuffer, it hijacks the graphics output.
If anyone has any idea on a better way to this please feel free to post on the comments section.
Eventually (again this is a hack) the android system will appear to freeze (the screen stops updating)
cd /dev/graphicschmod 000 /dev/graphics/fb0chown root:root /dev/graphics/fb0
If the graphics don't freeze right away, then keep running and killing the xorg server over and over until it does.Start LXDE session (starts Xorg Server)
xinit /usr/bin/lxsession &
If everything is configured good, you will get a full LXDE desktop with mouse and keyboard support.
For any xorg server problems, have a look at the /var/log/Xorg*.log file
To stop the xorg server you can run (not the safest way but it doesn't really matter for this)
BAM. Fully working linux system using the linux framebuffer with mouse/keyboard support.
In addition to support the USB keyboard and mouse, it is possible for other USB devices that are support ed by linux to be connected. Example of devices such as USB-DVI, USB-SERIAL, Arduino, etc...
Notes about the SD Card and EMMC:
It is possible to chroot into any part of the filesystem of Nook as long as you have rwx access. For my personal usage I chroot into the 8th partition on the EMMC (~4GB) of space and run Arch Linux from there, I find the EMMC runs faster than the SD Card.****UPDATE 1****
Working on making a full bootable Arch Linux image with the Android Kernel, and without all the Android system fluff.