Using adb command to make a call, reject a call and sending / receiving a message


1. Incoming calls/Outgoing call

Two devices are required to make incoming calls and single device is required to make an outgoing call

  • Using two devices to make incoming calls or outgoing call
    cmd :   adb -s “UDID Number” shell am start -a android.intent.action.CALL -d tel:”Phone number”
  • Using single device to make outgoing call
    cmd :   adb shell am start -a android.intent.action.CALL -d tel:”Phone number”

2. Cancel/Hang Up Call

  • Using two devices to cancel/hang up call 
    cmd  :  adb -s “UDID Number” shell input keyevent KEYCODE_ENDCALL
  • Using single device to cancel/hang up call 
    cmd  :  adb shell input keyevent KEYCODE_ENDCALL

3. Pick up/Attend the  call

  • Using two devices to pick up/attend call 
    cmd  :  adb -s “UDID Number” shell input keyevent KEYCODE_CALL
  • Using single device to pick up/attend call
    cmd : adb shell input keyevent KEYCODE_CALL

4. Sending message and receiving message

  • Using two devices to sending or receiving a message
    • Type message in text box
      cmd :  adb -s “UDID Number” shell am start -a android.intent.action.SENDTO -d sms:”PhoneNumber” –es sms_body “Message”
    • Enter key
      cmd  :  adb -s “UDID Number” shell input keyevent 22
  • Using a single device to send a message
    • Type message in text box
      cmd : adb shell am start -a android.intent.action.SENDTO -d sms:”PhoneNumber” –es sms_body “Message”
    • Enter key
      cmd : adb shell input keyevent 22

Note : UDID number is your phone serial number

Leave A Comment

Your email address will not be published. Required fields are marked *