I want to keep the camera button pressed to take continuous snaps. I tried this code:
#!/system/bin/sh
am start -n com.android.camera2/com.android.camera.CameraLauncher
sleep 1
count=1
x=2
while [ $count -le 1 ]
do
input touchscreen tap 560 1800
input touchscreen tap 560 1800
input touchscreen tap 560 1800
input touchscreen tap 560 1800
input touchscreen tap 560 1800
input touchscreen tap 560 1800
input touchscreen tap 560 1800
input touchscreen tap 560 1800
done
But it does not hold the button. It taps with a delay.
Then I tried this:
sendevent /dev/input/event0 3 53 300
sendevent /dev/input/event0 3 54 400
sendevent /dev/input/event0 3 48 5
sendevent /dev/input/event0 3 58 50
sendevent /dev/input/event0 0 2 0
sendevent /dev/input/event0 0 0 0
sleep 1
sendevent /dev/input/event0 0 2 0
sendevent /dev/input/event0 0 0 0
this code gets executed but the effect is not seen on the touchscreen