HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

ADB Tutorial: How to use ADB

268,635 views October 26, 2016 24:24

Watch on YouTube
ChannelArtur Spirin

Description from the creator

In this ADB Tutorial we will explore some of the more common ADB commands out there. Those are useful both for manual testing and in test automation scripts. Those ADB commands will be the same whether you are on Windows, Mac, or Linux.

Learn how to use ADB commands in Java + Appium Automation framework: youtube.com/watch?v=fzou-tKQJTU

Here is the list of the ADB commands that we covered in this video:
Tell ADB which device to execute command on: adb -s *device id*
Install application: adb install *path to file*
Uninstall application: adb uninstall *package id*
Get info about activity in focus: adb shell dumpsys window windows | findstr Focus
Take Log from buffer: adb logcat -d
Clear Log buffer: adb logcat -c
Take Log continuously: adb logcat
Take Screenshot: adb shell screencap /sdcard/Android/screenshot.png
Pull/Copy Files from Android device: adb pull /sdcard/Android/log.txt
Push/Copy Files to Android device: adb push example.txt /sdcard/Android
Open device's shell: adb shell
Clear application's data: adb shell pm clear *package id*
Force-Stop application: adb shell am force-stop *package id*
Open application's activity: adb shell am start -c api.android.intent.LAUNCHER -a api.android.category.MAIN -n *package/activity*
Send Android Keyevent: adb shell input keyevent 3
Send Text: adb shell input text "Artur"
Dumpsys debug utility: adb shell dumpsys | findstr "DUMP OF SERVICE"
Device Properties: adb shell getprop *key*

About this tutorial

Artur Spirin published this 24:24 video tutorial on October 26, 2016. It has been watched 268,635 times on YouTube.

Duration
24:24
Published
October 26, 2016
Views
268,635
Likes
1,642

Tags

Share

Further reading

  • ADB Commands: A Beginner’s Guide - Android Tutorials android.tutorials.how

    However, a lot of users have reported that this command would work on a rooted device. Additionally, one would need to use ADB as root in order to use the remount command. Syntax: adb remount. Example/Usage: #Boot ADB a…

  • How to Install and Use ADB, the Android Debug Bridge Utility howtogeek.com

    ADB, Android Debug Bridge, is a command-line utility included with Google’s Android SDK. ADB can control your device over USB from a computer, copy files back and forth, install and uninstall apps, run shell commands, a…

  • Using the Android Debug Bridge (adb) - Tutorial vogella.com

    Alternatively to adb you can also use telnet to connect to the device. This allows you to simulate certain things, e.g. incoming call, change the network connectivity, set your current geocodes, etc. Use "telnet localho…

This tutorial in other languages