Created
February 2, 2018 08:28
-
-
Save SamMousa/06149950d2bfe55eb1c37f3f7723be50 to your computer and use it in GitHub Desktop.
Call via android phone from linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! -z "$1" ]; then | |
NUMBER=`zenity --entry --text "Enter phone number" --entry-text ${1:4}` | |
else | |
NUMBER=`zenity --entry --text "Enter phone number"` | |
fi | |
if [ $? -eq 0 ] | |
then | |
beep -f 600 -l 400 -r 2 & | |
adb shell am start -a android.intent.action.CALL -d tel:${NUMBER} | |
zenity --info --text "Close this window to stop the call" --modal --title "Call in progress"; | |
adb shell input keyevent KEYCODE_ENDCALL | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment