[EVO 4G Android Development] xak944:
Excellent find. Now we're getting somewhere!

IMO, assuming we have root to implement this hack/fix will be a safe assumption.

I could be barking up the wrong tree, but I found that 'logcat -b radio' gives some potentially interesting information. Here's a snippet:

# logcat -b radio |grep network
...
D/RILJ ( 1279): [0013]> REQUEST_SET_PREFERRED_NETWORK_TYPE : 3
D/HTC_RIL ( 247): ril_func_prefer_network_type_set():called
D/RILJ ( 1279): [0013]< REQUEST_SET_PREFERRED_NETWORK_TYPE
D/RILJ ( 1279): [UNSL]< UNSOL_RESPONSE_NETWORK_STATE_CHANGED
D/CDMA ( 1279): Event EVENT_REGISTERED_TO_NETWORK Received
D/RILJ ( 1279): [0064]> REQUEST_GET_PREFERRED_NETWORK_TYPE
D/HTC_RIL ( 247): ril_func_prefer_network_type_read():called
D/RILJ ( 1279): [0064]< REQUEST_GET_PREFERRED_NETWORK_TYPE {3}
D/RILJ ( 1279): [0065]> REQUEST_SET_PREFERRED_NETWORK_TYPE : 3
D/HTC_RIL ( 247): ril_func_prefer_network_type_set():called
D/RILJ ( 1279): [0065]< REQUEST_SET_PREFERRED_NETWORK_TYPE
D/RILJ ( 1279): [0066]> REQUEST_SET_PREFERRED_NETWORK_TYPE : 4
...

Any idea how to call the function ril_func_prefer_network_type_set() ? I also noticed the function ril_func_get_gsm_cdma_reg_state(), not sure what its use is though.

Although, it seems to always read a value of 4 (which looks to indicate a 1-based index, not 0-based), regardless of if I have set it through the UI (thru Testing menu):

# logcat -b radio |grep -i 'network mode'
I/PHONE ( 270): Network Mode set to 4 #during phone boot
I/PHONE ( 1186): Network Mode set to 4 #when force-close from pressing 'Select radio band' in testing menu

Here is the output when I set to (incorrect) 'GSM auto (PRL)':

# logcat -b radio
...
D/RILJ ( 1186): [0084]> REQUEST_SET_PREFERRED_NETWORK_TYPE : 3
D/HTC_RIL ( 127): ril_func_prefer_network_type_set():called
D/HTC_RIL ( 127): (t=1278425884)>> AT+COPS=2\r
D/HTC_RIL ( 127): (t=1278425884)<< 0\r
D/HTC_RIL ( 127): (t=1278425884)>> AT+CGAATT=2,1,3\r
D/HTC_RIL ( 127): (t=1278425884)<< 0\r
D/HTC_RIL ( 127): (t=1278425884)>> AT+COPS=0\r
D/HTC_RIL ( 127): (t=1278425884)<< 0\r
D/HTC_RIL ( 127): (t=1278425884)XX +HTC_ECCL: 3,"911","*911","#911"\r\n
E/RILC ( 127): unsupported unsolicited response code 0
D/RILJ ( 1186): [0084]< REQUEST_SET_PREFERRED_NETWORK_TYPE

And here is when set to correct 'CDMA auto (PRL)':

# logcat -b radio
...
D/RILJ ( 1186): [0085]> REQUEST_SET_PREFERRED_NETWORK_TYPE : 4
D/HTC_RIL ( 127): ril_func_prefer_network_type_set():called
D/HTC_RIL ( 127): (t=1278425891)>> AT+COPS=2\r
D/HTC_RIL ( 127): (t=1278425891)<< 0\r
D/HTC_RIL ( 127): (t=1278425891)>> AT+CGAATT=2,1,6\r
D/HTC_RIL ( 127): (t=1278425891)<< 0\r
D/HTC_RIL ( 127): (t=1278425891)>> AT+COPS=0\r
D/HTC_RIL ( 127): (t=1278425891)<< 0\r
D/HTC_RIL ( 127): (t=1278425891)XX +HTC_ECCL: 3,"911","*911","#911"\r\n
D/RILJ ( 1186): [0085]< REQUEST_SET_PREFERRED_NETWORK_TYPE

What seems strange to me is that all these values are reporting a value of '4' upon boot, while '4' appears to be the correct 'CDMA auto (PRL),' and '3' seems to be 'GSM auto (PRL).' It is definitely doing something, as my battery life doubles after making the change, and the "Time without signal" value confirms. :confused: Perhaps the visual glitch of showing CDMA when in fact it is set to GSM extends further than just the UI?

I don't know what to say to those who don't believe my 4-5 hour battery life, but it is absolutely true. I can tweak maybe another hour if I disable wifi, bluetooth, GPS, background sync, etc, but that essentially renders the phone useless. Leaving those things turned on but setting the preferred network gives me 8+ hours (i.e. lasts through the day, i.e. a usable phone).

Thanks for your input thus far, maejrep. I'm excited about the prospects of finding a solution! :)