Android: Device Administration Application - android

How do I prevent my device administration application from being installed? I have created the application and enabled it in location and security, but I can still uninstall it or disable it without asking for a password.

I'm fairly sure that's impossible (fortunately), unless you have complete control of the device and install your own package manager?

Related

Does uninstalling the application removes the device owner settings the application has utilized?

I'm trying to create an application that can disable or hide other applications. After going through some online resources i found out that i have to make my application the device owner to do so.
I would like to know, if i make my application the device owner, will that permission be removed when i uninstall the application?
You can't uninstall the device owner. You also can't become the device owner if you're a Play Store app. Device ownership really is only possible if its a device you physically own and can set up.

Lock access to Android Settings but Wi-Fi

For my usecase i need to block access to phone settings for regular users, but they have to be able to see a list of available Wi-Fi and connect to them.
I can use some of the lock apps in the market, but they lock the whole Setting app, including Wifi section.
Does anyone have any ideas how to do this?
Thanks.
You Download "Leo Privacy gard" Android application That You Find In Android Play store You install This Application and Lock Any applications and settings.

Android: how to get system rights officialy

I need to Turn ON/OFF Mobile data programmatically. For this issue I need to use MODIFY_PHONE_STATE permission.
As we know in latest Android versions it's not possible for non-rooted phones unless the app has system rights.
I know that exists some workaround how to sign the app as system app. But as I understand it's not possible to publish such app at the Play Store.
My question is the next - is it possible to get system rights officially? If it is possible which way I have to go to get them?
THe only way to get them is a rooted device, or to build the device image yourself. The idea of system permissions is that only apps which are trusted by the creator of the system (the OEM) can request them. You can also get them by rooting the device, because of how they're granted (its based on the directory the app is installed in, which can be accessed if you have root). But there is no way to do it without root or without creating your own OS image.
MODIFY_PHONE_STATE is a system-only permission so there's no way to get that permission unless you root your phone.

How to create application to reboot device with not rooted device?

How to create application auto reboot device with not rooted device?
I used method reboot in PowerManager with permission
<uses-permission android:name="android.permission.REBOOT" />
so occur error "neither user 10039 nor current process has android.permission.REBOOT"
May be reason is only system applications and applications signed with the same key that was used to sign the firmware will be able to get that permission.
Please suggest me a better way to create application auto reboot.
You cannot do a reboot from an ordinary SDK application. Only applications signed with the system firmware signing key can do this.
Copied from this answer,
Programmatically switching off Android phone
You need the system key to sign your app. See this post for details;
How to compile Android Application with system permissions
Reference and original answer here

Android system app as device administrator without user activation

I want to build an android service that uses the Device Administration Api (http://developer.android.com/guide/topics/admin/device-admin.html).
The problem is that i dont want the user to enable my service. I know that this is not possible for a regular application by i am cooperating with an oem so i am going to use a custom rom and my application can be a pre-installed system app.
So my final question is if a system app with the right permissions is able to use Device Administration Api without needing user activation of the app as device administrator. If this is possible can someone tell me how this is done? Please help me.

Categories

Resources