Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/fastboot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,24 @@ export class FastbootDevice {
common.logDebug(`Booted ${blob.size} bytes image`);
}

/**
* Stage Blob on the connected deivce.
Copy link
Copy Markdown

@matchboxbananasynergy matchboxbananasynergy Jul 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Stage Blob on the connected deivce.
* Stage Blob on the connected device.

* Equivalent to `fastboot stage BlobName`.
* @param {string} filename - Filename
* @param {Blob} blob - The Blob to retrieve data from.
* @param {FlashProgressCallback} onProgress - Callback for flashing progress updates.
* @throws {FastbootError}
*/
async stagePayload(
filename: string,
blob: Blob,
onProgress: FlashProgressCallback = (_progress) => {}
) {
let buffer = await common.readBlobAsBuffer(blob);
common.logDebug(`Sending payload: ${buffer.byteLength} bytes`);
await this.upload(filename, buffer, onProgress);
}

/**
* Flash the given factory images zip onto the device, with automatic handling
* of firmware, system, and logical partitions as AOSP fastboot and
Expand Down