Skip to content

Instantly share code, notes, and snippets.

@arumoy
Last active January 23, 2021 07:15
Show Gist options
  • Save arumoy/9d23d7c76459c11d08823dc36be019f0 to your computer and use it in GitHub Desktop.
Save arumoy/9d23d7c76459c11d08823dc36be019f0 to your computer and use it in GitHub Desktop.
Make a call through ADB connected android phone from powershell
adb shell input keyevent KEYCODE_ENDCALL
$telno = $args[0]
if($telno -cmatch '^\+?\d{12}$' -or $telno -cmatch '^\d{10}$') {
adb shell am start -a android.intent.action.CALL -d tel:$telno
} else {
echo $telno' is not valid phone number, make it 10 digits or ''+<2 digit country code><10 digit phone number>'''
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment