1

I am trying to reverse engineer an app that uses the Android LocationManager. It is attempting to request location updates via the .requestLocationUpdates method. However, I am receiving an error that the network provider doesn't exist:

java.lang.IllegalArgumentException: provider doesn't exist: network
    at android.os.Parcel.createException(Parcel.java:2075)
    at android.os.Parcel.readException(Parcel.java:2039)
    at android.os.Parcel.readException(Parcel.java:1987)
    at android.location.ILocationManager$Stub$Proxy.requestLocationUpdates(ILocationManager.java:1151)
    at android.location.LocationManager.requestLocationUpdates(LocationManager.java:1019)
    at android.location.LocationManager.requestLocationUpdates(LocationManager.java:558)

This error logged after clicking a button in the app and then it crashed. At the time of executing this action, I was using Genymotion Desktop Emulator running a Samsung Galaxy S10 on Android 11.0 API and x86 architecture. After some research, it seems like the issue is due to the fact that Genymotion does not have a network provider enabled. After even more research, it seems emulators can't use the network provider period.

I'm not an Android expert and all of the links aren't exactly the same as my case, so I'm trying to see if there is still a work around/if the outcomes of these links fully apply to me.

Since my issue seems to be Genymotion related, I have decided to try and use Android Studio's emulator instead. I have created a virtual device via the Android Virtual Device Manager (AVD). It is a Nexus 5 API 30 using Android 11.0 (Google Play) on x86 architecture. It is my understanding that there are three location providers in android and the one that I need is the network provider.

My main question is: Do Android Studio Emulators have the network provider enabled?

If not, is it even possible for an emulator to have it enabled or should I consider purchasing a real android phone for this case?

You may be asking why I don't just try to click the same button and see if the error replicates. Well, I simply can't right now. The reason is quite complex, but in short, the button only shows up occasionally for me to press. I don't know when it will be available again, so in the meantime I'm trying to prepare my setup and gain a better understanding of android's location manager.

0 Answers0