[G Tablet Android Development] iammuze:
hello. i managed to get ubuntu running on my tablet, and i thought i'd share how i did it.

note that this does not change your android setup, ubuntu will run on top of android. you will not lose any data if everything goes well.

all credit goes to user houzuoguo for his guide and the people he cites for their work. this post is based on this one.

my setup

zpad clean 3.0 with pershoots latest kernel. i don't know if it will work with other combinations, so if you try and succeed with a different system please tell me. also, if it doesn't work try using pershoot's kernel on your current rom and trying again.

when reporting success or failure, make sure to note whether you are using any of the new data2loop, data2ext, or other weird fs hacks.

what you'll need

the main ubuntu package. download with a torrent client (much preferred to save the devs bandwidth) here. if you don't know how to use torrent clients or can't for some reason, you can direct download from here.

android vnc viewer. it's on the market.

better terminal emulator, also on the market.

the attached zip file.

maybe adb, depending on your storage situation (more later.)

NO APPS ON YOUR SD CARD. just move them all to your internal storage with the built in application manager. the guide i linked above has instructions for trying to do it with apps on your sd, but i'm not even gonna bother. do it at your own risk and all that.

get to it

1. extract the attached zip. you should have a folder called "ubuntu" with three scripts (one letter filenames) inside.

2. open the ubuntu package you downloaded, go into the "linux" directory, and extract JUST "rootfs.ext2" to the "ubuntu" folder you just made.

3. rename "rootfs.ext2" to "ubuntu.img"

4. okay, decision time. you want at least 2gb free on the partition you're putting ubuntu. if you have the room on your sd card, you can just put it there with android's built in mass storage mode. if you need more room and it has to go on your internal storage, you can put it there.

if you decide to put ubuntu on external storage (i did) you need to make one small change to the "b" script in your ubuntu folder. open "b" with notepad or your favorite text editor, and change line 15 (losetup /dev/block...) to say "sdcard2" instead of "sdcard". again, this is for zpad clean. i don't know if other roms mount storage in the same way. (EDIT: looks like TNT stock and TNT Lite do, at least)

also if you decide to use external storage, the built in mass storage mode won't work to mount it. instead you can use an ftp server or adb to get your files on internal storage. i use the swiftp android app from the market and coreftp for windows to transfer files. this is very slow, so you can use "adb push file\path /sdcard2/file/path" to transfer over usb if you'd like. also, i guess, you could just pull the sdcard and throw it in a reader.

btw, if you do have adb running you can use it to do most everything below, it's handy. i'd recommend hooking a keyboard up to your tablet if not, there's a lot of typing. hint: control + d twice in adb will send it to the shell

5. ok, so now you have a directory called "ubuntu" with 4 files (u, e, b, ubuntu.img) inside. it's either on your internal flash, or on your sd card with the modified "b" file. if that sounds like you, move on.

6. because we don't have a trackball, and we need a special key for some of the stuff we're doing, you need "better terminal emulator" from the market. open the preferences and change your "Control Key" to volume down. also check "start as root" while you're in there.

7. in the terminal, type "cd /sdcard2/ubuntu" (or sdcard/ubuntu, depending on where you got it. i'm not going to differentiate again, you can figure it out)

8. now "sh u" (ignore rm -r -f errors)

9. when it tells you to, type "b" and hit enter.

10. if you see “root@localhost:/#” then you've successfully booted into a ubuntu shell. you can be done now, if you want, but most people want to see the gui, so keep going.

NOTE: always use "exit" to leave the ubuntu shell. don't just quit stuff willy-nilly. if you do quit stuff willy-nilly, open your terminal again and type "e" to clean up. you can do this a couple of times as an OCD check.

11. while in the ubuntu shell (and while connected to wifi) type "apt-get update", wait for it to finish and return a new line, then type "apt-get install tightvncserver". wait for that to finish.

12. type "cd /bin". this is where it get's really fun. now type "cat > x". this will not return a new command line, just a blank one. now type the following, hitting enter after each line, even the last one, and another one at the bottom.

rm -r -f /tmp
mkdir /tmp
chmod 777 /tmp
export USER=root
export XKL_XMODMAP_DISABLE=1
vncserver -geometry 1024x600

now press and hold volume down, and hit d. this should take you back to a new command line.

13. one more. this time do "cat > s" and enter:

export USER=root
vncserver -kill :1
vncserver -kill :2
sudo reboot
sudo halt

do volume down + d again.

14. to make those scripts executable, type "chmod 777 x" and then "chmod 777 s"

15. you're about ready. type "x" and hit enter. it will ask you for a password, which you should make, and then verify. answer "n" to the view-only password. it will only do this password stuff once, each subsequent time you run it will just do it.

16. leave the terminal app and open android-vnc-viewer. give the new connection a nickname, enter the password you just made in the terminal, choose port 5901 and use 24-bit color. hit connect.

17. in a minute you'll see ubuntu! be patient. play around when it's up, wee!

there's no sound yet, and you need to use ftp to connect to your gtab's internal storage (see bottom of post), but you get firefox! no flash.

keyboards and mice (including bluetooth HIDs) will work in ubuntu if they work in android.

some programs won't run, it's because android has stricter memory management policies than ubuntu. i'd like to get a list going of successfully run apps in ubuntu so post if you get something working.

NOTE: for some weird reason, ubuntu is using the keyboard key "d" by itself as a shortcut key, so whenever you use it it just minimizes everything. to fix this, go to the top and click (system -> preferences -> keyboard shortcuts) and look for one using "d". i think it was the very bottom one. just click the shortcut and use backspace to clear the shortcuts' function. you may have to restart your ubuntu shell for it to take.

18. to exit, hit menu -> disconnect, then in your terminal app again type "s" to stop vnc, and "exit" to leave ubuntu.

19. i suspect that i'm going to have to revise this guide a lot if anyone ends up being interested, so let me know if you think i should change something.

cheers!