Загрузка страницы

Control your device from your computer - ADB tutorial

Twitter: https://twitter.com/ben_kadel
Github: https://github.com/kardelio

In this video I want to tell you about the incredibly useful piece of software called ADB (Android Debug Bridge) that essentially lets your android device and your computer communicate to one another and I want to show you a bunch of different ways that you can use it in order to fully control your Android device without needing to physically touch or interact with it! Instead you can use the computer that your device is connected to, to do a HUGE range of different things.

Some of the awesome things that you can do with ADB (that I showcase in this video) are; transferring files between your computer and device, accessing your app's data saving location, sending user input like taps and text input so you can automate user interaction without touching the phone and taking screenshots and screen recordings.

I also want to show the Android developers out there some brilliant commands that will be insanely useful to them and enhance their app development process. Once you learn about these commands your android app creation process will never be the same. These are things like telling you what packages are installed on the device, understanding your app's task with information about the view hierarchy and activity & fragment stack and even creating automated taps, swipes and button presses, so that you never need to pick up your phone and waste precious seconds logging in to your app again, just let adb do it for you!

There are so many other useful adb commands that I wasn't able to include in this video, otherwise it would gone on for HOURS, but there are plenty of links and amazing cheat-sheets below (in the links section) for you to enjoy and find even more commands that will help you take control of your device... From your computer...
You can find a list of the commands that I was able to cover in this video in the timestamps section (below in description), along with of course, the timestamp in the video of when I explain and demonstrate that particular command...

Timestamps ======================

00:00 - Intro
02:33 - Install ADB (Add to PATH)
04:22 - Enable ADB with Developer Options
07:45 - See what devices are plugged in (adb devices)
08:09 - How to use multiple devices (adb -s id)
09:17 - Get info about the device (adb shell getprop)
10:19 - Access a shell in the phone (adb shell)
12:44 - How to transfer files
13:07 - How to put files ONTO the device (adb push)
14:03 - How to take files FROM the device (adb pull)
15:04 - Take a screenshot (adb exec-out screencap)
16:16 - Record the screen (adb shell screenrecord)
18:35 - Fake user finger presses (adb shell input tap)
19:43 - How to easily get UI element coordinates
21:11 - Fake user typing in text (adb shell input text)
21:39 - Fake user pressing buttons (adb shell input keyevent)
22:31 - My example automated user login flow
23:05 - Useful commands for Android Devs...
23:12 - List installed packages (adb shell pm)
23:53 - See app's data stored on device (run-as package)
24:59 - Inspect shared preferences stored on device
25:54 - Get info about running app (adb shell dumpsys)
28:46 - Easily view activity & fragment stack (easy-dumpsys)
30:52 - Outro
31:38 - Bloopers

Links ======================

ADB official documentation:
https://developer.android.com/studio/command-line/adb

ADB Tutorial:
https://www.vogella.com/tutorials/AndroidCommandLine/article.html

Add ADB to your PATH env variable:
https://www.xda-developers.com/adb-fastboot-any-directory-windows-linux/

Install ADB independently (part of platform-tools):
https://developer.android.com/studio/releases/platform-tools

ADB input keyevent - List of Key events you can use:
https://developer.android.com/reference/android/view/KeyEvent

ADB command cheat-sheets:
https://gist.github.com/Pulimet/5013acf2cd5b28e55036c82c91bd56d8
https://www.automatetheplanet.com/adb-cheat-sheet/

Exec-out vs shell:
https://android.googlesource.com/platform/system/core/+/5d9d434efadf1c535c7fea634d5306e18c68ef1f

ADB Dumpsys information (including modes):
https://developer.android.com/studio/command-line/dumpsys

My Github repo for Easy Dumpsys (easy-dumpsys):
https://github.com/Kardelio/easy-dumpsys

-------------------------------------
Tools:
-------------------------------------
Video Editing: https://www.blackmagicdesign.com/products/davinciresolve/
Image Editing: https://www.gimp.org/
Camera: Canon M50

-------------------------------------
Credits:
-------------------------------------
Intro Card Music: https://www.purple-planet.com
In Video Music: Youtube Audio Library
In Video Background: Made by me
Icons: Icons made by Pixel perfect from www.flaticon.com
(https://www.flaticon.com/authors/pixel-perfect) (https://www.flaticon.com)
Thumbnail Background: Photo by Johannes Plenio from Pexels
Sound Effects: http://soundbible.com/

Vid: 45

#adb #adbtutorial #androiddev

Видео Control your device from your computer - ADB tutorial канала Ben Kadel
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
15 марта 2021 г. 16:02:06
00:32:30
Яндекс.Метрика