Android ADB commands to access device ( mobile phones ) shell

If you have installed “adb” command as mentioned in “How to Install ADB & Fastboot on Ubuntu 16.04, 16.10, 17.04, 17.10, 18.04, 18.10”

Use below commands to connect to your device / mobile phones shell,

First using “adb devices” command, make sure we have device properly connected to Laptop/Desktop.

 $ adb devices
List of devices attached
B2NGAA8831702707	device

If you don’t see any output from above command, it means the cable is not properly connected or adb debugging is not enabled in your mobile phone. Go to phone settings and enable android debugging support over USB.

To, connect to shell,

 $ adb shell 

If by any means, you are able to see serial number in “adb devices” but not able to connect, you can try to kill adb server and restart the same again and try as,

 $ adb kill-server 
 $ adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *

If you want to restart your device,

 $ adb reboot 
Android Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Commands and Packages Compilation Content Management System - CMS Core Kernel C Programs Development & Build Development Environment Setup Errors & Failures Flutter git Go Language Programs Hardware Platforms HTML JAVA Programs Kernel & Device Drivers Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Monetization / Google AdSense NDK / Middleware / HAL OS Concepts PHP Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized User Interface Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded

Leave a Reply / Ask Question