by Thomas Polasek
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).
Part 1.
Root your Nook Color
Install Clockwork Recovery Mod
Install the Nook Color Cm7.2-RC1 MiRaGe rom
http://forum.xda- developers.com/showthread.php? t=1344873
http://forum.xda-
Install the Nook Tweaks app from the google market
https://play.google. com/store/apps/details?id=com. dalingrin.nookcolortweaks&hl= en
https://play.google.
Install the SSHDroid app (optional) from the google market
https://play.google. com/store/apps/details?id= berserker.android.apps. sshdroid&hl=en
https://play.google.
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
cd /mnt/sdcard
mkdir arch
cd arch
Part 3.tar xvzf ArchLinuxARM-omap-smp-latest.tar.gz rm -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
su
bash
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
http://www.mayrhofer.eu. org/debian-on-android
http://www.mayrhofer.eu.
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:$PATH export 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 8.8.8.8" > /etc/resolv.confecho "nameserver 4.2.2.2" >> /etc/resolv.conf
Update arch
pacman -Syu
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
cd /etc/X11
rm Xorg.conf
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
cd /dev/input
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)
killall X
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.
I'd be glad to help out with any questions, please feel free to post them here =)
ReplyDeleteThis comment has been removed by the author.
DeleteIs sound supported? ALSA Audio to be more precise
DeleteIs sound supported? ALSA Audio to be more precise
DeleteThis is fantastic, thanks for sharing! I'm receiving a Transformer Prime soon and I'd love to get Arch running on the bare hardware somehow. Hopefully this process can be modified for other tablets; it doesn't seem like there's anything preventing that. I wonder if there's a way to boot Android in headless mode. If there were, it might be possible to run an init script of some sort which would perform the chroot and start X automatically.
ReplyDeleteThere is nothing platform specific about this, all you need is an Android kernel that supports USB hosting and has proper frame-buffer device. I agree, it'd be great to have a init script to chroot and boot X without the Android system baggage. Right now I am looking for ways to shut down most of the existing Android system, so that I can free up the ram... Android takes approximately 300mb/512mb... which doesn't leave too much for LXDE.
Deletethis is pretty badass, ill certainly be following this, plus someones posted a link to this on XDA so this will probably attract attention there too. just wondering though, does everything work? like flash player, sound, bluetooth and whatnot. really excited to see this develop, id use this as a daily driver in a heartbeat.
ReplyDeleteYou 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 :)
ReplyDeleteThanks =), I added that to the post .
DeleteI'm trying to get this working on my Galaxy S phone (gen1). Care to post the xorg.conf? (link doesn't work)
ReplyDeleteHere it is: http://pastebin.com/raw.php?i=8CM7NKhd. Cheers =)
DeleteYay, I got it working! I had to kill bootanim and do
ReplyDeletesetprop ctl.stop media
setprop ctl.stop zygote in adb shell. (thanks pikpok)
I'm running openbox-session, then did DISPLAY=:0 xterm &, which started xterm fine. However, I have no input on the phone :P
Maybe there's a way to get touch drivers...
Here are the available input devices: http://nopaste.info/dbfa041cce.html
DeleteNo matter how I configure xorg.conf (or udev rules) I cannot get the mouse pointer to move. :-/
Are you using the "evdev" driver for the touch screen device? I believe you will need a different touch-specific xorg driver to use the touch screen as a mouse.
DeleteLet me start out by saying awesome! I am going to try this as soon as possible on my Nook Color. ThomasP, for archlinux, in the Arch User Repositories (AUR), there is an evdev multitouch driver. When I got the time to try this out, I was going to install that and try it out. In addition, I don't know if you need to use the Android kernel. The current stable Linux kernel (3.3.2) has Android drivers merged into it.
DeleteFor anyone interested, /dev/input/event2 is the touchscreen input. ThomasP, I'm in chroot, but the system won't update. Everything on the update list comes back with "exists in filesystem" as a conflict. I looked in the Arch Linux forums, and nothing works as a fix. Any thoughts?
Deleteis there anyway you can help us out on the xda ubuntu thread for the NC...it would be awesome for someone who actually has linux running natively on their device...
ReplyDeletehere's the link...
http://forum.xda-developers.com/showthread.php?p=25026630&posted=1#post25026630
I also think it sounds pretty exciting what you're up to have. I just wondered what the benefits really are not a VNC solution. Do you have better access to USB devices from arch linux that way. Or is it a question of speed. That the system works faster when not using VNC? (and not full X11 but just frambuffer. I love that idea)
ReplyDelete/mikkel
and one more question from me. The tuch screen will worke if you run xorg through VNC. But if you run it this way on the framebuffer the tuch screen will not work whil xorg running. Only external mouse will work is that correct what I asume here?
ReplyDelete/mikkel
Any new updates? Got a bit quiet...
ReplyDeleteI am doing this on an atrix and I can't seem to get the framebuffer to play nice with X I keep getting
ReplyDelete[ 3407.759] (WW) Falling back to old probe method for fbdev
[ 3407.760] (II) Loading sub module "fbdevhw"
[ 3407.760] (II) LoadModule: "fbdevhw"
[ 3407.760] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 3407.761] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 3407.761] compiled for 1.12.1, module version = 0.0.2
[ 3407.761] ABI class: X.Org Video Driver, version 12.0
[ 3407.761] (EE) open /dev/graphics/fb0: Operation not permitted
[ 3407.761] (EE) No devices detected.
I can't seem to get past that. I am trying to start xfce but it won't work with just startx command either. Any help appreciated also I love the guide and people like you are making me way more linux knowledgable than necessary heh
I'm running CM9 on my sgs2. I killed the zygote & media server, but i got the bootanimation. When i started the X server (XFCE) I got linux for about a second...
ReplyDeleteI tried the hack method, with no luck at all... nothing happened! :\
Kill the boot animation.
ReplyDeletehow?
DeleteFind the process, for example ps aux |grep boot, or ps aux |grep ani . My boot animation process was just called bootanim. This depends on your ROM.
Deleteon cm9 is bootanimation :D
Deleteit works!!! now lets see how to make touchscreen work... :)
Hey, works great. You just have to be a bit patient when you run xinit. It takes a few seconds of waiting at a blank screen before the desktop loads. Anybody here have the skill to create a script that performs the mounting, chroot, and X11 so that I don't have to do so much typing?
ReplyDeleteMy only snag is that when I kill X and then run setprop to restart my android homescreen, it just triggers a reboot. Not a huge deal, but would like a smoother way to shut down Archie and go back to Android with restarting.
DeleteTry this:
DeleteScript 1 (mounts,exports,chroots)
CHROOT_SCRIPT.SH
#!/bin/bash
export mnt=/mnt/sdcard/arch (This is your Arch Linux distro location)
# mount linux essentials to our chroot environment
mount -o bind /dev $mnt/dev
mount -t devpts devpts $mnt/dev/pts
mount -t proc none $mnt/proc
mount -t sysfs sysfs $mnt/sys
# export environmental variables for our chroot
export PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:$PATH
export TERM=xterm
export HOME=/root
export USER=root
#chroot into our arch linux distro
chroot $mnt /bin/bash
You could add a second script on the Arch system that kills the android screen and then loads xorg.
When I type each line, it all works great. When I make a shell script and execute it, I get the following error:
Deletemount: mounting none on /proc failed: Device or resource busy
mount: mounting sysfs on /sys failed: Device or resource busy
The other mount commands and exports work fine. Maybe there is some sort of timing issue here....?
well, why so much trouble?
Delete#!/system/bin/sh
export mnt=/data/local/mnt #mount point
if [ "$1" == "stop" ]; then
umount $mnt/sys
umount $mnt/proc
umount $mnt/sdcard
umount $mnt/dev/pts
umount $mnt/dev
umount $mnt
elif [ "$1" == "startx" ]; then
mount -t ext2 /dev/block/vold/179:26 $mnt #conf this
mount -o bind /dev/ $mnt/dev
mount -t devpts devpts $mnt/dev/pts
mkdir -p $mnt/sdcard
mount -o bind /mnt/sdcard/ $mnt/sdcard
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
setprop ctl.stop media & setprop ctl.stop zygote
busybox chroot $mnt /usr/bin/startxfce4 & #conf this
elif [ "$1" == "stopx" ]; then
setprop ctl.start media & setprop ctl.start zygote
busybox chroot $mnt '/usr/bin/killall startxfce4' #check if works
else
mount -t ext2 /dev/block/vold/179:26 $mnt
mount -o bind /dev/ $mnt/dev
mount -t devpts devpts $mnt/dev/pts
mkdir -p $mnt/sdcard
mount -o bind /mnt/sdcard/ $mnt/sdcard
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox chroot $mnt /bin/bash
fi
PLEASE, do not copy the script and say that it is yours! :)
thanks!
if you want better version, reply, and i'll develop it...
Thank you very much. BTW, I suspect this same method can be used to run Archie on an Asus TF201 using the framebuffer. But it would require a little fiddling with the X conf file. Anyone out there try this method on a Transformer Prime or a Xoom yet?
DeleteI've been running chroot ARM Linux on my Prime but using VNC which is somewhat laggy. Would prefer to use the framebuffer for obvious reasons.
it's nearly the same for all devices... (tweak a bit the partition which you want to be mounted)
Deletethis configuration works perfectly with my SGS2 (i9100) with a second partition on the external sdcard...
if i have time, i'm going to develop it to much the needs of all
(?) phones
BTW: don't expect HUGE performance improvement if VNC is laggy!
i run geogebra (java (!!!) based geometry tool) with XFCE! I love my SGS2 :)
This comment has been removed by the author.
ReplyDeleteare there any updates you can tell us on the status of this project, Thomas? Ive been watching since this got posted on XDA, i really want to see this go somewhere but it seems that its lost a bit of traction recently...
ReplyDeleteAdded some new info!
DeleteHi I've tried this in an Asus TF201, already had a chroot working, I've downloaded your X11 configuration, I'm trying to setup XFCE4, but I'm stuck on this Xorg error:
ReplyDeletexf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)
This are the TTYs in /dev :
/dev/tty /dev/ttyHS1 /dev/ttyHS3 /dev/ttyS0 /dev/ttyS2
/dev/ttyHS0 /dev/ttyHS2 /dev/ttyHS4 /dev/ttyS1 /dev/ttyS3
Tried some soft links, changing permissions, f.e. this:
lrwxrwxrwx 1 root root 11 May 16 22:40 tty0 -> /dev/ttyHS0
but no luck I've always get this other error:
xf86OpenConsole: Cannot find a free VT: Invalid argument
I really don't know what I'm doing, any help is greatly appreciated.
I'll answer myself: Seems that stock kernel doesn't support virtual terminals, so now my best chance is (if I don't replace stock ROM voiding warranty) patch xorg so it won't need'em.
Deleteit's easier for you to patch xorg rather than flashing a ROM?? O_o WTF??
Deleteanyway, congrats! and also could you enable virtual keyboard??
Not easier, but safer (for my tablet's warranty) :-) I own the dock so the keyboard/touchscreen isn't an issue for me, but maybe I'll try it. I'll post something if I suceed.
Deleteplease, try it... i have sgs2 and I can't make touchscreen work as mouse (touchpad, or even better, touch screen)
DeleteMG, any luck so far? I stumbled on the same problem, have been searching the web for any info on this but no luck so far.. Can't get rid of this tty0 issue. On a galaxy S running ICS I had no problems at all and had everything running including working Bluetooth mouse and keyboard. Btw I'm using Ubuntu instead of arch.
DeleteI am also waiting for this for my transformer prime, but I thought I'd take the step and flash. The question is, would a kernel flash like SnB Ultimate v1.0 (http://forum.xda-developers.com/showthread.php?t=1593488) work? Or would i need a full ROM flash like cyanogen? Any idea anyone?
DeleteI reply to self,
Deleteflashing the kernel to SnB Ultimate v1.0
does not solve it (most likely because it is probably the stock kernel modified)
I could only guess it would be the difference between the modded cyanogen ICS and the stock ICS which comes with the TF201.
DeleteMy knowledge goes not that far, so have been trying to figure out how to get tty0 on the prime, but was unsuccessful. Also tried to figure out if I could redirect or make Xorg use tty or a different other virtual terminal, but again, unsuccessful.
I have been fiddling with mknod and MAKEDEV, making a tty0. The tty0 was created, but it did not solve the problem. Same error.
I see you have been flasing a kernel. So far I haven't flashed anything on the prime, as for the warranty, which I like to keep as well..So flasing a kernel or whole ICS mod is also no option for me unfortunately. Not until Asus changes its policy. - read NOT - :(
Anyway, does anybody have a clue or more knowledge about getting around the tty0 problem for Xorg?? I am searching the web daily for info but just can't get to it.
Hi Rob,
DeleteI've ended using a better VNC client, Real VNC Viewer, isn't the perfect solution (tablet interface is VERY COOL, but lacks some kind of direct input for the dock)... but anyhow it's quite useful, there's also an (in-progress?) native X Server in android market, but unfortunately by now it's just a toy, quite buggy, incomplete and slow... I've also tried the official Tegra 3 drivers but no luck, just the TTY issue again (2d acceleration at hand!), my xorg "patching" compiled but also didn't work... xorg NEEDS a dedicated terminal.. maybe with some more heavy patching but right now it's out of my bounds :-(
Anyhow I'm quite happy with my chroot, already discovered how to grant non-root users network and sudo, so for now I'm considering buy a dedicated micro-sd card and move there my chroot sandbox...
Hi Prose Kit,
Deleteyou are right, you need a kernel with virtual terminals enabled, maybe Cyanogen 9 will do this for us (CM7 worked for OP)
Hi gents,i can recommend vnc program 'jump' as it is a bit faster and has right click moustbutton support in ubuntu,which other vnc's didnt have. MG, guess you are right about the kernel.. Well, so far it will be vnc for me then until there is another solution. I tried the x server but indeed very basic and unusable for me for now. Unfortunately myknowledge does not go much further yet than this.
DeleteI don't know if you could help with this. I have been using trimslice on the atrix as mentioned earlier. I fresh installed a couple of times but now after chroot'ing into my new environment every command other than exit or cd segfaults
ReplyDeleteYou may have the wrong version of Arch! Try to verify the cpu you have on your device is one of the supported architectures for the distro you downloaded.
DeleteId be willing to help anyway I can. Complete noob. However there is a gentleman in the Mer community with some relevant patches to the kernel in regards to running linux on the nook minus android. His user name is WMarone i believe
ReplyDeleteFor anyone interested I made a touchscreen "driver" to work in the chroot environment. Change the /dev/input/event* to the one for your device. Compile on your device or cross compile on your computer. Run like this:
ReplyDeleteDISPLAY=:0 ./myTouch
https://github.com/crondog/i9300-archlinux-touchscreen-driver
post it in aur!
ReplyDeletetesting it right now! ;)
crondog, can you help me on how to use the i9300 initramfs?
ReplyDeletettouch,
ReplyDeleteI have updated the readme for the initramfs.
However you dont need that to get the touchscreen working.
That is something else i am working on which isnt working right now
yes, i know, but it would be so nice to dual boot arch and android...
Deleteany ideas for GSM calling from inside arch?
gcc throws an error when compiling about some unused vars...
Dual booting is what i am going for. However I am having a hard time trying to get it booting :(
DeleteI havent actually looked into calling really so i cant help at the moment.
To get rid of the warning get rid of the -Wall
ok, please keep us updated!
Deletei have beta-hungriness, so if you want to test anything, drop an email!
however i have an i9100 (CM9) and i don't know if everything is going to work...
thanks a trillion!!
Sure no problems :)
DeleteIt should probably work :)
Init
Deletetouchs: myTouch.c:19: main: Assertion `display != ((void *)0)' failed.
Aborted
ideas?
woops forgot to mention you need to run like this
DeleteDISPLAY=:0 ./myTouch
man i love you... :)
ReplyDeleteleft/right click? how? i double-tap and nothing happends...
There is still a lot to do with it :) I haven't implemented it fully. And for some reason the menus dont receive the clicks properly. I will be adding right click soon. And also pinch to zoom etc. But for now it can only left click on a couple of things. Sorry
Delete:( ok... can't you just make an "interface" so that touch screen shows as touchpad? (i don't know how and if is this possible)
DeleteMy program is the interface. I just have to implement all of the functions which make it a "touchpad"
Deletecan't you reuse some functions from other drivers? (or even better, patch evdev?)
Deletei have no idea of C, so as i said i don't know if what i said actually makes any sense XD
Yeah i probably can. It is mostly a learning experience at the moment :)
DeleteIm not actually sure why evdev doesnt work which is why i decided to write my own.
It could also be a configuration thing with xorg.conf which could be why evdev doesnt work.
ok, good luck!
DeletePS: any idea on how to get mkbootimg on Mac?
thank you for everything! :)
where can i get documentation about the ev[i].code? is it a class from Xlib.h?
Deletei try to find the double tap event in order to call mouseClick :)
Maybe check in the cyanogenmod sources ;)
Deleteno luck... :(
Deletei'll figure it out, it should be easy!
hi there
ReplyDeletei have some questions
in my case.
i just tried using VNC (ubuntu)
so i use kernel image in (http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-android/)
and, i modify the booting script(just add mount -o bind /dev/ $mnt/dev )
after chroot, i stopped zygote, media and kill bootanmation.
and when i run xinit ( using Thomas Polasek`s
xorg.conf) it didn`t work
it just stop with no error (Xorg.0.log ,dmesg)
nobody know what is my problem.?
in fact, i dont care about input method, i just want X display through fb0(/dev/graphics/fb0)
plz help me. thanks
Hello!
ReplyDeleteI'm trying to do this on a Huawei U8650. Yeah, it's a bit weak, but I hope that it will swallow Arch Linux. What's actually bugging me are the following things:
1. What's the optimal size of the ext partition?
2. What goes on the FAT partition, and what on ext?
3. What would be the best way to partition my SD card in your opinion?
Sorry for asking stupid questions, but I couldn't find answer to these anywhere.
Thanks in advance!
Sorry for the late response but...
Delete1. I'd say a couple of gigs, maybe a bit more but it depends on how much software you're going to install under the chroot. Basically >= 2GB (Gigabytes, not Gibibytes :P).
2. There's no need for the FAT partition as far as I know.
3. Use Gparted and just resize and add the ext4 / ext2 partition as the second partition on the sdcard. When you need to mount it, it should be /dev/sd#2 under linux.
And don't worry about asking stupid questions relating to linux. There is a whole subreddit on reddit dedicated to it :P (/r/linux4noobs).
This comment has been removed by the author.
DeleteThanks for responding. It wasn't late at all, it would be late if I gave up. Okay, then it would be way too late. Back on the topic.
DeleteIf I understood correctly, Arch Linux should be located on a 2+ GB ext2/4 partition in a folder called arch, right? Should the ext partition be primary or logical (I have a primary FAT partition on my SD card)? Lastly, will it change something if I use File Roller instead of untarring with tar?
Hi,
ReplyDeleteIs it possible to work on LAMP(Linux Apache MySQL PHP) tools in this environment? Please confirm.
Awaiting reply ...
I am trying this with a 16gb class 10 SD so I dont know if that is my issue or not. i cannot extract the arch to the fat partition (duh) that is made by my NC, but the NC won't mount a EXT4 partition. im not sure if i am just overlooking something small or not
ReplyDeletecreate ext2 partition, not ext4, ext4 will kill your sd card
ReplyDeleteThis comment has been removed by the author.
DeleteI'm Just curious as to why you say that, when the author said to use ext4?
Deletealso this did not solve the issue I am having
A bit late but...
DeleteHe's mentioning it because ext4 has journaling on by default, which would increase the number of read/writes on the sdcard, thereby shortening the lifespan of the sdcard.
The filesystem type as far as I know doesn't make a difference towards whether the chroot works or not.
Cheers
It doesn't matter what filesystem you pick. I chose ext4 because i figured it would have better performance.. though in retrospect, the journaling might cause ext4 to be slower than ext2.
DeleteThis oughta be a polite bump :P
ReplyDeleteThis comment has been removed by the author.
DeletePlease no? What the...
DeleteHi I hope anybody will read this. I really try to get this work but after pacman -Syu I get this error output:
ReplyDelete"[root@localhost /]# pacman -Syu
:: Synchronizing package databases...
core 38.8 KiB 53.8K/s 00:01 [######################] 100%
extra 428.5 KiB 286K/s 00:01 [######################] 100%
community 421.6 KiB 450K/s 00:01 [######################] 100%
alarm 6.0 KiB 5.20M/s 00:00 [######################] 100%
aur 11.7 KiB 1964K/s 00:00 [######################] 100%
:: The following packages should be upgraded first :
pacman
:: Do you want to cancel the current operation
:: and upgrade these packages now? [Y/n] y
resolving dependencies...
looking for inter-conflicts...
Targets (1): pacman-4.0.3-3
Total Download Size: 1.00 MiB
Total Installed Size: 3.38 MiB
Net Upgrade Size: 0.00 MiB
Proceed with installation? [Y/n] y
:: Retrieving packages from core...
pacman-4.0.3-3-armv7h 1019.7 KiB 262K/s 00:04 [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
warning: could not get filesystem information for /mnt/asec: No such file or directory
warning: could not get filesystem information for /mnt/obb: No such file or directory
warning: could not get filesystem information for /rom: No such file or directory
warning: could not get filesystem information for /system: No such file or directory
warning: could not get filesystem information for /data: No such file or directory
warning: could not get filesystem information for /cache: No such file or directory
warning: could not get filesystem information for /mnt/sdcard: No such file or directory
warning: could not get filesystem information for /mnt/secure/asec: No such file or directory
warning: could not get filesystem information for /mnt/sdcard/.android_secure: No such file or directory
warning: could not get filesystem information for /mnt/emmc: No such file or directory
warning: could not get filesystem information for /data/pengdroid: No such file or directory
(1/1) checking available disk space [######################] 100%
error: Partition / is mounted read only
error: not enough free disk space
error: failed to commit transaction (not enough free disk space)
Errors occurred, no packages were upgraded."
I think I unterstand the problem but how can I fix it.
Before you chroot.. test that you have Read/Write access.
DeleteAlso, you could try using this command mount -o remount,rw /PATH_TO_DRIVE before you chroot.
Does change anything same problem. Can it maybe a problem that I format the sd card to ext2 and not ext4?
DeleteI'm thinking of trying this out as a low-cost/lightweight compute platform I can take while traveling. How is the battery-life of the Nook under Arch Linux, Thomas?
ReplyDelete---ram---
I can get a solid 5 hours with it running. Though I have absolutely no power settings, so I'm sure you can get quite a bit more life than that.
Deletewell, battery life won't be such a problem, unless you want GUI.
ReplyDeleteHi:
ReplyDeleteIf I want to start xorg over HDMI (not on android screen),
do I need /dev/graphics/fb1 device?
Thank you~~~
great idea! please try it and report...
DeleteI managed to make S-Pen work on galaxy note 10.1 wifi! it's device /dev/input/event6 and it works with evdev.
ReplyDeleteThe big problem is the touchscreen (event1). I've tried mutrack, multitouch and evdev drivers and nothing works... :( any help?
Any updates on the kernel archlinux image for nook color?
ReplyDeleteThanks for this article. I'm having a problem on my Nexus 4, however. It segfaults upon touching the screen:
ReplyDeleteBacktrace:
Segmentation fault at address (nil)
Caught signal 11 (Segmentation fault). Server aborting
Any ideas?
any logs?
DeleteSo the X server runs fine until you touch the screen? If you need to get a crash log then try running it in gdb and get a backtrace. Otherwise it's hard to identity what your issue might be.
Deletei am having the same issue on my S2, anyone able tto post a working xorg.conf with touch.
DeletePosting an xorg.conf that i copied from a post on the web. Makes my screen work as touchpad, annoyingly without right click, unless i am just missing something.
DeleteSection "ServerLayout"
Identifier "Layout0"
Screen "Screen0"
#InputDevice "Mouse0" "CorePointer"
#InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "cyttsp-i2c" "CorePointer"
EndSection
#Section "InputDevice"
#Identifier "Keyboard0"
#Driver "evdev"
#Option "Device" "/dev/input/event5"
#Option "Protocol" "usb"
#EndSection
#Section "InputDevice"
#Identifier "Mouse0"
#Driver "evdev"
#Option "Device" "/dev/input/event8"
#Option "Protocol" "usb"
#EndSection
Section "InputDevice"
Identifier "cyttsp-i2c"
Driver "multitouch"
##Driver "evdev"
option "Corepointer" "true"
option "SendCoreEvents" "true"
Option "Device" "/dev/input/event2"
Option "protocol" "Auto"
# mouse should move as fast as finger and not faster
#Option "AccelerationScheme" "none"
# evdev has it, multitouch doesn't so it behaves like touchpad
Option "IgnoreRelativeAxes" "true"
EndSection
Section "Device"
Identifier "Card0"
Driver "fbdev"
Option "fbdev" "/dev/graphics/fb0"
VendorName "Unknown"
BoardName "Unknown"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "800x480_60.00"
EndSubSection
EndSection
Section "ServerFlags"
Option "AutoAddDevices" "true"
EndSection
Is there a forum discussion somewhere for this topic?
ReplyDeleteThere are some things i would like some help to get this working nicely.
At the moment i need a computer at hand to startx after killing the android ui. I have a script that kills android but i have to make a connection via ssh first in order to give the startx command. Anyone know how to write a script that would kill android and then switch to the linux shell and give the startx command.
It would also be nice to access a similar script inside linux environment that would restart the android services.
I should add that i am not using chroot, i used debian-kit to install ubuntu.
i also have installed the "mtrack" driver which is a fork of the multitouch driver. for me this has got right click working with two finger tapping.
ReplyDeleteapt-get install xserver-xorg-input-mtrack
this will remove the multitouch driver, but as i said it is a fork, so it works the same. but with right click enabled.
Hi Joe, could you please show us your xorg.conf file.
DeleteI've tried to use xserver-xorg-input-mtrack, but it doesn't work and I don't know why.
Simply the mouse doesn't move.
Thanks
Hello again,
ReplyDeleteI have come up with a way to boot to linux without needing a pc. Does anyone know how to start the android processes from within linux, I can of course reboot, would just be nice to be able to switch between the two.
Thanks.
create a daemon that will check every 30" if a file exists. run it from the android and if the daemon find that the file exist, delete it, killall X and start zygote & media
DeleteHello ttouch, thanks fof the response. That sounds like a great solution. When you say deamon do you mean a script? And if this is the method you use could you share yours. Thanks.
DeleteA script that will run in background with a while true loop. I was thinking about it, but I have not done it yet.
DeleteLooking for a little help with my script. Let me just say I have close to no idea what I am doing, be gentle with me. Here is my script.
Delete#!/system/bin/sh
start:
if [ -f /storage/sdcard0/cheese.txt ];then
rm /storage/sdcard0/cheese && setprop ctl.stop media && setprop ctl.start zygote
fi
sleep 30
goto start;
So I am trying to restart the android ui by placing the file cheese in the sdcard.
Can anyone help please.
do not use goto, but while loop. Generally, goto is the worst way to do anything in nearly any language :P
Deleteapart from that you should start media and not stop it. lol
the problem is that it never ends (add && exit)
Lol, thanks for the hint about start! Well, i dont think i can work this one out, keep getting syntax errors using if and while, doesnt seem to like the [ brackets at all. This is where i am at.
Delete#!/system/bin/sh
while (true) [ -f /storage/sdcard0/cheese.txt ]
do
rm /storage/sdcard0/cheese.txt && setprop ctl.start media && setprop ctl.start zygote
echo cheese
exit
Just gets stuck at the first [ !
#!/system/bin/sh
Deletewhile [ true ]; do
if [ -f /storage/sdcard0/cheese.txt ]; then
rm /storage/sdcard0/cheese.txt
setprop ctl.start media && setprop ctl.start zygote
exit
fi
done
THANKYOU ttouch for taking the time to fix my script. Your script does indeed work perfectly, however it seems to keep the cpu very busy while in linux.
DeleteThanks again. I like your solution.
Fixed, added sleep.
Delete#!/system/bin/sh
while [ true ]; do
if [ -f /storage/sdcard0/cheese.txt ]; then
rm /storage/sdcard0/cheese.txt
killall X && setprop ctl.start media && setprop ctl.start zygote
echo cheese destroyed
exit
fi
sleep 30
done
Thanks again.
Yes, forgot that...
DeleteI created a script that has the start/stop graphical server capability. Check it out: https://gist.github.com/ttouch/5353913
ReplyDeleteAs of now it supports only new devices that chroot without image/partition, but directly from /data (tested on nexus 4 and galaxy note 10.1).
In this devices the /data and internal sdcard storages are shared, so I have ~16GB available on /data. I created a folder with the chroot environment (/data/workbench/mnt) and I just chroot /data/workbench/mnt (ok, not exactly, I use a whole script, but it could be done)
moved the file to my dotfiles repository: https://github.com/ttouch/dotfiles
DeleteTake a look at my .bashrc and bin/linux (bin/vim is vim statically compiled for android devices)
Hmm, so you need image support huh? I'll fix it.
ReplyDeleteAlso I am writing a guide on my personal blog (dzervas.gr)
You can't do that...
ReplyDeleteit's the gnome's virtual keyboard
ReplyDeletewhat driver do you use?
ReplyDelete(China android tablet) using ThomasP's xorgconf I managed to get my USB keyboard to work which is on event1 but the mouse wont work. Strangely there are two input event which are "mice" and "mouse0", i tried both and no cursor action. I might try touch but I know I need to use mouse eventually..
ReplyDelete@collin andrews , how did you get the mouse working?
First try to cat /dev/event/mice, adn then move your mouse, if you see characters show up each time you move your mouse, you know that that problem is in your Xorg configuration and that the mouse is recognized and working correctly with the kernel.
DeleteThen try that wth /dev/event/mouse0 as well.
On my device I get output when I move my mouse on the /dev/event/mice file descriptor.
Sorry I meant /dev/input/mice and /dev/input/mouse0 ... I had the paths wrong from memory.
Deletefinally I got it to work(yeah its the Xorg config) but theres a catch...only one will work its either the mouse or the keyboard, I noticed too that this is depending which I plug in first in the usb hub before I boot up Archlinux(while in android) ,if i plug in my mouse first in the hub then the keyboard the mouse works and the keyboard wouldnt in Arch . I've tried plugging in before I turn on the device ,still no joy. And yeah my USB hub is powered.
DeleteOne question, are you running Arch on the tablet itself, or are you connecting to a computer with Arch installed.
ReplyDeleteThanks indeed (and sorry for my ignorance)
It's running on the tablet itself.
DeleteMy goal was simple, install a full linux os on my Nook Color tablet. ... tabletkeyboard.blogspot.com
ReplyDeleteMy goal was simple, install a full linux os on my Nook Color tablet. ... tablettastatur.blogspot.de
ReplyDelete