Executing ADB Shell Commands
Tags: adbshellcommands, mobileapptesting, androidapptesting, iosapptest
Published: 2019-03-19 06:54:58

---
title: Executing ADB Shell Commands
published: true
description: ADB is Android Debug Bridge which is a command line utility included with Google's Android SDK.
tags: adb shell commands,mobile app testing,android app testing, ios app test
canonical_url: https://www.pcloudy.com/executing-adb-shell-commands/
---

You can fix the issues in your Android phone by connecting it with your computer and writing some easy commands. For this, you will need some command line tools which you can download from the Android developer’s site. If you are using Windows then you will need to visit the manufacturer’s page for your device and download the ADB and fastboot drivers for Windows. But first, let’s understand what are Android shell commands.

<b>Android Shell Commands</b>
ADB is Android Debug Bridge which is a command line utility included with Google's Android SDK. It provides a terminal interface to control your Android device connected to a computer using a USB. ADB can be used to run shell commands, transfer files, install/uninstall apps, reboot and more. You can also backup and restore your android devices using these commands.

 

<a href="https://www.pcloudy.com">pCloudy</a> also allows you to execute ADB Shell Commands on the connected device.

 
Select your desired device from the list and connect.


Click on “Execute ADB” icon.

While trying to execute ADB Shell command, you just need to follow few simple steps as given below:

<b>1. Select a device from the displayed list</b>

<img src="https://www.pcloudy.com/wp-content/uploads/2016/09/click-on-connect-to-access-the-device.jpg">

<b>2. Confirm connection of your selected device</b>

<img src="https://www.pcloudy.com/wp-content/uploads/2016/09/pCloudy-Select-Device.jpg">

<b>3. The connected device is ready testing</b>

<img src="https://www.pcloudy.com/wp-content/uploads/2016/09/click-on-android-logo-to-execute-adb-shell-commands.jpg">

<b>4. Enter ADB shell command to the given text box</b>

<img src="https://www.pcloudy.com/wp-content/uploads/2016/09/Enter-ADB-shell-command-to-the-given-text-box.jpg">

<b>5. Execute given ADB shell command</b>

<img src="https://www.pcloudy.com/wp-content/uploads/2016/09/Execute-given-ADB-shell-command.jpg">

<b>6. ADB shell command execution result</b>

<img src="https://www.pcloudy.com/wp-content/uploads/2016/09/ADB-shell-command-execution-result.jpg">
<img src="https://www.pcloudy.com/wp-content/uploads/2019/02/ADB-7.png">

<b>Useful Android terminal commands:
1. ADB reboot-bootloader and reboot recovery commands:</b>

This command will let you can reboot your device in the bootloader. If due to some malware your device is stuck or if your device is not rebooting then you can connect your device to the computer and run this command to reboot. To run the command just type adb reboot-bootloader in the command line and to boot the device in recovery just type adb reboot recovery.

 

<b>2. Fastboot device command:</b>

Fastboot is a diagnostic and engineering protocol that you can boot your Android device into. ADB does not work in the bootloader. If you have to boot into Android and the debugging tools are not active to communicate then you can use the fastboot command. Type fastboot devices in the prompt and you get the serial number.

 

<b>3. Fastboot unlock command</b>

Fastboot flashing unlock command unlocks your bootloader. This command is not supported in many phones that support fastboot but you can check if your phone supports it. Just type fastboot flashing unlock in the command prompt and hit enter.

 

<b>4. ADB sideload command:</b>

You can download the update zip file in your phone instead of waiting for the update to be pushed into the phone. To do that just download the update to your computer and connect your device to the computer. Now reboot into recovery on your phone and using the volume buttons choose to apply update from ADB. then open command line and type ADB sideload Full-Path-to-the-file.zip and hit enter.

 

A lot of users create android shell commands root in a device in spite of security. The adb reboot-bootloader command allows you to boot directly to your phone's bootloader. Once you're in the bootloader, ADB shell commands won't work anymore. That's where Android ADB fastboot command comes into the picture. Fastboot allows you to send commands to your phone while in the boot loader.

<b>ADB commands for reference</b>


<img src="https://thepracticaldev.s3.amazonaws.com/i/rrkswz6w2nlcw5nn4lws.png">

For more information check out this video:

https://www.youtube.com/watch?v=L5U5dgojNzo