Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a call via pc by ADB command on android?

I would like to make call via ADB command on android's command line.

How should I use ADB command in order to make a call via PC?

please provide source code.

like image 653
user604190 Avatar asked Feb 07 '11 16:02

user604190


People also ask

How do I run adb from command line?

Open a command window in the folder by holding shift and right-clicking in an empty spot in the folder and selecting "Open command prompt/PowerShell here" in the menu. Then you can start using ADB — connect your phone and try . ADB devices to see if it's working. A list with attached devices should show up.

What can I do with adb commands?

Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.


1 Answers

You should do (replace <serialno> by the serial number of your device or emulator, for example emulator-5554):

$ adb -s <serialno> shell am start -a android.intent.action.CALL -d tel:555-5555 

and see this in the logcat:

Starting: Intent { act=android.intent.action.CALL dat=tel:xxx-xxx-xxxx } 
like image 167
Diego Torres Milano Avatar answered Sep 20 '22 10:09

Diego Torres Milano