[CM7][OMFGB]Software GPS Fix | V1.5.1 - 9/25/11 | Keep the (GPS) lights on!

Search This thread

cdchris12

Senior Member
Apr 4, 2008
261
5
Grand Forks, North Dakota
oops :( yeah, this is definitely for CM7-based ROMs only..



That's the same gpsd as used in this fix! I might post just the gpsd file, but it's also packed in the script file, so I don't know how necessary that would be.
I know that it is only labeled for CM7, but how will you know if it works on other rooms if no one ever tries? That gpsd for cm7 works pretty damn well, after all...

Sent from my SGH-T959 using XDA App
 

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
I know that it is only labeled for CM7, but how will you know if it works on other rooms if no one ever tries? That gpsd for cm7 works pretty damn well, after all...

Sent from my SGH-T959 using XDA App

Fair enough..maybe try the script version if flashing didn't work? All the flashable does is copy four files over. Script does the exact same thing.

Sent from my SGH-T959 using XDA App
 

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
I'm testing some tweaks to gps.conf.

Could someone please download the attached zip, extract to /sdcard, then run

Code:
su
sh gpsconf.sh

Your device will reboot. I'm interested in time-to-first-fix (TTFF) after you first run the script; after multiple reboots; and after a day.

For comparison, with the new gps.conf I got 7/11 after 20 seconds, 80 ft accuracy, but I still need to see if that survives reboot and see how it goes over the next day.

EDIT: After reboot, 5/10 and 23 ft accuracy in 15 seconds. GPS doesn't seem to stop working if I don't get a lock and exit a GPS-using program.
attachment.php
 

Attachments

  • gpsconf.zip
    582 bytes · Views: 44
  • screenshot-1312587288489.jpg
    screenshot-1312587288489.jpg
    40.1 KB · Views: 1,313
Last edited:

TXLunchbox

Senior Member
Jan 27, 2011
92
23
Conroe
Just a possibly relevant question... what kernel are people using that are getting good lock ons?

Sent from my SGH-T959 using XDA Premium App
 

Only Loki

Senior Member
Oct 3, 2009
85
3
Detroit
I got it working on MIUI.us, and glitch. I'm about to try miui revamped, I'll update later. And I used the zip with gpsd

Sent from my T959 using XDA Premium App
 

ironlood

Senior Member
Jan 31, 2010
614
116
Antioch
I decided to try this after an install of nightly #73. I flashed it with no problems, booted just fine. Once it booted I went and checked my GPS test app, it showed at first that there were 0 satellites in use but in view there were 11. It took my phone around 2 seconds to start to use the satellites, 3 seconds to lock and 4 seconds to get 20-30 foot accuracy. So all together around 9 seconds to full accurate lock ... while inside.

This was Great to see, this was excellent progress and what not. Unfortunatly it didn't last, I don't know how long it took but I lost veiw of the satellites. None would show up on GPS test and google maps could not pinpoint anything.

Oddly I used angry GPS and switched from MSBASED to STANDALONE later in the night. I went and checked GPS test and had only 3 satellites in view.

Sent from my SGH-T959 using XDA Premium App
 

OPTheory

Senior Member
Aug 31, 2010
95
4
Utah
So yesterday I had turned on GPS for a bit to see if I could get a lock. It had been around 14 or so hours after I flashed - it worked great. Later that day, I needed to go to a friend's place so I figured I'd throw on navigation to see if it would work. When I turned on navigation, it thought I had a lock in the same place I had when I turned on GPS earlier in the day but of course I was in a completely different area.

I exited navigation, figured Angry GPS might be able to sort it out so I did a tracking test and the GPS icon in the notification bar didn't even come up.

Oh how strange...

Strictlyrude: I'd test out that last zip for you but I don't have easy access adb. Did you find what you were looking for?
 
Last edited:

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
So yesterday I had turned on GPS for a bit to see if I could get a lock. It had been around 14 or so hours after I flashed - it worked great. Later that day, I needed to go to a friend's place so I figured I'd throw on navigation to see if it would work. When I turned on navigation, it thought I had a lock in the same place I had when I turned on GPS earlier in the day but of course I was in a completely different area.

I exited navigation, figured Angry GPS might be able to sort it out so I did a tracking test and the GPS icon in the notification bar didn't even come up.

Oh how strange...

:( It seems that within the first 24 hours of flashing, GPS works great, and after that it's hit-and-miss.

I encountered the no-notification-bar icon issue (GPS driver is not being loaded); after a few minutes of sitting there it would sometimes come back. It would also help if I just turned off the screen and let it sleep for a while.

Maybe try flashing no-gpsd and see if the CM7 nightly's GPS driver is working? (Of course, this means you need to reflash the nightly to get their gpsd, or you could use adb or something to push it - just make sure you set 0755 permissions and reboot).

Strictlyrude: I'd test out that last zip for you but I don't have easy access adb. Did you find what you were looking for?

Initially yes - I got 20ft accuracy in 15 seconds. But it's not surviving reboots. jad3675 is testing another variant of the LTO data, and I might tweak gps.conf further. I won't have time this weekend to experiment, though, so for right now perhaps for optimal GPS usage we just have to flash the fix every 24 hours..? :/
 
  • Like
Reactions: OPTheory

michaelh99

Senior Member
Sep 10, 2010
311
30
I'm seeing similar behavior. Works the first few times and then just stops. rebooting to cwm and installing the zip restores operation for a few uses and then it dies again
 

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
Once I hear back about lto2 I'll incorporate that in 1.4.

This is all certainly an experiment, hopefully it'll all end soon and we can enjoy gps consistently..

Sent from my SGH-T959 using XDA App
 

jad3675

Senior Member
Nov 17, 2010
79
21
Once I hear back about lto2 I'll incorporate that in 1.4.

This is all certainly an experiment, hopefully it'll all end soon and we can enjoy gps consistently..

Sent from my SGH-T959 using XDA App

I'm on hour 27 of using the lto2.dat - have not rebooted the phone. I'm getting gps locks in ~50 seconds and a 20 ft accuracy in 2 minutes.

I'm using the original gps.conf, btw.

John
 

imitebewrong

Senior Member
Mar 8, 2010
227
40
Iowa City, Iowa
Thanks for putting this together....

I was getting locks before this, but not as quickly, and not near as accurate.

I now get very fast locks, and accuracy is down to 6 to 7 meters! Before the fix, it wouldn't go below 30 meters, and Navigation would jump around. Now, Navigation works great.

It's as good as Froyo's GPS.... Maybe better.

:D

P.S. I'll let you know if it stops working, I have it on two vibrants.... will report back. So far, so good though.
 

jad3675

Senior Member
Nov 17, 2010
79
21
Just curious but what exactly is the the LTO data ??



Sent from my SGH-T959 using XDA Premium App

Long Term Orbit data -it's for devices that do not have AGPS.
http://www.broadcom.com/products/GPS/Location-Based-Services/LTO-AGPS

Even though our devices should (and can) do AGPS, the LTO data seems to help with locks. The issue with CM7 is that the gps daemon is rather...limited? Bastardized? We're not too sure how it works.

As for my testing...I had a good 29 hours without reboot with 15 ft accuracy in the GPS. Rebooted, and the accuracy is still there.

John
 

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
Dear all -

1.4 Script version is released for testing purposes - this incorporates the use of lto2.dat and some gps.conf tweaks. I won't release 1.4 as a CWM quite yet, as I need to continue testing out the tweaks. I may roll them back as early as tonight.

Try out 1.4 if you'd like to be a guinea pig. A CWM version will be released once the tweaks get finalized (or rolled back).

I was able to get 5-10 second locks with the AngryGPS TTFF test, but for some reason I can't achieve that again. I also had 20 ft accuracy with GPS Test, but again it didn't hold up terribly well.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 82
    Hi all -

    I wrote a script and created a CWM update-flashable to perform a one-line install of the CM7 GPS Fix, documented here by jwleonhart. There were some complaints about jwleonhart's install instructions; it's a bit cumbersome and not trouble-free, especially for noobs. Please read the original thread for detailed instructions on what my script does; the script exactly does jwleonhart's instructions.

    NOTE: EVERY VERSION OF THIS FIX MAKES SUBTLE BUT IMPORTANT CHANGES THAT MAY IMPROVE OR DEPRESS YOUR GPS FUNCTIONALITY. UNTIL A TRUE GPS DRIVER DROPS FOR THE VIBRANT (which at this point seems very unlikely) ALL WE CAN DO IS HACK AND TWEAK. NEWER VERSIONS MAY WORK BETTER OR WORSE THAN OLDER ONES! PLEASE POST WITH YOUR EXPERIENCE USING THE VARIOUS VERSIONS OF THE FIX, AND PLEASE BE CONSTRUCTIVE/HELPFUL WITH YOUR FINDINGS!

    There are three separate ways to install: CWM, CWM with no gpsd, and via shell script.

    CWM Installation
    The easiest way to install the GPSFix files is to download and flash Vibrant_CM7_GPSFix_V1.4-CWM-signed.zip. All files will be copied over and read/execute permissions will be properly set.

    NOTE: Flashable does NOT contain AngryGPS. There are some people who have better results without it, so I'll let you install that one on your own. You can find the APK at jwleonhart's CM7 Install Guide.

    OPTIONAL: There's a no-gpsd version of the CWM flashable as well - if you want to use the gpsd from your current nightly, or mix and match. The GPS driver might get better in time, and who knows if down the line the gpsd bundled with the latest nightly is better than this one, pulled from Trigger Redux#13 (CM7 Nightly#54).

    Script Installation
    The script is available for users who want to customize their own GPS fix. It requires an extra reboot (since you can't just run the script after installing a new nightly), but you can easily add/remove files to the script to suit your own needs. Personally, I use the script to test new versions before they go into the CWM flashable.

    Attached is the zip file with all the files and the shell script you need. Just extract the folder to your SD card; then in a terminal (ADB or terminal emulator with root), run these commands:

    Code:
    su # if you're not already dropped into superuser status
    cd /sdcard/GPSFix
    bash GPSFix.sh

    It will automatically copy all the files (gpsd, secgps.conf, gps.conf, 90getgps_lto) to the right places, then set permissions those files, then reboot. AngryGPSmod.apk is in there but is not installed; I suggest try the GPS fix without AngryGPS first, then install it after if you don't get good results.

    Script Contents

    For those interested, here's the contents of the script..
    Code:
    #!/system/xbin/bash
    
    FIXFILES="/system/etc/gps.conf
    /etc/init.d/90getgps_lto
    /system/vendor/bin/gpsd"
    
    REMOVEONLY="/data/gps/lto.dat
    /data/gps/lto2.dat
    /data/gps/svstatus.txt
    /data/gps/ltoStatus.txt
    /data/gps/secgps.conf
    /system/bin/agpsd"
    
    mount -o rw,remount /system
    
    echo "==================================================="
    echo "======Vibrant CM7 GPS Fix One-Command Install======"
    echo "=================by strictlyrude27================="
    echo ""
    
    # Delete previous fix files
    echo "Deleting previous fix files..."
    for file in $FIXFILES $REMOVEONLY
    do
        if [ -f $file ]; then
            rm $file
        fi
    done
    
    # Copy new files and set permissions
    echo "Copying new files over..."
    for file in $FIXFILES
    do
        fname=$(basename $file)
        cp $fname $file
        chmod 0755 $file
    
        if [ $file == "/system/vendor/bin/gpsd" ]; then
            chgrp shell $file
        fi
    done
    
    echo "Rebooting device.. Enjoy GPS!"
    echo "Install AngryGPSmod.apk manually if you want to."
    echo ""
    reboot

    Credits
    jwleonhart - writing up the CM7 install guide
    roffee - finding the original GPS Fix for CM7
    jad3675 - providing original Long Term Orbital download script

    PLEASE go to their threads and hit their Thanks button. They did all the heavy lifting, I just packaged up their findings and work into a simple-to-use flashable.

    "If I have seen far, it is because I have stood on the shoulders of giants."
    --Isaac Newton

    Changelog:
    Code:
    V1.5.1
        -- renamed init-script to overwrite CM7's implementation of V3 of this fix
        -- now offering "newgpsd" variant - contains gpsd from latest CM7 nightly
                -- standard zip: faster locks, but more prone to randomly quitting working
                -- newgpsd variant: slower locks, but more resilient GPS indicator [color="red"] still needs testing[/color]
    V1.5 
        -- cleaned up script 
        -- now keeping LTO data named lto2.dat (used to rename to lto.dat)
        -- lowering threshold for lto2 refresh to 3 days
    V1.4 (all variants)
        -- replaced lto.dat with lto2.dat - preliminary testing indicates survival after reboot and better TTFF
        -- now using us.pool.ntp.org for the time server - if you're not in the US, please adjust your gps.conf accordingly
        -- gps.conf tweaks - trading accuracy for TTFF for now..
    V1.3.1 (all variants)
        --set permissions on downloaded lto.dat to 755 (was 644) - i couldn't get
          any birds in view before, now i can lock. give this a try if 1.3 doesn't work.
    V1.3 (all variants)
        --removed agpsd
        --added 90getgps_lto - will fetch latest long term orbit data on boot
        --hopefully these changes help get REPEAT locks faster - please let us know!
    V1.2CWM-nogpsd
        --same as V1.2CWM, but with no gpsd. This way you can use gpsd from
        the latest CM7 nightlies, or whatever nightly gpsd worked best for you. 
        I will start collecting gpsd files and posting them for your convenience soon!
    V1.2CWM
        --created CWM flashable for your convenience! performs the EXACT SAME
        as the script, so if you've already run V1.2, no need to flash V1.2CWM.
        But, it could be useful if you tend to flash nightlies all the time.
    V1.2
        --changed all file permissions to 0755 - not sure how reading .conf files 
        worked if there wasn't any read permission. gets me a faster lock after
        applying the script.
    V1.1
        --fixed typo - "chmod shell" should have been "chgrp"
        --removed \t, \n - was not being interpreted by shell correctly
    V1 
        --initial release

    If I helped you with your CM7 experience, please hit the Thanks Button :D :D :D
    7
    Dear all -

    Script was updated to V1.2. I noticed that no read permissions were set to the .conf files; my thinking is there's no way Android could read those config files without read permissions, so they weren't even doing anything.

    That said, the latest script now gives permission 0755 (rwxr-xr-x) to all files. After running the script now, I get a lock after first reboot in about 25 seconds.

    You can download V1.2 and start from scratch, or just copy/paste the latest script contents into your GPSFix.sh. Or, run the following commands at a terminal (ADB or terminal emulator with root):

    Code:
    su
    mount -o rw,remount /system
    chmod 0755 /data/gps/secgps.conf
    chmod 0755 /system/etc/gps.conf
    chmod 0755 /system/bin/agpsd
    mount -o ro,remount /system
    reboot

    Also, I noticed 31 downloads (and there were 20-some in the original post) but only a total of 3 Thanks.. I'm kind of addicted to the Thanks button and don't ask for donations otherwise, please push it if I help make a better CM7 experience for you :eek::eek::eek:
    6
    Dear all -

    V1.2CWM released! As requested, a CWM flashable zip has been created. It does literally the exact same thing as V1.2 (copies over the GPS files to the right locations, sets 0755 permissions on all files). You don't need to flash if you've already installed V1.2, but I would keep the zip on hand for when you decide to flash a new nightly.

    As always, the Thanks button lets me know I'm loved :cool::cool::cool:

    I plan on starting a gpsd database, seems that while all gpsd's are created equal, some are more equal than others :p so you can mix and match the gpsd from a previous nightly, rather than referring to the supermassive black hole that is the official CM7 Nightly thread.

    And finally, I must point out that I did NOT create these fixes. All the credit and praise belongs to jwleonhart and roffee. I just packaged up their work into an easy-to-install package, those guys did the real work! Please find their threads in the Credits section of my OP and hit the Thanks button!
    3
    It turns out making an update.zip isn't so hard after all :) testing it now, if it works out I'll upload to OP. I'll keep the original scripts and stuff for posterity's sake.
    2
    I'll try no agpsd and see how that goes.

    I don't have the file you reference. What is it, and could you please PM me with a link to download?

    Sent from my SGH-T959 using XDA App

    LTO.dat is Long Term Orbit Data. As far as I can tell, the CM7 on the vibrant doesn't do AGPS.

    http://www.broadcom.com/collateral/tb/LTO-TB100-R.pdf

    I've attached a shell script that will download the lto data.

    I had merged this into gerrit for CM7 (Nightly 62), but I don't think it got merged properly.

    John