[Xiaomi Redmi 4X ROMs, Kernels, Recoveries, & Other] der-joker:
NetworkLocation doesn't work

Hi [MENTION=6569827]Nik001[/MENTION],

thank you for this great ROM.

One serious bug (at least for me) is present in all ROMs: NetworkLocation does not work.

Apps like tasker or ingress can not get the location via WIFI/Celltower.

I've checked it via app "location info" (see the screenshot attached).

Fused-location and GPS is working well.

This issue looks similar to that one on Redmi Note 4:

https://xdaforums.com/showpost.php?p=71724075&postcount=255

The Note-4 dev was able to fix it:

https://xdaforums.com/showpost.php?p=71990328&postcount=418

It would be very very great if you could look into it and fix it for our Redmi 4x aswell :fingers-crossed:

Logcat: (if you need more, just ping me)

10-30 20:34:05.448 7543 7543 D LegacyGeoLocater: LM - startListening called
10-30 20:34:05.451 1571 4151 D IzatProviderEngine_jni: onAddRequest called by network
10-30 20:34:05.452 1571 4151 D IzatProviderEngine_jni: Provider Type: 2
10-30 20:34:05.452 1571 4151 D IzatProviderEngine_jni: Num Updates : 2147483647
10-30 20:34:05.452 1571 4151 D IzatProviderEngine_jni: Interval : 0
10-30 20:34:05.452 1571 4151 D IzatProviderEngine_jni: Displacement : 0.000000
10-30 20:34:05.452 1571 4151 D IzatProviderEngine_jni: Accuracy : 1
10-30 20:34:05.452 1571 4151 E IzatSvc_IzatManager: I/LocTech-Label :: IZATMANAGER :: Add Request In
10-30 20:34:05.452 1571 4151 E IzatSvc_IzatManager: I/LocTech-Value :: Provider: 2, Num Updates: 2147483647, TTFF: 0, Interval: 0, Displacement: 0.000000, Horizontal Accuracy: 0.000000, Altitude Accuracy: 1, Bearing Accuracy: 2
10-30 20:34:05.452 1571 3552 E LocSvc_libulp: D/LocTech-Label :: ULP :: Criteria
10-30 20:34:05.452 1571 3552 E LocSvc_libulp: D/valid 0x9a77 action:1, minTime:0, minDistance:0.000000, singleShot:0, provider_source:4, horizontalAccuracy:1, powerRequirement:0, emergency_request:0
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: D/void ulp_msg_main(void *) received msg of type: 0x600
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: I/int ulp_msg_process_criteria_update(const UlpLocationCriteria *): valid 0x9a77 action:1, minTime:0, minDistance:0.000000, singleShot:0, horizontalAccuracy:1, powerRequirement:0, emergency_request:0
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: D/int ulp_brain_process_criteria_update(): ulp_started = 1, phone context type = 0x37
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: I/int ulp_brain_process_criteria_update() index at 0, isNew = 1, mask 0x9a77, provider source = 4,accuracy = 1, singleshot = 0, tbf = 0 emergency_request = 0
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: D/int ulp_brain_turn_onoff_quipc_provider(), quipc enabled = 0, selected to run 0, onoff cnt = 5
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: D/int ulp_quipc_stop_engine(): ulp_quipc_inf is NULL
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: D/bool ulp_quipc_engine_running(), quipc state = 0
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: D/int ulp_brain_turn_onoff_gnss_provider(), gnss enabled = 0, gnss selected to run = 0, onoff cnt = 5, new request active = 1
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: D/int ulp_gnss_stop_engine(), gnss state = 0
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: D/bool ulp_gnss_engine_running(), gnss state = 0
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: D/bool ulp_gnss_engine_running(), gnss state = 0
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: I/===> int ulp_brain_turn_onoff_dr_provider() line 848
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: D/int ulp_brain_turn_onoff_dr_provider(), DR enabled = 0, DR selected to run = 0, onoff cnt = 5, new request active = 0
10-30 20:34:05.453 1571 4160 E LocSvc_libulp: I/===> int ulp_dr_stop_engine() line 235
10-30 20:34:05.454 1571 4160 E LocSvc_libulp: D/int ulp_dr_stop_engine(), DR state = 0
10-30 20:34:05.454 1571 4160 E LocSvc_libulp: D/bool ulp_dr_engine_running(), DR state = 0
10-30 20:34:05.454 1571 4160 E LocSvc_libulp: D/bool ulp_dr_engine_running(), DR state = 0
10-30 20:34:05.454 1571 4160 E LocSvc_libulp: D/bool ulp_gnss_engine_running(), gnss state = 0
10-30 20:34:05.454 1571 4160 E LocSvc_libulp: D/bool ulp_quipc_engine_running(), quipc state = 0
10-30 20:34:05.454 1571 4160 E LocSvc_libulp: D/bool ulp_dr_engine_running(), DR state = 0
10-30 20:34:05.454 1571 4160 E LocSvc_libulp: D/bool ulp_gnss_engine_running(), gnss state = 0
10-30 20:34:05.454 1571 4160 E LocSvc_libulp: D/bool ulp_quipc_engine_running(), quipc state = 0
10-30 20:34:05.454 1571 4160 E LocSvc_libulp: D/int ulp_brain_turn_onoff_gnp_provider(), gnp enabled = 1, gnp selected to run = 1, onoff cnt = 1, request active = 1,emergency request 0 gnss running 0, gnss state 0 quipc running 0
10-30 20:34:05.454 1571 4160 E LocSvc_libulp: D/int ulp_gnp_start_engine(), gnp state = 0, ulp_gnp_engine_running () = 0, new request active = 1 emergency_request = 0
10-30 20:34:05.454 1571 4160 E LocSvc_libulp: D/int ulp_gnp_set_state(gnp_state_e_type), current gnp state = 0, new gnp state = 1
10-30 20:34:05.454 1571 4160 E LocSvc_libulp: D/int ulp_brain_turn_onoff_zpp_provider(), zpp enabled = 1, zpp selected to run = 0, onoff cnt = 1
10-30 20:34:05.454 1571 4160 E LocSvc_libulp: D/int ulp_zpp_stop_engine(), zpp state = 0, ulp_zpp_engine_running () = 0
10-30 20:34:05.454 1571 3552 E IzatSvc_IzatManager: E/Exiting with error virtual void izat_manager::IzatManager::networkLocationRequestMsg::proc() const line 900 "1"

Edit:

Found a solution/workaround here: https://github.com/TheScarastic/and...mmit/4b4c8135bdec249b678c3a89aa396d9519d6036a

Just remove the '#' in /system/etc/izat.conf in front of these two lines and reboot:

#OSNLP_PACKAGE = com.google.android.gms
#OSNLP_ACTION = com.android.location.service.v3.NetworkLocationProvider