Loading app/src/controller/controller.manager.js +3 −1 Original line number Diff line number Diff line Loading @@ -374,7 +374,9 @@ export class ControllerManager { async runSideloadCommand(cmd) { try { await this.deviceManager.connect("recovery"); await this.deviceManager.sideload(cmd.file); await this.deviceManager.sideload(cmd.file, (block, total) => { this.view.onInstalling(cmd.file, block, total); }); return true; } catch (e) { throw new Error(`Sideload ${cmd.file} failed: ${e.message || e}`); Loading app/src/controller/device.manager.js +2 −2 Original line number Diff line number Diff line Loading @@ -301,13 +301,13 @@ export class DeviceManager { * @param {string} file Filename in downloader cache. * @returns {Promise<any>} Sideload result from the active device. */ async sideload(file) { async sideload(file, onProgress) { let blob = await this.downloader.getFile(file); if (!blob) { throw new Error(`error getting blob file ${file}`); } return await this.device.sideload(blob); return await this.device.sideload(blob, onProgress); } /** Loading app/src/controller/device/recovery.class.js +2 −1 Original line number Diff line number Diff line Loading @@ -49,12 +49,13 @@ export class Recovery extends Device { * @param {Blob} blob Zip blob to sideload. * @returns {Promise<void>} Resolves when sideload completes. */ async sideload(blob) { async sideload(blob, onProgress) { try { await this._adbDevice.sideload(blob, (block, totalBlocks) => { if (block % 10 === 0) { DebugManager.log(`Sideloading block ${block}/${totalBlocks}`); } onProgress?.(block, totalBlocks); }); } catch (e) { throw new Error(`Sideload fails ${e.message || e}`); Loading app/src/view/view.manager.js +1 −1 Original line number Diff line number Diff line Loading @@ -323,7 +323,7 @@ export default class ViewManager { $progress.innerText = `Installing ${name}: ${v}/${100}`; } this.DebugManager.log( `Installing ${name}: ${Math.round(v * 100)}/${100}`, `Installing ${name}: ${v}/${100}`, `installing-${name}`, ); } Loading Loading
app/src/controller/controller.manager.js +3 −1 Original line number Diff line number Diff line Loading @@ -374,7 +374,9 @@ export class ControllerManager { async runSideloadCommand(cmd) { try { await this.deviceManager.connect("recovery"); await this.deviceManager.sideload(cmd.file); await this.deviceManager.sideload(cmd.file, (block, total) => { this.view.onInstalling(cmd.file, block, total); }); return true; } catch (e) { throw new Error(`Sideload ${cmd.file} failed: ${e.message || e}`); Loading
app/src/controller/device.manager.js +2 −2 Original line number Diff line number Diff line Loading @@ -301,13 +301,13 @@ export class DeviceManager { * @param {string} file Filename in downloader cache. * @returns {Promise<any>} Sideload result from the active device. */ async sideload(file) { async sideload(file, onProgress) { let blob = await this.downloader.getFile(file); if (!blob) { throw new Error(`error getting blob file ${file}`); } return await this.device.sideload(blob); return await this.device.sideload(blob, onProgress); } /** Loading
app/src/controller/device/recovery.class.js +2 −1 Original line number Diff line number Diff line Loading @@ -49,12 +49,13 @@ export class Recovery extends Device { * @param {Blob} blob Zip blob to sideload. * @returns {Promise<void>} Resolves when sideload completes. */ async sideload(blob) { async sideload(blob, onProgress) { try { await this._adbDevice.sideload(blob, (block, totalBlocks) => { if (block % 10 === 0) { DebugManager.log(`Sideloading block ${block}/${totalBlocks}`); } onProgress?.(block, totalBlocks); }); } catch (e) { throw new Error(`Sideload fails ${e.message || e}`); Loading
app/src/view/view.manager.js +1 −1 Original line number Diff line number Diff line Loading @@ -323,7 +323,7 @@ export default class ViewManager { $progress.innerText = `Installing ${name}: ${v}/${100}`; } this.DebugManager.log( `Installing ${name}: ${Math.round(v * 100)}/${100}`, `Installing ${name}: ${v}/${100}`, `installing-${name}`, ); } Loading