yashsingh1/xdaforums huggingface dataset:
[Moto G4 Play Questions & Answers] ashishwebmail:
Is it really a software issue?

Why everyone here is making this as a software issue? For mine touching to the Harpia Gps gives good signal and accuracy thus its simply a hardware issue

---------- Post added at 10:33 AM ---------- Previous post was at 09:46 AM ----------

As I am seeing other's replies here, I guess many are thinking of it as a software issue. How could it be? You will get the answer now.

As I have said earlier about the Harpia GPS, I again did an experiment and it worked.

I pulled out the back cover and also a nut just beside the Harpia GPS device.

I twisted a small wire of about 1 and a half cm long copper wire and tried to put some part of it in the place where the nut was before like this -

Model - moto g4 play; fixed a wire in the place of nut

=>pic1

After then I put the cover back.

=>pic2

Now this is the screenshot when I was on the roof and the peeping wire was left untouched.

A screenshot of GPS Test App.

=>pic3

And this was the difference when the wire was touched by me.

SNR of GPS satellites almost all above 30

=>pic4

The definition of icons:

Circle - GPS

Triangle - GLONASS

Rhombus - SBAS (?)

As replied by many, yes, the device refuses to use most of the glonass ones, and only one or two are used to fix.

69 70 and 71 glonass satellite index refused

=>pic5

You can also check the accuracy change from 55 to 3.

But irony is that, my father's mobile (Micromax Unite 3) only uses GPS and AGPS to fix (no glonass or any other),

and gives accuracy of 1 m (checked in same app - GPS Test) and SNR - more than 45 of almost all GPS satellites it is able to receive signal at a time.

Coming to my phone, I also want to share some screenshots of my Runkeeper app of the day before and after experiment.

1.

A day before experiment

=>pic6

2.

A day after experiment

=>pic7

Check the accuracy, and now no one could say that it is a software problem.
[Moto G4 Play Questions & Answers] mkollersms:
Sorry, but no. This is hedged COMPLETELY on a false premise. Of course the GPS is going to have its range increased by the application of a physical antenna. That is what antennae are designed to do. What you're asking is for us to mutilate our phones and essentially make it to where we can't use cases anymore. That is not viable at all, plus exposed metal of ANY kind is a risk not worth taking.

We decided to explore the software side because there is no reason that GLONASS shouldn't work. Motorola and Qualcomm advertise GLONASS support on this device. So yes, this is a SOFTWARE issue. Furthermore, we discovered that by modifying the gpsconf file a bit, we could optimize how the GPS chip in the phone was used. So again, the software is key.

Don't act like you're some genius and we're just idiots, when your "solution" is likely to cause far more harm to the chip in the long run.
[Moto G4 Play Questions & Answers] ashishwebmail:
Why are you exaggerating for the reply?

Where in the whole f****** reply have I asked anyone to do something or said anything about brains? Don't make yourself fool by your own words.

Of course I agree there is a software issue that the device is not using Glonass for 3d fix, but according to my conclusion there is hardly any need.

But on what conclusion, you can ask freely?

As I have stated before about my father's mobile (uses only GPS satellites and A-GPS ). It gets a fix within 2 secs. I am attaching some screenshots that I have taken from it on the roof. The screenshot is of GPS Test App available in playstore.

Now I will explain the picture one by one.

pic1 : roof

Note the SNR of sat#-31 = 41

Note the SNR of sat#-10 = 36

(max = 41 ; min = 36) : Moto G4 Play hardly gives signal above 35. 41 is absolutely rare.

Color : All green ones

pic2 : roof

(max = 43 ; min = 34) : I may have seen only one or two times SNR crossing above 43 in g4p, even after touching the antenna.

Color : All green ones again

pic3 : roof

(max = 48 ; min = 24) : This is beyond the limit for my mobile. I can't imagine g4 play giving this figure.

Color : All green again except one or two.

pic4 : indoor

(max = 35 ; min = 16) : I just neglect that I have a GPS in my mobile when I am indoor. But this mobile is still receiving good signal.

Color : Two green, four yellow, 5 orange

p.s. : Today is cloudy day.

Final conclusion : Along with this, you can also check something - Accuracy.

1m in all first 3 pics. 1 meter? seriously? OK can be accepted.

But 2m accuracy indoor is really an irony. Moto G4 Play gives accuracy of a maximum of 3m when on the roof, touching the antenna. Whereas my father's mobile has no external manufactured or custom developed antenna but has a flip cover along with it.

Now brother, tell me is there any need of GLONASS?

OK suppose one day you came to the solution and fixed it. What will you do with it if the device still is not getting good signal?

Will GLONASS give you 1 cm accuracy or what? Think of it.

I think that there is some manufacturing defect in my mobile and I will go to service center for a fix.
[Moto G4 Play Questions & Answers] nick_white:
The only differences between yours and my stock one are in commented lines (starting with #).

Did you modify something in the non-commented lines when compared to your stock file?
[Moto G4 Play Questions & Answers] mkollersms:
I activated Intermediate Position report and lowered its threshold from 5000 to 3000. After doing some research, I concluded that this would provide a more accurate lock with respect to connection time. I also enabled NMEA provider, and changed the NA NTP server for increased regional accuracy. I didn't see any reason to dive further than that. The default XTRA servers and SUPL are fine.
[Moto G4 Play Questions & Answers] nick_white:
You modified those, but the lines are still commented (#), so they are ignored...
[Moto G4 Play Questions & Answers] mkollersms:
Are you sure? Because these were modifications others have made to the gpsconf on their devices, and like I said, they did have an effect when GPS Status referenced them.

EDIT: I went into File Manager to verify this, and the language your referring to applies to prop files but not conf files. In prop files, parameters are in blue and comments are in green. In conf files, there is no annotation; all text is read verbatim by apps such as GPS Status.
[Moto G4 Play Questions & Answers] nick_white:
Are you sure? Because I checked the source code (https://android.googlesource.com/pl.../server/location/GpsLocationProvider.java#611), and the file is treated just like any other Java properties file (where anything beginning with # is a comment):

private static final String PROPERTIES_FILE_PREFIX = "/etc/gps";
private static final String PROPERTIES_FILE_SUFFIX = ".conf";
private static final String DEFAULT_PROPERTIES_FILE = PROPERTIES_FILE_PREFIX + PROPERTIES_FILE_SUFFIX;
...
loadPropertiesFromFile(DEFAULT_PROPERTIES_FILE, properties);
...
properties.load(stream);
[Moto G4 Play Questions & Answers] mkollersms:
That makes no sense, because every conf file on the device would be treated as commented space from top to bottom.
[Moto G4 Play Questions & Answers] nick_white:
The comments are single line comments.

There are lines in the file that are not commented, for example "CAPABILITIES=0x37", and I also found other gps.conf examples in other threads that have a lot of lines that are not commented.
[Moto G4 Play Questions & Answers] mkollersms:
That cannot be correct. A) The ROM's file manager contradicts what you are saying. 2) GPS Status would not work if what you're saying is true.
[Moto G4 Play Questions & Answers] nick_white:
Which ROM are you talking about, the stock one? What does the file manager app has to say about "conf" file comments?

What measurable, reproducible difference can be seen in GPS Status when modifying the commented lines? What do you mean by not working? I don't have the commented lines modified and it still works. I can also try with all comment lines removed.
[Moto G4 Play Questions & Answers] mkollersms:
Go back and reread my posts. This is Lineage 14.1 which uses the CM file manager that is in literally all CM based ROMs. I already mentioned that the file manager can read the syntax of these files. What you are saying applies to prop files but not conf files. And furthermore, why would nearly EVERY setting in EVERY conf file be commented? It's not just this device; it's LG devices and HTC devices which are set up with this kind of formatting.

Before the changes were made, the GPS would not maintain a lock over time, particularly in rural areas. It would go from 7 satellites to 0 to 9 to 0 to 4 to 0, losing fix every few minutes. Once the file was modified, the number of satellites never dropped below three. And again, in order for GPS Status to fetch XTRA data, it has to reference code from the "commented" lines you're referring to. The app would fail if it were unable to do this. It would give a lock that is wholly inaccurate.

Look, I'll make one more set of edits tonight. I'll remove all of the pound symbols from the file that you argue should not be there. And I'll give it one more test. If the performance does not change, then I'm sticking to my current theory. Feel free to disregard it if you want, but I spent quite a bit of time on this for your guys' sake.
[Moto G4 Play Questions & Answers] mkollersms:
Before I do anything else, allow me to indicate that it was the same route, worse weather, night instead of day, same level of interference, same hardware conditions, same software. And the GPS was better after the change. This is a 100 mile stretch of road that I travel multiple times per month, so there were plenty of times I attempted to field test this. Also, as you'll see in my screenshots, I decided to litmus test what you said and removed the pound symbols next to the fields I changed. The program didn't seem to read them any differently than when those symbols were in place.

But what you are saying is incredibly contradictory. You inside that the OS itself is reading the files one way, and that its editor is reading them as if it's an entirely different language. If conf files are read EXACTLY as prop files are, then the editor itself would not be able to distinguish between them. Not to mention that if they were read the same, 99% of these files would be nothing more than junk info and we would have been barking up the wrong tree from the getgo. That or every phone manufacturer on this planet is just a moron, which I sincerely doubt.
[Moto G4 Play Questions & Answers] nick_white:
How do you know how the program (which one, GPS Status?) reads them? I deleted those lines and GPS Status + MapFactor behaved exactly the same as with them. Did you try removing them?

There is nothing contradictory:

That editor is a plain text editor. It has syntax highlighting, and it's according to the file extension. If you rename "build.prop" to "build.prop.conf", it will highlight just like "gps.conf". If you rename "gps.conf" to "gps.conf.prop", it will highlight it just like "build.prop". It's also worth mentioning that the lines you said have effect are highlighted exactly like the explanatory comments above them. It makes sense, because both are comments that are meant to be ignored.

But how the editor highlights or even the file extension is completely irrelevant to how the OS itself is reading the contents of the file. And the OS interacts with the GPS, not the file manager. The file manager is a red herring. It highlights the ".conf" file just like any other text file for whos extension it has not special highlighting (like it has for ".prop" and probably "xml" and others).

Those comments are more than junk, some are for the developers to read (not the OS), some may be temporarily commented, some are forgotten stuff, some are just copy-paste cruft...

Developers / manufacturers are not perfect, you can tell by the ever-existing bugs, the outdated comments (1 instead of 2, 5 instead of S) etc. And no one is saying "not perfect" => "moron", no need to doubt...
[Moto G4 Play Questions & Answers] nick_white:
Actually, I even deleted everything except for the uncommented lines, so no XTRA lines:

ERR_ESTIMATE=0
DEBUG_LEVEL = 2
CAPABILITIES=0x37

And GPS Status still fetched aGPS data, no error, and the accuracy is 4-10m...

I don't see any error in that screenshot, nor any mention of XTRA data (or lack of)...

OK... let me explain:

1. Create a file called "sample.prop" and put this inside it:

# Some explanatory comment
KEY=123
#COMMENTED_KEY=456

2. Then run this java class:

package computing101;

import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

public class ExtensionDoesntMatter {

// This should point to the folder where you created the file.
private static final String FOLDER_PATH = "C:\\";
// Don't forget to update this after you change the file extension.
private static final String FILE_NAME = "sample.prop";

public static void main(String[] args) throws IOException {
Properties properties = new Properties();
FileReader fileReader = new FileReader(FOLDER_PATH + FILE_NAME);
try {
properties.load(fileReader);
} finally {
fileReader.close();
}

// 123
System.out.println(properties.getProperty("KEY"));
// null, since the line is commented
System.out.println(properties.getProperty("COMMENTED_KEY"));
}
}

It would work just like "properties" files do.

3. Now change the extension of the file, from "sample.prop" to "sample.conf" or "sample.jpeg" (definitely not a prop file extension...). Also update the constant in the Java class.

4. Run again.

5. Computing 101. Fie file is "read identically by the operating system/application". qed

If you would find the issues outlined above in the CyanogenMod source code (the one you clearly benefit from), would you also consider those devs morons?...
[Moto G4 Play Questions & Answers] mkollersms:
No satellites listed. None. After aGPS data was downloaded.

You know what? I'm done. It has been two days of arguing with you over this, but since you are CONVINCED that modifying the file makes NO DIFFERENCE, go ahead and do whatever you want. If you want to mutilate your device like the other person in this thread, go right the hell ahead. If you want to run fastboot erase and risk corrupting your network, as has happened to COUNTLESS other people on XDA, not my problem.

I spent a MONTH on this project, throwing every conceivable solution at your problem, in an attempt to find something suitable that wouldn't risk compromising the device. I looked through multiple sites and discussion forums, the configuration files of other manufacturers, and ran test after test in order to document what I could. If you can't accept that, then don't make a thread asking for help.
[Moto G4 Play Questions & Answers] nick_white:
OK, but if those lines are required for the satellites to be listed, why do I still get them, although I removed those lines?

Could you attach an example of a file that causes what you say? Are the commented lines scrambled up, or the non-commented ones?

It could be a difference due to CM. I also checked the CM 14.1 source code, it also treats the file the same: https://github.com/LineageOS/androi...rver/location/GnssLocationProvider.java#L1031

I'm not convinced that modifying the file makes no difference, I'm just not convinced (yet) that modifying the commented lines of the file makes any difference.

And I appreciate your effort, but don't expect people to unquestionably accept the solution, especially if it looks like it contradicts known and readily-available facts - like properties file specs, Android source code etc. It can certainly be that the contradictions are only apparent, but the moment to concede that is after they are resolved. Otherwise, it's just anecdotal, like "I danced, and then it rained".
[Moto G4 Play Questions & Answers] mkollersms:
Oh, cut the crap. The moment you decided to generate a proof specifically for the purpose of TAKING ME DOWN A PEG, it shows you aren't invested in finding a solution; you just want your ego stroked. Or did you think calling your code "Computing 101" was somehow cute?

For the record, if I'm wrong, then I'm wrong. But if I'm wrong, you have to acknowledge that we are literally back to square one. Oh, and another thing, if multiple people hedge their logic on the same observations, either they are all idiots or none of them are. That's how this works. There is no partial credit.

I'm unsubbing.
[Moto G4 Play Questions & Answers] nick_white:
I started the topic, before you started replying, you're taking it too personal...

There were previous doubts about the commented lines before I started mentioning them, I just wanted to clarify - since the previous ones weren't answered:
[Moto G4 Play Questions & Answers] jsday187:
Comments (#) instruct the OS to ignore what follows it on that line. With the exception of a shebang? Or is that ignored also? hmmmm....
[Moto G4 Play Questions & Answers] BigNaes:
I wanted to just post the fix that works for me. I could NEVER get a GPS lock in GPS Toolbox and constant drops in maps. I had similar GPS issues on my Nexus One and remember that flashing the radio again would fix the GPS.

I saw this post by Q9Nap https://xdaforums.com/g4-play/development/fxz-harpia-twrp-flashable-fastboots-t3554840 and decided to try flashing one.

After flashing, my GPS works flawlessly. Near instant lock and no drops. I am on an XT1601 with Lineage OS nightlies. The radio that I flashed from the above post is MPIS24.241-15.3-7

Hopefully this helps somebody else, and please pass your thanks on to Q9Nap.

I am not an expert and not responsible for anything that happens. In fact I am not even sure I chose the right radio for my device but I've had 24hrs of flawless performance. I felt comfortable trying a radio listed given there is no bootloader or gpt included.

EDIT: I seemed to have jumped the gun a bit and still occasionally have some drops. My performance is MUCH improved but I do still have some issues and felt I should update accordingly.
[Moto G4 Play Questions & Answers] JerseyDude:
I just went to Verizon and asked about this issue and their fix was removing the battery and replacing it (basically a cold boot). I only drove 4 miles home so I can't say if that fixed things or if the battery wasn't the issue, that the antenna connection inside the cover as discussed above was jostled enough during the battery removal and install that THAT was fixed. We'll see.

GPS as an Uber driver is kinda critical to my performance.
[Moto G4 Play Questions & Answers] Wocli:
I just got my phone back from the store yesterday after repair. The repair log mentioned a software update, but no specifications. I noticed some extra apps (Prip, My Consumer Cellular) after a factory reset. They weren't there before, so they must have installed something.

So far GPS has been performing better, I'll keep you posted.
[Moto G4 Play Questions & Answers] BigNaes:
Another update after a couple days of testing. I have tried pretty much all the radios I mentioned in my previous post on this topic. I DID NOT try the Amazon or Verizon radios listed. Each radio gave me varying levels of GPS performance, ranging from "not working at all" to "working great" which describes the current radio I am using.

Originally I tried flashing MPIS24.241-15.3-7 which gave me working GPS (fixing to sats, quick locks) but I still noticed I had some drops in Maps and in GPS Toolbox. Many of the other radios I tried were not able to find a lock, even after waiting ~30 minutes or so with GPS Toolbox open after flashing.

I have now been on MPI24.241-15.3 for 48 hours and seem to be having great GPS performance. My testing has been a bit more aggressive, in the sense that I have been using maps to "Navigate" everywhere I have gone in the last 2 days while watching the satellites in GPS Toolbox. In the last 48 hours, I have monitored my GPS lock for over 6 hours, and additionally been checking for a lock periodically while not travelling. I have been able to find a lock every time in my test and had ZERO drops while doing any navigating (maps or gps toolbox). In one instance it took about 2 minutes to get my initial lock but I had poor cell reception in general at that location so I am hesitant to put too much weight on that.

Once again I am using an XT1601 in Canada, on Lineage OS nightlies. I plan to update my post or this thread at least once more, hopefully to say that this is a final solution for me. In any case, I look forward to seeing if there is any radio performance boost when the Nougat update rolls out, fingers crossed.

TL,DR; I strongly suggest trying different radios posted in the below thread and see if any of them give you improved performance. All radios performed differently for me, so try them all if you are having issues.

Note: I DID NOT try the Verizon or Amazon radios. In the interest of "better safe than sorry", I decided I would not try them as I do not have either an Amazon or Verizon device.

Link: https://xdaforums.com/g4-play/development/fxz-harpia-twrp-flashable-fastboots-t3554840

Disclaimer: I'm just a guy with a phone trying to make stuff work, I am not a professional. I am not responsible for anything that happens etc.
[Moto G4 Play Questions & Answers] seven21075:
Hy,

ive just emailed with the Motorola Support (in german) and they have sent me this

Wich means "our products do not support the russian glonass technology."
[Moto G4 Play Questions & Answers] mkollersms:
Can someone please report them to the FTC and FCC? Because if you won't, I will.
[Moto G4 Play Questions & Answers] seven21075:
I think you shouldnt because on the motorola homepage the specs of this mobile phone say Location Services: A-GPS. They dont write GLONASS.
[Moto G4 Play Questions & Answers] mkollersms:
I did anyway, because 1) Qualcomm lists this feature on the 410, 2) there's a myriad of negative reviews for this device already, and 3) the phone recognizes GLONASS satellites, it just flat out refuses to connect to them. There are a million devices that have used this CPU, all of which are cheaper than the G4 Play, and all of which have this functionality. So why not this model?
[Moto G4 Play Questions & Answers] BigNaes:
Quick update to my findings.

I am close to giving up. I have narrowed the problem down to GPS losing location when 3g data is in use. The problem does not seem to be exclusive to this device, many people have the exact same issue on the OnePlus 3, Nexus 5 and other devices. No combination of radios, gps.conf files or anything I have tried has solved the problem completely.

So far, I can get a flawless GPS lock when using GPS Toolbox, and the GPS lock will stay fixed until there is some usage of 3g data. I have been testing this in many ways but generally just opening a youtube video while having maps run a navigation (and gps toolbox showing fix/sat in notifications). My GPS lock will immediately drop as soon as the youtube video starts to load and gps will not come back until the 3g data is no longer in use.

This is obviously a huge issue as stuff like satellite view in maps, traffic updates and unsaved routes will use data and cause the GPS signal to be lost. While connected to wifi, I have 0 gps drops when using data/youtube etc.

I still have not tested on the stock rom again, I have not tested using 2g data (i dont have lte/4g). There are many posts with this exact issue from people with other phones (on xda and elsewhere). Some users with the OnePlus 3/T said that their gps drops were fixed upon the official update to nougat (fingers crossed Moto can do the same for us).

Aside from my findings, I do not have a real solution. Obviously I can say GPS works when data is not in use, but I hardly find that to be a solution. In any case, this is the progress I have made. Please let me know if you guys are experiencing the same, GPS drops when cellular 3g data becomes active.