yashsingh1/xdaforums huggingface dataset:
[HD2 Android NAND Development] SNK180:
i dont understand what you mean about which file did i use. i just downloaded the app and added the lines like you said. im using CMYLXGO blue topia hd. about the other person, is he trying to get a lock inside the house? because he wont get any if thats what he is doing. in side the house i dont get any locks. if want to test the gps on my phone i have to go to the backyard or to the balcony of the house.

well thinking about it. before this, i have had locks inside the house like a couple of times. but they took a long time. more than 5 minutes.but imo is better to have a gps test outside
[HD2 Android NAND Development] AngelDeath:
Actually I dont know if he was trying in the house or not, obviously like I have said once before, you dont need a gps in your house, Im sure everyone knows how to get around their house :D

As for the file, I was just asking if you used one of my modified gps.conf scripts or the generic thats in the roms/phone, obviously you gave me my answer. Thanks for the answer, going to quote your post here to my other thread.
[HD2 Android NAND Development] AngelDeath:
Okay Just tested out the GPS with GPS Status, and it definitely works very different on the inspire (Being a native android) then it does on the HD2. Also that phone I got from radio shack must have been messed up, even doing a master reset. But here are the results on the Inspire:

Cold lock after Gps Status installed and downloaded agps data: 36 seconds, relocks in 2 seconds. Shutting down and waiting 10 mins, re-starting gps status 5 seconds. Waiting approx 45mins and restarting GPS status 38 seconds, relocks 3 seconds.

Using the stock generic gps.conf file thats in android with wifi unchecked under locations. (Phone is not rooted, so I cant install my script)

Now being that the Inspire is suppose to be a desire or desire hd and the closest to the HD2 as hardware specs, would the inspire rom be of any interest in this?
[HD2 Android NAND Development] SNK180:
hey got curios and started to do tests inside the house in my room and im getting locks.it takes time but im getting them. the thing is that inside i faster locks using google maps or foursquare. gps status takes longer.
[HD2 Android NAND Development] juergeli0815:
i can confirm that it works with the Hyperdroid-gbxv11-ROM (gingerbread).

I am using your modified gps.conf for germany and added the two lines at the end (after i istalled the gps-fix.apk).

Now the locks are much more faster then before.

Thanks for your hard work !!!!
[HD2 Android NAND Development] tytung:
I'm completely not a GPS expert. :)

But gps.h in your first post comes from this official article (http://source.android.com/porting/gps.html), and gps.h is for creating a shared lib (libgps.so) if we implement a gps.c, not for the kernel development.

According to my reading, GPS operation should be only related to the shared lib.

I have no free time to look into huashan rom.

I'm developing Gingerbread ROM, so I'm interested in Diem's gps fix.
[HD2 Android NAND Development] D4rk50ul:
I added those lines and the xtra.bin to the /data folder. Will let you know if anything changes but with the current weather conditions I wasn't able to get a lock.

Running 2.3.3 HyperDroid GBX v11
[HD2 Android NAND Development] DimICE:
Not work for me on Typhoon
[HD2 Android NAND Development] Karanlik:
Also not work for me on Typhoon.

I manually copied xtra.bin file in data folder since gpsfix didn't install on mine.

I used this gps.conf file

In stock gps.config file on Typhoon, it takes 7 min to lock (cold start).
[HD2 Android NAND Development] kikisp:
with hyperdroid v11 works really well..i got first lock on a cloudy day in about 5 seconds..good job
[HD2 Android NAND Development] ajm2387:
I can also confirm this works!

I ran gps-fix.apk then added those two lines. didn't even use the gps.conf file from the instantaneous GPS script thread. and WOW

before i had no lock at all in my office, after these 2 steps, i get a FULL 4/5 sat lock in less than 20 second from a cold start!!!
[HD2 Android NAND Development] victorfungcy:
This method doesn't really work for me.

It still take ages(about 2 minutes) to get a lock on imilka's desire hd ram.
[HD2 Android NAND Development] memin1857:
For all testers:

Guys when testing anything on this thread be aware of these:

- With or without agps, if you get a lock, then any relock within 4-5 hours will be quite fast even with non agps hd2. Make sure you are "really" getting a fast cold lock while trying. There must be at least 6 hours or a lot of distance travelled between tests or you will be fooled. Ideally your testing should take 2-3 days if you really want to make sure it is working.

- /data/xtra.bin may only work after you run qbanin gps fix and before any nav/gps app is started. this is just for testing. xtra.bin should be fresh. After running qbanin gps fix you have to wait at leat 30 seconds and see the message gps fixed on your screen as toast notification.

- You MUST be outside while testing. Make sure you didn't get a lock at least for the last 6 hours. (ideally you should be in a different location)

- Rebooting/resetting, turning off/on or removing battery will NOT reset cold lock. (It will still lock fast within few hours of last lock)

I always test with two phones side by side. An HD2 and an agps supporting Samsung Galaxy 551. Galaxy 551 almost always (cold, warm or hot start) locks within only a few seconds which is great. HD2 cold locks within 50-60 seconds. HD2 relocks within a few hours is about 10 seconds (which is fast but still slower then my second native android phone) After about 6+ hours or next day hd2 locks in 60 seconds again.

A COLD lock (meaning no previous lock in the last 6-24 hours) should be less than 15 seconds IF AGPS IS working. IF you get a lock between 50-70+ seconds then AGPS is NOT working. These times are for OUTSIDE and NOT near a building.

I'll be testing over 2-3 days to make sure if anything works or not. I will also try disabling agps of my samsung phone to see if it locks just as slow.

EDIT: At first my first tests, my hd2 lock did not speed up. And my midrange samsung phone was still much faster locking even without agps enabled. So /data/xtra.bin test was a fail for me but I will continue testing everyday when going to work every morning. It would be best to make the test next day.
[HD2 Android NAND Development] Mafioso:
I guess, that explains why AngelDeath can't find the AGPS code in HTC rom's because its there in compiled form (libgps.so)

That being said as with other drivers which charansingh pointed out (like Wi-Fi, Bluetooth) most probably the current GPS libraries are straight port of HTC Bravo, that explain why there are issues like AGPS not working properly and GPS signal bars only come after the lock is made not before on HD2...while they work correctly in Desire..

Someone has to port the GPS AOSP drivers/libraries to HD2 source...Charan Singh would you please :D

EDIT: I guess, he's already doing that...stuck with amss problem, let hope he gets it sorted out soon :)
[HD2 Android NAND Development] jaba_cz:
I'm on GBX v11 slightly moded by myself, but no change was made to GPS system. I only pushed local gps.conf.

Before Qbanin lock was few minutes cold start and about 1 minute relock.

I added the gps.conf lines and run apk (nothing wisible happened). After this I got cold lock in about 40 sec, and consequent lock in about 10 sec. This are values, which were normal with WinMob and QuickGPS app. So I can tell, this is the right way to go. Probably we will not be faster with HD2 hw anyway, as the WM was at the same level.

Now someone should make the code running at other builds and modify Qbanin apk to run on schedule (like daily update). ... And it is done.

Great thanks to your brains.
[HD2 Android NAND Development] memin1857:
I remember with winmo+quickgps (agps) outside open air locks were within 10 seconds. So I believe wm cold locks was faster than you remember. I will try to go back to winmo and test if I have time to make sure wm was just as fast as my samsung android phone.
[HD2 Android NAND Development] jaba_cz:
Yes.... And now we are till 10s, meant re-lock.

Maybe my memory is not bulletproof, but I remember it a way, as the WM cold lock was close to one minute :-)

Anyway, the change from few minutes to 40 sec cold, and from 1 minute to 10s re-lock is great enhancement. If we are able to make it stable, I'll be satisfied.
[HD2 Android NAND Development] SNK180:
what i do is; i reset agps and clear the data with gps status. then restart the phone. after that i test.
[HD2 Android NAND Development] memin1857:
I believe resetting agps or clearing agps data in gps status doesn't actually do anything with hd2. (my relocks were still fast even after clearing agps)

btw when you relaunch gps status later you still see last lock info even while trying to relock which is not the behaviour with proper gps phones. (relaunching of gps status should start empty then fill up when locked)

I'll be testing winmo and froyo stock desire rom today about agps and gps status behaviour.

EDIT: I flashed winmo and it locked in 8 seconds. Quickgps of winmo downloads xtra.bin to windows directory. It says it is valid for 7 days. (because the projected path of satellites is known and usually accurate enough)

EDIT 2:With stock froyo desire rom, gps status app says "gps assistance data downloaded" but with gingerbread (and my froyo samsung phone) it says "a-gps data will be downloaded as soon as you have a data connection"

EDIT 3: I found this in gps.conf file of acer liquid: (Control Plane is older agps method of asking gsm provider, User Plane is newer method of downloading xtra.bin file)

# TRUE for "User Plane", FALSE for "Control Plane"

DEFAULT_USER_PLANE=TRUE
[HD2 Android NAND Development] blhd2:
Hi, first wanna say AWESOME WORK, HUGE THANKS to you on this post and yours and others dillegence on this issue. Am happy to report than in Sacramento,CA USA, on my tmousa 512 Superphone using Hyperdroid GBX v11 via mgldr1.13 I now have super-fast GPS lock. I edited the GPS.conf file to this:

NTP_SERVER=north-america.pool.ntp.org XTRA_SERVER_1=0.north-america.pool.ntp.org XTRA_SERVER_2=1.north-america.pool.ntp.org XTRA_SERVER_3=2.north-america.pool.ntp.org XTRA_SERVER_3=3.north-america.pool.ntp.org

SUPL_HOST=lbs.Geo.t-mobile.com

SUPL_PORT=7275

DEFAULT_AGPS_ENABLE=TRUE

DEFAULT_SSL_ENABLE=FALSE

ENABLE_WIPER=0

AGPS=/data/xtra.bin

XTRA_SERVER_1=/data/xtra.bin

... and NOW have 1st lock in under 30 secs. And re-lock in 2-3 seconds every time. WOW!

Sent from my Hyperdroided HD2 Superphone
[HD2 Android NAND Development] Karanlik:
Location is Istanbul, Turkey. I downloaded file from

http://xtra1.gpsonextra.net/xtra.bin When i click this link, it starts to download xtra.bin.
[HD2 Android NAND Development] memin1857:
Location shouldn't matter for xtra.bin. It contains information about all the satellites, since your phone knows (from location service) roughly where it is, it uses only the relevant satellite info. xtra.bin also contains guessed satellite position for about one week (which is reasonably accurate)

The problem is not downloading xtra.bin, problem is relaying xtra.bin information to gps library.

AGPS supporting phones (with proper agps libraries) have enable agps setting in location menu of Android settings. This does not appear with HD2 Android roms. I believe android checks for agps support at bootup and won't display the setting if no support is available. (I flashed stock desire rom, and agps setting was still not there)

I am using typhoon 2.8.4 btw. I always had the ntp server location set to my country and have always cold locked in about 50-60 seconds. But unfortunately it isn't good enough for me. (Since I saw my other phone always getting a lock in just a few seconds)

FYI these are different SUPL hosts different brand phones use. Google's server is likely the most reliable one

SUPL_HOST=supl.google.com

SUPL_HOST=lge.glpals.com

SUPL_HOST=supl.sonyericsson.com

SUPL_HOST=agps.fetnet.net

I am yet to find a way to reset the gps chip to clear agps/previous lock-sat info so that I can test without waiting at least 6 hours. I mean I can't force it to cold start. If a way to purposedly cold start could be found, testing would be much easier. Because after an initial lock I can't tell relocks is with agps or not. Maybe debug in gps.conf could here:

# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info

# 4 - Debug, 5 - Verbose

DEBUG_LEVEL = X

Debug level might tell if agps is used or not while testing.

Also check this out: (it's about java class gpslocationprovider which generates the conf files and possibly enables agps - extra)

http://www.androidjavadoc.com/0.9_beta/com/android/internal/location/GpsLocationProvider.html
[HD2 Android NAND Development] mishik:
I'm in Israel and getting cold lock within 2-3 minutes. Setting the 2 lines that were suggested suggested had no effect for me. Neither using local timeservers did. And yes, I see the xtra.bin file in /data folder. Quite frankly, I would be surprised if those things would do anything. IMHO those "positive" results that were reported both here and in the other thread are purely due to people being unable to perform the test in a proper way.
[HD2 Android NAND Development] memin1857:
I agree, hd2 android without agps always gets a fast lock within few hours of last lock. That may be confusing people.
[HD2 Android NAND Development] jaba_cz:
Hi guys.

I've got silly and simple idea.

The solution here is to add AGPS line into gps.conf linked to local file downloaded somehow.

I tried to link it directly to internet.

My gps.conf looks now (You can see, I use local Czech NTP servers, but this should make no difference).

NTP_SERVER=time.ufe.cz
NTP_SERVER=ntp.nic.cz
NTP_SERVER=ntp.ujf.cas.cz
NTP_SERVER=ntp.karpo.cz
NTP_SERVER=ntp.globe.cz
NTP_SERVER=cz.pool.ntp.org
NTP_SERVER=0.cz.pool.ntp.org
NTP_SERVER=1.cz.pool.ntp.org
NTP_SERVER=2.cz.pool.ntp.org
NTP_SERVER=3.cz.pool.ntp.org
NTP_SERVER=europe.pool.ntp.org
NTP_SERVER=0.europe.pool.ntp.org
NTP_SERVER=1.europe.pool.ntp.org
NTP_SERVER=2.europe.pool.ntp.org
NTP_SERVER=3.europe.pool.ntp.org
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin

AGPS=http://xtra1.gpsonextra.net/xtra.bin

I was out of the house for a while with first lock less than minute and consequent locks in few seconds.

Can you, please, try and confirm, or deny, that AGPS can be linked directly to internet?

I will make more trials tomorrow. It's 10pm here, I'm going to to bed :-)
[HD2 Android NAND Development] memin1857:
Gps status - adfree conflict

I read in some forum that if you are using adfree app then gps status app may not download xtra.bin complaining it will download as soon as there is connection. use adfree to "revert" your system and reboot. then gps status may download agps data. This means there is a possibility adfree's hosts file may block your agps download. THIS DIDN'T WORK FOR ME but it's still something to think of.

BTW my samsung phone still locks very fast even if I disabled agps support. I think it is because the xtra.bin file which was downloaded and inserted into gps library is valid for one week, so it will start slow locking probably after a few days.
[HD2 Android NAND Development] AngelDeath:
Manually downloading itisnt the way to go, I would suggest to use the gpsfix.apk file, and the reason why I say that is by manually downloading it and placing it in the location its suppose to be might not be enough. I can tell you that file is very small, and why it takes close to a minute from the time it downloads to the time you get a notification saying "GPS Fixed" there must be something its doing, so I would suggest trying the apk and let the apk do the work.

Actually I think it might, I have to look further into this, cause I know when I got the xtra.bin from the china rom, it clearly states in there china communications. I am going to be looking more into this. As for your Desire Rom, was this a desire rom on a desire phone? Because I too have the same thing, but on my inspire I dont have the libraries either, but the Inspire I just tried 12 hours later and my lock was in 4s without modification to anything. So now I'm thinking a different way based on the inspire, that the information might already be in the so file instead of being a seperate file, but I dont know that for sure yet.

Again, I dont expectto ever get the HD2 perfect, but anything close to what I stated I'd be happy with as well as I'm sure everyone else would be, but still alot of work, and possibilities in a joint effort.

Unfortunately not every location will have the exact same results, which is what I am trying to work on, but again its a process. And as far as I searched, Israel has no local timer servers, thats one of the reason I didnt make one for that location, and the ntp.pool.org is just that, a pool. But anything direct doesnt exist. And in a way you should consider yourself for now lucky that you get one, cause alot of people based on location and rom, still have difficulty getting a first lock.

But I'm trying as best as I can with information gathered trying to make it work for everyone as best as I can.
[HD2 Android NAND Development] mishik:
Israel does have time servers (obviously). I'm using 3 of these and I'm sure I would have found more if I wanted. As I said, I gained nothing from using them, as expected. I don't see why the location of a time server would have anything to do with gps fix.
[HD2 Android NAND Development] AngelDeath:
Regular time-servers have no effect when it comes to GPS, if you read the main post in the Q&A the question you ask is answered there. Normal Time-Servers do not have anything to do with GPS locks, Direct time-servers, and Stratium 1 & 2 server are the only ones that related to GPS, Your internet provider even has a time server, but it is not related to GPS.

GPS Time-Servers need specific hardware specifically for GPS syncronization, without them your wasting your time.
[HD2 Android NAND Development] mishik:
You got the stratum thing all wrong. Stratum level in time servers hierarchy is just the distance of a specific time server from the actual reference clock. Startum0 is the only one connected to a clock, stratum1 is connected ti stratum0, stratum2 is connected to stratum1 etc. The relation to gps you heard something about, but failed to understand is the implementation of the reference clock that startum0 server is connected to. It has nothing to do with assisted gps, or with gps devices lock acqusition whatsoever. Read this - its a very clear explanation, and stop misleading people.
[HD2 Android NAND Development] D4rk50ul:
Ok with some tweaking of my config and use of xtra.bin in my data folder I got a complete cold start lock in under 20 seconds. Subsequent locks in under 3 second.
[HD2 Android NAND Development] AngelDeath:
"Quote":

GPS Network Time Server

GPS is the most effective method of retrieving UTC time (Coordinated Universal Time) anywhere on the globe. Using the GPS satellite network and able to synchronize hundreds and thousands of separate devices a Galleon GPS network time server is a crucial part of securing and synchronizing a network.

GPS has several advantages over other methods of receiving UTC time. GPS is available everywhere on the planet as long as the GPS antenna has a clear view of the sky it is also highly secure as a GPS network time server operates external to the network and the firewall. The UTC time signal from the GPS satellite can be completely authenticated by NTP (Network Time Protocol) to ensure the quality safety and reliability of the signal.

A GPS network time servers are stratum 1 devices, meaning they receive the time direct from an atomic clock (onboard the GPS satellite) as opposed to most internet time sources which are stratum 2 devices. These also cannot be authenticated and operate through the network firewall - causing potential security vulnerabilities.

GPS network time servers are also incredibly accurate. Using NTP to distribute the time code, a network of hundreds and thousands of machines, can realistically be synchronized to within a few milliseconds of the exact time - ensuring the security and confidence of your network.

"End Quote"

Source: GALLEON

And the GPS STRATUM is not about AGPS, if that was the case, then it would have been solved already.
[HD2 Android NAND Development] memin1857:
In one of my previous posts I tried to disable agps in my samsung phone to see if it will lock just as slow as my HD2. It was still fast locking, and I thought since the xtra.bin was good for 7 days (with the first 1-2 days most accurate) that was the reason. This morning my samsung phone locked in 44 seconds in open air (agps was intentionally disabled) almost in par with hd2. (Probably xtra.bin expired or became less accurate for today) In that 44 seconds I saw grey satellite signals come up one by one, and in last few seconds they started turning green. Normally when agps is enabled it locks in just a few seconds and satellites go green almost instantly. AGPS is is really important in making cold lock times go from 50 to 5 seconds and warm lock times go from 10 to 2 seconds.

I am looking for a way to really reset gps chip and force it to cold start whenever I want. Rebooting, turning off/on, removing the battery doesn't seem to reset the gps chip. Does the gps chip has it's own small flash memory? where does the learned sat info is kept?

This will really aid in testing because whenever I get a lock with any phone, I can't test it again until a lot of hours pass because that way I can't know if anything I have just changed has an effect on lock time. Does anyone have idea? GPS Status doesn't work properly with my samsung phone and I can't reset with it either. (it seems agps is implemented in a non standart way with samsungs android rom) I also wasn't able to reset the gps to force a cold start with windows mobile 6.5. I used to be able to force a cold start from a secret menu with an LG phone I had in the past.

BTW cleaning the contacts of battery cover would be a good idea, since it also affects gps signal levels. (The battery cover likely acts as the GPS antenna)
[HD2 Android NAND Development] :
Decompiled the a part of the apk...it simply downloads the xtra.bin from xtra1.gpsonextra.net and puts it to /data/xtra.bin.

Perhaps for future development, we should also consider to include the xtra2-xtra4 files.

What about the idea to put the downloadpath to the gps.conf like jaba_cz did:

Could it work?
[HD2 Android NAND Development] AngelDeath:
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin

XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin

XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin

This has been part of my of the gps.conf script since I started it, if you downloaded any of my scripts you would see its already there, based on what I see, the only reason they have 1,2,3 is as backup so if one server is overloaded it would go to the second and then the third server, so its irrelevent.
[HD2 Android NAND Development] memin1857:
xtra 2 or 3 are the same. They are just alternative servers in case one of them is down. they provide the same xtra.bin file.

agps path doesn't work. there needs to appear agps setting in location and security menu of Android. It doesn't appear with HD2.

I think changes should be in libgps.so for agps to work.
[HD2 Android NAND Development] memin1857:
gpslocationprovider.java

http://gitorious.org/android-eeepc/...id/internal/location/GpsLocationProvider.java

This has all kinds of gps reset and xtra downloader code.

One more source of info:

http://groups.google.com/group/andr...read/thread/c3f56707cb2e53f0/417972f7acd01452

Note: SUPL = Secure User Plane Location