android_device_meizu_meilan2
android_device_meizu_meilan2 copied to clipboard
GPS bug
On the latest release GPS fixes position hardly, and loses it easily. Tried every possible fix, AGPS resets, third party apps, etc.
Same for me at latest Los-14.1-oms. At 12.1 it was muuuuch better.
same here i think it was good at 14.03 but not in 14.04,05
http://4pda.ru/forum/index.php?showtopic=715935&view=findpost&p=61874892 - some logs
looks like GPS subsystem cannot update EPO data, because /data/misc/gps is missing
mkdir /data/misc/gps chown system:gps /data/misc/gps chmod 0755 /data/misc/gps
Should fix GPS. Or not :)
If the issue appeared recently, it would be great to understand what change(s) caused this. I've also noticed some issue with AGPS (something wrong with SSL/TLS) in those logs. Actually, there were seems just 1-2 active satellites seen (in the logs). Can this be caused by EPO issue?
I'm sorry, I cannot be of any help, I'm just a mere user, trying to help with feedback. But if you tell me what to do, I might be able to do so.
I've also noticed some issue with AGPS (something wrong with SSL/TLS) in those logs. Actually, there were seems just 1-2 active satellites seen (in the logs). Can this be caused by EPO issue?
A-GPS is the second (or first) problem. EPO just makes "cold" GPS start faster. GPS always start cold, because A-GPS does not work due to SSL issue.
GPS init chain looks like this:
- start A-GPS;
- trying to make connection to SUPL server (supl.google.com, according to /etc/gps.conf);
- if SUPL server unavailable, fallback to GPS;
- GPS cold start (5-30 min for TTFF).
/etc/gps.conf has 2 options for SUPL:
- SUPL_HOST=supl.google.com (correct);
- SUPL_PORT=7276 (incorrect, right value is 7275)
[ agent_007:satellite:~ 0 ] $ openssl s_client -connect supl.google.com:7276
CONNECTED(00000003)
140306579084944:error:140790E5:SSL routines:ssl23_write:ssl handshake failure:s23_lib.c:177:
no peer certificate available
No client certificate CA names sent
SSL handshake has read 0 bytes and written 293 bytes
New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.2 Cipher : 0000 Session-ID: Session-ID-ctx: Master-Key: Key-Arg : None PSK identity: None PSK identity hint: None SRP username: None Start Time: 1496229035 Timeout : 300 (sec) Verify return code: 0 (ok)
[ agent_007:satellite:~ 1 ] $ openssl s_client -connect supl.google.com:7275 14:10 pts/7 CONNECTED(00000003) depth=3 C = US, O = Equifax, OU = Equifax Secure Certificate Authority verify return:1 depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA verify return:1 depth=1 C = US, O = Google Inc, CN = Google Internet Authority G2 verify return:1 depth=0 C = US, ST = California, L = Mountain View, O = Google Inc, CN = supl.google.com verify return:1
Certificate chain 0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=supl.google.com i:/C=US/O=Google Inc/CN=Google Internet Authority G2 1 s:/C=US/O=Google Inc/CN=Google Internet Authority G2 i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA 2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
Server certificate -----BEGIN CERTIFICATE----- MIIEgjCCA2qgAwIBAgIIPHp8Ig0LPfcwDQYJKoZIhvcNAQELBQAwSTELMAkGA1UE BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl cm5ldCBBdXRob3JpdHkgRzIwHhcNMTcwNTI0MTcyNDQ5WhcNMTcwODE2MTcxMzAw WjBpMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEYMBYGA1UEAwwPc3Vw bC5nb29nbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsswy 4JDd2fqlxPZE2nJYY2nCYMDpYTq6sYLC1Cq3XeYQNeAzR5YCjBuiZqdLvjcNIp4t wmbNCRb2pbRS3Bl//mkdgtVM01rMzHGbiUknW/nM4yyMVVu9L7XKyFIJHlSurJBC UPtS+9RBhARLu64Oc1/Og1mL+UX426LzN4ucuccpuixrTBvOJ0xZxMi407x3Yw9n feVwUDy+HjsUU3xDLXWu7aq9AuajRplXMw2erpQSVKT32moBcMOwdjIEZ4JJQi5s AL9y1VEgzr+3lH1O/j8ZvsSuTGvmJ9o4MGdNW4MVlfmatM1schTeQrgGrwT5EAU4 yQi1+cergSyuxaTKvQIDAQABo4IBTDCCAUgwHQYDVR0lBBYwFAYIKwYBBQUHAwEG CCsGAQUFBwMCMBoGA1UdEQQTMBGCD3N1cGwuZ29vZ2xlLmNvbTBoBggrBgEFBQcB AQRcMFowKwYIKwYBBQUHMAKGH2h0dHA6Ly9wa2kuZ29vZ2xlLmNvbS9HSUFHMi5j cnQwKwYIKwYBBQUHMAGGH2h0dHA6Ly9jbGllbnRzMS5nb29nbGUuY29tL29jc3Aw HQYDVR0OBBYEFGjnQv5baqQiyN/uDOagprVUjgITMAwGA1UdEwEB/wQCMAAwHwYD VR0jBBgwFoAUSt0GFhu89mi1dvWBtrtiGrpagS8wIQYDVR0gBBowGDAMBgorBgEE AdZ5AgUBMAgGBmeBDAECAjAwBgNVHR8EKTAnMCWgI6Ahhh9odHRwOi8vcGtpLmdv b2dsZS5jb20vR0lBRzIuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQCaMYUetyTwkOee m+JVvI70N1FlIdfR4Tx609h8x8HHritL1N2EuFHdESNI1+/5kRMzLWd7cZ7tg4hD nmXx1N1kW1/HDeIXCD8FUbQsMQDJr4lWXTSztrXbv6LXQRolSkwkWVzJvJElbUX2 WNy+yGqwardi9SQJY8y2tjfmczKhzmQZ3JKpAIc3t0MFFvi5B+BNQvltfdlfwZdn rviLCXBRz7cS5+tO36RIDAeJ4LdNQ8g3mA8XqYBnZrKJ9Zoae5M9Daee/DGfCHhj vrKDh/fDw+u73xoDz2r28nbk6a5iLJAwRcZmMZnJktXUcgF2UxOmmeH8fGmJsN9/ 7Axf0rtU -----END CERTIFICATE----- subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=supl.google.com issuer=/C=US/O=Google Inc/CN=Google Internet Authority G2
No client certificate CA names sent Peer signing digest: SHA256 Server Temp Key: ECDH, P-256, 256 bits
SSL handshake has read 3785 bytes and written 419 bytes
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-AES128-GCM-SHA256
Session-ID: F1105829D3CE92ADF04C66721A7730C0EFFB676FA0CC44AB8D0B467F0E4117E3
Session-ID-ctx:
Master-Key: 76411FE62CC70EC0AFEF37C279C634E64C0AC5761E1C2583664AA6E6574BEABD07BAFFB6A1FC2964043FF891F3523C7A
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 100800 (seconds)
TLS session ticket:
0000 - 77 86 10 7f e5 38 83 a5-60 03 c7 4b 63 03 a5 60 w....8....Kc..
0010 - 20 7a 33 39 56 12 cd 8a-3a 5d 21 88 6f 31 c4 ec z39V...:]!.o1..
0020 - ec 05 d2 7e 39 8e 52 0c-9c ac 17 81 97 32 ed 6e ...~9.R......2.n
0030 - e8 fd 36 94 1b 78 d7 20-1c 7f 64 5f fe 84 06 af ..6..x. ..d_....
0040 - ff c8 69 0a 13 1c fc 51-7b 5d ef 91 8d b5 46 f5 ..i....Q{]....F.
0050 - b3 cf 90 6c 3a cc 21 0b-21 62 ea 6c 3f 0c 3d 2b ...l:.!.!b.l?.=+
0060 - 11 f3 2c 87 e1 6a 85 86-3e 73 6a 5c d3 72 b9 18 ..,..j..>sj.r..
0070 - a4 0e 32 10 db 69 ba 24-f7 b9 50 14 27 28 24 df ..2..i.$..P.'($.
0080 - 97 07 0b 94 c9 87 78 55-c9 1c d6 1f 93 16 cb 1d ......xU........
0090 - 48 71 21 c0 d9 f2 71 72-94 47 92 dd 83 84 1c 72 Hq!...qr.G.....r
00a0 - 11 57 ec f0 .W..
Start Time: 1496229069
Timeout : 300 (sec)
Verify return code: 0 (ok)
Changing SUPL_PORT value to 7275 in /etc/gps.conf does not affect A-GPS daemon SSL problem. Mb, mtk_agpsd just ignore /etc/gps.conf ?
I'm not aware whether mtk_agps accesses /etc/gps.conf. I suppose no.
Some observations from logs:
05-29 15:38:05.672 D/agps ( 247): [agps][SUPL] config supl_version=1 eCID=1 addr=[supl.nokia.com] port=7275 tls=1
Dont know yet where it gets that supl.nokia.com
The name seems resolved to 127.0.0.1
05-29 15:38:05.755 D/agps ( 247): [agps][n][Utility] DNS IPv4=[127.0.0.1]
05-29 15:38:05.755 D/agps ( 247): [agps][n][Utility] port_v4=7275
05-29 15:38:05.755 D/agps ( 247): [agps] WARNING: [APP] DNS query successful IPv4=[127:0:0:1]
Attempt to establish a connection fails (cannot connect to a host/port probably):
05-29 15:38:05.984 D/MtkAgpsNative( 247): sec_ssl_connect()
05-29 15:38:05.984 D/MtkAgpsNative( 247): [agps][tls] info_callback where=[HANDSHAKE_START] ret=1 SSL_state=[before connect initialization]
05-29 15:38:05.984 D/MtkAgpsNative( 247): [agps][tls] info_callback where=[CONNECT_LOOP] ret=1 SSL_state=[before connect initialization]
05-29 15:38:05.984 E/agps ( 247): [agps] ERR: [Utility] safe_write reason=[Connection refused]111
05-29 15:38:05.984 E/agps ( 247): [agps] ERR: [SUPL_CONN_ADP] safe_write fail in soc_send
05-29 15:38:05.984 D/MtkAgpsNative( 247): [agps][tls] info_callback where=[CONNECT_EXIT] ret=-1 SSL_state=[SSLv3 write client hello B]
05-29 15:38:05.984 D/MtkAgpsNative( 247): [agps][tls] info_callback error in SSL_state=[SSLv3 write client hello B]
05-29 15:38:05.984 D/MtkAgpsNative( 247): SSL_connect() ret:-1
05-29 15:38:05.984 I/MtkAgpsNative( 247): [SUPL] -> sec_ssl_connect() ret:-1
05-29 15:38:05.984 D/MtkAgpsNative( 247): SEC_ERROR_INTERNAL with peer_cert_warning(0x0)
05-29 15:38:05.984 I/MtkAgpsNative( 247): supl_tls_handshake(): SUPL_CONN_ERROR due to err -100
BTW:
ping supl.nokia.com PING nokia.supl.svc.ovi.com.glb.as1248.net (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.008 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.020 ms 64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.017 ms ^C --- nokia.supl.svc.ovi.com.glb.as1248.net ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2006ms rtt min/avg/max/mdev = 0.008/0.015/0.020/0.005 ms
It looks like DNS is reporting this IP. Nokia stopped to provide this service?
It looks the SUPL profiles are specified in /etc/agps_profiles_conf2.xml
Nokia SUPL service stopped long time ago.
That again raises a question: what had happened recently that causes the issue with GPS?
Not sure it helps, but I found a ResurectionRemix ROM for this phone on needrom, it's 7.1.2. GPS works like a charm in it. (Alongside with the camera, apart from a minor bug) Maybe you can use it as a reference, cross-examine it. (Again, it's just an idea, I don't have the slightest idea about making a ROM, just trying to be a bit of help. )
BTW, I've found a log from cm-12.1 v0.14 which is dated by March 1, 2017 and it had resolved supl.nokia.com to some IP
03-01 21:44:06.800 262 2230 D agps : [agps] WARNING: [APP] DNS query [supl.nokia.com] IPv4/IPv6 03-01 21:44:06.821 262 2230 D agps : [agps][n][Utility] DNS IPv4=[35.156.68.218] 03-01 21:44:06.821 262 2230 D agps : [agps][n][Utility] DNS IPv4=[35.157.6.107] 03-01 21:44:06.821 262 2230 D agps : [agps][n][Utility] port_v4=7275 03-01 21:44:06.821 262 2230 D agps : [agps] WARNING: [APP] DNS query successful IPv4=[35:157:6:107]
"supl.nokia.com does not work anymore because its DNS resolves to 127.0.0.1 since 21st of April. " April 2017, ofc.
As a temporary solution the file /system/etc/agps_profiles_conf2.xml could be modified to remove the NOKIA supl profile (curr_supl_profile) and replace it with GOOGLE profile (make it curr_supl_profile)
Ex. the file attached to http://4pda.ru/forum/index.php?showtopic=715935&view=findpost&p=61966949 (sorry, in Russian) can be used (thanks to @agent-007 )
this temporary solution works so i think you should close this issue