[Android 5.1.1] TimeoutException

555 views
Skip to first unread message

Fellipe F.

unread,
Apr 30, 2015, 3:14:47 PM4/30/15
to automa...@googlegroups.com
Hi Henrik,

Some of my flows are frequently receiving a TimeoutException and stop to run. Check below the complete error message. Do you have any suggestion of how to solve this problem? There's a way to increase this timeout?

java.util.concurrent.TimeoutException: Superuser shell timeout


Best Regards,

Fellipe F.

Mark Newton

unread,
Apr 30, 2015, 5:04:44 PM4/30/15
to automa...@googlegroups.com
I had a problem similar to this one when I had multiple flows using the superuser shell block. It seemed to be related to a flow that continuously used the superuser shell block. When a flow stopped from this error, any other flows using the superuser shell block would fail when it reached that block. A soft reboot fixed the problem temporarily.

 If I see it again in the future Ill try to send logs.

Automate developer

unread,
Apr 30, 2015, 5:48:08 PM4/30/15
to automa...@googlegroups.com
This error means that Automate fails to start its root service (binder) within 10 seconds, if that's because of the su providing app or my code is is hard to tell.
To preserve memory the root service (su process) is only kept running for 30 seconds after last use. 

I'd appreciate help, keep an eye on the system log using:
https://play.google.com/store/apps/details?id=com.nolanlawson.logcat

Look for any "Failed to destory process" or "Failed to close STDIN" messages, that would mean Automate can't terminate its su process, and loosing the connection to it.
Maybe that could cause the timeout error because the root provider only allows a single su process per app.

I'll re-investigate my code, and maybe add an option to keep the su process running forever instead of just for 30 seconds.

Mark Newton

unread,
May 12, 2015, 8:01:40 AM5/12/15
to automa...@googlegroups.com
I opened Automate today and noticed that my Auto 2G/3G/4G flow stopped with a Superuser Shell Unavailable IllegalStateException. I captured the logcat for it failing on start, but unfortunately didn't get the initial failure in the logcat.

---- May 12, 2015 7:45:29 AM ----
 
05-12 07:44:22.152 11557 11557 I auditd  : Starting up
 
05-12 07:44:22.162 11557 11557 E auditd  : Failed on audit_set_pid with error: Protocol not supported
 
05-12 07:44:22.162 11557 11557 I auditd  : Exiting
 
05-12 07:44:23.612  1179  1179 W ResourceType: No package identifier when getting value for resource number 0x00000000
 
05-12 07:44:23.622  1179  1179 W PackageManager: Failure retrieving resources for scd.lcex: Resource ID #0x0
 
05-12 07:44:23.632   924   940 I ActivityManager: START u0 {act=com.android.systemui.recents.SHOW_RECENTS flg=0x10804000 cmp=com.android.systemui/.recents.RecentsActivity} from uid 10017 on display 0
 
05-12 07:44:23.772  1179  1179 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@14eae385 time:13161572
 
05-12 07:44:23.832   924  1668 W InputMethodManagerService: Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@36d8fdcc (uid=10127 pid=11260)
 
05-12 07:44:24.062   924   959 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{3728a10a u0 com.android.systemui/.recents.RecentsActivity t774} time:13161864
 
05-12 07:44:24.672  1179  1179 W ResourceType: No package identifier when getting value for resource number 0x00000000
 
05-12 07:44:24.672  1179  1179 W PackageManager: Failure retrieving resources for scd.lcex: Resource ID #0x0
 
05-12 07:44:25.602 31997 31997 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@13b49f56 time:13163402
 
05-12 07:44:25.872   924   959 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{1531e7a6 u0 com.llamalab.automate/.FlowDetailsActivity t781} time:13163663
 
05-12 07:44:26.902 18920 19284 E AutomateService: onExecuteFailure
 
05-12 07:44:26.902 18920 19284 E AutomateService: java.lang.IllegalStateException: Superuser shell unavailable
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at com.llamalab.automate.hb.a(Unknown Source)
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at com.llamalab.automate.by.a(Unknown Source)
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at com.llamalab.automate.stmt.MobileNetworkPreferredSet.b(Unknown Source)
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at com.llamalab.automate.AutomateService.b(Unknown Source)
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at com.llamalab.automate.AutomateService.e(Unknown Source)
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at com.llamalab.automate.AutomateService.handleMessage(Unknown Source)
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at android.os.Handler.dispatchMessage(Handler.java:98)
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at com.llamalab.android.os.h.dispatchMessage(Unknown Source)
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at android.os.Looper.loop(Looper.java:135)
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at com.llamalab.android.os.c.run(Unknown Source)
 
05-12 07:44:27.192 11570 11570 I auditd  : Starting up
 
05-12 07:44:27.202 11570 11570 E auditd  : Failed on audit_set_pid with error: Protocol not supported
 
05-12 07:44:27.202 11570 11570 I auditd  : Exiting
 
05-12 07:44:29.162 18920 19284 E AutomateService: onExecuteFailure
 
05-12 07:44:29.162 18920 19284 E AutomateService: java.lang.IllegalStateException: Superuser shell unavailable
 
05-12 07:44:29.162 18920 19284 E AutomateService:         at com.llamalab.automate.hb.a(Unknown Source)
 
05-12 07:44:29.162 18920 19284 E AutomateService:         at com.llamalab.automate.by.a(Unknown Source)
 
05-12 07:44:29.162 18920 19284 E AutomateService:         at com.llamalab.automate.stmt.MobileNetworkPreferredSet.b(Unknown Source)
 
05-12 07:44:29.162 18920 19284 E AutomateService:         at com.llamalab.automate.AutomateService.b(Unknown Source)
 
05-12 07:44:29.162 18920 19284 E AutomateService:         at com.llamalab.automate.AutomateService.e(Unknown Source)
 
05-12 07:44:29.162 18920 19284 E AutomateService:         at com.llamalab.automate.AutomateService.handleMessage(Unknown Source)
 
05-12 07:44:29.162 18920 19284 E AutomateService:         at android.os.Handler.dispatchMessage(Handler.java:98)
 
05-12 07:44:29.162 18920 19284 E AutomateService:         at com.llamalab.android.os.h.dispatchMessage(Unknown Source)
 
05-12 07:44:29.162 18920 19284 E AutomateService:         at android.os.Looper.loop(Looper.java:135)
 
05-12 07:44:29.162 18920 19284 E AutomateService:         at com.llamalab.android.os.c.run(Unknown Source)
 
05-12 07:44:31.052   274   347 E ThermalEngine: [GPU_MON] 0 percent. Current Sampling Time is 4 sec
 
05-12 07:44:31.222 11578 11578 I auditd  : Starting up
 
05-12 07:44:31.222 11578 11578 E auditd  : Failed on audit_set_pid with error: Protocol not supported
 
05-12 07:44:31.222 11578 11578 I auditd  : Exiting
 
05-12 07:44:31.392 18920 19284 E AutomateService: onExecuteFailure
 
05-12 07:44:31.392 18920 19284 E AutomateService: java.lang.IllegalStateException: Superuser shell unavailable
 
05-12 07:44:31.392 18920 19284 E AutomateService:         at com.llamalab.automate.hb.a(Unknown Source)
 
05-12 07:44:31.392 18920 19284 E AutomateService:         at com.llamalab.automate.by.a(Unknown Source)
 
05-12 07:44:31.392 18920 19284 E AutomateService:         at com.llamalab.automate.stmt.MobileNetworkPreferredSet.b(Unknown Source)
 
05-12 07:44:31.392 18920 19284 E AutomateService:         at com.llamalab.automate.AutomateService.b(Unknown Source)
 
05-12 07:44:31.392 18920 19284 E AutomateService:         at com.llamalab.automate.AutomateService.e(Unknown Source)
 
05-12 07:44:31.392 18920 19284 E AutomateService:         at com.llamalab.automate.AutomateService.handleMessage(Unknown Source)
 
05-12 07:44:31.392 18920 19284 E AutomateService:         at android.os.Handler.dispatchMessage(Handler.java:98)
 
05-12 07:44:31.392 18920 19284 E AutomateService:         at com.llamalab.android.os.h.dispatchMessage(Unknown Source)
 
05-12 07:44:31.392 18920 19284 E AutomateService:         at android.os.Looper.loop(Looper.java:135)
 
05-12 07:44:31.392 18920 19284 E AutomateService:         at com.llamalab.android.os.c.run(Unknown Source)
 
05-12 07:44:33.482  1179  1179 W ResourceType: No package identifier when getting value for resource number 0x00000000
 
05-12 07:44:33.482  1179  1179 W PackageManager: Failure retrieving resources for com.llamalab.automate: Resource ID #0x0
 
05-12 07:44:33.482   924  1522 I ActivityManager: START u0 {act=com.android.systemui.recents.SHOW_RECENTS flg=0x10804000 cmp=com.android.systemui/.recents.RecentsActivity} from uid 10017 on display 0
 
05-12 07:44:33.702  1179  1179 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@14eae385 time:13171509
 
05-12 07:44:33.732   924   939 I art     : Background sticky concurrent mark sweep GC freed 91050(6MB) AllocSpace objects, 19(551KB) LOS objects, 9% free, 50MB/55MB, paused 1.946ms total 178.968ms
 
05-12 07:44:34.012   924   959 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{3728a10a u0 com.android.systemui/.recents.RecentsActivity t774} time:13171814
 
05-12 07:44:34.492 11260 11260 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@f5b7df time:13172296
 
05-12 07:44:34.772   924   959 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{2c4f7dfa u0 scd.lcex/.ActivityMain t788} time:13172579
 
05-12 07:44:35.452  1179  1179 W ResourceType: No package identifier when getting value for resource number 0x00000000
 
05-12 07:44:35.452  1179  1179 W PackageManager: Failure retrieving resources for com.llamalab.automate: Resource ID #0x0
 
---- May 12, 2015 7:45:29 AM ----

Automate developer

unread,
May 13, 2015, 2:34:14 PM5/13/15
to automa...@googlegroups.com, markn...@gmail.com
Thanks, this will suffice. What Automate version are you using?


On Tuesday, May 12, 2015 at 2:01:40 PM UTC+2, Mark Newton wrote:
I opened Automate today and noticed that my Auto 2G/3G/4G flow stopped with a Superuser Shell Unavailable IllegalStateException. I captured the logcat for it failing on start, but unfortunately didn't get the initial failure in the logcat.

---- May 12, 2015 7:45:29 AM ----
 
05-12 07:44:22.152 11557 11557 I auditd  : Starting up
 
05-12 07:44:22.162 11557 11557 E auditd  : Failed on audit_set_pid with error: Protocol not supported
 
05-12 07:44:22.162 11557 11557 I auditd  : Exiting
 
05-12 07:44:23.612  1179  1179 W ResourceType: No package identifier when getting value for resource number 0x00000000
 
05-12 07:44:23.622  1179  1179 W PackageManager: Failure retrieving resources for scd.lcex: Resource ID #0x0
 
05-12 07:44:23.632   924   940 I ActivityManager: START u0 {act=com.android.systemui.recents.SHOW_RECENTS flg=0x10804000 cmp=com.android.systemui/.recents.RecentsActivity} from uid 10017 on display 0
 
05-12 07:44:23.772  1179  1179 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@14eae385 time:13161572
 
05-12 07:44:23.832   924  1668 W InputMethodManagerService: Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@36d8fdcc (uid=10127 pid=11260)
 
05-12 07:44:24.062   924   959 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{3728a10a u0 com.android.systemui/.recents.RecentsActivity t774} time:13161864
 
05-12 07:44:24.672  1179  1179 W ResourceType: No package identifier when getting value for resource number 0x00000000
 
05-12 07:44:24.672  1179  1179 W PackageManager: Failure retrieving resources for scd.lcex: Resource ID #0x0
 
05-12 07:44:25.602 31997 31997 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@13b49f56 time:13163402
 
05-12 07:44:25.872   924   959 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{1531e7a6 u0 com.llamalab.automate/.FlowDetailsActivity t781} time:13163663
 
05-12 07:44:26.902 18920 19284 E AutomateService: onExecuteFailure
 
05-12 07:44:26.902 18920 19284 E AutomateService: java.lang.IllegalStateException: Superuser shell unavailable
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at com.llamalab.automate.hb.a(Unknown Source)
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at com.llamalab.automate.by.a(Unknown Source)
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at com.llamalab.automate.stmt.MobileNetworkPreferredSet.b(Unknown Source)
 
05-12 07:44:26.902 18920 19284 E AutomateService:         at com.llamalab.automate.AutomateService.b(Unknown Source)
 
05-12 07:44:
...

Mark Newton

unread,
May 14, 2015, 2:51:31 AM5/14/15
to automa...@googlegroups.com, markn...@gmail.com
1.0.18.a1

Automate developer

unread,
May 14, 2015, 1:31:31 PM5/14/15
to automa...@googlegroups.com, markn...@gmail.com
I've got to reevaluate the code for starting the root service, too many issues.

On Thursday, May 14, 2015 at 8:51:31 AM UTC+2, Mark Newton wrote:
1.0.18.a1

mrweb...@gmail.com

unread,
Oct 7, 2015, 3:44:00 AM10/7/15
to Automate
Hello, i'm New to using Automate. I used it on my nexus 5 with cataclysm Rom based in the original Rom 5.1.1 but after i now changed to the New Version 6.0 of the original rom i always get a superuser shell timeout like described here before. II just wanted to let you know, that there may be a Problem because every other root APP is still running fine. I'll use logcat an See what i can capture.

Automate developer

unread,
Oct 7, 2015, 2:10:45 PM10/7/15
to Automate, mrweb...@gmail.com
Many of the internal/hidden APIs used by the root features has changes with Android 6.
I'am working on fixing it. Please try the current Alpha version, it should fix some issues:
https://plus.google.com/110165001747691845730/posts/ZgetBzG9Kdt

Please report back if it works any better!

lukas.t...@gmail.com

unread,
Oct 8, 2015, 5:11:44 PM10/8/15
to Automate
With the Alpha Version i am receivomg a permission denied error instead of the superuser timeout. Thanks fpr the work !
Message has been deleted
Message has been deleted
Message has been deleted

Automate developer

unread,
Oct 8, 2015, 5:29:56 PM10/8/15
to Automate, lukas.t...@gmail.com
Is it because you don't have a rooted device yet?

maf...@gmail.com

unread,
Dec 1, 2017, 12:21:04 PM12/1/17
to Automate
Hello guys, good day! 

Is there any solution for this? I'm facing the same problem on android 7.1.1. I currently have just one flow that uses superuser permissions. Despite of that running 2 or more flows at the same time is throwing this error on the flow that uses superuser. It only works ok if this flow runs alone.

Thanks in advance,
Marcelo Franco

Henrik "The Developer" Lindqvist

unread,
Dec 1, 2017, 3:16:49 PM12/1/17
to Automate
Ensure to grant Automate perpetual root access, otherwise the root confirmation dialog may appear when you're not around.
Reply all
Reply to author
Forward
0 new messages