[Touch Pro2, Tilt 2 Android General] highlandsun:
Yeah, looks like there's more to it than just that first patch. I'm still looking...

OK, since Phone.apk is a system app, it's not straightforward to just build a new one and drop it into place. The apps are cryptographically signed, and you need to have the same key on your build machine as was used to create it originally. I was running FRX06 and I don't have their release keys, so I replaced all of my /system with my own build of the Froyo tree. But even that wasn't enough, because /data/system still had records of the original keys. I found out about that here

http://forum.cyanogenmod.com/topic/3550-restoring-google-account-synchronization-after-upgrade/

After I did these edits on /data/system/packages.xml I was able to boot with my new system image (without first deleting all of my /data).

So here's the changes I made to the Phone.apk:

First, instead of leaving the APN setting in the GSM-specific options, I moved up to the generic Network Settings instead, so it can be used by both GSM and CDMA:

diff --git a/res/xml/gsm_umts_options.xml b/res/xml/gsm_umts_options.xml
index afdd0d3..25bc031 100644
--- a/res/xml/gsm_umts_options.xml
+++ b/res/xml/gsm_umts_options.xml
@@ -17,17 +17,6 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.phone">

- <PreferenceScreen
- android:key="button_apn_key"
- android:title="@string/apn_settings"
- android:persistent="false">
-
- <intent android:action="android.intent.action.MAIN"
- android:targetPackage="com.android.settings"
- android:targetClass="com.android.settings.ApnSettings" />
-
- </PreferenceScreen>
-
<com.android.phone.Use2GOnlyCheckBoxPreference
android:key="button_prefer_2g_key"
android:title="@string/prefer_2g"
diff --git a/res/xml/network_setting.xml b/res/xml/network_setting.xml
index 5d70e67..f296d67 100644
--- a/res/xml/network_setting.xml
+++ b/res/xml/network_setting.xml
@@ -49,6 +49,17 @@
android:dialogTitle="@string/preferred_network_mode_dialogtitle" />

<PreferenceScreen
+ android:key="button_apn_key"
+ android:title="@string/apn_settings"
+ android:persistent="false">
+
+ <intent android:action="android.intent.action.MAIN"
+ android:targetPackage="com.android.settings"
+ android:targetClass="com.android.settings.ApnSettings" />
+
+ </PreferenceScreen>
+
+ <PreferenceScreen
android:key="gsm_umts_options_key"
android:title="@string/gsm_umts_options"
android:persistent="false">

Then I deleted the GSM-specific code that disables this menubutton when the phone is not GSM:

diff --git a/src/com/android/phone/GsmUmtsOptions.java b/src/com/android/phone/GsmUmtsOptions.java
index 48411f6..9fcf6f4 100644
--- a/src/com/android/phone/GsmUmtsOptions.java
+++ b/src/com/android/phone/GsmUmtsOptions.java
@@ -30,11 +30,9 @@ import com.android.internal.telephony.PhoneFactory;
*/
public class GsmUmtsOptions extends PreferenceActivity {

- private PreferenceScreen mButtonAPNExpand;
private PreferenceScreen mButtonOperatorSelectionExpand;
private CheckBoxPreference mButtonPrefer2g;

- private static final String BUTTON_APN_EXPAND_KEY = "button_apn_key";
private static final String BUTTON_OPERATOR_SELECTION_EXPAND_KEY = "button_carrier_sel_key";
private static final String BUTTON_PREFER_2G_KEY = "button_prefer_2g_key";

@@ -45,12 +43,10 @@ public class GsmUmtsOptions extends PreferenceActivity {

addPreferencesFromResource(R.xml.gsm_umts_options);
PreferenceScreen prefSet = getPreferenceScreen();
- mButtonAPNExpand = (PreferenceScreen) prefSet.findPreference(BUTTON_APN_EXPAND_KEY);
mButtonOperatorSelectionExpand =
(PreferenceScreen) prefSet.findPreference(BUTTON_OPERATOR_SELECTION_EXPAND_KEY);
mButtonPrefer2g = (CheckBoxPreference) prefSet.findPreference(BUTTON_PREFER_2G_KEY);
if (PhoneFactory.getDefaultPhone().getPhoneType() != Phone.PHONE_TYPE_GSM) {
- mButtonAPNExpand.setEnabled(false);
mButtonOperatorSelectionExpand.setEnabled(false);
mButtonPrefer2g.setEnabled(false);
}

The resulting phone.apk still works for me. I'm pretty sure it will work for CDMA too, but you either need to build it yourself, or one of the xdandroid dev team will have to give us a patched Phone.apk signed with their release key.