[GPS] EASY Three Second GPS FIX!!!!! - Samsung Galaxy Nexus

I'm just copying and pasting from Xenova from this thread: http://forum.xda-developers.com/showthread.php?t=1239713
I'm just making another post on this subforum because I myself have searched everywhere on the Gnex forums and found NOTHING. After this guy's fix, it was so good, I took the effort to make this to spread it to you guys too! This fix made me cry out of happiness.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THE FIX
Requirements:
Rooted Device
File Manager: e.g. Root Explorer
1. Searching for NTP server information
Go to http://www.pool.ntp.org/en/
At the right side of webpage, there is "Active Servers". Go in and look for the setting of your 1)region and 2)country
For example, one's region is Europe then you write down the NTP server for that: 0.europe.pool.ntp.org; 1.europe.pool.ntp.org; 2.europe.pool.ntp.org; 3.europe.pool.ntp.org
Then the servers for your country from the list down there and click the link(Example: Switzerland — ch.pool.ntp.org; 0.ch.pool.ntp.org; 1.ch.pool.ntp.org; 2.ch.pool.ntp.org; 3.ch.pool.ntp.org
The "Italic" words are the information you need to jot down for later use
3. Modify the gps.conf file (Most Crucial Stage)
Copy the codes in grey box (in first post) to a notepad, then change the extension name from .txt to .conf then copy to your phone
Use file manager to copy to this location: /etc/gps.conf and replace the original gps.conf
Open and Edit the gps.conf using rootexplorer or others file managers
Change the COUNTRY and REGION in following lines with the info you got from the website just now. Keep other values unchange unless you know what it is. Example of REGION such as NorthAmerica, Asia, Africa, Europe.
Your new gps.conf should look as below:
Code:
NTP_SERVER=0.COUNTRY.pool.ntp.org
NTP_SERVER=1.COUNTRY.pool.ntp.org
NTP_SERVER=2.COUNTRY.pool.ntp.org
NTP_SERVER=3.COUNTRY.pool.ntp.org
NTP_SERVER=0.REGION.pool.ntp.org
NTP_SERVER=1.REGION.pool.ntp.org
NTP_SERVER=2.REGION.pool.ntp.org
NTP_SERVER=3.REGION.pool.ntp.org
NTP_SERVER=COUNTRY.pool.ntp.org <-This is changed from the top line to here. It may works better if we put it here.
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
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
DEBUG_LEVEL =0
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=0
# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions
ACCURACY_THRES=0
# Report supl ref location as position, 1=enable, 0=disable
REPORT_POSITION_USE_SUPL_REFLOC=1
# Wiper (wifi positioning), 1=enable, 0=disable
ENABLE_WIPER=1
################################
##### AGPS server settings #####
################################
# FOR SUPL SUPPORT, set the following
SUPL_HOST=supl.google.com
SUPL_PORT=7276
SUPL_NO_SECURE_PORT=3425
SUPL_SECURE_PORT=7275
SUPL_TLS_HOST=FQDN
SUPL_TLS_CERT=/etc/SuplRootCert
# FOR C2K PDE SUPPORT, set the following
C2K_HOST=c2k.pde.com
C2K_PORT=1234
CURRENT_CARRIER=common
DEFAULT_AGPS_ENABLE=TRUE
DEFAULT_SSL_ENABLE=FALSE
# TRUE for "User Plane", FALSE for "Control Plane"
DEFAULT_USER_PLANE=TRUE
Make sure the permission of the file is rw-r--r--
MY EXAMPLE FOR CANADIAN GPS FIX:
Code:
[COLOR="Red"]NTP_SERVER=0.north-america.pool.ntp.org
NTP_SERVER=1.north-america.pool.ntp.org
NTP_SERVER=2.north-america.pool.ntp.org
NTP_SERVER=3.north-america.pool.ntp.org
NTP_SERVER=0.ca.pool.ntp.org
NTP_SERVER=1.ca.pool.ntp.org
NTP_SERVER=2.ca.pool.ntp.org
NTP_SERVER=3.ca.pool.ntp.org
NTP_SERVER=ca.pool.ntp.org [/COLOR]
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
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
DEBUG_LEVEL =0
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=0
# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions
ACCURACY_THRES=0
# Report supl ref location as position, 1=enable, 0=disable
REPORT_POSITION_USE_SUPL_REFLOC=1
# Wiper (wifi positioning), 1=enable, 0=disable
ENABLE_WIPER=1
################################
##### AGPS server settings #####
################################
# FOR SUPL SUPPORT, set the following
SUPL_HOST=supl.google.com
SUPL_PORT=7276
SUPL_NO_SECURE_PORT=3425
SUPL_SECURE_PORT=7275
SUPL_TLS_HOST=FQDN
SUPL_TLS_CERT=/etc/SuplRootCert
# FOR C2K PDE SUPPORT, set the following
C2K_HOST=c2k.pde.com
C2K_PORT=1234
CURRENT_CARRIER=common
DEFAULT_AGPS_ENABLE=TRUE
DEFAULT_SSL_ENABLE=FALSE
# TRUE for "User Plane", FALSE for "Control Plane"
DEFAULT_USER_PLANE=TRUE
4. Reboot
Go setting, turn on your "use GPS satelites" and "Integrate Google Navigation"
Restart the device (normal restart)[/B]
5. Use GPS status and Toolbox
Tool available in market for free, please donate so developers are encouraged for better release in the future[/B]
Open app> tools> manage A-GPS state>Reset
Open app> tools> manage A-GPS state>Download
Optional restart device (not compulsory)
Use GPS status to start fixing satelites
Your satelite fixing speed should VERY FAST now
After get a successul GPS Lock, open your GPS applications and use like normal (e.g. Copilot, Sygic, or TomTom)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
END OF GUIDE
Above all else, THANK XENOVA! You can thank me all you want, I don't care. But PLEASE go to Xenova's thread and thank him too!

Thanks for the tip !
JB

Awesome, definitely going to try this.
Sent from my Paranoid GNex

I opened my GPS.conf as text to check, and this is all that's listed...is this the same for others?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my Galaxy Nexus using Tapatalk 2

Duce HD2 said:
I opened my GPS.conf as text to check, and this is all that's listed...is this the same for others?
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
yeah this is a default gps.conf

I tried this and now keep getting: "Unfortunately, the process com.google.process.gapps has stopped".
I double checked the my gps.conf file and it seems I did everything as mentioned... any ideas?

Seriously, I know you are new here but read my posts right above bud. The person who took this information from another post of mine neglects to realize a lot of stuff does not work in this gps.conf file he supplied. They wanted to be a hero stealing research and post references and post it here like it was a solution. First of all, it comes from another phone not a Nexus. Secondly, I posted it just to sort of show people an example of how complicated a gps.conf could be and what I weeded out to get it working on my Nexus. Here is my gps.conf for you so you can see the lines that I stripped out of it that I know work. Of course you will have to update it to reflect your country. Hope it helps you.
I may have a few other lines to add but I want to give it another day or so and go over my results before I pass it on to others. When I am done my testing I will put up a new post for people. For now this should do you fine. Just update the servers, follow the same order.
gps.conf
NTP_SERVER=0.ca.pool.ntp.org
NTP_SERVER=1.ca.pool.ntp.org
NTP_SERVER=2.ca.pool.ntp.org
NTP_SERVER=3.ca.pool.ntp.org
NTP_SERVER=ca.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
# DEBUG LEVELS:
# 0 - none, 1 - Error,
# 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
DEBUG_LEVEL =0
ACCURACY_THRES=5
INTERMEDIATE_POS=0
ENABLE_WIPER=1
SUPL_HOST=supl.google.com
SUPL_PORT=7276
REPORT_POSITION_USE_SUPL_REFLOC=1

Flukester69 said:
Seriously, I know you are new here but read my posts right above bud. The person who took this information from another post of mine neglects to realize a lot of stuff does not work in this gps.conf file he supplied. They wanted to be a hero stealing research and post references and post it here like it was a solution. First of all, it comes from another phone not a Nexus. Secondly, I posted it just to sort of show people an example of how complicated a gps.conf could be and what I weeded out to get it working on my Nexus. Here is my gps.conf for you so you can see the lines that I stripped out of it that I know work. Of course you will have to update it to reflect your country. Hope it helps you.
I may have a few other lines to add but I want to give it another day or so and go over my results before I pass it on to others. When I am done my testing I will put up a new post for people. For now this should do you fine. Just update the servers, follow the same order.
gps.conf
NTP_SERVER=0.ca.pool.ntp.org
NTP_SERVER=1.ca.pool.ntp.org
NTP_SERVER=2.ca.pool.ntp.org
NTP_SERVER=3.ca.pool.ntp.org
NTP_SERVER=ca.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
# DEBUG LEVELS:
# 0 - none, 1 - Error,
# 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
DEBUG_LEVEL =0
ACCURACY_THRES=5
INTERMEDIATE_POS=0
ENABLE_WIPER=1
SUPL_HOST=supl.google.com
SUPL_PORT=7276
REPORT_POSITION_USE_SUPL_REFLOC=1
Click to expand...
Click to collapse
Dude. Don't get so butthurt.
I have:
-linked the original thread
-requested people to go to the original thread to thank the OP
-thanked the OP myself in ALL CAPS, as in "THANKS XENOVA!"
-stated I have copied and pasted it from original thread, IN MY VERY FIRST SENTENCE OF THE THREAD
How did I "want to be a hero stealing research and post references and post it here like it was a solution."?
Grow up. The only service I did was to copy and paste it into our forums, so when someone searches GPS fix on our forums, which I had, they would find it. I doubt many people would go to the actual Android Dev forums and search there for a Gnex GPS fix. I have also stated my contributions as such on the 2nd line of text in my OP.
EDIT: Never mind sir. Didn't realize you're from Ottawa. Everything makes sense now.

Duce HD2 said:
I opened my GPS.conf as text to check, and this is all that's listed...is this the same for others?
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Yea, thats the default. You gotta paste the more detailed GPS.conf over it.

Flukester69 said:
Seriously, I know you are new here but read my posts right above bud. The person who took this information from another post of mine neglects to realize a lot of stuff does not work in this gps.conf file he supplied. They wanted to be a hero stealing research and post references and post it here like it was a solution. First of all, it comes from another phone not a Nexus. Secondly, I posted it just to sort of show people an example of how complicated a gps.conf could be and what I weeded out to get it working on my Nexus. Here is my gps.conf for you so you can see the lines that I stripped out of it that I know work. Of course you will have to update it to reflect your country. Hope it helps you.
I may have a few other lines to add but I want to give it another day or so and go over my results before I pass it on to others. When I am done my testing I will put up a new post for people. For now this should do you fine. Just update the servers, follow the same order.
gps.conf
NTP_SERVER=0.ca.pool.ntp.org
NTP_SERVER=1.ca.pool.ntp.org
NTP_SERVER=2.ca.pool.ntp.org
NTP_SERVER=3.ca.pool.ntp.org
NTP_SERVER=ca.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
# DEBUG LEVELS:
# 0 - none, 1 - Error,
# 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
DEBUG_LEVEL =0
ACCURACY_THRES=5
INTERMEDIATE_POS=0
ENABLE_WIPER=1
SUPL_HOST=supl.google.com
SUPL_PORT=7276
REPORT_POSITION_USE_SUPL_REFLOC=1
Click to expand...
Click to collapse
Thank you Flukester... I will be checking this out and I would love to hear back after you do more testing.

fredboy said:
Thank you Flukester... I will be checking this out and I would love to hear back after you do more testing.
Click to expand...
Click to collapse
I plan to make a post on it by end of weekend but I am sure my config would be good for anyone given you put the right servers. I had people message me in Germany and parts of USA claiming similar results as mine.
Brought to you from my Galaxy Nexus using Tapatalk.

I should throw some infractions around for so much disrespect of others but instead will be placing user notes for other mods to see if some attitudes don't change!
The linked post clearly states it was tested on an HTC phone AND a Samsung and should work on othersl. Of course there may be some erroneous code in that respect but does not mean it will damage anything. Flukester69 not sure what your problem is with this. If it works or not users will report it. It is not your place to tear down somebody simply trying to help others. No one here gets paid for anything and your disrespect and flaming is not appropriate on XDA.
If I have to come back here there WILL be infractions.
Thread cleaned
FNM

kennyglass123 said:
I should throw some infractions around for so much disrespect of others but instead will be placing user notes for other mods to see if some attitudes don't change!
The linked post clearly states it was tested on an HTC phone AND a Samsung and should work on othersl. Of course there may be some erroneous code in that respect but does not mean it will damage anything. Flukester69 not sure what your problem is with this. If it works or not users will report it. It is not your place to tear down somebody simply trying to help others. No one here gets paid for anything and your disrespect and flaming is not appropriate on XDA.
If I have to come back here there WILL be infractions.
Thread cleaned
FNM
Click to expand...
Click to collapse
I'll send you a pm to explain. sorry.
I don't care to post in this thread as it serves no purpose other than duplication and distraction. There are existing threads where with plenty of information already.

Flukester69 said:
Seriously, I know you are new here but read my posts right above bud. The person who took this information from another post of mine neglects to realize a lot of stuff does not work in this gps.conf file he supplied. They wanted to be a hero stealing research and post references and post it here like it was a solution. First of all, it comes from another phone not a Nexus. Secondly, I posted it just to sort of show people an example of how complicated a gps.conf could be and what I weeded out to get it working on my Nexus. Here is my gps.conf for you so you can see the lines that I stripped out of it that I know work. Of course you will have to update it to reflect your country. Hope it helps you.
I may have a few other lines to add but I want to give it another day or so and go over my results before I pass it on to others. When I am done my testing I will put up a new post for people. For now this should do you fine. Just update the servers, follow the same order.
gps.conf
NTP_SERVER=0.ca.pool.ntp.org
NTP_SERVER=1.ca.pool.ntp.org
NTP_SERVER=2.ca.pool.ntp.org
NTP_SERVER=3.ca.pool.ntp.org
NTP_SERVER=ca.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
# DEBUG LEVELS:
# 0 - none, 1 - Error,
# 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
DEBUG_LEVEL =0
ACCURACY_THRES=5
INTERMEDIATE_POS=0
ENABLE_WIPER=1
SUPL_HOST=supl.google.com
SUPL_PORT=7276
REPORT_POSITION_USE_SUPL_REFLOC=1
Click to expand...
Click to collapse
where would you be posting it. so i could look out for it.

There has been a flashable .zip for US users for months now posted on Rootzwiki. Mitch's Optimal GPS Settings.
Here is a link to the original thread
http://rootzwiki.com/topic/21453-optimal-gps-settings-for-galaxy-nexus/
All credit to Mitch. I attached a link to the flashable .zip file in this post. No need to edit anything, it just works.

Funny. I tried mitch's before and I don't seem to remember it working for me...

I know these GPS Fixes but I want to know one thing:
I live in Finland but I'm Estonian so I'm not always in Finland.. So can it be edited like adding 2 country names and 2 region names (different region and country), does it mess something up or not?
I don't usually use any "GPS fixes" because in Estonia I can receive the GPS signal in 3 minutes at day, at night something in 6 minutes, but in Finland I have have to wait almost 15 minutes to get GPS signal so then I have to put 3G on to receive the GPS signal faster..

LexusBrian400 said:
There has been a flashable .zip for US users for months now posted on Rootzwiki. Mitch's Optimal GPS Settings.
Here is a link to the original thread
http://rootzwiki.com/topic/21453-optimal-gps-settings-for-galaxy-nexus/
All credit to Mitch. I attached a link to the flashable .zip file in this post. No need to edit anything, it just works.
Click to expand...
Click to collapse
Mitch settings didn't worked for me, I tried several times.

I have read all the posts till now but noone reporting if this works or not... Feedback please !
Edit: You don't have to change this value through gps.conf. I thing it is quicker and easier to do it through fasterGps

To Flukester :
Are you sure about these values ? :
ACCURACY_THRES=5
INTERMEDIATE_POS=0
On mine (i took some frome here, yours and Mitch's) i have "Accuracy_thres=3000" and "Intermediate_pos=1".
JB

Related

Hero and Contact Types - please help

Hi!
I'm developing an Android app that works with contacts in some way.
I personally own a G1 Dream.
Hero users are requesting support for Contact Types, but I have no clue what those Types are about - my Dream doesn't seem to have those.
I've searched through the Android API and couldn't find any Contact Types, just Contact Groups!
Could someone here please shed a light on what Hero Contact Types are, are they part of Android API or something HTC proprietary? If it's something proprietary - where do I find the API to work with them?
Thanks
PLEASE,
Could someone with a rooted HTC Hero PLEASE run this under root and post the result here?
# sqlite3 /data/data/com.android.providers.contacts/databases/contacts.db "select * from groups"
OK
With a little help from my friends I found out that Hero Contact Types are no more than another representation of Contact Groups.
On a plain Hero there are four Groups: exchange, pc, starred in android, system group.
Apparently the groups that I listed do not correlate with contact types on Hero.
I wonder if anyone here possesses a rooted Hero?
Code:
c:\Android\tools>adb shell
# su
su
# sqlite3 /data/data/com.android.providers.contacts/databases/contacts.db
sqlite3 /data/data/com.android.providers.contacts/databases/contacts.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite>
Thats all i got
burgess_boy said:
Thats all i got
Click to expand...
Click to collapse
You've forgotten the "select * from groups" part
yes sorry I know, only just started looking at sqlite: here is the post:
Code:
1||1||||0|1|Exchange||0|Exchange|
2||2||||0|1|PC||0|PC|
3|*******@googlemail.com|6||||0|1|System Group: My Contacts|System Group: My Contacts|0|Contacts|
4|*******@googlemail.com|3f4d84c489473658|1255041281243000|1255041281243000||0|1|Starred in Android|Starred in Android|0||
5|*******@googlemail.com|6f12be4e8fbc53f2|1252749793434000|1252749793434000||0|1|Starred in Android|Starred in Android|0||
6|*******@googlemail.com|ec24fd30a949a10|1254919459679000|1254919459679000||0|1|Starred in Android|Starred in Android|0||
Thanks burgess,
Hero has the same groups functionality as Dream.
My friend with Hero sent me its People table schema:
Code:
CREATE TABLE people (_id INTEGER PRIMARY KEY AUTOINCREMENT,_sync_account TEXT,_s
ync_id TEXT,_sync_time TEXT,_sync_version TEXT,_sync_local_id INTEGER,_sync_dirt
y INTEGER NOT NULL DEFAULT 0,_sync_mark INTEGER,name TEXT COLLATE LOCALIZED,firs
tName TEXT, lastName TEXT, numIndicator TEXT, picasaUrl TEXT, notes TEXT COLLATE
LOCALIZED,times_contacted INTEGER NOT NULL DEFAULT 0,last_time_contacted INTEGE
R,starred INTEGER NOT NULL DEFAULT 0,primary_phone INTEGER REFERENCES phones(_id
),primary_organization INTEGER REFERENCES organizations(_id),primary_email INTEG
ER REFERENCES contact_methods(_id),photo_version TEXT,custom_ringtone TEXT,send_
to_voicemail INTEGER,phonetic_name TEXT COLLATE LOCALIZED, extra_group INTEGER D
EFAULT 0,default_action TEXT, photo TEXT, duplicate_id INTEGER NOT NULL DEFAULT
0, cn_name_pattern TEXT, tw_name_pattern TEXT, last_update_time TEXT);
It differs from what I have on my Dream. There is no extra_group field in People table on Dream. That's probably the 'type', will investigate more
Hey bornmw, am I a bit late?
The extra_group field changes on the Hero if you create a new contact within the People > Add Contact screen of three types: google, phone, sim. 0 google, 2 for phone, dunno about sim.
The problem is that there is no way you can change this column through the Android API http://developer.android.com/reference/android/provider/Contacts.People.html
So it's not possible to create an app that would get access to that field....... or I'm missing smth
why dun you get a copy of the contacts.db and work from there?
Leechoonhwee said:
why dun you get a copy of the contacts.db and work from there?
Click to expand...
Click to collapse
Not sure I understand what you're suggesting.
There is no way I can get contacts.db from within Android application.

[Testing] Workaround fix for GPS data validity (0,0 position) bug

I've been working on fixing the GPS data validity bug (where positions are reported at a lat/long of approximately 0,0 prior to lock)
Attached is a version of libhardware_legacy.so that should do the following:
Improve debugging of GPS operation (change printf()s in the main GPS library file to Android logging macros)
Fix/workaround the 0,0 bug (I say workaround because I have yet to identify the root cause of the issue - however it is "fixed" from the point of view of an end user
A few "under the hood" cleanups/fixes
Things that are NOT implemented/fixed in this library:
XTRA (driver/library support for QuickGPS data loading)
Obtaining satellite status prior to GPS lock on Rhodiums (behavior on non-Rhodium unknown, but this should not change actual behavior at all except for the false 0,0 fixes)
Any methods for improved lock speed - all this does is prevent you from appearing south of Africa prior to lock
To test this fix (Intended for FRX05, may work with other 2.2.2 based builds that are derived from xdandroid FRX05):
Unzip the attached zip file
Place libhardware_legacy.so somewhere on your SD card. For organization, I use bindfiles/system/lib/libhardware_legacy.so
Open conf/froyo.user.conf in your favorite text editor
Within the custom_shells{} section of froyo.user.conf, add:
mount --bind /sdcard/bindfiles/system/lib/libhardware_legacy.so /system/lib/libhardware_legacy.so
Restart, and at this point:
1) 0,0 false locks should go away
2) You'll see lots of new GPS debugging info in ADB logcats
Edit: For testing, I usually use the "GPS Status and Toolbox" app from the market, since Google Maps does not show sat status.
With the stock GPS libraries, GPS Status and Toolbox will immediately report a 0,0 fix on startup
With this library, you should see that funky "wait for it circle" in the lower status area until you are locked. As mentioned above - you will not see satellite signal strength reports prior to lock
I was just looking at setting up the kernel build environment myself the other day.
The main useful reference I found was this:
http://forum.ppcgeeks.com/tp2-andro...modules-tinboot-nand-boot-more-beginners.html
However, that one's a bit of a firehose, too, since it deals with a lot of stuff specific to NAND.
In short clone these two repositories into the same directory:
Code:
git clone git://android.git.kernel.org/platform/prebuilt.git
git clone git://gitorious.org/linux-on-qualcomm-s-msm/linux-msm.git
The first is the vanilla kernel, and the second is the XDAndroid kernel modifications. You'll need the first to compile.
From that guide, compile:
Code:
cd android
mkdir modules
cd linux-msm
make clean
make ARCH=arm htc_msm_android_defconfig
make ARCH=arm CROSS_COMPILE=~/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- INSTALL_MOD_PATH=~/android/modules zImage modules modules_install
Follow that guide for putting together the modules for wifi and the location of your compiled files.
Thanks! I will take a look at that, although I get the impression from reading through things that that GPS handling is at a layer somewhere above the kernel but below where we start having to deal with Java. I just can't quite figure out where since I have never done any Android development before.
I am probably going to poke at the kernel at some point though to try and fix the LED behaviors. It is clear from the "sleep of death fix" test kernels that there is knowledge of how to change these behaviors - at the very least I want to make it turn things *off* when in deep powersave. (Seems nonsensical to me to indicate that the device is in a deep power save mode by turning on a bright power-burning LED, although maybe the LED consumption is negligible even when the device is asleep.)
Entropy512 said:
Thanks! I will take a look at that, although I get the impression from reading through things that that GPS handling is at a layer somewhere above the kernel but below where we start having to deal with Java. I just can't quite figure out where since I have never done any Android development before.
I am probably going to poke at the kernel at some point though to try and fix the LED behaviors. It is clear from the "sleep of death fix" test kernels that there is knowledge of how to change these behaviors - at the very least I want to make it turn things *off* when in deep powersave. (Seems nonsensical to me to indicate that the device is in a deep power save mode by turning on a bright power-burning LED, although maybe the LED consumption is negligible even when the device is asleep.)
Click to expand...
Click to collapse
Whoops, didn't read carefully enough at where you'd narrowed the problem down to. I haven't gotten around to setting up an environment for the system build yet, sorry I couldn't be more of a help!
Yup, http://gitorious.org/xdandroid/hardware_libhardware_legacy/blobs/master/gps/gps_msm7k.c is my first target. There may also be issues in gps-rpc.c
http://xdandroid.com/wiki/Getting_the_Source goes thru how to build the system image. It starts with getting the source and cascades all the way thru building a system image.
I'm setup to build it as well, and I've always wondered how we could fix this problem... Love to see it squashed!
Thanks! I'll start working on that, although probably not until after the weekend is over at this point.
The ghetto approach as an interim fix would be to not set GPS_LOCATION_HAS_LAT_LONG if both are exactly zero - This is not the right way to do it, but the chances of it affecting anyone before a proper validity condition is identified are slim. (Even if you ARE near lat/long of 0/0, there will be enough noise in the GPS solution that you'll almost never actually be blanked).
Probably should assume that all of the other validity flags should not be set if we don't have a position fix. (Assumption: The MSM7k GPS does not take inputs from the magnetometer or accelerometer, if the Rhodium even has a magnetometer, didn't think it did.)
Of course, I haven't quite figured out how GPS_LOCATION_HAS_LAT_LONG and such roll up to higher levels. There's some odd interactions in terms of when SV status becomes available, for example.
Entropy512 said:
Thanks! I'll start working on that, although probably not until after the weekend is over at this point.
The ghetto approach as an interim fix would be to not set GPS_LOCATION_HAS_LAT_LONG if both are exactly zero - This is not the right way to do it, but the chances of it affecting anyone before a proper validity condition is identified are slim. (Even if you ARE near lat/long of 0/0, there will be enough noise in the GPS solution that you'll almost never actually be blanked).
Probably should assume that all of the other validity flags should not be set if we don't have a position fix. (Assumption: The MSM7k GPS does not take inputs from the magnetometer or accelerometer, if the Rhodium even has a magnetometer, didn't think it did.)
Of course, I haven't quite figured out how GPS_LOCATION_HAS_LAT_LONG and such roll up to higher levels. There's some odd interactions in terms of when SV status becomes available, for example.
Click to expand...
Click to collapse
Yup, definitely no magnetometer in the Rhodium.
Good luck with this, it'll be a nice little fix if you can get GPS to stop reporting locks before it has one.
Source downloaded, have a build going. (First an unchanged one...)
I'm working on a Froyo tree for the moment, since I think in the Gingerbread alphas GPS is simply "not working", although the degree of "not working" was not defined. Once I'm more familiar with the GPS handling code I might take a look at how it works for Gingerbread.
A few notes about the Froyo repo in its current state:
The URL for Google Apps that device/xdandroid/msm/unzip-files.sh is outdated. cyanogen-mirror.local.host.name does not exist any more. android.local.host.name does but doesn't have the HDPI Froyo apps. I forget which mirror I used - the list is in the CyanogenMod wiki if you search for gapps
The froyo build scripts direct you to http://source.android.com/download - URL no longer exists, it is http://source.android.com/source/download.html now
The process for installing Sun Java 5 on Ubuntu 10.10 is in the URL above - you need it to do a froyo build.
Also, the wiki instructions are missing lib32readline5-dev as an Ubuntu package that needs to be installed (it's in the source.android.com docs tho) - I'll try to update the wiki later.
Entropy512, glad to see someone is interested in looking at the GPS code. I helped phh with it in the last go around to get the RPC messaging part working working, but nothing has been done since.
The NMEA parsing stuff you see in the current gps lib is unused, all the data comes from RPC. Before getting the data directly from RPC was working, we took advantage of the fact that NMEA is output to smd27 and parsed that string data. In any case, once the GPS is brought up, that NMEA data is still viewable by catting /dev/smd27.
If you want to check out other similar code, look at the vogue gps code. I think it supposed to work pretty well, and the RPC behind it is similar. Theirs is a bit different in that they split the gps processing across the kernel and userland, where ours is all userland.
Ultimately, this stuff needs a bit of a rewrite, because the libhardware_legacy interface to GPS that the current lib is written to, is gone for Gingerbread. If we could just get the RPC stubs generated, we might be able to plug into the reference Qualcomm implementation and take advantage of that well sorted code. Check out the cyanogenmod libhardware gps to see what that looks like.
Thanks for the additional pointers bzo.
I'm at the stage where I managed to build the froyo tree, but have not yet had a chance to test the built system ext2 image. That's a goal for tomorrow.
OK, dumb question - Since I'm now trying to understand that RPC code - Where do all those printfs in gps-rpc.c print to?
edit: Never mind, figured it out - it's buried in the logcat... Was trying to go back in time using Android System Info, but adb logcat lets me view it as it happens.
edit 2: Nope, those are D() statements in gps_msm7k.c - don't know where the printf()s in gps-rpc.c are going - nowhere? Should these be D() statements???
those printfs were from when that code was a console test application. Not surprising that they wouldn't show up by default in the logcat. I'm sure there is some way to make them show up. Dunno off hand, but some googling on android debug logging and redirection of stdout and such may dig up that info.
bzo said:
those printfs were from when that code was a console test application. Not surprising that they wouldn't show up by default in the logcat. I'm sure there is some way to make them show up. Dunno off hand, but some googling on android debug logging and redirection of stdout and such may dig up that info.
Click to expand...
Click to collapse
Ah. That makes sense why they aren't D() statements like in gps_msm7k.c
I tried changing as many of the printf()s to D() macros as I could, I'll test it tonight.
Edit: Had a chance to test it this morning. No output from any of the printf()s that I changed to D()s. Either I did something wrong, or none of those code paths are hit in a no-signal/low-signal situation prior to lock. Doing a make clean followed by a rebuild to make sure.
Those debug statements don't display by default. You'll have to change some compile and/or android settings to have them show up.
btw, if you're not already doing this, building just the gps lib and doing a mount --bind with just the lib in your startup.txt is a big timesaver, as opposed to updating the entire build
bzo said:
Those debug statements don't display by default. You'll have to change some compile and/or android settings to have them show up.
btw, if you're not already doing this, building just the gps lib and doing a mount --bind with just the lib in your startup.txt is a big timesaver, as opposed to updating the entire build
Click to expand...
Click to collapse
Hmm, got any pointers in this regard? They are working for gps_msm7k.c, but not my changes to gps-rpc.c - these are built by the same Makefile and components of the same library as far as I can tell. Is there a log tag filter somewhere?
Thanks for the mount --bind tip - will try that on my next build attempt.
if you copied over the same #define for D(...) from gps_msm7k.c, it seems like it should work the same in the other file. I haven't looked that much into android logging though.
For some reason my copy-and-pasted #defines for D() were failing.
Using LOGD() directly works.
I'm adding another set of LOGD()s now - It appears that something is calling update_gps_location() with bogus data.
BINGO! - It appears we are receiving PDSM_PD_EVENT_HEIGHT and PDSM_PD_EVENT_VELOCITY events prior to a position fix. No clue why - but even though GPS_LOCATION_HAS_LAT_LONG is not set, apps assume lat/long is valid when an update_gps_position() callback occurs.
Going to make it so we only do the update_gps_location() callback when GPS_LOCATION_HAS_LAT_LONG is set. Also going to try and figure out the right situations where we can call update_gps_svstatus() - right now it is only done when we get a PDSM_PD_EVENT_POS.
bzo said:
btw, if you're not already doing this, building just the gps lib and doing a mount --bind with just the lib in your startup.txt is a big timesaver, as opposed to updating the entire build
Click to expand...
Click to collapse
This is a good suggestion, but the bind mount statement would go in the froyo.user.conf, not the startup.txt .
arrrghhh said:
This is a good suggestion, but the bind mount statement would go in the froyo.user.conf, not the startup.txt .
Click to expand...
Click to collapse
yea, yea, that's what I meant , thanks for the correction

[Q] gps.conf & power_profile.xml

I have an AT&T Samsung Galaxy S3 with two problems at hand.
First of all, my GPS does not lock onto any sattelites at all. I've come to realize that this is related to an incorrect configuration file. As far as I know, a # at the beginning of a statement means that that statement is a remark, and not actual code. Thus, it's ignored.
If you look at my gps.conf file below, you will notice that many of the lines contain a # at the beginning. I have a general idea of which should remain. However, I'd like to know all those of which should/can be removed. If someone could just rewrite it removing all the # which should not be included, that would be awesome!
Code:
#Test
NTP_SERVER=time.gpsonextra.net
#Asia
# NTP_SERVER=asia.pool.ntp.org
#Europe
# NTP_SERVER=europe.pool.ntp.org
#North America
# NTP_SERVER=north-america.pool.ntp.org
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra2.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra2.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra2.bin
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
DEBUG_LEVEL = 4
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=0
# supl version 1.0
SUPL_VER=0x10000
# Error Estimate
# _SET = 1
# _CLEAR = 0
ERR_ESTIMATE=0
# GPS Capabilities bit mask
# SCHEDULING = 1
# MSB = 2
# MSA = 4
# ULP = 0x20
# ON_DEMAND_TIME = 0x10 // yunu.lee
# default = MSA | MSB | SCHEDULING | ULP
CAPABILITIES=0x16
# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions
# ACCURACY_THRES=5000
################################
##### AGPS server settings #####
################################
# FOR SUPL SUPPORT, set the following
# SUPL_HOST=supl.google.com
# SUPL_PORT=7276
# FOR C2K PDE SUPPORT, set the following
# C2K_HOST=c2k.pde.com or IP
# C2K_PORT=1234
################################
# Sensor Settings
################################
# Needs to be set explicitly based on sensor
# There is no default value.
GYRO_BIAS_RANDOM_WALK=0.00001
SENSOR_ACCEL_BATCHES_PER_SEC=3
SENSOR_ACCEL_SAMPLES_PER_BATCH=5
SENSOR_GYRO_BATCHES_PER_SEC=3
SENSOR_GYRO_SAMPLES_PER_BATCH=5
# Sensor Control Mode (0=AUTO, 1=FORCE_ON)
SENSOR_CONTROL_MODE=0
# Enable or Disable Sensors for GPS use (0=Enable, 1=Disable)
SENSOR_USAGE=0
# Choose GSIFF sensor provider (1=DSPS, 2=Android NDK)
SENSOR_PROVIDER=2
################################
# Indoor Positioning Settings
################################
# 0: QUIPC disabled, 1: QUIPC enabled, 2: forced QUIPC only
QUIPC_ENABLED = 0
################################
# EXTRA SETTINGS
################################
My second problem has to do with the power_profile.xml file. It was noted that certain S3s had a problem with an incorrect value in the power_profile.xml file, which resulted in Cell Standby topping the list for battery drainage. I have taken a look at that file on my S3, and noticed that I am affected by that incorrect value (34 instead of 3.4).
The problem is that the fixed XML file available for download seems slightly different to the one currently in my S3, in more ways than just that value. I'd like to know whether it's safe to make the switch. Or, does anyone have a fixed power_profile.xml which they wish to share with me, that definitely works on the AT&T S3?
I'm sorry if this has been posted before, but I wasn't able to find anything completely answering my questions. Thanks in advance for the help, and it's much appreciated!
My second problem has to do with the power_profile.xml file.
Click to expand...
Click to collapse
You probably downloaded the XML file like I initially did...and for the same reason...I did NOT want to replace it. But this much smaller flashable CWM fix only changes the VALUE in question...not the whole XML file....as far as I can tell. It has worked for my on my i747m for months. Do a CWM backup first!
themadproducer said:
You probably downloaded the XML file like I initially did...and for the same reason...I did NOT want to replace it. But this much smaller flashable CWM fix only changes the VALUE in question...not the whole XML file....as far as I can tell. It has worked for my on my i747m for months. Do a CWM backup first!
Click to expand...
Click to collapse
Actually, that is the same fix I downloaded. I extracted it just to take a look at it first before doing anything, and noticed that inside, it had a power_profile.xml slightly different to the one currently in my phone. So, I'm not sure whether to flash this or not. Or alternatively, is there any way which I can simply edit this file myself? I've tried several XML editors, but they all show weird symbols throughout, when I open that XML file. Though I can clearly see the value that I need to change, but I don't want to end up saving the file from a program that can't properly read it, ending up with a corrupt file flashed to my phone. Unless, that is how the file actually looks.
Sorry for all the noobish questions, but I have only had my S3 and been on Android for a couple of months now. Was on iOS before, and did a lot of tinkering on that side of the smartphone world.
.Xanadu. said:
Actually, that is the same fix I downloaded. I extracted it just to take a look at it first before doing anything, and noticed that inside, it had a power_profile.xml slightly different to the one currently in my phone. So, I'm not sure whether to flash this or not. Or alternatively, is there any way which I can simply edit this file myself? I've tried several XML editors, but they all show weird symbols throughout, when I open that XML file. Though I can clearly see the value that I need to change, but I don't want to end up saving the file from a program that can't properly read it, ending up with a corrupt file flashed to my phone. Unless, that is how the file actually looks.
Sorry for all the noobish questions, but I have only had my S3 and been on Android for a couple of months now. Was on iOS before, and did a lot of tinkering on that side of the smartphone world.
Click to expand...
Click to collapse
Ok, i will compare tomorrow...and let you know.
themadproducer said:
Ok, i will compare tomorrow...and let you know.
Click to expand...
Click to collapse
Thanks mucho! Much appreciated.
If you could also send me/share your gps.conf file so I can compare it with mine, that would be great! As I believe in addition to many lines being set as a remark, there are several lines also missing within there, such as for AGPS.
.Xanadu. said:
Thanks mucho! Much appreciated.
If you could also send me/share your gps.conf file so I can compare it with mine, that would be great! As I believe in addition to many lines being set as a remark, there are several lines also missing within there, such as for AGPS.
Click to expand...
Click to collapse
For starters, here is my gps.conf file.
There is only one area with slight differences but they are commented out with the # sign so it's irrelevant.
I have the i747m Rogers and you have AT&T. They should be pretty close with most core OS contents...as is this file.
I am assuming you are on Stock ICS? (not JB or custom)
Humor me...download Ulysse Gizmos 1.6.2 and use this to try to lock into sats. Test from outside OR inside but touching a window.
Stay tuned for XML.
PS...Xanadu....name from Rush by any chance?
UPDATE: Upload your stock power_profile.xml file (upload it) and I will check it against mine.
I just compared the FIXED one for the i9300....with my Stock i747m version and the only change is the value 34 to 3.4.
That's why it worked perfectly for me and probably will be EXACTLY the same for you.
Well that's interesting. Our gps.conf files are exactly the same. So, what could be the problem? I'm baffled.
Maybe I should also throw in that I'm using an unlocked AT&T Samsung Galaxy S III outside of the states. I'm in the Caribbean to be exact, if that makes any difference. (?)
I'll also try that app which you mentioned and report back.
As for my power_profile.xml, it's included below for comparison. Thanks!
.Xanadu. said:
Well that's interesting. Our gps.conf files are exactly the same. So, what could be the problem? I'm baffled.
Maybe I should also throw in that I'm using an unlocked AT&T Samsung Galaxy S III outside of the states. I'm in the Caribbean to be exact, if that makes any difference. (?)
I'll also try that app which you mentioned and report back.
As for my power_profile.xml, it's included below for comparison. Thanks!
Click to expand...
Click to collapse
Yes your location could be a huge reason.
You probably need to modify gps.conf for where you are.
When I was running my HD2, I had to do that to optimize the GPS,
but in your case...it's probably even more important.
Look around for an XDA page that focuses on the GPS ZONES for your area.
Start HERE. You may just want to extract certain elements and place them into your gps.conf file as needed.
UPDATE: your power_profile.xml is identical to mine. So go ahead and flash the CWM standby fix. ALWAYS do a CWM backup first!!!
themadproducer said:
Yes your location could be a huge reason.
You probably need to modify gps.conf for where you are.
When I was running my HD2, I had to do that to optimize the GPS,
but in your case...it's probably even more important.
Look around for an XDA page that focuses on the GPS ZONES for your area.
Start HERE. You may just want to extract certain elements and place them into your gps.conf file as needed.
UPDATE: your power_profile.xml is identical to mine. So go ahead and flash the CWM standby fix. ALWAYS do a CWM backup first!!!
Click to expand...
Click to collapse
Thanks for the help! I'll have a look at adding in the GPS zones for my area. I'll also go ahead with flashing the power_profile.xml and report back on how it went.
http://forum.xda-developers.com/showpost.php?p=40207546&postcount=67
Download this files and place it in /system/etc .... permission it to rw r r
then delete all files in /data/gps folder
restart and use gpstest to see results. try it with data on on first try to fix the satellite faster.
popcorn1122 said:
http://forum.xda-developers.com/showpost.php?p=40207546&postcount=67
Download this files and place it in /system/etc .... permission it to rw r r
then delete all files in /data/gps folder
restart and use gpstest to see results. try it with data on on first try to fix the satellite faster.
Click to expand...
Click to collapse
How do I set the permissions? I tried copying and it gave me error saying cannot copy system file. I tried setting the permissions using Root Explorer but didnt work
Use file manager from the google play and go to settings and then slect mount root.
u need to have root before doing this

MUST READ regarding GPS.conf settings

So I got sick of the phone taking 5 minutes to get a fix, and did some research. I found this link:
http://rootzwiki.com/topic/28989-the-end-all-be-all-guide-to-your-gps/
It's pretty self-explanatory. I applied the changes recommended. I am using LiteRom 0.9 which comes with a bunch of installation options, and being in Australia I chose the Oceania GPS settings. Well, the settings were absolutely rubbish when I compare them against the link I posted and the au servers weren't even correctly entered!
I used 920 Text Editor since ES File Manager doesn't seem to work properly with root anymore.
Here is the NEW content of my gps.conf file:
Code:
NTP_SERVER=0.au.pool.ntp.org
NTP_SERVER=1.au.pool.ntp.org
NTP_SERVER=2.au.pool.ntp.org
NTP_SERVER=3.au.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
INTERMEDIATE_POS=1
SUPL_HOST=supl.google.com
SUPL_PORT=7276
SUPL_TLS_CERT=/etc/SuplRootCert
ACCURACY_THRES=5000
CURRENT_CARRIER=common
DEFAULT_USER_PLANE=TRUE
REPORT_POSITION_USE_SUPL_REFLOC=1
ENABLE_WIPER=1
PHONE_TYPE=UMTS
I'm not sure if the REPORT_POSITION line is used or necessary.
But anyway, the fact is that after resetting AGPS data in GPS Status, it took only 10 seconds to get a fix instead of 5-6 minutes. There were a number of issues which would (in my mind) have caused problems with trying to get a fix. Here were a couple of my problems:
NTP_SERVER=server 0.au.pool.ntp.org
// See that space. Seriously? Who does this? Multiply this by four, then throw in another 6 NTP servers for good measure.
SUPL_TLS_HOST=FQDN
// FQDN = Fully Qualified Domain Name, as explained in the link. I'll give you a few seconds to figure out why this is wrong if you don't get it straight away.
It's a pity LiteROM isn't being maintained anymore because other people may fall into this same situation.
EDIT: On another test with cleared AGPS data, it took 157 seconds (2 minutes 37 seconds) to get a fix, but that is still a vast improvement
EDIT AGAIN: I just set my NTP_SERVER to au.pool.ntp.org and removed the extra lines, so I only have one NTP server and without resetting AGPS, it was a 9 second fix. After resetting AGPS, 47 second fix. I'm going to remove as many lines as I think I can get away with and see what difference it makes.
EDIT NUMBER THREE: 6 seconds
Ok, so, I got a 6 second fix before AGPS reset, and a 57 second fix after resetting it with this as my gps.conf file:
Code:
NTP_SERVER=au.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
SUPL_HOST=supl.google.com
SUPL_PORT=7276
PHONE_TYPE=UMTS
I'm guessing it will be quicker if you leave the INTERMEDIATE_POS line in there, which would explain the 11 second difference between this and the previous tests I did.
So as you can see, the good old, time-tested principle of Keep It Simple, Stupid, is absolutely still relevant in this situation
Really interesting. I will try. Thanks a lot!!!
Sent from my SGH-I927 using xda app-developers app
best?
Hi all
Please, i want to know what is the best conf for my gps.conf
The first:
Code:
NTP_SERVER=0.au.pool.ntp.org
NTP_SERVER=1.au.pool.ntp.org
NTP_SERVER=2.au.pool.ntp.org
NTP_SERVER=3.au.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
INTERMEDIATE_POS=1
SUPL_HOST=supl.google.com
SUPL_PORT=7276
SUPL_TLS_CERT=/etc/SuplRootCert
ACCURACY_THRES=5000
CURRENT_CARRIER=common
DEFAULT_USER_PLANE=TRUE
REPORT_POSITION_USE_SUPL_REFLOC=1
ENABLE_WIPER=1
PHONE_TYPE=UMTS
else if
Code:
NTP_SERVER=au.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
SUPL_HOST=supl.google.com
SUPL_PORT=7276
PHONE_TYPE=UMTS
or the gps.conf posted here (and sirfgps.conf)
http://forum.xda-developers.com/showthread.php?t=2451609&highlight=gps
i've a lot of problems to get my location and play ingress or use gmaps
thanks a lot
Very good explanation. Thank you.

huawei watch gt- export data from health

Got the Huawei watch GT some days ago.
Everything is good except the fact that i can't get track data from Google fit (i know about the issue since they did update the app) and there isn't a way to get the data straight from huawei health.
So i rooted my phone (Xiaomi natrium) and found out the attached file at the path /data/data/com.huawei.health/files.
I can see the latitude/longtitude/time entries and their count.At the bottom it has the HRM and the altitude.
I am sure is a gps location log file of some kind but i can't understand and i am not a developer. Maybe it is a proprietary log file ?
Can anyone help ?
Is there any kind of converter to .GPX ?
My problem is the calorie count is not your daily count, but rather your activity count which is completely useless.
Also, if I sync with Google Fit the heart rate does not pull through.
grlazy said:
Got the Huawei watch GT some days ago.
Everything is good except the fact that i can't get track data from Google fit (i know about the issue since they did update the app) and there isn't a way to get the data straight from huawei health.
So i rooted my phone (Xiaomi natrium) and found out the attached file at the path /data/data/com.huawei.health/files.
I can see the latitude/longtitude/time entries and their count.At the bottom it has the HRM and the altitude.
I am sure is a gps location log file of some kind but i can't understand and i am not a developer. Maybe it is a proprietary log file ?
Can anyone help ?
Is there any kind of converter to .GPX ?
Click to expand...
Click to collapse
Hi,
Just checked shortly your file and found a few things: if you import it to excel as delimited by semicolon, you can do the necessary conversions, needed to use Excel GPX converter. I am not allowed to post links here, so please search for the site. Please check the requirements how to name the Excel columns!
What shall you do?
- e.g remove lat=, lon=, from the beginning of the coordinates - for 18119 points
- tp=alti rows contains the altitudes, again remove the 'v=' before the value - for 3560 points
- tp=h-r contains the heart rate, again remove the 'v=' before the value - for the same 3560 points
- tp =rs contains the average speed for the same 3560 points, again remove the 'v=' before the value. Speed is most probably m/s.
- tp=s-r - i have no idea what is this, but can be identified if you share what kind of activity you did and where
- tp=p-m - no idea
- tp=b-p-m - no idea
- In case of speed - it is calculated for every 5th point, so you must copy speed values with k=0 to an additional column right to the coordinates, like this: speed for k=0 you copy to coordinates from k=0, k=1, k=2, k=3, k=4, continue with k=5, etc. in the same way.
- Due to the fact that we have Heart Rate and altitude records in the same amount as speed, I guess we have to do the same (add two more columns to the excel and copy the same way). I have no idea, what those huge k values mean at the beginning of the rows, my best guess is a coded time stamp, the difference is always 5000. Half second? 5 second? Can you tell me when you made that track (date and time)?
It's OK, if you convert just e.g. 10-20 records and skip the rest, just to check if the theory is correct or not.
At the end you must remove the columns which contain just type and sequence information (first two). Please also be sure that at the end no formulas remained in the excel, just simple values. Run the GPX export, try to import it to Strava.
If it does not work, download a GPX file from Strava open in Excel as xml and check what is the difference. Fine-tune the excel conversions accordingly and it will work sooner or later. If you can share the final working method here, I will really appreciate it!
I might buy a Honor Magic Watch or a Huawei Watch GT. If that happens, I will write a conversion program to avoid manual work in Excel.
Best regards,
Gabor
Well done finding this file - it looks like it might finally be a step in the right direction for getting this data out of the Huawei Health app! I'm going to give this a go with data from a Huawei Band 2 Pro.
Regarding the huge time-stamp, I suspect it's simply the number of seconds since the unix epoch, written in scientific notation. For example the first timestamp (t=1.543646826E9) written without scientific notation becomes (1543646826) which corresponds to (Sat, 1 Dec 2018 06:47:06 GMT).
I'm going to try and access this file without rooting my phone, hopefully by "backing-up" the app-data to my computer using ADB. I'm reluctant to root my phone as I don't want to lose the ability to use Google Pay. I'll keep you updated!
Update: I could neither debug nor backup the Huawei Health app (Version: 9.0.4.332) on my unrooted Huawei P10 Lite. A workaround might be to backup the Health data to the Huawei cloud and re-download it onto a different rooted handset, but as I don't have a rooted handset at the moment I can't do that. Another workaround might to be trying to download an older version of the app, and hoping that it doesn't restrict backup/debugging. Another option might be to use the HiSuite application to backup the data to your computer and extract the health data from there. I'm trying all these options to avoid rooting.
Why does not Huawei put the option to export to gpx in the Health application?
GiovaniM said:
Why does not Huawei put the option to export to gpx in the Health application?
Click to expand...
Click to collapse
I wish! There is an open question on the Huawei forums for this - it's probably worth adding your voice to the crowd to push it up their priority list
I have found a way to access the data without a rooted phone though!!
Download the Huawei Backup app (previously called KoBackup)
Make a local backup to an SD card of just the Huawei Health App Data (ensuring that the backup is not encrypted)
Navigate to the backup on your SD card and you'll find a .tar file containing the data files posted above. You can then move this across to your computer for processing.
The relevant files start `HiTrack_` then a unix timestamp, and can be found in `com.huawei.health/files/`
It is currently not possible to use the HiSuite to extract this data directly to your computer as it is encrypted, even if you choose not to use a password. There are some expensive commercial tools that can decrypt the data (MOBILedit Forensic Express), and a new paper (doi: 10.1016/j.diin.2019.01.008) has been released that proposes a framework for doing this but they don't supply the tool that they've created.
So now we just need to work on converting this data to a useful format, such as Garmin's .tcx- I'll try and whip up a python tool to do this so that it can be cross-platform. I have no experience working with XSD Schema so any help would be appreciated!
I've not forgotten about this and am working on it - I've wrapped my head around generating .tcx files and can generate valid ones in python now based on very simple data. Now I'm working on parsing the HiTrack files in order to feed them in to my .tcx generator.
I have noticed that my backed-up com.huawei.health folder doesn't always hold all of my recorded tracks. It doesn't even seem to only store the recent ones, but a somewhat random selection. I'm beginning to think that these files aren't how the data is stored long-term, but something that the app is producing as temporary files in order to make displaying the information easier/faster. This might be a pain later on, but for now it's better than nothing.
I've also noticed that our files are slightly different, probably because mine is generated using a Huawei Band 2 Pro rather than the Watch GT. Again, this is a problem for later on - perhaps altitude measurements from your watch won't transfer across initially (mine has no altitude measurement), but with enough data files from you I'll be able to sort that.
I've worked out that the tp=p-m lines store your pace (the number of seconds it took you to run that particular kilometer), and on these lines k is distance run in micrometers (!?). I still have no idea what tp=b-p-m but it's probably also measured in micrometers. We can calculate pace from our timestamped location data so I'm going to ignore these lines.
Finally, the timestamps associated with location and heart-rate measurements are not the same, meaning we will need to interpolate heart-rates for the locations that we do have recorded. For the moment I'll just ignore heart-rate data, and that can be a problem for later on.
There we go, I've got a very early-alpha version up on GitHub
grlazy said:
Is there any kind of converter to .GPX ?
Click to expand...
Click to collapse
There is now!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I noticed whilst processing your data that you have 4 or 5 incorrectly recorded GPS points that pointed at:
Code:
lat=90.0;lon=-80.0
Once I'd stripped these out by hand the conversion went smoothly.
I'll implement some kind of filter that removes lines that contain these coordinates during conversion so that you don't have to do this by hand in the future. I don't think those coordinates will crop up in real run data, as they're in the middle of the arctic ocean...
EDIT: Done, you can now filter these records out by passing the tool the command line argument '-f' (see readme for details).
@ aricooperdavis
those are very good news, thank you so much for your time and effort .
I will test it asap (most likely at weekend ) and report back
ethgkk said:
Hi,
- tp=s-r - i have no idea what is this, but can be identified if you share what kind of activity you did and where
Gabor
Click to expand...
Click to collapse
@aricooperdavis
Hi, I have Watch GT.
tp=s-r - This is cadence. Your program works excellent. I use the tcxconverter program to attach altitude. I'm just missing cadence. Could you implement it?
grlazy said:
@ aricooperdavis
those are very good news, thank you so much for your time and effort .
I will test it asap (most likely at weekend ) and report back
Click to expand...
Click to collapse
My pleasure! If you have any trouble send me the files and errors and I can troubleshoot
---------- Post added at 06:02 PM ---------- Previous post was at 05:59 PM ----------
lio_pawel said:
I'm just missing cadence. Could you implement it?
Click to expand...
Click to collapse
I'll see if I can add it At the moment I'm not interpolating the heart-rate, I'm just putting it in where it appears, so I can do the same for cadence?
aricooperdavis said:
I can do the same for cadence?
Click to expand...
Click to collapse
exactly. I compared HR and everything is correct.
Wysłane z iPhone za pomocą Tapatalk
not sure if it is going to help, but I found by chance that you can request your data from Huawei. Just click your picture in the health app click setting/ request your data. you will be asked to confirm your mobile and they will email it to you. I have done it the other day and got the data within few hours. If someone wants, i am happy to share over a year of my data from Huawei Band 2 (my steps, sleep and heart rate, plus couple of gps routes)
Just to add all the info is generated in .xml format.
lio_pawel said:
exactly. I compared HR and everything is correct.
Click to expand...
Click to collapse
There you go, I've updated it
Can you have a look and see if that's worked for you? The TCX schema for cadence is a bit complicated; there is a <Cadence> tag for each trackpoint but according to Strava this isn't used for Running; instead you need to use the <RunCadence> extension. This is what I've done, and the files validate happily enough, but I'm not 100% sure that tools like Strava will recognize them. Let me know if this is a problem.
majo_scigo said:
not sure if it is going to help, but I found by chance that you can request your data from Huawei. Just click your picture in the health app click setting/ request your data. you will be asked to confirm your mobile and they will email it to you. I have done it the other day and got the data within few hours. If someone wants, i am happy to share over a year of my data from Huawei Band 2 (my steps, sleep and heart rate, plus couple of gps routes)
Just to add all the info is generated in .xml format.
Click to expand...
Click to collapse
Thank you - that's potentially very useful for iPhone users who aren't currently able to access these HiTrack files, although it is a shame that you can only request your data once per month. I have requested a copy of my data too; hopefully it will be possible to adapt the tool, or make a new one, that can process these .xml files directly in order to generate .tcx files of activities :good:
aricooperdavis said:
There you go, I've updated it
Can you have a look and see if that's worked for you? The TCX schema for cadence is a bit complicated; there is a <Cadence> tag for each trackpoint but according to Strava this isn't used for Running; instead you need to use the <RunCadence> extension. This is what I've done, and the files validate happily enough, but I'm not 100% sure that tools like Strava will recognize them. Let me know if this is a problem.
Click to expand...
Click to collapse
Thank you very much for your work. Cadence is here, but the distance has disappeared. The TCX Conventer after loading the file generated by your program, does not show the distance and I can not add the altitude. In the previous version it worked great.
---- Input File ----
reading: OKAY
filtering: OKAY
processing gps: OKAY
processing heart-rate/cadence: OKAY
---- Details ----
start: 2019-02-16 14:00:50
duration: 00:24:46
distance: 0m
sport: Running
---- XML file ----
generating: OKAY
saving: OKAY
validating: OKAY
lio_pawel said:
the distance has disappeared
Click to expand...
Click to collapse
!?!?!
I can't replicate that problem - can you send me your HiTrack file? You can upload it here or as an issue on GitHub! Thank you!
aricooperdavis said:
!?!?!
I can't replicate that problem - can you send me your HiTrack file? You can upload it here or as an issue on GitHub! Thank you!
Click to expand...
Click to collapse
I uploaded two files. One is correctly processed, the other is missing a distance. Before adding cadence, all files were correct. In my files there is also a altitude at the end of the file. This is probably the last thing missing.

Categories

Resources