I push the button and program get SU, but png file is 0 bytes weight. Logcat says
Permission denied: can't read framebuffer pid=12844 uid=10087.
So why that's so. My phone is rooted, program already get su. What's wrong?
Button btn = (Button) findViewById(R.id.button1);
btn.setOnClickListener (new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
try {
Process process = Runtime.getRuntime().exec("su");
Process pr = Runtime.getRuntime().exec("/system/bin/screencap -p /sdcard/s.png");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});