ADB Tutorial: How to use ADB

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ค. 2024
  • 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: • Adding ADB Support to ...
    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
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 115

  • @johnnyjimj
    @johnnyjimj 6 ปีที่แล้ว +6

    What a great introduction to adb! I can't understand why I haven't seen this video before as I navigated over countless threads with all kinds of cobbled up recipes to get full control of your device, when it's all available right from the adb command line!
    Then again, with the amount of scaremongering evident in some of the comments here, I'm not surprised device providers, manufacturers and even enthusiast sites have deemed users just too stupid and have put so much effort to prevent people from gaining true access to their devices.
    Thank you for cutting to the chase and showing us that adb IS android 101. Kudos, subscribed!

    • @adammarcos6582
      @adammarcos6582 2 ปีที่แล้ว

      I guess im asking randomly but does any of you know a trick to log back into an instagram account..?
      I was dumb lost my password. I love any help you can offer me

  • @sergioropo3019
    @sergioropo3019 6 ปีที่แล้ว +1

    Fantastic my friend. Comprehensive introduction to ADB.

  • @megodzillaudeadable
    @megodzillaudeadable 4 ปีที่แล้ว +1

    This would be much better as an article than a video.

    • @ArturSpirin
      @ArturSpirin  4 ปีที่แล้ว

      I think you right :)

  • @ryanpadilla3835
    @ryanpadilla3835 7 ปีที่แล้ว +3

    thanks for the help, appreciate much.

  • @yashworks
    @yashworks 7 ปีที่แล้ว

    Excellent tutorial. Thank you.

  • @123patoju
    @123patoju 7 ปีที่แล้ว +1

    Fabulous Stuff for the beginners :)

  • @vladimirmikulic7860
    @vladimirmikulic7860 5 ปีที่แล้ว +1

    Could you possibly film more videos on adb and advanced tips and tricks with Android in general? I would really love to see it. Thank you for this video and happy New Year.

  • @pronounceword
    @pronounceword 4 ปีที่แล้ว +1

    I like your video very much. It's really great. I'll keep an eye on your channel. I am your fan and I will support you.

  • @ajithmoni1712
    @ajithmoni1712 8 ปีที่แล้ว

    Very nice video and well explained!

  • @stepamisiruk4403
    @stepamisiruk4403 5 ปีที่แล้ว

    Thank you so much !!!

  • @murasalin
    @murasalin 2 ปีที่แล้ว +1

    Good explanation thank you'

    • @ArturSpirin
      @ArturSpirin  2 ปีที่แล้ว

      Glad it was helpful!

  • @D3adRomanc3
    @D3adRomanc3 ปีที่แล้ว

    Super helpful 👍👍

  • @ShampooWow
    @ShampooWow 8 ปีที่แล้ว

    *_Awesome video! I like it_*

    • @ArturSpirin
      @ArturSpirin  8 ปีที่แล้ว

      +Shampoo Wow Thanks for the feedback, glad you like it!

  • @bikinadha1477
    @bikinadha1477 6 ปีที่แล้ว

    Thanks a lot for this nice tutorial video on ADB commands. Is there any command for 'Long press'. If it will helpful.

  • @rabiabashri6535
    @rabiabashri6535 5 ปีที่แล้ว +1

    thank you so much

  • @romankulik1131
    @romankulik1131 5 ปีที่แล้ว +1

    Thnx a lot!

    • @ArturSpirin
      @ArturSpirin  5 ปีที่แล้ว

      Any time, glad it helped!

  • @grega.6984
    @grega.6984 2 ปีที่แล้ว

    Do you have a video on being able to do a full backup of phone and then restore to the same or another device? Everything would be nice but just APP data if that is all that can be done would be good. Or, do you know of a good source that explains that using ADB?

  • @geoffkelland5606
    @geoffkelland5606 6 ปีที่แล้ว

    how do i install a launcher and *set it as default* (after lockscreen, i get black screen but with top line icons eg. clock , signal, battery. also, i can swipe down from top normally)

  • @styxaries2483
    @styxaries2483 6 ปีที่แล้ว

    Hi Artur,
    I need help with sm-j700f/ds.i tried to flash rom and use adb to push rom but all failed!
    This phone has no OS installed and no backups. I saw the secure download
    enabled in download mode(i think this is the problem). I also tried kies
    and smart switch but they can't recognize this model. Pls help me thanks.

  • @6parallelMusic
    @6parallelMusic 6 ปีที่แล้ว +6

    good tutorial but what if you have two devices ? how to target only one ?
    in my case i share internet connection via usb from pc to android and it require ADB "program named gnirehtet", but when i open android emulator on pc "LDplayer" automatically Adb disconnect from android , and i don't know how to target one only

    • @ArturSpirin
      @ArturSpirin  6 ปีที่แล้ว +8

      When you have multiple devices connected, you need to provide the serial number of the device via the -s parameter. serial you can get via the adb devices command. So command would look like adb -s

  • @legendaryunknowntuts
    @legendaryunknowntuts 3 ปีที่แล้ว +1

    When we control our Android Mobile using ADB, there will be some shortcuts.. Likewise, is there any shortcuts for the Navigation buttons of Android Mobile?

  • @VigilanceTech
    @VigilanceTech 6 ปีที่แล้ว

    at around 6:30 in linux I had to use grep -i to ignore "focus" case (leading capital)

  • @fordmostang9085
    @fordmostang9085 6 ปีที่แล้ว

    Hi mate I need to know what can I do boot Nexus 6p boot again... Thank you so much

  • @nateb4904
    @nateb4904 2 ปีที่แล้ว +1

    Can you tell me what programs your are using for the command line window, and the phone screen emulator?

    • @ArturSpirin
      @ArturSpirin  2 ปีที่แล้ว +1

      conemu and mobizen

  • @vinaprann7077
    @vinaprann7077 3 ปีที่แล้ว

    Hir sir, thanks for ur tutorial.
    wht software do yo use to make this video?

    • @ArturSpirin
      @ArturSpirin  3 ปีที่แล้ว +1

      I think you are asking about the mobile device screen cast? That's Mobizen.

  • @rafeequekc1932
    @rafeequekc1932 2 ปีที่แล้ว

    Great tutorial
    Can get incoming sms using adb command???

  • @asilrota
    @asilrota 3 ปีที่แล้ว

    Hello @Artur Spirin I have software in my hand. Sending code to the emulator via adb. Is there any way to decipher them :)

  • @SaintVinsmoke
    @SaintVinsmoke 6 ปีที่แล้ว +1

    can anybody help me mine says install failed missing shared library

  • @box4aza
    @box4aza 6 ปีที่แล้ว

    большое спасибо!

  • @jeremyng1021
    @jeremyng1021 5 ปีที่แล้ว

    I will like to ask how do we use `$ adb sync` ? i saw this command but I am not exactly sure about the usage description:
    sync [system|vendor|oem|data|all]
    sync a local build from $ANDROID_PRODUCT_OUT to the device (default all)
    -l: list but don't copy

  • @Genzoo7
    @Genzoo7 4 ปีที่แล้ว

    Is it possible to browse system files without rooting device by adb shell?

  • @manishchheda5713
    @manishchheda5713 3 ปีที่แล้ว

    please tell me the live example of adb forward command

  • @melcastro9242
    @melcastro9242 3 ปีที่แล้ว

    hi! do you have a way to recover pictures or files without booting my fone? it is in a boot loop.

  • @Mr8999naga
    @Mr8999naga 2 ปีที่แล้ว

    how did u connect andoid in adb as I am using USB port. I cant see any devices using adb devices command.

  • @MuhammadAdnan-gx6rd
    @MuhammadAdnan-gx6rd 7 ปีที่แล้ว

    can i mount efs in recovery with fastboot ???

  • @dongliu7987
    @dongliu7987 2 ปีที่แล้ว

    How to solve this when trying to disable a system app using the ADB command: "permission denial, attempt to change the component state"?

  • @sonicsolitude0
    @sonicsolitude0 8 หลายเดือนก่อน

    good tutorial. some zoom was required to view the commands clearly.

  • @AyudateAyudando
    @AyudateAyudando 4 ปีที่แล้ว

    Nice video...
    Hi. I have an issue... Need help !!!
    Have a oneplus one, 64gb, LineageOS 15.1, twrp 3.3.1.0
    Need to make full backup, but no enough free memory. Try to twrp direct to pc(win 10)
    Did adb device, and I see my phone..OK
    But when I try:
    adb backup --twrp
    Did not work. Shows back a error:
    adb unable to connect for backup: device '(null)' not found
    I DO NIT KNOW WHAT TO DO NEXT... :-(
    need help !!!

  • @alaaorfy7913
    @alaaorfy7913 3 ปีที่แล้ว

    please inform with command to stop emui update for p30 pro thanks

  • @Naproxen220
    @Naproxen220 4 ปีที่แล้ว

    can i overclock my galaxy note 10+ 5g (SM-N976N) Exynos9825 GPU?

  • @vasimbiradar1980
    @vasimbiradar1980 4 ปีที่แล้ว

    how can i connect to internet to my mobile from pc with ubuntu setup

  • @user-wn8bq5ec2v
    @user-wn8bq5ec2v 8 ปีที่แล้ว

    Hello, I'm from China,And very very thank u to made this tutorial!It's very nice and helpful,I also want to know what software you use to connect the android mobile phone?Not adb,the right software,I'm so sorry my english is so bad, can you understand me?

    • @ArturSpirin
      @ArturSpirin  8 ปีที่แล้ว

      Hey, Thanks for the Comment! The software is called Mobizen, I actually have a video on it here th-cam.com/video/fQ8ZHeajpy0/w-d-xo.html and you can download it from www.mobizen.com
      Cheers!

    • @user-wn8bq5ec2v
      @user-wn8bq5ec2v 7 ปีที่แล้ว

      Artur Spirin Haha,Thank u bro,thank u so much,can i make friend with u?

  • @realjaxon
    @realjaxon 7 ปีที่แล้ว

    Hey, maybe you know the answer to the problem I am having with my Chinese made tablet. When I turn on my wifi for the tablet, software starts downloading and installing on there own. I can't stop it. I connected the tablet to my PC and I see in the Download Provider/preload follder a file named myslave.apk. What is that? I did a search and on a Chinese website I found that it is a card game....? Is that actually what it is? I don't know. Or, is it the root of why mostly games are downloading on their own. Any help is appreciated.

    • @ArturSpirin
      @ArturSpirin  7 ปีที่แล้ว

      You probably have automatic updates turned on somewhere in the settings to download updates only when connected to wifi.

  • @jecielmarquez
    @jecielmarquez 7 ปีที่แล้ว

    Hello Friend. I am from Venezuela, could you help me, I have a blue phone
    Studio 5.0 CE and I do not know how to extract the commands to place them with the ADB, I want to revive the phone and only allows me to place the commands with ADB I want to extract the commands from the rom And I do not know what they are or how to extract them, I already have the official rom Download and I have the ADB program installed on my computer I only need that one Information, thanks

    • @ArturSpirin
      @ArturSpirin  7 ปีที่แล้ว

      Hey, if I understood you correctly, you want to flash your Android - have a look at this video: th-cam.com/video/A-ZHKlqSBt0/w-d-xo.html or search online for "how to flash android"

    • @jecielmarquez
      @jecielmarquez 7 ปีที่แล้ว

      thank you, very nice of you

  • @wengeance8962
    @wengeance8962 8 ปีที่แล้ว

    cool

  • @swapnilshinde9868
    @swapnilshinde9868 3 ปีที่แล้ว

    How to connect to my adb enabled android device from anywhere remotely?

  • @TheFANIDA82
    @TheFANIDA82 4 ปีที่แล้ว

    i have a problem with many Android devices janam xt2 they stuck at the splash screen
    i tried to reboot devices in recovery mode wipe cache data then reboot devices
    still same issue second step factory reset ; still devices stuck at splash screen
    i tried to falsh PDA with manufacture tools
    i used fastboot devices the devices is detected
    the driver is installed as well
    when i start flash program the processe stop and give a errors message
    NB itried with usb cable and cradle
    error: no devices/emulators found
    32a2fd7 fastboot
    "Partition table..."
    "Flash nCPU..."
    Sending 'modem' (48513 KB) OKAY [ 1.685s]
    Writing 'system' FAILED (remote: 'flash writ
    failure')
    fastboot: error: Command failed
    "Flash fail"
    "Please check the USB connector"
    Press a key to continue..

  • @shawngraham5067
    @shawngraham5067 3 ปีที่แล้ว

    Great tutorial and all but its small even with magnify.

  • @JuanGarcia-cw2hm
    @JuanGarcia-cw2hm 5 ปีที่แล้ว

    how do i remove mdm from a Samsung using these commands?

  • @abdeslamchettout7900
    @abdeslamchettout7900 5 ปีที่แล้ว

    hello , i have a question pls , can we remove the password with abd in recovry mode ? to access to the phone or just the files

    • @ArturSpirin
      @ArturSpirin  5 ปีที่แล้ว +1

      No, you cannot do that. That would make it too easy for the hackers to break your phone :)

  • @luisrondon430
    @luisrondon430 4 ปีที่แล้ว

    yes but where is the option to flash or force upgrade firmware |?

  • @John_Smile
    @John_Smile 5 ปีที่แล้ว

    I now have (or I had a phone) a Xiaomi Redmi 4x phone that fell into the water and no longer works at all.
    My computer sees him as QDLoader 9008, but I can not bring him to mod Fastboot, or Edl.
    The phone is dead! The screen does not turn on, it does not vibrate ... nothing!
    Does anyone know a way to write the ROM on it without working in any way?
    I tried writing the ROM with "Qualcomm_Flash_Image_Loader" or ADB, but it does not work! It must be brought in Fastboot, but I can not !!! Can you help me somehow?
    ( forum.xda-developers.com/showpost.php?p=78606812&postcount=617 )

  • @taranagnew436
    @taranagnew436 2 ปีที่แล้ว

    is there a printable cheatsheet?

  • @AAMER-TECH
    @AAMER-TECH 4 ปีที่แล้ว

    How to delete apps in secure folder please ?

  • @nihilizmskizm
    @nihilizmskizm 6 ปีที่แล้ว

    devices dont show END OFF now what

  • @keanpatrickalfon4495
    @keanpatrickalfon4495 3 ปีที่แล้ว

    hi can i ask for help i have issue with my adb in my device.
    The error in my ADB is:
    *daemon not running. starting it now at tcp:5037*
    cannot open 'nul': The system cannot find the file specified. (2)
    *failed to start daemon*
    error: cannot connect to daemon
    I do not understand the above error, can I have some explanation of the possible root cause and what should I do about it?

    • @ArturSpirin
      @ArturSpirin  3 ปีที่แล้ว +1

      It looks like the ADB identifies a path to a file as null, thus ofcourse it wont be able to open null because its invalid file. You want to google for the error and based on the cmd command that produces that error

    • @keanpatrickalfon4495
      @keanpatrickalfon4495 3 ปีที่แล้ว

      @@ArturSpirin sir good day, i been searching the issue in the web for 2 days and no luck for me, im desperately need to solve this for my project related in school but im stucked with this bug :(

  • @legitscoper3259
    @legitscoper3259 2 ปีที่แล้ว

    CMD:
    Command "ADB" is either written wrong or couldn't be found...

  • @anoopsrana
    @anoopsrana 4 ปีที่แล้ว

    When I type adb logcat and hit enter I don't get anything.
    Also when I type adb logcat > anoop.txt and hit enter then the file anoop.txt is made but contains nothing

    • @kavalidinesh3269
      @kavalidinesh3269 4 ปีที่แล้ว

      set environment set up
      source build/envsetup.sh

  • @gowthamanannadurai1396
    @gowthamanannadurai1396 5 ปีที่แล้ว

    You are a good speaker. But the main problem is we can't able to read what you type. So , make sure in the next video , we can able to read as well .it is hard for the beginners like me , to completely understand the things in the first go itself.

  • @mryup6100
    @mryup6100 3 ปีที่แล้ว

    If command at 6:21 doesn't work replace the word 'windows' with 'displays'

  • @ryanpadilla3835
    @ryanpadilla3835 7 ปีที่แล้ว +1

    hi artur, pls. help me to install my android.hardware.usb.host.xml
    pls. give me a step by step if possible. my unit is grand prime g530h lollipop 5.0.2
    thanks in advance

    • @ArturSpirin
      @ArturSpirin  7 ปีที่แล้ว

      Hey man, check this article out github.com/452/USBHIDTerminal/wiki/How-to-enable-USB-host-API-support
      Before you start pushing the files back to the Android device make sure you mount the system as read & write, you can do it via adb shell mount -o rw, remount /system
      I haven't worked with Android for a while and do not remember if this can actually be done without having root access. But if remounting /system as read & write does not work that would mean you need to have root.

  • @TjgottaCtoon
    @TjgottaCtoon 6 ปีที่แล้ว +1

    Hi! I tried several times didn't work. I deleted home wiz launcher by mistake...wanting the nova launcher. Now my screen is black can you fix this I will pay you pleeeeeezzzzzzzze?

    • @BillAnt
      @BillAnt 6 ปีที่แล้ว

      Try to re-install the launcher through adb something like this:
      adb install -d -r -t
      or to gain back some functionality you could install with the above command some shortcut app like QuickShortcuts etc.

    • @lemuelobenasarino1506
      @lemuelobenasarino1506 6 ปีที่แล้ว

      Hahahaha

    • @saketjoshi4476
      @saketjoshi4476 5 ปีที่แล้ว

      @@lemuelobenasarino1506 yup you are really an ugly bastard.....

  • @ZafarDidit
    @ZafarDidit 6 ปีที่แล้ว

    you did not tell how to capture and save logs after you clear all logs in order to reproduce the issue and save the particular bug for developers

  • @deepakshetter6573
    @deepakshetter6573 2 ปีที่แล้ว +1

    How can we uninstall adb commands if we dont want to use that command anymore?

    • @ArturSpirin
      @ArturSpirin  2 ปีที่แล้ว

      The same way you installed it but in reverse:
      1. remove the PATH variables
      2. remove the adb package

    • @deepakshetter6573
      @deepakshetter6573 2 ปีที่แล้ว

      @@ArturSpirin didn't get you :(

    • @deepakshetter6573
      @deepakshetter6573 2 ปีที่แล้ว

      I have used the below command ..
      adb shell settings put secure volume_hush_gesture 0

  • @mishavlog7112
    @mishavlog7112 6 ปีที่แล้ว

    Why have not you used magnifier ??????

  • @MarskiJr
    @MarskiJr 3 ปีที่แล้ว

    Sir please help me I was rooted my mom devices and wanted to flash a ROM with android 10 and when I plug in usb it says usb not recognised 😭Help me plss hellpp

  • @shivamanand8998
    @shivamanand8998 3 ปีที่แล้ว

    The texts are very small. You could have increased the font size.

  • @karthik20187
    @karthik20187 3 ปีที่แล้ว

    I'm a beginner, could you help me?

  • @melvonarchival8986
    @melvonarchival8986 5 ปีที่แล้ว +1

    What is that application on your pc????

    • @ArturSpirin
      @ArturSpirin  5 ปีที่แล้ว

      not sure which one you asking about but terminal is cmder and the mobile screencast is by mobizen

    • @melvonarchival8986
      @melvonarchival8986 5 ปีที่แล้ว

      @@ArturSpirin whats that application on the video

    • @dianaodintsov4371
      @dianaodintsov4371 4 ปีที่แล้ว

      @@ArturSpirin it is cmd but better ?

    • @ArturSpirin
      @ArturSpirin  4 ปีที่แล้ว

      @@dianaodintsov4371 if you like Linux and want Linux like terminal commands on Windows then it will scratch that itch. That and the look/feel is more configurable with cmder as opposed to the standard Windows terminal.

  • @BillAnt
    @BillAnt 6 ปีที่แล้ว

    This is one nifty command, first time seeing it :)
    adb shell dumpsys window windows | findstr Focus
    Now I can programatically blow up my phone he-he
    Question: If I already know the package name such as "org.vndnguyen.shortcutmaster" (ShortcutMaster) what's an easy way to list all its activities and determine the main one of that package? Anything with the "pm" command? Thanks in advance.

  • @Dragnmastralex
    @Dragnmastralex 2 ปีที่แล้ว

    I want to use it to add custom ringtones, alarms, and notification sounds to my smart watch

  • @geff974
    @geff974 7 ปีที่แล้ว

    Can i know the name of your terminal please ?

    • @ArturSpirin
      @ArturSpirin  7 ปีที่แล้ว +2

      ConEmu conemu.github.io/

    • @geff974
      @geff974 7 ปีที่แล้ว

      Thanks.

  • @kompst_tu
    @kompst_tu 3 ปีที่แล้ว

    Yeah that's great and all, but where is the download link for this and where can I get an installation that is going to give me a legitimate exe file so that I can run the program and actually use it? Everything I've found is just a zip file full of what looks to be an already-installed dump of program files and no executable to run the program. Nobody is explaining anything.

  • @johngordon5495
    @johngordon5495 6 ปีที่แล้ว

    Superb way to brick any phone.

  • @jasonbain7305
    @jasonbain7305 3 ปีที่แล้ว

    i Cant hear to well I wish he would speak louder I had to find another video...

  • @archangelthefnalmessenger7081
    @archangelthefnalmessenger7081 7 ปีที่แล้ว

    bro i don't understand iam new to this do you have whatsapp so you can guide me through step by step...

  • @AniruddhaGA
    @AniruddhaGA 6 ปีที่แล้ว +1

    Failure

  • @pauldox
    @pauldox 2 ปีที่แล้ว

    too small in my fon 🤣😂👎

  • @QbanCelli
    @QbanCelli 2 ปีที่แล้ว

    typical stuckup nerd. instead of teaching us newbies how to install adb and to start using, he showing us how smart he is.

    • @ArturSpirin
      @ArturSpirin  2 ปีที่แล้ว

      I am literally showing you how to use it. As for install, I have a separate video th-cam.com/video/j9DODEP1Kpo/w-d-xo.html

  • @GOLDENBEAR9577
    @GOLDENBEAR9577 ปีที่แล้ว

    Adb: chelpus team…

  • @TheFANIDA82
    @TheFANIDA82 4 ปีที่แล้ว

    i have a problem with many Android devices janam xt2 they stuck at the splash screen
    i tried to reboot devices in recovery mode wipe cache data then reboot devices
    still same issue second step factory reset ; still devices stuck at splash screen
    i tried to falsh PDA with manufacture tools
    i used fastboot devices the devices is detected
    the driver is installed as well
    when i start flash program the processe stop and give a errors message
    NB itried with usb cable and cradle
    error: no devices/emulators found
    32a2fd7 fastboot
    "Partition table..."
    "Flash nCPU..."
    Sending 'modem' (48513 KB) OKAY [ 1.685s]
    Writing 'system' FAILED (remote: 'flash writ
    failure')
    fastboot: error: Command failed
    "Flash fail"
    "Please check the USB connector"
    Press a key to continue..