Skip to content

Instantly share code, notes, and snippets.

@anantshri
Created June 22, 2016 05:01
Show Gist options
  • Save anantshri/cc366d3c983ac79361735a4f4029d258 to your computer and use it in GitHub Desktop.
Save anantshri/cc366d3c983ac79361735a4f4029d258 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ $# -eq 2 ]
then
end=$2
for i in $(eval echo "{1..$end}")
do
sleep 2
echo $i
adb wait-for-device
adb shell am start -a android.intent.action.CALL -d tel:$1
sleep 10
adb shell input keyevent KEYCODE_ENDCALL
done
else
echo "Execution format"
echo "$0 <phone_number> <number_of_times_to_call>"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment