[EVO 4G Android Development] Homefix:
UPDATE: 01/13/11 Scrap Most of this,

got a 3G working image works 10tmes better than anything i have seen.

UPDATE go here:http://xdaforums.com/showthread.php?t=912544

have networking with hamachi, ssh works coolstuff:

trying to put it together (steps to create, and emulate on your computer, an image to get worken on your phone,) it works for the epic also which i have to say i prefer because of the slide-out, ya no wat. as soon as possible 2 DAYS TOPS

To Install Ubuntu Maveric on your Phone:

Of course you must have a rooted phone, since your rom must use a kernel with Loop support, I have only tested this on CyanogenMod Nightly build 199

make sure you have busybox installed

To create the image You have to start with a computer running Ubuntu or setup Virtual Box on a Windows computer,

or go here http://w3.impa.br/~gabrield/data/ubuntu-arm-development-rootfs.tar.bz2 to download the prebuilt one ( i havnt tested it)

1: Open Terminal in Ubuntu

2: Enter:

sudo apt-get install rootstock. After installing Rootstock, again in ubuntu terminal,

​

Enter,

3: sudo rootstock --fqdn ubuntu --login ubuntu --password ubuntu --imagesize 2G --notarball .

​

You can change login and password to your desire and

​

also change imagesize 1G 2G and soforth

Your ubuntu-arm.img will be created in	about 15 min or so. Take that arm.img and use Ark to	crush it down to under 200meg if you would like or and or change name to ubuntu.img.

Using file manager, Create a folder (on your phone) /sdcard/ubuntu

and transfer ubuntu.img to your sdcard folder, ubuntu.

Copy the following text including the (#) and paste into notepad++

(get it http://notepad-plus-plus.org/download) or in linux gedit or Eqvlnt.

Save as sdcard/ubuntu/bootubuntu (no extension)nothing more.

#modprobe ext2

mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system

export kit=/sdcard/ubuntu

export bin=/system/bin

if [ ! -d /data/local/ubuntu ]

then

mkdir /data/local/ubuntu

fi

export mnt=/data/local/ubuntu

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

export TERM=linux

export HOME=/root

mknod /dev/loop1 b 7 0

losetup /dev/block/loop1 /sdcard/ubuntu/ubuntu.img

mount -t ext2 /dev/block/loop1 /data/local/ubuntu

#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt

mount -t devpts devpts $mnt/dev/pts

mount -t proc proc $mnt/proc

mount -t sysfs sysfs $mnt/sys

sysctl -w net.ipv4.ip_forward=1

echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"

echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf

echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf

echo "Setting localhost on /etc/hosts "

echo "127.0.0.1 localhost" > $mnt/etc/hosts

echo "READY TO ROCK AND ROLL BABY! "

echo "Brought to you by NexusOneHacks.net and the open source community! "

echo " "

chroot $mnt /bin/bash

#After exit command is executed clear it all up

echo " "

echo "Shutting down Ubuntu"

umount $mnt/dev/pts

umount $mnt/proc

umount $mnt/sys

umount $mnt

losetup -d /dev/loop1

AND DO THE SAME FOR THE NEXT 4 FILES AND NAME THEM CORRECTLY AND USE THE RIGHT TEXT EDITOR

This next file is called sdcard/ubuntu/unionfs (remember no file ext.)

busybox insmod unionfs

mount -t unionfs -o dirs=$mnt/etc=rw:/etc=ro unionfs /etc

mount -o remount,rw /

ln -s $mnt/lib /

for x in \

bin boot home media mnt \

opt selinux srv usr var

do

ln -s $mnt/$x /

done

rmdir /root

ln -s $mnt/root /

mount -o remount,ro /

mount -t unionfs -o dirs=$mnt/sbin=rw:/sbin=ro unionfs /sbin

mount -t unionfs -o dirs=$mnt/dev=rw:/dev=rw unionfs /dev

mount -t devpts devpts /dev/pts

This next file is called sdcard/ubuntu/fsrw (remember no file ext.)

mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system

echo "Filesytem remounted as read/write"

This next file is called sdcard/ubuntu/mountonly (remember no file ext.)

# Based on Saurik's remount.sh - modified by Mark Walker of http://www.androidfanatic.com

# Email admin@androidfanatic.com

modprobe ext2

clear

mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system

export kit=/sdcard/debian

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

busybox insmod ext2

clear

echo " "

mount -o loop,noatime $kit/debian.img $mnt

mount -t devpts devpts $mnt/dev/pts

mount -t proc proc $mnt/proc

mount -t sysfs sysfs $mnt/sys

echo "Custom Linux IMG Mounter V1.0 - by Mark Walker"

echo "WEB: http://www.androidfanatic.com"

echo "EML: admin@androidfanatic.com"

sleep 1

echo "AutoMounter started"

sleep 1

echo "REBOOT PHONE TO PROPERLY DISMOUNT"

echo " "

# chroot $mnt /bin/bash

This next file is called sdcard/ubuntu/ubuntu.sh (this one has .sh for file ext)

mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system

modprobe ext2

clear

rm -f /data/local/bin/fsrw

rm -f /data/local/bin/bootubuntu

rm -f /data/local/bin/unionfs

rm -f /data/local/bin/installer.sh

rm -f /data/local/bin/mountonly

mkdir /data/local/mnt

clear

rm /system/bin/fsrw

rm /system/bin/bootubuntu

rm /system/bin/unionfs

rm -/system/bin/mountonly

cp -f fsrw /system/bin

cp -f bootubuntu /system/bin

cp -f unionfs /system/bin

cp -f mountonly /system/bin

cd /sdcard/ubuntu

chmod 4777 *

cd /system/bin/

chmod 4777 *

cd /

clear

echo " "

echo "Ubuntu Chroot Bootloader v0.1"

echo "Ubuntu Bootloader is now installed!"

echo "This process does NOT damage Android OS!"

echo " "

echo "Original Installer by Charan Singh"

echo "Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net"

echo " "

echo "To enter the Debian Linux console just type 'bootubuntu'"

bootubuntu

After you have,

bootubuntu

fsrw

mountonly

unionfs

ubuntu.sh

ubuntu.img

in your /sdcard/ubuntu folder

Open adb shell

Enter:

su

cd /sdcard/ubuntu

sh ./ubuntu.sh

apt-get update

apt-get install tightvncserver

apt-get install lxde

export USER=root

vncserver :0 -geometry 1024x800

cat > front

export USER=root

cd /

rm -r -f /tmp

mkdir /tmp

cd /

vncserver :0 -geometry 1024x800

(cntrl D, cntrl D then Enter)

cat front /root/.bashrc > temp

cp temp /root/.bashrc

Get Android VNC for you phone (market)

open app

enter 5900 for port

enter password you setup for vncserver

set graphics for 24 bit

Connect

let the fun begin

Next update: How to network with Hamachi

It does work