Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,783,072 Members 45,067 Now Online
XDA Developers Android and Mobile Development Forum

[Q] AOSP build from SOURCE. Network Positioning don't work. NEED HELP.

Tip us?
 
bariz143
Old
#1  
bariz143's Avatar
Senior Member - OP
Thanks Meter 310
Posts: 1,607
Join Date: Dec 2009
Location: ▂ ▃ ▅ ▆ █
Question [Q] AOSP build from SOURCE. Network Positioning don't work. NEED HELP.

Hi guys. Its like the 10th thread from me lately. Appreciate all the help getting from you.

I have compiled my first ROM and i had a lot of issues with it. And with your help a lot got fixed. The ROM works 99.9 %.

I only have one more problem with the ROM and its the NETWORK POSITIONING that seems to not working.

And i really need it because i use maps and weather app constantly. Without the NETWORK POSITIONING those apps don't work.

It just waits for gps all the time. I did compile CM11 and it works like a charm. But i dont want cm11

AOSP is more like my taste and i can add all the features i want without messing with CM11 pre compiled stuff.

So if someone could point me in the right direction would be very appreciated .

Cheers.
 
theesotericone
Old
#2  
theesotericone's Avatar
Senior Member
Thanks Meter 297
Posts: 574
Join Date: Sep 2013
If the build compiled without errors I'd first look at your APNs. If your getting cell service that should be enough to get location as well. Just some thoughts.
 
bariz143
Old
#3  
bariz143's Avatar
Senior Member - OP
Thanks Meter 310
Posts: 1,607
Join Date: Dec 2009
Location: ▂ ▃ ▅ ▆ █
Quote:
Originally Posted by theesotericone View Post
If the build compiled without errors I'd first look at your APNs. If your getting cell service that should be enough to get location as well. Just some thoughts.
My apns is correct and yes i have cell service of course
 
KedarWolf
Old
(Last edited by KedarWolf; 7th May 2014 at 10:09 PM.)
#4  
Senior Member
Thanks Meter 64
Posts: 124
Join Date: Apr 2012
Default AOSP Build That Works With GPS

Quote:
Originally Posted by bariz143 View Post
My apns is correct and yes i have cell service of course
http://forum.xda-developers.com/goog...linux-t2703036

This is my guide for the latest build of AOSP (KVT49L) with several bug fixes over the old 4.4.2 build. I just used 'GPS Test And Fix' app from the Play Store and the GPS finds 20 satellites and works in Google Maps. I did use the 'Reset GPS' and 'Download Xtra Data' options in the app and then GPS worked fine.

Hope that helps.

P.S. Often I have trouble when indoors with my Nexus 5 finding satellites so you might want to go outside and test see if the GPS works there.
The Following User Says Thank You to KedarWolf For This Useful Post: [ Click to Expand ]
 
bariz143
Old
#5  
bariz143's Avatar
Senior Member - OP
Thanks Meter 310
Posts: 1,607
Join Date: Dec 2009
Location: ▂ ▃ ▅ ▆ █
Quote:
Originally Posted by KedarWolf View Post
http://forum.xda-developers.com/goog...linux-t2703036

This is my guide for the latest build of AOSP (KVT49L) with several bug fixes over the old 4.4.2 build. I just used 'GPS Test And Fix' app from the Play Store and the GPS finds 20 satellites and works in Google Maps. I did use the 'Reset GPS' and 'Download Xtra Data' options in the app and then GPS worked fine.

Hope that helps.

P.S. Often I have trouble when indoors with my Nexus 5 finding satellites so you might want to go outside and test see if the GPS works there.

HI man. Yeah its your tutorial that I am using. I don't have gps issues I'm having network positioning issues. Now I am on stock ROM and when I open let's say Google Maps it knows where I am instantly. But when I use my OWN compiled ROM it just shows the country and not Street. I don't know how to explain but I hope you get it.
signature
 
xdajeyk
Old
#6  
Junior Member
Thanks Meter 1
Posts: 2
Join Date: Feb 2011
I am experiencing exactly the same problem with a fresh, clean, by-the-book, build of AOSP 4.4.2. I am on a Nexus 4 though.

GPS works perfectly, but Network Positioning (GPS disabled, or GPS enabled but indoors) doesn't. I have been trying to fix this issue for the past few days now, but have made no progress. Using either the 4.4.2 stock ROM or CM11, both GPS and Network Positioning work.

I am suspecting that the binary blobs are missing a file that is needed for network positioning to work, but I haven't been able to figure out which one.
 
bariz143
Old
#7  
bariz143's Avatar
Senior Member - OP
Thanks Meter 310
Posts: 1,607
Join Date: Dec 2009
Location: ▂ ▃ ▅ ▆ █
Yes and because of that I stopped development. I don't get it. I did as you said exactly by the book. I tried everything for a few days and then deleted everything. How did it go for you @xdajeyk?
signature
 
mbroeders
Old
#8  
Senior Member
Thanks Meter 218
Posts: 942
Join Date: May 2010
Location: Amsterdam
So, your problem reminded me of something i ran into a few years ago. I haven't build my own rom in a while, so i'm not sure sure whether this helps, but maybe it does:

Search for the lines in frameworks/base/core/res/res/values/config.xml that say:

Code:
 <string-array name="config_locationProviderPackageNames" translatable="false">
        <!-- The standard AOSP fused location provider -->
        <item>com.android.location.fused</item>
    </string-array>
And change this into:
Code:
<string-array name="config_locationProviderPackageNames" translatable="false">
        <!-- The Google provider -->
        <item>com.google.android.gms</item>
        <!-- The standard AOSP fused location provider -->
        <item>com.android.location.fused</item>
    </string-array>
That may fix your problem, it did for me a while ago. Good luck building!
Current devices:
Samsung Galaxy Nexus (gsm) - Asus Nexus 7 16 GB (wifi)
Old devices:
HTC Desire - Samsung Galaxy S2 - Motorola Xoom - Samsung Galaxy SIII
The Following User Says Thank You to mbroeders For This Useful Post: [ Click to Expand ]
 
xdajeyk
Old
#9  
Junior Member
Thanks Meter 1
Posts: 2
Join Date: Feb 2011
@mbroeders Thanks, that does indeed fix the problem. Actually, I found that solution a few hours ago by browsing around in the device tree sample inside the sources. The sample files contain an overlay file that does exactly the same. To keep in line with the sample, I also made the change inside the device tree at
Code:
device/lge/mako/overlay/frameworks/base/core/res/res/values/config.xml
. Or, @bariz143, for the Nexus 5 that file should be
Code:
device/lge/hammerhead/overlay/frameworks/base/core/res/res/values/config.xml
.

I did not, however, find a detailed explanation of what is actually going on here and why it doesn't work out of the box, so I tried to figure it out myself, mainly from the comments in that sample file and some googling around. I am recording my findings here because I believe it will help other Android n00bs like myself.
Apparently, the network location provider is not part of AOSP, but instead is distributed together with the Google Apps. To get network location to work, you need to tell the framework that it is OK to use location providers provided by Google. It does not do that by default, because they (obviously!) are signed with a different key than the one used to sign the AOSP you just built. So, by adding
Code:
<item>com.google.android.gms</item>
into config.xml, you are telling the framework that it's OK to use location providers that are signed with the same key as the APK that provides the
Code:
com.google.android.gms
app, which apparently is the app that contains the network location provider.
The Following User Says Thank You to xdajeyk For This Useful Post: [ Click to Expand ]
 
bariz143
Old
(Last edited by bariz143; 4th June 2014 at 12:39 AM.)
#10  
bariz143's Avatar
Senior Member - OP
Thanks Meter 310
Posts: 1,607
Join Date: Dec 2009
Location: ▂ ▃ ▅ ▆ █
I am going to try this for sure. Hope it workes for me to. Thank you guys.
signature

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes