0% found this document useful (0 votes)
2 views

ADB commands

This document provides a guide on using ADB commands for various actions on an Android device, including connecting the device, rebooting, installing APKs, taking screenshots, and generating logs. It includes specific commands for each action and links for further details on log generation. Users are instructed to download the ADB package and connect their devices via USB or data cable to perform these tasks.

Uploaded by

shubhamsmsr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

ADB commands

This document provides a guide on using ADB commands for various actions on an Android device, including connecting the device, rebooting, installing APKs, taking screenshots, and generating logs. It includes specific commands for each action and links for further details on log generation. Users are instructed to download the ADB package and connect their devices via USB or data cable to perform these tasks.

Uploaded by

shubhamsmsr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

adb commands for performing actions on device

Please download the adb package


https://dl.google.com/android/repository/platform-tools-latest-windows.zip

Connect device with laptop


Connect device with Laptop through Data or USB cable
Use below command to list the device
adb devices
Device should be listed in the command output

Reboot the device


Connect device with Laptop through Data or USB cable
Reboot the device with below command
adb reboot

Steps to install APK on Device


Unistall (If allready installed)
Connect to device with USB cable
Install new APK
adb install "<provied APK location from the laptop>"

Take screenshot
Connect Device to laptop using data or usb cable
Take screenshot with below command
adb exec-out screencap -p > "<location with file name>"

Generate logs.
Refere below link for more details
https://developer.android.com/tools/logcat
https://developer.android.google.cn/reference/kotlin/android/util/Log?hl=en

Hit below commands after performing the actions to generate the logs

Generate W level logs using below command


adb logcat *:W
To store the output into file
adb logcat *:W > "<file location with file name>"

Generate E level logs using below command


adb logcat *:E
To store the output into file
adb logcat *:E > "<file location with file name>"

You might also like