[HD2 Android Q&A, Help & Troubleshooting and Genera] Jaiy:
I'm disappointed that your reaction is one of hostility and anger. I assure you that I am trying to help improve things. I'm not trying to "take the thread in the wrong direction". I realize that you've spent a lot of time on this, and that you're about to release an update, but you must take the time to read the relevant source code and to correct errors.

The gps.conf file is parsed by the code in Android's GpsLocationProvider.java source file. Folks, google this file name and you can examine the code for yourselves on any of several sites that host the Android source code.

The gps.conf configuration keywords NTP_SERVER, SUPL_HOST and C2K_HOST are all parsed in that file, specifically between lines 418 and 446. It can clearly be seen, by following the links to the parsing functions that are used there, that there is no code to handle multiple entries for any of these keywords. Specifically, the NTP_SERVER value is stored in the variable mNtpServer which is then used at lines 538 and following to do a one-time lookup from that single NTP server of the NTP time, the reference time and the round trip time from which the Android device's own time offset is calculated. Nowhere is there code that loops through multiple NTP_SERVER entries. Sorry, but it's just not there.

There is also no code to handle "FQDN" as a value for the SUPL_HOST. The code expects the value of SUPL_HOST to be an actual hostname. The hostname is stored in the variable mSuplServerHost which is of type String and is used at lines 705 and 706 where it is passed to the method native_set_agps_server(), without any expansion of "FQDN" to a hostname. You have clearly copied an example from an AT&T configuration file in which FQDN was used as a placeholder for an actual value to be substituted there.

As a side note, the XTRA config is handled by the file GpsXtraDownloader.java. Lines 59 to 61 in that file clearly show that multiple values are supported, and with separate names XTRA_SERVER_1, XTRA_SERVER_2 and XTRA_SERVER_3. Note that the same parsing method, getProperty() is used for both these XTRA variables as for the NTP and SUPL variables. It is not the case that getProperty() is looping through multiple entries with the same name. No, getProperty() only returns a single value.

Now, these files only parse the config and handle he A-GPS download. I was very serious when I asked where the Android code for the actual GPS driver is. So far, I've still not found it. I am very keen to read it as that will shed light on why the GPS isn't working when A-GPS mode is enabled. I am beginning to suspect that the actual driver is not part of the open source code, which is a pity. But if anyone knows where we can find that code, please do provide a link.

By the way, your work does have merit. It enabled me to find the source code and see what the config does rather more quickly than I'd have been able to without it. From that, I've posted what I intend to be constructive comments based on the fact of the source code. I do hope that you, and others will take the time to review what I have posted, and to examine the source files for yourselves.