detect when application using permissions ~ Android - android

I list all permissions of the new installed application on Android device. But I want to detect when an application uses these permission. For example, I installed an app and it uses READ_CALENDAR permission. It is not always read my calendar data. I want to detect the time it reads my calendar data. Is it possible?

No, I don't think this is possible. You would need to be able to monitor each external app, and you don't have the ability to know what they are doing (due to security restrictions on Android). In other words, your app doesn't have the ability to monitor the actions of other apps (not written by you) on the device.
I don't think you have access to the system at the level you would need to perform this (this may be possible on a Rooted phone, but I think that would still be difficult).

When you write an app you have to insert in the android manifest all the possible "uses permissions", for all the functionality that your app will use.
When someone installs your app, before the installation procedure, he can read all the permissions used from the app. If you accept to install it, the app will use all those permissions listed.

Related

How can i get the caller phone number on android PIE without using read call log permission?

I've built a cool app that uses the outgoing/incoming phone number
and send it some data.
The phone number retrieval works fine in all android versions
except android P (version 9).
In that version i needed to add a READ_CALL_LOG permission in addition to the READ_PHONE_STATE permission,
and than, the PHONE_STATE broadcast got called twice.
(the phone number is included only in the second time.)
but then i can't upload my app to google play because READ_CALL_LOG is a sensitive permission and my app goal is not listed in the allowed cases.
i believe that there are a lot of apps that makes use in the incoming/outgoing phone number without the need to actually read the users call logs.
my question is:
is there another way to retrieve phone number in android P without using READ_CALL_LOG?
or,
is there any way to bypass google play's restriction for that particular use case?
thanks.

Device admin app for rooted android

We have our own rooted hardware device with android OS 7.0
We are building an app for that device. We have to restrict the users to performing some of the actions who will purchase that device. Here are the list of actions We want user to be restricted to perform on the device through the app.
Stop installing/uninstalling any other apps from OS.
On/off wifi
Pair Bluetooth
Change wallpaper
Basic idea behind is to make an app which will be the system app and will restrict user from the things mentioned above.
Is this possible to make such app? Looking for help in any of the above tasks. Thanks
Shor answer: NO.
Here is why;
The Android operation System is based on permissions, and no app can restrict that actions even with the users' permission. The reason for this is because of the Android App Layer that provides all the capabilities you described above.
The only way you can do such thing is to Customize the ROM of the CellPhone. In this case, you can override the functions that allow the user to use such services.

What is the Difference between a Device Policy Controller (DCP) app and a System App?

Is there any difference in the privileges of an Android DPC application and a system application? Will a system application be able to perform all the functions that a DPC can perform such as setting the device to Single Use Mode?
Well, there is no-such difference in privileges as far as the Android system is concerned.
If you look at the Android Platform Architecture, you will find that the even a normal user app have the same access to all the system resources as a system app.
Apps included with the platform have no special status among the apps the user chooses to install. So a third-party app can become the user's default web browser, SMS messenger, or even the default keyboard (some exceptions apply, such as the system's Settings app).
You can read about more differences in system and user app here.
Also, another interesting point to note is that on a production device there are only 3-processes that run as root, the Zygote, the app_process and the adbd (though it doesn't allow root access directly using adb). That means, all other apps run under their own user_id with different permissions and since Android doesn't differentiate between apps, two apps having same permissions are allowed same privileges and access to resources, regardless of the fact whether it is a system app or a user app.
Now, to answer your question, if a system app has the same privileges as the DPC app, then yes the app would be able to perform the given task (like setting the device to Single Use Mode) same as the DPC without any problem.
As a side note, if you are planning to create a DPC for you organisation, using the DPC SUpport Library is better than creating and shipping a system app.
P.S. To change a System setting your app would need the WRITE_SETTINGS permission.

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.

disabling Privacy, Device permissions and device access

I've recently created an app which is basically a webview component that displays a website, when I want to install the app on an android phone (havent tried on iOS yet) the privacy setting and device permissions/access you have to agree with are far more than what the app requires, if it is a simple webview app it should not need access to anything other than full network access, however other requirements that you have to agree with before installing the app are "read contacts, read texts, make calls, send texts... etc." it pretty much requires all the possible device permissions that there is, and so some people might not want to install the app due to this reason. Is there any way I can cancel or disable the device access/permissions that the app requires?

Categories

Resources