Set Secure settings [Permission denial] despite root

835 views
Skip to first unread message

Riku

unread,
Sep 30, 2017, 12:36:22 PM9/30/17
to Automate
Hi,

The attached flow used to work on the same device on LP with SuperSu. Now with Magisk 13.3 on Android 6.0.1 (stock ROM for Zenfone 2) it triggers Permission denial returning this (debug logging ON):

2017-09-30 18:12:35.919 INFO 9565@1: Flow beginning
2017-09-30 18:12:35.919 INFO 9565@2: Resolve service?
2017-09-30 18:12:38.028 USER 9565@4: Name:  Éva (français)
2017-09-30 18:12:38.029 USER 9565@3: Package: voxygen.tts.eva
2017-09-30 18:12:38.029 INFO 9565@5: System setting set
2017-09-30 18:12:38.031 FAIL 9565@5: java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
2017-09-30 18:12:38.032 INFO 9565@5: Stopped by failure

  • However I can run shell command as supersuser block with no issue.
  • The settings→Authorize superuser access return is ok.
  • I tried all the Se Linux contexts to no avail.
Here is my superuser debug log.

Is this a known issue with Android 6.0.1 or Magisk?

Set TTS Engine.flo

Henrik "The Developer" Lindqvist

unread,
Oct 1, 2017, 12:12:56 PM10/1/17
to Automate
Did you gen an "Failed to gain superuser access" when starting Automate?
If so, it's an Magisk issue. It seems to only work with SELinux mode set to Permissive, since it's using a too restrictive SELinux context and doesn't support switching it as SuperSU do.

Riku

unread,
Oct 1, 2017, 5:50:24 PM10/1/17
to Automate
Yes, I do.

When I have more time, I will try to change Magisk for SuperSU see if it can solve this issue on Android 6.0.1.

Riku

unread,
Oct 16, 2017, 8:22:59 PM10/16/17
to automa...@googlegroups.com
Issue is fixed now. Here is what I did:
  • Unroot and uninstall Magisk
  • Root with SuperSU 2.82SR5 (systemless)
  • At first boot I got "Failed to gain superuser access" Automate Notification just like with Magisk because Automate didn't get the SU permission yet.
  • Once I granted Automate with SU the flow still got java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
  • A reboot (was required) and fixed the issue. No more "Failed to gain superuser access" Automate Notification at start and the flow works with SuperSU SELinux context set to Default only.
Reply all
Reply to author
Forward
0 new messages