execute android terminal script

Post your questions and help other users.

Moderator: Martin

Post Reply
holymoz
Posts: 113
Joined: 13 Sep 2013 10:27

execute android terminal script

Post by holymoz » 13 Sep 2013 10:39

hi, I'm a bit noob on automagic scripts but I assume those are not the same as the terminal scripts, there is a way to execute terminal android scripts? example

echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;

thanks!

standalonescript
Posts: 18
Joined: 13 Sep 2013 03:11

Re: execute android terminal script

Post by standalonescript » 13 Sep 2013 17:12

Holymoz,

There may be and I am just not aware of it but what is provided is the Script action. Use the "?" Box after you create a Script action and you can see all the procedure calls and syntaxes.

I haven't been using AA long but I haven't been limited by the options yet.

Josh

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: execute android terminal script

Post by Martin » 14 Sep 2013 06:57

Hi,

You can execute shell commands using action Execute Command and/or Execute Root Command.

Regards,
Martin

holymoz
Posts: 113
Joined: 13 Sep 2013 10:27

Re: execute android terminal script

Post by holymoz » 14 Sep 2013 07:23

thanks, I will try something.
very very good app anyway, tasker gave me a lot of bugs while yours is very reliable :D

holymoz
Posts: 113
Joined: 13 Sep 2013 10:27

Re: execute android terminal script

Post by holymoz » 14 Sep 2013 10:25

hi, how can I execute two commands on the same line? I want to execute this

PPID=$(pidof com.estrongs.android.safer)
echo "-17" > /proc/$PPID/oom_adj

to change the oom priority of an app

holymoz
Posts: 113
Joined: 13 Sep 2013 10:27

Re: execute android terminal script

Post by holymoz » 14 Sep 2013 11:37

nevermind, I made it, just put the script in a script.sh file with rvxrvxrvx permission and then executed sh script.sh with th execute root command :D

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: execute android terminal script

Post by Martin » 14 Sep 2013 11:44

You can execute two commands by using a semicolon:
echo "abc"; echo "xyz"

holymoz
Posts: 113
Joined: 13 Sep 2013 10:27

Re: execute android terminal script

Post by holymoz » 14 Sep 2013 11:49

thanks a lot! :P

standalonescript
Posts: 18
Joined: 13 Sep 2013 03:11

Re: execute android terminal script

Post by standalonescript » 14 Sep 2013 22:28

That is awesome. This will help me out a lot.

Post Reply