0.0.1 • Published 5 years ago
gst-atom-adb v0.0.1
gst-atom-adb
Init from appium-adb, commit: 578daf08204899d4bfba480aae69ef0f9ff5cfb7
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-adbWatch
npm run watchTest
unit tests
npm run testfunctional 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-testUsage:
example:
import ADB from 'appium-adb';
const adb = await ADB.createADB();
console.log(await adb.getPIDsByName('com.android.phone'));List of methods:
createADBinitJarsgetAdbWithCorrectAdbPathgetAdbVersioninitAaptinitZipAligngetApiLevelisDeviceConnectedmkdirisValidClassforceStopclearstopAndClearavailableIMEsenabledIMEsenableIMEdisableIMEsetIMEdefaultIMEkeyeventlockbackgoToHomeisScreenLockedisSoftKeyboardPresentsendTelnetCommandisAirplaneModeOnsetAirplaneModebroadcastAirplaneModeisWifiOngetScreenSizegetScreenDensitysetWifiStateisDataOnsetDataStatesetWifiAndDatarimrafpushpullprocessExistsforwardPortreversePort(ApiLevel >=21)forwardAbstractPortpingrestartstartLogcatstopLogcatgetLogcatLogsgetPIDsByNamekillProcessesByNamekillProcessByPIDbroadcastProcessEndbroadcastendAndroidCoverageinstrumentandroidCoveragepackageAndLaunchActivityFromManifestcompileManifestinsertManifesthasInternetPermissionFromManifestgetSdkBinaryPathgetBinaryFromSdkRootgetBinaryFromPathgetConnectedDevicesgetDevicesWithRetryrestartAdbadbExecshellgetAdbServerPortgetEmulatorPortgetPortFromEmulatorStringgetConnectedEmulatorssetEmulatorPortsetDeviceIdgetRunningAVDgetRunningAVDWithRetrykillAllEmulatorslaunchAVDwaitForEmulatorReadywaitForDevicerebootsignWithDefaultCertsignWithCustomCertsignzipAlignApkcheckApkCertcheckCustomApkCertgetKeystoreMd5checkApkKeystoreMatchisAppInstalledstartAppstartUrigetFocusedPackageAndActivitywaitForActivityOrNotwaitForActivitywaitForNotActivityuninstallApkinstallFromDevicePathinstallfingerprint(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)rootunroot
0.0.1
5 years ago
