Shell Permission denied

515 views
Skip to first unread message

lehen...@gmail.com

unread,
Oct 21, 2015, 9:17:01 AM10/21/15
to Automate
Hey there,

when i try to execute

echo Hello

i get:

2015-10-21 14:40:14.201 INFO 31@1: Flow beginning
2015-10-21 14:40:14.202 INFO 31@7: Shell command
2015-10-21 14:40:14.230 FAIL 31@7: java.io.IOException: Permission denied
2015-10-21 14:40:14.237 INFO 31@7: Stopped by failure 

But if i execute the command in Terminal Emulator it works just fine.
What am i doing wrong?

I tried the alpha and the stable version same results.
I am on a LG G4 with android 5.1

Thanks in advance

Automate developer

unread,
Oct 21, 2015, 1:21:36 PM10/21/15
to Automate, lehen...@gmail.com

Michi Lehenauer

unread,
Oct 21, 2015, 1:42:17 PM10/21/15
to Automate developer, Automate
Already got that installed..

Automate developer

unread,
Oct 21, 2015, 1:46:24 PM10/21/15
to Automate, henrik.l...@gmail.com, lehen...@gmail.com
What command are you trying to execute?
Have you changed the "working directory"?

A shell can't write to a removable "SD card".



On Wednesday, October 21, 2015 at 7:42:17 PM UTC+2, Michi Lehenauer wrote:
Already got that installed..

Michi Lehenauer

unread,
Oct 21, 2015, 1:49:48 PM10/21/15
to Automate developer, Automate

Just a simple echo.
Wanted to do more but its wierd that its not working.
What should i change the workind dirctory to? Didn't change it until now.

Automate developer

unread,
Oct 21, 2015, 2:04:36 PM10/21/15
to Automate, henrik.l...@gmail.com, lehen...@gmail.com
Automate will to use the "external storage" as the default working directory for the shell process.
Maybe the system property for it isn't found correctly, as the "working directory" try:
/sdcard
or
/mnt/sdcard


On Wednesday, October 21, 2015 at 7:49:48 PM UTC+2, Michi Lehenauer wrote:

Just a simple echo.
Wanted to do more but its wierd that its not working.
What should i change the workind dirctory to? Didn't change it until now.


Automate developer

unread,
Oct 21, 2015, 2:11:04 PM10/21/15
to Automate, henrik.l...@gmail.com, lehen...@gmail.com
Hmm, i'am able to reproduce the security failure in Android 5.1.
Changing the working directory doesn't work.


On Wednesday, October 21, 2015 at 7:49:48 PM UTC+2, Michi Lehenauer wrote:

Just a simple echo.
Wanted to do more but its wierd that its not working.
What should i change the workind dirctory to? Didn't change it until now.


Michi Lehenauer

unread,
Oct 21, 2015, 2:12:28 PM10/21/15
to Automate developer, Automate

Both not working..
It works with root but i would like to avoid that..

Automate developer

unread,
Oct 21, 2015, 2:20:09 PM10/21/15
to Automate, henrik.l...@gmail.com, lehen...@gmail.com
No root should net be needed. I'll find a fix.


On Wednesday, October 21, 2015 at 8:12:28 PM UTC+2, Michi Lehenauer wrote:

Both not working..
It works with root but i would like to avoid that..


Automate developer

unread,
Oct 21, 2015, 2:51:56 PM10/21/15
to Automate, henrik.l...@gmail.com, lehen...@gmail.com
Try another command like:
ls

That seems to work okay. echo isn't really an executable, it's a bash/sh command.



On Wednesday, October 21, 2015 at 8:12:28 PM UTC+2, Michi Lehenauer wrote:

Both not working..
It works with root but i would like to avoid that..


Michi Lehenauer

unread,
Oct 21, 2015, 3:10:57 PM10/21/15
to Automate developer, Automate

Ah okay.
I found a solution that works for me:
Execute a script with a shebang and not the command directly (:
Thanks for looking into it (:

Michi Lehenauer

unread,
Oct 23, 2015, 5:21:23 AM10/23/15
to Automate developer, Automate
just another quick question:
how is the shell implementatin different to tasker? it seems that on tasker i can do way more stuff like

Automate developer

unread,
Oct 23, 2015, 3:07:07 PM10/23/15
to Automate, henrik.l...@gmail.com, lehen...@gmail.com
I don't know. But it may be because Tasker run the command in an actual interactive shell, i.e. sh, bash, etc..
Automate only does that for a the "Shell command superuser" block using "su", since that's the only thing "root apps" provide.
For the regular "Shell commmand" block Automate just start a new process for the command, i.e "exec".

On Friday, October 23, 2015 at 11:21:23 AM UTC+2, Michi Lehenauer wrote:
just another quick question:
how is the shell implementatin different to tasker? it seems that on tasker i can do way more stuff like

Reply all
Reply to author
Forward
0 new messages