How to pick up a call by adb

2019-04-24 22:36发布

问题:

Can I pick up a call by any adb command? I know that you can dial a number by "adb shell service call phone 2 s16 "+15084157509".

Can phone service do pick-up call or can I send some adb command to manipulate activity?

much appreciated

回答1:

adb shell input keyevent KEYCODE_CALL



回答2:

To call TelephonyManager.answerRingingCall() use adb shell service call phone 5 command.



回答3:

That works for me:

 adb shell input keyevent 5


回答4:

Set the following property on far end to auto answer the incoming call in 2 seconds

adb shell setprop persist.sys.tel.autoanswer.ms 2000

To turn off auto answer,

adb shell setprop persist.sys.tel.autoanswer.ms 0


回答5:

adb -s emulator-5554 shell am start -a android.intent.action.CALL -d tel:555-5555