Advertisement
metalx1000

Android Camera controls

Jan 19th, 2016
776
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.96 KB | None | 0 0
  1. #take still images in a loop
  2.  
  3. #turn on screen
  4. input keyevent KEYCODE_POWER
  5.  
  6. #IMAGE_CAPTURE starts the camera, but might ask for photo confirmation after each shot
  7. am start -a android.media.action.IMAGE_CAPTURE
  8. input keyevent KEYCODE_FOCUS #not really needed
  9. input keyevent KEYCODE_CAMERA
  10. while [ 1 ];do input keyevent KEYCODE_CAMERA;sleep 5;done &
  11.  
  12. #Video
  13. am start -a android.media.action.VIDEO_CAPTURE
  14.  
  15. #find screen backlight value (root needed to change value)
  16. busybox find / -name "backlight" #or busybox find / -name "brightness"
  17. cat /sys/class/backlight #/sys/devices/fd900000.qcom,mdss_mdp/qcom,mdss_fb_primary.155/leds/lcd-backlight/brightness
  18. echo 0 > /sys/class/backlight
  19. #press power button a few times to turn screen back on
  20.  
  21. #turn shutter sound off
  22. mount -o remount,rw /system #remount system as read/write
  23. cd /system/media/audio/ui/
  24. mv camera_click.ogg camera_click.ogg.old #remove sound
  25. mv camera_click.ogg.old camera_click.ogg #reload sound
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement