Superuser/root issues

5,700 views
Skip to first unread message

Automate developer

unread,
Jun 17, 2015, 3:21:35 PM6/17/15
to automa...@googlegroups.com
Some users may encounter issues with blocks that require the superuser privilege, i.e. root. Of course, a rooted device is required!

Magisk users
In a root/su shell, try executing the following command to patch the SELinux policies:
magiskpolicy --live "allow * magisk binder call" "allow * magisk binder transfer"
Magisk 17.2 final release will hopefully include the above patch.

SuperSU users
Try a different SELinux context by changing the Superuser shell command setting to, either of:
su --context u:r:system_app:s0
su --context u:r:platform_app:s0
su --context u:r:shell:s0
su --context u:r:system_server:s0

General
As a last resort, if the device is running a custom ROM with a SELinux mode setting, try changing it from Enforcing to Permissive.


A few of the blocks requiring root can work without it, by granting certain permissions using ADB, see:
https://groups.google.com/d/topic/automate-user/HUm7yZPv578/discussion

Automate developer

unread,
Jun 17, 2015, 3:35:27 PM6/17/15
to automa...@googlegroups.com, henrik.l...@gmail.com
Android 5.0.1 or 5.0.2 user, please help!

It look like the "android.permission.WRITE_SECURE_SETTINGS" may have been removed in Android 5.0.2 or 5.0.1.
I don't have a Android 5.0.1 nor 5.02 device and the emulator only has a 5.1 image, so i need you to run an ADB command which lists all the available system permissions:
adb -s <device> shell pm list permissions -f

Post the output here on the forum, please include the exact Android version, i.e:
adb -s <device> shell getprop ro.build.version.release

Thanks for your help.

j.s.l...@gmail.com

unread,
Jul 29, 2015, 10:33:38 AM7/29/15
to Automate, henrik.l...@gmail.com
Here is it if you still want. Czech language windows.

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. Všechna práva vyhrazena.

i
:\temp\S4>adb -s efd35c1a shell getprop ro.build.version.release
adb server
is out of date.  killing...
* daemon started successfully *
5.0.1

i
:\temp\S4>adb -s efd35c1a shell pm list permissions -f
All Permissions:

+ permission:com.samsung.android.providers.context.permission.WRITE_USE_APP_FEAT
URE_SURVEY
 
package:com.samsung.android.providers.context
  label
:Zapsat diagnostick├ę informace
  description
:Zapsat diagnostick├ę informace
  protectionLevel
:normal
+ permission:com.sec.pcw.device.contentprovider.permission.WRITE
 
package:com.sec.pcw.device
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:com.touchtype.swiftkey.permission.C2D_MESSAGE
 
package:com.touchtype.swiftkey
  label
:null
  description
:null
  protectionLevel
:signature
+ permission:com.sec.android.phone.permission.AT_COMMAND
 
package:com.android.phone
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:com.samsung.videohub.permission.CONTENT_READ
 
package:com.samsung.everglades.video
  label
:com.samsung.videohub.permission.CONTENT_READ
  description
:null
  protectionLevel
:signature|system
+ permission:com.sec.android.app.contacts.permission.RECEIVE_CONTACTS_BROADCAST
 
package:com.android.providers.contacts
  label
:com.sec.android.app.contacts.permission.RECEIVE_CONTACTS_BROADCAST
  description
:null
  protectionLevel
:normal
+ permission:com.sec.chaton.push.BROADCAST_PUSH_MESSAGE
 
package:com.sec.chaton
  label
:null
  description
:null
  protectionLevel
:signature
+ permission:com.sec.android.phone.permission.TRANSPORTING_CALLER_NAME
 
package:com.android.incallui
  label
:TRANSPORTING_CALLER_NAME
  description
:null
  protectionLevel
:normal
+ permission:com.sec.pcw.permission.settings.CHANGE_VIDEO_OPTIMIZATION
 
package:com.sec.pcw
  label
:com.sec.pcw.permission.settings.CHANGE_VIDEO_OPTIMIZATION
  description
:null
  protectionLevel
:dangerous
+ permission:com.facebook.orca.permission.C2D_MESSAGE
 
package:com.facebook.orca
  label
:null
  description
:null
  protectionLevel
:signature
+ permission:com.sec.android.mmap.broastcasting.permission
 
package:com.sec.android.mmapp
  label
:null
  description
:null
  protectionLevel
:signature
+ permission:com.sec.android.app.snsimagecache.permission.WRITE_SNSIMAGECACHE_DB

 
package:com.sec.android.app.snsimagecache
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:com.android.vending.TOS_ACKED
 
package:com.android.vending
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:com.sec.knox.admin.permission.ACTION_MANAGE_SHORTCUT
 
package:com.sec.knox.knoxsetupwizardclient
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:android.permission.MANAGE_MEDIA_PROJECTION
 
package:android
  label
:Spr├íva relac├ş prom├şt├ín├ş m├ędi├ş
  description
:Umo┼ż┼łuje aplikaci spravovat relace prom├şt├ín├ş m├ędi├ş. Tyto re
lace mohou aplikac
├şm umo┼żnit zaznamen├ívat obsah obrazu a zvuku. B─Ť┼żn├ę apli
kace
by toto opr├ívn─Ťn├ş nem─Ťly nikdy pot┼Öebovat.
  protectionLevel
:signature
+ permission:com.sec.android.daemonapp.ap.yahoostock.stockclock.permission.YAHOO
_DAEMON_ACCESS_PROVIDER
 
package:com.sec.android.daemonapp
  label
:Unified Daemon(EUR)
  description
:null
  protectionLevel
:signature|system
+ permission:com.samsung.android.providers.context.permission.WRITE_CAPTURE_CONT
ENT
 
package:com.samsung.android.providers.context
  label
:null
  description
:null
  protectionLevel
:normal
+ permission:com.sec.android.app.snsimagecache.permission.REQUEST_IMAGE
 
package:com.sec.android.app.snsimagecache
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:com.samsung.android.permission.SAMSUNG_PHONESTYLE_COMPONENT
 
package:android
  label
:Samsung Phonestyle Component
  description
:Identifies a theme phonestyle component
  protectionLevel
:dangerous
+ permission:com.diagmondm.permission.WSSDM
 
package:com.sec.android.diagmonagent
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:com.samsung.android.scloud.backup.lib.read
 
package:com.samsung.android.scloud.backup
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:com.samsung.android.providers.context.permission.READ_USE_WIFI
 
package:com.samsung.android.providers.context
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:com.samsung.android.providers.context.permission.READ_PROFILE
 
package:com.samsung.android.providers.context
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:com.coolots.chaton.permission.C2D_MESSAGE
 
package:com.coolots.chaton
  label
:null
  description
:null
  protectionLevel
:signature
+ permission:com.sec.android.fotaclient.permission.C2D_MESSAGE
 
package:com.sec.android.fotaclient
  label
:null
  description
:null
  protectionLevel
:signature
+ permission:com.system.permission.READ_NOTIFICATIONS
 
package:android
  label
:com.system.permission.READ_NOTIFICATIONS
  description
:null
  protectionLevel
:signature|system
+ permission:com.sec.factory.permission.KEYSTRING
 
package:com.sec.factory
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:android.permission.ACCESS_BLUETOOTH_SHARE
 
package:com.android.bluetooth
  label
:P┼Ö├şstup ke spr├ívci stahov├ín├ş.
  description
:Umo┼żn├ş aplikaci spustit Spr├ívce sd├şlen├ş Bluetooth a pou┼ż├şt
ho k p
řenosu souborů.
  protectionLevel
:signature
+ permission:android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS
 
package:com.android.providers.downloads
  label
:Odeslat ozn├ímen├ş o sta┼żen├ş
  description
:Umo┼żn├ş aplikaci odes├şlat ozn├ímen├ş o dokon─Źen├Żch stahov├ín├ş
ch
. ┼ákodliv├ę aplikace to mohou vyu┼ż├şt ke zmaten├ş ostatn├şch aplikac├ş stahu
j
├şc├şch soubory
  protectionLevel
:signature
+ permission:com.google.android.apps.now.OPT_IN_WIZARD
 
package:com.google.android.googlequicksearchbox
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:android.permission.ACCESS_KEYGUARD_SECURE_STORAGE
 
package:android
  label
:P┼Ö├şstup k bezpe─Źn├ęmu ├║lo┼żi┼íti keyguard
  description
:Povol├ş aplikaci pou┼ż├şvat zabezpe─Źen├ę ├║lo┼żi┼ít─Ť Keyguard
  protectionLevel
:signature
+ permission:com.google.android.gms.permission.AD_ID_NOTIFICATION
 
package:com.google.android.gms
  label
:Ozn├ímen├ş o┬áinzertn├şm ID
  description
:Povolit aplikaci obdr┼żet ozn├ímen├ş o┬áaktualizaci inzertn├şho ID
 nebo nastaven
├ş omezen├ş sledov├ín├ş pro ├║─Źely inzerce.
  protectionLevel
:normal
+ permission:android.permission.FILTER_EVENTS
 
package:android
  label
:filtrov├ín├ş ud├ílost├ş
  description
:Umo┼żn├ş aplikaci registrovat vstupn├ş filtr, kter├Ż filtruje stre
am v
┼íech u┼żivatelsk├Żch p┼Öenos┼» p┼Öed jejich odvys├şl├ín├şm. ┼ákodliv├ę apli
kace mohou pou
┼ż├şvat u┼żivatelsk├ę rozhran├ş syst├ęmu bez z├ísahu u┼żivatele.
  protectionLevel
:signature
+ permission:com.samsung.android.providers.context.permission.READ_BROWSE_WEB
 
package:com.samsung.android.providers.context
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:com.google.android.gms.permission.C2D_MESSAGE
 
package:com.google.android.gms
  label
:null
  description
:null
  protectionLevel
:signature
+ permission:com.samsung.android.providers.context.permission.READ_APP_USAGE_DB
 
package:com.samsung.android.providers.context
  label
:com.samsung.android.providers.context.permission.READ_APP_USAGE_DB
  description
:null
  protectionLevel
:signature|system
+ permission:com.samsung.android.scloud.backup.lib.write
 
package:com.samsung.android.scloud.backup
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:com.android.launcher.permission.PRELOAD_WORKSPACE
 
package:com.sec.android.app.launcher
  label
:com.android.launcher.permission.PRELOAD_WORKSPACE
  description
:null
  protectionLevel
:signature|system
+ permission:com.samsung.android.providers.context.permission.WRITE_USE_APP
 
package:com.samsung.android.providers.context
  label
:null
  description
:null
  protectionLevel
:normal
+ permission:android.permission.CAPTURE_TV_INPUT
 
package:android
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:android.permission.SET_POINTER_SPEED
 
package:android
  label
:Zm─Ťnit rychlost ukazatele
  description
:Umo┼ż┼łuje aplikaci kdykoli zm─Ťnit rychlost ukazatele my┼íi nebo
touchpadu
. B─Ť┼żn├ę aplikace by toto opr├ívn─Ťn├ş nem─Ťly nikdy po┼żadovat.
  protectionLevel
:signature
+ permission:com.sec.android.email.EMAIL_ACCOUNT_SETUP
 
package:com.android.email
  label
:Email account setup
  description
:Inform accountsetup of email to knox
  protectionLevel
:signature|system
+ permission:com.coolots.chatonv.permission.provider.LIVE_SHARE
 
package:com.sec.chaton
  label
:null
  description
:null
  protectionLevel
:normal
+ permission:com.samsung.helphub.permission.WRITE_DATA
 
package:com.samsung.helphub
  label
:com.samsung.helphub.permission.WRITE_DATA
  description
:com.samsung.helphub.permission.WRITE_DATA
  protectionLevel
:normal
+ permission:com.google.android.apps.maps.permission.PREFETCH
 
package:com.google.android.apps.maps
  label
:null
  description
:null
  protectionLevel
:signature
+ permission:com.facebook.katana.permission.CROSS_PROCESS_BROADCAST_MANAGER
 
package:com.facebook.katana
  label
:null
  description
:null
  protectionLevel
:signature
+ permission:com.samsung.android.providers.context.permission.READ_MOVE_PLACE
 
package:com.samsung.android.providers.context
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:android.permission.BIND_DEVICE_ADMIN
 
package:android
  label
:Interakce se spr├ívcem za┼Ö├şzen├ş
  description
:Umo┼żn├ş aplikaci zas├şlat z├ím─Ťry spr├ívci za┼Ö├şzen├ş. Nikdy ne
n
├ş pot┼Öeba pro norm├íln├ş aplikace.
  protectionLevel
:signature
+ permission:com.carrieriq.iqagent.ClientAccess
 
package:android
  label
:com.carrieriq.iqagent.ClientAccess
  description
:null
  protectionLevel
:signature|system
+ permission:com.sec.android.videowall.permission.WRITE
 
package:com.sec.android.app.videoplayer
  label
:Videop┼Öehr├íva─Ź
  description
:null
  protectionLevel
:signature|system
+ permission:com.sec.factory.permission.ALLOWFTCLIENTCPOBIND
 
package:com.sec.factory
  label
:null
  description
:null
  protectionLevel
:signature|system
+ permission:com.google.android.portable.permission.READ
 
package:com.google.earth
  label
:─Źten├ş p┼Öenosn├ęho poskytovatele platformy Maps Engine
  description
:Umo┼ż┼łuje aplikac├şm t┼Öet├şch stran ─Ź├şst poskytovatele platfor
my Maps Engine.
  protectionLevel
:normal
+ permission:com.sec.android.app.calendar.permission.READ_CALENDAR_SETTINGS
 
package:com.android.calendar
  label
:null
  description
:null
  protectionLevel
:normal
+ permission:com.sec.knox.permission.KEYGUARD_SERVICE
 
package:com.sec.knox.containeragent2
Error: java.lang.NullPointerException: Attempt to read from field 'java.lang.Str
ing android.content.pm.ApplicationInfo.publicSourceDir'
on a null object referen
ce






Dne středa 17. června 2015 21:35:27 UTC+2 Automate developer napsal(a):

Automate developer

unread,
Jul 29, 2015, 2:19:07 PM7/29/15
to Automate, j.s.l...@gmail.com, j.s.l...@gmail.com
Thanks.
...

Automate developer

unread,
Aug 19, 2015, 8:01:33 PM8/19/15
to Automate
If you're having issue with superuser features, please download a run the following debug flow and post the flow log in this forum thread:
http://llamalab.com/automate/community/flows/1153

j.s.l...@gmail.com

unread,
Aug 25, 2015, 3:00:20 PM8/25/15
to Automate
Here it is.

2015-08-25 20:33:52.186 INFO 170@1: Flow beginning
2015-08-25 20:33:52.212 INFO 170@2: Shell command superuser
2015-08-25 20:33:54.264 USER 170@3: STDOUT:
2015-08-25 20:33:54.271 USER 170@4: STDERR: Error type 2
android
.util.AndroidException: Can't connect to activity manager; is the system running?
    at com.android.commands.am.Am.onRun(Am.java:301)
    at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
    at com.android.commands.am.Am.main(Am.java:102)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:255)

2015-08-25 20:33:54.279 INFO 170@5: Shell command
2015-08-25 20:33:54.343 USER 170@6: dev.bootcomplete: 1

2015-08-25 20:33:54.346 INFO 170@8: Shell command
2015-08-25 20:33:54.392 USER 170@7: init.svc.bootanim: stopped

2015-08-25 20:33:54.393 INFO 170@0: Stopped at end





Dne čtvrtek 20. srpna 2015 2:01:33 UTC+2 Automate developer napsal(a):

Automate developer

unread,
Aug 25, 2015, 3:06:02 PM8/25/15
to Automate, j.s.l...@gmail.com
Thanks. Which root provider app and Android version are you using?

j.s.l...@gmail.com

unread,
Aug 26, 2015, 3:51:51 AM8/26/15
to Automate, j.s.l...@gmail.com
I am using SuperSU 2.46 (latest version)
https://play.google.com/store/apps/details?id=eu.chainfire.supersu&hl=cs

Dne úterý 25. srpna 2015 21:06:02 UTC+2 Automate developer napsal(a):

Jacques Moi

unread,
Aug 29, 2015, 11:32:18 AM8/29/15
to Automate
Can you advise me when Superuser will be fixed. I am registered to your email list.
Or is there an another way to send MMI codes, y want to make a forwarding call setup in specific conditions

Salutations

Automate developer

unread,
Aug 29, 2015, 1:19:25 PM8/29/15
to Automate
The Superuser issue some are having will be fixed as soon as i can find the cause.
As it seems now, not even the Android shell commands used are working.

Sending USSD/IMM codes shouldn't require root, just use the Dial block.


If you're having issue with superuser features, please download a run the following debug flow and post the flow log in this forum thread:
http://llamalab.com/automate/community/flows/1153

Automate developer

unread,
Aug 31, 2015, 6:30:52 PM8/31/15
to Automate
From: https://plus.google.com/+AndrewHooper1/posts/9xLiVsLRiiz

2015-08-31 08:58:26.109 INFO 10@1: Flow beginning
2015-08-31 08:58:26.110 INFO 10@2: Shell command superuser
2015-08-31 08:58:28.210 USER 10@3: STDOUT: Broadcasting: Intent { act=com.example.foobar.intent.action.TEST } Broadcast completed: result=0
2015-08-31 08:58:28.211 USER 10@4: STDERR:
2015-08-31 08:58:28.211 INFO 10@5: Shell command
2015-08-31 08:58:28.269 FAIL 10@5: java.io.IOException: Permission denied
2015-08-31 08:58:28.271 INFO 10@5: Stopped by failure
Message has been deleted

ben.ra...@gmail.com

unread,
Sep 24, 2015, 2:47:00 PM9/24/15
to Automate
Here is my log. Cyanogenmod 12.1 with root access. SM-G900F:


2015-09-24 21:44:10.391 INFO 37@1: Flow beginning
2015-09-24 21:44:10.397 INFO 37@15: Shell command superuser
2015-09-24 21:44:12.728 USER 37@16: am out: Broadcasting: Intent { act=com.example.foobar.intent.action.TEST }
Broadcast completed: result=0

2015-09-24 21:44:12.729 USER 37@17: am err:
2015-09-24 21:44:12.729 INFO 37@2: Shell command superuser
2015-09-24 21:44:13.884 USER 37@3: id out: uid=0(root) gid=0(root) context=u:r:sudaemon:s0

2015-09-24 21:44:13.885 USER 37@4: id err:
2015-09-24 21:44:13.886 INFO 37@5: Shell command
2015-09-24 21:44:13.970 USER 37@6: dev.bootcomplete: 1

2015-09-24 21:44:13.970 INFO 37@8: Shell command
2015-09-24 21:44:14.001 USER 37@7: init.svc.bootanim: stopped

2015-09-24 21:44:14.001 INFO 37@9: Shell command
2015-09-24 21:44:14.020 USER 37@10: ro.build.selinux: 1

2015-09-24 21:44:14.026 INFO 37@11: App installed?
2015-09-24 21:44:14.027 USER 37@12: com.llamalab.automate.ext.storage: INSTALLED
2015-09-24 21:44:14.027 INFO 37@0: Stopped at end

Automate developer

unread,
Sep 24, 2015, 3:01:58 PM9/24/15
to Automate, ben.ra...@gmail.com
Thanks for the log. Superuser seems to be working, there should be no issue starting the superuser service.
What was your issue?

ben rapoport

unread,
Sep 24, 2015, 3:12:00 PM9/24/15
to Automate developer, Automate

The issue was that i couldn't hide the running notification. The option was greyed out.....

sebastien....@gmail.com

unread,
Sep 28, 2015, 1:09:06 PM9/28/15
to Automate

Hello


I do have the root issue with my Nexus 5 running latest SuperSu on Android M preview 3.


The debug flow is not producing anything particular but I do have the SuperSu debug log which I think will provide you with the root cause.


This is happening when using the Set CPU command.


Here is the log :


export CLASSPATH /data/app/com.llamalab.automate-2/base.apk

exec app_process /data/user/0/com.llamalab.automate com.llamalab.automate.SuperuserService 10189

Running as 0

java. lang.NoSuchMethodException: broadcastIntent [interface android.app.IApplicationThread, class android.content.Intent, class java.lang.String, interface android.content.IIntentReceiver, int, class java.lang.String, class android os.Bundle, class java.lang.String, int, boolean, boolean, int]

  at java.lang.Class.get.Method(Class java:624)

  at java.lang.Class.get.Method(Class java:603)

  at com.llamalab.automate.SuperuserService.broadcastIntent(Unknown Source)

  at com.llamalab.automate.SuperuserService.oncreate(Unknown Source)

  at com.llamalab.automate.SuperuserService.main(Unknown Source)

  at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)

  at com.android.internal.os.Runtimelnit.main(Runtimelnit.java: 251)


Best regards


Automate developer

unread,
Sep 28, 2015, 1:52:16 PM9/28/15
to Automate, sebastien....@gmail.com
Thanks for the log. Much will probably change in M, i'll start fixing any issues.

sammy...@gmail.com

unread,
Sep 30, 2015, 8:29:17 PM9/30/15
to Automate
Galaxy s6
Android 5.02
SuperSU 2.46


2015-09-30 17:23:56.280 INFO 18@1: Flow beginning
2015-09-30 17:23:56.285 INFO 18@15: Shell command superuser
2015-09-30 17:23:57.708 USER 18@16: am out:
2015-09-30 17:23:57.710 USER 18@17: am err: Error type 2


android.util.AndroidException: Can't connect to activity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java:301)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:102)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:255)

2015-09-30 17:23:57.712 INFO 18@2: Shell command superuser
2015-09-30 17:23:58.821 USER 18@3: id out: uid=0(root) gid=0(root) context=u:r:init:s0

2015-09-30 17:23:58.822 USER 18@4: id err:
2015-09-30 17:23:58.824 INFO 18@5: Shell command
2015-09-30 17:23:58.903 USER 18@6: dev.bootcomplete: 1

2015-09-30 17:23:58.904 INFO 18@8: Shell command
2015-09-30 17:23:58.948 USER 18@7: init.svc.bootanim: stopped

2015-09-30 17:23:58.948 INFO 18@9: Shell command
2015-09-30 17:23:58.980 USER 18@10: ro.build.selinux: 1

2015-09-30 17:23:58.981 INFO 18@11: App installed?
2015-09-30 17:23:58.983 USER 18@13: com.llamalab.automate.ext.storage: NOT INSTALLED
2015-09-30 17:23:58.983 INFO 18@0: Stopped at end

Automate developer

unread,
Sep 30, 2015, 8:34:10 PM9/30/15
to Automate, sammy...@gmail.com
Thanks for the log.

I see that you don't have the Storage permission installed, could you please install it and try the flow again?

Fred Kleytman

unread,
Oct 1, 2015, 11:07:32 PM10/1/15
to Automate
Dear Developer,

Attached please find the log file that I have catapulted when my app failed to kill running application.
Please help me to rectify this issue, it appears to be that I cannot kill running app by any means available to me.

Thank you,

Fred



On Wednesday, June 17, 2015 at 12:21:35 PM UTC-7, Automate developer wrote:
Some users may encounter issues with blocks that require the superuser permission, i.e root.
This is very difficult for me to investigate without further help, since it varies with Android version, SU app and SELinux build, etc..

If you're having issues with a superuser feature, please download a run the following debug flow and post the flow log with Android version and SU provider in this forum thread:
http://llamalab.com/automate/community/flows/1153

Known issues:
  • cf-auto root on Android 5.0.2
  • SuperSU 2.46
  • ClockworkMod on Android 4.4.4
  • SuperSU 2.46 on Android 5.02 (Galaxy s6)
logfile (1).pdf

irish...@gmail.com

unread,
Oct 12, 2015, 1:33:15 PM10/12/15
to Automate
While I have not attempted to use any superuser functions as of yet, this could be an issue soley based on the se-linux state, recently Google has banned applications that change the se-linux state to permissive from the playstore, even if the app returns it to the enforcing state before closing or after an action requiring the permissive state is finished. Because the superuser permission package has not been banned from the playstore, your current implementation of SU permissions most likely will not work correctly on KitKat and lollypop devices running rooted production builds. Your best bet if this is the case would be to provide an external link to the SU PERMISSIONS package that will allow the se-linux state to be set to permissive, and reset to enforcing when the action is complete. Also many of the Samsung binaries for Busybox utilities are missing or modified in the production build to handle SU requests so they do not expose KNOX encrypted files and functions to permissive operations. Using Busybox pro smart install will allow you to overwrite the binaries included by Samsung and the applet manager will allow you to install any missing binaries such as chroot and chmod, replacing the stock binaries in the system could render your phone useless and possibly unrecoverable, it is not advised, however if your going to try you should make a full backup of your system before attempting to overwrite these binaries, and having a download mode jig as well as an Odin flashable stock image of your device is a good idea. 

Automate developer

unread,
Oct 12, 2015, 2:27:15 PM10/12/15
to Automate, irish...@gmail.com
Automate relies on the SU providing app (SuperSU, etc..) to provide a root shell (i.e the su binary), it's then used to start a service which runs as superuser.
So the "superuser permission" extension doesn't do anything, it includes no code, it just have some permissions declared in its Manifest.

But on some devices/su apps, Automate can't use the system functions required to start the service, even Android's own "am" command fail with a "system not running" error.
Maybe the shell provided isn't a child of a Zygote process to it can't connect to it, i don't know.
This is the issue, it may be caused by "enforced" se-linux, but haven't gotten enough logs to see any pattern, or to draw any conclusion.

pretor...@gmail.com

unread,
Oct 13, 2015, 5:29:03 PM10/13/15
to Automate
Hi, i'm also having issues with root permissions.Here are the details :

* Device - Nexus 5
* OS - Android Marshmallow
* Superuser app - SuperSU 2.52
* SELinux policy - Testet with both permissive and enforced (using "setenforce" command to switch)
* Automate vers. - 1.1.4a1
* Log (debug flow) -http://pastebin.com/00DNF9RL

Basicaly SuperSU shows permission is granted (and show the notification) but after a few seconds an automate notification says the superuser permissions granting failed.

I noticed all this when i was trying to create a flow that requires superuser permissions (android.permission.WRITE_SECURE_SETTINGS), Automate installed the permissions package just fine but something is wrong because in the flow details is still showing as "install permission" and if you click to install it will continue without issue.
As i said i tried with both selinux permissive and enforced, but the result is the same.Root is working for other apps (Terminal, Titanium Backup, etc) but do miss my favorite automation app,so please let me know if you need more info, logs, etc.

Automate developer

unread,
Oct 13, 2015, 5:39:53 PM10/13/15
to Automate, pretor...@gmail.com
Please test the Alpha, it has some Android M fixes:
https://plus.google.com/110165001747691845730/posts/ZgetBzG9Kdt

Let me know if it's working.

pretor...@gmail.com

unread,
Oct 13, 2015, 5:46:51 PM10/13/15
to Automate
I'm already a tester (joined months ago), but i can't find a newer version, am i missing something?

Automate developer

unread,
Oct 13, 2015, 6:06:21 PM10/13/15
to Automate, pretor...@gmail.com
Latest alpha is version 1.1.4a1.

pretor...@gmail.com

unread,
Oct 13, 2015, 6:14:56 PM10/13/15
to Automate
Oh, then i'm on latest already (provided that info in my first post ☺). Anyway i think that the culprit is "android.permission.WRITE_SECURE_SETTINGS" because once i removed that from my flow (was 2g/3g/lte switch) and used a Tasker plugin to acquire the same function, Automate no longer complains about missing superuser permissions and other flows wich are requiring SU are working.
So i guess that "android.permission.WRITE_SECURE_SETTINGS" was removed in Android M (or even previous versions and i didn't noticed)?

Automate developer

unread,
Oct 13, 2015, 6:16:34 PM10/13/15
to Automate, pretor...@gmail.com
Hmm, i think i've read that somewhere, i'll investigate.

irish...@gmail.com

unread,
Oct 13, 2015, 6:17:40 PM10/13/15
to Automate
Also check your super SU permissions log, if its saying you granted but then blocking you from using it sometimes there is a denial in the log that needs to be removed. Another thing could be that you don't have the latest binary for SU installed and last could also be that you don't have the latest version of busy box installed, or at all. Also check in device settings to make sure superuser access is set for apps and adb.

irish...@gmail.com

unread,
Oct 13, 2015, 6:55:49 PM10/13/15
to Automate
I just read on stackoverflow that Write_Secure_Settings is not available for non-System apps, you may be able to work around this by pushing Automate to the system apps folder via adb, or the mentioned possibly using Java reflection to show non-exposed API functions. I'd opt for pushing the app to the system, unless you happen to know Java.

Automate developer

unread,
Oct 13, 2015, 7:04:07 PM10/13/15
to Automate, irish...@gmail.com
The issue with Marshmallow is that the WRITE_SECURE_SETTINGS permission can no longer be granted at run-time, as it looks, it might not even be available anymore.
Prior to Marshmallow, Automate granted itself (or the add-on actually) the permission when it has root access, it worked fine and there was no need to install anything on the system partition.

The WRITE_SECURE_SETTINGS permission is only used for a few blocks, but i'll have to come up with a solution.

rome...@gmail.com

unread,
Oct 14, 2015, 10:50:52 PM10/14/15
to Automate, irish...@gmail.com
I just bought this today and the fact it can't get WRITE_SECURE_SETTINGS prevents me from doing some key steps in my automation. I am running 5.0.1. Should it be working?

Automate developer

unread,
Oct 14, 2015, 11:27:25 PM10/14/15
to Automate, irish...@gmail.com, rome...@gmail.com
Only Android 6 (Marshmallow) is specifically affected by the WRITE_SECURE_SETTINGS issue.

It should work on all other Android version if Automate can gain proper root access.
Please run the test flow to see if there's a problem accessing root:
http://llamalab.com/automate/community/flows/1153

rome...@gmail.com

unread,
Oct 14, 2015, 11:29:06 PM10/14/15
to Automate, irish...@gmail.com, rome...@gmail.com
so are there some troubleshooting steps for 5.0.1?

Automate developer

unread,
Oct 14, 2015, 11:36:49 PM10/14/15
to Automate, irish...@gmail.com, rome...@gmail.com
The cause of the improper root shell is still unknown, enforced SELinux, bugs in the SU binary, i don't know.
Running the test flow to help me diagnose the problem:
http://llamalab.com/automate/community/flows/1153

rome...@gmail.com

unread,
Oct 14, 2015, 11:44:32 PM10/14/15
to Automate
Just ran your test...


2015-10-14 22:36:08.318 INFO 24@1: Flow beginning
2015-10-14 22:36:08.320 INFO 24@15: Shell command superuser
2015-10-14 22:36:09.795 USER 24@16: am out:
2015-10-14 22:36:09.801 USER 24@17: am err: Error type 2


android.util.AndroidException: Can't connect to activity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java:301)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:102)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:255)

2015-10-14 22:36:09.803 INFO 24@2: Shell command superuser
2015-10-14 22:36:10.917 USER 24@3: id out: uid=0(root) gid=0(root) context=u:r:init:s0

2015-10-14 22:36:10.918 USER 24@4: id err:
2015-10-14 22:36:10.919 INFO 24@5: Shell command
2015-10-14 22:36:10.980 USER 24@6: dev.bootcomplete: 1

2015-10-14 22:36:10.981 INFO 24@8: Shell command
2015-10-14 22:36:11.015 USER 24@7: init.svc.bootanim: stopped

2015-10-14 22:36:11.016 INFO 24@9: Shell command
2015-10-14 22:36:11.082 USER 24@10: ro.build.selinux: 1

2015-10-14 22:36:11.083 INFO 24@11: App installed?
2015-10-14 22:36:11.085 USER 24@12: com.llamalab.automate.ext.storage: INSTALLED
2015-10-14 22:36:11.085 INFO 24@0: Stopped at end
2015-10-14 22:36:37.082 INFO 25@1: Flow beginning
2015-10-14 22:36:37.084 INFO 25@15: Shell command superuser
2015-10-14 22:36:38.480 USER 25@16: am out:
2015-10-14 22:36:38.481 USER 25@17: am err: Error type 2


android.util.AndroidException: Can't connect to activity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java:301)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:102)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:255)

2015-10-14 22:36:38.481 INFO 25@2: Shell command superuser
2015-10-14 22:36:39.665 USER 25@3: id out: uid=0(root) gid=0(root) context=u:r:init:s0

2015-10-14 22:36:39.668 USER 25@4: id err:
2015-10-14 22:36:39.669 INFO 25@5: Shell command
2015-10-14 22:36:39.730 USER 25@6: dev.bootcomplete:
2015-10-14 22:36:39.731 INFO 25@8: Shell command
2015-10-14 22:36:39.772 USER 25@7: init.svc.bootanim: stopped

2015-10-14 22:36:39.772 INFO 25@9: Shell command
2015-10-14 22:36:39.808 USER 25@10: ro.build.selinux: 1

2015-10-14 22:36:39.809 INFO 25@11: App installed?
2015-10-14 22:36:39.810 USER 25@12: com.llamalab.automate.ext.storage: INSTALLED
2015-10-14 22:36:39.811 INFO 25@0: Stopped at end
2015-10-14 22:43:06.791 INFO 26@1: Flow beginning
2015-10-14 22:43:06.792 INFO 26@15: Shell command superuser
2015-10-14 22:43:08.461 USER 26@16: am out:
2015-10-14 22:43:08.464 USER 26@17: am err: Error type 2


android.util.AndroidException: Can't connect to activity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java:301)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:102)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:255)

2015-10-14 22:43:08.466 INFO 26@2: Shell command superuser
2015-10-14 22:43:09.645 USER 26@3: id out: uid=0(root) gid=0(root) context=u:r:init:s0

2015-10-14 22:43:09.648 USER 26@4: id err:
2015-10-14 22:43:09.650 INFO 26@5: Shell command
2015-10-14 22:43:09.740 USER 26@6: dev.bootcomplete: 1

2015-10-14 22:43:09.742 INFO 26@8: Shell command
2015-10-14 22:43:09.822 USER 26@7: init.svc.bootanim: stopped

2015-10-14 22:43:09.823 INFO 26@9: Shell command
2015-10-14 22:43:09.872 USER 26@10: ro.build.selinux: 1

2015-10-14 22:43:09.873 INFO 26@11: App installed?
2015-10-14 22:43:09.875 USER 26@12: com.llamalab.automate.ext.storage: INSTALLED
2015-10-14 22:43:09.876 INFO 26@0: Stopped at end

Message has been deleted

Automate developer

unread,
Oct 14, 2015, 11:53:56 PM10/14/15
to Automate, rome...@gmail.com
Thanks for the logs.
The "Can't connect to activity manager; is the system running?" issue seem to be the most common.
Sadly i still don't know the cause, it makes the SU shell provided by the "rooting" app inept.

pretor...@gmail.com

unread,
Oct 21, 2015, 12:55:16 PM10/21/15
to Automate
Hi i don't know if the following info is of any importance or if you already know about but it's a good reading anyway:https://su.chainfire.eu/#selinux-contexts-switching-why

Using a context seems to fix some issues sometimes, like in this example - > http://forum.xda-developers.com/showthread.php?p=63327796

Automate developer

unread,
Oct 21, 2015, 1:32:43 PM10/21/15
to Automate, pretor...@gmail.com
I haven't got enough feedback (see test flow in OP) to draw a conclusion, but SELinux enforced may likely be the cause.
I've contacted chainfire, the SuperSU developer, for assistance but he request more information.

Context switching has limited support among su implementation, so it's the last resort.
I would even consider this a bug in the su apps, since they provide a useless root shell, they should do the context switching.

I could include an setting for using different context, it could at least help find the cause.

gunawan...@gmail.com

unread,
Nov 11, 2015, 7:22:53 PM11/11/15
to Automate
Running Galaxy Note 3 Rooted Lolipop

2015-11-12 08:19:07.677 INFO 10@1: Flow beginning
2015-11-12 08:19:07.679 INFO 10@15: Shell command superuser
2015-11-12 08:19:08.416 USER 10@16: am out:
2015-11-12 08:19:08.419 USER 10@17: am err: Error type 2


android.util.AndroidException: Can't connect to activity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java:301)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:102)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:255)

2015-11-12 08:19:08.422 INFO 10@2: Shell command superuser
2015-11-12 08:19:08.814 USER 10@3: id out: uid=0(root) gid=0(root) context=u:r:init:s0

2015-11-12 08:19:08.815 USER 10@4: id err:
2015-11-12 08:19:08.815 INFO 10@5: Shell command
2015-11-12 08:19:08.850 USER 10@6: dev.bootcomplete: 1

2015-11-12 08:19:08.850 INFO 10@8: Shell command
2015-11-12 08:19:08.882 USER 10@7: init.svc.bootanim: stopped

2015-11-12 08:19:08.883 INFO 10@9: Shell command
2015-11-12 08:19:08.914 USER 10@10: ro.build.selinux: 1

2015-11-12 08:19:08.914 INFO 10@11: App installed?
2015-11-12 08:19:08.915 USER 10@12: com.llamalab.automate.ext.storage: INSTALLED
2015-11-12 08:19:08.916 INFO 10@18: Shell command superuser
2015-11-12 08:19:09.233 USER 10@19: getenforce out: Enforcing

2015-11-12 08:19:09.234 USER 10@20: getenforce err:
2015-11-12 08:19:09.234 INFO 10@0: Stopped at end



On Thursday, June 18, 2015 at 3:21:35 AM UTC+8, Henrik Lindqvist wrote:
The current Alpha version 1.1.4a3 has a new "SuperSU SELinux context" option in settings.
Please try the different contexts and report if any of them work!

Henrik Lindqvist

unread,
Nov 12, 2015, 2:45:23 PM11/12/15
to Automate, gunawan...@gmail.com
Thanks for the log.
If you're using SuperSU try changing "SuperSU SELinux context" option in Automate settings.
If not, which SU (root) provider are you using.

macsa...@gmail.com

unread,
Nov 27, 2015, 12:30:10 PM11/27/15
to Automate
Galaxy note 8.0 GT-N5100 4.4.2 kitkat
Kingroot

2015-11-28 01:25:50.749 INFO 1796@1: Flow beginning
2015-11-28 01:25:50.751 INFO 1796@15: Shell command superuser
2015-11-28 01:25:56.131 USER 1796@16: am out: Broadcasting: Intent { act=com.example.foobar.intent.action.TEST }
Broadcast completed: result=0

2015-11-28 01:25:56.132 USER 1796@17: am err: WARNING: linker: app_process has text relocations. This is wasting memory and is a security risk. Please fix.
WARNING: linker: app_process has text relocations. This is wasting memory and is a security risk. Please fix.

2015-11-28 01:25:56.135 INFO 1796@2: Shell command superuser
2015-11-28 01:25:56.473 USER 1796@3: id out: uid=0(root) gid=0(root) context=u:r:init:s0

2015-11-28 01:25:56.474 USER 1796@4: id err:
2015-11-28 01:25:56.476 INFO 1796@5: Shell command
2015-11-28 01:25:56.519 USER 1796@6: dev.bootcomplete: 1

2015-11-28 01:25:56.522 INFO 1796@8: Shell command
2015-11-28 01:25:56.577 USER 1796@7: init.svc.bootanim: stopped

2015-11-28 01:25:56.579 INFO 1796@9: Shell command
2015-11-28 01:25:56.628 USER 1796@10: ro.build.selinux: 1

2015-11-28 01:25:56.631 INFO 1796@11: App installed?
2015-11-28 01:25:56.633 USER 1796@12: com.llamalab.automate.ext.storage: INSTALLED
2015-11-28 01:25:56.635 INFO 1796@18: Shell command superuser
2015-11-28 01:25:56.980 USER 1796@19: getenforce out: Enforcing

2015-11-28 01:25:56.982 USER 1796@20: getenforce err:
2015-11-28 01:25:56.983 INFO 1796@0: Stopped at end

Henrik Lindqvist

unread,
Nov 27, 2015, 2:02:05 PM11/27/15
to Automate, macsa...@gmail.com
Thanks for the log. Superuser should work for you, does it not?

stanisl...@gmail.com

unread,
Feb 3, 2016, 5:33:00 PM2/3/16
to Automate
Hello. Why can't I start a superuser debug with free version? It has only 20 blocks. Free version should allow 30 blocks. Hm.

And I also have a problem with root access. I use SuperSU, Android 5.1. Do you know how to fix it? I'm trying to set cpu speed, but getting error eaccess: permission denied.

Also when I'm trying to use export feature file manager opens but it can't save a file for some reason. Mail app can't do that too. What's wrong?

Henrik "The Developer" Lindqvist

unread,
Feb 3, 2016, 5:43:56 PM2/3/16
to Automate, stanisl...@gmail.com
The debug flow should run since it has less that 30 blocks. Make sure all other flows are stopped, use the "Stop all" option in the menu.

Have you installed the requested permission add-ons?

Exporting to a removable SD card will not work on Android 5.1.

Стас Дмитренко

unread,
Feb 4, 2016, 12:35:54 AM2/4/16
to Henrik "The Developer" Lindqvist, Automate
OK, stop all helps.
There is a log from your app:



And there is a log from a terminal:



Of course it doesn't helps. Supersu doesn't show a notification that app wanted to get su rights. Even if I choose to allow all apps superuser access. No notification.

What now? I use the latest alpha version. 

I also test the import feature. And it works only when I select "sd card" automate choice from drop down menu. But it doesn't work if I choose file manager or email or any other app except Automate. It's strange. 






чт, 4 февр. 2016, 1:43, Henrik "The Developer" Lindqvist <henrik.l...@gmail.com>:

Стас Дмитренко

unread,
Feb 4, 2016, 12:48:16 AM2/4/16
to Henrik "The Developer" Lindqvist, Automate
OK, I checked all contexts and default can start your test app:

2016-02-04 08:15:59.476 INFO 187@1: Flow beginning
2016-02-04 08:15:59.477 INFO 187@15: Shell command superuser
2016-02-04 08:15:59.553 FAIL 187@15: java.io.IOException: Permission denied
2016-02-04 08:15:59.556 INFO 187@15: Stopped by failure
2016-02-04 08:32:26.696 INFO 188@1: Flow beginning
2016-02-04 08:32:26.704 INFO 188@15: Shell command superuser
2016-02-04 08:32:26.761 FAIL 188@15: java.io.IOException: Permission denied
2016-02-04 08:32:26.767 INFO 188@15: Stopped by failure
2016-02-04 08:33:05.402 INFO 189@1: Flow beginning
2016-02-04 08:33:05.433 INFO 189@15: Shell command superuser
2016-02-04 08:33:05.495 FAIL 189@15: java.io.IOException: Permission denied
2016-02-04 08:33:05.497 INFO 189@15: Stopped by failure
2016-02-04 08:40:02.405 INFO 203@1: Flow beginning
2016-02-04 08:40:02.406 INFO 203@15: Shell command superuser
2016-02-04 08:40:02.454 FAIL 203@15: java.io.IOException: Permission denied
2016-02-04 08:40:02.457 INFO 203@15: Stopped by failure
2016-02-04 08:41:02.431 INFO 209@1: Flow beginning
2016-02-04 08:41:02.432 INFO 209@15: Shell command superuser
2016-02-04 08:41:03.648 USER 209@16: am out: Broadcasting: Intent { act=com.example.foobar.intent.action.TEST }
Broadcast completed: result=0

2016-02-04 08:41:03.649 USER 209@17: am err:
2016-02-04 08:41:03.649 INFO 209@2: Shell command superuser
2016-02-04 08:41:03.967 USER 209@3: id out: uid=0(root) gid=0(root) context=u:r:init:s0

2016-02-04 08:41:03.968 USER 209@4: id err:
2016-02-04 08:41:03.968 INFO 209@5: Shell command
2016-02-04 08:41:03.996 USER 209@6: dev.bootcomplete: 1

2016-02-04 08:41:03.997 INFO 209@8: Shell command
2016-02-04 08:41:04.023 USER 209@7: init.svc.bootanim: stopped

2016-02-04 08:41:04.023 INFO 209@9: Shell command
2016-02-04 08:41:04.049 USER 209@10: ro.build.selinux:

2016-02-04 08:41:04.050 INFO 209@11: App installed?
2016-02-04 08:41:04.050 USER 209@12: com.llamalab.automate.ext.storage: INSTALLED
2016-02-04 08:41:04.051 INFO 209@18: Shell command superuser
2016-02-04 08:41:04.349 USER 209@19: getenforce out: Enforcing

2016-02-04 08:41:04.350 USER 209@20: getenforce err:
2016-02-04 08:41:04.350 INFO 209@0: Stopped at end


чт, 4 февр. 2016, 8:35, Стас Дмитренко <stanisl...@gmail.com>:

Henrik "The Developer" Lindqvist

unread,
Feb 4, 2016, 2:12:50 PM2/4/16
to Automate, henrik.l...@gmail.com, stanisl...@gmail.com
In the log you e-mailed me, the debug flow seem to have successfully worked for one of the "SuperSU SELinux context":
2016-02-04 08:41:02.432 INFO 209@15: Shell command superuser
2016-02-04 08:41:03.648 USER 209@16: am out: Broadcasting: Intent { act=com.example.foobar.intent.action.TEST }
Broadcast completed: result=0


With that "SuperSU SELinux context" selected Automate should be able to start its root service, and blocks requiring root should work, i.e the Attention light block.

The Shell command superuser block may still not work, maybe because it require another "SuperSU SELinux context" that allow access to file system, etc.
If we discover this is the case, i'll add separate options for the "root service context" and "root shell context".



On Thursday, February 4, 2016 at 6:35:54 AM UTC+1, Стас Дмитренко wrote:
OK, stop all helps.
There is a log from your app:



And there is a log from a terminal:



Of course it doesn't helps. Supersu doesn't show a notification that app wanted to get su rights. Even if I choose to allow all apps superuser access. No notification.

What now? I use the latest alpha version. 

I also test the import feature. And it works only when I select "sd card" automate choice from drop down menu. But it doesn't work if I choose file manager or email or any other app except Automate. It's strange. 






чт, 4 февр. 2016, 1:43, Henrik "The Developer" Lindqvist:

Стас Дмитренко

unread,
Feb 4, 2016, 4:30:55 PM2/4/16
to Henrik "The Developer" Lindqvist, Automate
Henrik, I found an answer. When you want to change CPU frequency you should have permissions to write in a CPU config files. As you can see on the screenshot you should change the permissions on that files (chmod) and write what you want. Before that you can only read. Please, fix your app. I changed permissions via file manager and now everything is work. 



чт, 4 февр. 2016, 22:12, Henrik "The Developer" Lindqvist <henrik.l...@gmail.com>:

Henrik "The Developer" Lindqvist

unread,
Feb 5, 2016, 9:03:36 PM2/5/16
to Automate, henrik.l...@gmail.com, stanisl...@gmail.com
Thanks for reporting. Seems odd root wouldn't have write access, but that maybe because of the SELinux context.


On Thursday, February 4, 2016 at 10:30:55 PM UTC+1, Стас Дмитренко wrote:
Henrik, I found an answer. When you want to change CPU frequency you should have permissions to write in a CPU config files. As you can see on the screenshot you should change the permissions on that files (chmod) and write what you want. Before that you can only read. Please, fix your app. I changed permissions via file manager and now everything is work. 



чт, 4 февр. 2016, 22:12, Henrik "The Developer" Lindqvist:

Stephen Strickland

unread,
Feb 22, 2016, 1:13:43 PM2/22/16
to Automate
Android 5.0.1
Busybox version 1.24.1
SuperSU Pro 2.46

2016-02-22 12:10:36.704 INFO 18@1: Flow beginning
2016-02-22 12:10:36.718 INFO 18@15: Shell command superuser
2016-02-22 12:10:38.013 USER 18@16: am out:
2016-02-22 12:10:38.014 USER 18@17: am err: Error type 2
android
.util.AndroidException: Can't connect to activity manager; is the system running?

 at com.android.commands.am.Am.onRun(Am.java:301)
 at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
 at com.android.commands.am.Am.main(Am.java:102)
 at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
 at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:255)


2016-02-22 12:10:38.014 INFO 18@2: Shell command superuser
2016-02-22 12:10:38.364 USER 18@3: id out: uid=0(root) gid=0(root) context=u:r:init:s0


2016-02-22 12:10:38.364 USER 18@4: id err:
2016-02-22 12:10:38.365 INFO 18@5: Shell command
2016-02-22 12:10:38.420 USER 18@6: dev.bootcomplete: 1


2016-02-22 12:10:38.421 INFO 18@8: Shell command
2016-02-22 12:10:38.460 USER 18@7: init.svc.bootanim: stopped


2016-02-22 12:10:38.460 INFO 18@9: Shell command
2016-02-22 12:10:38.494 USER 18@10: ro.build.selinux: 1


2016-02-22 12:10:38.495 INFO 18@11: App installed?
2016-02-22 12:10:38.496 USER 18@12: com.llamalab.automate.ext.storage: INSTALLED
2016-02-22 12:10:38.496 INFO 18@18: Shell command superuser
2016-02-22 12:10:38.857 USER 18@19: getenforce out: Enforcing


2016-02-22 12:10:38.858 USER 18@20: getenforce err:
2016-02-22 12:10:38.858 INFO 18@0: Stopped at end

Logs from SuperSU

Automate @ 22/02 12:25
cd '/storage/emulated/legacy'
echo PWMxtOXGSEqwo054$?
echo PWMxtOXGSEquoS4>&2
PWMxtOXGSEqwo054O
PWMxtOXGSEqwo054
getenforce

echo jOMhSdL9FnGZcEXb$?
echo jOMhSdL9FnGZcEXb>&2
Enforcing
jOMhSdL9FnGZcEXbO
jOMhSdL9FnGZcEXb

Automate @ 22/02 12:24
cd '/storage/emulated/legacy'
echo SD9KmXc55ny6oUJz$?

echo SD9KmXc55ny6oUJz>&2
8D9KmXc55ny6oUJzO
8D9KmXc55ny6oUJz

id

echo DTY1brKoG5RnCwa$?

echo DTY1brKoG5RnCwa>&2
uid=0(root) gid=0(root) context=u r initst
DTY1brKoGSRnCwaO
DTY1brKoGSRnCwa

Automate @ 22/02 12:24
cd '/storage/emulated/legacy'
echo xC1NFKZP835fmguJ$?
echo xC1NFKZP83sfmguJ>&2
xC1NFKZP83$fmguJO
xC1NFKZP83sfmguJ
am broadcast
a com.example.foobar.intent.action.TEST
echo c46Kfj1QxXUMkrzh$?
echo c46Kfj1QxXUMkrzh>&2
Error type 2
android.util.AndroidException: Can't connect to ac
tivity manager; is the system running?
at com.android.commands.am.Am.onRun(Am.java 301)
at com.android.internal.os.BaseCommand.run(BaseCom
mand.java:47)
at com.android.commands.am.Am.main(Am.java 102)
at com.android.internal.os.RuntimeInit.nativeFinis
hInit(Native Method)
at com.android.internal.os.RuntimeInit.main(Runtim
eInit.java:255)
c46Kfj1QxXUMkrzh1
c46Kfj1QxXUMkrzh


I just updated SuperSU to 2.65 and here is the results of the debug script.

2016-02-22 13:11:00.056 INFO 29@1: Flow beginning
2016-02-22 13:11:00.062 INFO 29@15: Shell command superuser
2016-02-22 13:11:01.651 USER 29@16: am out: Broadcasting: Intent { act=com.example.foobar.intent.action.TEST }
Broadcast completed: result=0

2016-02-22 13:11:01.652 USER 29@17: am err: 
2016-02-22 13:11:01.652 INFO 29@2: Shell command superuser
2016-02-22 13:11:02.078 USER 29@3: id out: uid=0(root) gid=0(root) context=u:r:init:s0

2016-02-22 13:11:02.079 USER 29@4: id err: 
2016-02-22 13:11:02.079 INFO 29@5: Shell command
2016-02-22 13:11:02.144 USER 29@6: dev.bootcomplete: 1

2016-02-22 13:11:02.144 INFO 29@8: Shell command
2016-02-22 13:11:02.199 USER 29@7: init.svc.bootanim: stopped

2016-02-22 13:11:02.199 INFO 29@9: Shell command
2016-02-22 13:11:02.249 USER 29@10: ro.build.selinux: 1

2016-02-22 13:11:02.250 INFO 29@11: App installed?
2016-02-22 13:11:02.251 USER 29@12: com.llamalab.automate.ext.storage: INSTALLED
2016-02-22 13:11:02.251 INFO 29@18: Shell command superuser
2016-02-22 13:11:02.587 USER 29@19: getenforce out: Enforcing

2016-02-22 13:11:02.588 USER 29@20: getenforce err: 
2016-02-22 13:11:02.588 INFO 29@0: Stopped at end


If you need anything else please let me know



Henrik "The Developer" Lindqvist

unread,
Feb 22, 2016, 1:45:10 PM2/22/16
to Automate
Thanks for the thorough report.

According to the logs, Automates superuser service should likely start correctly with SuperSU 2.65, since the "am" command works.
If you're able, please try a simple flow with just the Attention light block, which relies on Automates superuser service, and then post the SuperSU log of that launch.

Stephen Strickland

unread,
Feb 23, 2016, 12:06:07 AM2/23/16
to Automate
Here you go.  If you need anything else please let me know.


export CLASSPATH=/data/app/
com.llamalab.automate-1/base.apk

exec app_process /data/data/

com.llamalab.automate com.llamalab.automate.Superu
serService 10374

Running as 0

Started

End of STDIN


Henrik "The Developer" Lindqvist

unread,
Feb 23, 2016, 10:01:54 AM2/23/16
to Automate
Perfect!

The blocks requiring superuser doesn't work for you?
If so this, may have given me a clue.

Stephen Strickland

unread,
Feb 23, 2016, 11:09:32 AM2/23/16
to Automate
The attention light block does light the LED, but only for white color.  Cannot change the color, I tried about 7 different colors. 

Henrik "The Developer" Lindqvist

unread,
Feb 23, 2016, 12:13:51 PM2/23/16
to Automate
Aha, okay then Superuser works for you.
All "root" features may not work on all devices.

godsgen...@gmail.com

unread,
Jul 12, 2016, 1:17:32 PM7/12/16
to Automate
How do post a picture of my selection?

Henrik "The Developer" Lindqvist

unread,
Jul 12, 2016, 5:56:25 PM7/12/16
to Automate, godsgen...@gmail.com
Picture of what, a screenshot?

mattje...@gmail.com

unread,
Sep 13, 2016, 4:31:01 PM9/13/16
to Automate

So I've switched to systemless root from SuperSU to Magisk + phh's superuser (http://forum.xda-developers.com/android/software/mod-magisk-v1-universal-systemless-t3432382) and airplane mode set isn't working. Debug superuser flow log:

2016-09-13 21:17:27.401 INFO 755@1: Flow beginning
2016-09-13 21:17:27.415 INFO 755@15: Shell command superuser
2016-09-13 21:17:28.889 USER 755@16: am out: Broadcasting: Intent { act=com.example.foobar.intent.action.TEST }
Broadcast completed: result=0

2016-09-13 21:17:28.891 USER 755@17: am err:
2016-09-13 21:17:28.893 INFO 755@2: Shell command superuser
2016-09-13 21:17:29.472 USER 755@3: id out: uid=0(root) gid=0(root) groups=0(root) context=u:r:su:s0

2016-09-13 21:17:29.473 USER 755@4: id err:
2016-09-13 21:17:29.475 INFO 755@5: Shell command
2016-09-13 21:17:29.517 USER 755@6: dev.bootcomplete: 1

2016-09-13 21:17:29.517 INFO 755@8: Shell command
2016-09-13 21:17:29.549 USER 755@7: init.svc.bootanim: stopped

2016-09-13 21:17:29.549 INFO 755@9: Shell command
2016-09-13 21:17:29.579 USER 755@10: ro.build.selinux: 1

2016-09-13 21:17:29.580 INFO 755@11: App installed?
2016-09-13 21:17:29.581 USER 755@12: com.llamalab.automate.ext.storage: INSTALLED
2016-09-13 21:17:29.581 INFO 755@18: Shell command superuser
2016-09-13 21:17:30.020 USER 755@19: getenforce out: Enforcing

2016-09-13 21:17:30.021 USER 755@20: getenforce err:
2016-09-13 21:17:30.021 INFO 755@0: Stopped at end

Here's the log from just a basic flow setting airplane mode.

2016-09-13 21:14:06.761 INFO 754@1: Flow beginning
2016-09-13 21:14:06.764 INFO 754@2: Airplane mode set state
2016-09-13 21:14:08.190 FAIL 754@2: android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
2016-09-13 21:14:08.198 INFO 754@2: Stopped by failure
2016-09-13 21:22:20.324 INFO 756@1: Flow beginning
2016-09-13 21:22:20.325 INFO 756@2: Airplane mode set state
2016-09-13 21:22:21.353 INFO 756@0: Stopped at end
2016-09-13 21:22:32.539 INFO 757@1: Flow beginning
2016-09-13 21:22:32.540 INFO 757@2: Airplane mode set state
2016-09-13 21:22:32.636 INFO 757@0: Stopped at end
2016-09-13 21:22:40.109 INFO 758@1: Flow beginning
2016-09-13 21:22:40.111 INFO 758@2: Airplane mode set state
2016-09-13 21:22:40.158 FAIL 758@2: android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
2016-09-13 21:22:40.170 INFO 758@2: Stopped by failure

However interestingly I was able to get it working by disabling the SELinux switch in the Magisk Manager, which switches it to Permissive from Enforcing - as soon as I turned it back it stopped working again, as reflected in the log above.


mattje...@gmail.com

unread,
Sep 13, 2016, 4:33:05 PM9/13/16
to Automate, mattje...@gmail.com
My post seemed to get cut off for some reason...

I got it working by switching SELinux to Permissive from Enforcing - as soon as I switched it back it failed again.

2016-09-<span style="color

Henrik "The Developer" Lindqvist

unread,
Sep 14, 2016, 10:52:32 PM9/14/16
to Automate, mattje...@gmail.com
Even with Enforcing, try a different "SuperSU SELinux context" in Automate settings.
However your su binary may not support the --context parameter as used by SuperSU.
More information on how the su binary works, in SuperSU at least: https://su.chainfire.eu/

mattje...@gmail.com

unread,
Sep 15, 2016, 8:22:37 PM9/15/16
to Automate
I tried every mode but all of them returned the same error message as in my original post, about the DeadObjectException.

I just changed it then ran my test flow, don't know if I needed to reboot the app/phone to apply it properly?

Henrik "The Developer" Lindqvist

unread,
Sep 16, 2016, 2:50:40 PM9/16/16
to Automate, mattje...@gmail.com
No reboot/app restart required.

If you know how to, try looking int the system log. Automate's root process or the su binary may log something.

sta...@melmac.net

unread,
Sep 28, 2016, 1:29:45 AM9/28/16
to Automate
Henrik, thank you for your app! After struggling for a long while getting my data disabled automatically on WiFi connection (because Google Fi does not default to WiFi calls when roaming unless mobile data is OFF), I finally figured a way to do it.

I'm on Nexus 6, Nougat DP5 and Magisk-ized phh's superuser. I've tried different supersu contexts, none of them worked until I switched SELinux from enforcing to permissive in Magisk Manager. With permissive SELinux the default supersu profile works.

I wish there was a solution without having to disable SELinux. Actually, not sure why root is needed to disable/enable data. There's an app in the store which does this without root access: https://play.google.com/store/apps/details?id=dado.auto3gdataswitch. Unfortunately, it doesn't run as a service and sometimes gets unloaded by Android. But when it's in the memory it's working just fine without root access.


On Wednesday, June 17, 2015 at 12:21:35 PM UTC-7, Henrik "The Developer" Lindqvist wrote:
Some users may encounter issues with blocks that require the superuser permission, i.e root.
This is very difficult for me to investigate without further help, since it varies with Android version, SU app and SELinux build, etc..

If you're using SuperSU, please try the different "SuperSU SELinux context" options in settings and report if any of them work.

Make sure the Storage permission is installed:
https://play.google.com/store/apps/details?id=com.llamalab.automate.ext.storage

If you're still having issues with a superuser feature, please download a run the following debug flow and post the flow log with Android version and SU provider in this forum thread:

http://llamalab.com/automate/community/flows/1153


Known issues:
  • cf-auto root on Android 5.0.2
  • SuperSU 2.46
  • ClockworkMod on Android 4.4.4
  • SuperSU 2.46 on Android 5.02 (Galaxy s6)

SuperSU SELinux context working:

  • "Shell" on stock Android M

Henrik "The Developer" Lindqvist

unread,
Sep 28, 2016, 2:51:14 PM9/28/16
to Automate, sta...@melmac.net
The whole point of SELinux is to make the device more secure. If the su binary can't work/hack its way around it neither can Automate.
Any app claiming to switch network type or toggle mobile data without root either does so using a security hole,
or (more likely) only tells the system UI (updating the status bar icon) without actually changing the driver/hardware options.

sta...@melmac.net

unread,
Sep 28, 2016, 3:22:49 PM9/28/16
to Automate, sta...@melmac.net
FWIW, all other root apps I'm using are working fine with SELinux enabled tho (backup+, solid explorer, double tap to wake).

How can I verify if it's just the UI change or the actual change for disabling data?
Message has been deleted

Henrik "The Developer" Lindqvist

unread,
Sep 28, 2016, 11:40:15 PM9/28/16
to Automate, sta...@melmac.net
Most apps i've seen uses su in a very basic fashion, they only use shell commands for their root features, like cp to copy a file or the service command to call APIs.
Automate use a more advanced method giving full root access to all Android APIs just like Zygote (the "java" part of the OS), without modifying and installing itself on the system partition, like some apps do.
However it seems like different parts of the Android API may require different SELinux "contexts", or the se binary uses an default "context" which is too restrictive, hence the "SuperSU SELinux context" settings.
More info: https://su.chainfire.eu/#selinux

Use the Mobile data enabled block with proceed Immediately, it's at least using the proper API call. Proceed "When changed" can be fooled, like the UI, since it only await change in the affected system setting.

sta...@melmac.net

unread,
Sep 29, 2016, 7:22:47 PM9/29/16
to Automate, sta...@melmac.net
Henrik,

with magisk I can install either Automate or Secure Settings or both as the system apps "systemlessly" if it would help me to get them working without disabling SELinux -- do you think it would help? 

-Stan

Henrik "The Developer" Lindqvist

unread,
Sep 29, 2016, 9:36:23 PM9/29/16
to Automate, sta...@melmac.net
I doubt it would may any difference.

sea tranquillity

unread,
Dec 9, 2016, 8:37:38 PM12/9/16
to Automate
on cm14, when startup ,automate will show a notification "failed to gain superuser permissions",but I already grant root permissions to it . and Automate can act root actions.

在 2015年6月18日星期四 UTC+8上午3:21:35,Henrik "The Developer" Lindqvist写道:

Henrik "The Developer" Lindqvist

unread,
Dec 9, 2016, 8:51:05 PM12/9/16
to Automate
I've got other report of issue with CM14.1:
https://plus.google.com/+DeepakThakur24/posts/ChnYGWb793Y

matthi...@gmail.com

unread,
Dec 12, 2016, 5:33:25 AM12/12/16
to Automate
Same here...
im in Moto G 4g with CM14.1
after restart "failed gain superuser permission"

matthi...@gmail.com

unread,
Dec 18, 2016, 11:43:50 AM12/18/16
to Automate
"failed gain superuser permission"
Problem is gone with latest version

cripp...@gmail.com

unread,
Dec 25, 2016, 11:29:12 AM12/25/16
to Automate
Superuser permissions not working on my device. Running latest Nougat Beta on Galaxy S7 Edge. Using PHH's Magisk Compatible Super User latest version. r266-2. 

Log;

2016-12-25 11:21:27.128 INFO 1622@1: Flow beginning
2016-12-25 11:21:27.132 INFO 1622@15: Shell command superuser
2016-12-25 11:21:28.453 USER 1622@16: am out: Broadcasting: Intent { act=com.example.foobar.intent.action.TEST launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } }
Broadcast completed: result=0

2016-12-25 11:21:28.455 USER 1622@17: am err:
2016-12-25 11:21:28.457 INFO 1622@2: Shell command superuser
2016-12-25 11:21:29.213 USER 1622@3: id out: uid=0(root) gid=0(root) groups=0(root) context=u:r:su:s0

2016-12-25 11:21:29.215 USER 1622@4: id err:
2016-12-25 11:21:29.217 INFO 1622@5: Shell command
2016-12-25 11:21:29.251 USER 1622@6: dev.bootcomplete: 1

2016-12-25 11:21:29.253 INFO 1622@8: Shell command
2016-12-25 11:21:29.279 USER 1622@7: init.svc.bootanim: stopped

2016-12-25 11:21:29.280 INFO 1622@9: Shell command
2016-12-25 11:21:29.304 USER 1622@10: ro.build.selinux: 1

2016-12-25 11:21:29.305 INFO 1622@11: App installed?
2016-12-25 11:21:29.308 USER 1622@12: com.llamalab.automate.ext.storage: INSTALLED
2016-12-25 11:21:29.309 INFO 1622@18: Shell command superuser
2016-12-25 11:21:29.841 USER 1622@19: getenforce out: Enforcing

2016-12-25 11:21:29.843 USER 1622@20: getenforce err:
2016-12-25 11:21:29.844 INFO 1622@0: Stopped at end

Hope that helps!

johanne...@googlemail.com

unread,
Apr 7, 2017, 10:49:24 AM4/7/17
to Automate
Superuser is not working for me. Running Magisk 12 with built-in root on Nexus 6P with 7.1.2 stock Android and ElementalX kernel.

Log:
2017-04-07 16:45:41.642 INFO 61@1: Flow beginning
2017-04-07 16:45:41.643 INFO 61@15: Shell command superuser
2017-04-07 16:45:42.712 USER 61@16: am out: Broadcasting: Intent { act=com.example.foobar.intent.action.TEST }
Broadcast completed: result=0

2017-04-07 16:45:42.714 USER 61@17: am err: 
2017-04-07 16:45:42.718 INFO 61@2: Shell command superuser
2017-04-07 16:45:43.085 USER 61@3: id out: uid=0(root) gid=0(root) groups=0(root) context=u:r:su:s0

2017-04-07 16:45:43.088 USER 61@4: id err: 
2017-04-07 16:45:43.090 INFO 61@5: Shell command
2017-04-07 16:45:43.143 USER 61@6: dev.bootcomplete: 1

2017-04-07 16:45:43.144 INFO 61@8: Shell command
2017-04-07 16:45:43.184 USER 61@7: init.svc.bootanim: stopped

2017-04-07 16:45:43.185 INFO 61@9: Shell command
2017-04-07 16:45:43.230 USER 61@10: ro.build.selinux: 

2017-04-07 16:45:43.232 INFO 61@11: App installed?
2017-04-07 16:45:43.234 USER 61@12: com.llamalab.automate.ext.storage: INSTALLED
2017-04-07 16:45:43.235 INFO 61@18: Shell command superuser
2017-04-07 16:45:43.559 USER 61@19: getenforce out: Enforcing

2017-04-07 16:45:43.561 USER 61@20: getenforce err: 
2017-04-07 16:45:43.562 INFO 61@0: Stopped at end

Henrik "The Developer" Lindqvist

unread,
Apr 18, 2017, 7:47:25 AM4/18/17
to Automate, johanne...@googlemail.com
If possible, try changing SELinux from Enforcing to Permissive, to see if that works any better.

johanne...@googlemail.com

unread,
Apr 18, 2017, 1:11:50 PM4/18/17
to Automate, johanne...@googlemail.com
Switching to permissive does indeed fix the problem. But it's also a huge security risk, so it's not really an option for me.

Henrik "The Developer" Lindqvist

unread,
Apr 19, 2017, 7:53:18 AM4/19/17
to Automate, johanne...@googlemail.com
The only option Automate has to affect the permissions granted by the root provider is using another (SuperSU)  SELinux context, as chosen in Automate settings.

nouvel...@gmail.com

unread,
May 14, 2017, 7:37:16 PM5/14/17
to Automate
Same issue. In a OP3T Android 7.1.1 "Failed to gain superuser permission" Not rooted.

mattje...@gmail.com

unread,
May 14, 2017, 7:39:21 PM5/14/17
to Automate, nouvel...@gmail.com
Maybe I'm reading this wrong but if you're not rooted how are you supposed to gain superuser permission?!

nouvel...@gmail.com

unread,
May 14, 2017, 7:47:29 PM5/14/17
to Automate
¿does AVA requires root? I can't find any specification about. Dont know, sorry. I'm new at Automate

muhamma...@gmail.com

unread,
May 22, 2017, 2:10:40 AM5/22/17
to Automate
Lenovo 7000-a
Android 5.0
Ram 2G
ROM 8G

The shell command stated it require a rooted device....

Log

2017-05-22 13:53:03.027 INFO 522@1: Flow beginning
2017-05-22 13:53:03.039 INFO 522@15: Shell command superuser
2017-05-22 13:53:03.069 FAIL 522@15: java.io.IOException: Permission denied
2017-05-22 13:53:03.094 INFO 522@15: Stopped by failure
2017-05-22 13:55:02.151 INFO 523@1: Flow beginning
2017-05-22 13:55:02.160 INFO 523@15: Shell command superuser
2017-05-22 13:55:02.189 FAIL 523@15: java.io.IOException: Permission denied
2017-05-22 13:55:02.192 INFO 523@15: Stopped by failure

Henrik "The Developer" Lindqvist

unread,
May 22, 2017, 10:25:00 AM5/22/17
to Automate, muhamma...@gmail.com
As stated the Shell command superuser block requires a rooted device.
If your device is rooted, ensure the Storage permission is installed:
https://play.google.com/store/apps/details?id=com.llamalab.automate.ext.storage

steadf...@gmail.com

unread,
Jun 4, 2017, 12:35:40 AM6/4/17
to Automate
I have an issue with supersu 2.79 and automate when trying to enable Bluetooth tethering

Supersu 2.79
Android MM
I tried all selinux contexts


I always get the following error:


2017-06-04 06:07:01.527 INFO 90@4: Bluetooth tethering enabled?
2017-06-04 06:07:01.554 INFO 90@3: Bluetooth tethering set state
2017-06-04 06:07:01.582 FAIL 90@3: java.lang.SecurityException: com.llamalab.automate.ext.location was not granted this permission: android.permission.WRITE_SETTINGS.
2017-06-04 06:07:01.592 INFO 90@3: Stopped by failure


Here is the output of the debug flow:


2017-06-04 06:25:34.295 INFO 103@1: Flow beginning
2017-06-04 06:25:34.297 INFO 103@15: Shell command superuser
2017-06-04 06:25:35.288 USER 103@16: am out: Broadcasting: Intent { act=com.example.foobar.intent.action.TEST }
Broadcast completed: result=0

2017-06-04 06:25:35.289 USER 103@17: am err:
2017-06-04 06:25:35.289 INFO 103@2: Shell command superuser
2017-06-04 06:25:35.630 USER 103@3: id out: uid=0(root) gid=0(root) groups=0(root) context=u:r:init:s0

2017-06-04 06:25:35.632 USER 103@4: id err:
2017-06-04 06:25:35.633 INFO 103@5: Shell command
2017-06-04 06:25:35.686 USER 103@6: dev.bootcomplete: 1

2017-06-04 06:25:35.687 INFO 103@8: Shell command
2017-06-04 06:25:35.726 USER 103@7: init.svc.bootanim: stopped

2017-06-04 06:25:35.728 INFO 103@9: Shell command
2017-06-04 06:25:35.764 USER 103@10: ro.build.selinux: 1

2017-06-04 06:25:35.765 INFO 103@11: App installed?
2017-06-04 06:25:35.767 USER 103@12: com.llamalab.automate.ext.storage: INSTALLED
2017-06-04 06:25:35.767 INFO 103@18: Shell command superuser
2017-06-04 06:25:36.108 USER 103@19: getenforce out: Permissive

2017-06-04 06:25:36.109 USER 103@20: getenforce err:
2017-06-04 06:25:36.112 INFO 103@0: Stopped at end

alex.m...@gmail.com

unread,
Jul 12, 2017, 8:44:08 AM7/12/17
to Automate
Hi, getting errors with the secure settings permission. Superuser debug flow appears to pass fine, see log:

2017-07-12 08:33:04.140 INFO 40@1: Flow beginning
2017-07-12 08:33:04.142 INFO 40@15: Shell command superuser
2017-07-12 08:33:05.726 USER 40@16: am out: Broadcasting: Intent { act=com.example.foobar.intent.action.TEST }
Broadcast completed: result=0

2017-07-12 08:33:05.729 USER 40@17: am err:
2017-07-12 08:33:05.738 INFO 40@2: Shell command superuser
2017-07-12 08:33:06.213 USER 40@3: id out: uid=0(root) gid=0(root) groups=0(root) context=u:r:su:s0

2017-07-12 08:33:06.217 USER 40@4: id err:
2017-07-12 08:33:06.222 INFO 40@5: Shell command
2017-07-12 08:33:06.313 USER 40@6: dev.bootcomplete: 1

2017-07-12 08:33:06.317 INFO 40@8: Shell command
2017-07-12 08:33:06.365 USER 40@7: init.svc.bootanim: stopped

2017-07-12 08:33:06.366 INFO 40@9: Shell command
2017-07-12 08:33:06.432 USER 40@10: ro.build.selinux: 0

2017-07-12 08:33:06.436 INFO 40@11: App installed?
2017-07-12 08:33:06.439 USER 40@12: com.llamalab.automate.ext.storage: INSTALLED
2017-07-12 08:33:06.441 INFO 40@18: Shell command superuser
2017-07-12 08:33:06.867 USER 40@19: getenforce out: Enforcing

2017-07-12 08:33:06.871 USER 40@20: getenforce err:
2017-07-12 08:33:06.874 INFO 40@0: Stopped at end

This is the log from a different flow that is attempting to set GPS when Maps is in foreground:

2017-07-12 08:34:01.618 INFO 41@1: Flow beginning
2017-07-12 08:34:01.619 INFO 41@2: App in foreground?
2017-07-12 08:34:10.089 INFO 41@3: Location provider set state
2017-07-12 08:34:10.134 FAIL 41@3: java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
2017-07-12 08:34:10.135 INFO 41@3: Stopped by failure

Secure Settings permission says "Install" on the button, but is already installed and has an entry in Settings>Apps.

Any ideas?

Henrik "The Developer" Lindqvist

unread,
Jul 12, 2017, 3:15:45 PM7/12/17
to Automate, alex.m...@gmail.com
Try rebooting the device. Android version?

alex.m...@gmail.com

unread,
Jul 13, 2017, 8:23:01 PM7/13/17
to Automate
Nexus 6 running 7.1.2 Pure Nexus with the June 5 security patch. Magisk 13.2 for superuser, experienced the same issue on Magisk 13.1.

Several reboots, uninstalled/reinstalled the flow, the permissions, and the app itself, including a full app data wipe from titanium backup. Same results.

Henrik "The Developer" Lindqvist

unread,
Jul 14, 2017, 4:12:04 PM7/14/17
to Automate, alex.m...@gmail.com
The issue is likely that SELinux is set to Enforcing.
Try using a terminal shell or the Shell command superuser block to execute:
pm grant com.llamalab.automate.ext.superuser android.permission.WRITE_SECURE_SETTINGS

alex.m...@gmail.com

unread,
Jul 14, 2017, 4:43:14 PM7/14/17
to Automate
Terminal command worked like a charm, thanks!

Henrik "The Developer" Lindqvist

unread,
Jul 18, 2017, 2:39:03 PM7/18/17
to Automate, alex.m...@gmail.com
Odd, Automate performs the same command at startup if the Superuser permission add-on is installed.

mattje...@gmail.com

unread,
Jul 18, 2017, 2:52:00 PM7/18/17
to Automate
In a possibly related issue, when my phone restarts it comes up with a notification saying Automate failed to gain superuser permissions but it works fine anyway.

Using Magisk 13.2

Henrik "The Developer" Lindqvist

unread,
Jul 18, 2017, 3:10:11 PM7/18/17
to Automate, mattje...@gmail.com
When using adb to grant the permission:
pm grant com.llamalab.automate.ext.superuser android.permission.WRITE_SECURE_SETTINGS

You should also grant:
pm grant com.llamalab.automate.ext.superuser android.permission.CHANGE_CONFIGURATION

...and:

pm grant com.llamalab.automate.ext.superuser android.permission.SET_PROCESS_LIMIT

...otherwise you'll likely get an "Failed to grant permission" notification.

nicchri...@gmail.com

unread,
Jul 24, 2017, 11:11:38 PM7/24/17
to Automate
Used to work, but now some actions such as setting mobile data state fail with "java.util.concurrent.TimeoutException: Superuser shell timeout".

Debug script output below. Any tips?

2017-07-25 01:32:07.677 INFO 1575@1: Flow beginning
2017-07-25 01:32:07.689 INFO 1575@15: Shell command superuser
2017-07-25 01:32:11.337 USER 1575@16: am out: Broadcasting: Intent { act=com.example.foobar.intent.action.TEST }
Broadcast completed: result=0

2017-07-25 01:32:11.343 USER 1575@17: am err:
2017-07-25 01:32:11.349 INFO 1575@2: Shell command superuser
2017-07-25 01:32:13.535 USER 1575@3: id out: uid=0(root) gid=0(root) groups=1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),9997(everybody),50126(all_a126) context=u:r:untrusted_app:s0

2017-07-25 01:32:13.540 USER 1575@4: id err:
2017-07-25 01:32:13.547 INFO 1575@5: Shell command
2017-07-25 01:32:13.579 USER 1575@6: dev.bootcomplete: 1

2017-07-25 01:32:13.584 INFO 1575@8: Shell command
2017-07-25 01:32:13.616 USER 1575@7: init.svc.bootanim: stopped

2017-07-25 01:32:13.621 INFO 1575@9: Shell command
2017-07-25 01:32:13.655 USER 1575@10: ro.build.selinux:

2017-07-25 01:32:13.661 INFO 1575@11: App installed?
2017-07-25 01:32:13.668 USER 1575@12: com.llamalab.automate.ext.storage: INSTALLED
2017-07-25 01:32:13.673 INFO 1575@18: Shell command superuser
2017-07-25 01:32:15.732 USER 1575@19: getenforce out: Permissive

2017-07-25 01:32:15.737 USER 1575@20: getenforce err:
2017-07-25 01:32:15.738 INFO 1575@0: Stopped at end

nicchri...@gmail.com

unread,
Jul 24, 2017, 11:20:02 PM7/24/17
to Automate
Above is on a Meizu M3s running Flyme 5.1 (on Android 5.1). Have given root permissions to automate and all extensions even if not required.

Henrik "The Developer" Lindqvist

unread,
Jul 25, 2017, 3:12:37 PM7/25/17
to Automate, nicchri...@gmail.com
Try rebooting the device.

michael

unread,
Aug 20, 2017, 11:37:35 AM8/20/17
to Automate
Is any progress being made on Magisk compatibility? Just installed it and disappointed to discover I can no longer use things like the airplane mode and app kill blocks.

Henrik "The Developer" Lindqvist

unread,
Aug 20, 2017, 2:48:58 PM8/20/17
to Automate
Sadly there's not much i can do about "compatibility", since Automate can only use the su binary provided.
Magisk may work if you set SELinux to Permissive instead of Enforcing.

michael

unread,
Aug 21, 2017, 12:34:24 AM8/21/17
to Automate
Forgive my ignorance, but why isn't this possible? Magisk, as of v11, has "MagiskSU". It's all open source; maybe you can figure out why it's not working. I was reading that permissive mode isn't secure.
It is loading more messages.
0 new messages