[G1 Android Development] @xDeepS:
Okay installing Debian on G1 was a pain in the ass when people make auto installers and never update them -_- I had so much problem trying to use the bootdeb script so heres a manual way to do it and should take like 10 minutes and when done, like 3minutes to start it up.

Feel free to PM me if you get stuck!

What you need:

A Debian Image (debian.img)

Get it here.

ext2.ko

Get it here. If dead, from this page.

unionfs.ko

Get it here. If dead, from this page.

busybox

Get it here. If dead, from this page.

Android Apps you'll need:

Terminal Emulator (Get the free one, even if you have a terminal app!)

VNC Viewer (Free or Paid, anything should work)

Initial Setup

Stuff you need to put in SD card and where.

Put all the files (debian.img, ext2.ko, unionfs.ko & busybox) in one folder named kit and put kit in the root of your SD Card.

Before we start please note this may look looong but Part 1 takes like 10 minutes and Part 2 like 5 mins. So try it out, its worth it!

​

Part 1

We will install the base system in this part.

Step One

Open Terminal paste these in order:

export kit=/sdcard/kit

Press Enter​

export bin=/data/local/bin

Press Enter​

export mnt=/data/local/mnt

Press Enter​

export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH

Press Enter​

export TERM=linux

Press Enter​

export HOME=/root

Press Enter​

insmod $kit/ext2.ko

If this gives you a error, ignore it!

Press Enter​

mkdir $bin #-p

Press Enter​

cat $kit/busybox >$bin/busybox

Press Enter​

chmod 755 $bin/busybox

Press Enter​

alias _=busybox

Press Enter​

_ mknod /dev/loop0 b 7 0

Press Enter​

_ mkdir -p $mnt

Press Enter​

echo 'nameserver 4.2.2.2' >$mnt/etc/resolv.conf

Press Enter​

_ chroot $mnt /bin/bash

Part 1 Done​

It shoud now say #localhost: || If not then something went wrong...

Part 2

Installing the GUI.

In your Debian Shell (#localhost) type this:

cd /etc/apt

Press Enter​

nano sources.list

Press Enter​

Now add these two lines below the 1st source:

Hit Trackball+O to save and then Trackball+X to exit.

Now type:

apt-get install tightvncserver

After its done type:

apt-get install icewm

After its done type:

export USER=root

After its done type:

vncserver -geometry 480x320

You will be asked to setup the VNC Password after this. Set it and remember it!

Now type:

cd /root

then

cd .vnc

then

nano xstartup

Now edit out the file to look like this:

Hit Trackball+O and Trackball+X to exit

Now type:

cd /root

then

nano .bashrc

And add these lines to it:

export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 480x320

It should look like this:

Now go to Terminal Setting and type this in the Initial Command:

su
export kit=/sdcard/kit
export bin=/data/local/bin
export mnt=/data/local/mnt

export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root

alias _=busybox
_ mknod /dev/loop0 b 7 0

_ mount -o loop $kit/debian.img $mnt

_ chroot $mnt /bin/bash

mount -t devpts devpts /dev/pts
mount -t proc proc /proc
mount -t sysfs sysfs /sys

Heres a screenshot:

​

We use this to save time and boot Debian swiftly!

Now reboot the phone!

After its rebooted, just open Terminal and let it do its thing. If it did it right you should see the Debian Shell launched...

Part 3

Playing around in the GUI!

Go to androidVNC (or any VNC client you have)

Enter the floowing details:

Address: localhost

Port: 5901

Password: the one you set while setting up tightvncserver...

Press connect!

Troubleshoot

If you get a blank window and a X on VNC Connection, goto terminal emulator>settings>reset term. And then reopen terminal. Now goto your VNC Viewer and change the port to 5902 and hit connect!

You should now be in the GUI!! Video of the whole thing coming up soon!​

Stuff you may wanna note!

You may not be able to mount your SD Card while Debian is running so you have to restart your phone to mount your SD Card!

Every time you wanna boot debian just open terminal Emulator and install it as a Debian Boot App or something!

There are a few flaws and I am a design guy and not a coder, if you find something wrong or wanna revise anything PM me or reply. I know its not perfect!

Nothing was done by me I just copyed and pasted stuff from sources. Special Thanks to Jay Freeman (saurik) for coming up with Part 1 and dangermouse over at AndroidFanatic for coming up with Part 2!​