I'm trying to programmatically execute the new command "ScreenRecorder" kitkat. I just tried this:
suProcess = Runtime.getRuntime().exec("su");
process = Runtime.getRuntime().exec("screenrecord /sdcard/Folder/Example.mp4");
But doesn't work. In the Folder I've the file Example.mp4
but it is empty (0 byte). Why? How can I solve this? Where is the problem? If from terminal emulator I write su
and press enter and after write screenrecord /sdcard/Folder/Example.mp4
it works perfectly. Obvisioully I'm running on 4.4.2 and in a rooted terminal.