Grant permission to app not requesting permissions? - Android Q&A, Help & Troubleshooting

I want to grant INJECT_EVENTS permission to a SSH app that I downloaded in order to emulate touch using SSH.
I plugged into my computer and typed the following, but got the error below
Code:
adb -d shell pm grant net.xnano.android.sshserver android.permission.INJECT_EVENTS
Security exception: Package net.xnano.android.sshserver has not requested permission android.permission.INJECT_EVENTS
Click to expand...
Click to collapse
My Pixel 3a(Android 10) does not have the setting to Disable permission monitoring, as other internet sources said to try.
Are there any other ways I could grant permissions to an app that I did not make without rooting?

@spencer_3
Only the permissions that are defined in the APK's manifest file can be granted/revoked .

Related

Root access is not properly operating or granted on this device. Pls. HELP ME OUT

Hello,
I have rooted my Samsung Galaxy Grand Quattro almost 3 months ago....
I had disabled (freeze) system app: SuperUser using lucky patcher but now I ain't able to enable the package using lucky patcher. Moreover, I can't even see SuperUser in settings to enable it.
But, I can see the SuperUser app in many third party apps such as Shareit, Apkextractor, etc the problem is that I am not able to give root privileges to apps.
What can be done to get complete root access? Root Checker is showing the root is incomplete. Lucky Patcher has asked to install some binary SU files. An exposed installer is also unable to install framework and hence modules.
I even installed paid version of Root Checker app results are as follows:
Root Checker Pro Results
Overall Status: Root access is not properly operating or granted on this device
Feedback Mode: Install Root
Issue: Unable to access root user account
Feedback: Step 1) Verify whether superuser app granted root permission
Step 2) Reinstall superuser app with su binary, ideally from the custom recovery (TWRP, etc.)
Stage 1 - Superuser App: Installed
Installed: Kinguser by KingRoot - version 5.3.0
Installed: Superuser by Kingo - version 2.1.8.1
Stage 2 - Superuser Binary Files: Installed
Standard System Location
Command: ls -l /system/bin/su
Result: -rwsr-sr-x root root 133472 2017-07-14 21:42 su
Version: kingo 14
Analysis: Root access IS correctly configured for this file! Executing this file can grant root access! Setuid attribute is present and root user ownership is present.
Standard System Location
Command: ls -l /system/xbin/su
Result: -rwsr-sr-x root root 133472 2017-07-14 21:42 su
Version: kingo 14
Analysis: Root access IS correctly configured for this file! Executing this file can grant root access! Setuid attribute is present and root user ownership is present.
Standard System-less Location
Command: ls -l /su/bin/su
Result: /su/bin/su: No such file or directory
Analysis: File /su/bin/su does not exist.
Alternative Location
Command: ls -l /sbin/su
Result: /sbin/su: Permission denied
Analysis: File system permissions restricted and denied access.
Alternative Location
Command: ls -l /system/sbin/su
Result: /system/sbin/su: Permission
Regards,
Atharva Chavan
{[email protected]}

Developing custom app as system app - AOSP

Did anyone developed an app that you want to be installed as a preinstalled app on your custom Android image (Oreo)?
I am trying to add my app, I have done so far:
I went on the device where I have flashed my custom Android (AOSP) and using adb shell I wen to system/etc/permissions/privapp-permissions-google.xml
I have added my package name and permissions I want to be preaproved with my custom ROM.
Code:
<permissions>
<privapp-permissions package="com.package.name">
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_COARSE_LOCATION
android.permission.INTERNET
android.permission.ACCESS_MOCK_LOCATION
android.permission.WRITE_SETTINGS
</privapp-permissions>
</permissions>
And when I look with
Code:
adb shell dumpsys package com.package.name
I only get
Code:
requested permissions:
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_COARSE_LOCATION
android.permission.INTERNET
android.permission.ACCESS_MOCK_LOCATION
android.permission.WRITE_SETTINGS
install permissions:
android.permission.WRITE_SETTINGS: granted=true
android.permission.INTERNET: granted=true
As you notice, my package is not granted all permissions I need. I have also added to my Android.mk of my AOSP build flag :
Code:
ro.control_privapp_permissions=enforce
Whatever I try to do I can`t manage to get my app to have all the permissions I need when I flash and push my app to the device.
Did anyone had experience with this? Any input would be appreciated
Icarus0348 said:
Did anyone developed an app that you want to be installed as a preinstalled app on your custom Android image (Oreo)?
I am trying to add my app, I have done so far:
I went on the device where I have flashed my custom Android (AOSP) and using adb shell I wen to system/etc/permissions/privapp-permissions-google.xml
I have added my package name and permissions I want to be preaproved with my custom ROM.
Code:
<permissions>
<privapp-permissions package="com.package.name">
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_COARSE_LOCATION
android.permission.INTERNET
android.permission.ACCESS_MOCK_LOCATION
android.permission.WRITE_SETTINGS
</privapp-permissions>
</permissions>
And when I look with
Code:
adb shell dumpsys package com.package.name
I only get
Code:
requested permissions:
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_COARSE_LOCATION
android.permission.INTERNET
android.permission.ACCESS_MOCK_LOCATION
android.permission.WRITE_SETTINGS
install permissions:
android.permission.WRITE_SETTINGS: granted=true
android.permission.INTERNET: granted=true
As you notice, my package is not granted all permissions I need. I have also added to my Android.mk of my AOSP build flag :
Code:
ro.control_privapp_permissions=enforce
Whatever I try to do I can`t manage to get my app to have all the permissions I need when I flash and push my app to the device.
Did anyone had experience with this? Any input would be appreciated
Click to expand...
Click to collapse
Your app need to be in the priv-app folder in order to get privileges whitelist permission from privapp-permissions-google.xml.
Btw, I am actually looking for a way which is able to make app as privileges without put into priv-app folder.

Finding the cause of permission denials which doesn't appear in the logcat

Hello.
I'm developing a native app for Android, and I'm occasionally confronted with permission denied which doesn't trigger a log in the logcat logs.
For example, trying to run:
Code:
cat /proc/1/maps
from the adb shell prompt results in a permission denied message sent to stderr, but nothing appears in the logcat. It's not a unix permissions problem as well, as anyone should be able to read the file:
Code:
1|[email protected]:/ $ ls -lZ /proc/1/maps
[B]-r--r--r--[/B] root root u:r:init:s0 maps
It happens in some other situations as well, in which I have less control of the environment.
Is it possible that this is caused by some dontaudit rules in the policy? I ran sesearch --dontaudit /sepolicy but didn't find there any relevant rules.
Does anyone here know why are some denials sent to the log and some don't, and how to debug such cases?
Thanks!

java.io.IOException: Cannot run program; error=13, Permission denied

installed an apk I built on flutter and im getting this error from adb logcat:
>java.io.IOException: Cannot run program "/data/user/0/com.invertedx.sentinelx/app_torfiles/tor.so" (in directory "/data/user/0/com.invertedx.sentinelx/app_torfiles"): error=13, Permission denied
it relates to bundled tor which is failing to connect in the app. how do I grant permission?

termux can't execute permission denied

i installed magisk and updated the package installed python gave it root permission but when i try
to run anything it ends with the error i mentioned
i tried to install nethunter
sudo ./install-nethunter-termux
and i got that
env: can't execute './install-nethunter-termux': Permission denied
how can i solve that

Categories

Resources