Reputation: 2011
I am developing a root app for modifying build.prop programatically.
I copied build.prop from /system/build.prop
to /sdcard/
but after modifying it I was unable to copy back to root partition
here is my code for copying build.prop from /system/build.prop
to /sdcard/
protected void SUCommand()
{
String sSUCommand = "cp /system/build.prop /sdcard/";
final String[] sCommand = {"su","-c",sSUCommand};
Thread thSUProcess = new Thread()
{
public void run()
{
try
{
Process p = Runtime.getRuntime().exec(sCommand);
}
catch(Exception e){}
}
};
thSUProcess.start();
}
I changed String sSUCommand = "cp /system/build.prop /sdcard/";
to String sSUCommand = "cp /sdcard/build.prop /system/";
to copy it to system partition
but didn't worked
I already rooted my phone and running lot of root apps successfully please tell me the right way to do it
Upvotes: 0
Views: 1029
Reputation: 320
You might want to mount system partition as rw instead of rd so as to do it
Upvotes: 1