Implement RecoveryService: an XPCOM service wrapper for librecovery

RESOLVED FIXED

Status

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: marshall, Assigned: marshall)

Tracking

unspecified
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(blocking-basecamp:+)

Details

Attachments

(1 attachment, 1 obsolete attachment)

This service will be needed for both factory reset and FOTA updates.

See initial librecovery here:
http://github.com/marshall/librecovery
Posted patch RecoveryService - v3 (obsolete) — Splinter Review
Updated patch for API suggested by cjones
Attachment #664516 - Flags: review?(21)
Comment on attachment 664516 [details] [diff] [review]
RecoveryService - v3

Review of attachment 664516 [details] [diff] [review]:
-----------------------------------------------------------------

r+ but i don't really like the idea of boolean that are always false.

::: b2g/components/RecoveryService.js
@@ +12,5 @@
> +
> +const RECOVERYSERVICE_CID = Components.ID("{b3caca5d-0bb0-48c6-912b-6be6cbf08832}");
> +const RECOVERYSERVICE_CONTRACTID = "@mozilla.org/recovery-service;1";
> +const DEBUG = true;
> +

DEBUG is never used.

::: b2g/components/b2g.idl
@@ +48,5 @@
> +   * successful, the device should reboot before the function call ever returns.
> +   *
> +   * @return false when rebooting into recovery fails for some reason.
> +   */
> +  boolean factoryReset();

Is there any reasons to return a boolean that is always false. I don't know if throwing errors is better here?

@@ +56,5 @@
> +   * successful, the device should reboot before the function call ever returns.
> +   *
> +   * @return false when rebooting into recovery fails for some reason.
> +   */
> +  boolean installFotaUpdate(in string updatePath);

Same comment as above.
Attachment #664516 - Flags: review?(21) → review+
blocking-basecamp: ? → +
Asking for another review since I added a new FOTA update status checking API.
Attachment #664516 - Attachment is obsolete: true
Attachment #665517 - Flags: review?(jones.chris.g)
Attachment #665517 - Flags: review?(21)
Attachment #665517 - Flags: review?(jones.chris.g) → review+
Comment on attachment 665517 [details] [diff] [review]
RecoveryService - v4

This is a small enough change that I'm sure Vivien is happy to defer to me and get some sleep ;).
Attachment #665517 - Flags: review?(21) → review+
Blocks: 795512
https://hg.mozilla.org/mozilla-central/rev/c19a02de09c4
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.