Root issues (with Magisk)

1,485 views
Skip to first unread message

y.pro...@gmail.com

unread,
Jan 9, 2018, 10:59:26 AM1/9/18
to Automate
Hey!

Everytime I try to use a block who requires root (like "enable mobile data"), I got this error:
android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died

The device is rooted with MagiskSU (v15.2).

Following this post, I tried to to set SELinux policy to Permissive (setenforce 0 as root).
That doesn't resolve the issue.

Here is the log of the debug flow:
2018-01-09 16:56:11.257 INFO 289@1: Flow beginning
2018-01-09 16:56:11.261 INFO 289@15: Shell command superuser
2018-01-09 16:56:12.545 USER 289@16: am out: Broadcasting: Intent { act=com.example.foobar.intent.action.TEST launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } }
Broadcast completed: result=0

2018-01-09 16:56:12.546 USER 289@17: am err:
2018-01-09 16:56:12.547 INFO 289@2: Shell command superuser
2018-01-09 16:56:12.982 USER 289@3: id out: uid=0(root) gid=0(root) groups=0(root) context=u:r:su:s0

2018-01-09 16:56:12.984 USER 289@4: id err:
2018-01-09 16:56:12.985 INFO 289@5: Shell command
2018-01-09 16:56:13.059 USER 289@6: dev.bootcomplete: 1

2018-01-09 16:56:13.060 INFO 289@8: Shell command
2018-01-09 16:56:13.135 USER 289@7: init.svc.bootanim: stopped

2018-01-09 16:56:13.136 INFO 289@9: Shell command
2018-01-09 16:56:13.198 USER 289@10: ro.build.selinux: 0

2018-01-09 16:56:13.199 INFO 289@11: App installed?
2018-01-09 16:56:13.201 USER 289@12: com.llamalab.automate.ext.storage: INSTALLED
2018-01-09 16:56:13.203 INFO 289@18: Shell command superuser
2018-01-09 16:56:13.647 USER 289@19: getenforce out: Enforcing

2018-01-09 16:56:13.652 USER 289@20: getenforce err:
2018-01-09 16:56:13.658 INFO 289@0: Stopped at end

Henrik "The Developer" Lindqvist

unread,
Jan 9, 2018, 3:53:00 PM1/9/18
to Automate
Did you reboot the device?

y.pro...@gmail.com

unread,
Jan 9, 2018, 3:54:29 PM1/9/18
to Automate
I tried both, before and after rebooting the device.

Henrik "The Developer" Lindqvist

unread,
Jan 9, 2018, 8:44:48 PM1/9/18
to Automate
I've never has to use the setenforce command, but it will like have to be done while the system partition is writable otherwise it's not permanent:
https://forum.xda-developers.com/xposed/how-to-set-selinux-to-permissive-boot-t3034245

paul...@googlemail.com

unread,
Jan 10, 2018, 8:33:50 AM1/10/18
to Automate
I've just got a Pixel 2, coming from a 5x. Automate is the main reason I root these days :) I'm getting similar errors. I have a flow that I use to check root every time there's a new Automate version, it just turns BT, mobile data, GPS, wi-fi on or off,

I'm rooted with Magisk (patched boot.img, no TWRP) and when I check the permissions granted in Magisk I only see the Storage permission (not sure what I should see). 
In Automate Settings, Superuser is on installed from Google Play. However, in the flow itself, there is is the install button which when clicked takes me to Google Play.
Running the flow itself results in BT turning on / off, but it fails turning mobile data on / off. Interestingly Tasker turns Mobile Data on & off :) I've not exhaustively compared all my flows with my old Tasker stuff but probably will over the next few days.

This is the error Automate throws when turning mobile data off / on

2018-01-09 23:49:19.502 FAIL 3637@6: android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died

I've not tried the selinux policy change yet, that's next on the list, but as I've never had to mess around with it before I'm a bit hesitant (and lacking in knowledge) to just dive in.

Charles Martin

unread,
Jan 22, 2018, 1:04:36 PM1/22/18
to Automate
I  got the deadObjectException trying to set  Airplane Mode.  Stock 8.1 rom, enforcing mode, magisk 15.3.

However, everything works with Tasker, so it's not the SU binary or the selinux mode that's the problem.

paul...@googlemail.com

unread,
Jan 22, 2018, 1:38:59 PM1/22/18
to Automate
I've been messing with Tasker again over the last few days and everything I used Automate for works in Tasker :( Working Automate (imo) is still ahead of Tasker though.

I did test using the Secure Settings plugin in Automate, so that's enabled me to get around activating GPS so I can still use Automate for all my GPS stuff that Tasker doesn't do so well.

Henrik "The Developer" Lindqvist

unread,
Jan 22, 2018, 3:18:18 PM1/22/18
to Automate
Tasker only provide access to a fraction of the "root" features, so it's just executing some shell commands in the background, like:
settings put global airplane_mode_on 1

Automate use a "deeper" integration to be able to properly access the actual system APIs, as root.
However some APIs seems to be restricted/affected by which SELinux context the Magisk su binary use, so changing to Permissive is the only solution.

It the latest Automate version you can customize the su launch by changing the "Superuser shell command" option in settings, so user now have full control.
Sadly Magisk still doesn't seem to accept any kind command line arguments to modify it's SELinux context, unlike what SuperSU can do.

y.pro...@gmail.com

unread,
Jan 23, 2018, 2:13:32 AM1/23/18
to Automate
In this case, maybe can you add some fallback methods which should use the same command than Tasker?

Henrik "The Developer" Lindqvist

unread,
Jan 23, 2018, 3:51:44 PM1/23/18
to Automate
No such plans. It's very slow, and would only work for 1 or 2 blocks anyway.
From what i know, it seems Magisk users has most problems, users with SuperSU, CyanogenMod, LineageOS and KingoRoot less so.
I'd prefer Magisk could fix the issue causing the problem, so changing to Permissive isn't the only solution.

paul...@googlemail.com

unread,
Jan 24, 2018, 3:59:25 AM1/24/18
to Automate
Thanks for the response :) 

Here's hoping Magisk resolves the issue.
Message has been deleted

lauren...@gmail.com

unread,
Aug 3, 2018, 1:52:39 PM8/3/18
to Automate
I have same issue and solved by install a Magisk SELinux Manager module in Magisk.

Hope this can help someone who reach here for same reason.

Oliver Vázquez Galindo

unread,
Aug 3, 2018, 2:48:08 PM8/3/18
to Automate
Yes! You just helped me a lot, thank you, very, very much. :D

yann.p...@gmail.com

unread,
Sep 18, 2018, 4:24:11 PM9/18/18
to Automate
In case anyone is blocked, I had the same issue and the Magisk SE Linux module saved my day!
Thanks :)

Gourav Goyal

unread,
Apr 2, 2019, 10:33:13 AM4/2/19
to Automate
dont use selinux permissive module as it will also fail safetynet. "su" path is different if phone is rooted using magisk, so just replace "su" with "sbin/su" in automate settings superuser shell command.

knredd...@gmail.com

unread,
Dec 4, 2019, 12:04:41 PM12/4/19
to Automate
I was having same problem with magisk 16.7 bundle but solved by installing Magisk 20.1 from TWRP and magisk manager 7.4.0 as apk

sanyah...@gmail.com

unread,
Feb 7, 2020, 8:59:42 AM2/7/20
to Automate
I need to root device o

mkdubey9...@gmail.com

unread,
Feb 14, 2020, 11:20:52 AM2/14/20
to Automate
Bhaji meta oppoa57 root Nani go Raina ha
Reply all
Reply to author
Forward
0 new messages