Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android System Permissions Through Root

W/PackageManager(61): Not granting permission android.permission.SET_ACTIVITY_WATCHER to package 

This is one such example of a permission that will not be granted to applications without being signed using the platform signature. With that said I would like to know how any application running on a rooted device (with /system/bin/su and SuperUser.apk) can be granted any of these permissions.

Process p = Runtime.getRuntime().exec("su");
p.waitFor();

Doing this prompts the super user dialog with "accept" or "reject," but SecurityExceptions are still thrown.

like image 358
Tom Avatar asked Oct 10 '11 02:10

Tom


People also ask

How do I give my Android root permission?

In most versions of Android, that goes like this: Head to Settings, tap Security, scroll down to Unknown Sources and toggle the switch to the on position. Now you can install KingoRoot. Then run the app, tap One Click Root, and cross your fingers. If all goes well, your device should be rooted within about 60 seconds.

Do system apps have root access?

1 Answer. Show activity on this post. If your phone isn't rooted, then none of the apps can get root access, regardless of whether they are installed as system app.

What are system permissions in Android?

App permissions help support user privacy by protecting access to the following: Restricted data, such as system state and a user's contact information. Restricted actions, such as connecting to a paired device and recording audio.

How do I allow system permissions?

Open Settings and tap Apps & notifications. Tap Permission manager to open the Android permission controller app. Click a specific permission from the app permissions list that you're interested in, like location. Here you'll see apps that have access to your location all the time or only while in use.


1 Answers

You can declare your app to run as a system app by setting the sharedUserId as follows in the AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="[your package name]"
        android:sharedUserId="android.uid.system">

More details can be found here: How to sign Android app with system signature?

like image 52
spatulamania Avatar answered Sep 28 '22 10:09

spatulamania