Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What command should I run to give permission to SetEdit #6

Closed
shouyou10 opened this issue Feb 8, 2021 · 26 comments
Closed

What command should I run to give permission to SetEdit #6

shouyou10 opened this issue Feb 8, 2021 · 26 comments

Comments

@shouyou10
Copy link

I am using the F-droid version of "SetEdit" apk. I command given on the F-droid description is not working for me. Can you please tell me what measures should I take in details?

@drogga
Copy link

drogga commented Mar 31, 2021

@shouyou10 - It is working (make sure you don't use the 'original' from PlayStore, cuz it's with a different Package Name) !

adb shell
pm grant io.github.muntashirakon.setedit android.permission.WRITE_SECURE_SETTINGS

@MuntashirAkon
Copy link
Owner

@drogga Thanks. I'll add the link to the F-Droid repo as well as the description from there.

@MuntashirAkon
Copy link
Owner

Fixed in 1795074

@Protey
Copy link

Protey commented Mar 1, 2023

I hope I did the right thing by raising the old branch so as not to create a new one of the same)
I can't get permission for the SetEdit application, i.e. it is issued, but the SetEdit application still asks for permission.
image

I specially downloaded the SetEdit application from the Play Market, also gave it permission, and everything works without problems, BUT I would like to use your application since it has a search, it's very convenient!

@MuntashirAkon
Copy link
Owner

I can't get permission for the SetEdit application, i.e. it is issued, but the SetEdit application still asks for permission.

Quite unusual. Use another app such as App Manager to check if the permission was actually granted to SetEdit.

@Protey
Copy link

Protey commented Mar 1, 2023

Quite unusual. Use another app such as App Manager to check if the permission was actually granted to SetEdit.

I have never used the App Manager, downloaded it from the Play Market, and I do not know where, and how, to see that permission has been granted.

@MuntashirAkon
Copy link
Owner

I have never used the App Manager, downloaded it from the Play Market, and I do not know where, and how, to see that permission has been granted.

I mean this App Manager: https://github.com/MuntashirAkon/AppManager/ (It's not available on Play Store).

@Protey
Copy link

Protey commented Mar 1, 2023

I have never used the App Manager, downloaded it from the Play Market, and I do not know where, and how, to see that permission has been granted.

I mean this App Manager: https://github.com/MuntashirAkon/AppManager/ (It's not available on Play Store).

Do you need to show the "Uses permissions" tab, or the "Permissions" tab?

@MuntashirAkon
Copy link
Owner

Do you need to show the "Uses permissions" tab, or the "Permissions" tab?

In uses permissions tab, check if WRITE_SECURE_SETTINGS permission is granted.

@Protey
Copy link

Protey commented Mar 1, 2023

Here is a screenshot of the Settings Database Editor application
image

Here is a screenshot of the app, from the Play Market, 4A Settings Database Editor
image

As I said above, I got access through 4A Settings Database Editor without any problems, but not through Settings Database Editor, Settings Database Editor still asks me to grant access.
image

@MuntashirAkon
Copy link
Owner

Here is a screenshot of the Settings Database Editor application

As you can see in the screenshot, you haven't granted SetEdit the permission.

@Protey
Copy link

Protey commented Mar 1, 2023

As you can see in the screenshot, you haven't granted SetEdit the permission.

By what criteria did you see it?
Well, and, in my defense, I will answer - I provided a screenshot of the command line above, where I gave SetEdit permission, but it still asks for permission

@MuntashirAkon
Copy link
Owner

By what criteria did you see it?
Well, and, in my defense, I will answer - I provided a screenshot of the command line above, where I gave SetEdit permission, but it still asks for permission

Screenshot says you haven't granted the permission. So, a better option would be to try running that command again. This time check the name of the package and permission correctly, or set the mode of operation in App Manager to ADB, connect it to ADB and grant the permission there.

@Protey
Copy link

Protey commented Mar 1, 2023

Screenshot says you haven't granted the permission.

Sorry, I still can't see where in my screenshot you saw that permission was not granted, can you please indicate where on my screenshot?

So, a better option would be to try running that command again. This time check the name of the package and permission correctly, or set the mode of operation in App Manager to ADB, connect it to ADB and grant the permission there.

I'll try again, but I'm still interested in how you determine through the App Manager whether permission is granted or not.

@Protey
Copy link

Protey commented Mar 1, 2023

This is some kind of nonsense, I tried to grant permissions 5 times, I even downloaded it again SDK Platform-Tools for Windows, everything is useless!
image
image

@MuntashirAkon
Copy link
Owner

Sorry, I still can't see where in my screenshot you saw that permission was not granted, can you please indicate where on my screenshot?

See the highlighted section below. It says revoked but it should say granted.

222234201-6ff94807-213f-4394-836b-215e8e2f82fd

@MuntashirAkon
Copy link
Owner

This is some kind of nonsense, I tried to grant permissions 5 times, I even downloaded it again SDK Platform-Tools for Windows, everything is useless!

Try using App Manager to grant the permission. If there is an issue with granting the permission, App Manager will report it.

To do this, you'd need to enable ADB mode in App Manager > Settings > Mode of Operation after enabling Wireless debugging or ADB over TCP.

@Protey
Copy link

Protey commented Mar 1, 2023

Try using App Manager to grant the permission. If there is an issue with granting the permission, App Manager will report it.

To do this, you'd need to enable ADB mode in App Manager > Settings > Mode of Operation after enabling Wireless debugging or ADB over TCP.

It's getting ridiculous, and at the same time I want to cry, I turn on the resolution, update it, and it immediately turns off.
Recorded a video of how it happens:
https://user-images.githubusercontent.com/6497045/222262190-a2e7e74f-38d9-4f42-ae5b-0a3ba88e412e.mp4

P.S. deleting 4A Settings Database Editor didn't help, i.e. it's not because of 4A Settings Database Editor such nonsense.

@MuntashirAkon
Copy link
Owner

It's getting ridiculous, and at the same time I want to cry, I turn on the resolution, update it, and it immediately turns off.

Which device/OS is this? Never saw anything like it before.

@Protey
Copy link

Protey commented Mar 1, 2023

Which device/OS is this? Never saw anything like it before.

Device Tecno Spark 8C KG5n, Android 11
What is most interesting is that through the 4A Settings Database Editor application, permission is granted without any problems, but through your application, some problems arise.

@MuntashirAkon
Copy link
Owner

Have you tried reinstalling the app? Uninstall the app, restart your device and then install the app again. Permissions are managed by Android framework (via package_restrictions.xml). There's no reason for it working on one user app but not on another.

@Protey
Copy link

Protey commented Mar 2, 2023

Have you tried reinstalling the app? Uninstall the app, restart your device and then install the app again. Permissions are managed by Android framework (via package_restrictions.xml). There's no reason for it working on one user app but not on another.

Thank you, it really helped!
Just in case, I will write the steps of actions for those who will have the same problem.

  1. Deleted the 4A Settings Database Editor application and your SetEdit application.
  2. Rebooted the phone.
  3. Re-downloaded SetEdit from the repository https://github.com/MuntashirAkon/SetEdit/releases/, and installed it.
  4. Without launching SetEdit, launched the AppManager, and in the AppManager application gave, without any problems, the necessary permissions.
  5. I launched the SetEdit application, to check, everything is fine, the application has permission.

@drogga
Copy link

drogga commented Mar 2, 2023

I think it's better if you don't link to the current version tag, because this will change in future (there will be new vers.), but your link in those steps will still point to v2.3, which will be outdated then.

BTW, commenting because for some reason the notification I got here said that I was mentioned, but I wasn't, should've said "commented" - stupid GitHub...

There's a fork of this with a better UI (in my opinion) on Play Store...

@Protey
Copy link

Protey commented Mar 2, 2023

I think it's better if you don't link to the current version tag, because this will change in future (there will be new vers.), but your link in those steps will still point to v2.3, which will be outdated then.

well, I was hoping that others would understand that this may be applicable to other versions, but you're probably right, I fixed the link for this)

@Mkcein
Copy link

Mkcein commented Feb 29, 2024

@shouyou10 - It is working (make sure you don't use the 'original' from PlayStore, cuz it's with a different Package Name) !

adb shell
pm grant io.github.muntashirakon.setedit android.permission.WRITE_SECURE_SETTINGS

which command should I use for an app that is within my WORK PROFILE (SHELTER) the user it is is is 11 which command should I give to change the permissions from that user for this same code you posted above?

    UserInfo{0:PRINCIPAL:c13} running
    UserInfo{10:BANCOS:410} running
    UserInfo{11:Perfil de trabalho:1030} running

@drogga
Copy link

drogga commented Mar 1, 2024

IDK, but I guess: adb shell pm grant --user <USER_ID>, example: --user 1
In your case I guess: pm grant --user 11 io.github.muntashirakon.setedit android.permission.WRITE_SECURE_SETTINGS, but IDK if it will work...
Doesn't it just work while you are logged in that profile to just run the command, without specifying the user ID number ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants