MuntashirAkon / SetEdit

Open source version of the original Settings Database Editor
GNU General Public License v3.0
301 stars 38 forks source link

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

Closed shouyou10 closed 3 years ago

shouyou10 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

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

MuntashirAkon commented 3 years ago

Fixed in 1795074

Protey commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 6 months ago

@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 commented 6 months ago

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 ?