Start a flow via ADB command?

2,283 views
Skip to first unread message

com.n...@gmail.com

unread,
Jun 25, 2016, 10:46:49 PM6/25/16
to Automate
I have connected my phone to my computer with debugging mode enabled. Is there any way to start a flow via ADB command? Thanks a lot.

Henrik "The Developer" Lindqvist

unread,
Jun 25, 2016, 11:30:59 PM6/25/16
to Automate, com.n...@gmail.com
am broadcast -a com.llamalab.automate.intent.action.START_FLOW -d <Flow URI>

See the Flow beginning block for the <Flow URI>.

com.n...@gmail.com

unread,
Jun 26, 2016, 4:15:10 AM6/26/16
to Automate, com.n...@gmail.com
Thanks for the reply. I tried this command:

adb shell su -c am broadcast -a com.llamalab.automate.intent.action.START_FLOW -d content://com.llamalab.automate.provider/flows/13/statements/1

And the result was:
Broadcasting: Intent { act=com.llamalab.automate.intent.action.START_FLOW dat=content://com.llamalab.automate.provider/flows/13/statements/1 }
Broadcast completed: result=0

But nothing happened on the phone. So what could possibly go wrong here?

Henrik "The Developer" Lindqvist

unread,
Jun 26, 2016, 1:20:03 PM6/26/16
to Automate, com.n...@gmail.com
Okay, try:
am broadcast -a com.llamalab.automate.intent.action.START_FLOW -d content://com.llamalab.automate.provider/flows/13/statements/1 -t vnd.android.cursor.item/vnd.com.llamalab.automate.provider.flow_statement

su is not required.

com.n...@gmail.com

unread,
Jun 26, 2016, 10:18:15 PM6/26/16
to Automate, com.n...@gmail.com
I have tried but still without success:

Broadcasting: Intent { act=com.llamalab.automate.intent.action.START_FLOW dat=content://com.llamalab.automate.provider/flows/13/statements/1 typ=vnd.android.cursor.item/vnd.com.llamalab.automate.provider.flow_statement }
Broadcast completed: result=0

The flow's URI is corrected though, as you can see in this screenshot image: http://i.imgur.com/ClBBLVx.png

Is there any other option for me?

Henrik "The Developer" Lindqvist

unread,
Jun 27, 2016, 6:52:36 PM6/27/16
to Automate, com.n...@gmail.com
This works:
am start -a com.llamalab.automate.intent.action.START_FLOW -d content://com.llamalab.automate.provider/flows/13/statements/1

I'd prefer if users didn't use it since it use the "start activity" call instead of a direct broadcast. I need to investigate why broadcast doesn't work.

Henrik "The Developer" Lindqvist

unread,
Jun 27, 2016, 7:10:13 PM6/27/16
to automa...@googlegroups.com, com.n...@gmail.com
Only explicit broadcasts seems to work:
am broadcast -a com.llamalab.automate.intent.action.START_FLOW -d content://com.llamalab.automate.provider/flows/13/statements/1 -n com.llamalab.automate/.StartServiceReceiver

I'll continue investigating why that's the case, maybe a bug in the am command or the Automate manifest.

dillo...@gmail.com

unread,
Jan 23, 2018, 7:31:13 PM1/23/18
to Automate
is there a way to stop a flow over adb?  ive gotten it started but i would like to stop it as well remotely


On Monday, June 27, 2016 at 6:10:13 PM UTC-5, Henrik "The Developer" Lindqvist wrote:
Only explicit broadcasts seems to work:
am start -a com.llamalab.automate.intent.action.START_FLOW -d content://com.llamalab.automate.provider/flows/13/statements/1 -n com.llamalab.automate/.StartServiceReceiver

Henrik "The Developer" Lindqvist

unread,
Jan 24, 2018, 4:56:14 AM1/24/18
to Automate
Use action com.llamalab.automate.intent.action.STOP_FLOW
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages