Probe input device type

We carefully check input device type, to make
sure emulate touch event on a touch pandel device,
and power key on a key device.
Check if screencap command exists on device

If not, wait 3 seconds and try again.

This change avoid try to parse FB info from error
message of screencap command not found, and retry
immediately.