ADB and fastboot commands, integral components of the Android Debug Bridge, offer a myriad of functionalities for performing many tasks on connected devices or emulators. The capabilities of ADB and fastboot commands on Android devices are extensive, allowing users to execute actions such as making calls and sending text messages using ADB Shell commands on Windows, Mac, and Linux.
By utilizing ADB commands, direct access to the device’s shell is granted, facilitating efficient debugging, troubleshooting, and testing processes. This versatile tool enables a wide range of activities, including app installation and uninstallation, screen capture, screen activity recording, and seamless file transfer between devices and computers.
Additionally, ADB Shell commands provide real-time monitoring of system logs, allowing prompt identification of potential issues. ADB exhibits significant flexibility in controlling various aspects of an Android device remotely or locally via USB connection, as well as through wireless network protocols like Wi-Fi or Bluetooth.
Table of Contents
Prerequisites:
Before utilizing ADB to execute commands on your Android device from your Windows, Mac, or Linux computer, ensure the setup of ADB and fastboot drivers, along with a few other preparations.
- Download and install the latest Android SDK Platform tools on Windows/Mac/Linux here.
- Open Settings > Developer options on your phone and enable USB Debugging.
- Go to Settings > Display > Screen timeout and set the time to 10 minutes.
To set up ADB and establish communication with your Windows PC, follow these steps:
- Extract the contents of the platform-tools.zip on your desktop.
- Open the extracted folder.
- Launch a Command Prompt or PowerShell window with the Android SDK platform tools path.
- To do so, open the folder, press the application key and select the Open in Terminal option from the Windows context menu or press f4 key and type cmd.
- Alternatively, you can press f4 key and type “powershell” in the platform-tools folder address bar and hit Enter to launch the command window.
- Execute the command ‘adb devices’ to ensure proper ADB and fastboot setup.
- On your phone’s screen, tap the Allow button when prompted to authorize ADB.
- You’ll get the serial number of your Android device under ‘List of devices attached‘.
You are now ready to utilize ADB commands to control your Android device from your computer. In case of any ADB-related errors, refer to the provided solutions.
ADB Shell Command for Making Calls:
While the Phone app is the preferred method for making calls, ADB Shell commands can be employed if the touchscreen is non-functional. Follow these steps:
- Launch a PowerShell window with the path of the ‘platform-tools’ folder as described above.
- Type ‘adb shell’ to enter ADB Shell mode and press enter.
- Enter the command ‘am start -a android.intent.action.CALL -d tel:+90123456789’, replacing the phone number as needed.
- Upon hitting Enter, your Android device will initiate the call.
Picking Up and Hanging Up Calls using ADB Command:
You can also accept or reject incoming calls with ADB commands:
- Execute ‘adb shell input keyevent KEYCODE_CALL’ to accept an incoming call.
- To hang up, execute ‘adb shell input keyevent KEYCODE_ENDCALL’.
ADB Shell Command for Sending Text Messages:
Send text messages using ADB Shell commands:
- Open a PowerShell window and type ‘adb shell’ and press enter.
- Type the command ‘am start -a android.intent.action.SENDTO -d sms:+90123456789 –es sms_body “Test Message from accessibleandroid.com”‘ and press enter.
- Execute key event commands ‘input keyevent 22’ and ‘input keyevent 66’ and press enter to send the message.
Note: The key event codes to emulate the send button may not work on Android devices with Gboard or any 3rd part keyboard app. Please use the default keyboard of your device. You may need to find the correct keyevent values to trigger the send button.
ADB Shell Command for Inputting Text:
Input text in apps using ADB commands:
- Open a PowerShell or Command Prompt window.
- Type ‘adb shell input text ‘I love this adb command” and press enter.
- Execute ‘adb shell input keyevent 22’ to print the text in the app’s text field.
If navigating to the ‘platform-tools’ folder is inconvenient, consider setting up system-wide ADB on Windows or macOS.

Comments