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

Search This thread

OPTheory

Senior Member
Aug 31, 2010
95
4
Utah
This works but great the first day but
GPS seems to not even lock in the next day.

YES! This happens to me too. It works *excellent* the first time you put it on when you test it out, but then when it comes time when you need to navigate somewhere you're just stuck waiting for a lock and it's hit or miss.

Either way, thanks OP for the software fix. Very convenient!
 

jad3675

Senior Member
Nov 17, 2010
79
21
tell me about it. i put the damn thing together and i'm in the same boat. It's really hit or miss for me. :mad:

Try removing /system/bin/agpsd. I never placed it when I did the manual GPS fix and I never had issues. Flashed 71 yesterday and your zip and had your issues. Removed agpsd and the problem went away.

Do you have a /data/gps/lto.dat?

John
 
Last edited:

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
Try removing /system/bin/agpsd. I never placed it when I did the manual GPS fix and I never had issues. Flashed 71 yesterday and your zip and had your issues. Removed agpsd and the problem went away.

Do you have a /data/gps/lto.dat?

John

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
 

jad3675

Senior Member
Nov 17, 2010
79
21
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
 

Attachments

  • get-gps-lto.zip
    412 bytes · Views: 191

elsocplayer

Senior Member
Jul 8, 2010
183
33
Sorry no Thank you button on XDA app, I will try it out an report a lil later on. Thanks for your work with this.

Sent from SGS Vibrant w/CM7
 

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
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

Awesome, thanks. I'll implement your script as a startup script in both fixes. I'm just testing it now. I might change the timeout time to 10 minutes, since the script will execute on boot and if the user wiped dalvik it'll take forever before the script can get DNS.
 
Last edited:

jad3675

Senior Member
Nov 17, 2010
79
21
Awesome, thanks. I'll implement your script as a startup script in both fixes. I'm just testing it now. I might change the timeout time to 10 minutes, since the script will execute on boot and if the user wiped dalvik it'll take forever before the script can get DHCP.

It was originally made as a service that would run when Wifi or GPS was turned on. It was merged in #62; either someone took it out, or my submit didn't generate the init.aries.rc properly. If you can get it working as a update.zip, that's be great.

John
 
  • Like
Reactions: strictlyrude27

strictlyrude27

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

CWM flashable updated to V1.3. Based on discussion above, I've removed agpsd and added a script that downloads long term orbital data on boot. No-gpsd and script variants are also available. Please let me know of your results! Personally, I'm fairly hit or miss, but so far a lot of others are pretty happy with all the fixes thus far.

For some reason, my updater-script didn't always like deleting /system/bin/agpsd - if you flash V1.3-CWM and find that the file still exists, please let me know - then delete it and reboot. Thanks!

EDIT: Had to reupload the script version, forgot to create the GPSFix folder before putting all the files into the zip - please redownload and re-execute if you are using the script.
 
Last edited:
  • Like
Reactions: rodrigos122

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
Last update of the day (hopefully week, maybe even ever if everything works out!), I swear!

Updated to 1.3.1. I wasn't getting any results with the new Long Term Orbit file fix; I changed permissions of /data/gps/lto.dat from 0644 to 0755 and I got looks and locks fairly quickly.

You do NOT need to flash 1.3.1 if you've already flashed 1.3. In fact, 1.3 might be working fine for you. But if it's not, try the following commands at a terminal:

Code:
su
mount -o rw,remount /system
sed -i 's/664/755/g' /etc/init.d/90getgps_lto
chmod 0755 /data/gps/lto.dat
mount -o ro,remount /system
reboot

This will change permissions on lto.dat to read/write/execute, and set the boot script to do the same when it downloads new files.
 

bellrb19

Senior Member
Aug 21, 2009
127
21
Just installed 1.3 and getting 0 in view with gps test and no lock. An hour after installing it gps would not show up as actively searching in notification even after toggling setting in menu and checking permissions (which appear correctly). I am on glitch, so will flash latest nightly and try with stock kernel and gpsd.

I also performed the instructions in original thread and had occasional locks. Thanks for this, progress is made every day with gps. Will report back after update.

EDIT: After doing the LTO fix mentioned above I got a gps lock in 15 seconds in maps. GPS test shows 12 birds in view with 7 locked. Accuracy fluctuates between 30-70 feet. Best I have seen on Gingerbread yet! Will see if it can actually track a trip in mytracks. Awesome!

Sent from my SGH-T959 using XDA Premium App
 
Last edited:

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
Just installed 1.3 and getting 0 in view with gps test and no lock. An hour after installing it gps would not show up as actively searching in notification even after toggling setting in menu and checking permissions (which appear correctly). I am on glitch, so will flash latest nightly and try with stock kernel and gpsd.

I also performed the instructions in original thread and had occasional locks. Thanks for this, progress is made every day with gps. Will report back after update.

Sent from my SGH-T959 using XDA Premium App

Try 1.3.1. That has fixed permissions for long term orbital data. After reboot, I get 6 used/13 in view after 5 seconds, 130ft accuracy. [EDIT: and on reboot, nothing in sight.. and on reboot AGAIN, 6/13 with 130ft accuracy.] I need more confirmation that this works though.

If that doesn't work, try this at a terminal:

Code:
su
mount -o rw,remount /system
rm /etc/init.d/90getgps_lto
rm /data/gps/lto.dat
mount -o ro,remount /system
reboot

This will remove long term orbital data entirely. I wonder how this will perform along with no agpsd.
 
Last edited:

jad3675

Senior Member
Nov 17, 2010
79
21
GPS Aids (v2) from the Market will also inject LTO data; might be worthwhile to give that a try.

John
 

Mannymal

Senior Member
Nov 26, 2010
314
36
No joy on the fix. Just like following the instructions on the other thread, it did nothing, and might have introduced the Android System battery leak related to GPS, will have to wait longer but so far Android System is the biggest drainer since installing this.

Will download the one with LTO to see if that helps.
 

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
No joy on the fix. Just like following the instructions on the other thread, it did nothing, and might have introduced the Android System battery leak related to GPS, will have to wait longer but so far Android System is the biggest drainer since installing this.

Will download the one with LTO to see if that helps.

I'm in the same boat you are - GPS tends to drain the crap out of my battery. If you're a Tasker user, check my sig - I wrote a Tasker profile system that lets you load/unload the GPS driver. Alternatively, install Trigger Redux, since Roman included a GPS load/unload toggle in his tweaks as well.
 

elsocplayer

Senior Member
Jul 8, 2010
183
33
Installed 1.3 and I finally get to say I have a usable gps lock since more than a month ago when I had bionix Rom installed. Thanx a lot for this zip and for ur work. I get 10meter accuracy and gps locks even on the move at 60mph. Can't get lock at some indoor places but I don't mind, I only use it when on the go anyway. Again, thanx!

Sent from SGS Vibrant w/CM7
 

OPTheory

Senior Member
Aug 31, 2010
95
4
Utah
Can anyone confirm that the fix lasts more than a day? In my experience it works great the first day, even if you toggle GPS on and off in between uses. But after a couple days the GPS icon doesn't even show up in the notification bar if you go into Maps or Angry GPS (of course, GPS is technically turned on). This is sort of remedied by a reboot, but even then the performance is nothing like it was after first applying the fix.

I'm curious... I know that this has to do with the software, but what if I applied this hardware fix? I think I'll try it, for science. I'm sure it won't hurt.
 
Last edited:

cdchris12

Senior Member
Apr 4, 2008
261
5
Grand Forks, North Dakota
Just want to say that if you do not have a CM7 rom, stay away from this. I just flashed Simply Honey 5.0b2, and this CWM zip directly after the mandatory reboot and sitting period. My GPS couldn't get a lock to save it's life. Not only that, but I couldn't roll back the changes even by replacing all the files changed by the CWM zip. I ended up ODIN'ing back to stock and starting my GB adventure all over again...

If anyone is interested, I did have AMAZING locks using the GPSD from this thread with Simply Honey 4.0. That's literally all I did was replace the GPSD file, with awesome results.
 

OPTheory

Senior Member
Aug 31, 2010
95
4
Utah
Mmkay, for science:

Before: Just flashed 1.31, went out and stood on my porch, opened Angry GPS in Standalone mode, got 13 satellites in about 20 seconds and 4.5 meter accuracy.

That plastic cover was a nightmare to get off... Ok, the little contact has been moved up to make contact with the antenna on the panel. Put everything back together...

After: It was noticeably faster. It detected 1, then 13 satellites within 10 seconds and went down to 5 meter accuracy faster than before.

Yes, I know this isn't very scientific, but hey - it seemed to do something.
 
Last edited:
  • Like
Reactions: strictlyrude27

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
Just want to say that if you do not have a CM7 rom, stay away from this. I just flashed Simply Honey 5.0b2, and this CWM zip directly after the mandatory reboot and sitting period. My GPS couldn't get a lock to save it's life. Not only that, but I couldn't roll back the changes even by replacing all the files changed by the CWM zip. I ended up ODIN'ing back to stock and starting my GB adventure all over again...

oops :( yeah, this is definitely for CM7-based ROMs only..

If anyone is interested, I did have AMAZING locks using the GPSD from this thread with Simply Honey 4.0. That's literally all I did was replace the GPSD file, with awesome results.

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.
 

strictlyrude27

Senior Member
Jan 12, 2010
551
451
Seattle, WA
Mmkay, for science:

Before: Just flashed 1.31, went out and stood on my porch, opened Angry GPS in Standalone mode, got 13 satellites in about 20 seconds and 4.5 meter accuracy.

That plastic cover was a nightmare to get off... Ok, the little contact has been moved up to make contact with the antenna on the panel. Put everything back together...

After: It was noticeably faster. It detected 1, then 13 satellites within 10 seconds and went down to 5 meter accuracy faster than before.

Yes, I know this isn't very scientific, but hey - it seemed to do something.

Hardware fix is definitely worth it, as you've learned :) glad both fixes are helping out! I would like to know your results after a day of use though - it seems that some people have lots of luck immediately after flashing, but after 24 hours it doesn't work so well anymore (but a reflash makes it work again). I'm in the same boat as the aforementioned people.
 

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