[android-developers] Re: How to run android application from super user(administrator) mode

2010-02-08 Thread Asif k
I got somewhere on the net following code, I tried to execute but it throws broken pipe: IOException at os.writeBytes(single + \n); line Following is the code.. Process process = Runtime.getRuntime().exec(su); DataOutputStream? os = new DataOutputStream?(process.getOutputStream());

Re: [android-developers] Re: How to run android application from super user(administrator) mode

2010-02-08 Thread Sean Hodges
Are you using a rooted phone? Elevated privileges will be refused on a stock build. I'm not sure what the actual effect will be. I would expect a SecurityException, but it's possible that the su program is simply not visible to user-space processes. Also, you are not specifying the full path to

[android-developers] Re: How to run android application from super user(administrator) mode

2010-02-08 Thread Bob Kerns
The broken pipe exception means the process on the other end is gone. This won't give a SecurityException, because it's not Java that's checking the permissions. Connect to the phone via 'adb -d shell' and type 'su' followed by Enter. What happens? (You may need to add the tools directory from

[android-developers] Re: How to run android application from super user(administrator) mode

2010-02-04 Thread Asif k
Is it possible to spawn a new process from the activity with su mode and then run the script?? i had given the shell script as bellow but does not give fruitful output, stored in the device: /data/local/hello.sh #!/system/bin/sh (ifconfig wlan0 up)su exit and form Java code, Process process =