Is your code $SETPROP net.if.default rmnet0*  need a root access
If so from android application may be we don't have root previliges

On Jul 28, 3:39 pm, Suchita Sharma <suchi.bhard...@gmail.com> wrote:
> Hi all,
>
> I am trying to execute a shell script from application using
>
> java.lang.Process API.
>
> The script file is executing properly as i am able to get logs but the line
>
> *$SETPROP net.if.default rmnet0*
> *
> *
> is not getting executed.
>
> has anyone able to execute .sh file from application succesfully.
>
> Code Snippet:
> *//*
> *str={"/system/bin/sh","/sdcard/test.sh"};*
> *Process p = Runtime.getRuntime().exec(str);*
> *
> *
> *//*
> *
> *
> test.sh:
> LOG=/system/bin/log
> SETPROP=/system/bin/setprop
> $LOG -t test"++Setting up default iface"
>
> $SETPROP net.if.default rmnet0
> $LOG -t test"++Setting done "

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

Reply via email to