Confirmed users
699
edits
Marshall law (talk | contribs) |
|||
| Line 5: | Line 5: | ||
== Types of updates == | == Types of updates == | ||
B2G phones can update the entire system through '''FOTA updates'''. The technology behind FOTA updates is shared with the Android project. The | B2G phones can update the entire system through '''FOTA updates'''. The technology behind FOTA updates is shared with the Android project. The locations on the phone's hard drives that can be changed using FOTA updates include the system partition, kernel, modem baseband, recovery image used for updating, or any other file on the device. | ||
B2G can also update ''just'' the Gecko and Gaia files on device, through a mechanism we call '''Gecko/Gaia OTA updates'''. All of the Gecko and Gaia files are in the <code>/system/b2g</code> directory on the device. They | B2G can also update ''just'' the Gecko and Gaia files on device, through a mechanism we call '''Gecko/Gaia OTA updates'''. All of the Gecko and Gaia files are in the <code>/system/b2g</code> directory on the device. They comprise the core Gecko runtime and the device's user interface. | ||
=== FOTA updates === | === FOTA updates === | ||
B2G does not depend on a particular FOTA client; the interface is abstracted through an API we call [http://git.mozilla.org/?p=b2g/librecovery.git;a=blob;f=librecovery.h;h=a6e13374f9bffcf947a39d6f3348290d67113321;hb=HEAD "librecovery"]. However, we recommend using the "GOTA" recovery client, and the discussion here assumes GOTA is being used. | |||
* | FOTA update packages mainly consist of a file called <code>update.zip</code>. This package consists of | ||
* | * a set of binary diffs and new files required to update the client to the newer software version | ||
* an "update script" that drives how the diffs and new files are loaded onto the client | |||
* an internal signature used to verify the update package | |||
Again, this format and set of files are the same as those used in normal updates of Android OSes. | |||
B2G additionally wraps this <code>update.zip</code> package in a <code>mar</code> wrapper. This <code>mar</code> wrapper allows an additional level of verification that's explained below. | |||
=== Gecko/Gaia OTA updates === | === Gecko/Gaia OTA updates === | ||
Gecko/Gaia OTA updates use the same technology that's used to update the Firefox desktop web browser. These update packages are called <code>"MARs"</code>, which stands for "Mozilla ARchive". Much like the <code>update.zip</code> packages discussed above, <code>MARs</code> consist of a set of binary diffs and new files needed to update the client to a newer software version. | |||
* | The Gecko client verifies the integrity of <code>MARs</code> that it downloads, and <code>MARs</code> can be signed by multiple parties. | ||
* update | |||
Again, on B2G clients, Gecko/Gaia OTA updates can only change files in the <code>/system/b2g</code> directory. | |||
=== Why have two update technologies? === | |||
This question is not covered in detail in this document; please refer to [http://example.com/ XXX other doc]. The short answer is that | |||
* Gecko/Gaia OTA updates can be applied "in the background", while Firefox OS continues to run normally. This provides a much better user experience because users don't need to reboot their phone and wait while an update is applied. Instead, the update is applied while the user continues to use the phone, and when the update is finished the user only needs to agree to restart the main <code>b2g</code> process. This takes a matter of seconds, instead of the minutes that are usually required to apply FOTA updates. Therefore, since most updates will only need to change files in <code>/system/b2g</code>, we trade off the full generality of FOTA updates for a better user experience with Gecko/Gaia OTA updates in the common case. | |||
* Gecko/Gaia OTA update packages can sometimes be smaller than FOTA update packages, though not always; they should never be larger. This means that users can sometimes have less data to download. | |||
== Building updates for multiple software versions == | == Building updates for multiple software versions == | ||