Mobile/Fennec/Gaia

From MozillaWiki
< Mobile‎ | Fennec
Jump to: navigation, search

This page is to document work to make Gaia run on Fennec, both as a webapp, and as a launcher. Currently (as of 7/1/2013) its possible to build gaia in a way that the apps (including the system app) will attempt to run on Fennec.


The process currently works by setting a DESKTOP during the gaia build. That flag causes gaia to create a profile that can be used to debugging Gaia in Desktop Firefox.

On Fennec, many of the deubgging features are turned off. I've also been running with things like the Gaia keyboard turned off (although there's no reason you couldn't leave it on and test the keyboard on your system.

In general the process is something like:

 # You must have pulled the v1-branch of gaia for this to work
 git clone https://github.com/mozilla-b2g/gaia
 git branch upstream/v1-train
 DESKTOP=1 make # build the gaia profile
 adb shell rm -R /sdcard/profile # remove any previously installed profile from you sdcard
 adb shell rm -R /sdcard/webapps # remove any previously install gaia webapps from your sdcard
 adb push profile/ /sdcard/profile # Copy the generated profile to your sdcard
 adb push profile/webapps /sdcard/webapps # Copy the generated webapps to be a sibling of the profile on your sdcard
 adb shell am force-stop org.mozilla.fennec_<USERNAME>/.App # Kill any running instance of Fennec. Note this doesn't seem to work
 adb shell am start -a android.activity.MAIN -n org.mozilla.fennec_wesj/.App --es args "--profile /mnt/sdcard/profile" -d app://system.gaiamobile.org/index.html # Start the gaia system app

TODO:

  • Fennec doesn't support launching the apps from homescreen shortcuts yet. This is because, when you launch an App on Fennec, Fennec queries a separate from Gecko database of installed webapps. Your app won't appear in there, leaving Fennec with no idea which profile to launch with.
  • A simple extension to install this might be fun for users, but not that useful for development? Might still provider a nicer install method, and could mitigate the webapp install problems above.
  • Can we build this into the build process. i.e. something like MOBILE=1 make would kick off either copying things to the phone, or maybe xpi generation?