Screen capture on rooted device I want to capture screen of an android device rooted using APK. I tried
process = Runtime.getRuntime().exec("/system/bin/screencap -p " + path + ”/file.png ”);
This command is working fine but it is too slow. Then I tried using second option
View content = findViewById(android.R.id.content).getRootView();
content.setDrawingCacheEnabled(true);
Bitmap bitmap = Bitmap.createBitmap(content.getDrawingCache());
OutputStream fout = null;
File imageFile = new File(_path,"ScreenImage.png");
try {
fout = new FileOutputStream(imageFile);
bitmap.compress(Bitmap.CompressFormat.JPEG, 90, fout);
fout.flush();
fout.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
But in this I am getting view of my application not current screen. I am is to capture screen shots an make video out of them I am using FB0 to make video but make problem is to capture screen with speed of 8 frames per second
Please suggest solution for speeding this process. resolution is not problem it can be of poor quality.