I need to store a file on my app's storage (for example inside /raw/ or /assets/) and copy it into a folder inside a folder in /system/, I know it needs root access and to make the system partition writable, and I did it with
Runtime.getRuntime().exec("su");
Runtime.getRuntime().exec("mount -o rw,remount /system/");
But I can't just use cp or cat for some unknown reasons, what's the best and easiest way to do this?