[CM7.x][Patch] improve GPS and Sensors

Search This thread

itasoulas

Senior Member
Nov 3, 2011
2,215
4,502
Athens
www.youtube.com
How do i install this if I don't have the old patch? What files are changed besides gps.conf?

I can be really nice and really mean, what do you prefer? Instructions are in my post, changes also there, tutorial for personalisation also there. I really can't help anymore. Peace!

---------- Post added at 06:05 PM ---------- Previous post was at 06:00 PM ----------

Just flash the ZIP in CWM, you don't need the old patch. Exactly the same files as the original lagloose patch are changed.

I've tested this, works perfectly, edited gps.conf for the UK and got lock in about 10 seconds in Maps 6.5 and in central London, very good accuracy...

nice to hear it works. I tried that myself today in my car with a navigator, works sweet.

A bit off-topic: Best accuracy I get is 4meters. I am just curious if anyone ever got a better accuracy than this like 2meters or 0 with his phone. But I guess it's just impossible since there is always a loss when receiving signal from satellites. I guess that happens even if you buy the best navigator in market.
 
  • Like
Reactions: spicediablo

spicediablo

Senior Member
Oct 26, 2011
1,665
243
Malaysia
OnePlus 11
Haha. I prefer u to be nice man.Anyway, I'm currently on happily1986 gps fix which involves editing the gps.conf and adding a secgps.conf to the /data/gps.Will try this patch soon and post feedback. Thanks!!

Initial impressions seems good. Getting first lock in under 100 sec. Previously took about 200 sec. Subsequent locks were under 10 sec.:)

I can be really nice and really mean, what do you prefer? Instructions are in my post, changes also there, tutorial for personalisation also there. I really can't help anymore. Peace!

---------- Post added at 06:05 PM ---------- Previous post was at 06:00 PM ----------



nice to hear it works. I tried that myself today in my car with a navigator, works sweet.

A bit off-topic: Best accuracy I get is 4meters. I am just curious if anyone ever got a better accuracy than this like 2meters or 0 with his phone. But I guess it's just impossible since there is always a loss when receiving signal from satellites. I guess that happens even if you buy the best navigator in market.
 
Last edited:

arys64

Senior Member
Jan 5, 2008
161
49
Santiago
Google Pixel 7 Pro
Doubt

GPS & Sensors Patch Updated by itasoulas (April 2nd, 2012)

:: Updated system\bin\gpsd from XXKPT
:: Updated system\etc\gps.conf from XXKPT
:: Updated system\lib\hw from XXKPT
:: I think now with updated files locks faster


+ All credits go to lagloose, I just updated the files on his original zip with latest sources from XXKPT
+ If you have original patch, just boot in recovery, mount system and install this. It will overwrite old files and wipe your /data/gps directory to remove old xtra.bin files as original file. So if you start your GPS is like using it for the first time.
+ Please backup your current rom before flashing this. It is highly unlikely that this will do any harm to your phone but you never know, sometimes sh*t happens!

NOTE: The updated gps.conf file does not specify a pool server, e.g. Europe, Asia, etc.. in contrast with lagloose's file that has been edited to specify Europe server. That's good for European users cause even at first use they'll get a faster lock. But users in other continents won't! But after first use all users should lock fast (or faster) as with lagloose's patch. I could have done different versions for each pool server but just would be a pain in the a*s. The bottom line is that after first use you get fast lock as with stock

In order for you to get fastest gps lock ever, do this:
1. Go to my zip, system\etc and open the gps.conf with notepad or wordpad
2. Before the following
SUPL_HOST=supl.google.com
SUPL_PORT=7276

add
NTP_SERVER=YOURCOUNTRY.pool.ntp.org (if you don't know how exactly your country must be written visit this http://www.pool.ntp.org/zone/@)
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

3. Save file
4. Now your gps is locked to your country.
5. Flash, reboot and enjoy!!! Updated sources from XXKPT with your configuration=SPEED!

Example

Now, if my country is not listed, can i use something like: north-america.pool.ntp.org in the line to edit? (based on the link you provided for the country list)

[EDIT] Since my country is not listed, I changed the address to the part of the world I live in (north-america.pool.ntp.org) and now I get a lock in less than 30 sec and accuraqte to 4m. :D Perfect!!!
 
Last edited:

Weeeman

Senior Member
Jan 30, 2012
138
2
How would i get back to the stock gps system after flashing this. I don't think my gps works. I returned to stock. Any help

Sent from my GT-S5830 using xda premium
 

nihilista

Senior Member
How would i get back to the stock gps system after flashing this. I don't think my gps works. I returned to stock. Any help

Sent from my GT-S5830 using xda premium

What ROM? Cyanogen? That works 100% with this gps module...
Otherwise you should have an nandroid backup before patching anything, if not, reinstall you ROM or try to extract original files from zip and put it in iandols zip.
If you are not familiar with this procedure, you have a problem ;)
But i think putting old files in this update-zip should be very easy....but as i said: better to have nandroid backup (learned it myself hard way ;-)...
 

Weeeman

Senior Member
Jan 30, 2012
138
2
Im on stock based Rom sgs final by spacecaker.
I've installed the Rom again with no luck.
If i do not have a nandroid backup what should i do. I think i do, should be on my computer. Still what happens if I've lost it.

Sent from my GT-S5830 using xda premium
 

nihilista

Senior Member
As i said, take the files from your original ROM, maybe download it if dont have, take files from original, replace those in zip and flash, maybe this works....
If not you have to flash original ROM like you did it before...dont know if with odin or recovery. If via recovery it should not destroy your settings and apps, if you dont do factory reset (no need if same ROM).
 

Weeeman

Senior Member
Jan 30, 2012
138
2
Wait. So i can't find my backup. Therefore i flash .gs Rom or original orange UK Rom

Sent from my GT-S5830 using xda premium
 

nihilista

Senior Member
If your phone runs with "stock based by spacecaker" (Doesnt find it here, but you will know where it comes from), easiest is to take those ROM and flash it and dont loose your apps and settings. Flashing original ROM with odin will reset all.

Edit: Is it this ROM? So download it, extract changed files, put them in gpsfix zip and install...should work....
 
Last edited:

Weeeman

Senior Member
Jan 30, 2012
138
2
Yes this the right Rom.
How do i extract the files to gprs fix. Like what files do i take.

Sent from my GT-S5830 using xda premium
 

nihilista

Senior Member
Yes this the right Rom.
How do i extract the files to gprs fix. Like what files do i take.

Sent from my GT-S5830 using xda premium

Look in gps-fix zipfile, which files are in and what folder, look in ROM zipfile as these files are in (need files from /system and subfolders that are in gpsfix), extract exactly these files and put it in gps-fix zipfile, overwriting originals. Then flash this zip, if you are sure you replaced all files in. And before: Make nandroid backup, if somethings going wrong ;-)

But if its easier for you, flash the ROM, dont do factory reset and it should work anyway....
 

lagloose

Senior Member
Feb 11, 2008
728
2,969
Tested but nothing changed!
Gps worked before patching.
Patch didnt fix agps so its not needed for cm9. If u make a patch which will fix agps i would be happy ;)

Sent from my GT-S5830 using XDA

You know how to work with adb ?
I've attached a 'xtra.bin.patch' (for Europe) file to this post. Rename to 'xtra.bin'. Copy this to /data/gps, set permission for this file to 644, reboot and try agps/gps again. Tell me if it helped...
 

Attachments

  • xtra.bin.patch
    38.8 KB · Views: 30

Top Liked Posts

  • There are no posts matching your filters.
  • 93
    Here's a patch for CM7.X to improve GPS and Sensors.

    The 'new' CM7.2 from vo-1 is IMHO the best CM7 we have. Only thing which disturbed me was the slow GPS. The PFGPS Tweaks by PFittech didn't really work for me. So i took a look at the GPS functions of Stock Samsung ROM to see what i can do. CM7 and Samsung use different ways to provide GPS funtions. While CM7 'directly' accesses the hardware, Samsung does it via a running daemon (/system/bin/gpsd'). Obviously this works much better than GPS functions provided by CM7. So i decided to try the Samsung GPS functions in CM7 which worked very well out of the box. I always have a GPS-Fix now in less than a minute. This required a complete replacement of HW libs provided by CM7. This worked without any problems. All Sensors (at least for me) are working. More than that, i personally have the feeling that everything is a little bit smoother and faster. But that maybe a 'Placebo'...

    Anyway, here's the patch for those who want to try. What does it do ?

    - it completely replaces the libs in /system/lib/hw with libs from Samsung STOCK ROM
    - it installs 'gpsd' in /system/bin
    - it installs a stock gps.conf in /etc
    - it wipes your /data/gps directory to remove old xtra.bin files

    Note: PFGPS doesn't work with this patch So if you've already flashed PFIttech's PFGPS tweaks, they will be uninstalled by my patch.

    All necessary entries to start the daemon and prepare directories were already found in 'init.gt-s5830.rc' (..which is very strange because there isn't any /system/bin/gpsd in a standard CM7.X installation). I've tested my patch on a clean CM7.2 (vo-1) installation. But it should work on all CM7 variants.

    Before flashing don't forget to create a CWM backup.

    No need to wipe anything. Just flash via CWM 5.0.2.6

    DOWNLOAD: http://www.4shared.com/zip/G6mCEPDh/cm7X_gpspatch.html

    Please report here if it worked for you or if you find any problems...

    ENJOY
    6
    GPS & Sensors Patch Updated by itasoulas (April 2nd, 2012)

    :: Updated system\bin\gpsd from XXKPT
    :: Updated system\etc\gps.conf from XXKPT
    :: Updated system\lib\hw from XXKPT
    :: I think now with updated files locks faster


    + All credits go to lagloose, I just updated the files on his original zip with latest sources from XXKPT
    + If you have original patch, just boot in recovery, mount system and install this. It will overwrite old files and wipe your /data/gps directory to remove old xtra.bin files as original file. So if you start your GPS is like using it for the first time.
    + Please backup your current rom before flashing this. It is highly unlikely that this will do any harm to your phone but you never know, sometimes sh*t happens!

    NOTE: The updated gps.conf file does not specify a pool server, e.g. Europe, Asia, etc.. in contrast with lagloose's file that has been edited to specify Europe server. That's good for European users cause even at first use they'll get a faster lock. But users in other continents won't! But after first use all users should lock fast (or faster) as with lagloose's patch. I could have done different versions for each pool server but just would be a pain in the a*s. The bottom line is that after first use you get fast lock as with stock

    In order for you to get fastest gps lock ever, do this:
    1. Go to my zip, system\etc and open the gps.conf with notepad or wordpad
    2. Before the following
    SUPL_HOST=supl.google.com
    SUPL_PORT=7276

    add
    NTP_SERVER=YOURCOUNTRY.pool.ntp.org (if you don't know how exactly your country must be written visit this http://www.pool.ntp.org/zone/@)
    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

    3. Save file
    4. Now your gps is locked to your country.
    5. Flash, reboot and enjoy!!! Updated sources from XXKPT with your configuration=SPEED!

    Example
    3
    Hey lagloose. Heard your patch worked on CyanogenMod 9 by Maclaw. Can you work a bit more on it as the GPS doesn't seem to lock for many users?

    Thanks in Advance.

    cm9 patch on Monday...

    Sent from my GT-S5830 using XDA
    2
    Could someone please uploud the fix on mediafire? I just can't download it from 4shared :'(

    Not mediafire, but it should work just like it no wait times or anything, directly from bropbox.

    http://db.tt/PaKw0LmD