We are trying to weight the choice to either root or not the devices to run a very specific App.
What we want to know if permissions like WRITE_SECURE_SETTINGS, WRITE_APN_SETTINGS and the like that were usable on past versions of Android are available if we root our devices.
Thanks in advance!
To get straight to the point and answer your question, yes, it is.
Related
I need to block access to my android application on rooted devices. So when the app is launching I check if there is a file named "Superuser.apk" on the device (see the post of this solution here). If the file exist the application quit.
But here is my real problem, I want to test this feature and I don't want to root my own device. So I was wondering if there is a way to root an emulator on Android Studio to try it ?
I checked a lot of topic on internet, but every post I saw was about how to root a real device.
Is someone there know if it's possible ? And if yes, how?
Thanks in advance !
I am looking for the solution in Appcelerator, to check that the android device is rooted or not through coding or programming.
I am not able to find the way in Appcelerator to achieve this.
if anybody has done this please help to find out how achieve this.
i have found few solution for android native but how to make it possible in android Appcelerator
Determining if an Android device is rooted programatically?
how to find the rooted device programmatically?
Have a look at these two modules:
https://github.com/collinprice/com.collinprice.rooted
https://github.com/appersonlabs/RootFinder
you can use http://gitt.io to search for modules (e.g. you'll find those two when searching for "root" on gitTio)
You need to understand that the process of rooting the device is changing with time and is getting more and more smarter. Nonetheless we still can try to perform some basic checks to filter out a portion of it.
Instead of doing it from Appcelerator, create an Android module and do the following:
Try to execute the su command, Runtime.getRuntime().exec("/system/xbin/which su"); Also check for the same su command in bin too (/system/bin/which su).
If it returns a success, you know for sure that the device is rooted. But you need to be aware that these are not the foolproof way, but only one of the ways to test and filter out.
install root checker on android device
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8&ved=0ahUKEwj1zsWc2vvKAhWB1BoKHXpQBA8QFggqMAM&url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.joeykrim.rootcheck%26hl%3Den&usg=AFQjCNF5xeTKc4cWmWLWFs1WM19ABwlwhA&sig2=acMCp9r58lUvQHNqGQDk9A&bvm=bv.114195076,d.d2s
I write an App and I'd like to get some informations about the Android devices my users are using.
I'd like to know
manufactor
the Android version
and some kind of unique ID
Is that possible without any special permissions? What is the API?
Take a look at the Build object. It will give you some details about the Android build.
Information about the Android version can be found in Build.VERSION
Hope that helps.
I'd like to know the manufactor, the Android version and some kind of
unique ID. Is that possible without any special permissions?
If you wrote 'permission' word in terms of manifest permission then you dont need any special permission for that , because its not something from user must be aware about application access of that data .
and if you would like to know about Build information then brianestey's answer is much clear to that .
I am having full access to Android system. I have all the super user permission to do all the things from any of my application. I just want to implement one functionality in which I need to reset the device without redirecting user to PRIVACY_SETTINGS. If anyone knows how to achieve that please share with me.
Its kind of urgent. Thanks in advance.
You can use device admin. http://developer.android.com/guide/topics/admin/device-admin.html It allows you to wipe all the data. There's a good sample in API demos.
Programmatically: https://stackoverflow.com/a/11885303/1257591
It shows two ways, one is the implementation mentioned by Mighter and an approach for older devices (android version < 2.2)
ADB: https://stackoverflow.com/a/10829600/1257591
Contains adb commands and an example. Judging from the tag of your question this might be the answer you are looking for.
Is it possible at application level? Or do we have to do it inside the OS?
People might want to do this to reduce the attack surface. Ideally, the application, at virtually any point of time, should have a permission only if it is needed, following the `principle of least privilege'.
To clarify: by "change", I mean to give up certain permissions temporarily, and regain them sometime later when they are really needed.
Is it possible at application level? Or do we have to do it inside the OS?
You cannot change the permissions of your application dynamically, ever.
It would be against clarity Android policys . The application has or not has the permisions for doing something . It can be a security problem if you can think of it.
Officially this is not supported.
Newer CyanogenMod builds support "revoked permissions", but applications often force close if they lose permission they were supposed to have.