Question

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

Was it helpful?

Solution

You might want to mount system partition as rw instead of rd so as to do it

https://android.stackexchange.com/questions/25250/how-to-mount-system-in-rw-mode-if-no-custom-recovery

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top