How can I run android camera program from adb shell?
I know that I should use am but I do not know what command should I exactly enter
I used this:
am start -a android.intent.action.MAIN -n com.android.camera
But it didn't work!
How can I run android camera program from adb shell?
I know that I should use am but I do not know what command should I exactly enter
I used this:
am start -a android.intent.action.MAIN -n com.android.camera
But it didn't work!
it works for me here
I'd like to add to Keo Malope's answer that while IMAGE_CAPTURE and VIDEO_CAPTURE are likely to work on most devices, I have encountered cases where they don't work as expected. In this case, we have two more constants that we can try:
adb shell am start -a android.media.action.STILL_IMAGE_CAMERA
adb shell am start -a android.media.action.VIDEO_CAMERA
CameraActivity
class.AndroidManifest.xml
file.Then use following command:
I hope this will solve your problem.
Alternatively, you can start the camera in 2 other ways
adb shell "am start -a android.media.action.IMAGE_CAPTURE"
adb shell "am start -a android.media.action.VIDEO_CAPTURE"
Other information
adb shell "input keyevent KEYCODE_FOCUS"
adb shell "input keyevent KEYCODE_CAMERA"
Other notes
f the keycode string e.g KEYCODE_CAMERA, does not work, lookup the constant value from the API description. Example: KEYCODE_CAMERA
You need to specify exact component name (name of activity).
It is working on my device (HTC Desire HD), but I can't guarantee that it'll work everywhere.