appium-adb 13.0.11 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/build/lib/adb.d.ts +10 -10
- package/build/lib/adb.d.ts.map +1 -1
- package/build/lib/adb.js +10 -10
- package/build/lib/adb.js.map +1 -1
- package/build/lib/tools/app-commands.d.ts +25 -77
- package/build/lib/tools/app-commands.d.ts.map +1 -1
- package/build/lib/tools/app-commands.js +45 -212
- package/build/lib/tools/app-commands.js.map +1 -1
- package/build/lib/tools/process-commands.d.ts +54 -0
- package/build/lib/tools/process-commands.d.ts.map +1 -0
- package/build/lib/tools/process-commands.js +183 -0
- package/build/lib/tools/process-commands.js.map +1 -0
- package/build/lib/types.d.ts +0 -2
- package/build/lib/types.d.ts.map +1 -1
- package/lib/adb.ts +11 -10
- package/lib/tools/app-commands.js +47 -212
- package/lib/tools/process-commands.ts +180 -0
- package/lib/types.ts +0 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [14.0.0](https://github.com/appium/appium-adb/compare/v13.0.11...v14.0.0) (2025-10-23)
|
|
2
|
+
|
|
3
|
+
### ⚠ BREAKING CHANGES
|
|
4
|
+
|
|
5
|
+
* Renamed getPIDsByName to listAppProcessIds
|
|
6
|
+
* Renamed getNameByPid to getProcessNameById
|
|
7
|
+
* Removed the obsolete broadcastProcessEnd method
|
|
8
|
+
* Removed the deprecated appDeviceReadyTimeout property
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Split process and app commands ([#822](https://github.com/appium/appium-adb/issues/822)) ([1062d4c](https://github.com/appium/appium-adb/commit/1062d4ca2ecd59f636e6fea50add3694f9d14dd3))
|
|
13
|
+
|
|
1
14
|
## [13.0.11](https://github.com/appium/appium-adb/compare/v13.0.10...v13.0.11) (2025-10-23)
|
|
2
15
|
|
|
3
16
|
### Miscellaneous Chores
|
package/build/lib/adb.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import * as fsCommands from './tools/fs-commands';
|
|
|
18
18
|
import * as appCommands from './tools/app-commands';
|
|
19
19
|
import * as networkCommands from './tools/network-commands';
|
|
20
20
|
import * as logcatCommands from './tools/logcat-commands';
|
|
21
|
+
import * as processCommands from './tools/process-commands';
|
|
21
22
|
export declare const DEFAULT_ADB_PORT = 5037;
|
|
22
23
|
export declare const DEFAULT_OPTS: {
|
|
23
24
|
readonly sdkRoot: string | undefined;
|
|
@@ -48,8 +49,6 @@ export declare class ADB implements ADBOptions {
|
|
|
48
49
|
_isLockManagementSupported: boolean | undefined;
|
|
49
50
|
sdkRoot?: string;
|
|
50
51
|
udid?: string;
|
|
51
|
-
/** @deprecated Not used anywhere, marked for deletion */
|
|
52
|
-
appDeviceReadyTimeout?: number;
|
|
53
52
|
useKeystore?: boolean;
|
|
54
53
|
keystorePath?: string;
|
|
55
54
|
keystorePassword?: string;
|
|
@@ -131,14 +130,6 @@ export declare class ADB implements ADBOptions {
|
|
|
131
130
|
forceStop: typeof appCommands.forceStop;
|
|
132
131
|
killPackage: typeof appCommands.killPackage;
|
|
133
132
|
clear: typeof appCommands.clear;
|
|
134
|
-
listProcessStatus: typeof appCommands.listProcessStatus;
|
|
135
|
-
getNameByPid: typeof appCommands.getNameByPid;
|
|
136
|
-
getPIDsByName: typeof appCommands.getPIDsByName;
|
|
137
|
-
killProcessesByName: typeof appCommands.killProcessesByName;
|
|
138
|
-
killProcessByPID: typeof appCommands.killProcessByPID;
|
|
139
|
-
broadcastProcessEnd: typeof appCommands.broadcastProcessEnd;
|
|
140
|
-
broadcast: typeof appCommands.broadcast;
|
|
141
|
-
processExists: typeof appCommands.processExists;
|
|
142
133
|
readonly APP_INSTALL_STATE: StringRecord<import("./tools/types").InstallState>;
|
|
143
134
|
isAppInstalled: typeof appCommands.isAppInstalled;
|
|
144
135
|
startUri: typeof appCommands.startUri;
|
|
@@ -151,6 +142,15 @@ export declare class ADB implements ADBOptions {
|
|
|
151
142
|
getPackageInfo: typeof appCommands.getPackageInfo;
|
|
152
143
|
pullApk: typeof appCommands.pullApk;
|
|
153
144
|
activateApp: typeof appCommands.activateApp;
|
|
145
|
+
listAppProcessIds: typeof appCommands.listAppProcessIds;
|
|
146
|
+
isAppRunning: typeof appCommands.isAppRunning;
|
|
147
|
+
broadcast: typeof appCommands.broadcast;
|
|
148
|
+
listProcessStatus: typeof processCommands.listProcessStatus;
|
|
149
|
+
getProcessNameById: typeof processCommands.getProcessNameById;
|
|
150
|
+
getProcessIdsByName: typeof processCommands.getProcessIdsByName;
|
|
151
|
+
killProcessesByName: typeof processCommands.killProcessesByName;
|
|
152
|
+
killProcessByPID: typeof processCommands.killProcessByPID;
|
|
153
|
+
processExists: typeof processCommands.processExists;
|
|
154
154
|
uninstallApk: typeof apkUtilCommands.uninstallApk;
|
|
155
155
|
installFromDevicePath: typeof apkUtilCommands.installFromDevicePath;
|
|
156
156
|
cacheApk: typeof apkUtilCommands.cacheApk;
|
package/build/lib/adb.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adb.d.ts","sourceRoot":"","sources":["../../lib/adb.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AAQvB,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,gBAAgB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,eAAe,MAAM,qBAAqB,CAAC;AAC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vB,IAAI,yBAAmB;IACvB,KAAK,0BAAoB;IAEzB,iBAAiB,kDAA4C;IAC7D,iBAAiB,kDAA4C;IAC7D,oBAAoB,qDAA+C;IACnE,mBAAmB,oDAA8C;IACjE,kBAAkB,mDAA6C;IAC/D,wBAAwB,yDAAmD;IAC3E,uBAAuB,wDAAkD;IACzE,sBAAsB,uDAAiD;IACvE,QAAQ,yCAAmC;IAC3C,eAAe,gDAA0C;IACzD,aAAa,8CAAwC;IACrD,gBAAgB,iDAA2C;IAC3D,YAAY,6CAAuC;IACnD,eAAe,gDAA0C;IACzD,UAAU,2CAAqC;IAC/C,UAAU,2CAAqC;IAC/C,WAAW,4CAAsC;IACjD,kBAAkB,mDAA6C;IAC/D,oBAAoB,qDAA+C;IACnE,yBAAyB,0DAAoD;IAC7E,kBAAkB,mDAA6C;IAC/D,yBAAyB,0DAAoD;IAC7E,iBAAiB,kDAA4C;IAC7D,gBAAgB,iDAA2C;IAC3D,eAAe,gDAA0C;IACzD,mBAAmB,oDAA8C;IACjE,YAAY,6CAAuC;IACnD,YAAY,6CAAuC;IACnD,sBAAsB,uDAAiD;IACvE,wBAAwB,yDAAmD;IAC3E,gBAAgB,iDAA2C;IAC3D,eAAe,gDAA0C;IACzD,cAAc,+CAAyC;IACvD,QAAQ,yCAAmC;IAC3C,qBAAqB,sDAAgD;IACrE,QAAQ,yCAAmC;IAC3C,QAAQ,yCAAmC;IAC3C,aAAa,8CAAwC;IACrD,iBAAiB,kDAA4C;IAC7D,oBAAoB,qDAA+C;CACpE"}
|
package/build/lib/adb.js
CHANGED
|
@@ -57,6 +57,7 @@ const fsCommands = __importStar(require("./tools/fs-commands"));
|
|
|
57
57
|
const appCommands = __importStar(require("./tools/app-commands"));
|
|
58
58
|
const networkCommands = __importStar(require("./tools/network-commands"));
|
|
59
59
|
const logcatCommands = __importStar(require("./tools/logcat-commands"));
|
|
60
|
+
const processCommands = __importStar(require("./tools/process-commands"));
|
|
60
61
|
exports.DEFAULT_ADB_PORT = 5037;
|
|
61
62
|
exports.DEFAULT_OPTS = {
|
|
62
63
|
sdkRoot: (0, helpers_1.getSdkRootFromEnv)(),
|
|
@@ -84,8 +85,6 @@ class ADB {
|
|
|
84
85
|
_isLockManagementSupported;
|
|
85
86
|
sdkRoot;
|
|
86
87
|
udid;
|
|
87
|
-
/** @deprecated Not used anywhere, marked for deletion */
|
|
88
|
-
appDeviceReadyTimeout;
|
|
89
88
|
useKeystore;
|
|
90
89
|
keystorePath;
|
|
91
90
|
keystorePassword;
|
|
@@ -212,14 +211,6 @@ class ADB {
|
|
|
212
211
|
forceStop = appCommands.forceStop;
|
|
213
212
|
killPackage = appCommands.killPackage;
|
|
214
213
|
clear = appCommands.clear;
|
|
215
|
-
listProcessStatus = appCommands.listProcessStatus;
|
|
216
|
-
getNameByPid = appCommands.getNameByPid;
|
|
217
|
-
getPIDsByName = appCommands.getPIDsByName;
|
|
218
|
-
killProcessesByName = appCommands.killProcessesByName;
|
|
219
|
-
killProcessByPID = appCommands.killProcessByPID;
|
|
220
|
-
broadcastProcessEnd = appCommands.broadcastProcessEnd;
|
|
221
|
-
broadcast = appCommands.broadcast;
|
|
222
|
-
processExists = appCommands.processExists;
|
|
223
214
|
APP_INSTALL_STATE = appCommands.APP_INSTALL_STATE;
|
|
224
215
|
isAppInstalled = appCommands.isAppInstalled;
|
|
225
216
|
startUri = appCommands.startUri;
|
|
@@ -232,6 +223,15 @@ class ADB {
|
|
|
232
223
|
getPackageInfo = appCommands.getPackageInfo;
|
|
233
224
|
pullApk = appCommands.pullApk;
|
|
234
225
|
activateApp = appCommands.activateApp;
|
|
226
|
+
listAppProcessIds = appCommands.listAppProcessIds;
|
|
227
|
+
isAppRunning = appCommands.isAppRunning;
|
|
228
|
+
broadcast = appCommands.broadcast;
|
|
229
|
+
listProcessStatus = processCommands.listProcessStatus;
|
|
230
|
+
getProcessNameById = processCommands.getProcessNameById;
|
|
231
|
+
getProcessIdsByName = processCommands.getProcessIdsByName;
|
|
232
|
+
killProcessesByName = processCommands.killProcessesByName;
|
|
233
|
+
killProcessByPID = processCommands.killProcessByPID;
|
|
234
|
+
processExists = processCommands.processExists;
|
|
235
235
|
uninstallApk = apkUtilCommands.uninstallApk;
|
|
236
236
|
installFromDevicePath = apkUtilCommands.installFromDevicePath;
|
|
237
237
|
cacheApk = apkUtilCommands.cacheApk;
|
package/build/lib/adb.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adb.js","sourceRoot":"","sources":["../../lib/adb.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAuB;AACvB,sDAAyB;AACzB,uCAImB;AACnB,qCAA+B;AAO/B,0EAA4D;AAC5D,2EAA6D;AAC7D,qEAAuD;AACvD,qEAAuD;AACvD,mEAAqD;AACrD,qEAAuD;AACvD,mEAAqD;AACrD,uEAAyD;AACzD,oEAAsD;AACtD,yEAA2D;AAC3D,4EAA8D;AAC9D,gFAAkE;AAClE,gEAAkD;AAClD,kEAAoD;AACpD,0EAA4D;AAC5D,wEAA0D;AAG7C,QAAA,gBAAgB,GAAG,IAAI,CAAC;AACxB,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,IAAA,2BAAiB,GAAE;IAC5B,UAAU,EAAE,EAAC,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAC;IAC1C,MAAM,EAAE,iBAAE,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,wBAAgB;IACzB,cAAc,EAAE,kCAAwB;IACxC,oBAAoB,EAAE,EAAE;IACxB,mBAAmB,EAAE,KAAK;IAC1B,aAAa,EAAE,IAAI;CACX,CAAC;AAEX,MAAa,GAAG;IACd,OAAO,CAAU;IACjB,OAAO,CAAU;IACjB,SAAS,CAAmB;IAC5B,oBAAoB,CAAuB;IAC3C,qBAAqB,CAAoB;IACzC,iBAAiB,CAAoB;IACrC,6BAA6B,CAAoB;IACjD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AkB,CAAC;IAC/D,oBAAoB,GAAG,sBAAsB,CAAC,oBAAoB,CAAC;IACnE,yBAAyB,GAAG,sBAAsB,CAAC,yBAAyB,CAAC;IAC7E,kBAAkB,GAAG,sBAAsB,CAAC,kBAAkB,CAAC;IAC/D,yBAAyB,GAAG,sBAAsB,CAAC,yBAAyB,CAAC;IAC7E,iBAAiB,GAAG,sBAAsB,CAAC,iBAAiB,CAAC;IAC7D,gBAAgB,GAAG,sBAAsB,CAAC,gBAAgB,CAAC;IAC3D,eAAe,GAAG,sBAAsB,CAAC,eAAe,CAAC;IACzD,mBAAmB,GAAG,sBAAsB,CAAC,mBAAmB,CAAC;IACjE,YAAY,GAAG,sBAAsB,CAAC,YAAY,CAAC;IACnD,YAAY,GAAG,sBAAsB,CAAC,YAAY,CAAC;IACnD,sBAAsB,GAAG,sBAAsB,CAAC,sBAAsB,CAAC;IACvE,wBAAwB,GAAG,sBAAsB,CAAC,wBAAwB,CAAC;IAC3E,gBAAgB,GAAG,sBAAsB,CAAC,gBAAgB,CAAC;IAC3D,eAAe,GAAG,sBAAsB,CAAC,eAAe,CAAC;IACzD,cAAc,GAAG,sBAAsB,CAAC,cAAc,CAAC;IACvD,QAAQ,GAAG,sBAAsB,CAAC,QAAQ,CAAC;IAC3C,qBAAqB,GAAG,sBAAsB,CAAC,qBAAqB,CAAC;IACrE,QAAQ,GAAG,sBAAsB,CAAC,QAAQ,CAAC;IAC3C,QAAQ,GAAG,sBAAsB,CAAC,QAAQ,CAAC;IAC3C,aAAa,GAAG,sBAAsB,CAAC,aAAa,CAAC;IACrD,iBAAiB,GAAG,sBAAsB,CAAC,iBAAiB,CAAC;IAC7D,oBAAoB,GAAG,sBAAsB,CAAC,oBAAoB,CAAC;CACpE;AAhVD,kBAgVC"}
|
|
@@ -123,83 +123,6 @@ export function getReqPermissions(this: import("../adb.js").ADB, pkg: string, cm
|
|
|
123
123
|
* @param {string} pkg - The package name to be processed.
|
|
124
124
|
*/
|
|
125
125
|
export function stopAndClear(this: import("../adb.js").ADB, pkg: string): Promise<void>;
|
|
126
|
-
/**
|
|
127
|
-
* At some point of time Google has changed the default `ps` behaviour, so it only
|
|
128
|
-
* lists processes that belong to the current shell user rather to all
|
|
129
|
-
* users. It is necessary to execute ps with -A command line argument
|
|
130
|
-
* to mimic the previous behaviour.
|
|
131
|
-
*
|
|
132
|
-
* @this {import('../adb.js').ADB}
|
|
133
|
-
* @returns {Promise<string>} the output of `ps` command where all processes are included
|
|
134
|
-
*/
|
|
135
|
-
export function listProcessStatus(this: import("../adb.js").ADB): Promise<string>;
|
|
136
|
-
export class listProcessStatus {
|
|
137
|
-
_doesPsSupportAOption: boolean;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Returns process name for the given process identifier
|
|
141
|
-
*
|
|
142
|
-
* @this {import('../adb.js').ADB}
|
|
143
|
-
* @param {string|number} pid - The valid process identifier
|
|
144
|
-
* @throws {Error} If the given PID is either invalid or is not present
|
|
145
|
-
* in the active processes list
|
|
146
|
-
* @returns {Promise<string>} The process name
|
|
147
|
-
*/
|
|
148
|
-
export function getNameByPid(this: import("../adb.js").ADB, pid: string | number): Promise<string>;
|
|
149
|
-
/**
|
|
150
|
-
* Get the list of process ids for the particular process on the device under test.
|
|
151
|
-
*
|
|
152
|
-
* @this {import('../adb.js').ADB}
|
|
153
|
-
* @param {string} name - The part of process name.
|
|
154
|
-
* @return {Promise<number[]>} The list of matched process IDs or an empty list.
|
|
155
|
-
* @throws {Error} If the passed process name is not a valid one
|
|
156
|
-
*/
|
|
157
|
-
export function getPIDsByName(this: import("../adb.js").ADB, name: string): Promise<number[]>;
|
|
158
|
-
/**
|
|
159
|
-
* Get the list of process ids for the particular process on the device under test.
|
|
160
|
-
*
|
|
161
|
-
* @this {import('../adb.js').ADB}
|
|
162
|
-
* @param {string} name - The part of process name.
|
|
163
|
-
*/
|
|
164
|
-
export function killProcessesByName(this: import("../adb.js").ADB, name: string): Promise<void>;
|
|
165
|
-
/**
|
|
166
|
-
* Kill the particular process on the device under test.
|
|
167
|
-
* The current user is automatically switched to root if necessary in order
|
|
168
|
-
* to properly kill the process.
|
|
169
|
-
*
|
|
170
|
-
* @this {import('../adb.js').ADB}
|
|
171
|
-
* @param {string|number} pid - The ID of the process to be killed.
|
|
172
|
-
* @throws {Error} If the process cannot be killed.
|
|
173
|
-
*/
|
|
174
|
-
export function killProcessByPID(this: import("../adb.js").ADB, pid: string | number): Promise<void>;
|
|
175
|
-
/**
|
|
176
|
-
* Broadcast process killing on the device under test.
|
|
177
|
-
*
|
|
178
|
-
* @deprecated This method is deprecated and marked for removal in future releases.
|
|
179
|
-
* @this {import('../adb.js').ADB}
|
|
180
|
-
* @param {string} intent - The name of the intent to broadcast to.
|
|
181
|
-
* @param {string} processName - The name of the killed process.
|
|
182
|
-
* @throws {error} If the process was not killed.
|
|
183
|
-
*/
|
|
184
|
-
export function broadcastProcessEnd(this: import("../adb.js").ADB, intent: string, processName: string): Promise<void>;
|
|
185
|
-
/**
|
|
186
|
-
* Broadcast a message to the given intent.
|
|
187
|
-
*
|
|
188
|
-
* @this {import('../adb.js').ADB}
|
|
189
|
-
* @param {string} intent - The name of the intent to broadcast to.
|
|
190
|
-
* @throws {error} If intent name is not a valid class name.
|
|
191
|
-
*/
|
|
192
|
-
export function broadcast(this: import("../adb.js").ADB, intent: string): Promise<void>;
|
|
193
|
-
/**
|
|
194
|
-
* Check whether the process with the particular name is running on the device
|
|
195
|
-
* under test.
|
|
196
|
-
*
|
|
197
|
-
* @this {import('../adb.js').ADB}
|
|
198
|
-
* @param {string} processName - The name of the process to be checked.
|
|
199
|
-
* @return {Promise<boolean>} True if the given process is running.
|
|
200
|
-
* @throws {Error} If the given process name is not a valid class name.
|
|
201
|
-
*/
|
|
202
|
-
export function processExists(this: import("../adb.js").ADB, processName: string): Promise<boolean>;
|
|
203
126
|
/**
|
|
204
127
|
* Get the package info from the installed application.
|
|
205
128
|
*
|
|
@@ -345,6 +268,31 @@ export function matchComponentName(classString: string): RegExpExecArray | null;
|
|
|
345
268
|
* @returns {string[]} The list of matched permission names or an empty list if no matches were found.
|
|
346
269
|
*/
|
|
347
270
|
export function extractMatchingPermissions(dumpsysOutput: string, groupNames: string[], grantedState?: boolean | null): string[];
|
|
271
|
+
/**
|
|
272
|
+
* Broadcast a message to the given intent.
|
|
273
|
+
*
|
|
274
|
+
* @this {import('../adb.js').ADB}
|
|
275
|
+
* @param {string} intent - The name of the intent to broadcast to.
|
|
276
|
+
* @throws {error} If intent name is not a valid class name.
|
|
277
|
+
*/
|
|
278
|
+
export function broadcast(this: import("../adb.js").ADB, intent: string): Promise<void>;
|
|
279
|
+
/**
|
|
280
|
+
* Get the list of process ids for the particular package on the device under test.
|
|
281
|
+
*
|
|
282
|
+
* @this {import('../adb.js').ADB}
|
|
283
|
+
* @param {string} pkg
|
|
284
|
+
* @returns {Promise<number[]>} The list of matched process IDs or an empty list.
|
|
285
|
+
*/
|
|
286
|
+
export function listAppProcessIds(this: import("../adb.js").ADB, pkg: string): Promise<number[]>;
|
|
287
|
+
/**
|
|
288
|
+
* Check whether the process with the particular name is running on the device
|
|
289
|
+
* under test.
|
|
290
|
+
*
|
|
291
|
+
* @this {import('../adb.js').ADB}
|
|
292
|
+
* @param {string} pkg - The id of the package to be checked.
|
|
293
|
+
* @returns True if the given package is running.
|
|
294
|
+
*/
|
|
295
|
+
export function isAppRunning(this: import("../adb.js").ADB, pkg: string): Promise<boolean>;
|
|
348
296
|
/** @type {import('./types').StringRecord<import('./types').InstallState>} */
|
|
349
297
|
export const APP_INSTALL_STATE: import("./types").StringRecord<import("./types").InstallState>;
|
|
350
298
|
export type StartCmdOptions = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-commands.d.ts","sourceRoot":"","sources":["../../../lib/tools/app-commands.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-commands.d.ts","sourceRoot":"","sources":["../../../lib/tools/app-commands.js"],"names":[],"mappings":"AAyBA;;;;;;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eniedPermissions;
|
|
18
18
|
exports.getReqPermissions = getReqPermissions;
|
|
19
19
|
exports.stopAndClear = stopAndClear;
|
|
20
|
-
exports.listProcessStatus = listProcessStatus;
|
|
21
|
-
exports.getNameByPid = getNameByPid;
|
|
22
|
-
exports.getPIDsByName = getPIDsByName;
|
|
23
|
-
exports.killProcessesByName = killProcessesByName;
|
|
24
|
-
exports.killProcessByPID = killProcessByPID;
|
|
25
|
-
exports.broadcastProcessEnd = broadcastProcessEnd;
|
|
26
|
-
exports.broadcast = broadcast;
|
|
27
|
-
exports.processExists = processExists;
|
|
28
20
|
exports.getPackageInfo = getPackageInfo;
|
|
29
21
|
exports.pullApk = pullApk;
|
|
30
22
|
exports.activateApp = activateApp;
|
|
@@ -40,11 +32,13 @@ exports.buildStartCmd = buildStartCmd;
|
|
|
40
32
|
exports.parseLaunchableActivityNames = parseLaunchableActivityNames;
|
|
41
33
|
exports.matchComponentName = matchComponentName;
|
|
42
34
|
exports.extractMatchingPermissions = extractMatchingPermissions;
|
|
35
|
+
exports.broadcast = broadcast;
|
|
36
|
+
exports.listAppProcessIds = listAppProcessIds;
|
|
37
|
+
exports.isAppRunning = isAppRunning;
|
|
43
38
|
const lodash_1 = __importDefault(require("lodash"));
|
|
44
39
|
const support_1 = require("@appium/support");
|
|
45
40
|
const logger_js_1 = require("../logger.js");
|
|
46
41
|
const asyncbox_1 = require("asyncbox");
|
|
47
|
-
const bluebird_1 = __importDefault(require("bluebird"));
|
|
48
42
|
const path_1 = __importDefault(require("path"));
|
|
49
43
|
/** @type {import('./types').StringRecord<import('./types').InstallState>} */
|
|
50
44
|
exports.APP_INSTALL_STATE = {
|
|
@@ -60,9 +54,6 @@ const IGNORED_PERM_ERRORS = [
|
|
|
60
54
|
/Unknown permission/i,
|
|
61
55
|
];
|
|
62
56
|
const MIN_API_LEVEL_WITH_PERMS_SUPPORT = 23;
|
|
63
|
-
const PID_COLUMN_TITLE = 'PID';
|
|
64
|
-
const PROCESS_NAME_COLUMN_TITLE = 'NAME';
|
|
65
|
-
const PS_TITLE_PATTERN = new RegExp(`^(.*\\b${PID_COLUMN_TITLE}\\b.*\\b${PROCESS_NAME_COLUMN_TITLE}\\b.*)$`, 'm');
|
|
66
57
|
const RESOLVER_ACTIVITY_NAME = 'android/com.android.internal.app.ResolverActivity';
|
|
67
58
|
const MAIN_ACTION = 'android.intent.action.MAIN';
|
|
68
59
|
const LAUNCHER_CATEGORY = 'android.intent.category.LAUNCHER';
|
|
@@ -342,205 +333,6 @@ async function stopAndClear(pkg) {
|
|
|
342
333
|
throw new Error(`Cannot stop and clear ${pkg}. Original error: ${err.message}`);
|
|
343
334
|
}
|
|
344
335
|
}
|
|
345
|
-
/**
|
|
346
|
-
* At some point of time Google has changed the default `ps` behaviour, so it only
|
|
347
|
-
* lists processes that belong to the current shell user rather to all
|
|
348
|
-
* users. It is necessary to execute ps with -A command line argument
|
|
349
|
-
* to mimic the previous behaviour.
|
|
350
|
-
*
|
|
351
|
-
* @this {import('../adb.js').ADB}
|
|
352
|
-
* @returns {Promise<string>} the output of `ps` command where all processes are included
|
|
353
|
-
*/
|
|
354
|
-
async function listProcessStatus() {
|
|
355
|
-
if (!lodash_1.default.isBoolean(this._doesPsSupportAOption)) {
|
|
356
|
-
try {
|
|
357
|
-
this._doesPsSupportAOption = /^-A\b/m.test(await this.shell(['ps', '--help']));
|
|
358
|
-
}
|
|
359
|
-
catch (e) {
|
|
360
|
-
logger_js_1.log.debug(( /** @type {Error} */(e)).stack);
|
|
361
|
-
this._doesPsSupportAOption = false;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
return await this.shell(this._doesPsSupportAOption ? ['ps', '-A'] : ['ps']);
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
* Returns process name for the given process identifier
|
|
368
|
-
*
|
|
369
|
-
* @this {import('../adb.js').ADB}
|
|
370
|
-
* @param {string|number} pid - The valid process identifier
|
|
371
|
-
* @throws {Error} If the given PID is either invalid or is not present
|
|
372
|
-
* in the active processes list
|
|
373
|
-
* @returns {Promise<string>} The process name
|
|
374
|
-
*/
|
|
375
|
-
async function getNameByPid(pid) {
|
|
376
|
-
// @ts-ignore This validation works as expected
|
|
377
|
-
if (isNaN(pid)) {
|
|
378
|
-
throw new Error(`The PID value must be a valid number. '${pid}' is given instead`);
|
|
379
|
-
}
|
|
380
|
-
pid = parseInt(`${pid}`, 10);
|
|
381
|
-
const stdout = await this.listProcessStatus();
|
|
382
|
-
const titleMatch = PS_TITLE_PATTERN.exec(stdout);
|
|
383
|
-
if (!titleMatch) {
|
|
384
|
-
logger_js_1.log.debug(stdout);
|
|
385
|
-
throw new Error(`Could not get the process name for PID '${pid}'`);
|
|
386
|
-
}
|
|
387
|
-
const allTitles = titleMatch[1].trim().split(/\s+/);
|
|
388
|
-
const pidIndex = allTitles.indexOf(PID_COLUMN_TITLE);
|
|
389
|
-
// it might not be stable to take NAME by index, because depending on the
|
|
390
|
-
// actual SDK the ps output might not contain an abbreviation for the S flag:
|
|
391
|
-
// USER PID PPID VSIZE RSS WCHAN PC NAME
|
|
392
|
-
// USER PID PPID VSIZE RSS WCHAN PC S NAME
|
|
393
|
-
const nameOffset = allTitles.indexOf(PROCESS_NAME_COLUMN_TITLE) - allTitles.length;
|
|
394
|
-
const pidRegex = new RegExp(`^(.*\\b${pid}\\b.*)$`, 'gm');
|
|
395
|
-
let matchedLine;
|
|
396
|
-
while ((matchedLine = pidRegex.exec(stdout))) {
|
|
397
|
-
const items = matchedLine[1].trim().split(/\s+/);
|
|
398
|
-
if (parseInt(items[pidIndex], 10) === pid && items[items.length + nameOffset]) {
|
|
399
|
-
return items[items.length + nameOffset];
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
logger_js_1.log.debug(stdout);
|
|
403
|
-
throw new Error(`Could not get the process name for PID '${pid}'`);
|
|
404
|
-
}
|
|
405
|
-
/**
|
|
406
|
-
* Get the list of process ids for the particular process on the device under test.
|
|
407
|
-
*
|
|
408
|
-
* @this {import('../adb.js').ADB}
|
|
409
|
-
* @param {string} name - The part of process name.
|
|
410
|
-
* @return {Promise<number[]>} The list of matched process IDs or an empty list.
|
|
411
|
-
* @throws {Error} If the passed process name is not a valid one
|
|
412
|
-
*/
|
|
413
|
-
async function getPIDsByName(name) {
|
|
414
|
-
logger_js_1.log.debug(`Getting IDs of all '${name}' processes`);
|
|
415
|
-
if (!this.isValidClass(name)) {
|
|
416
|
-
throw new Error(`Invalid process name: '${name}'`);
|
|
417
|
-
}
|
|
418
|
-
const pidRegex = new RegExp(`ProcessRecord\\{[\\w]+\\s+(\\d+):${lodash_1.default.escapeRegExp(name)}\\/`);
|
|
419
|
-
const processesInfo = await this.shell(['dumpsys', 'activity', 'processes']);
|
|
420
|
-
const pids = processesInfo.split('\n')
|
|
421
|
-
.map((line) => line.match(pidRegex))
|
|
422
|
-
.filter((match) => !!match)
|
|
423
|
-
.map(([, pidStr]) => parseInt(pidStr, 10));
|
|
424
|
-
return lodash_1.default.uniq(pids);
|
|
425
|
-
}
|
|
426
|
-
/**
|
|
427
|
-
* Get the list of process ids for the particular process on the device under test.
|
|
428
|
-
*
|
|
429
|
-
* @this {import('../adb.js').ADB}
|
|
430
|
-
* @param {string} name - The part of process name.
|
|
431
|
-
*/
|
|
432
|
-
async function killProcessesByName(name) {
|
|
433
|
-
try {
|
|
434
|
-
logger_js_1.log.debug(`Attempting to kill all ${name} processes`);
|
|
435
|
-
const pids = await this.getPIDsByName(name);
|
|
436
|
-
if (lodash_1.default.isEmpty(pids)) {
|
|
437
|
-
logger_js_1.log.info(`No '${name}' process has been found`);
|
|
438
|
-
}
|
|
439
|
-
else {
|
|
440
|
-
await bluebird_1.default.all(pids.map((p) => this.killProcessByPID(p)));
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
catch (e) {
|
|
444
|
-
const err = /** @type {Error} */ (e);
|
|
445
|
-
throw new Error(`Unable to kill ${name} processes. Original error: ${err.message}`);
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
/**
|
|
449
|
-
* Kill the particular process on the device under test.
|
|
450
|
-
* The current user is automatically switched to root if necessary in order
|
|
451
|
-
* to properly kill the process.
|
|
452
|
-
*
|
|
453
|
-
* @this {import('../adb.js').ADB}
|
|
454
|
-
* @param {string|number} pid - The ID of the process to be killed.
|
|
455
|
-
* @throws {Error} If the process cannot be killed.
|
|
456
|
-
*/
|
|
457
|
-
async function killProcessByPID(pid) {
|
|
458
|
-
logger_js_1.log.debug(`Attempting to kill process ${pid}`);
|
|
459
|
-
const noProcessFlag = 'No such process';
|
|
460
|
-
try {
|
|
461
|
-
// Check if the process exists and throw an exception otherwise
|
|
462
|
-
await this.shell(['kill', `${pid}`]);
|
|
463
|
-
}
|
|
464
|
-
catch (e) {
|
|
465
|
-
const err = /** @type {import('teen_process').ExecError} */ (e);
|
|
466
|
-
if (lodash_1.default.includes(err.stderr, noProcessFlag)) {
|
|
467
|
-
return;
|
|
468
|
-
}
|
|
469
|
-
if (!lodash_1.default.includes(err.stderr, 'Operation not permitted')) {
|
|
470
|
-
throw err;
|
|
471
|
-
}
|
|
472
|
-
logger_js_1.log.info(`Cannot kill PID ${pid} due to insufficient permissions. Retrying as root`);
|
|
473
|
-
try {
|
|
474
|
-
await this.shell(['kill', `${pid}`], {
|
|
475
|
-
privileged: true
|
|
476
|
-
});
|
|
477
|
-
}
|
|
478
|
-
catch (e1) {
|
|
479
|
-
const err1 = /** @type {import('teen_process').ExecError} */ (e1);
|
|
480
|
-
if (lodash_1.default.includes(err1.stderr, noProcessFlag)) {
|
|
481
|
-
return;
|
|
482
|
-
}
|
|
483
|
-
throw err1;
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
/**
|
|
488
|
-
* Broadcast process killing on the device under test.
|
|
489
|
-
*
|
|
490
|
-
* @deprecated This method is deprecated and marked for removal in future releases.
|
|
491
|
-
* @this {import('../adb.js').ADB}
|
|
492
|
-
* @param {string} intent - The name of the intent to broadcast to.
|
|
493
|
-
* @param {string} processName - The name of the killed process.
|
|
494
|
-
* @throws {error} If the process was not killed.
|
|
495
|
-
*/
|
|
496
|
-
async function broadcastProcessEnd(intent, processName) {
|
|
497
|
-
// start the broadcast without waiting for it to finish.
|
|
498
|
-
this.broadcast(intent);
|
|
499
|
-
// wait for the process to end
|
|
500
|
-
let start = Date.now();
|
|
501
|
-
let timeoutMs = 40000;
|
|
502
|
-
try {
|
|
503
|
-
while ((Date.now() - start) < timeoutMs) {
|
|
504
|
-
if (await this.processExists(processName)) {
|
|
505
|
-
// cool down
|
|
506
|
-
await (0, asyncbox_1.sleep)(400);
|
|
507
|
-
continue;
|
|
508
|
-
}
|
|
509
|
-
return;
|
|
510
|
-
}
|
|
511
|
-
throw new Error(`Process never died within ${timeoutMs} ms`);
|
|
512
|
-
}
|
|
513
|
-
catch (e) {
|
|
514
|
-
const err = /** @type {Error} */ (e);
|
|
515
|
-
throw new Error(`Unable to broadcast process end. Original error: ${err.message}`);
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* Broadcast a message to the given intent.
|
|
520
|
-
*
|
|
521
|
-
* @this {import('../adb.js').ADB}
|
|
522
|
-
* @param {string} intent - The name of the intent to broadcast to.
|
|
523
|
-
* @throws {error} If intent name is not a valid class name.
|
|
524
|
-
*/
|
|
525
|
-
async function broadcast(intent) {
|
|
526
|
-
if (!this.isValidClass(intent)) {
|
|
527
|
-
throw new Error(`Invalid intent ${intent}`);
|
|
528
|
-
}
|
|
529
|
-
logger_js_1.log.debug(`Broadcasting: ${intent}`);
|
|
530
|
-
await this.shell(['am', 'broadcast', '-a', intent]);
|
|
531
|
-
}
|
|
532
|
-
/**
|
|
533
|
-
* Check whether the process with the particular name is running on the device
|
|
534
|
-
* under test.
|
|
535
|
-
*
|
|
536
|
-
* @this {import('../adb.js').ADB}
|
|
537
|
-
* @param {string} processName - The name of the process to be checked.
|
|
538
|
-
* @return {Promise<boolean>} True if the given process is running.
|
|
539
|
-
* @throws {Error} If the given process name is not a valid class name.
|
|
540
|
-
*/
|
|
541
|
-
async function processExists(processName) {
|
|
542
|
-
return !lodash_1.default.isEmpty(await this.getPIDsByName(processName));
|
|
543
|
-
}
|
|
544
336
|
/**
|
|
545
337
|
* Get the package info from the installed application.
|
|
546
338
|
*
|
|
@@ -1242,7 +1034,48 @@ function extractMatchingPermissions(dumpsysOutput, groupNames, grantedState = nu
|
|
|
1242
1034
|
`from ${groupNames} ${support_1.util.pluralize('group', groupNames.length, false)}`);
|
|
1243
1035
|
return filteredResult;
|
|
1244
1036
|
}
|
|
1245
|
-
|
|
1037
|
+
/**
|
|
1038
|
+
* Broadcast a message to the given intent.
|
|
1039
|
+
*
|
|
1040
|
+
* @this {import('../adb.js').ADB}
|
|
1041
|
+
* @param {string} intent - The name of the intent to broadcast to.
|
|
1042
|
+
* @throws {error} If intent name is not a valid class name.
|
|
1043
|
+
*/
|
|
1044
|
+
async function broadcast(intent) {
|
|
1045
|
+
if (!this.isValidClass(intent)) {
|
|
1046
|
+
throw new Error(`Invalid intent ${intent}`);
|
|
1047
|
+
}
|
|
1048
|
+
logger_js_1.log.debug(`Broadcasting: ${intent}`);
|
|
1049
|
+
await this.shell(['am', 'broadcast', '-a', intent]);
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* Get the list of process ids for the particular package on the device under test.
|
|
1053
|
+
*
|
|
1054
|
+
* @this {import('../adb.js').ADB}
|
|
1055
|
+
* @param {string} pkg
|
|
1056
|
+
* @returns {Promise<number[]>} The list of matched process IDs or an empty list.
|
|
1057
|
+
*/
|
|
1058
|
+
async function listAppProcessIds(pkg) {
|
|
1059
|
+
logger_js_1.log.debug(`Getting IDs of all '${pkg}' package`);
|
|
1060
|
+
const pidRegex = new RegExp(`ProcessRecord\\{[\\w]+\\s+(\\d+):${lodash_1.default.escapeRegExp(pkg)}\\/`);
|
|
1061
|
+
const processesInfo = await this.shell(['dumpsys', 'activity', 'processes']);
|
|
1062
|
+
const pids = processesInfo.split('\n')
|
|
1063
|
+
.map((line) => line.match(pidRegex))
|
|
1064
|
+
.filter((match) => !!match)
|
|
1065
|
+
.map(([, pidStr]) => parseInt(pidStr, 10));
|
|
1066
|
+
return lodash_1.default.uniq(pids);
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* Check whether the process with the particular name is running on the device
|
|
1070
|
+
* under test.
|
|
1071
|
+
*
|
|
1072
|
+
* @this {import('../adb.js').ADB}
|
|
1073
|
+
* @param {string} pkg - The id of the package to be checked.
|
|
1074
|
+
* @returns True if the given package is running.
|
|
1075
|
+
*/
|
|
1076
|
+
async function isAppRunning(pkg) {
|
|
1077
|
+
return !lodash_1.default.isEmpty(await this.listAppProcessIds(pkg));
|
|
1078
|
+
}
|
|
1246
1079
|
/**
|
|
1247
1080
|
* @typedef {Object} StartCmdOptions
|
|
1248
1081
|
* @property {number|string} [user]
|