Skip to content

Capturing camera image

Capture the camera image can be done using GUI or via console.
To capture the Camera image from console use the following:
Start Camera application

$ su
# am start -a android.media.action.STILL_IMAGE_CAMERA

Send KEYCODE_CAMERA event (take the picture)

# input keyevent 27 

Send KEYCODE_BACK event (exit Camera application)

# input keyevent 4

All this can be done in one line

# am start -a android.media.action.STILL_IMAGE_CAMERA && sleep 1 && input keyevent 27 && input keyevent 4