Last active
January 23, 2021 07:15
-
-
Save arumoy/9d23d7c76459c11d08823dc36be019f0 to your computer and use it in GitHub Desktop.
Make a call through ADB connected android phone from powershell
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
adb shell input keyevent KEYCODE_ENDCALL |
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
$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