Skip to content

Instantly share code, notes, and snippets.

@theodric
Last active May 21, 2020 11:23
Show Gist options
  • Save theodric/cd0e27f3ab7e07ebacdee73fe66fda1c to your computer and use it in GitHub Desktop.
Save theodric/cd0e27f3ab7e07ebacdee73fe66fda1c to your computer and use it in GitHub Desktop.
Remote shutter button over ADB for Google Camera (PX4 mod)
##needs adb in $PATH
## drop the "PX4" to run this on the builtin Pixel camera app rather than the ported one
#once - loads app
adb shell 'am start -n com.google.android.GoogleCameraPX4/com.android.camera.CameraLauncher'
#to take pics
adb shell 'am start -n com.google.android.GoogleCameraPX4/com.android.camera.activity.CaptureActivity'
#print last captured image filename to console
adb shell 'ls -tr /sdcard/DCIM/Camera' | tail -1
#optional
#this presses the volume down button, triggering shutter
##adb shell "input keyevent KEYCODE_VOLUME_DOWN"
#this "taps" the shutter button onscreen, and adjusting the coordinates, can also be used to tell the camera to focus at a certain point
##adb shell input tap 700 2250
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment