<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mozilla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marshall+law</id>
	<title>MozillaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mozilla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marshall+law"/>
	<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/Special:Contributions/Marshall_law"/>
	<updated>2026-07-15T04:37:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics/App_Usage&amp;diff=1027653</id>
		<title>Firefox OS/Metrics/App Usage</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics/App_Usage&amp;diff=1027653"/>
		<updated>2014-10-23T17:59:51Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: Added a note about average payload size&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Requirements=&lt;br /&gt;
For all system and 3rd party apps, track:&lt;br /&gt;
# Total time that each app (by URL) has been actively been used (in the foreground while the screen is on)&lt;br /&gt;
# Counts for the number of times an app has been opened, closed, or crashed&lt;br /&gt;
# A list of apps that have been uninstalled since the last successful report&lt;br /&gt;
&lt;br /&gt;
=Design=&lt;br /&gt;
The App Updates Metrics (AUM) service actively collects usage information by hooking into several system events. The determination of running time of an app looks something like this:&lt;br /&gt;
&lt;br /&gt;
* When an app is opened, or the user switches to the homescreen, AUM marks it as the currently running app, and records the current time&lt;br /&gt;
* When the device is locked, the display goes to sleep, or another app is opened, AUM records the delta of the current time with the current app&#039;s start time&lt;br /&gt;
* When the device is unlocked after the display was sleeping, the current app&#039;s start time is reset to the current time so we don&#039;t record usage time while the screen was off/locked&lt;br /&gt;
* AUM also records installs, uninstalls, and and activity invocations (on activity URLs -- not running time) of apps&lt;br /&gt;
&lt;br /&gt;
When the device is idle and and any of these registered events occur:&lt;br /&gt;
* AUM will save the currently collected metrics to async storage&lt;br /&gt;
* If the device is also online and a specified interval has passed (default 24 hours), AUM will begin attemping to transmit the stored metrics to the Telemetry server&lt;br /&gt;
* If transmission fails, then a separate retry interval (default 1 hour) controls how often AUM will retry transmission until it is successful&lt;br /&gt;
&lt;br /&gt;
=Example Payload and URL=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://fxos.telemetry.mozilla.org/submit/telemetry/metrics/FirefoxOS/appusage&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;apps&amp;quot;: {&lt;br /&gt;
        &amp;quot;app://verticalhome.gaiamobile.org/manifest.webapp&amp;quot;: {&lt;br /&gt;
            &amp;quot;activities&amp;quot;: {},&lt;br /&gt;
            &amp;quot;installs&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;invocations&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;uninstalls&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;usageTime&amp;quot;: 23&lt;br /&gt;
        }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;deviceID&amp;quot;: &amp;quot;j2670k6q&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo&amp;quot;: {&lt;br /&gt;
        &amp;quot;developer.menu.enabled&amp;quot;: true,&lt;br /&gt;
        &amp;quot;deviceinfo.platform_build_id&amp;quot;: &amp;quot;20140902135234&amp;quot;,&lt;br /&gt;
        &amp;quot;deviceinfo.platform_version&amp;quot;: &amp;quot;34.0a1&amp;quot;,&lt;br /&gt;
        &amp;quot;deviceinfo.update_channel&amp;quot;: &amp;quot;unknown&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;locale&amp;quot;: &amp;quot;en-US&amp;quot;,&lt;br /&gt;
    &amp;quot;screen&amp;quot;: {&lt;br /&gt;
        &amp;quot;devicePixelRatio&amp;quot;: 1.5,&lt;br /&gt;
        &amp;quot;height&amp;quot;: 569,&lt;br /&gt;
        &amp;quot;width&amp;quot;: 320&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;start&amp;quot;: 1411567451826,&lt;br /&gt;
    &amp;quot;stop&amp;quot;: 1411577295717&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Glossary==&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apps&amp;lt;/code&amp;gt; || Usage for each app in this batch (these are not aggregates), keyed by the app&#039;s manifest URL&lt;br /&gt;
    {|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;installs&amp;lt;/code&amp;gt; || The number of app installs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;uninstalls&amp;lt;/code&amp;gt; || The number of app uninstalls&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;invocations&amp;lt;/code&amp;gt; || The number of times the app was started&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;usageTime&amp;lt;/code&amp;gt; || The total number of seconds the app was used&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceID&amp;lt;/code&amp;gt; || A randomly generated deviceID to help server side de-duplication. This is separate from any other ID in the system, including the FTU activation ping&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo&amp;lt;/code&amp;gt; ||&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;developer.menu.enabled&amp;lt;/code&amp;gt; || Whether or not this is a &#039;production&#039; build&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.platform_build_id&amp;lt;/code&amp;gt; || The timestamp that gecko was built&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.platform_version&amp;lt;/code&amp;gt; || The version string of gecko&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.update_channel&amp;lt;/code&amp;gt; || Update channel used for FxOS OTA updates&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;locale&amp;lt;/code&amp;gt; || Platform locale string, i.e. &#039;en-US&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; ||&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;devicePixelRatio&amp;lt;/code&amp;gt; || ratio of physical pixels to virtual pixels on the device&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;width&amp;lt;/code&amp;gt; || screen width in CSS pixels&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; || screen height in CSS pixels&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; || UNIX device timestamp of when this batch of metrics started recording&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop&amp;lt;/code&amp;gt; || UNIX device timestamp of when this batch of metrics stopped recording&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
==Notes==&lt;br /&gt;
* The size of the JSON payload that we send to the telemetry server seems to be between 1KB-3KB on average.&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics/App_Usage&amp;diff=1018002</id>
		<title>Firefox OS/Metrics/App Usage</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics/App_Usage&amp;diff=1018002"/>
		<updated>2014-09-24T17:35:21Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Requirements=&lt;br /&gt;
For all system and 3rd party apps, track:&lt;br /&gt;
# Total time that each app (by URL) has been actively been used (in the foreground while the screen is on)&lt;br /&gt;
# Counts for the number of times an app has been opened, closed, or crashed&lt;br /&gt;
# A list of apps that have been uninstalled since the last successful report&lt;br /&gt;
&lt;br /&gt;
=Design=&lt;br /&gt;
The App Updates Metrics (AUM) service actively collects usage information by hooking into several system events. The determination of running time of an app looks something like this:&lt;br /&gt;
&lt;br /&gt;
* When an app is opened, or the user switches to the homescreen, AUM marks it as the currently running app, and records the current time&lt;br /&gt;
* When the device is locked, the display goes to sleep, or another app is opened, AUM records the delta of the current time with the current app&#039;s start time&lt;br /&gt;
* When the device is unlocked after the display was sleeping, the current app&#039;s start time is reset to the current time so we don&#039;t record usage time while the screen was off/locked&lt;br /&gt;
* AUM also records installs, uninstalls, and and activity invocations (on activity URLs -- not running time) of apps&lt;br /&gt;
&lt;br /&gt;
When the device is idle and and any of these registered events occur:&lt;br /&gt;
* AUM will save the currently collected metrics to async storage&lt;br /&gt;
* If the device is also online and a specified interval has passed (default 24 hours), AUM will begin attemping to transmit the stored metrics to the Telemetry server&lt;br /&gt;
* If transmission fails, then a separate retry interval (default 1 hour) controls how often AUM will retry transmission until it is successful&lt;br /&gt;
&lt;br /&gt;
=Example Payload and URL=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://fxos.telemetry.mozilla.org/submit/telemetry/metrics/FirefoxOS/appusage&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;apps&amp;quot;: {&lt;br /&gt;
        &amp;quot;app://verticalhome.gaiamobile.org/manifest.webapp&amp;quot;: {&lt;br /&gt;
            &amp;quot;activities&amp;quot;: {},&lt;br /&gt;
            &amp;quot;installs&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;invocations&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;uninstalls&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;usageTime&amp;quot;: 23&lt;br /&gt;
        }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;deviceID&amp;quot;: &amp;quot;j2670k6q&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo&amp;quot;: {&lt;br /&gt;
        &amp;quot;developer.menu.enabled&amp;quot;: true,&lt;br /&gt;
        &amp;quot;deviceinfo.platform_build_id&amp;quot;: &amp;quot;20140902135234&amp;quot;,&lt;br /&gt;
        &amp;quot;deviceinfo.platform_version&amp;quot;: &amp;quot;34.0a1&amp;quot;,&lt;br /&gt;
        &amp;quot;deviceinfo.update_channel&amp;quot;: &amp;quot;unknown&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;locale&amp;quot;: &amp;quot;en-US&amp;quot;,&lt;br /&gt;
    &amp;quot;screen&amp;quot;: {&lt;br /&gt;
        &amp;quot;devicePixelRatio&amp;quot;: 1.5,&lt;br /&gt;
        &amp;quot;height&amp;quot;: 569,&lt;br /&gt;
        &amp;quot;width&amp;quot;: 320&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;start&amp;quot;: 1411567451826,&lt;br /&gt;
    &amp;quot;stop&amp;quot;: 1411577295717&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Glossary==&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apps&amp;lt;/code&amp;gt; || Usage for each app in this batch (these are not aggregates), keyed by the app&#039;s manifest URL&lt;br /&gt;
    {|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;installs&amp;lt;/code&amp;gt; || The number of app installs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;uninstalls&amp;lt;/code&amp;gt; || The number of app uninstalls&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;invocations&amp;lt;/code&amp;gt; || The number of times the app was started&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;usageTime&amp;lt;/code&amp;gt; || The total number of seconds the app was used&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceID&amp;lt;/code&amp;gt; || A randomly generated deviceID to help server side de-duplication. This is separate from any other ID in the system, including the FTU activation ping&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo&amp;lt;/code&amp;gt; ||&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;developer.menu.enabled&amp;lt;/code&amp;gt; || Whether or not this is a &#039;production&#039; build&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.platform_build_id&amp;lt;/code&amp;gt; || The timestamp that gecko was built&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.platform_version&amp;lt;/code&amp;gt; || The version string of gecko&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.update_channel&amp;lt;/code&amp;gt; || Update channel used for FxOS OTA updates&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;locale&amp;lt;/code&amp;gt; || Platform locale string, i.e. &#039;en-US&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; ||&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;devicePixelRatio&amp;lt;/code&amp;gt; || ratio of physical pixels to virtual pixels on the device&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;width&amp;lt;/code&amp;gt; || screen width in CSS pixels&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; || screen height in CSS pixels&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; || UNIX device timestamp of when this batch of metrics started recording&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop&amp;lt;/code&amp;gt; || UNIX device timestamp of when this batch of metrics stopped recording&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=1017998</id>
		<title>Firefox OS/Metrics</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=1017998"/>
		<updated>2014-09-24T17:26:27Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: /* App usage metrics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=FTU ping=&lt;br /&gt;
==Design of Activation Ping==&lt;br /&gt;
#Activation Ping is triggered through the first-time use experience / activation. &lt;br /&gt;
#Never pings again once it is successful (unless the phone&#039;s &amp;quot;userdata&amp;quot; partition is formatted through the recovery partition, but this is not a case we support generally, it means wiping all of the user&#039;s data)&lt;br /&gt;
#Can also be disabled, but requires extra work on top of disabling app updates or removing the Firefox marketplace app&lt;br /&gt;
==Details==&lt;br /&gt;
When a device is first activated, The FTU ping service sends a simple one-off HTTP request to our telemetry server. The HTTP request contains a JSON payload with some high level information about the device and network, but no unique hardware identifiers. A randomly generated pingID is sent to help with filtering on the server side, but this ID is discarded by the server once filtering has occurred (generally after 24 hours).&lt;br /&gt;
&lt;br /&gt;
Currently, the logic for the FTU ping is broken down like this:&lt;br /&gt;
# Unless the setting &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; is explicitly set to false, start the FTU ping service. If the setting is missing, or any other value, then the ping service is enabled.&lt;br /&gt;
# Lazily get or create a randomly generated pingID, which is used for server side filtering. This pingID is only generated once per device, and is discarded on the server side.&lt;br /&gt;
# Record the time the ping service started, to track the delta of time to a successful ping.&lt;br /&gt;
# Pull all relevant ping payload settings asynchronously.&lt;br /&gt;
# Create an interval timer to attempt a ping once an hour. This is configurable with &amp;lt;tt&amp;gt;ftu.pingTryInterval&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Check for availability of voice network information. If none is available, try again on the next interval. If this fails 24 times, then continue trying the ping until is successful. This is configurable in the setting &amp;lt;tt&amp;gt;ftu.pingMaxNetworkFails&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Send an HTTP request to &amp;lt;tt&amp;gt;FTU_PING_URL/PING_ID/ftu/FirefoxOS/VERSION/UPDATE_CHANNEL/BUILD_ID&amp;lt;/tt&amp;gt;. By default, the ping URL is https://fxos.telemetry.mozilla.org/submit/telemetry, and is configurable in the &amp;lt;tt&amp;gt;ftu.pingURL&amp;lt;/tt&amp;gt; setting, or via make with &amp;lt;tt&amp;gt;FTU_PING_URL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
### If the HTTP request succeeds, set &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; to false, and disable the interval timer. Otherwise, try again on the next interval.&lt;br /&gt;
&lt;br /&gt;
==Example payload and URL==&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tt&amp;gt;POST https://fxos.telemetry.mozilla.org/submit/telemetry/e426da9f-2a29-4e09-895b-c883903956cb/ftu/FirefoxOS/31.0a1/default/20140325104133&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activationTime&amp;quot;: 1398300000000,&lt;br /&gt;
  &amp;quot;pingTime&amp;quot;: 1398300000000,&lt;br /&gt;
  &amp;quot;locale&amp;quot;: &amp;quot;hu&amp;quot;,&lt;br /&gt;
  &amp;quot;network&amp;quot;: {&lt;br /&gt;
    &amp;quot;mcc&amp;quot;: &amp;quot;216&amp;quot;,&lt;br /&gt;
    &amp;quot;mnc&amp;quot;: &amp;quot;70&amp;quot;,&lt;br /&gt;
    &amp;quot;operator&amp;quot;: &amp;quot;vodafone HU vodafone&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;icc&amp;quot;: {&lt;br /&gt;
    &amp;quot;spn&amp;quot;: &amp;quot;vodafone&amp;quot;,&lt;br /&gt;
    &amp;quot;mcc&amp;quot;: &amp;quot;216&amp;quot;,&lt;br /&gt;
    &amp;quot;mnc&amp;quot;: &amp;quot;70&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;info&amp;quot;: {&lt;br /&gt;
    &amp;quot;appUpdateChannel&amp;quot;: &amp;quot;default&amp;quot;,&lt;br /&gt;
    &amp;quot;reason&amp;quot;: &amp;quot;ftu&amp;quot;,&lt;br /&gt;
    &amp;quot;appVersion&amp;quot;: &amp;quot;31.0a1&amp;quot;,&lt;br /&gt;
    &amp;quot;geoCountry&amp;quot;: &amp;quot;HU&amp;quot;,&lt;br /&gt;
    &amp;quot;appName&amp;quot;: &amp;quot;FirefoxOS&amp;quot;,&lt;br /&gt;
    &amp;quot;appBuildID&amp;quot;: &amp;quot;20140423185429&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;deviceinfo.firmware_revision&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.hardware&amp;quot;: &amp;quot;qcom&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.os&amp;quot;: &amp;quot;2.0.0.0-prerelease&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.product_model&amp;quot;: &amp;quot;GP-KEON&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.platform_version&amp;quot;: &amp;quot;31.0a1&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.platform_build_id&amp;quot;: &amp;quot;20140423185429&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.software&amp;quot;: &amp;quot;Boot2Gecko 2.0.0.0-prerelease&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.update_channel&amp;quot;: &amp;quot;default&amp;quot;,&lt;br /&gt;
  &amp;quot;devicePixelRatio&amp;quot;: 1,&lt;br /&gt;
  &amp;quot;screenWidth&amp;quot;: 320,&lt;br /&gt;
  &amp;quot;screenHeight&amp;quot;: 480,&lt;br /&gt;
  &amp;quot;ver&amp;quot;: 2&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Glossary===&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;activationTime&amp;lt;/code&amp;gt; || Timestamp indicating when the device was activated (user completes first-run experience).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pingTime&amp;lt;/code&amp;gt; || Timestamp indicating when the FTU ping was sent. The ping is sent as soon as possible after activation, although it may be delayed if no network is available.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;locale&amp;lt;/code&amp;gt; || Platform localization.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;network&amp;lt;/code&amp;gt; || Country and network information retrieved from the voice network connection at the time the ping is sent. Values should be null if no voice network is available. May be different from the SIM information if, eg.,  device is activated while roaming on another network. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;icc&amp;lt;/code&amp;gt; || Country and network information retrieved from the SIM card at the time the ping is sent. Values should be null if no SIM is present. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mcc&amp;lt;/code&amp;gt; || Mobile country code. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mnc&amp;lt;/code&amp;gt; || Mobile network code (identifies operator). &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;operator&amp;lt;/code&amp;gt; || Network operator name.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spn&amp;lt;/code&amp;gt; || SIM service provider name.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; || Fields added server-side, read from submission URL.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;appUpdateChannel&amp;lt;/code&amp;gt; || Copied from &amp;lt;code&amp;gt;deviceinfo.update_channel&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;appVersion&amp;lt;/code&amp;gt; || Copied from &amp;lt;code&amp;gt;deviceinfo.platform_version&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;appName&amp;lt;/code&amp;gt; || Name of app submitting ping (set to &amp;lt;code&amp;gt;FirefoxOS&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;appBuildID&amp;lt;/code&amp;gt; || Copied from &amp;lt;code&amp;gt;deviceinfo.platform_build_id&amp;lt;/code&amp;gt;. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;geoCountry&amp;lt;/code&amp;gt; || Country from which the ping was sent. Added server-side using GeoIP lookup.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;reason&amp;lt;/code&amp;gt; || A code identifying the type of ping. FTU is currently the only ping being sent. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo&amp;lt;/code&amp;gt; || Fields read off the device. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.firmware_revision&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.hardware&amp;lt;/code&amp;gt; || Chipset manufacturer. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.os&amp;lt;/code&amp;gt; || Gaia version. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.product_model&amp;lt;/code&amp;gt; || Device model name. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.platform_version&amp;lt;/code&amp;gt; || Gecko version. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.platform_build_id&amp;lt;/code&amp;gt; || Gecko build ID. Generated from a timestamp - first 8 digits give date. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.software&amp;lt;/code&amp;gt; || Name of Gaia distribution. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.update_channel&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;devicePixelRatio&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;screenWidth&amp;lt;/code&amp;gt; || Width of the screen in pixels. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;screenHeight&amp;lt;/code&amp;gt; || Height of the screen in pixels. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ver&amp;lt;/code&amp;gt; || Payload format version. Gets bumped when fields get added or changed. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Standardization of Device info==&lt;br /&gt;
Firefox OS has fields in device software which identify the sw and hw versions. These fields are modifiable by partners. The issue for us is that, without knowing what values to expect from each partner, it is difficult to map FTU ping data to (partner/OEM/market) segments in order to assess volume. We also see cases where the same device may get assigned slightly different product_model values by different partners, for example, requiring a manually-curated deduplication phase in our data processing. Ideally, this issue would be fixed at the source, by standardizing the field values.&lt;br /&gt;
&lt;br /&gt;
The proposal is to bring consistency to the fields.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Explanation !!Partner modifiable? Format!!Share with Moz for Certification?|| Comments&lt;br /&gt;
|-&lt;br /&gt;
|deviceinfo.os&lt;br /&gt;
|GAIA version. Eg: 2.0.0.0&lt;br /&gt;
|Y. Format needed:&amp;quot;X.Y.Z.W&amp;quot;&lt;br /&gt;
|Y&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deviceinfo.software&lt;br /&gt;
|Name of Gaia distribution.eg:&amp;quot;Boot2Gecko 2.0.0.0-prerelease&amp;quot;&lt;br /&gt;
|Y&lt;br /&gt;
|&lt;br /&gt;
|This field is not adding much value over the existing field &amp;quot;deviceinfo.os&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|deviceinfo.product_model&lt;br /&gt;
|String representing &amp;quot;model name&amp;quot;. It is part of the system properties (representing a particular HW chipset, PMIC) eg:&amp;quot;GP-KEON&amp;quot;, &amp;quot;Cloud FX&amp;quot;.&lt;br /&gt;
|Y. String .&lt;br /&gt;
|Y&lt;br /&gt;
|The important thing here is that the same devices use the same string across different partners/markets if we want to be able to group them together when analyzing this data.&lt;br /&gt;
|-&lt;br /&gt;
|deviceinfo.platform_version&lt;br /&gt;
|Gecko version eg: &amp;quot;31.0a1&amp;quot;,&amp;quot;28.1&amp;quot;&lt;br /&gt;
|N&lt;br /&gt;
|N&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deviceinfo.platform_build_id&lt;br /&gt;
|Timestamp of the final build_id.eg: &amp;quot;20140423185429&amp;quot;. Could be used to filter out test devices&lt;br /&gt;
|Y&lt;br /&gt;
|Y&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deviceinfo.hardware&lt;br /&gt;
|&amp;quot;qcom&amp;quot;, &amp;quot;sp8810&amp;quot;. String representing the hw manufacturer and chipset&lt;br /&gt;
|Y. String.&lt;br /&gt;
|N&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|deviceinfo.update_channel&lt;br /&gt;
|String representing channel for updates. This is link to webpage for getting updates. historically this was used for &amp;quot;nightly&amp;quot;, &amp;quot;stable&amp;quot; etc.&lt;br /&gt;
Is this being used by customers? Currently, the examples are&amp;quot;release-zte&amp;quot;,&amp;quot;release-spreadtrum&amp;quot;&lt;br /&gt;
|Y&lt;br /&gt;
|N (Y?)&lt;br /&gt;
|Maybe this field should be standardized as well, with identifiers for partner/OEM/country. See below.&lt;br /&gt;
|-&lt;br /&gt;
|deviceinfo.firmware_revision 	&lt;br /&gt;
|revision of firmware&lt;br /&gt;
|N&lt;br /&gt;
|N&lt;br /&gt;
|Not populated for most devices&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Questions:&lt;br /&gt;
*There are two similar fields: os (GAIA version, &amp;quot;2.0.0.0&amp;quot;) and software (GAIA distribution, &amp;quot;Boot2Gecko 2.0.0.0&amp;quot;). Only difference is a string added ahead of the software. What is the reason for needing two fields?&lt;br /&gt;
*There does not seem to be a consistent identifier for 1.3T. Both 1.3 and 1.3T seem to have the same release number &amp;quot;1.3.0.0-prerelease&amp;quot;. Why is that?&lt;br /&gt;
*Is update_channel being used? This is link to webpage for getting updates. historically this was used for &amp;quot;nightly&amp;quot;, &amp;quot;stable&amp;quot; etc.&lt;br /&gt;
Is this being used by customers? Currently, the examples are&amp;quot;release-&lt;br /&gt;
**There don&#039;t seem to be consistent identifiers for partner, OEM, and launch country in the FTU payload. Maybe we should include these explicitly, as we generally want to segment according to these variables. It appears that this done in some cases using update_channel (eg. &amp;quot;release-tcl-DT-DE&amp;quot;). Maybe we should formally use update_channel for this, standardizing it and including it in the certification (eg. &amp;quot;&amp;lt;release|prerelease&amp;gt;-&amp;lt;partner&amp;gt;-&amp;lt;oem&amp;gt;-&amp;lt;market&amp;gt;&amp;quot;). &lt;br /&gt;
* Otherwise, does update_channel represent something else that would be inconsistent with this scheme?&lt;br /&gt;
&lt;br /&gt;
Here is  proposed information that partners have to share with us as part of the certification:&lt;br /&gt;
* &amp;quot;os&amp;quot; in format x.y.z.w.&lt;br /&gt;
* &amp;quot;product_model&amp;quot; for device model name&lt;br /&gt;
* &amp;quot;update_channel&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
==Testing tips==&lt;br /&gt;
&lt;br /&gt;
Testing the FTU ping can be tedious and time consuming with the default settings. Here&#039;s a few things you can do to make it better:&lt;br /&gt;
&lt;br /&gt;
* When using build.sh or make, set FTU_PING_URL to a local IP so you can monitor the http request, i.e: &amp;lt;tt&amp;gt;cd gaia; make FTU_PING_URL=... reset-gaia&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Set &amp;lt;tt&amp;gt;DEBUG = true&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;gaia/apps/system/js/ftu_ping.js&amp;lt;/tt&amp;gt; to see messages at various stages of the ping lifecycle, and the raw ping data when it is actually sent&lt;br /&gt;
* Change &amp;lt;tt&amp;gt;DEFAULT_TRY_INTERVAL&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;gaia/apps/system/js/ftu_ping.js&amp;lt;/tt&amp;gt; to something much smaller than 1 hour (i.e. 15 seconds)&lt;br /&gt;
&lt;br /&gt;
=App usage metrics=&lt;br /&gt;
&lt;br /&gt;
See [[FirefoxOS/Metrics/App Usage]]&lt;br /&gt;
&lt;br /&gt;
=High Level Requirements=&lt;br /&gt;
#Product Planning: Need to know the number of devices sold. This will help product decisions be data driven.&lt;br /&gt;
#User Benefit: knowing the following information will improve security updates and app functionality&lt;br /&gt;
## Build IDs, Country, Operator, OEM, Version of HW: These are needed for Device Updates and Security patches: When a bug is found, or a security risk is detected, they need to be sent as an update to the particular OEM, Operator. &lt;br /&gt;
##Screen Height, Width, Pixel density: This is needed for CoreApps development (Gallery, Camera, Dialer, Browser) and 3rd party apps. These apps need to know the screen sizes, resolutions that they would need to support.&lt;br /&gt;
&lt;br /&gt;
==Delta to what exists today in Marketplace Ping==&lt;br /&gt;
#Information:&lt;br /&gt;
##ActivationPing gives the total number of &amp;quot;sold&amp;quot;(activated) FFOS devices, whereas current ADI ping gives the number of devices connected to WiFi on a particular day&lt;br /&gt;
###Product planning needs the information about devices sold (ActivatioPing). Current ADI ping approximated devices active on a certain day on WiFi. Difference gives us an idea of retention of product, and engagement of user.. This will help us focus on what is causing the dropoff, investigate why certain markets are doing better/worse, and making data-driven investments in improving the retention &lt;br /&gt;
##Activation Ping has additional information on Build IDs, Country, Operator, OEM, Version of HW, Screen Size, Screen Height, Width, Pixel density. While the previous ADI ping contains the model of device. &lt;br /&gt;
#Reliability:&lt;br /&gt;
##Current Ping from 1.3 shows approx 5 devices reporting as of March 24th 2014. https://dataviz.mozilla.org/views/ADI_Ping_1_3/HistoricalADITrend#2&lt;br /&gt;
#Cost:&lt;br /&gt;
##From previous versions, Partners removed ADI ping due to cost concern. Activation Ping is sent once in lifetime of device, which should have allay cost concerns.&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics/App_Usage&amp;diff=1017996</id>
		<title>Firefox OS/Metrics/App Usage</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics/App_Usage&amp;diff=1017996"/>
		<updated>2014-09-24T17:25:19Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Requirements=&lt;br /&gt;
For all system and 3rd party apps, track:&lt;br /&gt;
# Total time that each app (by URL) has been actively been used (in the foreground while the screen is on)&lt;br /&gt;
# Counts for the number of times an app has been opened, closed, or crashed&lt;br /&gt;
# A list of apps that have been uninstalled since the last successful report&lt;br /&gt;
&lt;br /&gt;
=Design=&lt;br /&gt;
The App Updates Metrics (AUM) service actively collects usage information by hooking into several system events. The determination of running time of an app looks something like this:&lt;br /&gt;
&lt;br /&gt;
* When an app is opened, or the user switches to the homescreen, AUM marks it as the currently running app, and records the current time&lt;br /&gt;
* When the device is locked, the display goes to sleep, or another app is opened, AUM records the delta of the current time with the current app&#039;s start time&lt;br /&gt;
* When the device is unlocked after the display was sleeping, the current app&#039;s start time is reset to the current time so we don&#039;t record usage time while the screen was off/locked&lt;br /&gt;
* AUM also records installs, uninstalls, and and activity invocations (on activity URLs -- not running time) of apps&lt;br /&gt;
&lt;br /&gt;
When the device is idle and and any of these registered events occur:&lt;br /&gt;
* AUM will save the currently collected metrics to async storage&lt;br /&gt;
* If the device is also online and a specified interval has passed (default 24 hours), AUM will begin attemping to transmit the stored metrics to the Telemetry server&lt;br /&gt;
* If transmission fails, then a separate retry interval (default 1 hour) controls how often AUM will retry transmission until it is successful&lt;br /&gt;
&lt;br /&gt;
=Glossary=&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;apps&amp;lt;/code&amp;gt; || Usage for each app in this batch (these are not aggregates), keyed by the app&#039;s manifest URL&lt;br /&gt;
    {|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;installs&amp;lt;/code&amp;gt; || The number of app installs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;uninstalls&amp;lt;/code&amp;gt; || The number of app uninstalls&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;invocations&amp;lt;/code&amp;gt; || The number of times the app was started&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;usageTime&amp;lt;/code&amp;gt; || The total number of seconds the app was used&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceID&amp;lt;/code&amp;gt; || A randomly generated deviceID to help server side de-duplication. This is separate from any other ID in the system, including the FTU activation ping&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo&amp;lt;/code&amp;gt; ||&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;developer.menu.enabled&amp;lt;/code&amp;gt; || Whether or not this is a &#039;production&#039; build&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.platform_build_id&amp;lt;/code&amp;gt; || The timestamp that gecko was built&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.platform_version&amp;lt;/code&amp;gt; || The version string of gecko&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.update_channel&amp;lt;/code&amp;gt; || Update channel used for FxOS OTA updates&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;locale&amp;lt;/code&amp;gt; || Platform locale string, i.e. &#039;en-US&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; ||&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;devicePixelRatio&amp;lt;/code&amp;gt; || ratio of physical pixels to virtual pixels on the device&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;width&amp;lt;/code&amp;gt; || screen width in CSS pixels&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; || screen height in CSS pixels&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; || UNIX device timestamp of when this batch of metrics started recording&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop&amp;lt;/code&amp;gt; || UNIX device timestamp of when this batch of metrics stopped recording&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://fxos.telemetry.mozilla.org/submit/telemetry/metrics/FirefoxOS/appusage&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;apps&amp;quot;: {&lt;br /&gt;
        &amp;quot;app://verticalhome.gaiamobile.org/manifest.webapp&amp;quot;: {&lt;br /&gt;
            &amp;quot;activities&amp;quot;: {},&lt;br /&gt;
            &amp;quot;installs&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;invocations&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;uninstalls&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;usageTime&amp;quot;: 23&lt;br /&gt;
        }&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;deviceID&amp;quot;: &amp;quot;j2670k6q&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo&amp;quot;: {&lt;br /&gt;
        &amp;quot;developer.menu.enabled&amp;quot;: true,&lt;br /&gt;
        &amp;quot;deviceinfo.platform_build_id&amp;quot;: &amp;quot;20140902135234&amp;quot;,&lt;br /&gt;
        &amp;quot;deviceinfo.platform_version&amp;quot;: &amp;quot;34.0a1&amp;quot;,&lt;br /&gt;
        &amp;quot;deviceinfo.update_channel&amp;quot;: &amp;quot;unknown&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;locale&amp;quot;: &amp;quot;en-US&amp;quot;,&lt;br /&gt;
    &amp;quot;screen&amp;quot;: {&lt;br /&gt;
        &amp;quot;devicePixelRatio&amp;quot;: 1.5,&lt;br /&gt;
        &amp;quot;height&amp;quot;: 569,&lt;br /&gt;
        &amp;quot;width&amp;quot;: 320&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;start&amp;quot;: 1411567451826,&lt;br /&gt;
    &amp;quot;stop&amp;quot;: 1411577295717&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics/App_Usage&amp;diff=1016413</id>
		<title>Firefox OS/Metrics/App Usage</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics/App_Usage&amp;diff=1016413"/>
		<updated>2014-09-18T22:33:02Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: Created page with &amp;quot;=Requirements= For all system and 3rd party apps, track: # Total time that each app (by URL) has been actively been used (in the foreground while the screen is on) # Counts fo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Requirements=&lt;br /&gt;
For all system and 3rd party apps, track:&lt;br /&gt;
# Total time that each app (by URL) has been actively been used (in the foreground while the screen is on)&lt;br /&gt;
# Counts for the number of times an app has been opened, closed, or crashed&lt;br /&gt;
# A list of apps that have been uninstalled since the last successful report&lt;br /&gt;
&lt;br /&gt;
These metrics should be collected and submitted to our telemetry server periodically.&lt;br /&gt;
&lt;br /&gt;
=Example JSON payload=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
      start: timestamp of batch start time (in millisecond format),&lt;br /&gt;
      stop: timestamp of batch end time,&lt;br /&gt;
      deviceID: &amp;quot;0i9n4ffh&amp;quot; // a unique id used to link batches together,&lt;br /&gt;
      locale: &amp;quot;en_US&amp;quot; // the user&#039;s language from navigator.language,&lt;br /&gt;
      screen: {&lt;br /&gt;
        width: the screen width in css pixels,&lt;br /&gt;
        height: the screen height in css pixels,&lt;br /&gt;
        devicePixelRatio: device pixels per css pixel&lt;br /&gt;
      },&lt;br /&gt;
      deviceinfo: {&lt;br /&gt;
        &#039;deviceinfo.update_channel&#039;: update channel,&lt;br /&gt;
        &#039;deviceinfo.platform_version&#039;: gecko version number (I think)&lt;br /&gt;
        &#039;deviceinfo.platform_build_id&#039;: more version details,&lt;br /&gt;
        &#039;developer.menu.enabled&#039;: if true user probably has abnormal app usage patterns!&lt;br /&gt;
      },&lt;br /&gt;
      apps: {&lt;br /&gt;
         // the properties of this object are application origins and the values of those properties are&lt;br /&gt;
         // the usage data for those applications.  For example:&lt;br /&gt;
         &#039;homescreen.gaiamobile.org&#039;: {&lt;br /&gt;
           usageTime: total app usage time during this reporting period, in seconds&lt;br /&gt;
           invocations: number of times the app has been opened in this period&lt;br /&gt;
           installs: number of times this app has been installed in this period&lt;br /&gt;
           uninstalls: number of times this app has been uninstalled in this period&lt;br /&gt;
           activities: { // the activity handlers this app has invoked, and how many times&lt;br /&gt;
             &#039;gallery.gaiamobile.org&#039;: 1,    // gallery handled an activity once&lt;br /&gt;
             &#039;wallpaper.gaiamobile.org&#039;: 4   // wallpaper app handled activity 4 times&lt;br /&gt;
           }&lt;br /&gt;
         },&lt;br /&gt;
         // more app data here&lt;br /&gt;
      }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=992587</id>
		<title>Firefox OS/Metrics</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=992587"/>
		<updated>2014-06-25T22:18:09Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=FTU ping=&lt;br /&gt;
==Design of Activation Ping==&lt;br /&gt;
#Activation Ping is triggered through the first-time use experience / activation. &lt;br /&gt;
#Never pings again once it is successful (unless the phone&#039;s &amp;quot;userdata&amp;quot; partition is formatted through the recovery partition, but this is not a case we support generally, it means wiping all of the user&#039;s data)&lt;br /&gt;
#Can also be disabled, but requires extra work on top of disabling app updates or removing the Firefox marketplace app&lt;br /&gt;
==Details==&lt;br /&gt;
When a device is first activated, The FTU ping service sends a simple one-off HTTP request to our telemetry server. The HTTP request contains a JSON payload with some high level information about the device and network, but no unique hardware identifiers. A randomly generated pingID is sent to help with filtering on the server side, but this ID is discarded by the server once filtering has occurred (generally after 24 hours).&lt;br /&gt;
&lt;br /&gt;
Currently, the logic for the FTU ping is broken down like this:&lt;br /&gt;
# Unless the setting &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; is explicitly set to false, start the FTU ping service. If the setting is missing, or any other value, then the ping service is enabled.&lt;br /&gt;
# Lazily get or create a randomly generated pingID, which is used for server side filtering. This pingID is only generated once per device, and is discarded on the server side.&lt;br /&gt;
# Record the time the ping service started, to track the delta of time to a successful ping.&lt;br /&gt;
# Pull all relevant ping payload settings asynchronously.&lt;br /&gt;
# Create an interval timer to attempt a ping once an hour. This is configurable with &amp;lt;tt&amp;gt;ftu.pingTryInterval&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Check for availability of voice network information. If none is available, try again on the next interval. If this fails 24 times, then continue trying the ping until is successful. This is configurable in the setting &amp;lt;tt&amp;gt;ftu.pingMaxNetworkFails&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Send an HTTP request to &amp;lt;tt&amp;gt;FTU_PING_URL/PING_ID/ftu/FirefoxOS/VERSION/UPDATE_CHANNEL/BUILD_ID&amp;lt;/tt&amp;gt;. By default, the ping URL is https://fxos.telemetry.mozilla.org/submit/telemetry, and is configurable in the &amp;lt;tt&amp;gt;ftu.pingURL&amp;lt;/tt&amp;gt; setting, or via make with &amp;lt;tt&amp;gt;FTU_PING_URL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
### If the HTTP request succeeds, set &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; to false, and disable the interval timer. Otherwise, try again on the next interval.&lt;br /&gt;
&lt;br /&gt;
==Example payload and URL==&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tt&amp;gt;POST https://fxos.telemetry.mozilla.org/submit/telemetry/e426da9f-2a29-4e09-895b-c883903956cb/ftu/FirefoxOS/31.0a1/default/20140325104133&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activationTime&amp;quot;: 1398300000000,&lt;br /&gt;
  &amp;quot;pingTime&amp;quot;: 1398300000000,&lt;br /&gt;
  &amp;quot;locale&amp;quot;: &amp;quot;hu&amp;quot;,&lt;br /&gt;
  &amp;quot;network&amp;quot;: {&lt;br /&gt;
    &amp;quot;mcc&amp;quot;: &amp;quot;216&amp;quot;,&lt;br /&gt;
    &amp;quot;mnc&amp;quot;: &amp;quot;70&amp;quot;,&lt;br /&gt;
    &amp;quot;operator&amp;quot;: &amp;quot;vodafone HU vodafone&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;icc&amp;quot;: {&lt;br /&gt;
    &amp;quot;spn&amp;quot;: &amp;quot;vodafone&amp;quot;,&lt;br /&gt;
    &amp;quot;mcc&amp;quot;: &amp;quot;216&amp;quot;,&lt;br /&gt;
    &amp;quot;mnc&amp;quot;: &amp;quot;70&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;info&amp;quot;: {&lt;br /&gt;
    &amp;quot;appUpdateChannel&amp;quot;: &amp;quot;default&amp;quot;,&lt;br /&gt;
    &amp;quot;reason&amp;quot;: &amp;quot;ftu&amp;quot;,&lt;br /&gt;
    &amp;quot;appVersion&amp;quot;: &amp;quot;31.0a1&amp;quot;,&lt;br /&gt;
    &amp;quot;geoCountry&amp;quot;: &amp;quot;HU&amp;quot;,&lt;br /&gt;
    &amp;quot;appName&amp;quot;: &amp;quot;FirefoxOS&amp;quot;,&lt;br /&gt;
    &amp;quot;appBuildID&amp;quot;: &amp;quot;20140423185429&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;deviceinfo.firmware_revision&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.hardware&amp;quot;: &amp;quot;qcom&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.os&amp;quot;: &amp;quot;2.0.0.0-prerelease&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.product_model&amp;quot;: &amp;quot;GP-KEON&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.platform_version&amp;quot;: &amp;quot;31.0a1&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.platform_build_id&amp;quot;: &amp;quot;20140423185429&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.software&amp;quot;: &amp;quot;Boot2Gecko 2.0.0.0-prerelease&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.update_channel&amp;quot;: &amp;quot;default&amp;quot;,&lt;br /&gt;
  &amp;quot;devicePixelRatio&amp;quot;: 1,&lt;br /&gt;
  &amp;quot;screenWidth&amp;quot;: 320,&lt;br /&gt;
  &amp;quot;screenHeight&amp;quot;: 480,&lt;br /&gt;
  &amp;quot;ver&amp;quot;: 2&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Glossary===&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;activationTime&amp;lt;/code&amp;gt; || Timestamp indicating when the device was activated (user completes first-run experience).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pingTime&amp;lt;/code&amp;gt; || Timestamp indicating when the FTU ping was sent. The ping is sent as soon as possible after activation, although it may be delayed if no network is available.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;locale&amp;lt;/code&amp;gt; || Platform localization.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;network&amp;lt;/code&amp;gt; || Country and network information retrieved from the voice network connection at the time the ping is sent. Values should be null if no voice network is available. May be different from the SIM information if, eg.,  device is activated while roaming on another network. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;icc&amp;lt;/code&amp;gt; || Country and network information retrieved from the SIM card at the time the ping is sent. Values should be null if no SIM is present. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mcc&amp;lt;/code&amp;gt; || Mobile country code. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mnc&amp;lt;/code&amp;gt; || Mobile network code (identifies operator). &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;operator&amp;lt;/code&amp;gt; || Network operator name.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spn&amp;lt;/code&amp;gt; || SIM service provider name.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; || Fields added server-side, read from submission URL.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;appUpdateChannel&amp;lt;/code&amp;gt; || Copied from &amp;lt;code&amp;gt;deviceinfo.update_channel&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;appVersion&amp;lt;/code&amp;gt; || Copied from &amp;lt;code&amp;gt;deviceinfo.platform_version&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;appName&amp;lt;/code&amp;gt; || Name of app submitting ping (set to &amp;lt;code&amp;gt;FirefoxOS&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;appBuildID&amp;lt;/code&amp;gt; || Copied from &amp;lt;code&amp;gt;deviceinfo.platform_build_id&amp;lt;/code&amp;gt;. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;geoCountry&amp;lt;/code&amp;gt; || Country from which the ping was sent. Added server-side using GeoIP lookup.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;reason&amp;lt;/code&amp;gt; || A code identifying the type of ping. FTU is currently the only ping being sent. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo&amp;lt;/code&amp;gt; || Fields read off the device. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.firmware_revision&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.hardware&amp;lt;/code&amp;gt; || Chipset manufacturer. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.os&amp;lt;/code&amp;gt; || Gaia version. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.product_model&amp;lt;/code&amp;gt; || Device model name. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.platform_version&amp;lt;/code&amp;gt; || Gecko version. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.platform_build_id&amp;lt;/code&amp;gt; || Gecko build ID. Generated from a timestamp - first 8 digits give date. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.software&amp;lt;/code&amp;gt; || Name of Gaia distribution. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.update_channel&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;devicePixelRatio&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;screenWidth&amp;lt;/code&amp;gt; || Width of the screen in pixels. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;screenHeight&amp;lt;/code&amp;gt; || Height of the screen in pixels. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ver&amp;lt;/code&amp;gt; || Payload format version. Gets bumped when fields get added or changed. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Testing tips==&lt;br /&gt;
&lt;br /&gt;
Testing the FTU ping can be tedious and time consuming with the default settings. Here&#039;s a few things you can do to make it better:&lt;br /&gt;
&lt;br /&gt;
* When using build.sh or make, set FTU_PING_URL to a local IP so you can monitor the http request, i.e: &amp;lt;tt&amp;gt;cd gaia; make FTU_PING_URL=... reset-gaia&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Set &amp;lt;tt&amp;gt;DEBUG = true&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;gaia/apps/system/js/ftu_ping.js&amp;lt;/tt&amp;gt; to see messages at various stages of the ping lifecycle, and the raw ping data when it is actually sent&lt;br /&gt;
* Change &amp;lt;tt&amp;gt;DEFAULT_TRY_INTERVAL&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;gaia/apps/system/js/ftu_ping.js&amp;lt;/tt&amp;gt; to something much smaller than 1 hour (i.e. 15 seconds)&lt;br /&gt;
&lt;br /&gt;
=App usage metrics=&lt;br /&gt;
&lt;br /&gt;
We plan to collect basic usage information periodically about the system and 3rd party apps installed on FxOS devices&lt;br /&gt;
 &lt;br /&gt;
==Requirements==&lt;br /&gt;
For all system and 3rd party apps, track:&lt;br /&gt;
# Total time that each app (by URL) has been actively been used (in the foreground while the screen is on)&lt;br /&gt;
# Counts for the number of times an app has been opened, closed, or crashed&lt;br /&gt;
# A list of apps that have been uninstalled since the last successful report&lt;br /&gt;
&lt;br /&gt;
These metrics should be collected and submitted to our telemetry server periodically.&lt;br /&gt;
&lt;br /&gt;
=High Level Requirements=&lt;br /&gt;
#Product Planning: Need to know the number of devices sold. This will help product decisions be data driven.&lt;br /&gt;
#User Benefit: knowing the following information will improve security updates and app functionality&lt;br /&gt;
## Build IDs, Country, Operator, OEM, Version of HW: These are needed for Device Updates and Security patches: When a bug is found, or a security risk is detected, they need to be sent as an update to the particular OEM, Operator. &lt;br /&gt;
##Screen Height, Width, Pixel density: This is needed for CoreApps development (Gallery, Camera, Dialer, Browser) and 3rd party apps. These apps need to know the screen sizes, resolutions that they would need to support.&lt;br /&gt;
&lt;br /&gt;
==Delta to what exists today in Marketplace Ping==&lt;br /&gt;
#Information:&lt;br /&gt;
##ActivationPing gives the total number of &amp;quot;sold&amp;quot;(activated) FFOS devices, whereas current ADI ping gives the number of devices connected to WiFi on a particular day&lt;br /&gt;
###Product planning needs the information about devices sold (ActivatioPing). Current ADI ping approximated devices active on a certain day on WiFi. Difference gives us an idea of retention of product, and engagement of user.. This will help us focus on what is causing the dropoff, investigate why certain markets are doing better/worse, and making data-driven investments in improving the retention &lt;br /&gt;
##Activation Ping has additional information on Build IDs, Country, Operator, OEM, Version of HW, Screen Size, Screen Height, Width, Pixel density. While the previous ADI ping contains the model of device. &lt;br /&gt;
#Reliability:&lt;br /&gt;
##Current Ping from 1.3 shows approx 5 devices reporting as of March 24th 2014. https://dataviz.mozilla.org/views/ADI_Ping_1_3/HistoricalADITrend#2&lt;br /&gt;
#Cost:&lt;br /&gt;
##From previous versions, Partners removed ADI ping due to cost concern. Activation Ping is sent once in lifetime of device, which should have allay cost concerns.&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=992368</id>
		<title>Firefox OS/Metrics</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=992368"/>
		<updated>2014-06-25T16:23:34Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=FTU ping=&lt;br /&gt;
==Design of Activation Ping==&lt;br /&gt;
#Activation Ping is triggered through the first-time use experience / activation. &lt;br /&gt;
#Never pings again once it is successful (unless the phone&#039;s &amp;quot;userdata&amp;quot; partition is formatted through the recovery partition, but this is not a case we support generally, it means wiping all of the user&#039;s data)&lt;br /&gt;
#Can also be disabled, but requires extra work on top of disabling app updates or removing the Firefox marketplace app&lt;br /&gt;
==Details==&lt;br /&gt;
When a device is first activated, The FTU ping service sends a simple one-off HTTP request to our telemetry server. The HTTP request contains a JSON payload with some high level information about the device and network, but no unique hardware identifiers. A randomly generated pingID is sent to help with filtering on the server side, but this ID is discarded by the server once filtering has occurred (generally after 24 hours).&lt;br /&gt;
&lt;br /&gt;
Currently, the logic for the FTU ping is broken down like this:&lt;br /&gt;
# Unless the setting &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; is explicitly set to false, start the FTU ping service. If the setting is missing, or any other value, then the ping service is enabled.&lt;br /&gt;
# Lazily get or create a randomly generated pingID, which is used for server side filtering. This pingID is only generated once per device, and is discarded on the server side.&lt;br /&gt;
# Record the time the ping service started, to track the delta of time to a successful ping.&lt;br /&gt;
# Pull all relevant ping payload settings asynchronously.&lt;br /&gt;
# Create an interval timer to attempt a ping once an hour. This is configurable with &amp;lt;tt&amp;gt;ftu.pingTryInterval&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Check for availability of voice network information. If none is available, try again on the next interval. If this fails 24 times, then continue trying the ping until is successful. This is configurable in the setting &amp;lt;tt&amp;gt;ftu.pingMaxNetworkFails&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Send an HTTP request to &amp;lt;tt&amp;gt;FTU_PING_URL/PING_ID/ftu/FirefoxOS/VERSION/UPDATE_CHANNEL/BUILD_ID&amp;lt;/tt&amp;gt;. By default, the ping URL is https://fxos.telemetry.mozilla.org/submit/telemetry, and is configurable in the &amp;lt;tt&amp;gt;ftu.pingURL&amp;lt;/tt&amp;gt; setting, or via make with &amp;lt;tt&amp;gt;FTU_PING_URL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
### If the HTTP request succeeds, set &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; to false, and disable the interval timer. Otherwise, try again on the next interval.&lt;br /&gt;
&lt;br /&gt;
==Example payload and URL==&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tt&amp;gt;POST https://fxos.telemetry.mozilla.org/submit/telemetry/e426da9f-2a29-4e09-895b-c883903956cb/ftu/FirefoxOS/31.0a1/default/20140325104133&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;activationTime&amp;quot;: 1398300000000,&lt;br /&gt;
  &amp;quot;pingTime&amp;quot;: 1398300000000,&lt;br /&gt;
  &amp;quot;locale&amp;quot;: &amp;quot;hu&amp;quot;,&lt;br /&gt;
  &amp;quot;network&amp;quot;: {&lt;br /&gt;
    &amp;quot;mcc&amp;quot;: &amp;quot;216&amp;quot;,&lt;br /&gt;
    &amp;quot;mnc&amp;quot;: &amp;quot;70&amp;quot;,&lt;br /&gt;
    &amp;quot;operator&amp;quot;: &amp;quot;vodafone HU vodafone&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;icc&amp;quot;: {&lt;br /&gt;
    &amp;quot;spn&amp;quot;: &amp;quot;vodafone&amp;quot;,&lt;br /&gt;
    &amp;quot;mcc&amp;quot;: &amp;quot;216&amp;quot;,&lt;br /&gt;
    &amp;quot;mnc&amp;quot;: &amp;quot;70&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;info&amp;quot;: {&lt;br /&gt;
    &amp;quot;appUpdateChannel&amp;quot;: &amp;quot;default&amp;quot;,&lt;br /&gt;
    &amp;quot;reason&amp;quot;: &amp;quot;ftu&amp;quot;,&lt;br /&gt;
    &amp;quot;appVersion&amp;quot;: &amp;quot;31.0a1&amp;quot;,&lt;br /&gt;
    &amp;quot;geoCountry&amp;quot;: &amp;quot;HU&amp;quot;,&lt;br /&gt;
    &amp;quot;appName&amp;quot;: &amp;quot;FirefoxOS&amp;quot;,&lt;br /&gt;
    &amp;quot;appBuildID&amp;quot;: &amp;quot;20140423185429&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;deviceinfo.firmware_revision&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.hardware&amp;quot;: &amp;quot;qcom&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.os&amp;quot;: &amp;quot;2.0.0.0-prerelease&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.product_model&amp;quot;: &amp;quot;GP-KEON&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.platform_version&amp;quot;: &amp;quot;31.0a1&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.platform_build_id&amp;quot;: &amp;quot;20140423185429&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.software&amp;quot;: &amp;quot;Boot2Gecko 2.0.0.0-prerelease&amp;quot;,&lt;br /&gt;
  &amp;quot;deviceinfo.update_channel&amp;quot;: &amp;quot;default&amp;quot;,&lt;br /&gt;
  &amp;quot;devicePixelRatio&amp;quot;: 1,&lt;br /&gt;
  &amp;quot;screenWidth&amp;quot;: 320,&lt;br /&gt;
  &amp;quot;screenHeight&amp;quot;: 480,&lt;br /&gt;
  &amp;quot;ver&amp;quot;: 2&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Glossary===&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;activationTime&amp;lt;/code&amp;gt; || Timestamp indicating when the device was activated (user completes first-run experience).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pingTime&amp;lt;/code&amp;gt; || Timestamp indicating when the FTU ping was sent. The ping is sent as soon as possible after activation, although it may be delayed if no network is available.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;locale&amp;lt;/code&amp;gt; || Platform localization.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;network&amp;lt;/code&amp;gt; || Country and network information retrieved from the voice network connection at the time the ping is sent. Values should be null if no voice network is available. May be different from the SIM information if, eg.,  device is activated while roaming on another network. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;icc&amp;lt;/code&amp;gt; || Country and network information retrieved from the SIM card at the time the ping is sent. Values should be null if no SIM is present. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mcc&amp;lt;/code&amp;gt; || Mobile country code. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mnc&amp;lt;/code&amp;gt; || Mobile network code (identifies operator). &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;operator&amp;lt;/code&amp;gt; || Network operator name.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spn&amp;lt;/code&amp;gt; || SIM service provider name.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;info&amp;lt;/code&amp;gt; || Fields added server-side, read from submission URL.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;appUpdateChannel&amp;lt;/code&amp;gt; || Copied from &amp;lt;code&amp;gt;deviceinfo.update_channel&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;appVersion&amp;lt;/code&amp;gt; || Copied from &amp;lt;code&amp;gt;deviceinfo.platform_version&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;appName&amp;lt;/code&amp;gt; || Name of app submitting ping (set to &amp;lt;code&amp;gt;FirefoxOS&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;appBuildID&amp;lt;/code&amp;gt; || Copied from &amp;lt;code&amp;gt;deviceinfo.platform_build_id&amp;lt;/code&amp;gt;. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;geoCountry&amp;lt;/code&amp;gt; || Country from which the ping was sent. Added server-side using GeoIP lookup.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;reason&amp;lt;/code&amp;gt; || A code identifying the type of ping. FTU is currently the only ping being sent. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo&amp;lt;/code&amp;gt; || Fields read off the device. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.firmware_revision&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.hardware&amp;lt;/code&amp;gt; || Chipset manufacturer. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.os&amp;lt;/code&amp;gt; || Gaia version. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.product_model&amp;lt;/code&amp;gt; || Device model name. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.platform_version&amp;lt;/code&amp;gt; || Gecko version. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.platform_build_id&amp;lt;/code&amp;gt; || Gecko build ID. Generated from a timestamp - first 8 digits give date. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.software&amp;lt;/code&amp;gt; || Name of Gaia distribution. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deviceinfo.update_channel&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;devicePixelRatio&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;screenWidth&amp;lt;/code&amp;gt; || Width of the screen in pixels. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;screenHeight&amp;lt;/code&amp;gt; || Height of the screen in pixels. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ver&amp;lt;/code&amp;gt; || Payload format version. Gets bumped when fields get added or changed. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Testing tips==&lt;br /&gt;
&lt;br /&gt;
Testing the FTU ping can be tedious and time consuming with the default settings. Here&#039;s a few things you can do to make it better:&lt;br /&gt;
&lt;br /&gt;
* When using build.sh or make, set FTU_PING_URL to a local IP so you can monitor the http request, i.e: &amp;lt;tt&amp;gt;cd gaia; make FTU_PING_URL=... reset-gaia&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Set &amp;lt;tt&amp;gt;DEBUG = true&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;gaia/apps/system/js/ftu_ping.js&amp;lt;/tt&amp;gt; to see messages at various stages of the ping lifecycle, and the raw ping data when it is actually sent&lt;br /&gt;
* Change &amp;lt;tt&amp;gt;DEFAULT_TRY_INTERVAL&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;gaia/apps/system/js/ftu_ping.js&amp;lt;/tt&amp;gt; to something much smaller than 1 hour (i.e. 15 seconds)&lt;br /&gt;
&lt;br /&gt;
=App usage metrics=&lt;br /&gt;
&lt;br /&gt;
We plan to collect basic usage information periodically about the system and 3rd party apps installed on FxOS devices&lt;br /&gt;
 &lt;br /&gt;
==Requirements==&lt;br /&gt;
For all system and 3rd party apps, track:&lt;br /&gt;
# Total time that each app has been actively been used (in the foreground while the screen is on)&lt;br /&gt;
# Counts for the number of times an app has been opened, closed, or crashed&lt;br /&gt;
# A list of apps that have been uninstalled&lt;br /&gt;
&lt;br /&gt;
These metrics should be collected and submitted to our telemetry server periodically.&lt;br /&gt;
&lt;br /&gt;
=High Level Requirements=&lt;br /&gt;
#Product Planning: Need to know the number of devices sold. This will help product decisions be data driven.&lt;br /&gt;
#User Benefit: knowing the following information will improve security updates and app functionality&lt;br /&gt;
## Build IDs, Country, Operator, OEM, Version of HW: These are needed for Device Updates and Security patches: When a bug is found, or a security risk is detected, they need to be sent as an update to the particular OEM, Operator. &lt;br /&gt;
##Screen Height, Width, Pixel density: This is needed for CoreApps development (Gallery, Camera, Dialer, Browser) and 3rd party apps. These apps need to know the screen sizes, resolutions that they would need to support.&lt;br /&gt;
&lt;br /&gt;
==Delta to what exists today in Marketplace Ping==&lt;br /&gt;
#Information:&lt;br /&gt;
##ActivationPing gives the total number of &amp;quot;sold&amp;quot;(activated) FFOS devices, whereas current ADI ping gives the number of devices connected to WiFi on a particular day&lt;br /&gt;
###Product planning needs the information about devices sold (ActivatioPing). Current ADI ping approximated devices active on a certain day on WiFi. Difference gives us an idea of retention of product, and engagement of user.. This will help us focus on what is causing the dropoff, investigate why certain markets are doing better/worse, and making data-driven investments in improving the retention &lt;br /&gt;
##Activation Ping has additional information on Build IDs, Country, Operator, OEM, Version of HW, Screen Size, Screen Height, Width, Pixel density. While the previous ADI ping contains the model of device. &lt;br /&gt;
#Reliability:&lt;br /&gt;
##Current Ping from 1.3 shows approx 5 devices reporting as of March 24th 2014. https://dataviz.mozilla.org/views/ADI_Ping_1_3/HistoricalADITrend#2&lt;br /&gt;
#Cost:&lt;br /&gt;
##From previous versions, Partners removed ADI ping due to cost concern. Activation Ping is sent once in lifetime of device, which should have allay cost concerns.&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=965135</id>
		<title>Firefox OS/Metrics</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=965135"/>
		<updated>2014-04-15T21:19:50Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: /* Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=FTU ping=&lt;br /&gt;
==Design of Activation Ping==&lt;br /&gt;
#Activation Ping is triggered through the first-time use experience / activation. &lt;br /&gt;
#Never pings again once it is successful (unless the phone&#039;s &amp;quot;userdata&amp;quot; partition is formatted through the recovery partition, but this is not a case we support generally, it means wiping all of the user&#039;s data)&lt;br /&gt;
#Can also be disabled, but requires extra work on top of disabling app updates or removing the Firefox marketplace app&lt;br /&gt;
==Details==&lt;br /&gt;
When a device is first activated, The FTU ping service sends a simple one-off HTTP request to our telemetry server. The HTTP request contains a JSON payload with some high level information about the device and network, but no unique hardware identifiers. A randomly generated pingID is sent to help with filtering on the server side, but this ID is discarded by the server once filtering has occurred (generally after 24 hours).&lt;br /&gt;
&lt;br /&gt;
Currently, the logic for the FTU ping is broken down like this:&lt;br /&gt;
# Unless the setting &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; is explicitly set to false, start the FTU ping service. If the setting is missing, or any other value, then the ping service is enabled.&lt;br /&gt;
# Lazily get or create a randomly generated pingID, which is used for server side filtering. This pingID is only generated once per device, and is discarded on the server side.&lt;br /&gt;
# Record the time the ping service started, to track the delta of time to a successful ping.&lt;br /&gt;
# Pull all relevant ping payload settings asynchronously.&lt;br /&gt;
# Create an interval timer to attempt a ping once an hour. This is configurable with &amp;lt;tt&amp;gt;ftu.pingTryInterval&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Check for availability of voice network information. If none is available, try again on the next interval. If this fails 24 times, then continue trying the ping until is successful. This is configurable in the setting &amp;lt;tt&amp;gt;ftu.pingMaxNetworkFails&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Send an HTTP request to &amp;lt;tt&amp;gt;FTU_PING_URL/PING_ID/ftu/FirefoxOS/VERSION/UPDATE_CHANNEL/BUILD_ID&amp;lt;/tt&amp;gt;. By default, the ping URL is https://fxos.telemetry.mozilla.org/submit/telemetry, and is configurable in the &amp;lt;tt&amp;gt;ftu.pingURL&amp;lt;/tt&amp;gt; setting, or via make with &amp;lt;tt&amp;gt;FTU_PING_URL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
### If the HTTP request succeeds, set &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; to false, and disable the interval timer. Otherwise, try again on the next interval.&lt;br /&gt;
&lt;br /&gt;
==Example payload and URL==&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tt&amp;gt;POST https://fxos.telemetry.mozilla.org/submit/telemetry/e426da9f-2a29-4e09-895b-c883903956cb/ftu/FirefoxOS/31.0a1/default/20140325104133&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;activationTime&amp;quot;: 1395769944966,&lt;br /&gt;
    &amp;quot;devicePixelRatio&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;deviceinfo.firmware_revision&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.hardware&amp;quot;: &amp;quot;qcom&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.os&amp;quot;: &amp;quot;1.5.0.0-prerelease&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.platform_build_id&amp;quot;: &amp;quot;20140325104133&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.platform_version&amp;quot;: &amp;quot;31.0a1&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.product_model&amp;quot;: &amp;quot;ALCATEL ONE TOUCH FIRE&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.software&amp;quot;: &amp;quot;Boot2Gecko 1.5.0.0-prerelease&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.update_channel&amp;quot;: &amp;quot;default&amp;quot;,&lt;br /&gt;
    &amp;quot;icc&amp;quot;: {&lt;br /&gt;
        &amp;quot;mcc&amp;quot;: &amp;quot;310&amp;quot;,&lt;br /&gt;
        &amp;quot;mnc&amp;quot;: &amp;quot;410&amp;quot;,&lt;br /&gt;
        &amp;quot;spn&amp;quot;: null&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;locale&amp;quot;: &amp;quot;en-US&amp;quot;,&lt;br /&gt;
    &amp;quot;network&amp;quot;: {&lt;br /&gt;
        &amp;quot;mcc&amp;quot;: &amp;quot;310&amp;quot;,&lt;br /&gt;
        &amp;quot;mnc&amp;quot;: &amp;quot;410&amp;quot;,&lt;br /&gt;
        &amp;quot;operator&amp;quot;: &amp;quot;AT&amp;amp;T&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;pingID&amp;quot;: &amp;quot;e426da9f-2a29-4e09-895b-c883903956cb&amp;quot;,&lt;br /&gt;
    &amp;quot;pingTime&amp;quot;: 1395852542588,&lt;br /&gt;
    &amp;quot;screenHeight&amp;quot;: 480,&lt;br /&gt;
    &amp;quot;screenWidth&amp;quot;: 320&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing tips==&lt;br /&gt;
&lt;br /&gt;
Testing the FTU ping can be tedious and time consuming with the default settings. Here&#039;s a few things you can do to make it better:&lt;br /&gt;
&lt;br /&gt;
* When using build.sh or make, set FTU_PING_URL to a local IP so you can monitor the http request, i.e: &amp;lt;tt&amp;gt;cd gaia; make FTU_PING_URL=... reset-gaia&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Set &amp;lt;tt&amp;gt;DEBUG = true&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;gaia/apps/system/js/ftu_ping.js&amp;lt;/tt&amp;gt; to see messages at various stages of the ping lifecycle, and the raw ping data when it is actually sent&lt;br /&gt;
* Change &amp;lt;tt&amp;gt;DEFAULT_TRY_INTERVAL&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;gaia/apps/system/js/ftu_ping.js&amp;lt;/tt&amp;gt; to something much smaller than 1 hour (i.e. 15 seconds)&lt;br /&gt;
&lt;br /&gt;
=High Level Requirements=&lt;br /&gt;
#Product Planning: Need to know the number of devices sold. This will help product decisions be data driven.&lt;br /&gt;
#User Benefit: knowing the following information will improve security updates and app functionality&lt;br /&gt;
## Build IDs, Country, Operator, OEM, Version of HW: These are needed for Device Updates and Security patches: When a bug is found, or a security risk is detected, they need to be sent as an update to the particular OEM, Operator. &lt;br /&gt;
##Screen Height, Width, Pixel density: This is needed for CoreApps development (Gallery, Camera, Dialer, Browser) and 3rd party apps. These apps need to know the screen sizes, resolutions that they would need to support.&lt;br /&gt;
&lt;br /&gt;
==Delta to what exists today in Marketplace Ping==&lt;br /&gt;
#Information:&lt;br /&gt;
##ActivationPing gives the total number of &amp;quot;sold&amp;quot;(activated) FFOS devices, whereas current ADI ping gives the number of devices connected to WiFi on a particular day&lt;br /&gt;
###Product planning needs the information about devices sold (ActivatioPing). Current ADI ping approximated devices active on a certain day on WiFi. Difference gives us an idea of retention of product, and engagement of user.. This will help us focus on what is causing the dropoff, investigate why certain markets are doing better/worse, and making data-driven investments in improving the retention &lt;br /&gt;
##Activation Ping has additional information on Build IDs, Country, Operator, OEM, Version of HW, Screen Size, Screen Height, Width, Pixel density. While the previous ADI ping contains the model of device. &lt;br /&gt;
#Reliability:&lt;br /&gt;
##Current Ping from 1.3 shows approx 5 devices reporting as of March 24th 2014. https://dataviz.mozilla.org/views/ADI_Ping_1_3/HistoricalADITrend#2&lt;br /&gt;
#Cost:&lt;br /&gt;
##From previous versions, Partners removed ADI ping due to cost concern. Activation Ping is sent once in lifetime of device, which should have allay cost concerns.&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=960903</id>
		<title>Firefox OS/Metrics</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=960903"/>
		<updated>2014-04-03T22:37:53Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=FTU ping=&lt;br /&gt;
&lt;br /&gt;
When a device is first activated, The FTU ping service sends a simple one-off HTTP request to our telemetry server. The HTTP request contains a JSON payload with some high level information about the device and network, but no unique hardware identifiers. A randomly generated pingID is sent to help with filtering on the server side, but this ID is discarded by the server once filtering has occurred (generally after 24 hours).&lt;br /&gt;
&lt;br /&gt;
Currently, the logic for the FTU ping is broken down like this:&lt;br /&gt;
# Unless the setting &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; is explicitly set to false, start the FTU ping service. If the setting is missing, or any other value, then the ping service is enabled.&lt;br /&gt;
# Lazily get or create a randomly generated pingID, which is used for server side filtering. This pingID is only generated once per device, and is discarded on the server side.&lt;br /&gt;
# Record the time the ping service started, to track the delta of time to a successful ping.&lt;br /&gt;
# Pull all relevant ping payload settings asynchronously.&lt;br /&gt;
# Create an interval timer to attempt a ping once an hour. This is configurable with &amp;lt;tt&amp;gt;ftu.pingTryInterval&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Check for availability of voice network information. If none is available, try again on the next interval. If this fails 24 times, then continue trying the ping until is successful. This is configurable in the setting &amp;lt;tt&amp;gt;ftu.pingMaxNetworkFails&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Send an HTTP request to &amp;lt;tt&amp;gt;FTU_PING_URL/PING_ID/ftu/FirefoxOS/VERSION/UPDATE_CHANNEL/BUILD_ID&amp;lt;/tt&amp;gt;. By default, the ping URL is https://fxos.telemetry.mozilla.org, and is configurable in the &amp;lt;tt&amp;gt;ftu.pingURL&amp;lt;/tt&amp;gt; setting, or via make with &amp;lt;tt&amp;gt;FTU_PING_URL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
### If the HTTP request succeeds, set &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; to false, and disable the interval timer. Otherwise, try again on the next interval.&lt;br /&gt;
&lt;br /&gt;
==Example payload and URL==&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tt&amp;gt;POST https://fxos.telemetry.mozilla.org/submit/telemetry/e426da9f-2a29-4e09-895b-c883903956cb/ftu/FirefoxOS/31.0a1/default/20140325104133&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;activationTime&amp;quot;: 1395769944966,&lt;br /&gt;
    &amp;quot;devicePixelRatio&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;deviceinfo.firmware_revision&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.hardware&amp;quot;: &amp;quot;qcom&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.os&amp;quot;: &amp;quot;1.5.0.0-prerelease&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.platform_build_id&amp;quot;: &amp;quot;20140325104133&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.platform_version&amp;quot;: &amp;quot;31.0a1&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.product_model&amp;quot;: &amp;quot;ALCATEL ONE TOUCH FIRE&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.software&amp;quot;: &amp;quot;Boot2Gecko 1.5.0.0-prerelease&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.update_channel&amp;quot;: &amp;quot;default&amp;quot;,&lt;br /&gt;
    &amp;quot;icc&amp;quot;: {&lt;br /&gt;
        &amp;quot;mcc&amp;quot;: &amp;quot;310&amp;quot;,&lt;br /&gt;
        &amp;quot;mnc&amp;quot;: &amp;quot;410&amp;quot;,&lt;br /&gt;
        &amp;quot;spn&amp;quot;: null&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;locale&amp;quot;: &amp;quot;en-US&amp;quot;,&lt;br /&gt;
    &amp;quot;network&amp;quot;: {&lt;br /&gt;
        &amp;quot;mcc&amp;quot;: &amp;quot;310&amp;quot;,&lt;br /&gt;
        &amp;quot;mnc&amp;quot;: &amp;quot;410&amp;quot;,&lt;br /&gt;
        &amp;quot;operator&amp;quot;: &amp;quot;AT&amp;amp;T&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;pingID&amp;quot;: &amp;quot;e426da9f-2a29-4e09-895b-c883903956cb&amp;quot;,&lt;br /&gt;
    &amp;quot;pingTime&amp;quot;: 1395852542588,&lt;br /&gt;
    &amp;quot;screenHeight&amp;quot;: 480,&lt;br /&gt;
    &amp;quot;screenWidth&amp;quot;: 320&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing tips==&lt;br /&gt;
&lt;br /&gt;
Testing the FTU ping can be tedious and time consuming with the default settings. Here&#039;s a few things you can do to make it better:&lt;br /&gt;
&lt;br /&gt;
* When using build.sh or make, set FTU_PING_URL to a local IP so you can monitor the http request, i.e: &amp;lt;tt&amp;gt;cd gaia; make FTU_PING_URL=... reset-gaia&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Set &amp;lt;tt&amp;gt;DEBUG = true&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;gaia/apps/system/js/ftu_ping.js&amp;lt;/tt&amp;gt; to see messages at various stages of the ping lifecycle, and the raw ping data when it is actually sent&lt;br /&gt;
* Change &amp;lt;tt&amp;gt;DEFAULT_TRY_INTERVAL&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;gaia/apps/system/js/ftu_ping.js&amp;lt;/tt&amp;gt; to something much smaller than 1 hour (i.e. 15 seconds)&lt;br /&gt;
&lt;br /&gt;
=Phase 1=&lt;br /&gt;
==Requirements==&lt;br /&gt;
#Product Planning: Need to know the number of devices sold. This will help product decisions be data driven.&lt;br /&gt;
#User Benefit: knowing the following information will improve security updates and app functionality&lt;br /&gt;
## Build IDs, Country, Operator, OEM, Version of HW: These are needed for Device Updates and Security patches: When a bug is found, or a security risk is detected, they need to be sent as an update to the particular OEM, Operator. &lt;br /&gt;
##Screen Height, Width, Pixel density: This is needed for CoreApps development (Gallery, Camera, Dialer, Browser) and 3rd party apps. These apps need to know the screen sizes, resolutions that they would need to support.&lt;br /&gt;
&lt;br /&gt;
==Design of Activation Ping==&lt;br /&gt;
#Activation Ping is triggered through the first-time use experience / activation. Will automatically retry until it is successful (on a 1 hour interval)&lt;br /&gt;
#Never pings again once it is successful (unless the phone&#039;s &amp;quot;userdata&amp;quot; partition is formatted through the recovery partition, but this is not a case we support generally, it means wiping all of the user&#039;s data)&lt;br /&gt;
#Can also be disabled, but requires extra work on top of disabling app updates or removing the Firefox marketplace app&lt;br /&gt;
==Delta to what exists today==&lt;br /&gt;
#Information:&lt;br /&gt;
##ActivationPing gives the total number of &amp;quot;sold&amp;quot;(activated) FFOS devices, whereas current ADI ping gives the number of devices connected to WiFi on a particular day&lt;br /&gt;
###Product planning needs the information about devices sold (ActivatioPing). Current ADI ping approximated devices active on a certain day on WiFi. Difference gives us an idea of retention of product, and engagement of user.. This will help us focus on what is causing the dropoff, investigate why certain markets are doing better/worse, and making data-driven investments in improving the retention &lt;br /&gt;
##Activation Ping has additional information on Build IDs, Country, Operator, OEM, Version of HW, Screen Size, Screen Height, Width, Pixel density. While the previous ADI ping contains the model of device. &lt;br /&gt;
#Reliability:&lt;br /&gt;
##Current Ping from 1.3 shows approx 5 devices reporting as of March 24th 2014. https://dataviz.mozilla.org/views/ADI_Ping_1_3/HistoricalADITrend#2&lt;br /&gt;
#Cost:&lt;br /&gt;
##From previous versions, Partners removed ADI ping due to cost concern. Activation Ping is sent once in a lifetime, which should allay cost concerns.&lt;br /&gt;
&lt;br /&gt;
=Phase 2=&lt;br /&gt;
==Requirements==&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=960080</id>
		<title>Firefox OS/Metrics</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=960080"/>
		<updated>2014-04-02T15:33:05Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=FTU ping=&lt;br /&gt;
&lt;br /&gt;
When a device is first activated, The FTU ping service sends a simple one-off HTTP request to our telemetry server. The HTTP request contains a JSON payload with some high level information about the device and network, but no unique hardware identifiers. A randomly generated pingID is sent to help with filtering on the server side, but this ID is discarded by the server once filtering has occurred (generally after 24 hours).&lt;br /&gt;
&lt;br /&gt;
Currently, the logic for the FTU ping is broken down like this:&lt;br /&gt;
# Unless the setting &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; is explicitly set to false, start the FTU ping service. If the setting is missing, or any other value, then the ping service is enabled.&lt;br /&gt;
# Lazily get or create a randomly generated pingID, which is used for server side filtering. This pingID is only generated once per device, and is discarded on the server side.&lt;br /&gt;
# Record the time the ping service started, to track the delta of time to a successful ping.&lt;br /&gt;
# Pull all relevant ping payload settings asynchronously.&lt;br /&gt;
# Create an interval timer to attempt a ping once an hour. This is configurable with &amp;lt;tt&amp;gt;ftu.pingTryInterval&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Check for availability of voice network information. If none is available, try again on the next interval. If this fails 24 times, then continue trying the ping until is successful. This is configurable in the setting &amp;lt;tt&amp;gt;ftu.pingMaxNetworkFails&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Send an HTTP request to &amp;lt;tt&amp;gt;FTU_PING_URL/PING_ID/ftu/FirefoxOS/VERSION/UPDATE_CHANNEL/BUILD_ID&amp;lt;/tt&amp;gt;. By default, the ping URL is https://fxos.telemetry.mozilla.org, and is configurable in the &amp;lt;tt&amp;gt;ftu.pingURL&amp;lt;/tt&amp;gt; setting, or via make with &amp;lt;tt&amp;gt;FTU_PING_URL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
### If the HTTP request succeeds, set &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; to false, and disable the interval timer. Otherwise, try again on the next interval.&lt;br /&gt;
&lt;br /&gt;
==Example payload and URL==&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tt&amp;gt;POST https://fxos.telemetry.mozilla.org/submit/telemetry/e426da9f-2a29-4e09-895b-c883903956cb/ftu/FirefoxOS/31.0a1/default/20140325104133&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;activationTime&amp;quot;: 1395769944966,&lt;br /&gt;
    &amp;quot;devicePixelRatio&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;deviceinfo.firmware_revision&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.hardware&amp;quot;: &amp;quot;qcom&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.os&amp;quot;: &amp;quot;1.5.0.0-prerelease&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.platform_build_id&amp;quot;: &amp;quot;20140325104133&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.platform_version&amp;quot;: &amp;quot;31.0a1&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.product_model&amp;quot;: &amp;quot;ALCATEL ONE TOUCH FIRE&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.software&amp;quot;: &amp;quot;Boot2Gecko 1.5.0.0-prerelease&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.update_channel&amp;quot;: &amp;quot;default&amp;quot;,&lt;br /&gt;
    &amp;quot;icc&amp;quot;: {&lt;br /&gt;
        &amp;quot;mcc&amp;quot;: &amp;quot;310&amp;quot;,&lt;br /&gt;
        &amp;quot;mnc&amp;quot;: &amp;quot;410&amp;quot;,&lt;br /&gt;
        &amp;quot;spn&amp;quot;: null&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;locale&amp;quot;: &amp;quot;en-US&amp;quot;,&lt;br /&gt;
    &amp;quot;network&amp;quot;: {&lt;br /&gt;
        &amp;quot;mcc&amp;quot;: &amp;quot;310&amp;quot;,&lt;br /&gt;
        &amp;quot;mnc&amp;quot;: &amp;quot;410&amp;quot;,&lt;br /&gt;
        &amp;quot;operator&amp;quot;: &amp;quot;AT&amp;amp;T&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;pingID&amp;quot;: &amp;quot;e426da9f-2a29-4e09-895b-c883903956cb&amp;quot;,&lt;br /&gt;
    &amp;quot;pingTime&amp;quot;: 1395852542588,&lt;br /&gt;
    &amp;quot;screenHeight&amp;quot;: 480,&lt;br /&gt;
    &amp;quot;screenWidth&amp;quot;: 320&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Phase 1=&lt;br /&gt;
==Requirements==&lt;br /&gt;
#Product Planning: Need to know the number of devices sold. This will help product decisions be data driven.&lt;br /&gt;
#User Benefit: knowing the following information will improve security updates and app functionality&lt;br /&gt;
## Build IDs, Country, Operator, OEM, Version of HW: These are needed for Device Updates and Security patches: When a bug is found, or a security risk is detected, they need to be sent as an update to the particular OEM, Operator. &lt;br /&gt;
##Screen Height, Width, Pixel density: This is needed for CoreApps development (Gallery, Camera, Dialer, Browser) and 3rd party apps. These apps need to know the screen sizes, resolutions that they would need to support.&lt;br /&gt;
&lt;br /&gt;
==Design of Activation Ping==&lt;br /&gt;
#Activation Ping is triggered through the first-time use experience / activation. Will automatically retry until it is successful (on a 1 hour interval)&lt;br /&gt;
#Never pings again once it is successful (unless the phone&#039;s &amp;quot;userdata&amp;quot; partition is formatted through the recovery partition, but this is not a case we support generally, it means wiping all of the user&#039;s data)&lt;br /&gt;
#Can also be disabled, but requires extra work on top of disabling app updates or removing the Firefox marketplace app&lt;br /&gt;
==Delta to what exists today==&lt;br /&gt;
#Information:&lt;br /&gt;
##ActivationPing gives the total number of &amp;quot;sold&amp;quot;(activated) FFOS devices, whereas current ADI ping gives the number of devices connected to WiFi on a particular day&lt;br /&gt;
###Product planning needs the information about devices sold (ActivatioPing). Current ADI ping approximated devices active on a certain day on WiFi. Difference gives us an idea of retention of product, and engagement of user.. This will help us focus on what is causing the dropoff, investigate why certain markets are doing better/worse, and making data-driven investments in improving the retention &lt;br /&gt;
##Activation Ping has additional information on Build IDs, Country, Operator, OEM, Version of HW, Screen Size, Screen Height, Width, Pixel density. While the previous ADI ping contains the model of device. &lt;br /&gt;
#Reliability:&lt;br /&gt;
##Current Ping from 1.3 shows approx 5 devices reporting as of March 24th 2014. https://dataviz.mozilla.org/views/ADI_Ping_1_3/HistoricalADITrend#2&lt;br /&gt;
#Cost:&lt;br /&gt;
##From previous versions, Partners removed ADI ping due to cost concern. Activation Ping is sent once in a lifetime, which should allay cost concerns.&lt;br /&gt;
&lt;br /&gt;
=Phase 2=&lt;br /&gt;
==Requirements==&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=960076</id>
		<title>Firefox OS/Metrics</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=960076"/>
		<updated>2014-04-02T15:31:19Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=FTU ping=&lt;br /&gt;
&lt;br /&gt;
When a device is first activated, The FTU ping service sends a simple one-off HTTP request to our telemetry server. The HTTP request contains a JSON payload with some high level information about the device and network, no unique hardware identifiers.&lt;br /&gt;
&lt;br /&gt;
Currently, the logic for the FTU ping is broken down like this:&lt;br /&gt;
# Unless the setting &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; is explicitly set to false, start the FTU ping service. If the setting is missing, or any other value, then the ping service is enabled.&lt;br /&gt;
# Lazily get or create a randomly generated pingID, which is used for server side filtering. This pingID is only generated once per device, and is discarded on the server side.&lt;br /&gt;
# Record the time the ping service started, to track the delta of time to a successful ping.&lt;br /&gt;
# Pull all relevant ping payload settings asynchronously.&lt;br /&gt;
# Create an interval timer to attempt a ping once an hour. This is configurable with &amp;lt;tt&amp;gt;ftu.pingTryInterval&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Check for availability of voice network information. If none is available, try again on the next interval. If this fails 24 times, then continue trying the ping until is successful. This is configurable in the setting &amp;lt;tt&amp;gt;ftu.pingMaxNetworkFails&amp;lt;/tt&amp;gt;.&lt;br /&gt;
## Send an HTTP request to &amp;lt;tt&amp;gt;FTU_PING_URL/PING_ID/ftu/FirefoxOS/VERSION/UPDATE_CHANNEL/BUILD_ID&amp;lt;/tt&amp;gt;. By default, the ping URL is https://fxos.telemetry.mozilla.org, and is configurable in the &amp;lt;tt&amp;gt;ftu.pingURL&amp;lt;/tt&amp;gt; setting, or via make with &amp;lt;tt&amp;gt;FTU_PING_URL&amp;lt;/tt&amp;gt;.&lt;br /&gt;
### If the HTTP request succeeds, set &amp;lt;tt&amp;gt;ftu.pingEnabled&amp;lt;/tt&amp;gt; to false, and disable the interval timer. Otherwise, try again on the next interval.&lt;br /&gt;
&lt;br /&gt;
==Example payload and URL==&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tt&amp;gt;POST https://fxos.telemetry.mozilla.org/submit/telemetry/e426da9f-2a29-4e09-895b-c883903956cb/ftu/FirefoxOS/31.0a1/default/20140325104133&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;activationTime&amp;quot;: 1395769944966,&lt;br /&gt;
    &amp;quot;devicePixelRatio&amp;quot;: 1,&lt;br /&gt;
    &amp;quot;deviceinfo.firmware_revision&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.hardware&amp;quot;: &amp;quot;qcom&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.os&amp;quot;: &amp;quot;1.5.0.0-prerelease&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.platform_build_id&amp;quot;: &amp;quot;20140325104133&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.platform_version&amp;quot;: &amp;quot;31.0a1&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.product_model&amp;quot;: &amp;quot;ALCATEL ONE TOUCH FIRE&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.software&amp;quot;: &amp;quot;Boot2Gecko 1.5.0.0-prerelease&amp;quot;,&lt;br /&gt;
    &amp;quot;deviceinfo.update_channel&amp;quot;: &amp;quot;default&amp;quot;,&lt;br /&gt;
    &amp;quot;icc&amp;quot;: {&lt;br /&gt;
        &amp;quot;mcc&amp;quot;: &amp;quot;310&amp;quot;,&lt;br /&gt;
        &amp;quot;mnc&amp;quot;: &amp;quot;410&amp;quot;,&lt;br /&gt;
        &amp;quot;spn&amp;quot;: null&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;locale&amp;quot;: &amp;quot;en-US&amp;quot;,&lt;br /&gt;
    &amp;quot;network&amp;quot;: {&lt;br /&gt;
        &amp;quot;mcc&amp;quot;: &amp;quot;310&amp;quot;,&lt;br /&gt;
        &amp;quot;mnc&amp;quot;: &amp;quot;410&amp;quot;,&lt;br /&gt;
        &amp;quot;operator&amp;quot;: &amp;quot;AT&amp;amp;T&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;pingID&amp;quot;: &amp;quot;e426da9f-2a29-4e09-895b-c883903956cb&amp;quot;,&lt;br /&gt;
    &amp;quot;pingTime&amp;quot;: 1395852542588,&lt;br /&gt;
    &amp;quot;screenHeight&amp;quot;: 480,&lt;br /&gt;
    &amp;quot;screenWidth&amp;quot;: 320&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Phase 1=&lt;br /&gt;
==Requirements==&lt;br /&gt;
#Product Planning: Need to know the number of devices sold. This will help product decisions be data driven.&lt;br /&gt;
#User Benefit: knowing the following information will improve security updates and app functionality&lt;br /&gt;
## Build IDs, Country, Operator, OEM, Version of HW: These are needed for Device Updates and Security patches: When a bug is found, or a security risk is detected, they need to be sent as an update to the particular OEM, Operator. &lt;br /&gt;
##Screen Height, Width, Pixel density: This is needed for CoreApps development (Gallery, Camera, Dialer, Browser) and 3rd party apps. These apps need to know the screen sizes, resolutions that they would need to support.&lt;br /&gt;
&lt;br /&gt;
==Design of Activation Ping==&lt;br /&gt;
#Activation Ping is triggered through the first-time use experience / activation. Will automatically retry until it is successful (on a 1 hour interval)&lt;br /&gt;
#Never pings again once it is successful (unless the phone&#039;s &amp;quot;userdata&amp;quot; partition is formatted through the recovery partition, but this is not a case we support generally, it means wiping all of the user&#039;s data)&lt;br /&gt;
#Can also be disabled, but requires extra work on top of disabling app updates or removing the Firefox marketplace app&lt;br /&gt;
==Delta to what exists today==&lt;br /&gt;
#Information:&lt;br /&gt;
##ActivationPing gives the total number of &amp;quot;sold&amp;quot;(activated) FFOS devices, whereas current ADI ping gives the number of devices connected to WiFi on a particular day&lt;br /&gt;
###Product planning needs the information about devices sold (ActivatioPing). Current ADI ping approximated devices active on a certain day on WiFi. Difference gives us an idea of retention of product, and engagement of user.. This will help us focus on what is causing the dropoff, investigate why certain markets are doing better/worse, and making data-driven investments in improving the retention &lt;br /&gt;
##Activation Ping has additional information on Build IDs, Country, Operator, OEM, Version of HW, Screen Size, Screen Height, Width, Pixel density. While the previous ADI ping contains the model of device. &lt;br /&gt;
#Reliability:&lt;br /&gt;
##Current Ping from 1.3 shows approx 5 devices reporting as of March 24th 2014. https://dataviz.mozilla.org/views/ADI_Ping_1_3/HistoricalADITrend#2&lt;br /&gt;
#Cost:&lt;br /&gt;
##From previous versions, Partners removed ADI ping due to cost concern. Activation Ping is sent once in a lifetime, which should allay cost concerns.&lt;br /&gt;
&lt;br /&gt;
=Phase 2=&lt;br /&gt;
==Requirements==&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=956305</id>
		<title>Firefox OS/Metrics</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Firefox_OS/Metrics&amp;diff=956305"/>
		<updated>2014-03-24T17:40:13Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: Created page with &amp;quot;This is a placeholder page for design / discussion around Metrics in FxOS&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a placeholder page for design / discussion around Metrics in FxOS&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=B2G/UpdateTesting&amp;diff=495634</id>
		<title>B2G/UpdateTesting</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=B2G/UpdateTesting&amp;diff=495634"/>
		<updated>2012-12-26T17:21:02Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This document is a WIP for the upcoming B2G update test automation in {{bug|821412}}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
When a system update is applied in B2G, it causes either a process restart (OTA) or a device reboot (FOTA), requiring special high level support from a testing framework to automate testing of the various stages of the update.&lt;br /&gt;
&lt;br /&gt;
To solve this problem, specialized Marionette based frontends have been written to solve two different use cases:&lt;br /&gt;
# A script based frontend for use by developers, and eventually TBPL&lt;br /&gt;
# A &amp;quot;continuous build&amp;quot; smoke testing frontend designed to automatically test updates between builds in a Continuous Integration environment.&lt;br /&gt;
&lt;br /&gt;
== Smoke Tests ==&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
&lt;br /&gt;
To get started, just make a directory that will store updates and flash scripts for each build, and inside it create a smoketest-config.json.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir $B2G_UPDATE_TESTDATA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example smoketest-config.json:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;devices&amp;quot;: {&lt;br /&gt;
    &amp;quot;unagi&amp;quot;: {&lt;br /&gt;
      &amp;quot;system_fs_type&amp;quot;: &amp;quot;ext4&amp;quot;,&lt;br /&gt;
      &amp;quot;system_location&amp;quot;: &amp;quot;/dev/block/mmcblk0p19&amp;quot;,&lt;br /&gt;
      &amp;quot;data_fs_type&amp;quot;: &amp;quot;ext4&amp;quot;,&lt;br /&gt;
      &amp;quot;data_location&amp;quot;: &amp;quot;/dev/block/mmcblk0p22&amp;quot;,&lt;br /&gt;
      &amp;quot;sdcard&amp;quot;: &amp;quot;/mnt/sdcard&amp;quot;,&lt;br /&gt;
      &amp;quot;sdcard_recovery&amp;quot;: &amp;quot;/sdcard&amp;quot;,&lt;br /&gt;
      &amp;quot;serials&amp;quot;: [&amp;quot;full_unagi&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;public_key&amp;quot;:   &amp;quot;/Users/mculpepper/Code/B2G-dev/build/target/product/security/testkey.x509.pem&amp;quot;,&lt;br /&gt;
  &amp;quot;private_key&amp;quot;:  &amp;quot;/Users/mculpepper/Code/B2G-dev/build/target/product/security/testkey.pk8&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== CI integration ====&lt;br /&gt;
&lt;br /&gt;
* Each CI build should have it&#039;s update staged for each test device:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ testing/marionette/update-smoketests/stage-update.py unagi $B2G_UPDATE_TESTDATA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Once at least 2 builds are staged, the smoketests can be run by passing a list of build IDs to test between:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ testing/marionette/update-smoketests/run-smoketests.py --build-dir $B2G_UPDATE_TESTDATA --run-dir $B2G_UPDATE_RUNDATA 20121219101023 20121220172647&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=B2G/UpdateTesting&amp;diff=495454</id>
		<title>B2G/UpdateTesting</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=B2G/UpdateTesting&amp;diff=495454"/>
		<updated>2012-12-21T23:33:21Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This document is a WIP for the upcoming B2G update test automation in {{bug|821412}}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Smoke Tests ==&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
&lt;br /&gt;
To get started, just make a directory that will store updates and flash scripts for each build, and inside it create a smoketest-config.json.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir $B2G_UPDATE_TESTDATA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example smoketest-config.json:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;devices&amp;quot;: {&lt;br /&gt;
    &amp;quot;unagi&amp;quot;: {&lt;br /&gt;
      &amp;quot;system_fs_type&amp;quot;: &amp;quot;ext4&amp;quot;,&lt;br /&gt;
      &amp;quot;system_location&amp;quot;: &amp;quot;/dev/block/mmcblk0p19&amp;quot;,&lt;br /&gt;
      &amp;quot;data_fs_type&amp;quot;: &amp;quot;ext4&amp;quot;,&lt;br /&gt;
      &amp;quot;data_location&amp;quot;: &amp;quot;/dev/block/mmcblk0p22&amp;quot;,&lt;br /&gt;
      &amp;quot;sdcard&amp;quot;: &amp;quot;/mnt/sdcard&amp;quot;,&lt;br /&gt;
      &amp;quot;sdcard_recovery&amp;quot;: &amp;quot;/sdcard&amp;quot;,&lt;br /&gt;
      &amp;quot;serials&amp;quot;: [&amp;quot;full_unagi&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;public_key&amp;quot;:   &amp;quot;/Users/mculpepper/Code/B2G-dev/build/target/product/security/testkey.x509.pem&amp;quot;,&lt;br /&gt;
  &amp;quot;private_key&amp;quot;:  &amp;quot;/Users/mculpepper/Code/B2G-dev/build/target/product/security/testkey.pk8&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== CI integration ====&lt;br /&gt;
&lt;br /&gt;
* Each CI build should have it&#039;s update staged for each test device:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ testing/marionette/update-smoketests/stage-update.py unagi $B2G_UPDATE_TESTDATA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Once at least 2 builds are staged, the smoketests can be run by passing a list of build IDs to test between:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ testing/marionette/update-smoketests/run-smoketests.py --build-dir $B2G_UPDATE_TESTDATA --run-dir $B2G_UPDATE_RUNDATA 20121219101023 20121220172647&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=B2G/UpdateTesting&amp;diff=495453</id>
		<title>B2G/UpdateTesting</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=B2G/UpdateTesting&amp;diff=495453"/>
		<updated>2012-12-21T23:32:36Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;This document is a WIP for the upcoming B2G update test automation in Bug 821412&amp;#039;&amp;#039;&amp;#039; {{bug|821412}}  == Smoke Tests ==  ==== Setup ====  To get started, just make a directory t...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This document is a WIP for the upcoming B2G update test automation in Bug 821412&#039;&#039;&#039;&lt;br /&gt;
{{bug|821412}}&lt;br /&gt;
&lt;br /&gt;
== Smoke Tests ==&lt;br /&gt;
&lt;br /&gt;
==== Setup ====&lt;br /&gt;
&lt;br /&gt;
To get started, just make a directory that will store updates and flash scripts for each build, and inside it create a smoketest-config.json.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir $B2G_UPDATE_TESTDATA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example smoketest-config.json:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;devices&amp;quot;: {&lt;br /&gt;
    &amp;quot;unagi&amp;quot;: {&lt;br /&gt;
      &amp;quot;system_fs_type&amp;quot;: &amp;quot;ext4&amp;quot;,&lt;br /&gt;
      &amp;quot;system_location&amp;quot;: &amp;quot;/dev/block/mmcblk0p19&amp;quot;,&lt;br /&gt;
      &amp;quot;data_fs_type&amp;quot;: &amp;quot;ext4&amp;quot;,&lt;br /&gt;
      &amp;quot;data_location&amp;quot;: &amp;quot;/dev/block/mmcblk0p22&amp;quot;,&lt;br /&gt;
      &amp;quot;sdcard&amp;quot;: &amp;quot;/mnt/sdcard&amp;quot;,&lt;br /&gt;
      &amp;quot;sdcard_recovery&amp;quot;: &amp;quot;/sdcard&amp;quot;,&lt;br /&gt;
      &amp;quot;serials&amp;quot;: [&amp;quot;full_unagi&amp;quot;]&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  &amp;quot;public_key&amp;quot;:   &amp;quot;/Users/mculpepper/Code/B2G-dev/build/target/product/security/testkey.x509.pem&amp;quot;,&lt;br /&gt;
  &amp;quot;private_key&amp;quot;:  &amp;quot;/Users/mculpepper/Code/B2G-dev/build/target/product/security/testkey.pk8&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== CI integration ====&lt;br /&gt;
&lt;br /&gt;
* Each CI build should have it&#039;s update staged for each test device:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ testing/marionette/update-smoketests/stage-update.py unagi $B2G_UPDATE_TESTDATA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Once at least 2 builds are staged, the smoketests can be run by passing a list of build IDs to test between:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ testing/marionette/update-smoketests/run-smoketests.py --build-dir $B2G_UPDATE_TESTDATA --run-dir $B2G_UPDATE_RUNDATA 20121219101023 20121220172647&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=B2G/Updating&amp;diff=492987</id>
		<title>B2G/Updating</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=B2G/Updating&amp;diff=492987"/>
		<updated>2012-12-10T19:48:12Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: /* Building updates for multiple software versions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page intends to help engineers set up an environment for updating B2G devices.  It focuses on low-level details of the updating tools and omits many higher-level topics.  The higher-level issues are covered in [http://example.com XXX other doc].&lt;br /&gt;
&lt;br /&gt;
Updating is the process of (i) on a build host, building incremental update packages from old version(s) to a new version; (ii) on the client, finding the right update to download; (iii) downloading the update; (iv) applying the update to existing files on the device.  Each of these items are covered below.&lt;br /&gt;
&lt;br /&gt;
== Types of updates ==&lt;br /&gt;
&lt;br /&gt;
B2G phones can update the entire system through &#039;&#039;&#039;FOTA updates&#039;&#039;&#039;.  The technology behind FOTA updates is shared with the Android project.  The areas that can be implemented through FOTA updates include the system partition, kernel, modem baseband, recovery image used for updating, or any other file on the device.&lt;br /&gt;
&lt;br /&gt;
B2G can also update &#039;&#039;just&#039;&#039; the Gecko and Gaia files on device, through a mechanism we call &#039;&#039;&#039;Gecko/Gaia OTA updates&#039;&#039;&#039;.  All of the Gecko and Gaia files are in the &amp;lt;code&amp;gt;/system/b2g&amp;lt;/code&amp;gt; directory on the device.  They compromise the core Gecko runtime and the device&#039;s user interface.&lt;br /&gt;
&lt;br /&gt;
=== FOTA updates ===&lt;br /&gt;
&lt;br /&gt;
* B2G is FOTA-client-neutral, but we recommend GOTA, and that&#039;s what&#039;s discussed here&lt;br /&gt;
* update.zip and update-script&lt;br /&gt;
* mar wrapping and signing&lt;br /&gt;
* librecovery, recovery image&lt;br /&gt;
&lt;br /&gt;
=== Gecko/Gaia OTA updates ===&lt;br /&gt;
&lt;br /&gt;
* update.mar and update.xml&lt;br /&gt;
* mar signing&lt;br /&gt;
* same technology used by Firefox for Desktop&lt;br /&gt;
* update binary&lt;br /&gt;
&lt;br /&gt;
== Building updates for multiple software versions ==&lt;br /&gt;
&lt;br /&gt;
Since we support both OTA and FOTA updates in FirefoxOS, we have tools to help in the generation of both. At a high level, the process looks like this for each build:&lt;br /&gt;
&lt;br /&gt;
# Generate a complete OTA update MAR for the contents of /system/b2g&lt;br /&gt;
# Generate an incremental OTA update MAR by providing the previous version&#039;s complete OTA update MAR&lt;br /&gt;
# Generate a complete FOTA update zip and target files zip for the device partitions&lt;br /&gt;
# Generate an incremental FOTA update zip by providing the previous version&#039;s target files zip&lt;br /&gt;
# Wrap the complete (and/or) incremental FOTA update zips in a MAR for FxOS delivery&lt;br /&gt;
# Deploy OTA / FOTA MAR(s) to appropriate locations for hosting &lt;br /&gt;
&lt;br /&gt;
=== Generating a complete OTA update MAR ===&lt;br /&gt;
Use the &amp;lt;tt&amp;gt;gecko-update-full&amp;lt;/tt&amp;gt; target to generate a complete update MAR for the last successful b2g build. This will place the MAR in &amp;lt;tt&amp;gt;$GECKO_OBJDIR/dist/b2g-update/b2g-gecko-update.mar&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./build.sh gecko-update-full&lt;br /&gt;
$ cp $GECKO_OBJDIR/dist/b2g-update/b2g-gecko-update.mar &amp;lt;dest&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generating an incremental OTA update MAR ===&lt;br /&gt;
Pass the previous build complete OTA update MAR (&amp;lt;tt&amp;gt;$FROM_MAR&amp;lt;/tt&amp;gt;) along with the current complete OTA update MAR (&amp;lt;tt&amp;gt;$TO_MAR&amp;lt;/tt&amp;gt;) to &amp;lt;tt&amp;gt;build-gecko-mar.py&amp;lt;/tt&amp;gt;, and it will generate an incremental MAR at &amp;lt;tt&amp;gt;$DEST_MAR&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./tools/update-tools/build-gecko-mar.py --from $FROM_MAR --to $TO_MAR $DEST_MAR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generating a complete FOTA update zip and target files zip ===&lt;br /&gt;
When performing a &amp;quot;standard&amp;quot; build, the AOSP build system will automatically generate an FOTA update.zip / target files zip, provided the kernel binary has been copied to the appropriate place under &amp;lt;tt&amp;gt;vendor&amp;lt;/tt&amp;gt;. This enables boot image, recovery image, and update.zip generation.&lt;br /&gt;
&lt;br /&gt;
The complete FOTA update zip lives under &amp;lt;tt&amp;gt;out/target/product/$DEVICE/$DEVICE-ota-$VARIANT.$USER.zip&amp;lt;/tt&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The target files zip lives under &amp;lt;tt&amp;gt;out/target/product/$DEVICE/obj/PACKAGING/target_files_intermediates/$DEVICE-target_files-$VARIANT.$USER.zip&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Variable values:&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;$DEVICE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Device name for the AOSP product&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;$VARIANT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;tt&amp;gt;eng&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt;, or &amp;lt;tt&amp;gt;userdebug&amp;lt;/tt&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;$USER&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;The build username&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generating an incremental FOTA update zip ===&lt;br /&gt;
Pass the previous build FOTA target files zip (&amp;lt;tt&amp;gt;$FROM_ZIP&amp;lt;/tt&amp;gt;) and the current FOTA target files zip (&amp;lt;tt&amp;gt;$TO_ZIP&amp;lt;/tt&amp;gt;) to &amp;lt;tt&amp;gt;build/tools/releasetools/ota_from_target_files&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./build/tools/releasetools/ota_from_target_files -v \&lt;br /&gt;
    -i $FROM_ZIP \&lt;br /&gt;
    -p out/host/$HOST_ARCH \&lt;br /&gt;
    -k $FOTA_SIGNING_KEY \&lt;br /&gt;
    $TO_ZIP \&lt;br /&gt;
    $DEST_ZIP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Variable values:&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #eeeeee&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;$FROM_ZIP&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;The previous FOTA target files zip&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;$TO_ZIP&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;The current FOTA target files zip&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;$DEST_ZIP&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;The destination incremental update zip&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;$HOST_ARCH&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;The host and arch combo (i.e. &amp;lt;tt&amp;gt;linux-x86&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;darwin-x86&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;$FOTA_SIGNING_KEY&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Path to the prefix for a private key and public cert for signing the update zip. &amp;lt;tt&amp;gt;$FOTA_SIGNING_ZIP.pk8&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;$FOTA_SIGNING_ZIP.x509.pem&amp;lt;/tt&amp;gt; should both exist on the filesystem&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wrapping a FOTA update zip in a MAR ===&lt;br /&gt;
FxOS uses MARs to deliver all updates, whether they are complete or incremental. To wrap a FOTA update zip (&amp;lt;tt&amp;gt;$UPDATE_ZIP&amp;lt;/tt&amp;gt;) in a MAR (&amp;lt;tt&amp;gt;$WRAPPED_MAR&amp;lt;/tt&amp;gt;), use &amp;lt;tt&amp;gt;tools/update-tools/build-fota-mar.py&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./tools/update-tools/build-fota-mar.py $UPDATE_ZIP --output=$WRAPPED_MAR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hosting updates (respectively, polling for updates on the client side) ==&lt;br /&gt;
&lt;br /&gt;
* interaction of server tools with build tools&lt;br /&gt;
** The build server uploads two files to the update server: the update.mar file and the application.ini.  For GOTA updates, the build server then kicks off a local script on the update server that generates update.xml based on these files.  For FOTA updates, update.xml generation is manual.&lt;br /&gt;
* layout of packages and manifests hosted on the server&lt;br /&gt;
** For GOTA updates, all .mar and application.ini files reside in a single directory that corresponds to the update channel (e.g., /data/update-channels/beta for the beta update channel); update.xml points to the newest copies of these files.&lt;br /&gt;
** For FOTA updates, only a single .mar, .ini, and update.xml file exist in a folder which corresponds to &#039;linear update&#039; url (see below), e.g., /data/update-channels/beta/$PRODUCT/$VERSION/$BUILDID.&lt;br /&gt;
* (for &amp;quot;linear updates&amp;quot;) how a client finds one and only one update&lt;br /&gt;
** When linear updates are enabled, the update url on the phone is set to http://host/%CHANNEL%/%PRODUCT_MODEL%/%VERSION%/%BUILD_ID%/update.xml.  Thus, each build has a unique update url, and only one update is ever posted to that location.  Thus, a phone cannot skip updates, and must apply, in sequence, every update that has been posted.&lt;br /&gt;
** In our testing, we have used a combination of linear updates and normal udpates; we use normal updates (which allow users to download only the most recent update) for GOTA updates, but switch to linear updates for FOTA updates, so that users cannot skip FOTA updates.  Performing this switch requires that the last GOTA update before a FOTA update contain an update url change, from e.g., http://host/beta/update.xml to http://host/%CHANNEL%/%PRODUCT_MODEL%/%VERSION%/%BUILD_ID%/update.xml.&lt;br /&gt;
&lt;br /&gt;
== Downloading and applying updates ==&lt;br /&gt;
&lt;br /&gt;
* poll for update manifest (update.xml)&lt;br /&gt;
* download signed mar&lt;br /&gt;
* verify, stage for being applied&lt;br /&gt;
* invoke &amp;lt;code&amp;gt;updater&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=B2G/Updating&amp;diff=492654</id>
		<title>B2G/Updating</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=B2G/Updating&amp;diff=492654"/>
		<updated>2012-12-07T21:39:28Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: /* Building updates for multiple software versions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page intends to help engineers set up an environment for updating B2G devices.  It focuses on low-level details of the updating tools and omits many higher-level topics.  The higher-level issues are covered in [http://example.com XXX other doc].&lt;br /&gt;
&lt;br /&gt;
Updating is the process of (i) on a build host, building incremental update packages from old version(s) to a new version; (ii) on the client, finding the right update to download; (iii) downloading the update; (iv) applying the update to existing files on the device.  Each of these items are covered below.&lt;br /&gt;
&lt;br /&gt;
== Types of updates ==&lt;br /&gt;
&lt;br /&gt;
B2G phones can update the entire system through &#039;&#039;&#039;FOTA updates&#039;&#039;&#039;.  The technology behind FOTA updates is shared with the Android project.  The areas that can be implemented through FOTA updates include the system partition, kernel, modem baseband, recovery image used for updating, or any other file on the device.&lt;br /&gt;
&lt;br /&gt;
B2G can also update &#039;&#039;just&#039;&#039; the Gecko and Gaia files on device, through a mechanism we call &#039;&#039;&#039;Gecko/Gaia OTA updates&#039;&#039;&#039;.  All of the Gecko and Gaia files are in the &amp;lt;code&amp;gt;/system/b2g&amp;lt;/code&amp;gt; directory on the device.  They compromise the core Gecko runtime and the device&#039;s user interface.&lt;br /&gt;
&lt;br /&gt;
=== FOTA updates ===&lt;br /&gt;
&lt;br /&gt;
* B2G is FOTA-client-neutral, but we recommend GOTA, and that&#039;s what&#039;s discussed here&lt;br /&gt;
* update.zip and update-script&lt;br /&gt;
* mar wrapping and signing&lt;br /&gt;
* librecovery, recovery image&lt;br /&gt;
&lt;br /&gt;
=== Gecko/Gaia OTA updates ===&lt;br /&gt;
&lt;br /&gt;
* update.mar and update.xml&lt;br /&gt;
* mar signing&lt;br /&gt;
* same technology used by Firefox for Desktop&lt;br /&gt;
* update binary&lt;br /&gt;
&lt;br /&gt;
== Building updates for multiple software versions ==&lt;br /&gt;
&lt;br /&gt;
* Initially, use the &amp;lt;tt&amp;gt;gecko-update-full&amp;lt;/tt&amp;gt; target to generate a complete update MAR for the last successful b2g build. This will place the MAR in &amp;lt;tt&amp;gt;$GECKO_OBJDIR/dist/b2g-update/b2g-gecko-update.mar&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./build.sh gecko-update-full&lt;br /&gt;
$ cp $GECKO_OBJDIR/dist/b2g-update/b2g-gecko-update.mar &amp;lt;dest&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For a complete FOTA update.zip, use the standard AOSP build hooks:&lt;br /&gt;
** Make sure the kernel binary is in the appropriate place under &amp;lt;tt&amp;gt;vendor&amp;lt;/tt&amp;gt; to enable boot image, recovery image, and update.zip generation&lt;br /&gt;
** Copy the update.zip that lives under &amp;lt;tt&amp;gt;out/target/product/$DEVICE/*.zip&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* To generate an incremental MAR update, you simply need two complete update MARs to generate it from. Pass their paths to the gecko MAR generation tool:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./tools/update-tools/build-gecko-mar.py --from $FROM_MAR --to $TO_MAR $DEST_MAR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* TODO: generate FOTA incremental zip&lt;br /&gt;
* TODO: signing packages&lt;br /&gt;
* this doc covers &amp;quot;linear updates&amp;quot;; can generate more if desired&lt;br /&gt;
&lt;br /&gt;
== Hosting updates (respectively, polling for updates on the client side) ==&lt;br /&gt;
&lt;br /&gt;
* interaction of server tools with build tools&lt;br /&gt;
** The build server uploads two files to the update server: the update.mar file and the application.ini.  For GOTA updates, the build server then kicks off a local script on the update server that generates update.xml based on these files.  For FOTA updates, update.xml generation is manual.&lt;br /&gt;
* layout of packages and manifests hosted on the server&lt;br /&gt;
** For GOTA updates, all .mar and application.ini files reside in a single directory that corresponds to the update channel (e.g., /data/update-channels/beta for the beta update channel); update.xml points to the newest copies of these files.&lt;br /&gt;
** For FOTA updates, only a single .mar, .ini, and update.xml file exist in a folder which corresponds to &#039;linear update&#039; url (see below), e.g., /data/update-channels/beta/$PRODUCT/$VERSION/$BUILDID.&lt;br /&gt;
* (for &amp;quot;linear updates&amp;quot;) how a client finds one and only one update&lt;br /&gt;
** When linear updates are enabled, the update url on the phone is set to http://host/%CHANNEL%/%PRODUCT_MODEL%/%VERSION%/%BUILD_ID%/update.xml.  Thus, each build has a unique update url, and only one update is ever posted to that location.  Thus, a phone cannot skip updates, and must apply, in sequence, every update that has been posted.&lt;br /&gt;
** In our testing, we have used a combination of linear updates and normal udpates; we use normal updates (which allow users to download only the most recent update) for GOTA updates, but switch to linear updates for FOTA updates, so that users cannot skip FOTA updates.  Performing this switch requires that the last GOTA update before a FOTA update contain an update url change, from e.g., http://host/beta/update.xml to http://host/%CHANNEL%/%PRODUCT_MODEL%/%VERSION%/%BUILD_ID%/update.xml.&lt;br /&gt;
&lt;br /&gt;
== Downloading and applying updates ==&lt;br /&gt;
&lt;br /&gt;
* poll for update manifest (update.xml)&lt;br /&gt;
* download signed mar&lt;br /&gt;
* verify, stage for being applied&lt;br /&gt;
* invoke &amp;lt;code&amp;gt;updater&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Gaia/System/Updates&amp;diff=459212</id>
		<title>Gaia/System/Updates</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Gaia/System/Updates&amp;diff=459212"/>
		<updated>2012-08-08T17:04:08Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: /* Open questions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
There are several types of FxOS updates:&lt;br /&gt;
&lt;br /&gt;
* Gonk (Kernel)&lt;br /&gt;
* Gecko&lt;br /&gt;
* Gaia&lt;br /&gt;
* Apps&lt;br /&gt;
** Core&lt;br /&gt;
** Pre-installed third party&lt;br /&gt;
** User-installed&lt;br /&gt;
*** Packaged&lt;br /&gt;
*** Non-packaged&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Foundational principles ==&lt;br /&gt;
&lt;br /&gt;
=== Security ===&lt;br /&gt;
The reason that we want to push updates pretty aggressively is in part security. One of the main sources of hacked computers is people running old versions of software with known security issues. Mozilla has for a long time been pushing as one of the main security benefits of Firefox our ability to update a large percentage of people&#039;s installed versions quickly.&lt;br /&gt;
&lt;br /&gt;
=== Data consumption control ===&lt;br /&gt;
One of the big benefits of Firefox OS that we are going to try to push is the ability to keep costly data transfers down. Hence we want to avoid large downloads while the user is paying a lot of money for each byte.&lt;br /&gt;
&lt;br /&gt;
=== Low friction ===&lt;br /&gt;
We reduce user friction by minimizing and automating updates as much as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== High level requirements ==&lt;br /&gt;
&lt;br /&gt;
* User can update system software&lt;br /&gt;
* User can update installed Apps&lt;br /&gt;
* User can be notified of available updates&lt;br /&gt;
* User can use device and apps while download is in progress&lt;br /&gt;
* User can be notified of insufficient disk space to download update&lt;br /&gt;
* User can be notified of insufficient battery life to conduct update&lt;br /&gt;
* User can review update file size before and after install&lt;br /&gt;
* User can review update details before and after install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Development/Software Channels ==&lt;br /&gt;
&lt;br /&gt;
* The requirement is to offer 3 channels for delivering the B2G software stack to users.  Each channel will include consistent versions of Gonk, Gecko and Gaia. The proposed channels are:&lt;br /&gt;
** Nightly&lt;br /&gt;
** Beta&lt;br /&gt;
*** Weekly stable builds that users can stay on to get the latest bugs fixes and feature enhancements.&lt;br /&gt;
** Release&lt;br /&gt;
* All phones manufactured should default to the Release channel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [https://etherpad.mozilla.org/B2G-software-updates B2G Software Updates]: Etherpad, Chris Lee&lt;br /&gt;
* [https://docs.google.com/spreadsheet/ccc?key=0AiBigu584YY7dGlNSlY0QzhJb3M5anRBa1gxalV0Y3c&amp;amp;pli=1#gid=10 Software Update]: Google Doc spreadsheet&lt;br /&gt;
* [https://docs.google.com/spreadsheet/ccc?key=0AiBigu584YY7dGlNSlY0QzhJb3M5anRBa1gxalV0Y3c&amp;amp;pli=1#gid=15 Software Update Policy]: Google Doc spreadsheet&lt;br /&gt;
* [https://bugzilla.mozilla.org/show_bug.cgi?id=780662 basecamp-update tracking bug]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Gonk (Kernel) Updates =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
* Changes to this layer in the software stack should only be made when it is absolutely necessary.  The requirement here is to ensure a stable build at this level of the software to minimize any issues with the phone at the Gaia level.  &lt;br /&gt;
* The update process proposal is take planned fixes here 1 time per quarter and only urgent security/showstopper bugs immediately as needed (and as per our agreement with the carrier partner).&lt;br /&gt;
* Based on a mutual agreement, the OEM or Mozilla will need to host the FOTA servers to support Kernel updates&lt;br /&gt;
* We cannot guarantee user data and device operability is restored to previous version in event of interrupted or corrupted install. &lt;br /&gt;
&lt;br /&gt;
== Open questions ==&lt;br /&gt;
&lt;br /&gt;
* OTA system updates are high risk because it is possible to brick the device in the process, correct? If so, how do we mitigate that risk?&lt;br /&gt;
* What is the sequence of events (eg: prompt user to restart device, whereupon install process runs?)&lt;br /&gt;
* Do we require the user to plug in the phone if battery is below X %?&lt;br /&gt;
** (sicking) This is somewhat technically doable, but a UX decision if we actually want to. What we can&#039;t do is estimate how good the battery is. I think an old &amp;quot;worn out&amp;quot; battery will fall much quicker in battery level than a new one. It&#039;s also hard to get a good estimate of how much battery is needed, but we can certainly require battery levels much higher than what&#039;s needed (say 30%).&lt;br /&gt;
* What prompts do we present to user?&lt;br /&gt;
* Do we have a rollback strategy for failed installs? Previous April discussion w/ cjones indicated no...&lt;br /&gt;
* What is time to install? Several minutes?&lt;br /&gt;
* Can we avoid user friction by downloading silently, and only during periods of user inactivity? Would not want to slow down web browsing while update processed in background, for example.&lt;br /&gt;
** (sicking) We don&#039;t have good mechanisms for giving lower priority or throttling individual channels in Necko right now. We technically could detect other downloads starting through and abort the update in that case, and then resume once we detect user inactivity.&lt;br /&gt;
* How many reboots are required in the process? Previous April discussion w/ cjones indicated two.&lt;br /&gt;
* Do we provide link to changelog so user can review update details before installing?&lt;br /&gt;
** (sicking) I think this is up to UX to set requirements. Seems technically feasible, but I&#039;m not convinced it&#039;s needed given that in every instance we&#039;ll likely want to apply the update for security reasons.&lt;br /&gt;
* How large are these updates?&lt;br /&gt;
* Do we check for available device storage before downloading? If insufficient, how do we mitigate?&lt;br /&gt;
* If the user powers down the device while an update is silently downloading in background, can we resume download later on?&lt;br /&gt;
** (sicking) Necko has the ability to download ranges, but this also needs server support. We certainly could require such support though.&lt;br /&gt;
* How much user agency do we provide over installs? Can they defer? For how long? What affordances do we make for out of date software?&lt;br /&gt;
* How can the user review the currently-installed version? From Settings?&lt;br /&gt;
&lt;br /&gt;
= Gecko Updates =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
* See the B2G Gecko update meta bug here: https://bugzilla.mozilla.org/show_bug.cgi?id=715816&lt;br /&gt;
* Gecko updates can happen more frequently than Kernel updates.  Based on input from carriers and OEMs, it likely updates at this layer will need to happen somewhere between the current Desktop 6-week train interval and ESR (every 42 weeks).&lt;br /&gt;
* The proposed requirement here is to offer regular updates every 18 weeks.  This frequency offers Mozilla and our partners the ability to update functionality on the device at a quicker pace than other competitor OS stacks (iOS and Android), but at the same time not overwhelm our Carrier partners who may not be used to updating software so frequently.&lt;br /&gt;
* Other requirements here are to offer a back-up instance of Gecko to ensure we can failover when necessary (if we somehow shipped an updated Gecko version that resulted in a bug).&lt;br /&gt;
* The updates at the Gecko level should happen silently where the user is not aware of when this is happening. &lt;br /&gt;
* The user will not be charged any carrier network fees for any Gecko update (as agreed upon by Telefonica) given they will be making these updates via a private APN. &lt;br /&gt;
* The user should be able to go into Settings &amp;gt; About to determine the version of the software the are using in order to debug and/or get support for any issue they encounter.&lt;br /&gt;
&lt;br /&gt;
== Open questions ==&lt;br /&gt;
&lt;br /&gt;
* What is the sequence of events (eg: prompt user to restart device, whereupon install process runs?)&lt;br /&gt;
** (marshall_law)&lt;br /&gt;
** For user prompting sequence / rules, see the requirements laid out by cjones in these bugs:&lt;br /&gt;
*** https://bugzilla.mozilla.org/show_bug.cgi?id=740720&lt;br /&gt;
*** https://bugzilla.mozilla.org/show_bug.cgi?id=740722&lt;br /&gt;
** Currently, the plan is to automatically download any Gecko updates to /data/local/updates. IIRC we are working w/ carriers to make sure this isn&#039;t billable data.&lt;br /&gt;
** After an update is downloaded, the update is staged in /system/b2g/updated, and the b2g process is cleanly shutdown (and then restarted by the system)&lt;br /&gt;
** Soon after bootup of the new b2g process, the updater runs again, copying the staged updates into /system/b2g to make them live.&lt;br /&gt;
** &amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;: The updater process will re-mount /system as read-write when it starts, and back to read-only when it exits. This will happen for both staging, and copying the staged files in place. In the event of a failure remounting /system as read-only (before exit), the device will be restarted, allowing the system to mount /system as read-only. See https://bugzilla.mozilla.org/show_bug.cgi?id=764683 for more details&lt;br /&gt;
** (/marshall_law)&lt;br /&gt;
&lt;br /&gt;
** How different is process from Gonk updates?&lt;br /&gt;
* How often should we check for Gecko update?&lt;br /&gt;
** Every 18 weeks, according to CLee&#039;s etherpad outline...&lt;br /&gt;
*** (sicking) This sounds too rare given that we ship Gecko updates every 6 weeks which always contain security updates. Usually we count on security researchers being able to reverse engineer those updates and create exploits for older versions of Gecko.&lt;br /&gt;
*** (marshall_law) IIRC the reasoning had to do with risk mitigation from carriers (it was a compromise of some kind?)&lt;br /&gt;
* Can we confirm that there will be a back-up instance of Gecko in event of failed updates? If so, what will sequence of it&#039;s application be?&lt;br /&gt;
** (marshall_law) That is the plan for stage 2 of the update mechanism. See [https://bugzilla.mozilla.org/show_bug.cgi?id=715816#c1 the list of stages proposed by cjones]&lt;br /&gt;
* Does being on 3G/Edge affect when we check for Gecko updates?&lt;br /&gt;
** Should not, since updates will be free OTA via Carrier&#039;s private APN.&lt;br /&gt;
* What—if anything—should we tell the user when a Gecko updated is detected? Should we behave differently if the user is on 3G/Edge connection when we detect that an update is available? &lt;br /&gt;
** Download update and apply silently in background, same as Gonk process? Might be too intrusive for these more frequent (18 weeks) Gecko updates?&lt;br /&gt;
** (marshall_law) see above&lt;br /&gt;
* Do we have the technical ability to download the update in the background and only notify the user once the new version is available?&lt;br /&gt;
** (marshall_law) yes&lt;br /&gt;
* Should we do anything special if the phone has been turned off for a few days and is then started?&lt;br /&gt;
** (marshall_law) IIRC, the existing Gecko update internals already have the logic for knowing how long it&#039;s been since the last update check. They should be able to detect this and do an update check as soon as the phone is on. We should confirm this, though.&lt;br /&gt;
* Do we need to have a mechanism for pushing extra-critical updates?&lt;br /&gt;
* Should we inform users about how big updates will be before downloading them? Do we have the ability to tell before doing the actual download?&lt;br /&gt;
** (marshall_law) We do have the ability -- the update MAR format specifies update size. We don&#039;t currently have plans to inform about the size of an update, but feel free to chime in on any of the bugs listed on how that might work.&lt;br /&gt;
* Do we require the user to plug in the phone if battery is below X %?&lt;br /&gt;
** (sicking) See answer for Gonk&lt;br /&gt;
* What prompts do we present to user?&lt;br /&gt;
** (marshall_law) see above&lt;br /&gt;
* Do we have a rollback strategy for failed installs? Previous April discussion w/ cjones indicated no...&lt;br /&gt;
** (marshall_law) we do in Phase 2, which I don&#039;t think we plan to have for v1. Will need to check w/ cjones to verify though&lt;br /&gt;
* What is time to install? Several minutes?&lt;br /&gt;
** (marshall_law) It all depends on the size of the update, the speed of the internal disk, the device hardware.. :) We might want to profile this in a few configurations..&lt;br /&gt;
* Can we avoid user friction by downloading silently, and only during periods of user inactivity? Would not want to slow down web browsing while update processed in background, for example.&lt;br /&gt;
** (marshall_law) yes, see the bugs about prompting&lt;br /&gt;
* How many device reboots are required in the process?&lt;br /&gt;
** (marshall_law) for Gecko, there shouldn&#039;t be any. only a process restart is required. the only time a restart might happen is if /system is somehow left in read-write after the updater is finished, as a fail safe.&lt;br /&gt;
* Do we provide link to changelog so user can review update details before installing?&lt;br /&gt;
** (marshall_law) good question! not currently.. I&#039;ve opened a new bug for this here: https://bugzilla.mozilla.org/show_bug.cgi?id=781233&lt;br /&gt;
** (sicking) See answer for Gonk&lt;br /&gt;
* How large are these updates?&lt;br /&gt;
** (marshall_law) they are binary diff&#039;d, so potentially not &amp;quot;huge&amp;quot;, but again this all depends on how big the update is. definitely smaller than if we were downloading fresh binaries.&lt;br /&gt;
* Do we check for available device storage before downloading? If insufficient, how do we mitigate?&lt;br /&gt;
* If the user powers down the device while an update is silently downloading in background, can we resume download later on?&lt;br /&gt;
** (sicking) See answer for Gonk&lt;br /&gt;
* How much user agency do we provide over installs? Can they defer? For how long? What affordances do we make for out of date Gecko?&lt;br /&gt;
* How can the user review the currently-installed version? From Settings?&lt;br /&gt;
&lt;br /&gt;
= Gaia Updates =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
* Gaia updates are related to anything that may modify the user interface and experience of the OS.  The update interval will also be every 18-weeks to align with Gecko updates.&lt;br /&gt;
* Updates that happen to the Core Apps (Dialer, SMS, Camera, etc.) will happen silently and users will not be charged any carrier network fees for Gaia System and Core App updates (similar to Gecko updates via a private APN). All core apps should be updated simultaneously so that a single B2G version represents the full stack.&lt;br /&gt;
&lt;br /&gt;
== Open questions ==&lt;br /&gt;
&lt;br /&gt;
* How much are we testing Core app updates before delivering these updates to the APN?&lt;br /&gt;
** This will be tested at the same level we are testing starndard 3G connectivity to the carrier network? From CLee&#039;s etherpad outline...&lt;br /&gt;
* Same questions from Gecko apply here:&lt;br /&gt;
* What is the sequence of events (eg: prompt user to restart device, whereupon install process runs?)&lt;br /&gt;
** How different is process from Gecko updates?&lt;br /&gt;
* How often should we check for updates?&lt;br /&gt;
* Will there be a back-up instance of Gaia in event of failed updates? If so, what will sequence of it&#039;s application be?&lt;br /&gt;
* Does being on 3G/Edge affect when we check for Gecko updates?&lt;br /&gt;
** Should not, since updates will be free OTA via Carrier&#039;s private APN.&lt;br /&gt;
* What—if anything—should we tell the user when a Gecko updated is detected? Should we behave differently if the user is on 3G/Edge connection when we detect that an update is available? &lt;br /&gt;
** Download update and apply silently in background?&lt;br /&gt;
* Do we have the technical ability to download the update in the background and only notify the user once the new version is available?&lt;br /&gt;
* Should we do anything special if the phone has been turned off for a few days and is then started?&lt;br /&gt;
* Do we need to have a mechanism for pushing extra-critical updates?&lt;br /&gt;
* Should we inform users about how big updates will be before downloading them? Do we have the ability to tell before doing the actual download?&lt;br /&gt;
* Do we require the user to plug in the phone if battery is below X %?&lt;br /&gt;
* What prompts do we present to user?&lt;br /&gt;
* Do we have a rollback strategy for failed installs? Previous April discussion w/ cjones indicated no...&lt;br /&gt;
* What is time to install? Several minutes?&lt;br /&gt;
* Can we avoid user friction by downloading silently, and only during periods of user inactivity? Would not want to slow down web browsing while update processed in background, for example.&lt;br /&gt;
* How many device reboots are required in the process?&lt;br /&gt;
* Do we provide link to changelog so user can review update details before installing?&lt;br /&gt;
* How large are these updates?&lt;br /&gt;
* Do we check for available device storage before downloading? If insufficient, how do we mitigate?&lt;br /&gt;
* If the user powers down the device while an update is silently downloading in background, can we resume download later on?&lt;br /&gt;
* How much user agency do we provide over installs? Can they defer? For how long? What affordances do we make for out of date Gaia + Core apps?&lt;br /&gt;
* How can the user review the currently-installed version? From Settings?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= App Updates =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Apps can be divided into two categories, each with their own update policies.&lt;br /&gt;
&lt;br /&gt;
* Core apps&lt;br /&gt;
* Pre-installed 3rd party apps&lt;br /&gt;
* User-installed apps&lt;br /&gt;
&lt;br /&gt;
== Core apps ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
&lt;br /&gt;
* Are all packaged apps&lt;br /&gt;
* Are pre-installed with the OS&lt;br /&gt;
* Are not user-removable&lt;br /&gt;
* Will survive a factory reset&lt;br /&gt;
** We ensure that Core apps are available after a factory reset by storing them in the System partition, in /system/b2g/webapps, instead of the usual /data/local/webapps.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
&lt;br /&gt;
* Core apps updates are bundled with Gecko updates, and are therefore governed by Gecko update policies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Pre-installed third party apps ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
&lt;br /&gt;
* These are 3rd party apps that come bundled with the phone.&lt;br /&gt;
* Are governed by same rules as User-installed apps.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
&lt;br /&gt;
* Are governed by same rules as User-installed apps.&lt;br /&gt;
&lt;br /&gt;
=== Open questions ===&lt;br /&gt;
&lt;br /&gt;
* Can these be uninstalled by the user&lt;br /&gt;
* What happens with these on a factory reset? Are they removed if installed? Re-spawn if uninstalled?&lt;br /&gt;
&lt;br /&gt;
== User-installed apps ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
&lt;br /&gt;
* Can be packaged or non-packaged&lt;br /&gt;
** Differences between packaged and non-packaged apps should generally not be surfaced to the user.&lt;br /&gt;
** For both types, we ensure that they stay up-to-date by checking for new versions at regular intervals.&lt;br /&gt;
* Updates are not be free and will incur data charges when on the carrier’s network.&lt;br /&gt;
&lt;br /&gt;
=== Non-packaged app updates ===&lt;br /&gt;
&lt;br /&gt;
* Non-packaged apps can specify the location of an offline-cache manifest to be loaded at install time. This offline-cache is subsequently updated.&lt;br /&gt;
* Update availability is checked by polling the developer website.&lt;br /&gt;
* We don&#039;t yet have the ability to tell a packaged app that an update is available.&lt;br /&gt;
&lt;br /&gt;
=== Packaged app updates ===&lt;br /&gt;
&lt;br /&gt;
* Update availability is checked by polling the store to see whether a new package available. &lt;br /&gt;
* We also have the ability to tell the app that an update is available.&lt;br /&gt;
&lt;br /&gt;
=== Deferred download ===&lt;br /&gt;
&lt;br /&gt;
* We have the ability to download and install app updates while the previous versions are running. The new version is made available on app restart. &lt;br /&gt;
&lt;br /&gt;
=== Open questions ===&lt;br /&gt;
&lt;br /&gt;
* How often should we check for app update?&lt;br /&gt;
** Once a day, only on WiFi?&lt;br /&gt;
* Does the frequency of usage affect how often we check for app updates?&lt;br /&gt;
* Does being on 3G/Edge affect when we check for app updates?&lt;br /&gt;
* What should we tell the user when an app update is detected?&lt;br /&gt;
* What should we tell the user when an app update is detected while the app is running, or should we rely on the app to do so? (note that while we can inform a running app about an update being available, we can&#039;t detect if the app is actually doing anything useful with that information)&lt;br /&gt;
* Should we behave differently if the user is on 3G/Edge connection when we detect that an update is available?&lt;br /&gt;
* Can the user inspect permissions enumerated in the app at the time of installation? Should we let the user know if an update expands the list of permissions?&lt;br /&gt;
* Do we need to have a mechanism for pushing extra-critical updates?&lt;br /&gt;
* Should we inform users about how big updates will be before downloading them?&lt;br /&gt;
** For un-packaged apps we generally can&#039;t tell how big an update is going to be. We could implement mechanisms for doing estimates, but we don&#039;t have anything right now&lt;br /&gt;
** For packaged apps we could implement such a mechanism, but it depends on the protocols we use (see below):&lt;br /&gt;
** What protocol should we use for detecting that an app update is available and downloading the update? This is a question we need to hammer out with the store people and the AMO people who have a lot of experience with updates for addons. The last two solutions involve new server-side APIs to be defined, but could potentially be more efficient. Three possibilities which have been discussed:&lt;br /&gt;
*** Check if the HTTP Etag of the package has changed by sending a conditional HTTP request with a If-None-Match header. This is what the work-in-progresss implementation in bug 772364 is doing.&lt;br /&gt;
*** Group all the applications by store, and send to each store the list to check with ones to update. This could also return hashes for the new packages which could be safely downloaded from mirrors.&lt;br /&gt;
*** If the user has authentication credentials with a store, use a store specific api to get a list of updated applications.&lt;br /&gt;
* Should we enable batch download of updates?&lt;br /&gt;
* Should we indicate download+install progress to user?&lt;br /&gt;
* Should we surface &amp;quot;this app has been updated&amp;quot; information to user?&lt;br /&gt;
* Do we create user configuration options? eg:&lt;br /&gt;
** Download and install apps in background.&lt;br /&gt;
* How do we ensure backwards compatibility for apps that cannot update? eg: User is on Edge connection and rarely accesses via WiFi. Would their apps stop working once they are out of date?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== mozApps API Changes ==&lt;br /&gt;
&lt;br /&gt;
To support the previously described behaviour, we need a couple of&lt;br /&gt;
additions to the content facing mozApps API, on the Application object:&lt;br /&gt;
&lt;br /&gt;
* Add a |readonly boolean removable| property.&lt;br /&gt;
* Add a |DOMEventListener onupdated| event listener to be notified when an application has been updated. This let a dashboard update any displayed item that could have changed (icon, application name, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Open questions: ===&lt;br /&gt;
&lt;br /&gt;
* Do we also need an event signaling that an update is available? &lt;br /&gt;
* Do we also need an event signaling that an update has been downloaded?&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=Gaia/System/Updates&amp;diff=459177</id>
		<title>Gaia/System/Updates</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=Gaia/System/Updates&amp;diff=459177"/>
		<updated>2012-08-08T16:27:45Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
There are several types of FxOS updates:&lt;br /&gt;
&lt;br /&gt;
* Gonk (Kernel)&lt;br /&gt;
* Gecko&lt;br /&gt;
* Gaia&lt;br /&gt;
* Apps&lt;br /&gt;
** Core&lt;br /&gt;
** Pre-installed third party&lt;br /&gt;
** User-installed&lt;br /&gt;
*** Packaged&lt;br /&gt;
*** Non-packaged&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Foundational principles ==&lt;br /&gt;
&lt;br /&gt;
=== Security ===&lt;br /&gt;
The reason that we want to push updates pretty aggressively is in part security. One of the main sources of hacked computers is people running old versions of software with known security issues. Mozilla has for a long time been pushing as one of the main security benefits of Firefox our ability to update a large percentage of people&#039;s installed versions quickly.&lt;br /&gt;
&lt;br /&gt;
=== Data consumption control ===&lt;br /&gt;
One of the big benefits of Firefox OS that we are going to try to push is the ability to keep costly data transfers down. Hence we want to avoid large downloads while the user is paying a lot of money for each byte.&lt;br /&gt;
&lt;br /&gt;
=== Low friction ===&lt;br /&gt;
We reduce user friction by minimizing and automating updates as much as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== High level requirements ==&lt;br /&gt;
&lt;br /&gt;
* User can update system software&lt;br /&gt;
* User can update installed Apps&lt;br /&gt;
* User can be notified of available updates&lt;br /&gt;
* User can use device and apps while download is in progress&lt;br /&gt;
* User can be notified of insufficient disk space to download update&lt;br /&gt;
* User can be notified of insufficient battery life to conduct update&lt;br /&gt;
* User can review update file size before and after install&lt;br /&gt;
* User can review update details before and after install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Development/Software Channels ==&lt;br /&gt;
&lt;br /&gt;
* The requirement is to offer 3 channels for delivering the B2G software stack to users.  Each channel will include consistent versions of Gonk, Gecko and Gaia. The proposed channels are:&lt;br /&gt;
** Nightly&lt;br /&gt;
** Beta&lt;br /&gt;
*** Weekly stable builds that users can stay on to get the latest bugs fixes and feature enhancements.&lt;br /&gt;
** Release&lt;br /&gt;
* All phones manufactured should default to the Release channel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [https://etherpad.mozilla.org/B2G-software-updates B2G Software Updates]: Etherpad, Chris Lee&lt;br /&gt;
* [https://docs.google.com/spreadsheet/ccc?key=0AiBigu584YY7dGlNSlY0QzhJb3M5anRBa1gxalV0Y3c&amp;amp;pli=1#gid=10 Software Update]: Google Doc spreadsheet&lt;br /&gt;
* [https://docs.google.com/spreadsheet/ccc?key=0AiBigu584YY7dGlNSlY0QzhJb3M5anRBa1gxalV0Y3c&amp;amp;pli=1#gid=15 Software Update Policy]: Google Doc spreadsheet&lt;br /&gt;
* [https://bugzilla.mozilla.org/show_bug.cgi?id=780662 basecamp-update tracking bug]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Gonk (Kernel) Updates =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
* Changes to this layer in the software stack should only be made when it is absolutely necessary.  The requirement here is to ensure a stable build at this level of the software to minimize any issues with the phone at the Gaia level.  &lt;br /&gt;
* The update process proposal is take planned fixes here 1 time per quarter and only urgent security/showstopper bugs immediately as needed (and as per our agreement with the carrier partner).&lt;br /&gt;
* Based on a mutual agreement, the OEM or Mozilla will need to host the FOTA servers to support Kernel updates&lt;br /&gt;
* We cannot guarantee user data and device operability is restored to previous version in event of interrupted or corrupted install. &lt;br /&gt;
&lt;br /&gt;
== Open questions ==&lt;br /&gt;
&lt;br /&gt;
* OTA system updates are high risk because it is possible to brick the device in the process, correct? If so, how do we mitigate that risk?&lt;br /&gt;
* What is the sequence of events (eg: prompt user to restart device, whereupon install process runs?)&lt;br /&gt;
* Do we require the user to plug in the phone if battery is below X %?&lt;br /&gt;
** (sicking) This is somewhat technically doable, but a UX decision if we actually want to. What we can&#039;t do is estimate how good the battery is. I think an old &amp;quot;worn out&amp;quot; battery will fall much quicker in battery level than a new one. It&#039;s also hard to get a good estimate of how much battery is needed, but we can certainly require battery levels much higher than what&#039;s needed (say 30%).&lt;br /&gt;
* What prompts do we present to user?&lt;br /&gt;
* Do we have a rollback strategy for failed installs? Previous April discussion w/ cjones indicated no...&lt;br /&gt;
* What is time to install? Several minutes?&lt;br /&gt;
* Can we avoid user friction by downloading silently, and only during periods of user inactivity? Would not want to slow down web browsing while update processed in background, for example.&lt;br /&gt;
** (sicking) We don&#039;t have good mechanisms for giving lower priority or throttling individual channels in Necko right now. We technically could detect other downloads starting through and abort the update in that case, and then resume once we detect user inactivity.&lt;br /&gt;
* How many reboots are required in the process? Previous April discussion w/ cjones indicated two.&lt;br /&gt;
* Do we provide link to changelog so user can review update details before installing?&lt;br /&gt;
** (sicking) I think this is up to UX to set requirements. Seems technically feasible, but I&#039;m not convinced it&#039;s needed given that in every instance we&#039;ll likely want to apply the update for security reasons.&lt;br /&gt;
* How large are these updates?&lt;br /&gt;
* Do we check for available device storage before downloading? If insufficient, how do we mitigate?&lt;br /&gt;
* If the user powers down the device while an update is silently downloading in background, can we resume download later on?&lt;br /&gt;
** (sicking) Necko has the ability to download ranges, but this also needs server support. We certainly could require such support though.&lt;br /&gt;
* How much user agency do we provide over installs? Can they defer? For how long? What affordances do we make for out of date software?&lt;br /&gt;
* How can the user review the currently-installed version? From Settings?&lt;br /&gt;
&lt;br /&gt;
= Gecko Updates =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
* See the B2G Gecko update meta bug here: https://bugzilla.mozilla.org/show_bug.cgi?id=715816&lt;br /&gt;
* Gecko updates can happen more frequently than Kernel updates.  Based on input from carriers and OEMs, it likely updates at this layer will need to happen somewhere between the current Desktop 6-week train interval and ESR (every 42 weeks).&lt;br /&gt;
* The proposed requirement here is to offer regular updates every 18 weeks.  This frequency offers Mozilla and our partners the ability to update functionality on the device at a quicker pace than other competitor OS stacks (iOS and Android), but at the same time not overwhelm our Carrier partners who may not be used to updating software so frequently.&lt;br /&gt;
* Other requirements here are to offer a back-up instance of Gecko to ensure we can failover when necessary (if we somehow shipped an updated Gecko version that resulted in a bug).&lt;br /&gt;
* The updates at the Gecko level should happen silently where the user is not aware of when this is happening. &lt;br /&gt;
* The user will not be charged any carrier network fees for any Gecko update (as agreed upon by Telefonica) given they will be making these updates via a private APN. &lt;br /&gt;
* The user should be able to go into Settings &amp;gt; About to determine the version of the software the are using in order to debug and/or get support for any issue they encounter.&lt;br /&gt;
&lt;br /&gt;
== Open questions ==&lt;br /&gt;
&lt;br /&gt;
* What is the sequence of events (eg: prompt user to restart device, whereupon install process runs?)&lt;br /&gt;
** How different is process from Gonk updates?&lt;br /&gt;
* How often should we check for Gecko update?&lt;br /&gt;
** Every 18 weeks, according to CLee&#039;s etherpad outline...&lt;br /&gt;
*** (sicking) This sounds too rare given that we ship Gecko updates every 6 weeks which always contain security updates. Usually we count on security researchers being able to reverse engineer those updates and create exploits for older versions of Gecko.&lt;br /&gt;
* Can we confirm that there will be a back-up instance of Gecko in event of failed updates? If so, what will sequence of it&#039;s application be?&lt;br /&gt;
* Does being on 3G/Edge affect when we check for Gecko updates?&lt;br /&gt;
** Should not, since updates will be free OTA via Carrier&#039;s private APN.&lt;br /&gt;
* What—if anything—should we tell the user when a Gecko updated is detected? Should we behave differently if the user is on 3G/Edge connection when we detect that an update is available? &lt;br /&gt;
** Download update and apply silently in background, same as Gonk process? Might be too intrusive for these more frequent (18 weeks) Gecko updates?&lt;br /&gt;
* Do we have the technical ability to download the update in the background and only notify the user once the new version is available?&lt;br /&gt;
* Should we do anything special if the phone has been turned off for a few days and is then started?&lt;br /&gt;
* Do we need to have a mechanism for pushing extra-critical updates?&lt;br /&gt;
* Should we inform users about how big updates will be before downloading them? Do we have the ability to tell before doing the actual download?&lt;br /&gt;
* Do we require the user to plug in the phone if battery is below X %?&lt;br /&gt;
** (sicking) See answer for Gonk&lt;br /&gt;
* What prompts do we present to user?&lt;br /&gt;
* Do we have a rollback strategy for failed installs? Previous April discussion w/ cjones indicated no...&lt;br /&gt;
* What is time to install? Several minutes?&lt;br /&gt;
* Can we avoid user friction by downloading silently, and only during periods of user inactivity? Would not want to slow down web browsing while update processed in background, for example.&lt;br /&gt;
* How many device reboots are required in the process?&lt;br /&gt;
* Do we provide link to changelog so user can review update details before installing?&lt;br /&gt;
** (sicking) See answer for Gonk&lt;br /&gt;
* How large are these updates?&lt;br /&gt;
* Do we check for available device storage before downloading? If insufficient, how do we mitigate?&lt;br /&gt;
* If the user powers down the device while an update is silently downloading in background, can we resume download later on?&lt;br /&gt;
** (sicking) See answer for Gonk&lt;br /&gt;
* How much user agency do we provide over installs? Can they defer? For how long? What affordances do we make for out of date Gecko?&lt;br /&gt;
* How can the user review the currently-installed version? From Settings?&lt;br /&gt;
&lt;br /&gt;
= Gaia Updates =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
* Gaia updates are related to anything that may modify the user interface and experience of the OS.  The update interval will also be every 18-weeks to align with Gecko updates.&lt;br /&gt;
* Updates that happen to the Core Apps (Dialer, SMS, Camera, etc.) will happen silently and users will not be charged any carrier network fees for Gaia System and Core App updates (similar to Gecko updates via a private APN). All core apps should be updated simultaneously so that a single B2G version represents the full stack.&lt;br /&gt;
&lt;br /&gt;
== Open questions ==&lt;br /&gt;
&lt;br /&gt;
* How much are we testing Core app updates before delivering these updates to the APN?&lt;br /&gt;
** This will be tested at the same level we are testing starndard 3G connectivity to the carrier network? From CLee&#039;s etherpad outline...&lt;br /&gt;
* Same questions from Gecko apply here:&lt;br /&gt;
* What is the sequence of events (eg: prompt user to restart device, whereupon install process runs?)&lt;br /&gt;
** How different is process from Gecko updates?&lt;br /&gt;
* How often should we check for updates?&lt;br /&gt;
* Will there be a back-up instance of Gaia in event of failed updates? If so, what will sequence of it&#039;s application be?&lt;br /&gt;
* Does being on 3G/Edge affect when we check for Gecko updates?&lt;br /&gt;
** Should not, since updates will be free OTA via Carrier&#039;s private APN.&lt;br /&gt;
* What—if anything—should we tell the user when a Gecko updated is detected? Should we behave differently if the user is on 3G/Edge connection when we detect that an update is available? &lt;br /&gt;
** Download update and apply silently in background?&lt;br /&gt;
* Do we have the technical ability to download the update in the background and only notify the user once the new version is available?&lt;br /&gt;
* Should we do anything special if the phone has been turned off for a few days and is then started?&lt;br /&gt;
* Do we need to have a mechanism for pushing extra-critical updates?&lt;br /&gt;
* Should we inform users about how big updates will be before downloading them? Do we have the ability to tell before doing the actual download?&lt;br /&gt;
* Do we require the user to plug in the phone if battery is below X %?&lt;br /&gt;
* What prompts do we present to user?&lt;br /&gt;
* Do we have a rollback strategy for failed installs? Previous April discussion w/ cjones indicated no...&lt;br /&gt;
* What is time to install? Several minutes?&lt;br /&gt;
* Can we avoid user friction by downloading silently, and only during periods of user inactivity? Would not want to slow down web browsing while update processed in background, for example.&lt;br /&gt;
* How many device reboots are required in the process?&lt;br /&gt;
* Do we provide link to changelog so user can review update details before installing?&lt;br /&gt;
* How large are these updates?&lt;br /&gt;
* Do we check for available device storage before downloading? If insufficient, how do we mitigate?&lt;br /&gt;
* If the user powers down the device while an update is silently downloading in background, can we resume download later on?&lt;br /&gt;
* How much user agency do we provide over installs? Can they defer? For how long? What affordances do we make for out of date Gaia + Core apps?&lt;br /&gt;
* How can the user review the currently-installed version? From Settings?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= App Updates =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Apps can be divided into two categories, each with their own update policies.&lt;br /&gt;
&lt;br /&gt;
* Core apps&lt;br /&gt;
* Pre-installed 3rd party apps&lt;br /&gt;
* User-installed apps&lt;br /&gt;
&lt;br /&gt;
== Core apps ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
&lt;br /&gt;
* Are all packaged apps&lt;br /&gt;
* Are pre-installed with the OS&lt;br /&gt;
* Are not user-removable&lt;br /&gt;
* Will survive a factory reset&lt;br /&gt;
** We ensure that Core apps are available after a factory reset by storing them in the System partition, in /system/b2g/webapps, instead of the usual /data/local/webapps.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
&lt;br /&gt;
* Core apps updates are bundled with Gecko updates, and are therefore governed by Gecko update policies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Pre-installed third party apps ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
&lt;br /&gt;
* These are 3rd party apps that come bundled with the phone.&lt;br /&gt;
* Are governed by same rules as User-installed apps.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
&lt;br /&gt;
* Are governed by same rules as User-installed apps.&lt;br /&gt;
&lt;br /&gt;
=== Open questions ===&lt;br /&gt;
&lt;br /&gt;
* Can these be uninstalled by the user&lt;br /&gt;
* What happens with these on a factory reset? Are they removed if installed? Re-spawn if uninstalled?&lt;br /&gt;
&lt;br /&gt;
== User-installed apps ==&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
&lt;br /&gt;
* Can be packaged or non-packaged&lt;br /&gt;
** Differences between packaged and non-packaged apps should generally not be surfaced to the user.&lt;br /&gt;
** For both types, we ensure that they stay up-to-date by checking for new versions at regular intervals.&lt;br /&gt;
* Updates are not be free and will incur data charges when on the carrier’s network.&lt;br /&gt;
&lt;br /&gt;
=== Non-packaged app updates ===&lt;br /&gt;
&lt;br /&gt;
* Non-packaged apps can specify the location of an offline-cache manifest to be loaded at install time. This offline-cache is subsequently updated.&lt;br /&gt;
* Update availability is checked by polling the developer website.&lt;br /&gt;
* We don&#039;t yet have the ability to tell a packaged app that an update is available.&lt;br /&gt;
&lt;br /&gt;
=== Packaged app updates ===&lt;br /&gt;
&lt;br /&gt;
* Update availability is checked by polling the store to see whether a new package available. &lt;br /&gt;
* We also have the ability to tell the app that an update is available.&lt;br /&gt;
&lt;br /&gt;
=== Deferred download ===&lt;br /&gt;
&lt;br /&gt;
* We have the ability to download and install app updates while the previous versions are running. The new version is made available on app restart. &lt;br /&gt;
&lt;br /&gt;
=== Open questions ===&lt;br /&gt;
&lt;br /&gt;
* How often should we check for app update?&lt;br /&gt;
** Once a day, only on WiFi?&lt;br /&gt;
* Does the frequency of usage affect how often we check for app updates?&lt;br /&gt;
* Does being on 3G/Edge affect when we check for app updates?&lt;br /&gt;
* What should we tell the user when an app update is detected?&lt;br /&gt;
* What should we tell the user when an app update is detected while the app is running, or should we rely on the app to do so? (note that while we can inform a running app about an update being available, we can&#039;t detect if the app is actually doing anything useful with that information)&lt;br /&gt;
* Should we behave differently if the user is on 3G/Edge connection when we detect that an update is available?&lt;br /&gt;
* Can the user inspect permissions enumerated in the app at the time of installation? Should we let the user know if an update expands the list of permissions?&lt;br /&gt;
* Do we need to have a mechanism for pushing extra-critical updates?&lt;br /&gt;
* Should we inform users about how big updates will be before downloading them?&lt;br /&gt;
** For un-packaged apps we generally can&#039;t tell how big an update is going to be. We could implement mechanisms for doing estimates, but we don&#039;t have anything right now&lt;br /&gt;
** For packaged apps we could implement such a mechanism, but it depends on the protocols we use (see below):&lt;br /&gt;
** What protocol should we use for detecting that an app update is available and downloading the update? This is a question we need to hammer out with the store people and the AMO people who have a lot of experience with updates for addons. The last two solutions involve new server-side APIs to be defined, but could potentially be more efficient. Three possibilities which have been discussed:&lt;br /&gt;
*** Check if the HTTP Etag of the package has changed by sending a conditional HTTP request with a If-None-Match header. This is what the work-in-progresss implementation in bug 772364 is doing.&lt;br /&gt;
*** Group all the applications by store, and send to each store the list to check with ones to update. This could also return hashes for the new packages which could be safely downloaded from mirrors.&lt;br /&gt;
*** If the user has authentication credentials with a store, use a store specific api to get a list of updated applications.&lt;br /&gt;
* Should we enable batch download of updates?&lt;br /&gt;
* Should we indicate download+install progress to user?&lt;br /&gt;
* Should we surface &amp;quot;this app has been updated&amp;quot; information to user?&lt;br /&gt;
* Do we create user configuration options? eg:&lt;br /&gt;
** Download and install apps in background.&lt;br /&gt;
* How do we ensure backwards compatibility for apps that cannot update? eg: User is on Edge connection and rarely accesses via WiFi. Would their apps stop working once they are out of date?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== mozApps API Changes ==&lt;br /&gt;
&lt;br /&gt;
To support the previously described behaviour, we need a couple of&lt;br /&gt;
additions to the content facing mozApps API, on the Application object:&lt;br /&gt;
&lt;br /&gt;
* Add a |readonly boolean removable| property.&lt;br /&gt;
* Add a |DOMEventListener onupdated| event listener to be notified when an application has been updated. This let a dashboard update any displayed item that could have changed (icon, application name, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Open questions: ===&lt;br /&gt;
&lt;br /&gt;
* Do we also need an event signaling that an update is available? &lt;br /&gt;
* Do we also need an event signaling that an update has been downloaded?&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=WebAPI/WebMobileConnection&amp;diff=438459</id>
		<title>WebAPI/WebMobileConnection</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=WebAPI/WebMobileConnection&amp;diff=438459"/>
		<updated>2012-06-06T15:12:09Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: /* Proposed API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This exposes information about the current mobile voice and data connection to (certain) HTML content. The primary use case for this is the status bar of the main phone UI. It typically shows the operator name, signal strength, data connection type, etc.&lt;br /&gt;
This API also includes ICC-related (SIM/RUIM card) functionalities, such as :&lt;br /&gt;
* entering PIN, PIN2, PUK, PUK2 to unlock various states of the SIM card. &lt;br /&gt;
* changing the PIN (also serves as enabling/disabling the PIN lock.)&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
* Implemented in {{bug|729173}}. &amp;lt;br&amp;gt;&lt;br /&gt;
* ICC lock(PIN/PIN2/PUK/PUK2) is implemented in {{Bug|729173}}. &amp;lt;br&amp;gt;&lt;br /&gt;
* getNetworks() and WebMobileOperatorInfo were added in {{Bug|744344}}&lt;br /&gt;
&lt;br /&gt;
== Proposed API ==&lt;br /&gt;
&lt;br /&gt;
  interface MobileConnection : EventTarget&lt;br /&gt;
  {&lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates the state of the device&#039;s ICC card.&lt;br /&gt;
     *&lt;br /&gt;
     * Possible values: &#039;unavailable&#039;, &#039;absent&#039;, &#039;pin_required&#039;, &#039;puk_required&#039;,&lt;br /&gt;
     * &#039;network_locked&#039;, &#039;not_ready&#039;, &#039;ready&#039;.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute string cardState;&lt;br /&gt;
     &lt;br /&gt;
    /**&lt;br /&gt;
     * Information about the voice connection.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute MobileConnectionInfo voice;&lt;br /&gt;
     &lt;br /&gt;
    /**&lt;br /&gt;
     * Information about the data connection.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute MobileConnectionInfo data;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * The &#039;cardstatechange&#039; event is notified when the &#039;cardState&#039; attribute&lt;br /&gt;
     * changes value.&lt;br /&gt;
     */&lt;br /&gt;
    attribute EventListener oncardstatechange;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * The &#039;voicechange&#039; event is notified whenever the voice connection object&lt;br /&gt;
     * changes.&lt;br /&gt;
     */&lt;br /&gt;
    attribute EventListener onvoicechange;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * The &#039;datachange&#039; event is notified whenever the data connection object&lt;br /&gt;
     * changes values.&lt;br /&gt;
     */&lt;br /&gt;
    attribute EventListener ondatachange;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Search for available networks.&lt;br /&gt;
     *&lt;br /&gt;
     * If successful, the request&#039;s onsuccess will be called, and the request&#039;s&lt;br /&gt;
     * result will be an array of MobileOperatorInfo.&lt;br /&gt;
     *&lt;br /&gt;
     * Otherwise, the request&#039;s onerror will be called, and the request&#039;s error&lt;br /&gt;
     * will be either &#039;RadioNotAvailable&#039;, &#039;RequestNotSupported&#039;, or &#039;GenericFailure&#039;.&lt;br /&gt;
     */&lt;br /&gt;
    DOMRequest getNetworks();&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Find out about the status of an ICC lock (e.g. the PIN lock).&lt;br /&gt;
     *&lt;br /&gt;
     * @param lockType&lt;br /&gt;
     *        Identifies the lock type, e.g. &amp;quot;pin&amp;quot; for the PIN lock.&lt;br /&gt;
     *&lt;br /&gt;
     * @return a DOM Request.&lt;br /&gt;
     *         The request&#039;s result will be an object containing &lt;br /&gt;
     *         information about the specified lock&#039;s status,&lt;br /&gt;
     *         e.g. {lockType: &amp;quot;pin&amp;quot;, enabled: true}.&lt;br /&gt;
     */&lt;br /&gt;
    DOMRequest getCardLock(DOMString lockType);&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Unlock a card lock.&lt;br /&gt;
     *&lt;br /&gt;
     * @param info&lt;br /&gt;
     *        An object containing the information necessary to unlock&lt;br /&gt;
     *        the given lock. At a minimum, this object must have a&lt;br /&gt;
     *        &amp;quot;lockType&amp;quot; attribute which specifies the type of lock, e.g.&lt;br /&gt;
     *        &amp;quot;pin&amp;quot; for the PIN lock. Other attributes are dependent on&lt;br /&gt;
     *        the lock type.&lt;br /&gt;
     *&lt;br /&gt;
     * Examples:&lt;br /&gt;
     *&lt;br /&gt;
     * (1) Unlocking the PIN:&lt;br /&gt;
     *&lt;br /&gt;
     *   unlockCardLock({lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *                   pin: &amp;quot;...&amp;quot;});&lt;br /&gt;
     *&lt;br /&gt;
     * (2) Unlocking the PUK and supplying a new PIN:&lt;br /&gt;
     *&lt;br /&gt;
     *   unlockCardLock({lockType: &amp;quot;puk&amp;quot;,&lt;br /&gt;
     *                   puk: &amp;quot;...&amp;quot;,&lt;br /&gt;
     *                   newPin: &amp;quot;...&amp;quot;});&lt;br /&gt;
     *&lt;br /&gt;
     * @return a DOMRequest.&lt;br /&gt;
     *         The request&#039;s result will be an object containing &lt;br /&gt;
     *         information about the unlock operation.&lt;br /&gt;
     *&lt;br /&gt;
     * Examples:&lt;br /&gt;
     *&lt;br /&gt;
     * (1) Unlocking failed:&lt;br /&gt;
     *&lt;br /&gt;
     *     {&lt;br /&gt;
     *       lockType:   &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *       result:     false,&lt;br /&gt;
     *       retryCount: 2&lt;br /&gt;
     *     }&lt;br /&gt;
     *&lt;br /&gt;
     * (2) Unlocking succeeded:&lt;br /&gt;
     *&lt;br /&gt;
     *     {&lt;br /&gt;
     *       lockType:  &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *       result:    true&lt;br /&gt;
     *     }&lt;br /&gt;
     */&lt;br /&gt;
    DOMRequest unlockCardLock(Object info);&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Modify the state of a card lock.&lt;br /&gt;
     *&lt;br /&gt;
     * @param info&lt;br /&gt;
     *        An object containing information about the lock and&lt;br /&gt;
     *        how to modify its state. At a minimum, this object&lt;br /&gt;
     *        must have a &amp;quot;lockType&amp;quot; attribute which specifies the&lt;br /&gt;
     *        type of lock, e.g. &amp;quot;pin&amp;quot; for the PIN lock. Other&lt;br /&gt;
     *        attributes are dependent on the lock type.&lt;br /&gt;
     *&lt;br /&gt;
     * Examples:&lt;br /&gt;
     *&lt;br /&gt;
     * (1) Disabling the PIN lock:&lt;br /&gt;
     *&lt;br /&gt;
     *   setCardLock({lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *                pin: &amp;quot;...&amp;quot;,&lt;br /&gt;
     *                enabled: false});&lt;br /&gt;
     *&lt;br /&gt;
     * (2) Changing the PIN:&lt;br /&gt;
     *&lt;br /&gt;
     *   setCardLock({lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *                pin: &amp;quot;...&amp;quot;,&lt;br /&gt;
     *                newPin: &amp;quot;...&amp;quot;});&lt;br /&gt;
     *&lt;br /&gt;
     * @return a DOMRequest.&lt;br /&gt;
     *         The request&#039;s result will be an object containing &lt;br /&gt;
     *         information about the operation.&lt;br /&gt;
     *&lt;br /&gt;
     * Examples:&lt;br /&gt;
     *&lt;br /&gt;
     * (1) Enabling/Disabling card lock failed or change card lock failed.&lt;br /&gt;
     *&lt;br /&gt;
     *     {&lt;br /&gt;
     *       lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *       result: false,&lt;br /&gt;
     *       retryCount: 2&lt;br /&gt;
     *     }&lt;br /&gt;
     *&lt;br /&gt;
     * (2) Enabling/Disabling card lock succeed or change card lock succeed.&lt;br /&gt;
     *&lt;br /&gt;
     *     {&lt;br /&gt;
     *       lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *       result: true&lt;br /&gt;
     *     }&lt;br /&gt;
     */&lt;br /&gt;
    DOMRequest setCardLock(Object info);&lt;br /&gt;
    &lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  interface MobileConnectionInfo&lt;br /&gt;
  {&lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates whether the device is connected to a mobile network.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute bool connected;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates whether only emergency calls are possible.&lt;br /&gt;
     *&lt;br /&gt;
     * This flag is only relevant to voice connections and when &#039;connected&#039; is&lt;br /&gt;
     * false.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute bool emergencyCallsOnly;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates whether the connection is going through a foreign operator&lt;br /&gt;
     * (roaming) or not.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute bool roaming;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Network operator&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute DOMString operator;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Type of connection.&lt;br /&gt;
     *&lt;br /&gt;
     * Possible values: &#039;gsm&#039;, &#039;cdma&#039;, gprs&#039;, &#039;edge&#039;, &#039;umts&#039;, &#039;hsdpa&#039;, &#039;evdo0&#039;,&lt;br /&gt;
     * &#039;evdoa&#039;, &#039;evdob&#039;, etc.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute DOMString type;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Signal strength in dBm, or null if no service is available.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute int signalStrength;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Signal strength, represented linearly as a number between 0 (weakest&lt;br /&gt;
     * signal) and 100 (full signal).&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute int relSignalStrength;&lt;br /&gt;
    &lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  interface MobileOperatorInfo&lt;br /&gt;
  {&lt;br /&gt;
    /**&lt;br /&gt;
     * Short name of the network operator&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute DOMString shortName;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Long name of the network operator&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute DOMString longName;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Mobile Country Code (MCC) of the network operator&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute unsigned short mcc;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Mobile Network Code (MNC) of the network operator&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute unsigned short mnc;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * State of this network operator.&lt;br /&gt;
     *&lt;br /&gt;
     * Possible values: &#039;available&#039;, &#039;connected&#039;, &#039;forbidden&#039;, or null (unknown)&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute DOMString state;&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== Other radio-related functionality ==&lt;br /&gt;
&lt;br /&gt;
The following radio/mobile connection related features will be exposed as settings in [[SettingsAPI]]:&lt;br /&gt;
&lt;br /&gt;
* radio on/off (e.g. for aeroplane mode)&lt;br /&gt;
* caller ID on/off/provider default (called &amp;quot;CLIR&amp;quot; in TS 27.007)&lt;br /&gt;
* call forwarding preferences&lt;br /&gt;
* manual override for operator selection&lt;br /&gt;
&lt;br /&gt;
There are also some more features of the radio that should be exposed to (privileged) content in some shape or form:&lt;br /&gt;
&lt;br /&gt;
* ICC-related (SIM/RUIM card)&lt;br /&gt;
** own phone number and other ICC I/O related features.(Currently these information are not exposed in WebAPI, see {{Bug|736941}}.)&lt;br /&gt;
* device-related&lt;br /&gt;
** get IMEI, IMEISV&lt;br /&gt;
** depersonalize (remove network lock)&lt;br /&gt;
** baseband-related information and features&lt;br /&gt;
&lt;br /&gt;
The latter, device-related features seem to be more exotic than the ICC-related ones and hopefully also mostly unnecessary. The question remains where these APIs should live.&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=WebAPI/WebMobileConnection&amp;diff=438452</id>
		<title>WebAPI/WebMobileConnection</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=WebAPI/WebMobileConnection&amp;diff=438452"/>
		<updated>2012-06-06T14:57:49Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: /* Status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This exposes information about the current mobile voice and data connection to (certain) HTML content. The primary use case for this is the status bar of the main phone UI. It typically shows the operator name, signal strength, data connection type, etc.&lt;br /&gt;
This API also includes ICC-related (SIM/RUIM card) functionalities, such as :&lt;br /&gt;
* entering PIN, PIN2, PUK, PUK2 to unlock various states of the SIM card. &lt;br /&gt;
* changing the PIN (also serves as enabling/disabling the PIN lock.)&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
* Implemented in {{bug|729173}}. &amp;lt;br&amp;gt;&lt;br /&gt;
* ICC lock(PIN/PIN2/PUK/PUK2) is implemented in {{Bug|729173}}. &amp;lt;br&amp;gt;&lt;br /&gt;
* getNetworks() and WebMobileOperatorInfo were added in {{Bug|744344}}&lt;br /&gt;
&lt;br /&gt;
== Proposed API ==&lt;br /&gt;
&lt;br /&gt;
  interface MobileConnection : EventTarget&lt;br /&gt;
  {&lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates the state of the device&#039;s ICC card.&lt;br /&gt;
     *&lt;br /&gt;
     * Possible values: &#039;unavailable&#039;, &#039;absent&#039;, &#039;pin_required&#039;, &#039;puk_required&#039;,&lt;br /&gt;
     * &#039;network_locked&#039;, &#039;not_ready&#039;, &#039;ready&#039;.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute string cardState;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates whether the device is connected to a mobile network.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute bool connected;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates whether emergency calls are possible.&lt;br /&gt;
     *&lt;br /&gt;
     * This flag is only relevant when &#039;connected&#039; is false.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute bool emergencyCallsPossible;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates whether the connection is going through a foreign operator&lt;br /&gt;
     * (roaming) or not.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute bool roaming;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Operator name.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute string operator?;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Type of connection.&lt;br /&gt;
     *&lt;br /&gt;
     * Possible values: &#039;gprs&#039;, &#039;edge&#039;, &#039;umts&#039;, &#039;hsdpa&#039;, &#039;evdo0&#039;, &#039;evdoa&#039;, &#039;evdob&#039;, etc.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute string type?;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Signal strength, represented linearly as a number between 0 (weakest signal) and 1.0&lt;br /&gt;
     * (full signal).&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute float signalStrength?;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Signal strength in dBm, or null if no service is available.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute short signalStrengthDbm?;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Search for available networks.&lt;br /&gt;
     *&lt;br /&gt;
     * If successful, the request&#039;s onsuccess will be called, and the request&#039;s&lt;br /&gt;
     * result will be an array of MobileOperatorInfo.&lt;br /&gt;
     *&lt;br /&gt;
     * Otherwise, the request&#039;s onerror will be called, and the request&#039;s error&lt;br /&gt;
     * will be either &#039;RadioNotAvailable&#039;, &#039;RequestNotSupported&#039;, or &#039;GenericFailure&#039;.&lt;br /&gt;
     */&lt;br /&gt;
    DOMRequest getNetworks();&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * The &#039;cardstatechange&#039; event is notified when the &#039;cardState&#039; attribute&lt;br /&gt;
     * changes value.&lt;br /&gt;
     */&lt;br /&gt;
    attribute EventListener oncardstatechange;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * The &#039;connectionchange&#039; event is notified whenever one of the &#039;connected&#039;,&lt;br /&gt;
     * &#039;roaming&#039;, &#039;operator&#039;, &#039;type&#039; attributes change, since typically many or&lt;br /&gt;
     * all of them change together.&lt;br /&gt;
     */&lt;br /&gt;
    attribute EventListener onconnectionchange;&lt;br /&gt;
     &lt;br /&gt;
    /**&lt;br /&gt;
     * The &#039;signalstrengthchange&#039; event is notified whenever the signal strength&lt;br /&gt;
     * changes value. The &#039;bars&#039; attribute is updated accordingly.&lt;br /&gt;
     */&lt;br /&gt;
    attribute EventListener onsignalstrengthchange;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Find out about the status of an ICC lock (e.g. the PIN lock).&lt;br /&gt;
     *&lt;br /&gt;
     * @param lockType&lt;br /&gt;
     *        Identifies the lock type, e.g. &amp;quot;pin&amp;quot; for the PIN lock.&lt;br /&gt;
     *&lt;br /&gt;
     * @return a DOM Request.&lt;br /&gt;
     *         The request&#039;s result will be an object containing &lt;br /&gt;
     *         information about the specified lock&#039;s status,&lt;br /&gt;
     *         e.g. {lockType: &amp;quot;pin&amp;quot;, enabled: true}.&lt;br /&gt;
     */&lt;br /&gt;
    DOMRequest getCardLock(in DOMString lockType);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Unlock a card lock.&lt;br /&gt;
     *&lt;br /&gt;
     * @param info&lt;br /&gt;
     *        An object containing the information necessary to unlock&lt;br /&gt;
     *        the given lock. At a minimum, this object must have a&lt;br /&gt;
     *        &amp;quot;lockType&amp;quot; attribute which specifies the type of lock, e.g.&lt;br /&gt;
     *        &amp;quot;pin&amp;quot; for the PIN lock. Other attributes are dependent on&lt;br /&gt;
     *        the lock type.&lt;br /&gt;
     *&lt;br /&gt;
     * Examples:&lt;br /&gt;
     *&lt;br /&gt;
     * (1) Unlocking the PIN:&lt;br /&gt;
     *&lt;br /&gt;
     *   unlockCardLock({lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *                   pin: &amp;quot;...&amp;quot;});&lt;br /&gt;
     *&lt;br /&gt;
     * (2) Unlocking the PUK and supplying a new PIN:&lt;br /&gt;
     *&lt;br /&gt;
     *   unlockCardLock({lockType: &amp;quot;puk&amp;quot;,&lt;br /&gt;
     *                   puk: &amp;quot;...&amp;quot;,&lt;br /&gt;
     *                   newPin: &amp;quot;...&amp;quot;});&lt;br /&gt;
     *&lt;br /&gt;
     * @return a nsIDOMDOMRequest.&lt;br /&gt;
     *         The request&#039;s result will be an object containing &lt;br /&gt;
     *         information about the unlock operation.&lt;br /&gt;
     *&lt;br /&gt;
     * Examples:&lt;br /&gt;
     *&lt;br /&gt;
     * (1) Unlocking failed:&lt;br /&gt;
     *&lt;br /&gt;
     *     {&lt;br /&gt;
     *       lockType:   &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *       result:     false,&lt;br /&gt;
     *       retryCount: 2&lt;br /&gt;
     *     }&lt;br /&gt;
     *&lt;br /&gt;
     * (2) Unlocking succeeded:&lt;br /&gt;
     *&lt;br /&gt;
     *     {&lt;br /&gt;
     *       lockType:  &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *       result:    true&lt;br /&gt;
     *     }&lt;br /&gt;
     */&lt;br /&gt;
    DOMRequest unlockCardLock(in jsval info);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Modify the state of a card lock.&lt;br /&gt;
     *&lt;br /&gt;
     * @param info&lt;br /&gt;
     *        An object containing information about the lock and&lt;br /&gt;
     *        how to modify its state. At a minimum, this object&lt;br /&gt;
     *        must have a &amp;quot;lockType&amp;quot; attribute which specifies the&lt;br /&gt;
     *        type of lock, e.g. &amp;quot;pin&amp;quot; for the PIN lock. Other&lt;br /&gt;
     *        attributes are dependent on the lock type.&lt;br /&gt;
     *&lt;br /&gt;
     * Examples:&lt;br /&gt;
     *&lt;br /&gt;
     * (1) Disabling the PIN lock:&lt;br /&gt;
     *&lt;br /&gt;
     *   setCardLock({lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *                pin: &amp;quot;...&amp;quot;,&lt;br /&gt;
     *                enabled: false});&lt;br /&gt;
     *&lt;br /&gt;
     * (2) Changing the PIN:&lt;br /&gt;
     *&lt;br /&gt;
     *   setCardLock({lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *                pin: &amp;quot;...&amp;quot;,&lt;br /&gt;
     *                newPin: &amp;quot;...&amp;quot;});&lt;br /&gt;
     *&lt;br /&gt;
     * @return a nsIDOMDOMRequest.&lt;br /&gt;
     *         The request&#039;s result will be an object containing &lt;br /&gt;
     *         information about the operation.&lt;br /&gt;
     *&lt;br /&gt;
     * Examples:&lt;br /&gt;
     *&lt;br /&gt;
     * (1) Enabling/Disabling card lock failed or change card lock failed.&lt;br /&gt;
     *&lt;br /&gt;
     *     {&lt;br /&gt;
     *       lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *       result: false,&lt;br /&gt;
     *       retryCount: 2&lt;br /&gt;
     *     }&lt;br /&gt;
     *&lt;br /&gt;
     * (2) Enabling/Disabling card lock succeed or change card lock succeed.&lt;br /&gt;
     *&lt;br /&gt;
     *     {&lt;br /&gt;
     *       lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *       result: true&lt;br /&gt;
     *     }&lt;br /&gt;
     */&lt;br /&gt;
    DOMRequest setCardLock(in jsval info);&lt;br /&gt;
&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== Other radio-related functionality ==&lt;br /&gt;
&lt;br /&gt;
The following radio/mobile connection related features will be exposed as settings in [[SettingsAPI]]:&lt;br /&gt;
&lt;br /&gt;
* radio on/off (e.g. for aeroplane mode)&lt;br /&gt;
* caller ID on/off/provider default (called &amp;quot;CLIR&amp;quot; in TS 27.007)&lt;br /&gt;
* call forwarding preferences&lt;br /&gt;
* manual override for operator selection&lt;br /&gt;
&lt;br /&gt;
There are also some more features of the radio that should be exposed to (privileged) content in some shape or form:&lt;br /&gt;
&lt;br /&gt;
* ICC-related (SIM/RUIM card)&lt;br /&gt;
** own phone number and other ICC I/O related features.(Currently these information are not exposed in WebAPI, see {{Bug|736941}}.)&lt;br /&gt;
* device-related&lt;br /&gt;
** get IMEI, IMEISV&lt;br /&gt;
** depersonalize (remove network lock)&lt;br /&gt;
** baseband-related information and features&lt;br /&gt;
&lt;br /&gt;
The latter, device-related features seem to be more exotic than the ICC-related ones and hopefully also mostly unnecessary. The question remains where these APIs should live.&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=WebAPI/WebMobileConnection&amp;diff=438449</id>
		<title>WebAPI/WebMobileConnection</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=WebAPI/WebMobileConnection&amp;diff=438449"/>
		<updated>2012-06-06T14:51:46Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: /* Proposed API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This exposes information about the current mobile voice and data connection to (certain) HTML content. The primary use case for this is the status bar of the main phone UI. It typically shows the operator name, signal strength, data connection type, etc.&lt;br /&gt;
This API also includes ICC-related (SIM/RUIM card) functionalities, such as :&lt;br /&gt;
* entering PIN, PIN2, PUK, PUK2 to unlock various states of the SIM card. &lt;br /&gt;
* changing the PIN (also serves as enabling/disabling the PIN lock.)&lt;br /&gt;
&lt;br /&gt;
== Status ==&lt;br /&gt;
&lt;br /&gt;
Implemented in {{bug|729173}}. &amp;lt;br&amp;gt;&lt;br /&gt;
ICC lock(PIN/PIN2/PUK/PUK2) is implemented in {{Bug|729173}}.&lt;br /&gt;
&lt;br /&gt;
== Proposed API ==&lt;br /&gt;
&lt;br /&gt;
  interface MobileConnection : EventTarget&lt;br /&gt;
  {&lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates the state of the device&#039;s ICC card.&lt;br /&gt;
     *&lt;br /&gt;
     * Possible values: &#039;unavailable&#039;, &#039;absent&#039;, &#039;pin_required&#039;, &#039;puk_required&#039;,&lt;br /&gt;
     * &#039;network_locked&#039;, &#039;not_ready&#039;, &#039;ready&#039;.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute string cardState;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates whether the device is connected to a mobile network.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute bool connected;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates whether emergency calls are possible.&lt;br /&gt;
     *&lt;br /&gt;
     * This flag is only relevant when &#039;connected&#039; is false.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute bool emergencyCallsPossible;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates whether the connection is going through a foreign operator&lt;br /&gt;
     * (roaming) or not.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute bool roaming;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Operator name.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute string operator?;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Type of connection.&lt;br /&gt;
     *&lt;br /&gt;
     * Possible values: &#039;gprs&#039;, &#039;edge&#039;, &#039;umts&#039;, &#039;hsdpa&#039;, &#039;evdo0&#039;, &#039;evdoa&#039;, &#039;evdob&#039;, etc.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute string type?;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Signal strength, represented linearly as a number between 0 (weakest signal) and 1.0&lt;br /&gt;
     * (full signal).&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute float signalStrength?;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Signal strength in dBm, or null if no service is available.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute short signalStrengthDbm?;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Search for available networks.&lt;br /&gt;
     *&lt;br /&gt;
     * If successful, the request&#039;s onsuccess will be called, and the request&#039;s&lt;br /&gt;
     * result will be an array of MobileOperatorInfo.&lt;br /&gt;
     *&lt;br /&gt;
     * Otherwise, the request&#039;s onerror will be called, and the request&#039;s error&lt;br /&gt;
     * will be either &#039;RadioNotAvailable&#039;, &#039;RequestNotSupported&#039;, or &#039;GenericFailure&#039;.&lt;br /&gt;
     */&lt;br /&gt;
    DOMRequest getNetworks();&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * The &#039;cardstatechange&#039; event is notified when the &#039;cardState&#039; attribute&lt;br /&gt;
     * changes value.&lt;br /&gt;
     */&lt;br /&gt;
    attribute EventListener oncardstatechange;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * The &#039;connectionchange&#039; event is notified whenever one of the &#039;connected&#039;,&lt;br /&gt;
     * &#039;roaming&#039;, &#039;operator&#039;, &#039;type&#039; attributes change, since typically many or&lt;br /&gt;
     * all of them change together.&lt;br /&gt;
     */&lt;br /&gt;
    attribute EventListener onconnectionchange;&lt;br /&gt;
     &lt;br /&gt;
    /**&lt;br /&gt;
     * The &#039;signalstrengthchange&#039; event is notified whenever the signal strength&lt;br /&gt;
     * changes value. The &#039;bars&#039; attribute is updated accordingly.&lt;br /&gt;
     */&lt;br /&gt;
    attribute EventListener onsignalstrengthchange;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Find out about the status of an ICC lock (e.g. the PIN lock).&lt;br /&gt;
     *&lt;br /&gt;
     * @param lockType&lt;br /&gt;
     *        Identifies the lock type, e.g. &amp;quot;pin&amp;quot; for the PIN lock.&lt;br /&gt;
     *&lt;br /&gt;
     * @return a DOM Request.&lt;br /&gt;
     *         The request&#039;s result will be an object containing &lt;br /&gt;
     *         information about the specified lock&#039;s status,&lt;br /&gt;
     *         e.g. {lockType: &amp;quot;pin&amp;quot;, enabled: true}.&lt;br /&gt;
     */&lt;br /&gt;
    DOMRequest getCardLock(in DOMString lockType);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Unlock a card lock.&lt;br /&gt;
     *&lt;br /&gt;
     * @param info&lt;br /&gt;
     *        An object containing the information necessary to unlock&lt;br /&gt;
     *        the given lock. At a minimum, this object must have a&lt;br /&gt;
     *        &amp;quot;lockType&amp;quot; attribute which specifies the type of lock, e.g.&lt;br /&gt;
     *        &amp;quot;pin&amp;quot; for the PIN lock. Other attributes are dependent on&lt;br /&gt;
     *        the lock type.&lt;br /&gt;
     *&lt;br /&gt;
     * Examples:&lt;br /&gt;
     *&lt;br /&gt;
     * (1) Unlocking the PIN:&lt;br /&gt;
     *&lt;br /&gt;
     *   unlockCardLock({lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *                   pin: &amp;quot;...&amp;quot;});&lt;br /&gt;
     *&lt;br /&gt;
     * (2) Unlocking the PUK and supplying a new PIN:&lt;br /&gt;
     *&lt;br /&gt;
     *   unlockCardLock({lockType: &amp;quot;puk&amp;quot;,&lt;br /&gt;
     *                   puk: &amp;quot;...&amp;quot;,&lt;br /&gt;
     *                   newPin: &amp;quot;...&amp;quot;});&lt;br /&gt;
     *&lt;br /&gt;
     * @return a nsIDOMDOMRequest.&lt;br /&gt;
     *         The request&#039;s result will be an object containing &lt;br /&gt;
     *         information about the unlock operation.&lt;br /&gt;
     *&lt;br /&gt;
     * Examples:&lt;br /&gt;
     *&lt;br /&gt;
     * (1) Unlocking failed:&lt;br /&gt;
     *&lt;br /&gt;
     *     {&lt;br /&gt;
     *       lockType:   &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *       result:     false,&lt;br /&gt;
     *       retryCount: 2&lt;br /&gt;
     *     }&lt;br /&gt;
     *&lt;br /&gt;
     * (2) Unlocking succeeded:&lt;br /&gt;
     *&lt;br /&gt;
     *     {&lt;br /&gt;
     *       lockType:  &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *       result:    true&lt;br /&gt;
     *     }&lt;br /&gt;
     */&lt;br /&gt;
    DOMRequest unlockCardLock(in jsval info);&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Modify the state of a card lock.&lt;br /&gt;
     *&lt;br /&gt;
     * @param info&lt;br /&gt;
     *        An object containing information about the lock and&lt;br /&gt;
     *        how to modify its state. At a minimum, this object&lt;br /&gt;
     *        must have a &amp;quot;lockType&amp;quot; attribute which specifies the&lt;br /&gt;
     *        type of lock, e.g. &amp;quot;pin&amp;quot; for the PIN lock. Other&lt;br /&gt;
     *        attributes are dependent on the lock type.&lt;br /&gt;
     *&lt;br /&gt;
     * Examples:&lt;br /&gt;
     *&lt;br /&gt;
     * (1) Disabling the PIN lock:&lt;br /&gt;
     *&lt;br /&gt;
     *   setCardLock({lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *                pin: &amp;quot;...&amp;quot;,&lt;br /&gt;
     *                enabled: false});&lt;br /&gt;
     *&lt;br /&gt;
     * (2) Changing the PIN:&lt;br /&gt;
     *&lt;br /&gt;
     *   setCardLock({lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *                pin: &amp;quot;...&amp;quot;,&lt;br /&gt;
     *                newPin: &amp;quot;...&amp;quot;});&lt;br /&gt;
     *&lt;br /&gt;
     * @return a nsIDOMDOMRequest.&lt;br /&gt;
     *         The request&#039;s result will be an object containing &lt;br /&gt;
     *         information about the operation.&lt;br /&gt;
     *&lt;br /&gt;
     * Examples:&lt;br /&gt;
     *&lt;br /&gt;
     * (1) Enabling/Disabling card lock failed or change card lock failed.&lt;br /&gt;
     *&lt;br /&gt;
     *     {&lt;br /&gt;
     *       lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *       result: false,&lt;br /&gt;
     *       retryCount: 2&lt;br /&gt;
     *     }&lt;br /&gt;
     *&lt;br /&gt;
     * (2) Enabling/Disabling card lock succeed or change card lock succeed.&lt;br /&gt;
     *&lt;br /&gt;
     *     {&lt;br /&gt;
     *       lockType: &amp;quot;pin&amp;quot;,&lt;br /&gt;
     *       result: true&lt;br /&gt;
     *     }&lt;br /&gt;
     */&lt;br /&gt;
    DOMRequest setCardLock(in jsval info);&lt;br /&gt;
&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== Other radio-related functionality ==&lt;br /&gt;
&lt;br /&gt;
The following radio/mobile connection related features will be exposed as settings in [[SettingsAPI]]:&lt;br /&gt;
&lt;br /&gt;
* radio on/off (e.g. for aeroplane mode)&lt;br /&gt;
* caller ID on/off/provider default (called &amp;quot;CLIR&amp;quot; in TS 27.007)&lt;br /&gt;
* call forwarding preferences&lt;br /&gt;
* manual override for operator selection&lt;br /&gt;
&lt;br /&gt;
There are also some more features of the radio that should be exposed to (privileged) content in some shape or form:&lt;br /&gt;
&lt;br /&gt;
* ICC-related (SIM/RUIM card)&lt;br /&gt;
** own phone number and other ICC I/O related features.(Currently these information are not exposed in WebAPI, see {{Bug|736941}}.)&lt;br /&gt;
* device-related&lt;br /&gt;
** get IMEI, IMEISV&lt;br /&gt;
** depersonalize (remove network lock)&lt;br /&gt;
** baseband-related information and features&lt;br /&gt;
&lt;br /&gt;
The latter, device-related features seem to be more exotic than the ICC-related ones and hopefully also mostly unnecessary. The question remains where these APIs should live.&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
	<entry>
		<id>https://wiki.mozilla.org/index.php?title=WebAPI/WebMobileConnection&amp;diff=433029</id>
		<title>WebAPI/WebMobileConnection</title>
		<link rel="alternate" type="text/html" href="https://wiki.mozilla.org/index.php?title=WebAPI/WebMobileConnection&amp;diff=433029"/>
		<updated>2012-05-21T19:15:15Z</updated>

		<summary type="html">&lt;p&gt;Marshall law: /* Proposed API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This exposes information about the current mobile voice and data connection to (certain) HTML content. The primary use case for this is the status bar of the main phone UI. It typically shows the operator name, signal strength, data connection type, etc.&lt;br /&gt;
&lt;br /&gt;
== Proposed API ==&lt;br /&gt;
&lt;br /&gt;
  interface MobileConnection : EventTarget&lt;br /&gt;
  {&lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates the state of the device&#039;s ICC card.&lt;br /&gt;
     *&lt;br /&gt;
     * Possible values: &#039;unavailable&#039;, &#039;absent&#039;, &#039;pin_required&#039;, &#039;puk_required&#039;,&lt;br /&gt;
     * &#039;network_locked&#039;, &#039;not_ready&#039;, &#039;ready&#039;.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute string cardState;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates whether the device is connected to a mobile network.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute bool connected;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates whether emergency calls are possible.&lt;br /&gt;
     *&lt;br /&gt;
     * This flag is only relevant when &#039;connected&#039; is false.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute bool emergencyCallsPossible;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Indicates whether the connection is going through a foreign operator&lt;br /&gt;
     * (roaming) or not.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute bool roaming;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Operator name.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute string operator?;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Type of connection.&lt;br /&gt;
     *&lt;br /&gt;
     * Possible values: &#039;gprs&#039;, &#039;edge&#039;, &#039;umts&#039;, &#039;hsdpa&#039;, &#039;evdo0&#039;, &#039;evdoa&#039;, &#039;evdob&#039;, etc.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute string type?;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Signal strength, represented linearly as a number between 0 (weakest signal) and 1.0&lt;br /&gt;
     * (full signal).&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute float signalStrength?;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Signal strength in dBm, or null if no service is available.&lt;br /&gt;
     */&lt;br /&gt;
    readonly attribute short signalStrengthDbm?;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Search for available networks.&lt;br /&gt;
     *&lt;br /&gt;
     * If successful, the request result will be an array of operator names.&lt;br /&gt;
     */&lt;br /&gt;
    DOMRequest getNetworks();&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * The &#039;cardstatechange&#039; event is notified when the &#039;cardState&#039; attribute&lt;br /&gt;
     * changes value.&lt;br /&gt;
     */&lt;br /&gt;
    attribute EventListener oncardstatechange;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * The &#039;connectionchange&#039; event is notified whenever one of the &#039;connected&#039;,&lt;br /&gt;
     * &#039;roaming&#039;, &#039;operator&#039;, &#039;type&#039; attributes change, since typically many or&lt;br /&gt;
     * all of them change together.&lt;br /&gt;
     */&lt;br /&gt;
    attribute EventListener onconnectionchange;&lt;br /&gt;
     &lt;br /&gt;
    /**&lt;br /&gt;
     * The &#039;signalstrengthchange&#039; event is notified whenever the signal strength&lt;br /&gt;
     * changes value. The &#039;bars&#039; attribute is updated accordingly.&lt;br /&gt;
     */&lt;br /&gt;
    attribute EventListener onsignalstrengthchange;&lt;br /&gt;
    &lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
== Other radio-related functionality ==&lt;br /&gt;
&lt;br /&gt;
The following radio/mobile connection related features will be exposed as settings in [[SettingsAPI]]:&lt;br /&gt;
&lt;br /&gt;
* radio on/off (e.g. for aeroplane mode)&lt;br /&gt;
* caller ID on/off/provider default (called &amp;quot;CLIR&amp;quot; in TS 27.007)&lt;br /&gt;
* call forwarding preferences&lt;br /&gt;
* manual override for operator selection&lt;br /&gt;
&lt;br /&gt;
There are also some more features of the radio that should be exposed to (privileged) content in some shape or form:&lt;br /&gt;
&lt;br /&gt;
* ICC-related (SIM/RUIM card)&lt;br /&gt;
** own phone number and other ICC I/O related features&lt;br /&gt;
** entering PIN, PIN2, PUK, PUK2 to unlock various states of the SIM card. Entering the PIN isn&#039;t *that* exotic, actually. Some carriers deliver their SIM cards with the PIN lock enabled, for instance.&lt;br /&gt;
** changing the PIN (also serves as enabling/disabling the PIN lock.)&lt;br /&gt;
* device-related&lt;br /&gt;
** get IMEI, IMEISV&lt;br /&gt;
** depersonalize (remove network lock)&lt;br /&gt;
** baseband-related information and features&lt;br /&gt;
&lt;br /&gt;
The latter, device-related features seem to be more exotic than the ICC-related ones and hopefully also mostly unnecessary. The question remains where these APIs should live.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
See {{bug|729173}}.&lt;/div&gt;</summary>
		<author><name>Marshall law</name></author>
	</entry>
</feed>