Giter VIP home page Giter VIP logo

mirfatif / permissionmanagerx Goto Github PK

View Code? Open in Web Editor NEW
307.0 17.0 29.0 34.08 MB

eXtended Permission Manager for Android - view, set, watch Manifest Permissions and AppOps

Home Page: https://mirfatif.github.io/PermissionManagerX/help

License: GNU Affero General Public License v3.0

Shell 0.33% Java 65.16% HTML 30.30% C 3.39% CSS 0.17% JavaScript 0.62% AIDL 0.04%
manifest-permissions android appops adb root-privileges privacy-protection

permissionmanagerx's Introduction

PermissionManagerX

eXtended Permission Manager for Android - view and set Manifest Permissions and AppOps

Get it on F-Droid Get it on Google Play
Get it on IzzyOnDroid Available at Amazon AppStore
Get Pro Features

Github F-Droid IzzyOnDroid Telegram

* Join Telegram support group to get instant updates and test beta releases.

Features

Using eXtended Permission Manager, for each installed app, on single screen, you can:

  • View, grant or revoke manifest permissions
  • View AppOps permissions and choose one of multiple modes
  • Set your desired reference value for every changeable permission

Manifest permissions are those normally called permissions e.g. Storage, Camera etc. AppOps (app operations) is a robust framework Android uses at back end for access control. With every Android release manifest permissions are becoming more dependent on AppOps. So it's fun to control both simultaneously and see how they relate to each other.

In short, AppOps provide a fine-grained control over many of the manifest permissions. Plus it provides additional controls like background execution, vibration, clipboard access etc. Just install the app to explore it yourself.

When you reinstall an app, or change your device, or upgrade your ROM, it's a time-taking process to review all installed apps for granted permissions and revoke the unnecessary ones (after all privacy matters). PMX provides you the solution. Set reference states of permissions, which can be quickly backed up and restored, and colored bars at left make it quite easy to review packages and permissions at a glance.

Confused? We are here to explain. Please start with:

Required Privileges / Permissions

  • In order to let Permission Manager X serve you at its best, either the device must be rooted or you need to enable ADB over network.
  • android.permission.INTERNET is required to use ADB over network. The only connections made outside the device are to check for app updates or to fetch help contents. Pro version also requires internet connection for license verification.

Note:

  • The app is tested on stock Android 7-13. Some highly customized ROMs may behave unexpectedly.

Privacy Policy

Privacy Policy

Paid Features

Paid Features

Screenshots

How to Build

build.gradle calls a shell script to build native binaries. So a Linux environment is expected with all standard tools.

  • Download code: git clone --depth=1 --recurse-submodules https://github.com/mirfatif/PermissionManagerX.git && cd PermissionManagerX
  • Set sdk.dir in local.properties to the directory containing Android SDK API level (platform) 33, build-tools 33.0.0 (and the latest SDK tools and platform-tools), and Android NDK 25.1.
  • Set JAVA_HOME environment variable to JDK 11.
  • Run ./gradlew :app:assembleRelease. Or use IntelliJ IDEA / Android Studio.

Translations Crowdin

Crowdin

Third-Party Libraries

Credits and thanks to the developers of:

License License

You CANNOT use and distribute the app icon in anyway, except for Permission Manager X (com.mirfatif.permissionmanagerx) app.

Permission Manager X is free software: you can redistribute it and/or modify
it under the terms of the Affero GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Affero GNU General Public License for more details.

You should have received a copy of the Affero GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Need Help?

See Guide and FAQs.

Want To Support Us?

Buy Me A Coffee  Donate Bitcoin 

   (bitcoin:18ijfsv5fcDKQ6CTe4wycKxZMmti4oUXjW)

Want To Reach Us?

  Telegram  XDA Thread      Email    

permissionmanagerx's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

permissionmanagerx's Issues

Could you add a miui-like permission: Get Info about installed apps?

Could you add a miui-like permission: Get Info about installed apps?
This means that the user has denied this permission in xxApp, and xxApp can only view the system app, but cannot view the ordinary app.

Personally, I think this permission is important.

miui permissions

I don't know if this permission is the same as the android.permission.QUERY_ALL_PACKAGES in the system, I looked at the protectionLevel of the android.permission.QUERY_ALL_PACKAGES is normal.

I found QUERY_ALL_PACKAGES permission setting on your software(v.1.16), so I set the QUERY_ALL_PACKAGES to deny. I found that it didn't work., and xxAPP was able to view all apps.

v.1.16

Background permission dont work sometimes

Hello and thank you for your application. When I block the automatic start of an application and prohibit its operation in the background it very often happens that it still arrives at this launch in the background even if I have refused.

I tested many applications and some continue to launch in the background. I have to kill them manually but later they will still relaunch.
Can you explain to me why?
Thanks

clipboard permission isn't listed

Many browsers use clipboard permission and i want to disable them. I was able to do that with pc with adb but in permission manager X, i can't find that option.( note i have disabled all exclude options in settings)

global/specific preset for all installed apps

Magnificent app. Thank you very much.

I just want to suggest adding an option for a preset (or pre setting a profile) of every appops element so that it could be implemented globally or to specific sets of apps.

Exemple: when you long press an app, along the already existing popup menu you get a 'select app' option, then the app gets highlighted, and on the topbar you get the option to select a pre existing profile you've already created in the setting menu with custom appops strings to be implemented. You could also select multiple apps and apply another profile through the same process.

[Feature Request] Automatic recovery

problem:
starting from android 10
App ops may reverted by system to default state
this can causing problem other developer called rikka apps say android ecosystem is deeply hurt by them

solution:
automatic recovery Permission eXtended should able to keep app ops after being changed hy user by keep monitoring app ops state prevent system to revert it
and this can be done using ADB over TCP mode

Wireless Debugging fails

Hello, I tried it a couple times, but PMX always gives back 'Pairing failed'.
Connecting via WI-FI ADB worked on e.g. Shizuke, so this can't be the problem.

Can I give needed permissions also via USB debugging, as a work around?

Android 13
GrapheneOS
version 1.20

Lack of permissions

Many applications that go to Internet, your application (the latest version as well as) does not see any permits to work with the network.
Android14.
Of course, I get a warning that the phone firmware is not supported. But still.

Can this problem somehow solve this problem?

Frequent failures to connect adb wireless debugging

Only 1 out of 3 attempts to connect wireless debugging succeeds. I must repeatedly disable, pause, and re-enable wireless debugging before the app finally establishes a connection. I strongly recommend adopting Shizuku to acquire the necessary access which should alleviate this behavior. Aside from that, the app is nearly perfect and clearly superior to any other with similar functionality.

Cryptographic APIs misuses

I'm a PhD student interested in finding security vulnerabilities in open source projects.

We found a total of 57 warnings (indicating potential vulnerabilities) when running the CogniCrypt static analyzer (*) on
PermissionManagerX (or its library dependencies). We documented each one of these issues in private gists for the sake of confidentiality (non-disclosure).

Can you please let us know whether we can share these gists with you? We are eager to evaluate the perception of developers (e.g. severity of these warnings) and improve PermissionManagerX's security, and the quality of the reports of static analysis tools.

(*) https://github.com/CROSSINGTUD/CryptoAnalysis

suggestion of a new feature [root access is required]

While you can control plenty of permission using Appops. But there are permissions you cannot control using Appops like [android.permission.INTERNET]
but according to this post you can control other permissions using the file [runtime-permissions.xml]
the file path in android 6 to 9 is
/data/system/users/<User_ID>/runtime-permissions.xml
but in android 12
/data/misc_de/0/apexdata/com.android.permission/runtime-permissions.xml

For example, you can change

<shared-user name="com.termux">
    <item name="android.permission.READ_EXTERNAL_STORAGE" granted="true" flags="0" />
    <item name="android.permission.WRITE_EXTERNAL_STORAGE" granted="true" flags="0" />
    <item name="android.permission.INTERNET" granted="true" flags="0" />
</shared-user>
<shared-user name="com.termux">
    <item name="android.permission.READ_EXTERNAL_STORAGE" granted="true" flags="0" />
    <item name="android.permission.WRITE_EXTERNAL_STORAGE" granted="true" flags="0" />
    <item name="android.permission.INTERNET" granted="false" flags="0" />
</shared-user>

And android support parsing XML files. And I know I can edit the file manually, but the XML file has too many lines and the copy and paste after the edit is a hassle and a chore for me. I would appreciate it very much if this app will automate that process from me.

[android r] Root not working

I'm on android 11 Miui 12.2 , I granted PMX all permissions (even internet and app ops) isolated storages and query packages are also set.
I use Magisk 21006 (newest canary) , as for now PMX is the only app failing to detect root

I tried to copy the files in .apk/assets to data/adb/module/PMX (creating a magisk module) as I also use the adb for ndk module
I tried the deamon , it goes a little further but still fails to run

bad OEM

Alot of popups "Bad OEM".
But looks like app is working fine.
Android 8.1, MIUI 11, Redmi5+

Android 13 been explored yet?

I came across this reply from you (Irfan) today, just a couple of days after I'd let my Pixel 6 upgrade to Android 13, and I was slightly gutted. I had this ability on my old LG models and it's been making me crazy that I can't remove audio-break-in permissions when I'm trying to listen to a podcast while playing a game. My phone is under contract and even if it's unlikely I'd brick it by by rooting it, would be financially irresponsible of me to risk it right now.

But since there's no mention of 13 in the PMX help on your website, and the only Play Store reviews for Termux are suggesting no one could get it to run on a Pixel 6, I thought I'd reach out first and ask if there's been any review on ways to install PMX to Android 13, and whether the ADB/Termux instructions would need to be modded for it in some way.

setting AppOps mode failed

Hi, getting this popup every time when I want to change some permission. Did I do something wrong or is it simply so that my system doesn't allow any changes? I found the About/Privileges menu, at which entry should I look?

It is an Android 11 device and I have enabled it using just the adb tcpip 5555command, not the more complicated procedure listed for Android 11.

TIA

Publish on F-Droid

@IzzySoft I want to put this app on F-Droid. Can you help me with license and other requirements (if any)? I'm not very good at understanding licensing issues.

Thanks.

Crashed when installed the app 1st time

FATAL EXCEPTION: main
Process: com.mirfatif.permissionmanagerx, PID: 1490
java.lang.IllegalArgumentException: reasonPhrase can't be empty.
at android.webkit.WebResourceResponse.setStatusCodeAndReasonPhrase(WebResourceResponse.java:138)
at android.webkit.WebResourceResponse.(WebResourceResponse.java:76)
at xq.a(SourceFile:292)
at alW.handleMessage(SourceFile:67)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6518)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

FR: Add Intent to start daemon over ADB

Very useful application, thanks.

I was wondering if an Intent can be added to have Permission Manager X start its daemon using ADB to avoid needing to bring up PMX's user interface.

(Background: on my unrooted Android device, I use Tasker and Termux to start Shizuku and ADB on port 5555 etc. automatically at boot. To be able to use the Permission Watcher features after every phone restart without needing to think about starting it manually, it'd be great if I could use am in a script instead of having to tap PMX's notification.)

Thanks.

The extra AppOps list is not restored from backup

PMX version 1.30-ps-pro (Google Play).

Steps to reproduce:

  1. Install PMX Pro
  2. Go to Hamburger menu > Exclusion Filters > Extra AppOps list
  3. Add an AppOpp to the list (eg. WAKE_LOCK)
  4. Export backup
  5. Restore backup

I'd expect the Extra AppOps list to contain WAKE_LOCK.
However after the restore, the Extra AppOps list is reawt to it's default.

Permission Change

I'm sure you would have added it if it was possible but why can ' Android.permission.RECEIVE_BOOT_COMPLETED ' not be changed?

I have a few apps that run at boot for unknown reasons, don't have an option to turn it on or off and can't find any apps that will stop them. I'm assuming this flag is what's telling the apps they should launch at boot.
This assumption is based on that they don't relaunch automatically with 'RUN_IN_BACKGROUND' and 'RUN_ANY_INBACKGROUND' set to DENY

If this permission can't be changed (without ROOT), any interest in making a 'Boot App Manager' 🤪

Add a non root version.

Please add a non root version.
Or make it also for non rooted phones.
Almost 80% phones are non rooted.
Please.. please... please work on it.

Not recognising adb connection

When I try to change permission of an app using adb, it is saying privelege extension required even though adb is ticked.
Device: Samsung Galaxy Tab A
Version: SM P555

root: Files not extracted or not accessible

After giving root permissions via Magisk I'm getting the popup message:
Files not extracted or not accessible

logcat:
System.err: DaemonHandler: extractDexFile(): Extracting failed: /storage/emulated/0/Android/d
ata/com.mirfatif.permissionmanagerx/files/com.mirfatif.privdaemon.pmx.dex

Alternate option to pay/donate

I'd like to pay for the app/donate to the work.
However, I don't do any transactions of the play store.
Could you set up a paypal/buy me a coffee link.

Thanks.

Batch operations on permissions

When in permissions screen for an application it would be very useful to be able to set all permissions to a state in a batch. For example I usually set all permissions to "Deny" except a few which are nessecary for function.
Instead of manually have to go thru the whole list and set deny, it would be great to have an option to set all permissions to deny, then manually allow needed permissions.

F-Droid build failed

> Task :app:compileReleaseJavaWithJavac
/home/vagrant/build/com.mirfatif.permissionmanagerx/app/src/main/java/com/mirfatif/permissionmanagerx/parser/PackageParser.java:734: warning: [deprecation] protectionLevel in PermissionInfo has been deprecated
      int protectionLevel = permissionInfo.protectionLevel & PermissionInfo.PROTECTION_MASK_BASE;
                                          ^
/home/vagrant/build/com.mirfatif.permissionmanagerx/app/src/main/java/com/mirfatif/permissionmanagerx/parser/PackageParser.java:734: warning: [deprecation] PROTECTION_MASK_BASE in PermissionInfo has been deprecated
      int protectionLevel = permissionInfo.protectionLevel & PermissionInfo.PROTECTION_MASK_BASE;
                                                                           ^
/home/vagrant/build/com.mirfatif.permissionmanagerx/app/src/main/java/com/mirfatif/permissionmanagerx/parser/PackageParser.java:735: warning: [deprecation] protectionLevel in PermissionInfo has been deprecated
      int protectionFlags = permissionInfo.protectionLevel & ~PermissionInfo.PROTECTION_MASK_BASE;
                                          ^
/home/vagrant/build/com.mirfatif.permissionmanagerx/app/src/main/java/com/mirfatif/permissionmanagerx/parser/PackageParser.java:735: warning: [deprecation] PROTECTION_MASK_BASE in PermissionInfo has been deprecated
      int protectionFlags = permissionInfo.protectionLevel & ~PermissionInfo.PROTECTION_MASK_BASE;
                                                                            ^
/home/vagrant/build/com.mirfatif.permissionmanagerx/app/src/main/java/com/mirfatif/permissionmanagerx/parser/PackageParser.java:1062: warning: [deprecation] GET_SIGNATURES in PackageManager has been deprecated
  static final int PM_GET_SIGNATURES = PackageManager.GET_SIGNATURES;
                                                     ^
/home/vagrant/build/com.mirfatif.permissionmanagerx/app/src/main/java/com/mirfatif/permissionmanagerx/parser/PackageParser.java:1065: warning: [deprecation] signatures in PackageInfo has been deprecated
    return packageInfo.signatures;
                      ^
/home/vagrant/build/com.mirfatif.permissionmanagerx/app/src/main/java/com/mirfatif/permissionmanagerx/util/Utils.java:552: error: cannot find symbol
      if (!string.substring(start, end).equals("LINK")) {
                 ^
  symbol:   method substring(int,int)
  location: variable string of type SpannableStringBuilder
1 error
6 warnings

> Task :app:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

Could you please take a look? Thanks!

backup/restore question

hi, i wanted to restore app perms from my prev phone but it seems it doesnt touch notification perms? android blocks them by default and i need a tool to recover apps i had notifs allowed for... because theres over 200

Permission watcher functionality misbehaving in Pro version when targeting an app in Secondary profile (daemon as system) or outright misses an unfavorable permission change (if daemon as root)

PMX: pro version, most recent, with trial key
Android 14

Target app: MoodSMS

Permissions targeted: call log, phone state, place calls, read device ID (all set to grant on platform level or MoodSMS won't start , but set to ignore at appops level

Sometimes the abovelisted appOpp permissions change on their own to "default/accept) which is a known behavior

NB : MoodSMS is running in Secondary user (!)

So I enabled permission watcher and made all the needed changes

If daemon runs as root then permission change is missed and MoosSMS regains some unwanted permissions (and starts annoying notification on every phone call)

If daemon runs as system the permission watcher seemingly manages to restore MoodSMS permissions to the state I want but periodically crashes with log:

=================================
Version: v1.24-pro
SDK: 34
Build: user
Device: redfin
Manufacturer: Google
Model: Pixel 5
Product: redfin
=================================
Root: true
ADB: false
UID: 0
Context: u:r:magisk:s0
Time: 11-Apr-24 12:53:04
Component: Daemon
Log ID: 03599caa-204c-46e6-aa5b-60212a77cc67
=================================
java.lang.AbstractMethodError: abstract method "void android.permission.IOnPermissionsChangeListener.onPermissionsChanged(int, java.lang.String)"
	at android.permission.IOnPermissionsChangeListener$Stub.onTransact(IOnPermissionsChangeListener.java:89)
	at android.os.Binder.execTransactInternal(Binder.java:1501)
	at android.os.Binder.execTransact(Binder.java:1440)

=================================
Root: true
ADB: false
UID: 1000
Context: u:r:magisk:s0
Time: 11-Apr-24 13:06:51
Component: Daemon
Log ID: d67c9300-8db9-417f-9581-b6feae64a682
=================================
java.lang.AbstractMethodError: abstract method "void android.permission.IOnPermissionsChangeListener.onPermissionsChanged(int, java.lang.String)"
	at android.permission.IOnPermissionsChangeListener$Stub.onTransact(IOnPermissionsChangeListener.java:89)
	at android.os.Binder.execTransactInternal(Binder.java:1501)
	at android.os.Binder.execTransact(Binder.java:1440)

Support secondary profiles (multi-user devices)

This is a feature request to be able to execute PermissionManagerX as non-device-owner accounts.

Problem

For security reasons, I mostly just use non-owner accounts on my Android device -- different profiles for different use-cases (security through compartimentalization).

I installed PermissionManagerX on one of my non-owner profiles, and I get the following error message

Permission Manager X can run only in the primary user account / device owner profile

I logged-in as the primary owner and installed PermissionManagerX. It opened, but the problem with this is that I need to check the permissions of the apps installed in the secondary user's profile. They aren't visible in the primary account's install of PermissionManagerX

Solution

Please let me open PermissionManagerX inside non-device-owner profiles.

Support work profile apps

Hi folks,
PermissionManagerX is great 👍

Unfortunately apps from work profile aren't displayed. The UIDs look like:
10123 Firefox (normal/private profile)
1110123 Firefox (work profile)

Is it also possible to control these apps?

Add an option to instead give fake data

XPrivacy was an Xposed module with a similar featureset to PMX, but when it was rewritten as XPrivacyLua they instead swapped to feeding apps fake data, because revoking permissions often causes apps to crash or malfunction.

It would be great to be great to see PMX have the same functionality. Xposed these days is too much of a security vulnerability for me to use but the root requirement of PMX suits my needs fine.

[Feature Request] Watch permission called ...

How to monitor whether a certain permission of other apps is being called?
For example, if the application calls the use of the clipboard once, then the control software will record it once.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.