I would like to be able to use ADB to fully manage the process of a phonecall (primarily as I have cracked my screen and cannot see anything).
I know I can initiated a phonecall through:
adb shell am start -a android.intent.action.CALL -d tel:1234567890
Similarly I know I can use key events to end a call:
adb shell input keyevent KEYCODE_ENDCALL
However I have run into issues when the voicemail asks "press 1 to listen to your message, 2 for settings, etc".
I was hoping that the following command would work:
adb shell input keyevent KEYCODE_1
or at least the following:
adb shell sendevent /dev/input/event0 1 2 1
adb shell sendevent /dev/input/event0 1 2 0
However the voicemail does not recognise the selection and just repeats the message. I have no way to validate visually as I have no access to the screen.
Any suggestions?
Thanks for your help.
References:
- Making a call through adb How to make a call via pc by ADB command on android?
- Input event and events' list ADB Shell Input Events
- Send event https://groups.google.com/forum/?fromgroups=#!topic/android-beginners/il2PqSKRFNI