[FIX] Resloving GPS problems on Xperia M

Search This thread

Bonoboo

Senior Member
Dec 30, 2012
2,595
4,036
Ukraine
Redmi Note 10 Pro
Our phone have issues with GPS.

Firstly, antenna not so good.
Secondly, while long using GPS fix can permanently lost until you off an on GPS.

So using GPS for long time just impossible: recording track can stop and you will not notice that.
Also tracks quality are bad. Here example:

Red – phone in default non-modified state
Green – all fixes applied

bp4vtYJ.png
This is probably software bug and it affects all ROM's: all stock (new 4.3 too), CyanogenMod and based on it
Dual version affected too.

Confirmations: 1, 2, 3, 4 and a lot posts from disappointed users on other forums.

--------------------------

Here is complex solutions that really helps me.
But workarounds must be applied ALL to give you acceptable result.


For now all recorded tracks smooth and correct even in cloudy weather.
Please, share your results in thread.

Note: for quick obtaining GPS fix device must have internet access for downloading almanac and sync time (A-GPS)

1. Disable network location

When it's on and GPS in use phone collecting information about Wi-Fi and mobile base-stations around you and sends to Google for better positioning in future.
Somehow this in correlation with our problem: track goes ragged, sometimes you "teleporting" into different location.

This was confirmed in my test a lot times.
And what advantage in this if we already have precise coordinates from GPS?
So disable it:

For stock: Settings > Location services > untick Google's location service

For CyanogenMod and other custom ROM's: Settings > Location > Mode > select Device Only

8Axw3FL.png

2. Software workaround

UPD: application and Tasker profile was updated.
Now not required Secure Settings plugin and now supports Android 6.0 Marshmallow and higher.
But on 6.0 network location will be enabled after switching.

We just need to automatically regularly off and on GPS.
So bug with constantly lost fix just does not have time to appear – we preventively "rebooting" GPS. It's really helps.

Such shutdown doesn't causing gaps on track: last points just connecting. And then location determined instantly.
Surely you need to disable notification "GPS signal lost" in your track-recording / navigation app because it will be appears every 3 minutes.

Thanks to Tasker and App Factory I created standalone project as a separate application
It doesn't requires Tasker itself and haven't any settings: app just works in background.
To control GPS state required Root

Task configured to launch if GPS was manually on. When GPS off by you task stops.
Don't left it "on" if not use – task may affect battery!


Specially for that, who enables GPS only when need it.
Below provided same profile for Tasker, so you can optimize it for your requirements, e.g. starting by shortcut or other conditions.

How task works

1. Wait 2 minutes for sure good first fixing satellites
–– If after this time GPS still on – goto p.2
–– If GPS was off – task ends. Protection from accidental starting cycle
2. Disables GPS
3. Wait 5 seconds
4. Enabling GPS
5. Wait 3 minutes
–– If for this time GPS don't disabled manually – goto p.2
–– If GPS was disabled manually – task ends to next enabling
Installing
1. Download and install this app: Fix GPS (you need installed gapps!)
2. Launch it and allow root permissions
3. Now the application will autorun in background when phone boots

Notes
– If you want to disable app delete or freeze it
– App creates persistent service that don't affects battery if GPS off. Takes up 10-14 MB RAM
– Don't forget to add Fix GPS app into white-list of your task-killer and Stamina / Doze
– You can hide installed apps from launcher, no longer needed to interact with them

---------------------------------

And here Tasker profile if someone want to edit states for task activation for own needs.
Or you can create shortcut at homescreen to control fix manually. There's a lot of variants.

Installing
1. Download archive and extract XML file from it
2. Put file in /sdcard/Tasker/profiles/
3. Launch Tasker, tap on Tasks tab > Import > Fix_GPS.prf.xml
4. Manually start task "Fix GPS" and allow root permissions

3. Simple hardware addition to increase sensitivity of GPS receiver

Sensitivity of receiving a signal from the satellites we have lower than it could be
It seems cause is antenna: it small, located under the sticker in the corner of the camera.

In identical conditions SNR (signal-noise ratio) from satellites in Sony 20-30, in LG P500 – 30-40
This also causes regular deterioration of accuracy and artifacts on track.

So basing on this thread I created similar primitive "additional antenna".
This is anti-technical, but really helps a bit.

Result: additional 2-7 SNR points
Check this yourself with and without modified back cover using GPS Test app.

Installing
1. Cut strip of cooper foil with width approx. 4 mm. Internet says that aluminum foil gives worst results
2. Attach it using adhesive tape inside cover at camera hole as on photo below
3. Length - as you wish. Pieces can be connected lapped by making small incisions

yoEuoOU.png

4. Change settings for recording tracks

If your beloved app allow to change recording settings edit them similar as below.
This is make tracks more smooth and steady.
Here is for MyTracks

– Recording time interval: 4 s
– Recording distance interval: 20 m
– Max distance: 200 m
– GPS accuracy: 20 m

4971, 2088
 

Attachments

  • Fix_GPS.apk
    1.9 MB · Views: 4,984
  • Fix_GPS_Tasker_Profile.prf.zip
    930 bytes · Views: 1,833
Last edited:

Barua

Senior Member
Feb 29, 2012
188
56
I had teleporting problem about gps. I think it's because of google service.
 

MartyMantion

Member
Nov 10, 2012
43
16
I'm trying to install fix gps apk and getting error "app not installed". Any ideas on what could be the issue?
 

mikee286

Senior Member
May 29, 2012
112
4
Do all Sony xperia M have the same gps issues or are these issues just plaguing some people? I am thinking of buying this phone but I am a heavy gps user I use offline maps like Osmand and I can't have a gps that cuts out and doesn't regain connection.
 

MartyMantion

Member
Nov 10, 2012
43
16
Hmm, strange.
This will be clear if you record logcat in txt while installing APK and attach here.
Use app Logcat Extreme

UPD: Also, gapps installed (if you use custom rom) ?

I see, it depends on google maps. I do not have gapps installed (trying to live sans-google).


Code:
~>cat fixgps.log | grep gps
E/PackageManager(  742): Package fix.gps requires unavailable shared library com.google.android.maps; failing!
W/PackageManager(  742): Package couldn't be installed in /data/app/fix.gps-1.apk
I/InstallAppProgress( 9907): Finished installing fix.gps


---------- Post added at 07:02 PM ---------- Previous post was at 07:00 PM ----------

Do all Sony xperia M have the same gps issues or are these issues just plaguing some people? I am thinking of buying this phone but I am a heavy gps user I use offline maps like Osmand and I can't have a gps that cuts out and doesn't regain connection.

I got my second one and they both have this issue. First one I got used second one new. Both are C1904.
 

Bonoboo

Senior Member
Dec 30, 2012
2,595
4,036
Ukraine
Redmi Note 10 Pro
Last edited:

pre_fri

New member
Jan 2, 2015
3
1
gps works when charging...

hi, I observed that when my xperia M mod 2004 is charging (in the car...) it works fine.
just sharing....
 
Last edited:
  • Like
Reactions: Bonoboo

pre_fri

New member
Jan 2, 2015
3
1
the stamina mode

hi,
today I observed that if I turn off the stamina mode the gps works fine, and it was working properly wen charging because in this situation the stamina mode is turned off...
 

much1

Senior Member
Dec 10, 2010
116
18
Brno
Hello Bonoboo!
I am decided to push SNR to the limits, is there a way to find any conductive point of the antenna? I dont even seem to find the antenna itself! Maybe you have some pics of antenna or some pics with arrows :D I dont seem to find any materials on this model board.
Do you think it's worth doing it?
Thank you!
 
  • Like
Reactions: Bonoboo

Bonoboo

Senior Member
Dec 30, 2012
2,595
4,036
Ukraine
Redmi Note 10 Pro
is there a way to find any conductive point of the antenna? I dont even seem to find the antenna itself!
I dont seem to find any materials on this model board.
Do you think it's worth doing it?
Hi,
Open battery cover – antenna located in left corner, left and up from camera.
It's snake-shaped cooper foil integrated into "sticker" and it's part of back cover.
Be careful, you can damage it if start to unstick (I tried).
On other internal side two contacts that applied to board.

Antenna developed with working parameters: frequency, length of wave etc.
So deep changes may cause worth signal strength.

Anyway, if you decide apply some modding please share your experience here.

P.S. Just for info: service docs
 
Last edited:

himu_joy

Senior Member
Sep 11, 2011
596
149
BD
Moto G
Xiaomi Redmi 4X
nokia here!!!

I was facing same not working gps experience on my CM11. tried some gapps to fix that.. no result. lastly nokia here fixed that problem without any gapps, fixed as a standalone apps.:good:
 

much1

Senior Member
Dec 10, 2010
116
18
Brno
Restart GPS using shell?

Hello,
can someone please point me out, how can I start/stop gps using shell? (Lets assume I have root shell)
or if this is not possible, whats my best go?
Thanks a lot
 

Bonoboo

Senior Member
Dec 30, 2012
2,595
4,036
Ukraine
Redmi Note 10 Pro
how can I start/stop gps using shell?
This work on any ROM, except Android 6.0 and newer.

Enable GPS only
Code:
content update --uri content://settings/secure --bind value:s:gps --where name="'location_providers_allowed'"

Enable network location only
Code:
content update --uri content://settings/secure --bind value:s:network --where name="'location_providers_allowed'"

Enable GPS and network location
Code:
content update --uri content://settings/secure --bind value:s:gps,network --where name="'location_providers_allowed'"

Disable all
Code:
content update --uri content://settings/secure --bind value:s:off --where name="'location_providers_allowed'"
 
Last edited:
  • Like
Reactions: mankokoma

xa.fr

Member
Jan 28, 2015
48
2
Has anyone figured out the optimal dimensions for the copper foil antenna or doesn't it matter?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    Our phone have issues with GPS.

    Firstly, antenna not so good.
    Secondly, while long using GPS fix can permanently lost until you off an on GPS.

    So using GPS for long time just impossible: recording track can stop and you will not notice that.
    Also tracks quality are bad. Here example:

    Red – phone in default non-modified state
    Green – all fixes applied

    bp4vtYJ.png
    This is probably software bug and it affects all ROM's: all stock (new 4.3 too), CyanogenMod and based on it
    Dual version affected too.

    Confirmations: 1, 2, 3, 4 and a lot posts from disappointed users on other forums.

    --------------------------

    Here is complex solutions that really helps me.
    But workarounds must be applied ALL to give you acceptable result.


    For now all recorded tracks smooth and correct even in cloudy weather.
    Please, share your results in thread.

    Note: for quick obtaining GPS fix device must have internet access for downloading almanac and sync time (A-GPS)

    1. Disable network location

    When it's on and GPS in use phone collecting information about Wi-Fi and mobile base-stations around you and sends to Google for better positioning in future.
    Somehow this in correlation with our problem: track goes ragged, sometimes you "teleporting" into different location.

    This was confirmed in my test a lot times.
    And what advantage in this if we already have precise coordinates from GPS?
    So disable it:

    For stock: Settings > Location services > untick Google's location service

    For CyanogenMod and other custom ROM's: Settings > Location > Mode > select Device Only

    8Axw3FL.png

    2. Software workaround

    UPD: application and Tasker profile was updated.
    Now not required Secure Settings plugin and now supports Android 6.0 Marshmallow and higher.
    But on 6.0 network location will be enabled after switching.

    We just need to automatically regularly off and on GPS.
    So bug with constantly lost fix just does not have time to appear – we preventively "rebooting" GPS. It's really helps.

    Such shutdown doesn't causing gaps on track: last points just connecting. And then location determined instantly.
    Surely you need to disable notification "GPS signal lost" in your track-recording / navigation app because it will be appears every 3 minutes.

    Thanks to Tasker and App Factory I created standalone project as a separate application
    It doesn't requires Tasker itself and haven't any settings: app just works in background.
    To control GPS state required Root

    Task configured to launch if GPS was manually on. When GPS off by you task stops.
    Don't left it "on" if not use – task may affect battery!


    Specially for that, who enables GPS only when need it.
    Below provided same profile for Tasker, so you can optimize it for your requirements, e.g. starting by shortcut or other conditions.

    How task works

    1. Wait 2 minutes for sure good first fixing satellites
    –– If after this time GPS still on – goto p.2
    –– If GPS was off – task ends. Protection from accidental starting cycle
    2. Disables GPS
    3. Wait 5 seconds
    4. Enabling GPS
    5. Wait 3 minutes
    –– If for this time GPS don't disabled manually – goto p.2
    –– If GPS was disabled manually – task ends to next enabling
    Installing
    1. Download and install this app: Fix GPS (you need installed gapps!)
    2. Launch it and allow root permissions
    3. Now the application will autorun in background when phone boots

    Notes
    – If you want to disable app delete or freeze it
    – App creates persistent service that don't affects battery if GPS off. Takes up 10-14 MB RAM
    – Don't forget to add Fix GPS app into white-list of your task-killer and Stamina / Doze
    – You can hide installed apps from launcher, no longer needed to interact with them

    ---------------------------------

    And here Tasker profile if someone want to edit states for task activation for own needs.
    Or you can create shortcut at homescreen to control fix manually. There's a lot of variants.

    Installing
    1. Download archive and extract XML file from it
    2. Put file in /sdcard/Tasker/profiles/
    3. Launch Tasker, tap on Tasks tab > Import > Fix_GPS.prf.xml
    4. Manually start task "Fix GPS" and allow root permissions

    3. Simple hardware addition to increase sensitivity of GPS receiver

    Sensitivity of receiving a signal from the satellites we have lower than it could be
    It seems cause is antenna: it small, located under the sticker in the corner of the camera.

    In identical conditions SNR (signal-noise ratio) from satellites in Sony 20-30, in LG P500 – 30-40
    This also causes regular deterioration of accuracy and artifacts on track.

    So basing on this thread I created similar primitive "additional antenna".
    This is anti-technical, but really helps a bit.

    Result: additional 2-7 SNR points
    Check this yourself with and without modified back cover using GPS Test app.

    Installing
    1. Cut strip of cooper foil with width approx. 4 mm. Internet says that aluminum foil gives worst results
    2. Attach it using adhesive tape inside cover at camera hole as on photo below
    3. Length - as you wish. Pieces can be connected lapped by making small incisions

    yoEuoOU.png

    4. Change settings for recording tracks

    If your beloved app allow to change recording settings edit them similar as below.
    This is make tracks more smooth and steady.
    Here is for MyTracks

    – Recording time interval: 4 s
    – Recording distance interval: 20 m
    – Max distance: 200 m
    – GPS accuracy: 20 m

    4971, 2088
    1
    gps works when charging...

    hi, I observed that when my xperia M mod 2004 is charging (in the car...) it works fine.
    just sharing....
    1
    Hello Bonoboo!
    I am decided to push SNR to the limits, is there a way to find any conductive point of the antenna? I dont even seem to find the antenna itself! Maybe you have some pics of antenna or some pics with arrows :D I dont seem to find any materials on this model board.
    Do you think it's worth doing it?
    Thank you!
    1
    how can I start/stop gps using shell?
    This work on any ROM, except Android 6.0 and newer.

    Enable GPS only
    Code:
    content update --uri content://settings/secure --bind value:s:gps --where name="'location_providers_allowed'"

    Enable network location only
    Code:
    content update --uri content://settings/secure --bind value:s:network --where name="'location_providers_allowed'"

    Enable GPS and network location
    Code:
    content update --uri content://settings/secure --bind value:s:gps,network --where name="'location_providers_allowed'"

    Disable all
    Code:
    content update --uri content://settings/secure --bind value:s:off --where name="'location_providers_allowed'"
    1
    Oh, you lucky ones

    Usually looks like the screenshot (btw the compass always shows at least 45 degrees wrong... don't care about that). If it stays like in the screenshot without changing for two minutes, nothing but rebooting helps. This way it was always, independent which ROM I used. Best results I get with full throttled NUI-Kernel. (You can use the device then to warm your hands :) that's good these days)
    So I tried this tasker thing but didn't work very well (at least for me - sorry - thank you so much for the work, Bonoboo!!) and I put in the additional antenna (but only aluminium - didn't find a good piece of copper yet and didn't want to spend 10 EUs for a big packet I'll never use again in my life). Sometimes it feels better, but I think it's kind of placebo (as all these RAM-Tweaks - again another story - LOL) But I'm sure, Copper will do it!
    However, Bonoboo's thread inspired me to try it with a script, you can run with smanager. I have put it as smanager-widget on the desk.
    It starts OSMAND and GPS and switches off and on again GPS every 128 seconds (best results with that interval). When you kill OSMAND it will turn off GPS after next loop. That's all it does. And yes, I'm quiet sure to be one of the worst coders the world has yet seen :cowboy:
    I would like to get it checking if the GPS-Status is fixed and only switch if fix is down, but have no idea how to... Maybe one of the genius here can do it for us...