a Web Runtime for Desktop Apps from a long long time
(a.k.a. Phonegap) a Web Runtime for Mobile Apps
web-based mobile OS
web-based desktop/laptop/netbook OS
Native Firefox for Android Platform
A mobile OS based on Gecko and Linux, and bunch of new experimental APIs for native mobile apps (proposed as standards)
Decentralized Installable WebApps on Desktop (Firefox Desktop Nightly) and Mobile (Firefox for Android Nightly and FirefoxOS)
OpenWebApps |
Gaia |
Gecko (+ new WebAPI) |
Gonk |
Low Level System (based on a Linux kernel and system utils used on Android)
Mozilla Runtime (standard Web technologies from Desktop and Mobile Firefox and new WebAPIs)
Base UI, System Utils and Apps (UI based on HTML+JS+CSS, uses new WebAPIs)
B2G is the internal project codename for FirefoxOS
QEMU ARM as in Android Emulator + generated firmware
FirefoxOS Simulator (Custom Gecko build + fake/mocked WebAPIs)
and use Firefox-included Web Developer Tools
for automated testing and remote interactive development
included in FirefoxOS, B2G Desktop, Firefox Android and Desktop Nightly
Mozilla Cross-Reference sources
how to build qemu arm emulator and b2g firmware
adb shell # ps
download/build an arm binary busybox
# and uploads it to the emulator adb shell mount -o remount,rw /system adb push busybox /system/bin/ adb shell chmod 0755 /system/bin/busybox
Setting Up Marionette for B2G • Marionette for Interactive Python
$ adb forward tcp:2828 tcp:2828 $ python >>> from marionette import Marionette >>> marionette = Marionette('localhost', 2828) >>> marionette.start_session() u'session-b2g'
some useful tips and tricks from an FirefoxOS developer
experimental addon, integrate/interact with B2G-desktop from Firefox.
B2G-Desktop Nightly Build • Build Yourself • Build Prerequisites
Let's install a powerfull introspection javascript shell into B2G
MozREPL GIT Repo
$ cd b2g $ mkdir extensions $ cd extensions $ git clone https://github.com/bard/mozrepl mozrepl@hyperstruct.net # bump toolkit compatibility in install.rdf (max to 19.*)
Let's start b2g desktop on an existent gaia profile with MozREPL enabled
$ ./b2g -profile PATH_TO_GAIA_PROFILE -repl $ rlwrap telnet 127.0.0.1 4242 ... Current working context: chrome://browser/content/shell.xul Current input mode: syntax repl>
Web Content | Installed Web App | Privileged Web App | Certified Web App |
---|---|---|---|
Regular web content | A regular web app | A "privileged" web app; more power = more responsibility | A "certified" web app; device-critical applications |
### RUN ACTIVITIES (as in "Android Intents") activity1 = new MozActivity({name: "dial", data: {number: "+39328", type: "webtelephony/number"}}); activity2 = new MozActivity({name: "new", data: {number: "+39328", type: "websms/sms"}});
### INSPECT OBJECTS repl.inspect(activity1); ... ### BACK TO HOME (workaround B2G Desktop bug) document.getElementById("homescreen").reload();
repl> repl.inspect(navigator); object.battery object.geolocation object.getDeviceStorage object.registerContentHandler object.registerProtocolHandler repl>
repl> repl.search(/^moz/,navigator); mozSettings mozApps mozPower mozNotification mozIsLocallyAvailable mozSms mozConnection mozCameras mozSetMessageHandler mozHasPendingMessage mozTime
repl> repl.inspect(navigator.battery); ... repl> res = navigator.mozApps.mgmt.getAll(); repl> repl.inspect(res.result[0]) ...
Let's build Gaia profile from sources
Gaia Hacking - Build Notes
$ git clone git://github.com/mozilla-b2g/gaia.git gaia ... $ cd gaia $ make DEBUG=1 # to build a profile runnable on Firefox Nightly ...
$ make # to build a profile runnable on B2G Desktop ... $ make USE_LOCAL_XULRUNNER_SDK=1 # to use a local installed xulrunner sdk ... Profile Ready: please run [b2g|firefox] -profile /tmp/gaia/profile
and use Responsive Design View
/path/to/firefox -profile ./profile -no-remote \ http://clock.gaiamobile.org:8080
Developer's Getting Started Guides on Mozilla MarketPlace Reference Implementation.
html5boilerplate, Prebuilt manifest.webapp, marketplace js api, require.js, volo for automating local development and deployment
A simple installable webapp, created by us as example, using volo and Gaia UI Building Blocks. Installable on Firefox Desktop Nightly, Firefox for Android Nightly and FirefoxOS.
Installable on Firefox Desktop Nightly, Firefox for Android Nightly and FirefoxOS.
{ "name": "Chrono", "description": "Gaia Chronometer Example App", "launch_path": "/index.html", "developer": { "name": "Luca Greco <luca.greco@alcacoop.it>", "url": "https://github.com/rpl/gaia-chrono" }, "installs_allowed_from": ["*"], ...
"locales": { "en-US": { "name": "Chrono", "description": "Gaia Chronometer Example App" }, ... }, "default_locale": "en-US", "icons": { "120": "/icons/chrono-120.png", "60": "/icons/chrono-60.png" }, "orientation": "portrait-primary" }
CACHE MANIFEST # ... CACHE: index.html icons/chrono-60.png ...
# catch-all for anything else NETWORK: * http://* https://*