Firefox OS workshop

Setting up

the environment

Paris, November 2013

FirefoxOS structure

Gaia

Gaia is the user interface for Boot to Gecko (B2G); it's a set of Web applications that runs locally on a B2G device, emulator, desktop build, or Firefox build. All you need to know in order to add apps or make changes to Gaia are Web technologies like JavaScript, HTML, and CSS.

Hacking Gaia

Get the Gaia code

$ git clone https://github.com/mozilla-b2g/gaia.git

Hacking Gaia

Run in nightly

$ cd /path/to/gaia
$ DEBUG=1 make
$ /path/to/firefox/nightly -profile /path/to/profile

Hacking Gaia

Push to device

Push to device

Get ADB

http://developer.android.com/tools/help/adb.html

Hacking Gaia

Push to device

$ make install-gaia
$ make reset-gaia

Hacking Gaia

Push one app to device

$ APP='app name' make install-gaia

Hacking Gaia

Fill app with fake data

$ APP='app name' make reference-workload-light
$ APP='app name' make reference-workload-medium
$ APP='app name' make reference-workload-heavy
$ APP='app name' make reference-workload-x-heavy

Tools

adb console

$ adb logcat | grep GecoConsole

Tools

APP Manager

Tools

APP Manager

on the device:
Settings > Device information > More information > Developer > Remote Debugging

Tools

APP Manager

Enable port forwarding:
$ adb forward tcp:6000 localfilesystem:/data/local/debugger-socket

Tools

APP Manager

  • Connect the device to your computer via USB.
  • Disable Screen lock, by going to Settings > Screen Lock and unchecking the Lock Screen checkbox.
  • Start the App Manager — In Firefox Desktop select the Tools > Web Developer > App Manager menu option, or type about:app-manager in the URL bar.
  • At the bottom of the App Manager tab, you will see a connection status bar (see screenshot below). You should be able to connect to your device by clicking the "Connect to localhost:6000" button.

Setting up

the environment

end of the part

<< back to index

@michalbe @rik24d