Gaia/Find My Device
Contents
Other documentation
Other wiki pages:
- https://wiki.mozilla.org/FirefoxOS/functionalteams#Find_My_Device
- information about team membership, meetings, mailing list
- https://wiki.mozilla.org/CloudServices/FindMyDevice#Find_My_Device
- older information, some documentation of the server-client protocol
Design Specs
TODO: add these to https://mozilla.app.box.com/applications
Interaction
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
Visual
- Lockscreen message spec: https://bug1042322.bugzilla.mozilla.org/attachment.cgi?id=8491534
Development
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
Features
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.
Implementation
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
Standardization Efforts
- 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.
Testing
- Front-End Tests
- live in the gaia repo
- Back-End Tests
- TODO
Dependencies
TODO
Security Review
see https://wiki.mozilla.org/CloudServices/FindMyDevice#Security_and_Privacy