User Services/Try FMD: Difference between revisions
mNo edit summary |
No edit summary |
||
| Line 33: | Line 33: | ||
ring, lost mode, erase all work as expected. | ring, lost mode, erase all work as expected. | ||
== Debugging == | |||
Client side on device: | |||
Enabled verbose logging by enabling this: | |||
* Settings > Developer > Gaia debug traces. | |||
install adb then run | |||
adb logcat | |||
For the web app, open Tools > Web Developer > Web Console | |||
Geolocation data will print to console. | |||
== Custom FMD Server == | == Custom FMD Server == | ||
Revision as of 22:58, 24 June 2014
To get fmd running with stage do the following:
Works with B2G 2.0 and 2.1 branches.
1. set fxa to use stage servers download this: https://gist.github.com/edmoz/5596162
$ chmod +x modPref.sh $ ./modPref.sh pull
edit prefs.js and add this to the bottom on it’s own line:
user_pref("identity.fxaccounts.auth.uri", "https://api-accounts.stage.mozaws.net/v1");
2. Run this
$ ./modPref.sh push prefs.js
3. on Flame, sign into Fxa, verify email if needed, the verify link should be to
https://accounts.stage.mozaws.net/v1/verify_email?…
Note: even if you have an existing account before, you may not have created one in the Stage Database. Just create it again.
4. sign into:
if you look in console i see and it correctly finds my location: "device:updated" "2731a65040a15a6080c6b48d4231b4d9" Object { hasPasscode: undefined, latitude: 37.xx, longitude: -122.xx, altitude: 0, located: true, time: Date 2014-06-20T21:48:46.000Z } "{"Latitude":37.xx,"Longitude":-122.23120187,"Altitude":0,"Time":1403300926000,"Cmd":{"t":{"la":37.xx,"lo":-122.xx,"ok":true,"ti":1.403300926e+12}}}" device.js:50
ring, lost mode, erase all work as expected.
Debugging
Client side on device:
Enabled verbose logging by enabling this:
- Settings > Developer > Gaia debug traces.
install adb then run
adb logcat
For the web app, open Tools > Web Developer > Web Console
Geolocation data will print to console.
Custom FMD Server
If you want to flash FMD app to use a specific server, follow these steps:
Note: i haven’t been able to figure out if this can be done at runtime editable file vs build then flash. I wasn’t able to find any files with the fmd endpoint URI
$ git clone https://github.com/mozilla-b2g/gaia.git $ cd gaia Edit /customization/findmydevice.json with the server you want to use. $ make reset-gaia