Lollipop Leak for Sprint Galaxy S5, TWRP for Micromax Canvas Magnus – XDA TV

Android 5.0 Lollipop has been leaked for the Sprint … more

Velocity is Like OpenTable on Steroids

We all enjoy a night out with friends or our significant other from time to time. However, there is … more

Android Lollipop Lands for the Sony Xperia Z Ultra

The undisputed king of the beasts–at least in Sony’s current stable,is the … more

Android 5.0 Lollipop in 3D–EVO 3D, That Is!

It is that time of the year once again. Flowers bloom (or snow falls, depending on which … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Understanding Android GPS Architecture

OP greatanjum

24th December 2012, 07:15 AM   |  #1  
OP Junior Member
Thanks Meter: 56
 
10 posts
Join Date:Joined: Nov 2012
Plz see the Attached GPS Architecture diagram 1st before reading below Article:
Location Services using GPS in Android consist of following Architectural Components

1) GPS Chip
2) GPS Driver
3) GL Engine
4) Android Framework
5) User Applications

Now Lets Understand each

GPS Chip: Radio Frequency Receiver that directly communicates with GPS Satellites

GPS Driver: GPS Driver System Software that uses Low level API’s to Communicate with the GPS chip, at the system level it may consist of a single or multiple files located at /System/Lib/hw/ Or /Vendor/Lib/hw/ files names usually starts with Prefix GPS and Postfix So (i.e gps.default.so or gps.aries.so e.t.c) depending upon the Android version and Smartphone Platform.

GL Engine: Actually the heart of this overall system.
At System level it consist of files at Path /system/bin with names like glgps or gpsd (Platform Specific)
It works using the Configuration Parameters which consist of .xml and .conf files (i.e glconfig.xml, gps.xml, Jupiter.xml, gpsconfig.xml and gps.conf, secgps.conf e.t.c). The Physical Location and names of files again depends upon Android version and Platform, but they are mostly at (/system/etc , /system/etc/gps , /vendor/etc/, /data/gps e.t.c), depending upon the Configuration and Platform, it takes initial Location Information from Cell Towers, then it take it read NVRAM , it is most important as here it store assistance data from GPS Lock, and it may also use xtra data.
NVRAM information is mostly location at /data/gps in a file with .sto ext (i.e gldata.sto) and xtra data files (lto.dat, xtra.bin, epo.dat e.t.c Platform dependent),
Using all this information Gl Engine instruct / Assist the GPS Driver, mostly Gl Engine is able to Detect multiple GPS satellites for which it is GPS driver is Programmed, but to Lock it need some extra information (Timing, Alm. / Emp.e.t.c) which it could either download from GPS satellites (Standalone Mode: very slow speed bits/sec.) or it could use internet to access SUPL/NTP servers (MS Based/MS Assisted Fast speed MB/sec.)
After all this activity, it saves all the data in NVRAM for future use.

Android Location Services : It consist of Android Framework Classes like Location Manager that Provide services to the use applications using the GL Engine.

User Applications: Location services Applications like Google Maps, Sygic, Navigon , TomTom e.t.c.

Keeping all this information in mind now lets see how the GPS Faster Fix Solutions in Market do.
Faster Fix Solutions like GPS Status & Tool Box, GPS Test, GPS Doctor e.t.c mostly handle two things.

1) Download XTRA Data (lto.dat , xtra.bin , epo.dat, gldata.sto e.t.c)
2) Modify GPS.conf (Root Required)

But this not always works.
Devices uses Google as Supl Server but most devices are unable to use it due to invalid/expired certificates and Google servers rejects the Assistance requests in such scenario Users should use SUPL.NOKIA.COM:7275 , which although slow (but something is better then nothing)
If something is wrong with GL Engine or GPS Driver, it may need Re flashing but a little could be done if GPS Chip Reception is Low or Problem is at Hardware Level, some time need soldering skills for hardware alteration (Risky)
http://forum.xda-developers.com/show....php?t=1318892

The Other Configuration Parameter which users could modify is xml Configuration file( Take Backup 1st) at Least a Programmer could get Debug Log to understand where things are going wrong, using below parameters.

cLogEnabled="true" acLogDirectory="/sdcard/gps" and LogPriMask, LogFacMask and also DEBUG_LEVEL (gps.conf)

Hope everyone could easily improves their GPS Performance using this guide for any platform.
Attached Thumbnails
Click image for larger version

Name:	Architecture.JPG
Views:	5618
Size:	25.4 KB
ID:	1587892  
Last edited by greatanjum; 24th December 2012 at 08:02 AM. Reason: Adding Detail
The Following 50 Users Say Thank You to greatanjum For This Useful Post: [ View ]
24th December 2012, 12:36 PM   |  #2  
dewadg's Avatar
Senior Member
Flag Denpasar
Thanks Meter: 272
 
309 posts
Join Date:Joined: Jun 2012
Donate to Me
More
Wow, thank you, this is very useful!
29th December 2012, 11:21 AM   |  #3  
RknDroidFreak's Avatar
Senior Member
Flag Pokhara
Thanks Meter: 46
 
177 posts
Join Date:Joined: Jul 2011
More
Neat! Thanks!
29th December 2012, 12:48 PM   |  #4  
Senior Member
Thanks Meter: 8
 
109 posts
Join Date:Joined: Sep 2010
hi

can you please explain the extensive location settings from google maps ... i searched google's help and i'm still confused.

for eg, what is the difference between "report from this device" and "enable location history"?

i guess they generate the trafic info using the data from our phones ... how?

thanx!

Happy Holidays! and Happy New Year!
29th December 2012, 01:49 PM   |  #5  
ak074's Avatar
Senior Member
Thanks Meter: 107
 
311 posts
Join Date:Joined: May 2011
Quote:
Originally Posted by jean2323

hi

can you please explain the extensive location settings from google maps ... i searched google's help and i'm still confused.

for eg, what is the difference between "report from this device" and "enable location history"?

i guess they generate the trafic info using the data from our phones ... how?

thanx!

Happy Holidays! and Happy New Year!

'report from this device' is used in latitude. latitude allows you to share your location with your 'friends'. 'enable location history' is for you only and keeps a record of everywhere you go. or at least thats my understanding of it. hope this helps
30th December 2012, 04:01 PM   |  #6  
Thanks for this "sort of" schematic! Keep on making some new schematics!
30th December 2012, 04:47 PM   |  #7  
Member
London
Thanks Meter: 1
 
59 posts
Join Date:Joined: Jan 2011
More
Thumbs up
Dude i dint think ill tamper with gps in my life but the info you provided is just to simple and cool. thanks
30th December 2012, 05:06 PM   |  #8  
reinbeau's Avatar
Retired Forum Moderator
Flag South of Boston, MA
Thanks Meter: 4,692
 
7,373 posts
Join Date:Joined: Sep 2010
More
Quote:
Originally Posted by mbbauk

Dude i dint think ill tamper with gps in my life but the info you provided is just to simple and cool. thanks

I agree. I've always enjoyed learning about gps starting from my Garmin iQue days. After suffering with the Captivate and that horrible gps it's nice to have a phone with fantastic gps and the ability to truly use it. Good stuff here!

Sent from my SG Note i317 via XDA Premium...I eat apples, not use them.
The Following User Says Thank You to reinbeau For This Useful Post: [ View ]
30th December 2012, 05:22 PM   |  #9  
best98's Avatar
Member
Flag Philly
Thanks Meter: 12
 
66 posts
Join Date:Joined: Aug 2006
Donate to Me
More
Hi

Speaking about GPS, is there any onchip limitation regarding the speed or location that it should grab GPS signal ?

Someone told me that it may not be possible to make it work in a plane because of US rules and security.. or around some sensitive FBI or Governments buildings (that may have signal killers) ?

Thanks
31st December 2012, 03:09 PM   |  #10  
Senior Member
Thanks Meter: 8
 
109 posts
Join Date:Joined: Sep 2010
Quote:
Originally Posted by ak074

'report from this device' is used in latitude. latitude allows you to share your location with your 'friends'. 'enable location history' is for you only and keeps a record of everywhere you go. or at least thats my understanding of it. hope this helps

first ... with both disabled ... maps and search still search your location .. which is strange ...
second ... if i enable location history, but not report from the device ... there is no history ! or i don't know where to find it ... cause, indeed it's not in latitute ... you can select "report from the device" without selecting history ... not sure if anything happens ...

Happy New Year!

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes