[Milestone XT720 Android Development] telnet777:
Thanks! I haven't seen "phone will not receive phone calls." in his post.

I've found some log in /data/log. It seems that the phone hangup for unknown reason when the call incoming.

the first piece of log:

D/CallNotifier( 1844): RINGING... (new)
D/CallNotifier( 1844): onNewRingingConnection(): state = RINGING, conn = { incoming: true state: INCOMING post dial state: NOT_STARTED }
I/CallNotifier( 1844): Ignoring incoming call: not provisioned
D/PhoneUtils( 1844): hangupRingingCall(): regular incoming call: hangup()
D/PhoneUtils( 1844): - hangup(Call): regular hangup()...

second:

D/CallNotifier( 1844): RINGING... (new)
D/CallNotifier( 1844): onNewRingingConnection(): state = RINGING, conn = { incoming: true state: INCOMING post dial state: NOT_STARTED }
V/NetworkManagementService( 1687): add route response is 200 Route removed from default table
D/ConnectivityService( 1687): resetConnections(rmnet0, 3)
D/NetUtils( 1687): android_net_utils_resetConnections in env=0x273b20 clazz=0x8fa00001 iface=rmnet0 mask=0x3
I/CallNotifier( 1844): Ignoring incoming call: not provisioned
D/PhoneUtils( 1844): hangupRingingCall(): regular incoming call: hangup()
D/PhoneUtils( 1844): - hangup(Call): regular hangup()...
D/PhoneStatusBar( 1754): disable: < expand icons ALERTS* ticker system_info back home recent clock >

Edit1：I've reviewed CallNotifier.java from http://www.netmite.com/android/mydroid/packages/apps/Phone/src/com/android/phone/CallNotifier.java which is not XT720's CallNotifier.java in phone.apk.

in class CallNotifier this a handleMessage:

public void handleMessage(Message msg) {
switch (msg.what) {
case PHONE_NEW_RINGING_CONNECTION:
if (DBG) log("RINGING... (new)");
onNewRingingConnection((AsyncResult) msg.obj);
mSilentRingerRequested = false;
break;

in onNewRingingConnection

boolean provisioned = Settings.System.getInt(mPhone.getContext().getContentResolver(),
Settings.System.DEVICE_PROVISIONED, 0) != 0;
if (!provisioned) {
Log.i(TAG, "CallNotifier: rejecting incoming call because device isn't provisioned");
// Send the caller straight to voicemail, just like
// "rejecting" an incoming call.
PhoneUtils.hangupRingingCall(mPhone);
return;
}

It seems that Settings.System.DEVICE_PROVISIONED is not ready for answering a call.

Maybe we need to do this:

"INSERT INTO "secure" VALUES(30,'device_provisioned','1'); " with sqlite3 to /data/data/com.android.providers.settings/databases/settings.db

I'll try this asap.

I've compared miui 2.2's settings.db with fj's.

MIUI 2.2

CREATE TABLE secure (_id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT UNIQUE ON CONFLICT REPLACE,value TEXT);
INSERT INTO "secure" VALUES(1,'bluetooth_on','0');
INSERT INTO "secure" VALUES(2,'data_roaming','1');
INSERT INTO "secure" VALUES(3,'install_non_market_apps','0');
INSERT INTO "secure" VALUES(4,'location_providers_allowed','gps');
INSERT INTO "secure" VALUES(5,'assisted_gps_enabled','1');
INSERT INTO "secure" VALUES(6,'network_preference','1');
INSERT INTO "secure" VALUES(7,'usb_mass_storage_enabled','1');
INSERT INTO "secure" VALUES(8,'wifi_on','0');
INSERT INTO "secure" VALUES(9,'wifi_networks_available_notification_on','1');
INSERT INTO "secure" VALUES(10,'wifi_watchdog_watch_list','GoogleGuest');
INSERT INTO "secure" VALUES(11,'preferred_network_mode','3');
INSERT INTO "secure" VALUES(12,'cdma_cell_broadcast_sms','1');
INSERT INTO "secure" VALUES(13,'preferred_cdma_subscription','1');
INSERT INTO "secure" VALUES(14,'mock_location','0');
INSERT INTO "secure" VALUES(15,'backup_enabled','1');
INSERT INTO "secure" VALUES(16,'backup_transport','com.google.android.backup/.BackupTransportService');
INSERT INTO "secure" VALUES(17,'default_input_method','com.sohu.inputmethod.sogou/.SogouIME');
INSERT INTO "secure" VALUES(18,'mount_play_not_snd','1');
INSERT INTO "secure" VALUES(19,'mount_ums_autostart','0');
INSERT INTO "secure" VALUES(20,'mount_ums_prompt','1');
INSERT INTO "secure" VALUES(21,'mount_ums_notify_enabled','1');
INSERT INTO "secure" VALUES(22,'android_id','9774d56d682e549c');
INSERT INTO "secure" VALUES(23,'enabled_input_methods','com.sohu.inputmethod.sogou/.SogouIME');
INSERT INTO "secure" VALUES(24,'adb_enabled','1');
INSERT INTO "secure" VALUES(25,'throttle_reset_day','20');
INSERT INTO "secure" VALUES(26,'traffic','');
INSERT INTO "secure" VALUES(27,'device_provisioned','1');
INSERT INTO "secure" VALUES(28,'backup_provisioned','1');
INSERT INTO "secure" VALUES(29,'last_setup_shown','eclair_1');
INSERT INTO "secure" VALUES(30,'wifi_num_allowed_channels','13');
INSERT INTO "secure" VALUES(31,'dropbox:data_app_crash','disabled');
INSERT INTO "secure" VALUES(32,'dropbox:data_app_wtf','disabled');
INSERT INTO "secure" VALUES(33,'send_action_app_error','1');
INSERT INTO "secure" VALUES(34,'ssl_session_cache','file');
INSERT INTO "secure" VALUES(35,'dropbox:data_app_anr','disabled');

fj

CREATE TABLE secure (_id INTEGER PRIMARY KEY AUTOINCREMENT,name TEXT UNIQUE ON CONFLICT REPLACE,value TEXT);
INSERT INTO "secure" VALUES(2,'data_roaming','0');
INSERT INTO "secure" VALUES(5,'assisted_gps_enabled','1');
INSERT INTO "secure" VALUES(6,'network_preference','1');
INSERT INTO "secure" VALUES(7,'usb_mass_storage_enabled','1');
INSERT INTO "secure" VALUES(9,'wifi_networks_available_notification_on','1');
INSERT INTO "secure" VALUES(10,'wifi_watchdog_watch_list','GoogleGuest');
INSERT INTO "secure" VALUES(12,'cdma_cell_broadcast_sms','1');
INSERT INTO "secure" VALUES(13,'preferred_cdma_subscription','1');
INSERT INTO "secure" VALUES(14,'mock_location','0');
INSERT INTO "secure" VALUES(15,'backup_enabled','1');
INSERT INTO "secure" VALUES(16,'backup_transport','com.google.android.backup/.BackupTransportService');
INSERT INTO "secure" VALUES(17,'mount_play_not_snd','1');
INSERT INTO "secure" VALUES(18,'mount_ums_autostart','0');
INSERT INTO "secure" VALUES(19,'mount_ums_prompt','1');
INSERT INTO "secure" VALUES(20,'mount_ums_notify_enabled','1');
INSERT INTO "secure" VALUES(21,'accessibility_script_injection','0');
INSERT INTO "secure" VALUES(22,'accessibility_web_content_key_bindings','0x13=0x01000100; 0x14=0x01010100; 0x15=0x02000001; 0x16=0x02010001; 0x200000013=0x02000601; 0x200000014=0x02010601; 0x200000015=0x03020101; 0x200000016=0x03010201; 0x200000023=0x02000301; 0x200000024=0x02010301; 0x200000037=0x03070201; 0x200000038=0x03000701:0x03010701:0x03020701;');
INSERT INTO "secure" VALUES(23,'long_press_timeout','500');
INSERT INTO "secure" VALUES(24,'touch_exploration_enabled','0');
INSERT INTO "secure" VALUES(25,'speak_password','0');
INSERT INTO "secure" VALUES(26,'android_id','c968265d5d16a7ae');
INSERT INTO "secure" VALUES(29,'input_methods_subtype_history','');
INSERT INTO "secure" VALUES(30,'selected_input_method_subtype','-1');
INSERT INTO "secure" VALUES(31,'default_input_method','com.sohu.inputmethod.sogou/.SogouIME');
INSERT INTO "secure" VALUES(32,'selected_spell_checker','com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService');
INSERT INTO "secure" VALUES(33,'selected_spell_checker_subtype','0');
INSERT INTO "secure" VALUES(34,'adb_port','-1');
INSERT INTO "secure" VALUES(36,'throttle_reset_day','24');
INSERT INTO "secure" VALUES(37,'wifi_country_code','cn');
INSERT INTO "secure" VALUES(38,'kill_app_longpress_back','1');
INSERT INTO "secure" VALUES(39,'anr_show_background','1');
INSERT INTO "secure" VALUES(40,'enabled_input_methods','com.android.inputmethod.latin/.LatinIME:com.sohu.inputmethod.sogou/.SogouIME');
INSERT INTO "secure" VALUES(41,'install_non_market_apps','1');
INSERT INTO "secure" VALUES(45,'bluetooth_on','0');
INSERT INTO "secure" VALUES(47,'wifi_on','0');
INSERT INTO "secure" VALUES(48,'preferred_network_mode','1');
INSERT INTO "secure" VALUES(50,'adb_enabled','1');
INSERT INTO "secure" VALUES(55,'location_providers_allowed','network,gps');

There are many difference between these two files. And fj's settings.db is not complete. I'm now think about who has created this files?

It seems that I should run "INSERT INTO "system" VALUES(30,'device_provisioned','1'); " instead of "INSERT INTO "secure" VALUES(30,'device_provisioned','1'); "

I can't decode fj's phone.apk. But I think it's right.

I've tried, but it's useless. I think settings.db is created by settings.apk. So I'll try to decode this apk.