@kanyshev

Как изменить геолокацию устройства через geo fix, если он не изменяет местоположение?

Всем привет!

Имеется виртуальное устройство на базе Android, запущенное в Docker-контейнере. Управление им веду с помощью Appium.
При попытке установить местоположение через стандартную команду `adb emu geo fix -122.34 47.62` местоположение не изменяется с 37.4219884 -122.0840727 (офис гугл)
При этом если установить приложение FakeGPS, выдав ему необходимые разрешения, местоположение изменяет.

Location Manager State без установленного FakeGPS:

Location Manager State:
  User Info:
    current users: u[0]
  Location Settings:
    Location Setting: true
    Location Allow/Deny Packages:
    Throttling Allow Packages:
      com.google.android.gms
    Bypass Allow Packages:
      com.google.android.dialer[*]
      com.google.android.gms[.thunderbird]
  Location Providers:
    passive provider:
      service: registered
      listeners:
        10098/com.google.android.gms[.location_base]/7E1DAD78 Request[PASSIVE, minUpdateInterval=0, hiddenFromAppOps, WorkSource{10098 com.google.android.gms}]
        10098/com.google.android.gms[.location_base]/3075F189 Request[PASSIVE, minUpdateInterval=0, hiddenFromAppOps, WorkSource{10098 com.google.android.gms}]
        1000/android[SensorNotificationService]/533FBAD6 Request[PASSIVE, minUpdateInterval=+30m0s0ms, minUpdateDistance=100000.0, WorkSource{1000 android}]
      last location=null
      enabled=true
      allowed=true
      identity=1000/android[LocationService]
      properties=ProviderProperties[powerUsage=Low, accuracy=Fine]
    network provider:
      service: ProviderRequest[OFF]
      listeners:
        1000/android[GnssService]/0062D8B3 Request[PASSIVE, minUpdateInterval=0, hiddenFromAppOps, WorkSource{1000 android}]
      last location=null
      enabled=true
      allowed=true
      identity=10098/com.google.android.gms[.location_base]
      extra attribution tags={awareness_provider, activity_recognition_provider, network_location_provider, network_location_calibration, fused_location_provider, geofencer_provider}
      properties=ProviderProperties[powerUsage=Medium, accuracy=Fine, requires=network, supports=[altitude]]
      stationary throttled=false (not idle) (not stationary)
      target service=10098/com.google.android.gms/com.google.android.location.network.NetworkLocationService@2
      connected=true
    fused provider:
      service: ProviderRequest[OFF]
      last location=null
      enabled=true
      allowed=true
      identity=10098/com.google.android.gms[.location_base]
      extra attribution tags={awareness_provider, activity_recognition_provider, network_location_provider, network_location_calibration, fused_location_provider, geofencer_provider}
      properties=ProviderProperties[powerUsage=Low, accuracy=Fine, supports=[bearing,speed,altitude]]
      stationary throttled=false (not idle) (not stationary)
      target service=10098/com.google.android.gms/com.google.android.location.fused.FusedLocationService@1
      connected=true
    gps provider:
      service: ProviderRequest[OFF]
      last location=null
      enabled=true
      allowed=true
      identity=1000/android[GnssService]
      properties=ProviderProperties[powerUsage=High, accuracy=Fine, requires=satellite, supports=[bearing,speed,altitude]]
      stationary throttled=false (not idle) (not stationary)
      mStarted=false   (changed +6m25s477ms ago)
      mBatchingEnabled=false
      mBatchingStarted=false
      mBatchSize=0
      mFixInterval=1000
      GNSS_KPI_START
        KPI logging start time: +23s729ms
        KPI logging end time: +6m25s477ms
        Number of location reports: 0
        Number of TTFF reports: 0
        Number of position accuracy reports: 0
        Number of CN0 reports: 0
        Total number of sv status messages processed: 0
        Total number of L5 sv status messages processed: 0
        Total number of sv status messages processed, where sv is used in fix: 0
        Total number of L5 sv status messages processed, where sv is used in fix: 0
        Number of L5 CN0 reports: 0
        Used-in-fix constellation types: 
      GNSS_KPI_END
      Power Metrics
        Time on battery (min): 0.0
        Amount of time (while on battery) Top 4 Avg CN0 > 20.0 dB-Hz (min): 0.0
        Amount of time (while on battery) Top 4 Avg CN0 <= 20.0 dB-Hz (min): 0.0
        Energy consumed while on battery (mAh): 0.0
      Hardware Version: 
  Historical Aggregate Location Provider Data:
    passive:
      1000/android[SensorNotificationService]: min/max interval = passive/passive, total/active/foreground duration = +5m59s753ms/+5m59s753ms/+5m59s753ms, locations = 0
      10098/com.google.android.gms[.location_base]: min/max interval = passive/passive, total/active/foreground duration = +5m56s771ms/+5m56s771ms/+5m56s771ms, locations = 0
    network:
      1000/android[GnssService]: min/max interval = passive/passive, total/active/foreground duration = +6m1s731ms/+5m55s324ms/+6m1s731ms, locations = 0
  GNSS Manager:
    Capabilities: [NONE]
    Status Provider:
      service: registered
      listeners:
        10098/com.google.android.gms[.location_base]/DF82B89B
        10098/com.google.android.gms[.location_base]/A6BF36B2
    Measurements Provider:
      service: unregistered
  Geofence Manager:
    service: unregistered
  Event Log:
    10-21 07:56:40.995: passive provider [u0] enabled
    10-21 07:56:42.786: gps provider [u0] enabled
    10-21 07:56:42.790: network provider +registration 1000/android[GnssService]/0062D8B3 -> Request[PASSIVE, minUpdateInterval=0, hiddenFromAppOps, WorkSource{1000 android}]
    10-21 07:56:42.991: passive provider [u0] enabled
    10-21 07:56:42.991: gps provider [u0] enabled
    10-21 07:56:43.272: fused provider [u0] enabled
    10-21 07:56:44.768: passive provider +registration 1000/android[SensorNotificationService]/533FBAD6 -> Request[PASSIVE, minUpdateInterval=+30m0s0ms, minUpdateDistance=100000.0, WorkSource{1000 android}]
    10-21 07:56:44.769: passive provider request = ProviderRequest[@0]
    10-21 07:56:47.750: passive provider +registration 10098/com.google.android.gms[.location_base]/7E1DAD78 -> Request[PASSIVE, minUpdateInterval=0, hiddenFromAppOps, WorkSource{10098 com.google.android.gms}]
    10-21 07:56:49.191: network provider [u0] enabled
    10-21 07:56:49.197: network provider request = ProviderRequest[OFF]
    10-21 07:56:49.886: passive provider +registration 10098/com.google.android.gms[.location_base]/3075F189 -> Request[PASSIVE, minUpdateInterval=0, hiddenFromAppOps, WorkSource{10098 com.google.android.gms}]

  • Вопрос задан
  • 151 просмотр
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы