Is there anyway to enable WRITE_SECURE_SETTINGS via ADB for an app in a user profile that is not installed in the owner profile?
WRITE_SECURE_SETTINGS in user profile
- Edited
Guess I'll start with the spiel...
Know that WRITE_SECURE_SETTINGS means that app can change almost everything in your settings app, possibly including other settings not listed there. I'd be very careful about the app you're granting access.
Anyway, this is supposedly the way you're supposed to do it, but last time I tried it didn't work. I think it's because I added access to logs to an app, and the grant access prompt didn't pop up for a secondary user. Guess that won't be an issue for you, but who knows. Let me know if it works!
adb shell pm list users
Get the user id you want, i.e. my "Facebook" user's id is 17: UserInfo{17:Facebook:410}
adb shell pm grant --user USER_ID com.package.name android.permission.WRITE_SECURE_SETTINGS
Thanks a bunch, that did it.
On a somewhat related note, is there a way to allow secondary user USB debugging?
Secondary user USB debugging? Not sure I follow. Anytime I want to use ADB while logged in from another user I just go to Owner, connect, then switch users. My computer doesn't have enough usb ports, so I usually just do it over wifi. I don't know if it stays connected via USB.
Unless you mean adding USB debugging to another user's settings? I don't believe it's possible since only the owner profile/user has system access.
unwat Thank you, I really appreciate your help and not only answering my questions, but from many others as I have witnessed on this forum. Your knowledge and patience in sharing it with us is greatly appreciated. I'm absolutely in love with this project and have already donated many times, also scheduled a monthly contribution to play a small part helping this project to prosper and develop.
Sure thing! I'm not working at the moment, so I don't have extra money laying around to contribute to the project. I saw some questions on here that were unanswered, so I just started answering them. I guess this is my contribution for now.
Thankful you contribute like others on here!