Loading libraries/android-bin/src/pm.ts +10 −4 Original line number Diff line number Diff line Loading @@ -366,8 +366,6 @@ export class PackageManager extends AdbCommandBase { ]); } // TODO: install: support split apk formats (`adb install-multiple`) static parsePackageListItem( line: string, ): PackageManagerListPackagesResult { Loading Loading @@ -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); Loading Loading @@ -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", Loading libraries/scrcpy/src/options/1_16/options.ts +1 −2 Original line number Diff line number Diff line Loading @@ -128,8 +128,7 @@ export class ScrcpyOptions1_16 implements ScrcpyOptions<ScrcpyOptionsInit1_16> { } parseDisplay(line: string): ScrcpyDisplay | undefined { const displayIdRegex = /\s+scrcpy --display (\d+)/; const match = line.match(displayIdRegex); const match = line.match(/^\s+scrcpy --display (\d+)$/); if (match) { return { id: Number.parseInt(match[1]!, 10), Loading libraries/scrcpy/src/options/2_0.ts +5 −3 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ export class ScrcpyOptions2_0 extends ScrcpyOptionsBase< override parseEncoder(line: string): ScrcpyEncoder | undefined { let match = line.match( /\s+--video-codec=(.*)\s+--video-encoder='(.*)'/, /^\s+--video-codec=(\S+)\s+--video-encoder='([^']+)'$/, ); if (match) { return { Loading @@ -165,7 +165,9 @@ export class ScrcpyOptions2_0 extends ScrcpyOptionsBase< }; } match = line.match(/\s+--audio-codec=(.*)\s+--audio-encoder='(.*)'/); match = line.match( /^\s+--audio-codec=(\S+)\s+--audio-encoder='([^']+)'$/, ); if (match) { return { type: "audio", Loading @@ -178,7 +180,7 @@ export class ScrcpyOptions2_0 extends ScrcpyOptionsBase< } override parseDisplay(line: string): ScrcpyDisplay | undefined { const match = line.match(/\s+--display=(\d+)\s+\((.*?)\)/); const match = line.match(/^\s+--display=(\d+)\s+\(([^)]+)\)$/); if (match) { const display: ScrcpyDisplay = { id: Number.parseInt(match[1]!, 10), Loading libraries/scrcpy/src/options/2_2.ts +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ export class ScrcpyOptions2_2 extends ScrcpyOptionsBase< } override parseDisplay(line: string): ScrcpyDisplay | undefined { const match = line.match(/\s+--display-id=(\d+)\s+\((.*?)\)/); const match = line.match(/^\s+--display-id=(\d+)\s+\(([^)]+)\)$/); if (match) { const display: ScrcpyDisplay = { id: Number.parseInt(match[1]!, 10), Loading Loading
libraries/android-bin/src/pm.ts +10 −4 Original line number Diff line number Diff line Loading @@ -366,8 +366,6 @@ export class PackageManager extends AdbCommandBase { ]); } // TODO: install: support split apk formats (`adb install-multiple`) static parsePackageListItem( line: string, ): PackageManagerListPackagesResult { Loading Loading @@ -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); Loading Loading @@ -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", Loading
libraries/scrcpy/src/options/1_16/options.ts +1 −2 Original line number Diff line number Diff line Loading @@ -128,8 +128,7 @@ export class ScrcpyOptions1_16 implements ScrcpyOptions<ScrcpyOptionsInit1_16> { } parseDisplay(line: string): ScrcpyDisplay | undefined { const displayIdRegex = /\s+scrcpy --display (\d+)/; const match = line.match(displayIdRegex); const match = line.match(/^\s+scrcpy --display (\d+)$/); if (match) { return { id: Number.parseInt(match[1]!, 10), Loading
libraries/scrcpy/src/options/2_0.ts +5 −3 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ export class ScrcpyOptions2_0 extends ScrcpyOptionsBase< override parseEncoder(line: string): ScrcpyEncoder | undefined { let match = line.match( /\s+--video-codec=(.*)\s+--video-encoder='(.*)'/, /^\s+--video-codec=(\S+)\s+--video-encoder='([^']+)'$/, ); if (match) { return { Loading @@ -165,7 +165,9 @@ export class ScrcpyOptions2_0 extends ScrcpyOptionsBase< }; } match = line.match(/\s+--audio-codec=(.*)\s+--audio-encoder='(.*)'/); match = line.match( /^\s+--audio-codec=(\S+)\s+--audio-encoder='([^']+)'$/, ); if (match) { return { type: "audio", Loading @@ -178,7 +180,7 @@ export class ScrcpyOptions2_0 extends ScrcpyOptionsBase< } override parseDisplay(line: string): ScrcpyDisplay | undefined { const match = line.match(/\s+--display=(\d+)\s+\((.*?)\)/); const match = line.match(/^\s+--display=(\d+)\s+\(([^)]+)\)$/); if (match) { const display: ScrcpyDisplay = { id: Number.parseInt(match[1]!, 10), Loading
libraries/scrcpy/src/options/2_2.ts +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ export class ScrcpyOptions2_2 extends ScrcpyOptionsBase< } override parseDisplay(line: string): ScrcpyDisplay | undefined { const match = line.match(/\s+--display-id=(\d+)\s+\((.*?)\)/); const match = line.match(/^\s+--display-id=(\d+)\s+\(([^)]+)\)$/); if (match) { const display: ScrcpyDisplay = { id: Number.parseInt(match[1]!, 10), Loading