You probably also need to remount the file system as RW, since / the system is read-only. Therefore, you may need to call SU with a similar command below:
mount -or,remount -t yaffs2 /dev/block/mtdblock3 /system
To execute the command, you can try two ways (I noticed that it sometimes works in Android, but the other will not)
Process p = Runtime.getRuntime().exec(new String[]{"su", "-c", "mount -or,remount -t yaffs2 /dev/block/mtdblock3 /system"});
Or you can do
Process p = Runtime.getRuntime().exec("su"); p.getOutputStream().write("mount -or,remount -t yaffs2 /dev/block/mtdblock3 /system".getBytes()); p.getOutputStream().write(<my next command>);
source share