[HD2 Android Q&A, Help & Troubleshooting and Genera] Jaiy:
I agree that your file works. (It's a configuration file, not a script, by the way - there is a difference). I have attempted to explain, however, that it works despite a number of errors, and I have provided references to source code to support my point. Studying the same code led me to the much simpler file, which also works.

Moving on, too bad that the actual vendor-specific GPS driver code is not open souce. Since there is no actual driver source code to support your assertion, I have done some further analysis of this, myself.

I am afraid that I must also disagree with your statement that the Android GPS has no A-GPS support.

I have read your "AGPS Script Development" thread. Right there in that thread, the file you post is full of A-GPS support. You stated that the file you posted is a "missing script". Sorry, but in fact it is a C language header file, include/hardware/gps.h which is present in the Android code, and it provides declarations for GPS data types and constants. This file will be used by all vendor-specifc GPS driver source code. The vendors will implement drivers that operate the GPS hardware of their device.

You say the compiled driver is installed as libgps.so. OK, let's go look at it.

I looked for the libgps.so library on my device, a Nexus One. In fact, there is no libgps.so on the Nexus One, but there is a lib/hw/gps.mahimahi.so and on examining its contents, it's clearly the GPS driver. Also, "mahimahi" is the Google codename for the Nexus One (just as "passion" is the HTC codename for it). So we have two clear signs that this file is the GPS driver for this device.

So I examined what's in the driver and looked for things that are associated with A-GPS.

First, XTRA:

sLocEngXTRAInterface
gps-xtra
loc_event_cb: xtra download requst
loc_ioctl for xtra returned %d

then SUPL:

xdr_rpc_loc_ni_supl_pos_method_e_type
xdr_rpc_loc_ni_supl_qop_s_type
xdr_rpc_loc_ni_supl_client_name_s_type
xdr_rpc_loc_ni_supl_slp_session_id_s_type
xdr_rpc_loc_ni_supl_notify_verify_req_s_type
SUPL NI: client_name: %s len=%d
SUPL NI: client_name not present.
SUPL NI: requestor_id: %s len=%d
SUPL NI: requestor_id not present.
SUPL Notification
SUPL Notify

and finally, AGPS:

agps
loc_eng_set_default_agps_server, type = %d, hostname = %s, port = %d
loc_eng_agps_data_conn_failed
loc_eng_agps_data_conn_closed
loc_eng_agps_data_conn_open: %s
deferring stop until AGPS data call is finished
set_agps_server, addr = %s
set_agps_server failed
set_agps_server returned = %d

So, sorry to disagree with you again, but I think it's clear that there is, in fact A-GPS support, at least on the Nexus One.

Also of note is that a similar search for "C2K" yielded nothing.

I think this further confirms that my much simpler config file is all that's needed to get this to work. You don't need the multiple NTP entries because there's no code to use more than one entry, you want to remove all the SUPL and XTRA support since that part of the driver seems to be what's broken, and you don't need the C2K entries since the driver doesn't appear to use it (not to mention that the C2K server host you used doesn't actually exist).