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 Bash / Shell Scripts Bluetooth driver Build Frameworks Commands and Packages Core Kernel C Programs Development Environment Setup Documents / Books Errors & Failures File Systems Framebuffer / Display Driver git Go Language Programs Hardware Platforms Home Kernel & Device Drivers Kernel Booting and Porting Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL NDK / Middleware / HAL Network Driver OS Concepts PHP Procfs Filesystem Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded

Leave a Reply