That's the problem, you don't have root permissions but maybe there is a workaround with java, maybe there is a method that you can use for it.
look that, it maybe help you http://stackoverflow.com/questions/249916/how-do-i-find-the-dns-servers-in-android-from-a-java-program On Jul 28, 6:43 am, kiran <saikiran....@gmail.com> wrote: > 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