You need to look at the logcat output.  How do you not have USB?!?

On Thu, Mar 26, 2009 at 8:02 PM, simonc <[email protected]> wrote:

>
> 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
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~
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