I was trying to run the following instruction in Android (Java):
Process p = Runtime.getRuntime().exec("/system/bin/lsof|grep mediaserver");
but I am getting an error if I run the following instruction:
Process p = Runtime.getRuntime().exec("/system/bin/lsof ");
the file is successfully saved. Can anyone tell what is the error? Actually I want to list and check if media server service is being running or not.