SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
Insight Gaia - OS Shell in a <html>
               Tim Chien
         timdream@mozilla.com
In this Talk ….
• Everything   you can help	


 • As   a user / beta tester	


 • As   a web developer	


• Everything   you can play	


 • Desktop     builds	


 • Phone    hacking! (Not *that*)
Background: What it takes to
implement a OS shell?
   git pull git://github.com/mozilla-b2g/gaia.git
Similar Web OS Shells
• Others   tried: “Cloud Desktop”	


 • eyeOS/jolicloud/Synology      DSM …	


• Gaia   is unique in a way that it runs a phone
From the perspective of the web

• Hosting   3 rd-party   content safely	


 • <iframe>s?    Pretty close.	


• Window/app      management	


 • How   phones manage apps? Home screen?	


 • How   Firefox manage tabs? Bookmarks?
From the perspective of a phone

• Device   management	


 • Screen/wifi/power/memory/connectivity	


• System   user interfaces	


 • Lock
      screen/dialogs/pull-down menu/keyboard/status bar/
  permission …	


• Common      applications	


 • Phone/Contacts/Message/Settings/Browser/Camera/
  Gallery …
Gaia: 91MB total

   du -ch -I .git -I xulrunner-sdk -I profile -I
   media-samples -I dictionaries . | tail –n 1
System app: 2.7M total

     du –ch ./apps/system/ | tail –n 1
accessibility.js      hardware_buttons.js        sleep_menu.js
      activities.js       identity.js        sound_manager.js
 airplane_mode.js          keyboard_manager.js        source_view.js
     app_install_manager.js list_menu.js              statusbar.js
        applications.js       lockscreen.js          storage.js
  attention_screen.js       mobile_info.js       system_banner.js
   authentication_dialog.js modal_dialog.js            trusted_ui.js
    background_service.js mouse2touch.js                  ttlview.js
     battery_manager.js        notifications.js       updatable.js
 bluetooth.js           operator_variant       update_manager.js
     bluetooth_transfer.js payment.js                utility_tray.js
  bootstrap.js           permission_manager.js value_selector
     cards_view.js          popup_manager.js          voicemail.js
        context_menu.js           quick_settings.js       wifi.js
cost_control.js        screen_manager.js        window_manager.js
      crash_reporter.js        screenshot.js          wrapper.js
                    gridview.js         sim_lock.js


                ls ./apps/system/js/
Gaia

      Gaia, n., Greek Mythology the Earth
  personified as a goddess, daughter of Chaos.
Gaia
• Front-end   “shell” of Firefox OS phones	


• The   visual layer, composed entirely of web technologies	


 • Everything   is <div>, every logic is written in Javascript	


• Easily
      customable to phone venders, phone hackers,
 web developers	


 • YOU!
Gaia concept: frame
hierarchy, and special APIs
Boot 2 Gecko architecture

    Linux

              Gecko

    Drivers    APIs    Gaia (system app)
                        App   App   Apps
              chrome
Frame hierarchy
<xul:window>	


 <html:iframe src=“app://system.gaiamobile.org/”>	


  <iframe src=“browser”>	


    <iframe src=“mozilla.org”>	


  <iframe src=“phone”>	


  <iframe src=“message”>
Frame busting!
• if   (window.top !== window) die();	


• X-Frame:	


• <a    target=“_blank”>
MozBrowser API
• <iframe   mozbrowser src=“google.com”>	


• <xul:browser>     (re)implementation in HTML	


• Prevent framebusting, allow (some) cross-origin control
 over iframe content	


• Written   entirely in Javascript! 	


 • Check  Gecko source code
  ./mozilla-central/source/dom/browser-element/
Frame hierarchy
xul:window	


 html:iframe src=“system” mozbrowser	


  iframe src=“browser” mozbrowser	


    iframe src=“mozilla.org” mozbrowser	


  iframe src=“phone” mozbrowser	


  iframe src=“message” mozbrowser
Permission controls
• App-by-app    basis  frame-origin control	


 • Camera     access/device storage access/geolocation
  access	


• “mozapps”    attribute	


 • mozapps=“browser/manifest.webapp”
Manifest-based permission control

{	

 permissions: {	

     telephony:{},	

     voicemail:{},	

     contacts:{ access: readwrite },	

     mobileconnection:{}	

}
Frame hierarchy
xul:window	


 html:iframe src=“system” mozbrowser mozapps=..	


  iframe src=“browser” mozbrowser mozapps=..	


    iframe src=“mozilla.org” mozbrowser	


  iframe src=“phone” mozbrowser mozapps=..	


  iframe src=“message” mozbrowser mozapps=..
Crashes!
• If   in-process app crashes, the entire Gecko crashes	


  • (Desktop     Firefox rarely crashes, except plug-ins)	


• Move  apps out of main process; isolate apps down to
  process level	


• “remote”     attribute
Frame hierarchy
xul:window	


 html:iframe src=“system” mozbrowser mozapps=..	


   iframe src=“browser” mozbrowser mozapps=.. remote	


    iframe src=“mozilla.org” mozbrowser remote	


   iframe src=“phone” mozbrowser mozapps=.. remote	


   iframe src=“message” mozbrowser mozapps=.. remote
APIs
• https://wiki.mozilla.org/WebAPI	


• Telephony/SMS/Wifi    management/Camera/Vibration/
 Idle/Orientation/Settings/Power management/Mobile
 connection status/Audio channels/TCP Socket/
 Geolocation/Device Storage/Contacts/Web App
 Management/Battery status/Time/FM Radio/Payment/
 Archive/Devicelight censor/Proximity sensor/System
 XHR	


• Dive   into code, see how Web interacts with ____!
Can I try?

   Sure, double click ./index.html and open it in
                     Firefox …
B2G Desktop
• Proudly  supported by release engineering team
 http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-
 mozilla-central/	


• Download,   and double click, it comes with a build-in
 Gaia!	


• Hardware   APIs is not available, sorry :’(
Launch it with your own Gaia
• Run   “make” in the Gaia repository	


• Launch B2G Desktop with following command
 ./b2g-bin -profile /my/gaia/profile	


• “make”   is needed to zip some Gaia apps into packaged
 apps	


 • Some    API privileged require app to be packaged	


 • (“DEBUG=1      make” is currently broken)
Debugging Gaia
• dump()	


• console.log()	


• Remote      Debugger in Nightly	


• No inspector yet :’( -- work on Nightly for layout works
 first)
What you can help
• We  are really close from shipping the first version,
 activities are fast and intense	


• Bug   hunt! Late features!
Bug hunt on B2G Desktop
• Find   non-hardware related bugs, or UX issues	


• Provide   fix in Javascript/CSS/HTML of existing bugs	


• Bug    component: Boot2Gecko::Gaia	




• Web Developers: This is *the* opportunity to get your
 work into a shipping phone (without learning anything
 new first!)
Specific bugs to hunt
• Performance;     find extra repaint with paint-flashing	


 • Settings - Device info - More info - Developer -
   Flash repainted area	


• Off-main    thread animation (OMTA; async animation)	


 • CSS animates incorrectly on B2G Desktop but correct
   on nightly

• Functional:   App installation, built-in app functionalities
Where to find the team
• irc.mozilla.org   #gaia	


• dev-gaia   mailing list	


• Shop   for bugs on Bugzilla and take what you can solve
Beyond ver. 1.0
• OS Shell in a html is a unique opportunity, a canvas
 for experimenting new OS shell and user interfaces	


• Can  Firefox OS evolving into something doesn’t look
 like any existing platform?	


• Fork
     it, hack it, announce and demonstrate your
 proposal out loud!
Insight Gaia - OS Shell in a &lt;html>

Contenu connexe

Similaire à Insight Gaia - OS Shell in a &lt;html>

Intro To webOS
Intro To webOSIntro To webOS
Intro To webOSfpatton
 
Empowering the “Mobile Web” with Chris Mills
Empowering the “Mobile Web” with Chris MillsEmpowering the “Mobile Web” with Chris Mills
Empowering the “Mobile Web” with Chris MillsFITC
 
Empowering the Mobile Web - Mills
Empowering the Mobile Web - MillsEmpowering the Mobile Web - Mills
Empowering the Mobile Web - MillsCodemotion
 
Empowering the "mobile web"
Empowering the "mobile web"Empowering the "mobile web"
Empowering the "mobile web"Chris Mills
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5Roy Clarkson
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010Patrick Lauke
 
Abgeschottete Realität - Testen im Emulator, Mobile Testing Days 2014, Berlin
Abgeschottete Realität - Testen im Emulator, Mobile Testing Days 2014, BerlinAbgeschottete Realität - Testen im Emulator, Mobile Testing Days 2014, Berlin
Abgeschottete Realität - Testen im Emulator, Mobile Testing Days 2014, BerlinDanny Preussler
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009Christopher Judd
 
Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaChristian Heilmann
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Todaydavyjones
 
Android Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoTAndroid Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoTinovex GmbH
 
PhoneGap talk from Singapore
PhoneGap talk from SingaporePhoneGap talk from Singapore
PhoneGap talk from SingaporeSteve Gill
 
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010Heiko Behrens
 
Building Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsBuilding Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsSergi Almar i Graupera
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on MobileAdam Lu
 
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...Frédéric Harper
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegapRakesh Jha
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegapRakesh Jha
 

Similaire à Insight Gaia - OS Shell in a &lt;html> (20)

Intro To webOS
Intro To webOSIntro To webOS
Intro To webOS
 
Empowering the “Mobile Web” with Chris Mills
Empowering the “Mobile Web” with Chris MillsEmpowering the “Mobile Web” with Chris Mills
Empowering the “Mobile Web” with Chris Mills
 
Empowering the Mobile Web - Mills
Empowering the Mobile Web - MillsEmpowering the Mobile Web - Mills
Empowering the Mobile Web - Mills
 
Empowering the "mobile web"
Empowering the "mobile web"Empowering the "mobile web"
Empowering the "mobile web"
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010
 
DDive- Giuseppe Grasso - mobile su Lotus
DDive- Giuseppe Grasso - mobile su LotusDDive- Giuseppe Grasso - mobile su Lotus
DDive- Giuseppe Grasso - mobile su Lotus
 
Abgeschottete Realität - Testen im Emulator, Mobile Testing Days 2014, Berlin
Abgeschottete Realität - Testen im Emulator, Mobile Testing Days 2014, BerlinAbgeschottete Realität - Testen im Emulator, Mobile Testing Days 2014, Berlin
Abgeschottete Realität - Testen im Emulator, Mobile Testing Days 2014, Berlin
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
 
Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World Romania
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
 
Android Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoTAndroid Embedded - Smart Hubs als Schaltzentrale des IoT
Android Embedded - Smart Hubs als Schaltzentrale des IoT
 
PhoneGap talk from Singapore
PhoneGap talk from SingaporePhoneGap talk from Singapore
PhoneGap talk from Singapore
 
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
 
Building Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSocketsBuilding Real-Time Applications with Android and WebSockets
Building Real-Time Applications with Android and WebSockets
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
 
Txjs
TxjsTxjs
Txjs
 
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegap
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegap
 

Plus de Timothy Chien

Apps on HTML5 - Why, how, and beyond
Apps on HTML5 - Why, how, and beyondApps on HTML5 - Why, how, and beyond
Apps on HTML5 - Why, how, and beyondTimothy Chien
 
Gfx.tw: Two Year Report
Gfx.tw: Two Year ReportGfx.tw: Two Year Report
Gfx.tw: Two Year ReportTimothy Chien
 
HTML5 應用程式開發簡介
HTML5 應用程式開發簡介HTML5 應用程式開發簡介
HTML5 應用程式開發簡介Timothy Chien
 
Google Apps Account as OpenID (中文)
Google Apps Account as OpenID (中文)Google Apps Account as OpenID (中文)
Google Apps Account as OpenID (中文)Timothy Chien
 
Google Apps Account as OpenID
Google Apps Account as OpenIDGoogle Apps Account as OpenID
Google Apps Account as OpenIDTimothy Chien
 
OpenID 登入 UI 與流程設計
OpenID 登入 UI 與流程設計OpenID 登入 UI 與流程設計
OpenID 登入 UI 與流程設計Timothy Chien
 
HTML5 AJAX File Upload
HTML5 AJAX File UploadHTML5 AJAX File Upload
HTML5 AJAX File UploadTimothy Chien
 

Plus de Timothy Chien (7)

Apps on HTML5 - Why, how, and beyond
Apps on HTML5 - Why, how, and beyondApps on HTML5 - Why, how, and beyond
Apps on HTML5 - Why, how, and beyond
 
Gfx.tw: Two Year Report
Gfx.tw: Two Year ReportGfx.tw: Two Year Report
Gfx.tw: Two Year Report
 
HTML5 應用程式開發簡介
HTML5 應用程式開發簡介HTML5 應用程式開發簡介
HTML5 應用程式開發簡介
 
Google Apps Account as OpenID (中文)
Google Apps Account as OpenID (中文)Google Apps Account as OpenID (中文)
Google Apps Account as OpenID (中文)
 
Google Apps Account as OpenID
Google Apps Account as OpenIDGoogle Apps Account as OpenID
Google Apps Account as OpenID
 
OpenID 登入 UI 與流程設計
OpenID 登入 UI 與流程設計OpenID 登入 UI 與流程設計
OpenID 登入 UI 與流程設計
 
HTML5 AJAX File Upload
HTML5 AJAX File UploadHTML5 AJAX File Upload
HTML5 AJAX File Upload
 

Dernier

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Dernier (20)

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 

Insight Gaia - OS Shell in a &lt;html>

  • 1.
  • 2. Insight Gaia - OS Shell in a <html> Tim Chien timdream@mozilla.com
  • 3. In this Talk …. • Everything you can help • As a user / beta tester • As a web developer • Everything you can play • Desktop builds • Phone hacking! (Not *that*)
  • 4. Background: What it takes to implement a OS shell? git pull git://github.com/mozilla-b2g/gaia.git
  • 5. Similar Web OS Shells • Others tried: “Cloud Desktop” • eyeOS/jolicloud/Synology DSM … • Gaia is unique in a way that it runs a phone
  • 6. From the perspective of the web • Hosting 3 rd-party content safely • <iframe>s? Pretty close. • Window/app management • How phones manage apps? Home screen? • How Firefox manage tabs? Bookmarks?
  • 7. From the perspective of a phone • Device management • Screen/wifi/power/memory/connectivity • System user interfaces • Lock screen/dialogs/pull-down menu/keyboard/status bar/ permission … • Common applications • Phone/Contacts/Message/Settings/Browser/Camera/ Gallery …
  • 8. Gaia: 91MB total du -ch -I .git -I xulrunner-sdk -I profile -I media-samples -I dictionaries . | tail –n 1
  • 9. System app: 2.7M total du –ch ./apps/system/ | tail –n 1
  • 10. accessibility.js hardware_buttons.js sleep_menu.js activities.js identity.js sound_manager.js airplane_mode.js keyboard_manager.js source_view.js app_install_manager.js list_menu.js statusbar.js applications.js lockscreen.js storage.js attention_screen.js mobile_info.js system_banner.js authentication_dialog.js modal_dialog.js trusted_ui.js background_service.js mouse2touch.js ttlview.js battery_manager.js notifications.js updatable.js bluetooth.js operator_variant update_manager.js bluetooth_transfer.js payment.js utility_tray.js bootstrap.js permission_manager.js value_selector cards_view.js popup_manager.js voicemail.js context_menu.js quick_settings.js wifi.js cost_control.js screen_manager.js window_manager.js crash_reporter.js screenshot.js wrapper.js gridview.js sim_lock.js ls ./apps/system/js/
  • 11. Gaia Gaia, n., Greek Mythology the Earth personified as a goddess, daughter of Chaos.
  • 12. Gaia • Front-end “shell” of Firefox OS phones • The visual layer, composed entirely of web technologies • Everything is <div>, every logic is written in Javascript • Easily customable to phone venders, phone hackers, web developers • YOU!
  • 13. Gaia concept: frame hierarchy, and special APIs
  • 14. Boot 2 Gecko architecture Linux Gecko Drivers APIs Gaia (system app) App App Apps chrome
  • 15. Frame hierarchy <xul:window> <html:iframe src=“app://system.gaiamobile.org/”> <iframe src=“browser”> <iframe src=“mozilla.org”> <iframe src=“phone”> <iframe src=“message”>
  • 16. Frame busting! • if (window.top !== window) die(); • X-Frame: • <a target=“_blank”>
  • 17. MozBrowser API • <iframe mozbrowser src=“google.com”> • <xul:browser> (re)implementation in HTML • Prevent framebusting, allow (some) cross-origin control over iframe content • Written entirely in Javascript! • Check Gecko source code ./mozilla-central/source/dom/browser-element/
  • 18. Frame hierarchy xul:window html:iframe src=“system” mozbrowser iframe src=“browser” mozbrowser iframe src=“mozilla.org” mozbrowser iframe src=“phone” mozbrowser iframe src=“message” mozbrowser
  • 19. Permission controls • App-by-app basis frame-origin control • Camera access/device storage access/geolocation access • “mozapps” attribute • mozapps=“browser/manifest.webapp”
  • 20. Manifest-based permission control { permissions: { telephony:{}, voicemail:{}, contacts:{ access: readwrite }, mobileconnection:{} }
  • 21. Frame hierarchy xul:window html:iframe src=“system” mozbrowser mozapps=.. iframe src=“browser” mozbrowser mozapps=.. iframe src=“mozilla.org” mozbrowser iframe src=“phone” mozbrowser mozapps=.. iframe src=“message” mozbrowser mozapps=..
  • 22. Crashes! • If in-process app crashes, the entire Gecko crashes • (Desktop Firefox rarely crashes, except plug-ins) • Move apps out of main process; isolate apps down to process level • “remote” attribute
  • 23. Frame hierarchy xul:window html:iframe src=“system” mozbrowser mozapps=.. iframe src=“browser” mozbrowser mozapps=.. remote iframe src=“mozilla.org” mozbrowser remote iframe src=“phone” mozbrowser mozapps=.. remote iframe src=“message” mozbrowser mozapps=.. remote
  • 24. APIs • https://wiki.mozilla.org/WebAPI • Telephony/SMS/Wifi management/Camera/Vibration/ Idle/Orientation/Settings/Power management/Mobile connection status/Audio channels/TCP Socket/ Geolocation/Device Storage/Contacts/Web App Management/Battery status/Time/FM Radio/Payment/ Archive/Devicelight censor/Proximity sensor/System XHR • Dive into code, see how Web interacts with ____!
  • 25. Can I try? Sure, double click ./index.html and open it in Firefox …
  • 26. B2G Desktop • Proudly supported by release engineering team http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest- mozilla-central/ • Download, and double click, it comes with a build-in Gaia! • Hardware APIs is not available, sorry :’(
  • 27. Launch it with your own Gaia • Run “make” in the Gaia repository • Launch B2G Desktop with following command ./b2g-bin -profile /my/gaia/profile • “make” is needed to zip some Gaia apps into packaged apps • Some API privileged require app to be packaged • (“DEBUG=1 make” is currently broken)
  • 28. Debugging Gaia • dump() • console.log() • Remote Debugger in Nightly • No inspector yet :’( -- work on Nightly for layout works first)
  • 29. What you can help • We are really close from shipping the first version, activities are fast and intense • Bug hunt! Late features!
  • 30. Bug hunt on B2G Desktop • Find non-hardware related bugs, or UX issues • Provide fix in Javascript/CSS/HTML of existing bugs • Bug component: Boot2Gecko::Gaia • Web Developers: This is *the* opportunity to get your work into a shipping phone (without learning anything new first!)
  • 31. Specific bugs to hunt • Performance; find extra repaint with paint-flashing • Settings - Device info - More info - Developer - Flash repainted area • Off-main thread animation (OMTA; async animation) • CSS animates incorrectly on B2G Desktop but correct on nightly • Functional: App installation, built-in app functionalities
  • 32. Where to find the team • irc.mozilla.org #gaia • dev-gaia mailing list • Shop for bugs on Bugzilla and take what you can solve
  • 33. Beyond ver. 1.0 • OS Shell in a html is a unique opportunity, a canvas for experimenting new OS shell and user interfaces • Can Firefox OS evolving into something doesn’t look like any existing platform? • Fork it, hack it, announce and demonstrate your proposal out loud!