Hi,
I'm wanting to run a script called toggle.sh on Android. Should I be
able to run this code?

String command = "su -c \"/toggle.sh\" root";
Process pr = Runtime.getRuntime().exec(command);

At the moment I can run the command from the terminal and it works but
when I try to run it from the application it fails (and I don't know
why - there is no USB on my Android phone to plug in the debugger).

Any help out there?

toggle.sh opens an internet connection or closes it and the
permissions.

I've given it these permissions.
<uses-permission android:name="android.permission.NETWORK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />

The Emulators don't have this command to run - and they are running on
Windows anyway.

I can't think of anything else to add to this.

Cheers
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to