I want to enable a special permission for an app using ADB Shell. My phone is non-rooted & locked bootloader & Device name: Xiaomi MI A3, Code name: laurel_sprout. Apk name: Pokemod Espresso.
I've used this code but failed:
Code:
adb shell pm grant com.pokemod.espresso android.permission.QUERY_ALL_PACKAGES
ADB Shell says this is an unknown code. I found the permission name on another third party permission checker app from Google play store. Here's the photo where I found the permission name.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Please help me as soon as possible. Thanks in advance, May Allah bless you .
Always enquote the command that adb shell should perform
Code:
adb shell "pm grant com.pokemod.espresso android.permission.QUERY_ALL_PACKAGES"
jwoegerbauer said:
Always enquote the command that adb shell should perform
Code:
adb shell "pm grant com.pokemod.espresso android.permission.QUERY_ALL_PACKAGES"
Click to expand...
Click to collapse
Still now it says error.
Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown permission: android.permission.QUERY_ALL_PACKAGES
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:2109)
at com.android.server.pm.permission.PermissionManagerService.access$900(PermissionManagerService.java:122)
at com.android.server.pm.permission.PermissionManagerService$PermissionManagerServiceInternalImpl.grantRuntimePermission(PermissionManagerService.java:3058)
at com.android.server.pm.PackageManagerService.grantRuntimePermission(PackageManagerService.java:6075)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:1955)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:230)
at android.os.ShellCommand.exec(ShellCommand.java:104)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:22273)
at android.os.Binder.shellCommand(Binder.java:881)
at android.os.Binder.onTransact(Binder.java:765)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4860)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4339)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)
Do you know how to fix it ?
You were told the reason why it failed
Code:
Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown permission: android.permission.QUERY_ALL_PACKAGES
THE PERMISSON YOU WANT TO GRANT DOESN'T EXIST IN THE APP.
Contact app's developer.
Related
Ok so after so much pain placing the binaries ( su and busybox ) and the Superuser.apk and chmod them correctly i have an error.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
For those who couldnt see it properly, I am gonna type the whole thing again
Code:
[email protected]:/$ su
\java.lang.SecurityException: Permission Denial: broadcast asks to run as user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USER_FULL or android.permission.INTERACT_ACROSS_USER at android.os.Parcel.readException(Parcel.java:1425)
at android.os.Parcel.readException(Parcel.java:1379)
at android.app.ActivityManagerProxy.broadcastIntent(ActivityManagerNative.java:2158)
at com.android.commands.amAm.sendBroadcast(Am.java:616)
at com.android.commands.am.Am.run(Am.java:121)
at com.android.commands.am.Am.main(Am.java:82)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:306)
at dalvik.system.NativeStart.main(Native Method)
Permission Denied
Well i know this is a signature problem, and i need a solution.
Things I can do :
I have FULL ACCESS TO THE WHOLE SYSTEM. ( Its a dual os tab (triple os becoz i live boot linux for chmod))
And that means read/write access to everything on the system itself.
I need to remove this permission if possible.
Android OS : 4.2.2 Jelly Bean
Busybox runs without any problems.
Well it shows all the info on busybox(before it shows permission denied instead), but if i try mount it says mount : operation not permitted.
#I did make 2 posts before about rooting my tab which didn't get even replied once so pls reply ASAP.
A dedicated SuperSU support thread is available for you here
http://forum.xda-developers.com/apps/supersu/support-update-failures-t2907365
Browse the thread to see if others have faced the same problem and how/if they solved it.
And you can ask for support/help there.
Good luck
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
welcome to this new tutorial
such as changing the state of SELinux on xperia devices
Requirements:
- Devices Xperia
- Root Access
- Installed busybox
- Support init.d
- Root Explorer (optional)
Process:
1.- with root explorer locate the following directory /system file in search of build.prop
2.- add the following line so that we can afford to view the status of SELinux on our device
Code:
ro.build.selinux=1
3.- save changes
4.- reset your device and settings on the phone will appear to them the status of SELinux
- attached screenshot
5.- within the init.d folder create a script with the name 88SELinux and add the following code
Code:
#!/system/bin/sh
chmod 0644 /sys/fs/selinux/disable
setenforce 0
setprop ro.boot.selinux disable
echo 0 > /sys/fs/selinux/enforce
echo 0 > /sys/fs/selinux/disable
exit 0;
6.- 88SELinux file take permission octal 0755 can use root explorer and enter the number 0755 attached screenshot
7.- restart the terminal and the status of SELinux should appear as in the screenshot
8.- finally if you do not change the status of SELinux it is because their init.d support is not working
Good work bro lml
i have been searching but no method worked until i found this and tried on many pc's and devices, it worked like a charm, i have made a video and explained in the easy way so everyone can do it.Here is the video tutorial and below is the written guide..https://youtu.be/Uv42aVXCV-c
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
THIS COMMAND WILL FIX THE UNAUTHORIZED ISSUE WHEN YOU DONT GET RSA POP UP, SO
PUT YOUR PHONE IN TWRP AND CONNECT TO PC BEFORE EXECUTING THIS COMMAND IN CMD OR TERMINAL OTHERWISE IT WILL NOT WORK,
IF YOU CANT UNDERSTAND THE GUIDE THEN YOU CAN TAKE HELP FROM VIDEO LINK ABOVE.
This method will fix your adb unauthorized problem.
Here is the command
FIRST COMMAND
for linux
cd ~/.android && adb push adbkey.pub /data/misc/adb/adb_keys
SECOND COMMAND
adb reboot
for Windows
cd c:/users/YOURUSERNAME/.android && adb push adbkey.pub /data/misc/adb/adb_keys
CHANGE THE USERNAME WITH YOURS!!! in windows command
FOR EXAMPLE cd c:/users/waleed/.android && adb push adbkey.pub /data/misc/adb/adb_keys
STEPS WINDOWS
1- REBOOT INTO RECOVERY TWRP
2- CONNECT PHONE TO PC
3- GOTO CMD AND APPLY THIS COMMAND
STEPS LINUX
1- REBOOT INTO RECOVERY TWRP
2- CONNECT PHONE TO PC
3- GOTO TERMINAL AND APPLY COMMAND
Worked! But I suggest you remove that immodest wallpaper of unveiled woman.
Hi
Any suggestions for apps to encrypt the phone storage ?
Thanks
Depending on Android version encryption ( FDE and/or FBE ) it's automatically done by Android.
You can test encryption-state via ADB
Code:
adb shell getprop ro.crypto.state
See also here:
Encryption | Android Open Source Project
source.android.com
I have Android 10 , is there an app ? I dont know how to use shell commands
To access phone's Android OS and run thereon shell commands you need
1. To search for the appropriate Android USB drivers suitable to your phone
2. Download and install them on PC
tried now
Code:
adb shell getprop ro.crypto.state
result: encrypted
it say encrypted but I dont have to select the device first ? I also tried in Honor 8x for any settings to indicate encrypting but did not find any
you can type separately. this way you will see phones shell name
Code:
adb shell
getprop ro.crypto.state
getprop ro.crypto.type
getprop ro.build.fingerprint
you can also do it without adb shell by typing commands in that terminal emulator
https://f-droid.org/repo/jackpal.androidterm_72.apk
sorry what this mean ?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
state = encrypted: your userdata partition is encrypted
type = file: encryption type is FBE file-based encryption. this means every file is encrypted with it's own encryption key. encryption is bonded to screen lock password
fingerprint contains device brand, model no, android version, software release build no = Huawei Honor 8x JSN-L22 on Android 10 in your case.
i was messing with termux on my SM-N975U, developer options on, phone isnt rooted. I ended up with a " > " symbol in which I could still type commands, but got no response. What does a " > " mean ? Thats the only symbol in the start of the command line. I didnt know where to go from there, and I...well I thought mybe Id be able to reach the root directory of my android system.
What version of Termux ?
Termux for Android typically has the $ sign prompt
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
if you start app > symbol means terminal emulator has no connection to shell. in other words initialising of app is not finished and app is not ready for use (yet)
if you type commands with wrong balanced single quotes, > symbol means it is waiting for you to finish input. type ' and finish with enter.
Code:
:/ $ echo 'Hello
> World'
Hello
World
:/ $
there exist other commands waiting for input, exit by simply closing app if you don't know how to finish input.
very well explained , thank you very much! Merry Christmas!
It is the Github version, latest. Actually , i was already using the terminal, i migrated to here > somehow. Ultimately I ended up closing the app. I did try to work my way back thru the file system tree that I followed to get to > , but I couldnt seem to do it . The thing i didnt try was :/ $.
:/ $ is just my prompt, nothing I typed