Gaia/Find My Device
Other wiki pages:
- information about team membership, meetings, mailing list
- older information, some documentation of the server-client protocol
TODO: add these to https://mozilla.app.box.com/applications
TODO: I'm sure there is a more complete spec attached to some bug, bug haven't found it yet.
- Recent error handling specs (8/2014): https://mozilla.app.box.com/s/7of2b8ampjzjgwir8s5f
- Older specs (11/2013): https://bug938896.bugzilla.mozilla.org/attachment.cgi?id=832630
- Lockscreen message spec: https://bug1042322.bugzilla.mozilla.org/attachment.cgi?id=8491534
Find My Device has a significant server-side component (https://github.com/mozilla-services/FindMyDevice), and its Gaia functionality is split between a headless app that is woken via push notifications; one file inside the System app that listens for notifications and launches the FMD app; and a panel inside the Settings app, where users can enable or disable FMD.
Code on github:
- FMD app: https://github.com/mozilla-b2g/gaia/tree/master/apps/findmydevice
- FMD System component: https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/findmydevice_launcher.js
- FMD Settings component: https://github.com/mozilla-b2g/gaia/blob/master/apps/settings/js/findmydevice.js
Currently, a lost device can be remotely tracked via GPS, locked with a custom lockscreen PIN and optional message, set to ring the ringtone at max volume, or all data can be wiped.
Users can use FMD by logging into the Find My Device website (https://find.firefox.com) with their Firefox Account. A Firefox Account is required to enable FMD on device.
TODO: description of how the code works and what we'd like to refactor.
- Raw notes from discussion of FMD codebase - https://etherpad.mozilla.org/fmd-overview-20140813
- Topics to cover:
- FMD as consumer of FxA RP API
- client-server protocol
- communication among settings, system, fmd apps
- how each of the commands (track, ring, lock, wipe) works
- things to refactor:
- currently, fmd caches fxa state because secure logout isn't done
- wakelock management
- inconsistent use of mozSettings vs IAC API
- refactoring meta bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1078952
- Preliminary thread on dev-webAPI mailing list about standardizing some subset of FMD features: https://groups.google.com/forum/#!topic/mozilla.dev.webapi/s21YKUq9yLQ
QA / Filing Bugs
Bugs should be filed in bugzilla.mozilla.org under the "Gaia" product and "Find My Device" component. It is very useful to enable Gaia Debug Traces (inside Settings > Developer) before reproducing a bug, as lots of extra debug info will be appended to the adb logs.
Server bugs are filed on github: https://github.com/mozilla-services/FindMyDevice/issues.
- Front-End Tests
- live in the gaia repo
- Back-End Tests