ADB (Android Debug Bridge)

[Testing] ADB commands

Nishant Tomer
2 min readApr 23, 2020

--

Let’s learn ADB commands used in mobile app testing

Prerequisite/Setup :

  1. Open terminal in your macbook, type ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Type brew cask install android-platform-tools
ADB running your terminal

Important ADB commands :

  1. adb devices (To check your device is connected or not)
  2. adb install “your build path” (To install debug .APK build in your device)
  3. adb uninstall “your build path” (To uninstall debug .APK build from your device)
  4. adb logcat or adb logcat -d > logs.txt (To capture the crash log’s of your debug .APK build)
  5. adb shell am start -a android.intent.action.VIEW -d “your build URL” (To open any URL in your device)
  6. adb shell monkey -p your.package.name -v 500 (To run monkey test on your debug .APK build)

Why & Where : ADB commands used in mobile app testing for capturing logs, install/uninstall/upgrade, monkey test run, Google analytics events testing.

Thanks & be sure to click 👏 to recommend this article if you found it helpful. It means a lot to me.

Clap, share if you like it and follow me for my next Testing Blog.

--

--