[Touch CDMA General] jamezelle:
the title says it

after many requests here is the guide

most of this is spread around the vogue

forum here and there, i just wanted to bring it all together

goal-seeing lately we have lost some good developers, this is a shot at getting more involvement in vogue/android development

I.SETTING UP YOUR SYSTEM

1. GETTING LINUX you will need to have Linux installed on your computer(dual-boot, vm, whatever). i recommend Ubuntu karmic (9.10) because its pretty new-user friendly. It can be found at http://www.ubuntu.com/

for you windows lovers here is a guide to setting up a ubuntu VM(virtual machine (if you really didnt know :p))

2. THINGS/TOOLS YOU WILL NEED download these:

original 8/8/09 ion 1.5 build HERE(we are gonna use the bin-files and the apns-conf.xml, and a few apps)

the latest rootfs.img (find it:p)

these android tools (included are genext2fs (android version), split_bootimg.pl, and extract_ramdisk.sh)

after downloading, extract the zip to a folder. open a terminal and cd to the dir of the tools. click applications>accesories>terminal and type:

cd ~/whatever/
sudo rm -rf /bin/genext2fs
#dont type whats after the pound signs
#type in your password
#if you havent set up a su password yet type:
sudo passwd
#then make one, next
sudo cp -r ./whatever/genext2fs /bin/

squashfs-tools (if you have ubuntu 9.10-karmic first you will have to uninstall squashfs-tools 4.0(4.0 WILL NOT NOT NOT NOT NOT WORK) that is installed during the installation of linux ): go to system>administration>synaptic package manager. type squashfs-tools in the quick search, then right click and click mark for complete removal. then hit apply. then download and install this here http://http://ftp.us.debian.org/debian/pool/main/s/squashfs/squashfs-tools_3.3-7_i386.deb

i also strongly recommend downloading the sdk-tools v1.1(adb is almost essential when porting, for debugging purposes) enatefox has it posted on his media fire. (search for it:p)

3. ORGANIZATION

now that we have what we need. lets get organized.

a.mount points

we are going to use mount points while porting.

terminal:

sudo mkdir /mnt/rootfs
sudo mkdir /mnt/system
#i also have one for mounting data files
mkdir /mnt/data

b. directories

terminal:

mkdir ~/Desktop/android
mkdir ~/Desktop/android/ion
mkdir ~/Desktop/android/donut
#you get the point...

now put the ion 8/8/09 build in the ~/Desktop/android/ion folder and rename it system.sqsh then

terminal:

cd ~/Desktop/android/ion
unsquashfs ./system.sqsh

you should now have a folder called squashfs-root in the ion directory. it contains all the guts from the ion build. feel free to look around in that folder as you should get familiar with the folders and things in there

II PORTING

1. PORTING A HERO ROM(this was in zens how-to-make-a-hero-rom.txt im just adding on to it)

a. Download a rom from the dream/sapphire development forums.

b. Extract what you downloaded to ~/Desktop/android/hero. It is usually an update.zip.

c. Open the extracted folder. Inside you should see a data directory and a system directory.

d. Open the data directory and look for an app or app_s folder.

e. Open those folders and copy the apks to the system/app/ folder. Leave out what you don't need. feel free to add any custom apps. as long as they are from the same sdk number. ie 1.5, 1.6, 2.0.1, 2.1 most are pretty cross-compatible though.

f. Delete system/xbin from the rom your porting and replace it with the one from Ion.

g. Copy ~/Desktop/android/ion/squashfs-root/etc/apns-conf.xml from Ion to ~/Desktop/android/hero/system/etc/

h. Mount the latest rootfs.img

terminal:

sudo mount ~/whereever/rootfs.img -o loop /mnt/rootfs

i. Copy libaudio.so libaudioflinger.so libcameraservice.so libgps.so from /lib in the mounted rootfs over to system/lib in the rom you are porting*(donut and eclair really dont need this step because those files are in most of the latest rootfs.img's but be sure to check)

j. Edit the system/build.prop or even use the Ion build.prop.*(for donut/eclair you may want to edit the lcd density to 120 or 110 in the build.prop for qvga and 160 for 320x480)

k. Create a blank file in system/ called hero.build*(for eclair/donut create donut.build or eclair.build or eclairhero.build.....etc)

*l. for hero any systems too big to run on nand, here is a script to make a data file. put this in the ~/Desktop/android/hero directory. cut the app folder from ~/Desktop/android/hero/system and paste it to ~/Desktop/android/hero , and rename it too app_s . next run the mkdataimg.sh it should ask for you password in a terminal. type it in and then it should mount the data.img to data-mnt folder in ~/Desktop/android/hero . keep that terminal open copy the app_s folder in to data-mnt. then type y in the terminal to unmount the data.img. next:

terminal:

cd ~/Desktop/android/hero
ln -s /data/app_s ./system/app

that should make a broken symlink in system

2. Mount it and squash it

ok now that we are done porting lets put it together

terminal:

cd ~/Desktop/android/hero
genext2fs -d ./system -b 180000 -a system.ext2
sudo mount -o loop ./system.ext2 /mnt/system
sudo mksquashfs /mnt/system system.sqsh
sudo chown $USER ./system.sqsh
#and if you want
rm -rf ./system.ext2

im gonna clean this up a bit later just wanted to get this out to you guys