View Single Post
  #1 (permalink)  
Old 02-12-2012, 12:21 PM
detule's Avatar
detule
PPCGeeks Regular
Offline
 
Join Date: Dec 2009
Posts: 85
Reputation: 140
detule is keeping up the good workdetule is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
[TESTING] Rhod AGPS (XTRA) support

Update ( 03/08 ) Seems gsm rhod users are using the lib without any problems (per reports on xda) - changing the name and updating this post to reflect this - no longer specializing in CDMA.
************************************************** ************************************************** ***

As the name suggests, this is a thread to test and develop aGPS support for RHOD.


This is a testing thread, so please, only for users that have a working proficiency with adb. Do NOT post in this thread reporting a bug, unless you provide complete GetLogs output capturing the issue. In addition, please provide logcat output of the boot sequence (as this is when xtra_set_data is called by default, and when the data injections happens.) All other posts will be ignored.

Q: What is XTRA?
A: A collection of instructions that allow userland (Android) to communicate with the GPS engine in our devices. In particular, they allow for Android to inject data packets that contain satellite information, which in turn drastically reduces the time to get GPS lock. In short, without it, a GPS lock takes a long, long time from a "cold start". If it's working, with a "cold start" you should be able to get a GPS lock in less than 30 seconds (provided you are outside with clear skies).

If you like to contribute to this thread, please do so only if you are using GBX0B since this is the build that I have and the only one that I can debug.

Installation and download instructions follow.

Please read the entire post carefully.

First thing is first: These libs are stock xdandroid libs with tytung's aGPS patches from Leo ported over. He is to be credited, along with all other xdandroid developers who have put in work in the xdandroid stock libs. If you would like to redistribute or modify this lib, please read the disclaimer in tytung's post. In compliance with his request, the full source code for this lib can be found here.

0. You need a working data (3G) connection (this could possibly work over WiFi, I just haven't had time to check).

1. Download gps.xdandroid.so from the downloads section. This lib needs to go in /system/lib/hw . In gbx0b, this means, either
a) Mount bind the lib in gingerbread.user.conf by adding the command
Code:
mount --bind <path_to_lib_on_sdcard>/gps.xdandroid.so /system/lib/hw/gps.xdandroid.so
or
b) Back up and replace the existing lib in system/lib/hw . Note first, you need to remount /system as rw.

(In either case, verify that you have the correct lib in place (by running md5sum) BEFORE reporting an issue.)

2. Make sure GPS is on in Settings. Turn off the device. Pull the battery and wait at least 10 minutes (to ensure all information is cleared from the gps engine).

3. Boot back in xdandroid - xtra.bin is inserted automatically shortly after bootanimation is over. If you have booted with GPS on and this lib, and you run logcat, you should hopefully see something like this in your logcat:

Code:
02-12 00:23:34.985 D/gps_rpc ( 1312): pdsm_xtra_set_data(0, 1f40, 0, 0x40b2b568, 400, 57, 100, 1)=1
02-12 00:23:34.985 D/gps_msm7k( 1312): gps_xtra_inject_xtra_data: inject part = 58/100, len = 400
4. Test: Either use google maps, or a gps testing app from the market. I like Gps Status.

Additional Information:

Currently, xtra.bin is downloaded every time you reboot into Android provided that GPS was checked as ON when you were booting the device. If you would like to inject it manually, you can use tytung's excellent aGPS Injector App (again, need to make sure GPS is checked ON in Settings when trying to inject xtra.bin manually).

Known issues:

1) I *think* currently accuracy is being computed incorrectly. Need to look into it a bit further, but yeah don't put too much stock in the accuracy information.

Download:
02-12 gps.xdandroid.so

Last edited by detule; 03-08-2012 at 11:23 PM.
This post has been thanked 3 times.