Mozilla B2G
-
Upload
haitham-a-el-ghareeb -
Category
Technology
-
view
1.441 -
download
7
description
Transcript of Mozilla B2G
Mozilla B2G
Dr.Haitham A. El-Ghareeb
Twitter: @helghareeb
Mozi
lla is
D
iffere
nt
Product
s
Product
s
Product
s
Product
s
Product
s
Tech
nolo
gie
s
Gecko Necko NSPR NSS Rhino
SpiderMonkey Tamarian XPCOM XULRunner
Featu
red M
ozi
lla
base
d A
pplic
ati
ons
Challe
nges
Continue Desktop Improvement Mobile is Everywhere
Fire
fox
on
Win
dow
s
Fire
fox
on M
ac
Fire
fox
on L
inux
Aw
eso
me B
ar
Sw
itch
to T
ab
App T
abs
Tab G
roups
Syn
c
Add-o
ns
Manager
WebG
L
Inst
ant
Websi
te
ID
Priv
ate
Bro
wsi
ng
Add-o
ns
Build
er
Do N
ot
Track
Fire
fox
Inte
rface
O
verv
iew
Fire
fox
Syn
c O
verv
iew
Fire
fox
for
Mobile
This is it?
Add-o
ns
Manager
One T
ouch
B
ookm
ark
ing
Sta
rt P
age
Tabbed B
row
sing
Typin
g A
weso
me
Scr
een
Do N
ot
Track
Fire
fox
for
Andro
id t
able
ts
tabs
Fire
fox
for
Andro
id
table
ts U
I La
ndsc
ape
Not Enough!User Expectations are Not Limited!
Not Enough!Mozilla’s Mission AccomplishmentIn Progress!
Not Enough!Challenges around us Everywhere!
Eco
syst
em
Open W
eb
Definition for Open Web! Hah! No way! Lawyers Journalists Developers Users Kids …
Open W
eb…
For
Me
‘as
a D
eve
loper’
“It is the Web built using Open Source Technologies that Cope with Standards,
Where Users own their
data, have the right to
transfer and control them, and we can hide
ourselves from being
Tracked” - Haitham El-Ghareeb
Open W
eb A
pps
Video
Mozi
lla
Mark
etp
lace
B2G
Being just an Application is not enough anymore
We need to be the Framework for others
to build They have built many
products using our Technologies We continue doing so!
B2G
Boot to Gecko (B2G) is
an open source operating
system in development
by Mozilla Corporation
that aims to support
HTML5 apps written using
"open Web" technologies
rather than platform-
specific native APIs. It
initially targets Android-
compatible smartphones.
* From Wikipedia, the free encyclopedia
Announce
ment
On July 25, 2011, Dr.
Andreas Gal, Director of
Research at Mozilla Corporation, announced a
project to "pursue the goal
of building a complete,
standalone operating
system for the open web" in
order to "find the gaps that
keep web developers from
being able to build apps that
are --- in every way --- the
equals of native apps built
for the iPhone, Android, and
WP7.”
Work
Are
as
Web APIs Privilege Model Boot
Web A
PIs
expose device and OS
capabilities List of APIs Mozilla working on WebTelephony: Allow
placing and answering
phone calls as well as build
in-call UI. Vibration API: Control
device vibration for things
like haptic feedback in
games. Not intended to
solve things like vibration
for notification.
Web A
PIs
WebSMS: Send/receive
SMS messages as well
as manage messages
stored on device. Idle API: Get notifications
when user is idle. Screen Orientation: Get
notification when screen
orientation changes as
well as control which
screen orientation a page/app wants.
Web A
PIs
Settings API: Set system-
wide configurations that are
saved permanently on the
device. Resource Lock API: Prevent
resources from being turned
off, for example screen
dimming, WiFi turning off,
CPU going into sleep mode
etc. Power Management: Turn
on/off screen, cpu, device
power, etc. Listen and
inspect resource lock events.
Web A
PIs
Mobile Connection API: Expose
signal strength, operator, etc for
GSM and other mobile
connections. This does not cover
WiFi. TCP Socket API: Low-level TCP
socket API. Will also include SSL
support. GeoLocation API: Same API since
Firefox 3.5 UDP Datagram Socket API: Low-
level UDP API. Sensor API: Access to device
sensors such as accelerometer,
magnetic field (compass),
proximity, ambient light etc.
Web A
PIs
WiFi Information API: Enumerate
available WiFi networks, get signal
strength and name of currently
connected network, etc.
Device Storage API: Add/Read/Modify
files stored on a central location on
the device. For example the
"pictures" folder on modern desktop
platforms or the photo storage in
mobile devices. USB file-reading API: Add/Read/Modify
files stored on memory cards and
USB keys connected to the device.
Get notified when storage devices
are connected/disconnected. Will be
very similar to the Device Storage API
above with a few additional methods.
Web A
PIs
Contacts API: Add/Read/Modify the
device contacts address book.
Camera API: allow people using
the web platform to include
video/audio conferencing and
associated data as part of their
websites and applications.
Mouse Lock API: Lock access to
mouse and get access to
movement deltas rather than
coordinates. Open Web Apps: Install web apps
and manage installed webapps.
Also allows an installed webapp to
get payment information.
Everything needed to build a Opeb
WebApps app store.
Web A
PIs
WebNFC: Low level access to NFC
hardware. WebBluetooth: Low level access to
Bluetooth hardware.
Web USB: Low level access to USB
hardware. Network Information API: Get basic
information about current network
connectivity. Battery Status API: Information
about battery charge level and if
device is plugged in.
HTTP-cache API: Query what's
stored in the browsers http-cache.
Add/remove entries. Update
expiration time. Get data directly
from cache.
Web A
PIs
Alarm API: Schedule a
notification, or for an application
to be started, at a specific time.
Browser API: Enables
implementing a browser
completely in web technologies.
Time/Clock API: Set current time.
Timezone will go in the Settings
API. Calendar API: Add/Read/Modify
to the device calendar.
Intents/Activities/Actions: Have a
problem? This API will be able
solve it.
Web A
PIs
Device Capabilities API: Check if
the device has certain
capabilities, such as front-facing
camera, gps, etc. Keyboard/IME API: Enables
implementing virtual keyboards.
Spellcheck API: Enable
webpages to check if a piece of
text is correctly spelled as well
as get suggestions for
corrections. Background Services: Enable a
web application to run in the
background and perform tasks
like syncing or respond to
incoming messages.
Web A
PIs
Push Notifications API:
Allow the platform to
send notification messages to specific
applications. LogAPI: Allows to register the user activity on the phone.
Term
inolo
gy
Gaia
The user interface of b2g.
Everything drawn to screen
after b2g starts up is some part
of Gaia. Gaia implements a lock screen,
home screen, telephone dialer,
text-messaging application,
camera app, ... and many more.
Gaia is written entirely in HTML,
CSS, and JavaScript. Its only
interface to the underlying
operating system is through
Open Web APIs, which are
implemented by Gecko.
Term
inolo
gy
Geck
o
The "application runtime" of
b2g. Gecko implements the open
standards for HTML, CSS,
and JS and makes those
interfaces run well on all the
OSes that Gecko supports.
Gecko consists of, among
other things, a networking
stack, graphics stack, layout
engine, virtual machine (for
JS), and porting layers.
Term
inolo
gy
Gonk
The lower-level "operating
system" of b2g. Gonk consists of a linux kernel
and userspace hardware
abstraction layer (HAL).
The kernel and several
userspace libraries are
common open-source projects:
linux, libusb, bluez, etc.
Some other parts of the HAL
are shared with the android
project: GPS, camera, among
others. Gonk is an extremely simple
linux distribution.
Booti
ng
After turning on a b2g phone, execution
starts in the primary bootloader. From there,
the process of loading the main OS kernel
happens in the usual way: a succession of
higher-level bootloaders bootstrap the next
loader in the chain. At the end of the
process, execution is handed off to the linux
kernel. There's not a lot to say about the boot
process, but there are a few things worth
knowing The bootloaders usually show the first "splash
screen" seen during device boot, which usually
displays a vendor logo.
The bootloaders implement flashing an image
onto the device. Different devices use different
protocols. Most phones use the fastboot
protocol, but the Galaxy S II uses the "odin"
protocol. By the end of the bootstrapping process, the
modem image is usually loaded and running on
the modem processor. How this happens is
highly device-specific and possibly proprietary.
We will Skip Kernel Booting Process
They are very well documented elsewhere!
Geck
o:
DO
M A
PIs
"DOM interfaces", approximately, are how
web content communicates with Gecko. DOM interfaces are
defined in IDL, which
comprises both a foreign function interface (ffi) and object
model (OM) between
JavaScript and C++.
Open W
eb
Tech
nolo
gy
Sta
ck
Android kernel running on Qualcomm
ARM-based chipset hardware abstraction layer (HAL),
codenamed "Gonk" Mozilla's multi-platform Gecko ‘Web
browser engine’ to render HTML and
CSS and run JavaScript
platform-independent JavaScript APIs
for device features (telephony, SMS,
camera, Bluetooth, USB, NFC, etc.) of
varying degrees of standardization
platform-independent system
applications (lock screen, phone dialing
& phone messaging, a view of installed
applications, etc.) written in HTML5; the
user interface of these is codenamed
"Gaia” platform-independent HTML5 web
applications
Any
tim
e S
oon?
At Mobile World Congress 2012,
Mozilla and Telefónica announced
that the Spanish telecommunications provider
intended to deliver "open Web
devices" in 2012 based on HTML5
and these APIs. Mozilla also announced support for
the project from Adobe and
Qualcomm, and that Deutsche
Telekom’s Innovation Labs will join
the project. Mozilla demonstrated a "sneak
preview" of the software and apps
running on Samsung Galaxy S II
phones (completely replacing their
normal Android operating system).
Build
ing B
2G
For Galaxy SII For QUEMO Emulator
Reso
urc
es
Reso
urc
es
B2G
Web is the Platform…
for your Mobile!
B2G DemoGaia is Working!HTML, JS, CSS
Quest
ions
Thank You! Dr.Haitham El-Ghareeb