Cannot run Set LineageOS System Setting with root enabled
Moderator: Martin
Cannot run Set LineageOS System Setting with root enabled
Hi,
I was experimenting with the Set LineageOS System Setting action as I wanted to change the performance mode of my device (Xiaomi Mi 5s, LineageOS 15.1, Android 8.1) when opening certain apps.
Automagic has root access, which I manage within the system itself, in the Developer settings, as I've installed the respective official supersu plugin for Lineage.
If I remember correctly, it was working fine the first time I used it. But then, I accidentally ran the action with root disabled, so I got an error. I proceeded to enable root access and tried again, but this time I got the same error as before: it told me to have root enabled or grant access via adb.
I tried restarting the service and my phone, disabling device admin (so I could force close the app), rejecting and then granting superuser access again, and, as I don't have a PC to use right now, I tried granting Automagic access via a Terminal Emulator using commands su and pm grant. But it just doesn't want to work.
Do you know any workarounds for this?
Thanks in advance.
I was experimenting with the Set LineageOS System Setting action as I wanted to change the performance mode of my device (Xiaomi Mi 5s, LineageOS 15.1, Android 8.1) when opening certain apps.
Automagic has root access, which I manage within the system itself, in the Developer settings, as I've installed the respective official supersu plugin for Lineage.
If I remember correctly, it was working fine the first time I used it. But then, I accidentally ran the action with root disabled, so I got an error. I proceeded to enable root access and tried again, but this time I got the same error as before: it told me to have root enabled or grant access via adb.
I tried restarting the service and my phone, disabling device admin (so I could force close the app), rejecting and then granting superuser access again, and, as I don't have a PC to use right now, I tried granting Automagic access via a Terminal Emulator using commands su and pm grant. But it just doesn't want to work.
Do you know any workarounds for this?
Thanks in advance.
Re: Cannot run Set LineageOS System Setting with root enable
Do you update the superSU binary during the test? Can you try other root command such as execute root command and see if it works. Example : dumpsys battery
Do you update the LOS build? I am now on RR 7.0 Pie 9.0, and this action doesn't detect that my ROM is LOS 16 based. So I can't use that action anymore.
Do you update the LOS build? I am now on RR 7.0 Pie 9.0, and this action doesn't detect that my ROM is LOS 16 based. So I can't use that action anymore.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Cannot run Set LineageOS System Setting with root enable
Thanks for your reply. I tried using one of the suggested root commands in Automagic screencap and worked just fine.
Every time root commands are executed there's a hash that shows up in the statusbar, which was shown while running that root command, but it didn't when trying to execute Set LineageOS System Setting .
About the su binary, it's up to date as far as I know. Though it doesn't seem to be updated very often. Last update was September 12, 2018 according to LineageOS' Extras website (https://download.lineageos.org/extras).
As of my LOS build, I receive updates daily, but since most of them include almost any changes at all, I don't update very often. I'm currently using the release of January 22, 2019. Looking at the changelog, it doesn't seem that the changes in the lastest versions would fix the issue. I will try anyway.
I also just tried clearing the app data with no changes. I don't know if it's important but I granted Automagic WRITE_SECURE_SETTINGS permission for Set System Setting via adb before I rooted my device, so it seems like the app isn't even using root access to execute those kind of actions. I don't know if there's any link between both actions in the app, but I think that maybe Automagic it's not trying to use root for Set LineageOS System Setting because the permission required for Set System Setting was granted with adb. But I'm just speculating, as I don't know how to fix it, although I think using adb for the lineage permission may work.
I'd just like to know if there's some way to fix it at least temporarily while I don't have access to a PC to test using adb.
Every time root commands are executed there's a hash that shows up in the statusbar, which was shown while running that root command, but it didn't when trying to execute Set LineageOS System Setting .
About the su binary, it's up to date as far as I know. Though it doesn't seem to be updated very often. Last update was September 12, 2018 according to LineageOS' Extras website (https://download.lineageos.org/extras).
As of my LOS build, I receive updates daily, but since most of them include almost any changes at all, I don't update very often. I'm currently using the release of January 22, 2019. Looking at the changelog, it doesn't seem that the changes in the lastest versions would fix the issue. I will try anyway.
I also just tried clearing the app data with no changes. I don't know if it's important but I granted Automagic WRITE_SECURE_SETTINGS permission for Set System Setting via adb before I rooted my device, so it seems like the app isn't even using root access to execute those kind of actions. I don't know if there's any link between both actions in the app, but I think that maybe Automagic it's not trying to use root for Set LineageOS System Setting because the permission required for Set System Setting was granted with adb. But I'm just speculating, as I don't know how to fix it, although I think using adb for the lineage permission may work.
I'd just like to know if there's some way to fix it at least temporarily while I don't have access to a PC to test using adb.
Re: Cannot run Set LineageOS System Setting with root enable
For lineageOS, the permission is different. It is
You can grant this using terminal emulator or execute root command.
Maybe you have granted it in the past, and uninstall Automagic or reset the data/permission. Hence need to be granted again.
Code: Select all
adb shell pm grant ch.gridvision.ppam.androidautomagic lineageos.permission.WRITE_SECURE_SETTINGS
Maybe you have granted it in the past, and uninstall Automagic or reset the data/permission. Hence need to be granted again.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Cannot run Set LineageOS System Setting with root enable
I already tried that with a terminal emulator as I mentioned in the 1st post, trying to grant the lineage permission, but I used su and pm grant instead as you need to have adb to run exactly that command.
I didn't know I could run it with Execute Root Command so I tried using that but same result: Automagic didn't even try to run it when adb shell was in the command, even though it said it executed the action successfully, probably because it didn't find the command adb, or at least that was the response I got when using the Terminal Emulator. Then removing that part of the command, it seemed like it ran it, but the action Set LineageOS System Setting still didn't work. When I tried that with the Terminal Emulator, it also seemed like it worked, but it was interesting that I had no response after it.
I figured that I could use the command su and then dumpsys package ch.gridvision.ppam.androidautomagic to see all the permissions granted to Automagic (also some Googling helped me). And it seems like the commands that I ran before actually worked, as the permission is effectively granted to Automagic, so I think that it's a bug in the app not detecting it or something, as I already tried clearing the data and changed nothing.
I didn't know I could run it with Execute Root Command so I tried using that but same result: Automagic didn't even try to run it when adb shell was in the command, even though it said it executed the action successfully, probably because it didn't find the command adb, or at least that was the response I got when using the Terminal Emulator. Then removing that part of the command, it seemed like it ran it, but the action Set LineageOS System Setting still didn't work. When I tried that with the Terminal Emulator, it also seemed like it worked, but it was interesting that I had no response after it.
I figured that I could use the command su and then dumpsys package ch.gridvision.ppam.androidautomagic to see all the permissions granted to Automagic (also some Googling helped me). And it seems like the commands that I ran before actually worked, as the permission is effectively granted to Automagic, so I think that it's a bug in the app not detecting it or something, as I already tried clearing the data and changed nothing.
- Attachments
-
- PicsArt_02-02-10.18.06.png (310.92 KiB) Viewed 18567 times
Re: Cannot run Set LineageOS System Setting with root enable
I thought you grant only the default write secure permission. Looking from the dumpsys result, it is correct already. Something seems not working. I remember ever having similar problem, but forgot how to sort it out. Maybe restart, maybe a full Automagic reinstall (of course backup the flow and widget first).
I forgot to remove the adb shell prefix. That is only for running from adb. In terminal emulator and execute root command, the command start from pm, not need adb shell anymore.
I forgot to remove the adb shell prefix. That is only for running from adb. In terminal emulator and execute root command, the command start from pm, not need adb shell anymore.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Cannot run Set LineageOS System Setting with root enable
I've just done both and the problem persists. And when checking for permissions after reinstall, both WRITE_SECURE_SETTINGS permissions are still granted.
I will try with adb later anyway, just in case it fixes the issue. But quite probably it's a bug. For better inspection, here's a copy of the log below:
I will try with adb later anyway, just in case it fixes the issue. But quite probably it's a bug. For better inspection, here's a copy of the log below:
Code: Select all
03.02.2019 09:38:04.806 [Manual Test] Action 'Set LineageOS System Setting: Secure performance_profile to 2' Setting Secure 'performance_profile' from '1' to '2'.
03.02.2019 09:38:04.834 [Manual Test] Action 'Set LineageOS System Setting: Secure performance_profile to 2' failed
ch.gridvision.ppam.androidautomagiclib.util.m: Root functions must be enabled in the settings or secure settings permission must be granted by adb (see help)
at ch.gridvision.ppam.androidautomagic.model.a.ex$1.a(SourceFile:207)
at ch.gridvision.ppam.androidautomagic.model.a.ex$1.c(SourceFile:157)
at ch.gridvision.ppam.androidautomagiclib.util.ci$1.run(SourceFile:40)
at java.lang.Thread.run(Thread.java:764)
03.02.2019 09:38:04.835 [Manual Test] End executing action 'Set LineageOS System Setting: Secure performance_profile to 2' and exception Root functions must be enabled in the settings or secure settings permission must be granted by adb (see help)
Re: Cannot run Set LineageOS System Setting with root enable
It seems to be bug then. Both root and write secure permission has been granted, and Automagic still asking for the permisson. Unfortunately I can't confirm this, since that action is totally broken now in my current RR pie ROM. The ROM is testing build, so I have expected bug. Can't rollback, since there is no other Pie ROM. Changing ROM will require me to do backup-restore ritual and modify several flows, which is too hassle do. Let's wait Martin's comment on this. As you have provide a clear log when it is not working.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Cannot run Set LineageOS System Setting with root enable
I finally got to test using adb with a PC, just to see if that would change anything. It unfortunately didn't, still permission granted. I also tried revoking the permission and then granting it again, running an action that requires it between actions, to make sure Automagic gets the changes. No luck either.
So it's clear that it's a bug, or at least I don't know about any other thing I can try to make it work. Don't worry about rolling back for testing, I've been through that process in the past and I know how tedious it can be. Anyway, let's wait for Martin to take a look at it.
So it's clear that it's a bug, or at least I don't know about any other thing I can try to make it work. Don't worry about rolling back for testing, I've been through that process in the past and I know how tedious it can be. Anyway, let's wait for Martin to take a look at it.
Re: Cannot run Set LineageOS System Setting with root enable
I have updated the ROM thrice after my last post. Currently already on the latest
RR 7.0.0 20190216 whyred official
Android Pie 9.0
Android security patch : 5 January 2019
Vendor security patch : 1 January 2019
Kernel version : 4.4.174-PureCAF+ (stock kernel from ROM)
Magisk : 18.1
LOS permission has been granted : true
I still can't use the Set LOS System Setting, error with : "Changing Lineage0S system settings is not supported on this ROM". It seems Automagic still can't detect LOS 16 yet. Because RR 7.0.0 is based on LOS 16. I am pretty sure about this, as I still have /data/user_de/0/org.lineageos.lineagesettings/databases/lineagesettings.db
RR 7.0.0 20190216 whyred official
Android Pie 9.0
Android security patch : 5 January 2019
Vendor security patch : 1 January 2019
Kernel version : 4.4.174-PureCAF+ (stock kernel from ROM)
Magisk : 18.1
LOS permission has been granted : true
I still can't use the Set LOS System Setting, error with : "Changing Lineage0S system settings is not supported on this ROM". It seems Automagic still can't detect LOS 16 yet. Because RR 7.0.0 is based on LOS 16. I am pretty sure about this, as I still have /data/user_de/0/org.lineageos.lineagesettings/databases/lineagesettings.db
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.