adb commands in tasker?

1,506 views
Skip to first unread message

Elephant

unread,
Aug 16, 2015, 11:54:33 AM8/16/15
to Tasker
Hi,  I'd like to create a task with the following ADB commands. Can I do this with Tasker? Maybe with "code" action - java something or shell? I not really familiar with scripting and coding but I was hoping that these 2 lines wouldn't be too difficult to get into tasker.
Thanks.

adb shell "am start -a android.intent.action.MAIN -n com.vmlite.vncserver/.MainActivity"
adb shell /data/data/com.vmlite.vncserver/files/vmlitevncserver

Rich D

unread,
Aug 18, 2015, 5:25:54 AM8/18/15
to Tasker Google Groups Post

Can I do this with Tasker?

Yup

Maybe with "code" action -  shell?
Yup

I not really familiar with scripting and coding

Nor am I..

You can use the   ;   to chain shell commands together, so I would try something like this in the shell action.

am start -a android.intent.action.MAIN -n com.vmlite.vncserver/.MainActivity;/data/data/com.vmlite.vncserver/files/vmlitevncserver

Or this..

am start -a android.intent.action.MAIN -n com.vmlite.vncserver/.MainActivity /data/data/com.vmlite.vncserver/files/vmlitevncserver

>

Elephant

unread,
Aug 28, 2015, 7:43:09 AM8/28/15
to Tasker
Thank you, it did indeed work the first time I tried it (with the semicolon) as I expected it should work, but not the second time. I rebooted Android and it did work again once. Then it  stopped working completely for some reason.
Now I found out that it was not enough to stop the app ( a vnc server) and end it with the Android task manager. The app would not stop all of it processes when it's killed via the task manager. There is "exit all" button in the app which really stops ALL related processes and services.  THEN the above shell command works in tasker ALWAYS as expected.

Many thanks, Rich.
Reply all
Reply to author
Forward
0 new messages