adb命令打开摄像头,我怎样才能运行ADB壳Android摄像头应用程序?

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!

解决方案

Alternatively, you can start the camera in 2 other ways

Image capture mode: adb shell "am start -a android.media.action.IMAGE_CAPTURE"

Video capture mode: adb shell "am start -a android.media.action.VIDEO_CAPTURE"

Other information

To focus: adb shell "input keyevent KEYCODE_FOCUS"

To take a photo or start/stop recording: 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

KEYCODE_CAMERA: Added in API level 1

Constant Value: 27 (0x0000001b)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值