Is there a way to query a phone call status with ADB commands?
For instance, I want to see if a phone call is still active while in a phone call or if it is not there (has dropped)
Is there a way to query a phone call status with ADB commands?
For instance, I want to see if a phone call is still active while in a phone call or if it is not there (has dropped)
You could use dumpsys
command.
$ adb shell dumpsys telephony.registry
The field mCallState
gives the call status:
$ adb shell dumpsys telephony.registry | grep "mCallState"
When in Idle mode:
$ adb shell dumpsys telephony.registry | grep "mCallState"
mCallState=0
When call is connected:
$ adb shell dumpsys telephony.registry | grep "mCallState"
mCallState=2
When an incoming call (Phone in ringing mode):
$ adb shell dumpsys telephony.registry | grep "mCallState\|mCallIncomingNumber"
mCallState=1
mCallIncomingNumber=+9191XXXXXXXX
More information here:
Tested on Android v4.4.4
Misc:
You can get a lot of information using dumpsys
.
To see what parameters dumpsys support use adb shell dumpsys | grep "DUMP OF SERVICE"
.