Tech Blog

Coding

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

By Birundha G2 min read
← Back to blog

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

Keep reading

You may be interested in

Browse all articles →
Active Directory Federation Service
July 5, 20235 min read

Active Directory Federation Service

Active Directory Federation Service (ADFS) uses claims-based identity model to maintain application security and to implement federated identity. ADFS is a concept of Windows Server operating system, that provides users with single sign-on access to the application, those are located across organizational boundaries. For Example: We have 2 organizations – Organization 1 and Organization 2. […]

By Abinash MishraRead More →
Remote Access to Microsoft SQL Database Server
April 5, 20232 min read

Remote Access to Microsoft SQL Database Server

Remote access to a SQL server is important because it allows users to access the server from anywhere, at any time. This enables remote workers to access the data they need when they need it, even if they are not physically in the same location as the server. It also allows IT admins to access […]

By Malkeet SinghRead More →
Types of Load Balancer in AWS
February 6, 20235 min read

Types of Load Balancer in AWS

What is Load Balancing ? Load balancing is a critical component of any scalable and highly available Cloud or On-premise architecture. It helps distribute incoming traffic across multiple servers, improving the availability and scalability of a website or application. In the cloud, load balancing is offered as a service by various cloud providers such as […]

By Keerthik ShenoyRead More →