a가 실행되어도 host 가 서비스로 동작을 하고 있고.
a가 최종(최상위) 화면에서 실행되고 있다면 host에서는 최종 화면을 캡쳐할수있지요
example1)
public Bitmap takeScreenshot() {
View rootView = findViewById(android.R.id.content).getRootView();
rootView.setDrawingCacheEnabled(true);
return rootView.getDrawingCache();
}
example2)
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png
adb shell rm /sdcard/screen.png
-----------
Process sh = Runtime.getRuntime().exec("su", null,null);
OutputStream os = sh.getOutputStream();
os.write(("/system/bin/screencap -p " + "/sdcard/img.png").getBytes("ASCII"));
os.flush();
os.close();
sh.waitFor();
example3) 루팅폰이라면.. 재부팅도
Runtime.getRuntime().exec("su -c reboot");
} catch (IOException e) {
}
--------------------------------
doridori2013@nate.com