Hello everyone
My problem: I find myself in the situation of being able to increase the speed of commands on android devices, because I have entered Root permissions and for this I must use the command terminal as Root to perform Root movements, one of which is the copy command (cp), and since I move large files from one place to another I find myself in need of having to increase that speed, I don't know if it can be done by a command that increases the speed of execution or command processing or by another command that allows me to put my process in a position among the first in the android execution list, or if there is any other way from java code or others.
My code:
public boolean copiar(){
String[] command = {"su", "-c", "cp", "ruta del fichero", "ruta a copiar"};
try {
Process proc = Runtime.getRuntime().exec(command);
Toast.makeText(this, "Si", Toast.LENGTH_LONG).show();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
boolean verdadero = true;
return true;
}
The copy is made from the sdcard and SD card with the partition system, data. etc, where the user wants to put it
If you know something related I will be happy to hear it. Thank you
I advise you to use FileChannel if the size of the files is large. Try the following code and compare execution times.