Post Reply

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

OP bariz143

7th May 2014, 02:10 AM   |  #1  
bariz143's Avatar
OP Senior Member
▂ ▃ ▅ ▆ █
Thanks Meter: 317
 
1,653 posts
Join Date:Joined: Dec 2009
More
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.
7th May 2014, 02:42 AM   |  #2  
theesotericone's Avatar
Senior Member
Thanks Meter: 333
 
614 posts
Join Date:Joined: 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.
7th May 2014, 03:17 AM   |  #3  
bariz143's Avatar
OP Senior Member
▂ ▃ ▅ ▆ █
Thanks Meter: 317
 
1,653 posts
Join Date:Joined: Dec 2009
More
Quote:
Originally Posted by theesotericone

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
7th May 2014, 10:06 PM   |  #4  
Senior Member
Thanks Meter: 64
 
125 posts
Join Date:Joined: Apr 2012
AOSP Build That Works With GPS
Quote:
Originally Posted by bariz143

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.
Last edited by KedarWolf; 7th May 2014 at 10:09 PM.
The Following User Says Thank You to KedarWolf For This Useful Post: [ View ]
8th May 2014, 12:01 AM   |  #5  
bariz143's Avatar
OP Senior Member
▂ ▃ ▅ ▆ █
Thanks Meter: 317
 
1,653 posts
Join Date:Joined: Dec 2009
More
Quote:
Originally Posted by KedarWolf

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.
27th May 2014, 09:41 PM   |  #6  
Junior Member
Thanks Meter: 1
 
2 posts
Join Date:Joined: 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.
1st June 2014, 03:17 PM   |  #7  
bariz143's Avatar
OP Senior Member
▂ ▃ ▅ ▆ █
Thanks Meter: 317
 
1,653 posts
Join Date:Joined: Dec 2009
More
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?
1st June 2014, 08:04 PM   |  #8  
Senior Member
Flag Amsterdam
Thanks Meter: 218
 
942 posts
Join Date:Joined: May 2010
More
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!
The Following User Says Thank You to mbroeders For This Useful Post: [ View ]
1st June 2014, 09:52 PM   |  #9  
Junior Member
Thanks Meter: 1
 
2 posts
Join Date:Joined: 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: [ View ]
2nd June 2014, 03:40 AM   |  #10  
bariz143's Avatar
OP Senior Member
▂ ▃ ▅ ▆ █
Thanks Meter: 317
 
1,653 posts
Join Date:Joined: Dec 2009
More
I am going to try this for sure. Hope it workes for me to. Thank you guys.
Last edited by bariz143; 4th June 2014 at 12:39 AM.

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

Advanced Search
Display Modes


Top Threads in Nexus 5 Q&A, Help & Troubleshooting by ThreadRank