[Touch Pro2, Tilt 2 Android Development] ryannathans:
THIS POST IS OUTDATED, FOLLOW THE GUIDE IN THE STICKY INTRODUCTION TO ANDROID - THIS BUG HAS BEEN FIXED

DISREGARD THE POSTS UNTIL PAGE 5, THEY WERE POSTED

BEFORE

THIS ORIGINAL POST WAS EDITED WITH THIS FIX.

The problem some users are experiencing is that their phones freeze soon after their first boot until APN (access point name) is changed, this is somewhat difficult to do due to the freezes.

Note: this is for GSM users. I have no idea if this will work with CDMA, or even if they receive freezes.

Highlandsun and I have stumbled upon a fix that worked for me RHOD110 - this has been tested on GSM only (Froyo).

Using this fix, there should no longer be a need to manually select APN.

There are two files you need:

Highlandsun's RIL

and

Customized ROOTFS (F22's keymap rootfs (Mar 1st) edited - it WILL work with all his custom key bindings)

You will probably want to use this kernel if you are not already, it has great battery life and most failed wakes and SoDs are fixed. It is also what I used when testing this fix.

Firstly, extract put the downloaded RIL onto your SD card, I put mine in a folder named Android in the root of my SD, I recommend you do this also.

now edit conf/froyo.user.conf contained wherever you keep your HaRET.exe on your SD. If you are using Linux or a UNIX based operating system, use any editor you wish. If you are running windows, use notepad ++ to edit this file.

Add the following within the { } after custom_shells at the bottom of this file.

mount --bind /sdcard/Android/libhtcgeneric-ril.so /lib/froyo/libhtcgeneric-ril.so

so that your file should look something like this, I have highlighted the added line. You could even copy and paste the below to replace your whole file.

# General parameters
general{
renice=1 # Run the renice script to inprove call answering
}

#compcache related parameters
compcache{
compcache_en=1 # enable(1) or disable(0)20 compcache
cc_disksize=100 # Ram swap disksize - any number between 1 to 98 should work; default is 1/4 of the RAM (24)
cc_memlimit=64 # Limit the memory usage for backing swap (cc .5x known issue-defaults to 15% of total RAM)
cc_backingswap_en=0 # enable(1) or disable(0) backing swap
cc_backingswap=/dev/block/mmcblk0p4 # pointing to the backingswap partition device, swap
}

#create swap file for compcache or linux swap
swap_file{
swap_file_en=0 # set to 1 to create swap file
# set to 0 to del the swap file
linux_swap_file_size=32 # swap file size in MB
linux_swap_file=/sdcard/swapfile # pointing to the swap file location ( must be /system/sd/)
}

#Linux swap parameters
#
# linux swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=0 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p4 # swap partition device
}

#virtual memory
sys_vm{
sys_vm_en=1 # enable(1) or disable(0) virtual memory configurations
swappiness=0 # default 60
page_cluster=0 # default 3, (0 since CM3.9.6+)
laptop_mode=5 # default 0
dirty_expire_centisecs=3000 # default 3000
dirty_writeback_centisecs=1500 # default 500
dirty_background_ratio=3 # default 5
dirty_ratio=5 # default 10
vfs_cache_pressure=200 # default 100 (tendency of the kernel to reclaim cache memory)
overcommit_memory=1 # default 0 (0=Heuristic 1=Always overcommit 2=Don't overcommit)
overcommit_ratio=80 # default 50 (% of Physical+Virtual memory to allow allocation)
}

# custom shell commands, these commands run last
custom_shells{
chmod 777 /etc/dbus.conf
echo 2 > /sys/devices/platform/msm_hsusb/usb_function_switch
rm -f /sdcard/*.rec
mount --bind /sdcard/Android/libhtcgeneric-ril.so /lib/froyo/libhtcgeneric-ril.so
modprobe ipv6
#echo "Hello!!!" # example
#echo "You can create your own commands here" # example
}

Once you have done that, save it and make sure it is saved. You may have to copy it to your pc, edit it, delete the one on your sd, copy it back across - if using droidexplorer to manage files. You could also edit this file from within Android using ASTRO to browse to it.

Now extract that rootfs.img mentioned above and replace your current one.

You will now have improved reliably and hopefully no freezes on boot. The device may also seem faster now.

This fix was suggested to me by Highlandsun (hyc) on #xdandroid irc. He deserves all the credit.

---------For Developers-----------

The modified rootfs has /init.etc/ppp/options.smd edited to the following with changes bolded:

debug
defaultroute
updetach
[B]#persist[/B]
local
usepeerdns
noipdefault
unit 0
linkname gprs
novj
novjccomp
[B]lcp-restart 1
lcp-max-configure 3
ipcp-restart 1
ipcp-max-configure 3[/B]