diff --git a/lib/commands/device/common.js b/lib/commands/device/common.js index 15d2b9d9..c90f7451 100644 --- a/lib/commands/device/common.js +++ b/lib/commands/device/common.js @@ -130,10 +130,10 @@ export async function getDeviceInfoFromCaps() { * @property {(AndroidDriverOpts & {emPort?: number})?} [opts=null] * @returns {Promise} */ -export async function createADB(opts = null) { +export async function createADB() { // @ts-expect-error do not put arbitrary properties on opts - const {udid, emPort} = opts ?? {}; - const adb = await createBaseADB(opts); + const {udid, emPort} = this.opts ?? {}; + const adb = await createBaseADB(this.opts); adb.setDeviceId(udid ?? ''); if (emPort) { adb.setEmulatorPort(emPort);