How to pick up a call by adb

13,020

Solution 1

adb shell input keyevent KEYCODE_CALL

Solution 2

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

Solution 3

That works for me:

 adb shell input keyevent 5
Share:
13,020
Jimmy Wu
Author by

Jimmy Wu

Updated on July 20, 2022

Comments

  • Jimmy Wu
    Jimmy Wu almost 2 years

    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

  • Jimmy Wu
    Jimmy Wu about 12 years
    this is dailing a number. but is there any way to pick up an incoming call?
  • K_Anas
    K_Anas about 12 years
    i don't think that such a command-line exist whith adb you can simulate a call only with adb
  • Jimmy Wu
    Jimmy Wu about 12 years
    awesome, found a solution, adb shell input keyevent 5
  • woot
    woot over 10 years
    @JimmyWu you should post your solution as an answer and resolve this question.
  • Robert J
    Robert J about 8 years
    Fantastic!!! What about hitting a button in that call would it be as previously stated?
  • Robert J
    Robert J about 8 years
    Also would this require root access if I was using tasker?
  • rbennell
    rbennell almost 6 years
    @RobertJ yes this requires root access.