fix: improve regex

This commit is contained in:
Simon Chan 2024-03-06 15:01:32 +08:00
parent c95c63f4e0
commit f266970cf2
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
4 changed files with 17 additions and 10 deletions

View file

@ -366,8 +366,6 @@ export class PackageManager extends AdbCommandBase {
]);
}
// TODO: install: support split apk formats (`adb install-multiple`)
static parsePackageListItem(
line: string,
): PackageManagerListPackagesResult {
@ -502,6 +500,16 @@ export class PackageManager extends AdbCommandBase {
return output;
}
/**
* Creates a new install session.
*
* Install sessions are used to install apps with multiple splits, but it can also be used to install a single apk.
*
* Install sessions was added in Android 5.0 (API level 21).
*
* @param options Options for the install session
* @returns ID of the new install session
*/
async sessionCreate(options?: Partial<PackageManagerInstallOptions>) {
const args = this.#buildInstallArguments("install-create", options);
@ -542,8 +550,6 @@ export class PackageManager extends AdbCommandBase {
size: number,
stream: ReadableStream<Consumable<Uint8Array>>,
) {
// `pm install-write` supports streaming from stdin from at least Android 5
// So assume it always works
const args: string[] = [
"pm",
"install-write",