[Touch Pro2, Tilt 2 Android Development] highlandsun:
New init version

This is an alternate version of the ril which uses /system/bin/pppd instead of /bin/pppd. In order for it to work, you also must change some files in the rootfs. The new files are attached here in rootnew.zip. Here are the instructions for installing from a root command shell, assuming the zip file is in /sdcard/rootnew.zip:

# cd /
# mount -o remount,rw /
# rm -rf .git
# mv init.android init.android.BAK
# unzip /sdcard/rootnew.zip
# chmod 755 init.android init.etc/ppp/ip-*-*
# mount -o remount,ro /

Reboot after installing. You only need to do this once on a given rootfs. If you switch to a different rootfs you will need to do it again.

The advantage of using this approach is that the /system/bin/pppd doesn't ever try to write to /etc/ppp (so there is less opportunity for filesystem corruption when things go wrong) and the ril will not interfere with Android VPN use. Also this approach is required for NAND installs. I expect that this approach will be the default in the next FRX/GBX releases, but so far the changes haven't been merged yet.

This ril is no longer functionally the same as the ril in the first post. The code is in the initpppd branch of my git repo.

https://gitorious.org/~hyc/xdandroid/hycs-hardware_xdandroid-ril/commits/initpppd

Update: Everything in my initpppd branch has been merged into the main xdandroid repo. All of my fixes will be in the next official xdandroid builds, there's no longer any need to use my personal repo.

You can safely install the rootnew files regardless of which ril you use. But the ril in this post requires these files; it will not work without them.

Note: the init script in this rootnew archive is a patched version based on the xdandroid git repo. If you're running on F22's rootfs, you don't need this archive. Instead, you can grab F22's rootfs image with my patches already applied.

Also note: the ril attached here is no longer equivalent in functionality to the one in the original post. This ril no longer has fake GSM support; if you're using a CDMA phone see below. This ril also no longer uses any options in the startup.txt file. If you had force_cdma or north_am_dialing in your startup.txt file they are now ignored. If you set your operator name and ID correctly in build.prop then the dialing is automatically handled by Android.

Also this ril supports dynamic mode switching for world phones. If you have a rhod400/rhod500 and use both GSM and CDMA you can switch back and forth on demand. Currently the menu for this is buried inside the *#*#INFO#*#* menu.

[size="+2"]New CDMA support[/size]

This version now switches into CDMA mode automatically; you no longer need to set the default_network property or muck with sqlite3. If you have a rhod400/rhod500 and no SIM card installed, your phone will use CDMA by default. If you have a SIM card installed, it will default to GSM and you'll have to switch to CDMA yourself. If you're using my updated Phone.apk (a new version of that as well, not yet uploaded) then the World Phone menu will be enabled automatically and you can use that to select the mode. Otherwise just use the *#*#INFO#*#* phone menu.

You will still need to set your APN for MMS to work, and you'll probably still need to install an eri.xml file. And you still need to set your operator ID properties.

Note: if you try to switch modes on the current GBX image, the Phone app will crash. It's a bug in Google's code, not the RIL. I've written a fix for this and the fix is in the XDAndroid repos, so it will work fine in the next GBX release. Froyo is fine either way.