T2,
Okay, here's what I (think I

) know:
Normally, you would launch the
sh (shell) program to run/interpret commands and there are a couple of ways you can do this (I'll use the "
date" command as the example program you might want to run):
1.
Piping:
echo "date" | sh
2.
Redirection:
echo "date" > cmd.txt
sh < cmd.txt
Here's the actual test session:
$
echo "date" | sh
echo "date" | sh
Mon Nov 29 19:57:13 EST 2010
$
echo "date" > cmd.txt
echo "date" > cmd.txt
$
sh < cmd.txt
sh < cmd.txt
Mon Nov 29 19:57:31 EST 2010
You should be able to substitute the
su (superuser) program in place of the
sh program for executing commands:
$
echo "date" | su
echo "date" | su
Mon Nov 29 19:59:37 EST 2010
$
su < cmd.txt
su < cmd.txt
Mon Nov 29 19:59:54 EST 2010
with the only difference being that you'll get prompted by the SuperUser whitelist app for permission to run root-only commands.
Also, if you want to save/capture the output, you'll probably have to redirect the command's output to a file for subsequent parsing:
$
su < cmd.txt > cmd.out
su < cmd.txt > cmd.out
$
cat cmd.out
cat cmd.out
Mon Nov 29 20:05:15 EST 2010
So, I don't know exactly how App Inventor might allow you to implement running programs, but if you format your commands correctly, this should work.
Additionally, if you get to the point of using Java, you could check out these helpful threads:
Help with something easy. - Droid Forum - Verizon Droid & the Motorola Droid Forum
Android: Requesting root access in your app | Stealthcopter.com
Hope this helps. Cheers!