Does the Android Network Provider exist on Android Studio Emulators? - java

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.

Related

turning on off samsung secure folder programmatically android java api

enter image description here
Is it possible to turn on off (hide) the samsung secure folder through code in android java? Is there any Api or other way to do this function from another app?
I want to create an android app that connects to internet and it has a simple socket.io that gets the turn on / off (hide/unhide) command from server and hides or unhides the devices secure folder.
is it possible?
thanks.
Samsung secure folder is a proprietary feature from Samsung OEM. They do not provide any api to any third party application to do any changes to this or any of there features. Any hack that you may devise would be temporary and futile as they are quite active in terminating such attempts.

Using Kiosk mode on android device(mobile,tablets etc)

I am working on a project that will work on android devices and will convert them in kiosk. So at this moment I am doing R&D on Kiosk mode, but there is very little help on it. But I came across different things. These are using DPM, Using EMM or Using Android Management API
I just wanted to do following things to ship my app to my clients.These objectives are as follow
If client is installing my app, he should follow simple steps (like android permissions) to make my app as default app.
While following simple steps, my app must make android device as Kiosk and should make my app unable to exit by clients user.
My app must be able to clear kiosk mode from device so that client can use his device as simple device
The most important thing is, we are not shipping devices with our app and we may not have any physical access to the client device and client may not be so much technical. So app must do all things
**So from the perspective of these above 4 points , what is best for me please share your knowledge. What will be best for me to go with? Please help me as this is so much confusing...
**
Fully managed mode
In fully managed mode the entire device is managed and the device needs to be factory reset before setup. To set up a device in fully managed mode you need to use a QR code.
For devices running Android 7.0 or above:
Turn on a new or factory-reset device.
Tap the same spot on the welcome screen six times to enter QR code mode. Connect to a WiFi network.
Scan the QR code.
For devices running Android 6.0:
Turn on a new or factory-reset device.
Follow the setup wizard and enter your Wi-Fi details.
When prompted to sign in, enter afw#setup.
Tap Next, and then accept the installation of Android Device Policy.
Scan the QR code.
Work profile mode
In work profile mode corporate apps and data are kept secure in a self-contained work profile while the user keeps control of the rest of the device. To set up a work profile you can either use a QR code or an enrollment link.
Using the enrollment link:
Make the link accessible on the device (send it via email or put it on a website).
Open the link.
Or using the QR code:
Go to Settings > Google.
Tap "Set up your work profile".
Scan the QR code.
What's next?
By now you should have a managed device configured with a basic policy, but there's much more you can do with the Android Management API
for more info : https://developers.google.com/android/work/release-solution

Nearby Connection : Discovery issues on Android 10

For one of my project I work with Nearby Connection API with P2P_STAR strategy and I experience issue on discovery with Android 10.
I have tested with Huawei devices that resulted in no connection at all with host and on a freshly updated Xiaomi MI 9t who success to connect but disconnect few seconds after with no exceptions...
Before the update it work well on the Xiaomi.
Furthermore, my app work very well on my android 8 or 9 devices.
I tried to add ACCESS_FINE_LOCATION permission and update Google play services without success...
Our project repository : https://github.com/hbollon/Urbalog
All Nearby stuff is in NetworkHelper class and permissions list is in the constant REQUIRED_PERMISSIONS inside it.
Someone would have any idea?
Thanks in advance
So I have found the issue, on my android 10 devices I haven't activate location and Nearby seems unable to activate it itself...
I never notice that before Android 10 update so is it os related or have I always activated it before? I don't know ^^
However, on the ConnectionsStatusCodes documentation, MISSING_SETTING_LOCATION_MUST_BE_ON status code is marked as deprecated ( https://developers.google.com/android/reference/com/google/android/gms/nearby/connection/ConnectionsStatusCodes ).
So I imagine this is no longer a possible case no?

Is EMM what I'm looking for?

We have a Java based web application and an android app for our enterprise needs. We would like to remotely push the android app from the web application and we don't know how to achieve this. After searching in Google, I found Android EMM but did not understand what that is exactly as there were no other blogs or tutorials other than the Google site which was difficult for me to understand.
It is similar to MDM solution but do MDM servers have an app preinstalled in the devices so that the installed app manages the installation of other apps?
Can anybody tell how to remotely push the android app from my web application?
To remotely push an app to an Android device you need to manage this device, you cannot just push an app on anyone's device. To manage a device you need to set up this device as managed, which will require a factory reset.
If you want to pursue this approach you can try the Android Management API.
You can just upload .apk file to your server and provide a link to the user. This is a very simple solution but requires user to agree "install apk from third party sources". In this case, a user needs to agree with installing apk.
If you want to install apk without user agreement you need to activate Device Owner on Android (Fred mentioned in the comment this approach).

Downgrading 9.0.83 Google Play Services manually to avoid DynamiteModule: Failed to load module descriptor

I got the following log error in my route tracking activity:
06-24 18:50:24.488 7128-7759/com.noureddine_ouertani.www.wocelli50
E/DynamiteModule: Failed to load module descriptor class: Didn't find
class
"com.google.android.gms.dynamite.descriptors.com.google.android.gms.googlecertificates.ModuleDescriptor"
on path: DexPathList[[zip file
"/data/app/com.noureddine_ouertani.www.wocelli50-2/base.apk"],nativeLibraryDirectories=[/vendor/lib64,
/system/lib64]]
After reading some posts and answers (e.g. this or this) about this log error I figured out that it's a known Google Play Services version 9.0.83 issue that causes bugs in some apps that use a GoogleApiClient like mine.
However I didn't test the solution yet. I wanted to downgrade Google Play Services on my Smartphone but Uninstall Updates was greyed out (see Screenshot).
Does anyone know how to do this manually?
By checking the internet for your problem about how to downgrade Google Play Service when the Uninstall Updates was grayed out. I came up with many possible solution. You can check it all and try if this method helps you.
From this Stack Exchnge question, you can try the solution here that states:
If you have the Android Device
manager
app installed then this can also make the force stop/uninstall updates
buttons be disabled.
If you uninstall the Android Device manager app and disable "Android
Device Manager" as a device administrator then those options should be
enabled.
From this forum, the solution here needs you to download and install System App Remover from the Google Play Store. Just check the forum link to know more about the steps and their information.
And lastly, you can also check the solution in the discusion of this forum page.
I solved the problem for my Huawei P8 Lite Android phone like this:
I unlocked my bootloader like in this video
I rooted my phone like in this video
I succesfully checked with Root Checker Basic that my phone is rooted
I downloaded and installed System App Remover from the Google Play Store.
I put my device in Airplane Mode in order to prevent auto upgrade of GPS.
I opened System App Remover and select "System App" from the menu.
After I found Google Play Services in the list which was marked as "Should keep" I selected it and pressed "Uninstall". I ignored the next warning.
Using Settings/Apps, I saw that Google Play Services "Uninstall Updates", and "Disable" Buttons were no longer be grayed out.
I pressed "Uninstall Updates"
Here is the result: Downgrade of Google Play Services to 8.1.18

Categories