Skip to content

Wrapper around adb used by appium + helper libs

License

Notifications You must be signed in to change notification settings

vrunoa/appium-adb

This branch is 282 commits behind appium/appium-adb:master.

Folders and files

NameName
Last commit message
Last commit date
Sep 6, 2020
Nov 26, 2020
May 30, 2020
Dec 28, 2017
Jan 20, 2022
Jan 20, 2022
Aug 11, 2017
Jan 20, 2022
Jul 13, 2021
Jan 16, 2018
Sep 15, 2017
Sep 13, 2020
Jan 20, 2022
May 25, 2020
Feb 1, 2022

Repository files navigation

appium-adb

NPM version Downloads Dependency Status devDependency Status

Build Status

A wrapper over android-adb, implemented using ES6 and along with async/await. This package is mainly used by Appium to perform all adb operations on android device.

Note: Issue tracking for this repo has been disabled. Please use the main Appium issue tracker instead.

Installing

npm install appium-adb

Watch

npm run watch

Test

unit tests

npm run test

functional tests

By default the functional tests use an avd named NEXUS_S_18_X86, with API Level 18. To change this, you can use the environment variables PLATFORM_VERSION, API_LEVEL, and ANDROID_AVD. If PLATFORM_VERSION is set then it is not necessary to set API_LEVEL as it will be inferred.

gulp e2e-test

Usage:

example:

import ADB from 'appium-adb';

const adb = await ADB.createADB();
console.log(await adb.getPIDsByName('com.android.phone'));

List of methods:

  • createADB
  • getAdbWithCorrectAdbPath
  • initAapt
  • initZipAlign
  • getApiLevel
  • isDeviceConnected
  • mkdir
  • isValidClass
  • forceStop
  • clear
  • stopAndClear
  • availableIMEs
  • enabledIMEs
  • enableIME
  • disableIME
  • setIME
  • defaultIME
  • keyevent
  • lock
  • back
  • goToHome
  • isScreenLocked
  • isSoftKeyboardPresent
  • sendTelnetCommand
  • isAirplaneModeOn
  • setAirplaneMode
  • broadcastAirplaneMode
  • isWifiOn
  • getScreenSize
  • getScreenDensity
  • setWifiState
  • isDataOn
  • setDataState
  • setWifiAndData
  • rimraf
  • push
  • pull
  • processExists
  • forwardPort
  • reversePort (ApiLevel >=21)
  • forwardAbstractPort
  • ping
  • restart
  • startLogcat
  • stopLogcat
  • getLogcatLogs
  • getPIDsByName
  • killProcessesByName
  • killProcessByPID
  • broadcastProcessEnd
  • broadcast
  • endAndroidCoverage
  • instrument
  • androidCoverage
  • packageAndLaunchActivityFromManifest
  • compileManifest
  • insertManifest
  • hasInternetPermissionFromManifest
  • getSdkBinaryPath
  • getBinaryFromSdkRoot
  • getBinaryFromPath
  • getConnectedDevices
  • getDevicesWithRetry
  • restartAdb
  • adbExec
  • shell
  • getAdbServerPort
  • getEmulatorPort
  • getPortFromEmulatorString
  • getConnectedEmulators
  • setEmulatorPort
  • setDeviceId
  • getRunningAVD
  • getRunningAVDWithRetry
  • killAllEmulators
  • launchAVD
  • waitForEmulatorReady
  • waitForDevice
  • reboot
  • signWithDefaultCert
  • signWithCustomCert
  • sign
  • zipAlignApk
  • checkApkCert
  • checkCustomApkCert
  • getKeystoreHash
  • isAppInstalled
  • startApp
  • startUri
  • getFocusedPackageAndActivity
  • waitForActivityOrNot
  • waitForActivity
  • waitForNotActivity
  • uninstallApk
  • installFromDevicePath
  • install
  • fingerprint (ApiLevel >=23 | emulator only)
  • sendSMS (emulator only)
  • rotate (emulator only)
  • powerAC (emulator only)
  • powerCapacity (emulator only)
  • powerOFF (emulator only)
  • gsmCall (emulator only)
  • gsmSignal (emulator only)
  • gsmVoice (emulator only)
  • root
  • unroot

About

Wrapper around adb used by appium + helper libs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.6%
  • Shell 0.4%