diff options
Diffstat (limited to 'files/vi/archive/b2g_os')
-rw-r--r-- | files/vi/archive/b2g_os/index.html | 218 | ||||
-rw-r--r-- | files/vi/archive/b2g_os/platform/gaia/hacking/index.html | 332 | ||||
-rw-r--r-- | files/vi/archive/b2g_os/platform/gaia/index.html | 62 | ||||
-rw-r--r-- | files/vi/archive/b2g_os/platform/index.html | 82 | ||||
-rw-r--r-- | files/vi/archive/b2g_os/simulator/index.html | 60 |
5 files changed, 754 insertions, 0 deletions
diff --git a/files/vi/archive/b2g_os/index.html b/files/vi/archive/b2g_os/index.html new file mode 100644 index 0000000000..bc54599bd1 --- /dev/null +++ b/files/vi/archive/b2g_os/index.html @@ -0,0 +1,218 @@ +--- +title: B2G OS +slug: Archive/B2G_OS +tags: + - B2G + - Firefox OS + - Gaia + - Starting FirefoxOS +translation_of: Archive/B2G_OS +--- +<div class="summary"><span class="seoSummary">B2G OS is (was) a complete, standalone operating system for the open web. It is an open source project developed by the Mozilla community and forms the basis of Firefox OS products. As of 2017 it is<strong> no longer maintained</strong>.</span></div> + +<p><strong>B2G OS </strong>is a community maintained open source operating system for<strong> </strong>smartphones, tablets, smart TVs and other connected devices. The project was <a href="https://wiki.mozilla.org/Booting_to_the_Web">started</a> in 2011 and is based on the Linux kernel and Gecko rendering engine. The entire user interface is built using web technologies (HTML, CSS and JavaScript) and can be used to launch and use <a href="/en-US/Apps">web applications</a>. Since Mozilla <a href="https://discourse.mozilla-community.org/t/firefox-os-connected-devices-announcement/6864">discontinued</a> their commercial Firefox OS smartphone program the smartphone part of the project is entirely maintained by Mozilla's volunteer community, and branded as B2G OS.</p> + +<p><img alt="" src="https://mdn.mozillademos.org/files/13140/B2g_wordmark.png" style="display: block; margin: 0 auto;"></p> + +<h2 id="Index_of_pages">Index of pages</h2> + +<dl> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Automated_testing">Automated Testing of B2G OS</a></dt> + <dd class="landingPageList">This page offers articles that provide information about various aspects of testing B2G OS, including running different tests, automation, and result reporting and tracking.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Add-ons">B2G OS add-ons</a></dt> + <dd class="landingPageList">You should follow the below steps to get set up to start developing extensions.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/API">B2G OS APIs</a></dt> + <dd class="landingPageList">List of B2G OS APIs</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Architecture">B2G OS architecture</a></dt> + <dd class="landingPageList">This article is a high-level overview of the architecture of the B2G OS platform, introducing key concepts and explaining how its components interact at a basic level.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/B2G_OS_build_prerequisites">B2G OS build prerequisites</a></dt> + <dd class="landingPageList">Before obtaining the code to build B2G OS, even if you are simply trying to build Gaia, you need a properly configured <a href="https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions" title="https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions">build system</a> — this page shows you how. You can currently build on 64-bit Linux distributions and OS X.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Phone_guide">B2G OS phone guide</a></dt> + <dd class="landingPageList">This section contains developer information relevant to specific phones that run B2G OS — both developer and consumer devices.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Building_and_installing_B2G_OS">Building and installing B2G OS</a></dt> + <dd class="landingPageList">The articles listed on this page will guide you through building and installing B2G OS on an emulator or compatible device, or the <a href="/en-US/docs/Mozilla/B2G_OS/Platform/Gaia/Introduction_to_Gaia" title="Mozilla/B2G_OS/Platform/Gaia/Introduction to Gaia">Gaia</a> user interface in the Firefox browser.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Building">Building B2G OS</a></dt> + <dd class="landingPageList">Once you've <a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites" title="Mozilla/Firefox_OS/Firefox_OS_build_prerequisites">set up your build system</a> and performed your <a href="/en-US/docs/Mozilla/Firefox_OS/Preparing_for_your_first_B2G_build" title="Mozilla/Firefox_OS/Preparing_for_your_first_B2G_build">initial pull and configure</a> the code, you can build Boot to Gecko. This guide explains how.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Building_the_B2G_OS_simulator">Building the B2G OS Simulator</a></dt> + <dd class="landingPageList">Just like <a href="http://nightly.mozilla.org" title="http://nightly.mozilla.org">Firefox Nightlies</a>, the B2G OS simulator desktop client (identified by <em>b2g-</em>) is automatically built every day from the latest source code. The latest build is <a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/" title="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central/">available from the Mozilla FTP server</a>. Be sure to pick the latest version and the right archive for your operating system. This lets you bypass having to build it yourself. In addition, you don't have to download Gaia on your own either.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Choosing_how_to_run_Gaia_or_B2G">Choosing how to run Gaia or B2G</a></dt> + <dd class="landingPageList">Depending on your specific needs, you have an assortment of options to consider when experimenting with Firefox OS or the <a href="/en/Mozilla/Boot_to_Gecko/Introduction_to_Gaia" title="en/Mozilla/Boot_to_Gecko/Introduction_to_Gaia">Gaia</a> user interface. You can choose among the following options; each has its advantages and disadvantages to consider, and some are more flexible than others.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Crash_Reporting_Guide_for_Firefox_OS_Partners">Crash Reporting Guide for Firefox OS Partners</a></dt> + <dd class="landingPageList">Mozilla has a world-class system for collecting, analyzing, and fixing crashes and other stability issues such as hangs. Firefox OS partners need to work with Mozilla to correctly enable crash reporting and upload symbols.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Customization_with_the_.userconfig_file">Customization with the .userconfig file</a></dt> + <dd class="landingPageList">The <code>.userconfig</code> file isn't checked into source code control, so your changes won't be overwritten when you update your source tree. It needs to be created in the <a href="https://github.com/mozilla-b2g/B2G">root of the B2G tree</a>; that is, in the same directory as <code>flash.sh</code>, <code>build.sh</code>, and so forth. You should add this before you run your config and build steps.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Debugging">Debugging on Firefox OS</a></dt> + <dd class="landingPageList">There are two main types of debugging you'll want to with Firefox OS: debugging apps, and debugging other aspects of the system.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Developer_Mode">Developer Mode</a></dt> + <dd class="landingPageList">The current Firefox OS permissions model precludes modification and installation of certified/internal apps, which makes some device APIs completely unavailable to Marketplace and web apps. <strong>Developer Mode (DM)</strong> allows the user to indicate that they would like to relax the permissions model and expose all device APIs to content, as well as setting a group of related preferences. This article provides a high-level overview.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Developing_Firefox_OS">Developing Firefox OS</a></dt> + <dd class="landingPageList">This section provides useful documentation covering different ways in which Firefox OS (codename Boot2Gecko, or B2G) can be modified/customized during the build process, and how you can help to develop the low level platform areas such as <a href="/en-US/docs/Mozilla/Gecko">Gecko</a> and <a href="/en-US/Firefox_OS/Platform/Gonk">Gonk</a>.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Firefox_OS_apps">Firefox OS apps</a></dt> + <dd class="landingPageList">This section of the Firefox OS docs covers the specific techniques required — and available tools — for building Firefox OS apps. You'll find a number of details below, from Firefox OS building blocks/web components, to device APIs and App installation.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Board_guide">Firefox OS board guide</a></dt> + <dd class="landingPageList">This section contains developer information relevant to specific phones that run Firefox OS — both developer and consumer devices.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Releases">Firefox OS developer release notes</a></dt> + <dd class="landingPageList">This section provides articles covering each new release of Gaia and Gecko for Firefox OS, explaining what features were added and bugs eliminated in each update. There is also a linked summary table showing what APIs are supported by each version of Firefox OS.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Security">Firefox OS security</a></dt> + <dd class="landingPageList">The following articles cover security-related topics about Firefox OS. This includes overall security features as well as application security and how the install process is kept secure.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Simulator">Firefox OS Simulator</a></dt> + <dd class="landingPageList"><span style="line-height: 1.5;">The Firefox OS Simulator is <span style="line-height: 1.5;">a version of the higher layers of Firefox OS</span> that simulates a Firefox OS device, but runs on the desktop</span><span style="line-height: 1.5;">. This means that in many cases, you don't need a real device to test and debug your app. </span><span style="line-height: 1.5;">It runs in a window the same size as a Firefox OS device, includes the Firefox OS user interface and built-in apps, and simulates many of the Firefox OS device APIs.</span></dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Firefox_OS_usage_tips">Firefox OS usage tips</a></dt> + <dd class="landingPageList">Explains all of the developer features on the phone and what they do (Settings > Device information > More information > Developer)</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Developing_Gaia">Gaia</a></dt> + <dd class="landingPageList">Gaia is B2G OS's user interface and suite of default apps: it includes the lock screen, home screen, dialer, and other applications. Essentially, Gaia is a set of complex web apps that runs on top of the B2G OS platform. This set of articles covers all you need to know to contribute to the Gaia project.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Installing_on_a_mobile_device">Installing B2G OS on a mobile device</a></dt> + <dd class="landingPageList">Once you've built Boot to Gecko for a <a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites#Have_a_compatible_device_or_use_an_emulator">supported mobile device</a>, you can install it. This article will guide you through the process.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Introduction">Introduction to Firefox OS</a></dt> + <dd class="landingPageList">This set of documentation is aimed mainly at web developers and platform developers who want to learn how Firefox OS works, how to contribute to the project, and how to build their own custom versions of the software and install it on devices. For those who want to create and distribute their own web apps, the <a href="/en-US/Apps">App Center</a> and <a href="/en-US/Marketplace">Marketplace Zone</a> are good places to go.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Mulet">Mulet</a></dt> + <dd class="landingPageList">Following this guide you're going to run Gaia inside of a special build of Firefox called Firefox Mulet. This gives you the advantages of having a rapid development cycle, as well as standard web development tools and debuggers available to work with. First of all, you need to have the <a class="external external-icon" href="https://github.com/mozilla-b2g/gaia">Gaia</a> repo cloned on your machine and build your own profile. Then, you have to install mulet and run it, passing your Gaia profile as the profile to use.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Quickstart">Open web apps quickstart</a></dt> + <dd class="landingPageList">Quickstart information on coding Open Web Apps.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Pandaboard">Pandaboard</a></dt> + <dd class="landingPageList">This is a guide to setting up Firefox OS on a <a href="http://pandaboard.org/" title="http://pandaboard.org/">PandaBoard</a>. The PandaBoard is a low-cost OMAP 4 based development board for developing mobile operating systems.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/PasscodeHelper_Internals">PasscodeHelper Internals</a></dt> + <dd class="landingPageList">PasscodeHelper is a Gaia helper library for modifying and checking the Firefox OS lockscreen passcode (i.e., pin) from within Gaia, performing functions such as checking whether an entered passcode is correct, and changing the code. This article documents how PasscodeHelper works.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Porting_B2G_OS">Porting B2G OS</a></dt> + <dd class="landingPageList">This page lists the available resources for porting B2GOS.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Preparing_for_your_first_B2G_build">Preparing for your first B2G build</a></dt> + <dd class="landingPageList">Depending on your internet connection, the configuration steps may take several hours to download everything you need to build B2G OS. Waiting is not as fun as doing, so after you have read through this page and have kicked off the configure script, consider using the time to set up and try out the <a class="vt-p" href="/en-US/docs/Mozilla/Firefox_OS/Using_Firefox_OS_Simulator" title="/en-US/docs/Mozilla/Firefox_OS/Using_Firefox_OS_Simulator">B2G OS simulator</a>, begin familiarizing yourself with <a class="vt-p" href="/en-US/docs/Apps" title="/en-US/docs/Apps">Documentation for app developers</a> including Designing and Building an App, or familiarize yourself with the information on upcoming steps.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Resources">Resources</a></dt> + <dd class="landingPageList"><em>Resources for App hackers, as generated from our workshops</em></dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Running_Tests_on_Firefox_OS_for_Developers">Running tests on Firefox OS: A guide for developers</a></dt> + <dd class="landingPageList">If you are a Gecko developer, then you should review the Firefox OS-specific documentation for the test automation you are already familar with: <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/Mochitests">mochitest</a>, <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/Reftests">reftest</a>, and <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/XPCShell">xpcshell</a>.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Platform">The B2G OS platform</a></dt> + <dd class="landingPageList">The B2G OS platform consists of many components. While you don't need to understand its architecture in order to build applications that run on B2G OS, if you're working on developing or porting the platform — or are simply curious — the following documentation may be of interest to you.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Troubleshooting">Troubleshooting B2G OS</a></dt> + <dd class="landingPageList">This article provides tips for resolving common problems you may have while using B2G OS.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Using_the_App_Manager">Using the App Manager</a></dt> + <dd class="landingPageList">The App Manager is a tool for Firefox Desktop which provides a number of useful tools to help developers test, deploy and debug HTML5 web apps on Firefox OS phones & Simulator, directly from Firefox browser. This page documents how to use the App Manager.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Using_the_B2G_emulators">Using the B2G emulators</a></dt> + <dd class="landingPageList">This article provides a brief guide to some key things you should know when using the boot to Gecko emulators. This doesn't appear to be a complete user manual; instead, it simply tells you a few useful things that you might not learn on your own.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Web_applications">Web applications</a></dt> + <dd class="landingPageList">This page is intended to be a first, non thorough, attempt to collect web apps.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Bluetooth_API">Web Bluetooth API (Firefox OS)</a></dt> + <dd class="landingPageList">The Web Bluetooth API lets an open web app discover, pair with, and connect to Bluetooth devices. As it is a completely experimental and non-standard API, the Bluetooth API is currently available for certified applications only. However, there is some traction to have such an API available for regular Web content; this will be discussed as part of the <a href="http://www.w3.org/2012/sysapps/">W3C's System Applications Working Group</a>.</dd> + <dt class="landingPageList"><a href="/en-US/docs/Archive/B2G_OS/Web_Telephony_API">Web Telephony API</a></dt> + <dd class="landingPageList">Web Telephony is an API that makes it possible for web content to handle voice phone calls using JavaScript.</dd> +</dl> + +<h2 id="Old_page_content">Old page content</h2> + +<div class="blockIndicator note"> +<p><strong>Note</strong>: <a href="https://wiki.mozilla.org/B2G/Transition_Project/Call_For_Contribution">Call for contribution</a> & <a href="https://discourse.mozilla-community.org/t/updated-9th-july-call-for-app-maintainers-adopt-an-app/9300/1">Call for App adoption</a> has been made to gather more people, feel free to share it !</p> +</div> + +<div class="column-container"> +<div class="column-third"> +<h2 id="How_you_can_help">How you can help</h2> + +<ul> + <li>File & fix bugs (meta bug is <a class="external text" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1252143" rel="nofollow">bug 1252143</a>)</li> + <li>Help us fix failing <a class="external text" href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Automated_testing" rel="nofollow">tests</a></li> + <li>Port a gaia <a href="https://mozilla-b2g.github.io/gaia/">smartphone app</a>: + <ol> + <li>Turn it into a webapp (or)</li> + <li>Turn it into chrome:// (<a href="https://discourse.mozilla-community.org/t/why-gaia-apps-are-turned-to-chrome/8011">why?</a>) & report back<span style="display: none;"> </span><span style="display: none;"> </span><span style="display: none;"> </span></li> + </ol> + </li> + <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/B2G_OS/Porting_B2G_OS">Port B2G OS to your phone</a> or help us to maintain a port</li> + <li>Help improve translate this documentation & wiki</li> + <li>Propose & implement new smartphone features</li> +</ul> +</div> + +<div class="column-third"> +<h2 id="Get_involved"> Get involved</h2> + +<ul> + <li>Mailing list (<a class="external text" href="https://lists.mozilla.org/listinfo/dev-fxos" rel="nofollow">dev-fxos</a>)</li> + <li><a class="external text" href="https://wiki.mozilla.org/IRC" rel="nofollow">IRC</a> (irc.mozilla.org Channel: #b2g)</li> + <li><a href="https://discourse.mozilla-community.org/c/b2g-os-participation">Discourse </a></li> + <li><a class="external text" href="https://telegram.me/B2GOS" rel="nofollow">Telegram Group</a></li> + <li>Follow us on <a href="https://twitter.com/Boot2Gecko">Twitter</a>, or just look for <a href="https://twitter.com/hashtag/B2GOS?src=hash">#B2GOS</a></li> + <li><a href="https://wiki.mozilla.org/B2G/Transition_Project/Working_Groups">Working Groups</a></li> + <li>Documentation issues tracker on <a href="https://github.com/mozilla-b2g/B2GOS-community/issues">GitHub</a></li> + <li><a class="external text" href="https://wiki.mozilla.org/B2G/Meeting" rel="nofollow">B2G Weekly Meeting</a> for engineering status updates</li> +</ul> + +<p>To participate in meetings and community Working Groups meetings, register on this <a href="https://calendar.google.com/calendar/embed?src=mozilla.com_2d3638353137343333373332@resource.calendar.google.com">Calendar</a>. They are announced on <a href="https://discourse.mozilla-community.org/c/b2g-os-participation">Discourse</a>, where you can find information about how to attend & notes.</p> +</div> + +<div class="column-third"> +<h2 id="Compatible_devices">Compatible devices</h2> + +<ul> + <li><a href="https://discourse.mozilla-community.org/t/building-b2g-os-for-aries-z3c/8082">Sony Xperia Z3C</a> (developer phone)</li> + <li><a href="https://discourse.mozilla-community.org/t/flame-builds/8548">Flame </a>(developer phone)</li> + <li><a href="https://discourse.mozilla-community.org/t/zte-open-c/8402">ZTE Open C</a></li> + <li><a href="https://discourse.mozilla-community.org/t/test-b2gos-on-nexus-5/9405/1">Nexus 5</a></li> + <li>WileyFox Swift</li> + <li>Nexus 4 (WIP*)</li> + <li><a href="https://discourse.mozilla-community.org/t/fairphone-2-support-for-b2g-installer-landed/8334">Fairphone 2 </a> (WIP*)</li> + <li><a href="https://discourse.mozilla-community.org/t/b2g-os-flamingo-sony-xperia-e3-builds/8361">Sony Xperia E3 </a> (WIP*)</li> + <li><a href="https://discourse.mozilla-community.org/t/support-for-amami-xperia-z1c-building-debugging-providing-builds/8348">Sony Xperia Z1C</a> (WIP*)</li> + <li><a href="https://discourse.mozilla-community.org/t/wip-xiaomi-redmi-1s-hongmi-1s/10273">Xiaomi Redmi 1S</a> (WIP*)</li> +</ul> + +<p>For more information see this <a href="/en-US/docs/Mozilla/B2G_OS/Building_and_installing_B2G_OS/Compatible_Devices">page</a>.<br> + Flash you device easily with <a href="/en-US/docs/Mozilla/Firefox_OS/Building_and_installing_Firefox_OS/B2G_installer_add-on">B2G installer</a>.<br> + Your device is not in the list ? Try <a href="https://developer.mozilla.org/en-US/docs/Mozilla/B2G_OS/Mulet">Mulet </a>on desktop.</p> + +<p>*WIP = Work In Progress.</p> +</div> +</div> + +<div class="hidden"> +<h2 id="Subnav">Subnav</h2> + +<section class="Quick_links" id="Quick_Links"> +<ol> + <li><strong><a href="/en-US/docs/Archive/B2G_OS">B2G OS</a></strong></li> + <li><strong><a href="/en-US/docs/Archive/B2G_OS/Firefox_OS_apps">Firefox OS apps</a></strong></li> + <li class="toggle"> + <details><summary><a href="/en-US/docs/Archive/B2G_OS/Building_and_installing_B2G_OS">Build and install</a></summary> + <ol> + <li><a href="/en-US/docs/Archive/B2G_OS/Building_and_installing_B2G_OS/B2G_OS_build_process_summary">B2G OS build process summary</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/B2G_OS_build_prerequisites">Build prerequisites</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Preparing_for_your_first_B2G_build">Preparing for your first build</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Building">Building B2G OS</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Building_and_installing_B2G_OS/B2G_installer_add-on">B2G installer add-on</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Building_and_installing_B2G_OS/Building_for_Flame_on_OS_X">Building B2G OS for Flame on Mac OS X</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Choosing_how_to_run_Gaia_or_B2G">Choosing how to run Gaia or B2G OS</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Building_and_installing_B2G_OS/Compatible_Devices">Compatible Devices</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Installing_on_a_mobile_device">Installing B2G OS on a mobile device</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Building_and_installing_B2G_OS/B2G_OS_update_packages">Creating and applying B2G OS update packages</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Building/FOTA_community_builds">Building and installing FOTA community builds</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Building_and_installing_B2G_OS/B2G_Build_Variables_Reference_Sheet">B2G build variables reference sheet</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary><a href="/en-US/docs/Archive/B2G_OS/Porting_B2G_OS">Porting B2G OS</a></summary> + <ol> + <li><a href="/en-US/docs/Archive/B2G_OS/Porting_B2G_OS/basics">Porting basics</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Porting_B2G_OS/Porting_on_CyanogenMod">Porting on CyanogenMod</a></li> + </ol> + </details> + </li> + <li class="toggle"> + <details><summary><a href="/en-US/docs/Archive/B2G_OS/Developing_Gaia">Developing Gaia</a></summary> + <ol> + <li><a href="/en-US/docs/Archive/B2G_OS/Developing_Gaia/Running_the_Gaia_codebase">Running the Gaia codebase</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Mulet">Run Gaia on desktop using Mulet</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Developing_Gaia/Understanding_the_Gaia_codebase">Understanding the Gaia codebase</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Developing_Gaia/Making_Gaia_code_changes">Making Gaia code changes</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Developing_Gaia/Testing_Gaia_code_changes">Testing Gaia code changes</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Developing_Gaia/Submitting_a_Gaia_patch">Submitting a Gaia patch</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Developing_Gaia/Build_System_Primer">Gaia build system primer</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Developing_Gaia/Different_ways_to_run_Gaia">Different ways to run Gaia</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Developing_Gaia/make_options_reference">Make options reference</a></li> + <li><a href="/en-US/docs/Archive/B2G_OS/Developing_Gaia/Gaia_tools_reference">Gaia tools reference</a></li> + </ol> + </details> + </li> + <li><a href="/en-US/docs/Archive/B2G_OS/API">B2G OS APIs</a></li> +</ol> +</section> +</div> diff --git a/files/vi/archive/b2g_os/platform/gaia/hacking/index.html b/files/vi/archive/b2g_os/platform/gaia/hacking/index.html new file mode 100644 index 0000000000..c8e9a219f2 --- /dev/null +++ b/files/vi/archive/b2g_os/platform/gaia/hacking/index.html @@ -0,0 +1,332 @@ +--- +title: Hacking Gaia +slug: Archive/B2G_OS/Platform/Gaia/Hacking +translation_of: Firefox_OS/Developing_Gaia +--- +<div class="warning"> + <p>Trang này nhằm tới các nhà phát triển của dự án Gaia. Nếu bạn đang tìm kiếm thông tin về việc làm thế nào để tạo dựng và chạy hệ điều hành Firefox( Firefox OS), bạn nên tham khảo <a href="/en-US/docs/Mozilla/Firefox_OS/Building_and_installing_Firefox_OS" title="/en-US/docs/Mozilla/Firefox_OS/Building_and_installing_Firefox_OS">Building and installing Firefox OS page</a> thay thế.</p> +</div> +<div class="summary"> + <p><span class="seoSummary">Gaia là bộ sưu tập những <a href="https://developer.mozilla.org/apps" rel="nofollow">web apps</a> nhằm tạo nên bộ mặt cho <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS">Firefox OS</a>. Mọi thứ bạn thấy trên màn hình Firefox được xây dựng bằng các công nghệ Web mở. Bao gồm màn hình chính (home screen) và toàn bộ các ứng dụng mặc định. Bài viết này cung cấp một hướng dẫn chi tiết để tinh chỉnh, sửa đổi cho Gaia. </span></p> +</div> +<h2 id="Nhận_mã_nguồn">Nhận mã nguồn</h2> +<p>Để nhận mã nguồn của Gaia <a href="https://github.com/mozilla-b2g/gaia" title="https://github.com/mozilla-b2g/gaia">fork us on GitHub</a> và sau đó tạo bản sao fork của bạn bằng cách sử dụng <a href="http://git-scm.com/" title="http://git-scm.com/">git</a>.</p> +<pre>$ git clone https://github.com/mozilla-b2g/gaia.git</pre> +<h2 id="Chạy_Gaia">Chạy Gaia</h2> +<p>Bạn có thể chạy Gaia trên màn hình Desktop, trong Firefox hoặc trên một thiết bị di động tích hợp sẵn.</p> +<h3 id="Màn_hình_nền_B2G">Màn hình nền B2G</h3> +<p>Màn hình B2G là một loại màn hình nền xây dựng dựa trên ứng dụng thời gian chạy (runtime app) dùng trong các thiết bị sử dụng hệ điều hành Firefox, cái mà bạn có thể dùng để chạy Gaia trên màn hình nền máy tính của bạn.</p> +<p>Bạn có thể tải về một bản <a href="http://nightly.mozilla.org/#Desktop%20Boot2Gecko">nightly build của B2G desktop</a> từ <a href="http://nightly.mozilla.org/">Firefox Nightly site</a>. Dựa trên phiên bản mà bạn đang nhắm tới, bạn có thể muốn một phiên bản cụ thể-mới nhất nào đó của mozilla-b2g18. Đã có sẵn các phiên bản cho Linux(32 bit và 64 bit), Mac OS X và Windows.</p> +<p>Nightly builds gồm phiên bản hiện tại của Gaia. Sau khi bạn đã tải về bản nén, tất cả những gì bạn cần làm là giải nén nó vào một thư mục và chạy tệp b2g trong thư mục vừa được giải nén.</p> +<pre>$ cd b2g +$ ./b2g</pre> +<p>Để chạy B2G với phiên bản Gaia dành cho nhà phát triển, đầu tiên bạn cần tạo một hồ sơ cá nhân từ bản sao của bạn:</p> +<pre>$ cd /path/to/gaia +$ DEBUG=1 DESKTOP=0 make</pre> +<p>Việc này sẽ tạo một mục trong thư mục <code>gaia</code> của bạn, tên là <code>profile</code>. Phần <code>DEBUG</code> có vai trò như ứng dụng chủ nhà trên máy chủ web tích hợp sẵn, chứ không phải gói ứng dụng mặc định cần phải làm lại gói sau mỗi lần thay đổi. Bạn có thể tìm đường dẫn đến thư mục hồ sơ bằng cách nhìn vào dòng cuối của thư mục xuất sau khi chạy dòng lệnh trên, nó sẽ phải trông như thế này:</p> +<pre>Profile Ready: please run [b2g|firefox] -profile /path/to/gaia/profile</pre> +<p>Sau đó bạn có thể chạy màn hình nền B2G với hồ sơ bạn vừa tạo như sau:</p> +<pre>$ ./b2g /path/to/gaia/profile</pre> +<p>Nếu muốn bạn có thể tạo màn hình B2G của chính mình từ nguồn.</p> +<div class="note"> + <p><strong>Ghi chú :</strong> Trên Mac OS X, tệp <code>b2g</code> sẽ nằm trong B2G.app. Bạn sẽ cần chạy:</p> + <p><code>./B2G.app/Contents/MacOS/b2g /path/to/gaia/profile</code></p> +</div> +<h3 id="Sử_dụng_Gaia_trong_Firefox">Sử dụng Gaia trong Firefox</h3> +<p>Gaia cũng có thể chạy trong Firefox. Nó sẽ cho bạn một số lợi ích trong việc có một vòng tròn phát triển (development cycle) siêu tốc, cùng với các công cụ phát triển Web tiêu chuẩn và các debugger.Xem <a href="/en-US/Firefox_OS/Hacking_Firefox_OS/Quickstart_guide_to_Gaia_development">Quickstart guide to Gaia development</a> trong Firefox để biết chi tiết cách làm.</p> +<h3 id="Sử_dụng_Gaia_trên_các_thiết_bị">Sử dụng Gaia trên các thiết bị</h3> +<p>Nếu bạn có một thiết bị di động tích hợp sẵn, bạn có thể chạy Gaia bằng cách cài nó vào hệ điều hành Firefox. Xem <a href="/en-US/docs/Mozilla/Firefox_OS/Building_and_installing_Firefox_OS" title="Mozilla/Firefox_OS/Building_and_installing_Firefox_OS">Building and installing Firefox OS</a> để biết thêm chi tiết. Chúng tôi cũng có những tài liệu về <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Testing" title="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Testing">how to test Firefox OS</a>.</p> +<h2 id="Kiểm_tra_đơn_vị">Kiểm tra đơn vị</h2> +<p>Xem <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/Gaia_unit_tests" title="Mozilla/Firefox_OS/Platform/Testing/Gaia_unit_tests">Gaia unit tests</a> để biết các tài liệu về việc làm thế nào để tạo và chạy quá trình kiểm tra đơn vị cho Gaia.</p> +<h2 id="Nộp_hồ_sơ_lỗi">Nộp hồ sơ lỗi</h2> +<p>Các hồ sơ lỗi được nộp cho Bugzilla qua <a href="https://bugzilla.mozilla.org/buglist.cgi?product=Firefox OS&component=Gaia&resolution=---" rel="nofollow">Firefox OS > Gaia</a>. Đệ trình một lỗi mới <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox OS" title="https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox OS">qua tính năng của Gaia</a> (hoặc một trong những tính năng phụ).</p> +<h2 id="Đóng_góp_cho_Gaia">Đóng góp cho Gaia</h2> +<p>Mozilla dựa trên những đóng góp từ nguồn cộng đồng mở giúp phát triển các ứng dụng Gaia, và chúng tôi mừng là bạn đã tham gia.</p> +<p>Một vài chỗ thú vị để tìm lỗi và bắt đầu làm việc:</p> +<ul> + <li><a href="https://bugzilla.mozilla.org/buglist.cgi?quicksearch=component:gaia%20sw:polish%20@nobody;list_id=4566236" rel="nofollow">Unowned Gaia polish bugs on Bugzilla</a></li> + <li><a href="http://www.joshmatthews.net/bugsahoy/?b2g=1" rel="nofollow">Mentored bugs</a></li> +</ul> +<h3 id="Phong_cách_mã_hóa_cơ_bản">Phong cách mã hóa cơ bản</h3> +<ul> + <li>Nền: + <ul> + <li><a href="/en-US/docs/Developer_Guide/Coding_Style#General_practices" title="Developer_Guide/Coding_Style#General_practices">Coding Style: General practices</a></li> + <li><a href="/en-US/docs/Developer_Guide/Coding_Style#JavaScript_practices" title="Developer_Guide/Coding_Style#JavaScript_practices">Coding Style: JavaScript practices</a></li> + <li><a href="/en-US/docs/Developer_Guide/Coding_Style#Naming_and_formatting_guide" title="Developer_Guide/Coding_Style#Naming_and_formatting_guide">Coding Style: Naming and formatting guide</a></li> + </ul> + </li> + <li>Đảm bảo rằng các tệp HTML đã được xác nhận <code><!DOCTYPE html></code> (có nghĩa là các văn bản HTML5). Nếu không Internet Explorer9 và mới hơn sẽ chạy nó dưới dạng tương thích sẵn.</li> + <li>Bao gồm <code>"use strict";</code> khai báo (bao gồm dấu ngoặc kép) đến các tệp JavaScript của bạn để đưa chúng vào chế độ nghiêm ngặt.</li> + <li>Luôn luôn dùng hai dấu cách để thụt đầu dòng, không nên dùng Tab.</li> + <li>Sử dụng dấu ngắt dòng để tách các đoạn mã logic!</li> + <li>Những tên tệp có nhiều từ nên dùng dấu gạch dưới để phân tách giữa các từ, <code>nhu_nay.js</code>.</li> + <li>Sử dụng ngoặc đơn thay ngoặc kép để thể hiện xâu.</li> +</ul> +<h4 id="Các_điều_cần_biết">Các điều cần biết</h4> +<p>Sai:</p> +<pre>if (expression) doSomething(); +</pre> +<p>Đúng:</p> +<pre>if (expression) { + doSomething(); +} +</pre> +<p>Nếu bạn làm việc trên ứng dụng hệ thống, xem hướng dẫn tại <a href="https://groups.google.com/d/msg/mozilla.dev.gaia/rEhSrw6XmT4/UNvE7qW9pgYJ" title="See_here_for_some_rules._https://groups.google.com/d/msg/mozilla.dev.gaia/rEhSrw6XmT4/UNvE7qW9pgYJ">đây</a>.</p> +<p>Trước khi đệ trình một bản patch, chúng tôi khuyến nghị bạn hãy sử dụng lệnh <a href="https://developers.google.com/closure/utilities/docs/linter_howto" title="http://closure-linter.googlecode.com/svn/trunk/closure_linter/gjslint.py">gjslint</a> on it to check for any style errors:</p> +<pre>gjslint --nojsdoc my_file.js</pre> +<h3 id="Submitting_a_patch">Submitting a patch</h3> +<p>First file or assign a bug to yourself on <a href="https://bugzilla.mozilla.org/buglist.cgi?product=Firefox OS&component=Gaia&resolution=---" title="https://bugzilla.mozilla.org/buglist.cgi?product=Firefox OS&component=Gaia&resolution=---">Bugzilla</a>, you'll need a Bugzilla account.</p> +<p>Then create a branch on your fork of Gaia:</p> +<pre>$ git branch branchname +$ git checkout branchname</pre> +<p>Commit your changes:</p> +<pre>$ git add /file/to/add +$ git commit -m "Bug XXXXX - Fix the broken Gaia and save the world"</pre> +<p>Push your branch:</p> +<pre>$ git push origin branchname</pre> +<p>Send a pull request by navigating to the branch in your fork on GitHub and finding the pull request button.</p> +<div class="note"> + <p><strong>Note</strong>: Except under unusual circumstances, patches should be landing first on the master branch, not a release branch like v1-train, v1.3, etc. If they need to land on a release branch, they must go through the usual approval process as outlined on the <a href="https://wiki.mozilla.org/Release_Management/B2G_Landing">B2G Landing wiki page</a>.</p> +</div> +<p>To request a review of your patch, <a href="http://globau.wordpress.com/2013/10/21/github-pull-requests-and-bugzilla/">attach the pull request</a> to the bug in Bugzilla by referencing the URL of the pull request, and set the review ("r") flag to "?" and enter the bugzilla ID of one of the <a href="https://wiki.mozilla.org/Modules/FirefoxOS" title="https://wiki.mozilla.org/Modules/FirefoxOS">module owners and peers</a> (very important - otherwise your bug will not likely be seen by anyone). The <a href="https://addons.mozilla.org/en-US/firefox/addon/github-tweaks-for-bugzilla/" title="https://addons.mozilla.org/en-US/firefox/addon/github-tweaks-for-bugzilla/">Github tweaks for bugzilla extension on AMO</a> can help automate this process by automatically creating the attachment and adding it to the bug; you will still need to set the review flag on Bugzilla.</p> +<p>The reviewer may ask you to make some changes; you may need to amend the original commit and force push it to the original branch/pull request. Once they're happy with your patch, they will merge it into the master branch for you. Before they do this they would prefer it if you could squash all your changes into a single commit, so your contribution can be tracked easily.</p> +<p>The person who merges the commit (usually the reviewer) would add a <code>r=</code> flag in the comment of the merge commit.</p> +<h2 id="Make_options">Make options</h2> +<p>you use the <code>make</code> command inside the Gaia repo to create a Gaia profile that can be loaded onto your device or run in a <a href="/en-US/Firefox_OS/Using_the_B2G_desktop_client">B2G Desktop</a> build. This section looks in detail at the different make options available.</p> +<p>There are many environment variables present in the Makefile. Do not depend on them as they may be removed in the future.</p> +<p>Created profiles are stored in <code>/gaia/profile</code>, and contain the following items:</p> +<ul> + <li>defaults: Directory containing default settings to be reloaded after you reset the phone.</li> + <li>extensions: Directory containing extensions.</li> + <li>settings.json: Settings file.</li> + <li>user.js: Another file containing more settings/preferences.</li> + <li>webapps: Directory containing all the web apps that are to be installed on the phone.</li> +</ul> +<div class="note"> + <p><strong>Note</strong>: When you've already made a profile and you want to build a new one, you must delete the existing profile directory before trying to generate a new one.</p> +</div> +<h3 id="Default">Default</h3> +<pre class="brush: bash">make</pre> +<h3 id="Push_to_device">Push to device</h3> +<pre class="brush: bash">make install-gaia + +make reset-gaia</pre> +<p>With <a href="/en-US/Firefox_OS/Debugging/Installing_ADB">ADB</a> (Android Debug Bridge) setup, these make targets will push Gaia to the device. <code>reset-gaia</code> will purge all existing profiles, web apps and database entries (a new settings database will be initialized) before pushing Gaia from your working directory to your device ; <code>install-gaia</code> will just push updates of Gaia. There is also a third option:</p> +<pre class="brush: bash">make profile</pre> +<p>pushes only the existing profile.</p> +<h3 id="Production_make">Production make</h3> +<pre class="brush: bash">PRODUCTION=1 make</pre> +<p>This creates a production build of Gaia:</p> +<ul> + <li>Gaia is run as packaged apps, which are harder to debug, but are the best available state for apps in terms of available API permissions, etc.</li> + <li>Test apps are not included in the build</li> + <li>Remote debugging is turned off by default</li> + <li>Lock screen is turned on (which in turn will cut USB connections)</li> + <li>Marionette is turned off</li> + <li>First time user experience is turned on</li> + <li>Offline cache is used.</li> +</ul> +<div class="note"> + <p><strong>Note</strong>: You can also use the alias <code>make production</code>.</p> +</div> +<h3 id="Debug_make">Debug make</h3> +<pre class="brush: bash">DEBUG=1 make</pre> +<p>The <code>DEBUG</code> variable runs Gaia as hosted apps on a built-in web server on a specific <code>GAIA_PORT</code>, rather than the default of packaged apps which have to be re-packaged after every change; this makes things easier to test. Launching the profile with the latest Firefox Nightly will also give you nice B2G specific panels on the Firefox Developer Tools.</p> +<p>In addition:</p> +<ul> + <li>Test apps are included in the build.</li> + <li>Remote debugging is turned on by default.</li> + <li>Lock screen is turned off (USB connections won't be interrupted.)</li> + <li><a href="/en-US/docs/Mozilla/QA/Marionette">Marionette</a> is turned on, which is needed when running Gaia <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/Gaia_unit_tests" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/Gaia_unit_tests">unit tests</a>.</li> + <li>First time user experience is turned off.</li> + <li>Offline cache is not used, even if it is generated.</li> +</ul> +<h3 id="Device_debug_make">Device debug make</h3> +<pre class="brush: bash">DEVICE_DEBUG=1 make</pre> +<p>This disables screen lock on the device, and enables debugging with the ADB tool, so is useful for device debugging.</p> +<p>In Firefox OS version > 1.2, specify this param when you want to debug Firefox OS webapps with the <a href="/en-US/Firefox_OS/Using_the_App_Manager">App Manager</a>.</p> +<h3 id="Enable_remote_debugging">Enable remote debugging</h3> +<pre class="brush: bash">REMOTE_DEBUGGER=1</pre> +<p>This enables remote debugging on the device, the same as using the option in the <a href="/en-US/Firefox_OS/Debugging/Developer_settings#Remote_debugging">developer settings</a>.</p> +<h3 id="Debug_desktop_make">Debug desktop make</h3> +<pre class="brush: bash">DEBUG=1 DESKTOP=0 make</pre> +<p>This option creates a desktop debug version, for running inside <a href="/en-US/Firefox_OS/Using_the_B2G_desktop_client">B2G desktop</a>.</p> +<h3 id="Build_specific_apps">Build specific apps</h3> +<pre class="brush: bash">APP=system make + +APP=system make install-gaia</pre> +<p>With a profile already exists, <code>APP</code> allow you to specify which app to re-package, instead of re-packing and re-push all the Gaia apps.</p> +<h3 id="Official_Mozilla_branding_make">Official Mozilla branding make</h3> +<pre class="brush: bash">MOZILLA_OFFICIAL=1 make</pre> +<p>Use this to make an official Mozilla-branded build.</p> +<h3 id="Dogfood_make">Dogfood make</h3> +<pre class="brush: bash">DOGFOOD=1 make</pre> +<p>Dogfood is turned on.</p> +<h3 id="System_apps_make">System apps make</h3> +<pre class="brush: bash">B2G_SYSTEM_APPS=1 make</pre> +<p>This environment variable lets you push an app to <code>/system/b2g</code> instead of <code>/data/local</code>. You should use this when you work with a user build. This variable is automatically set when running <code>make production</code>. This can be used for <code>install-gaia</code> or <code>reset-gaia</code> too.</p> +<h3 id="JavaScript_optimization_make">JavaScript optimization make</h3> +<pre class="brush: bash">GAIA_OPTIMIZE=1 make</pre> +<p>This triggers an optimization pass on Gaia's JavaScript, concatenating/compressing the files. This is automatically set when running <code>make production</code>. This can be used for <code>install-gaia</code> or <code>reset-gaia</code> too.</p> +<h3 id="High_resolution_image_assets">High resolution image assets</h3> +<pre class="brush: bash">GAIA_DEV_PIXELS_PER_PX=1.5 make</pre> +<p>When packaging the app, this option replaces images with their <code>*@1.5x.(gif|jpg|png)</code> equivalents if such images exist. You need to use the above option as part of a standard <code>make</code> command, for example:</p> +<pre class="brush: bash">GAIA_DEV_PIXELS_PER_PX=1.5 make reset-gaia + +GAIA_DEV_PIXELS_PER_PX=1.5 make install-gaia</pre> +<p>Gaia is currently targetting the following screen resolutions:</p> +<ul> + <li>qHD: ~540×960; device pixel ratio = 1.6875</li> + <li>WVGA: ~480×800; device pixel ratio = 1.5</li> + <li>HBGA (320x240); device pixel ratio = 1</li> +</ul> +<p>use <code>GAIA_DEV_PIXELS_PER_PX</code> to make sure the images looks sharp on qHD and WVGA devices. see <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag#A_pixel_is_not_a_pixel" title="https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag#A_pixel_is_not_a_pixel">A pixel is not a pixel</a> for more information about device pixels per css pixels.</p> +<h3 id="Disable_first_time_user_guide">Disable first time user guide</h3> +<pre class="brush: bash">NOFTU=1 +</pre> +<p>Disable the first time user guide with this environment variable.</p> +<h3 id="Distribution_and_market_customization_build">Distribution and market customization build</h3> +<pre class="brush: bash">GAIA_DISTRIBUTION_DIR=./dir</pre> +<p>Read <a href="/en-US/Firefox_OS/Hacking_Firefox_OS/Market_customizations_guide">Market Customizations</a> for more details.</p> +<h3 id="Reference_Workloads">Reference Workloads</h3> +<p>Reference workloads allow developers/testers to quickly install a large amount of data in several applications, typically on a newly-flashed phone.</p> +<p>The commands are (from the gaia directory):</p> +<pre class="brush: bash">make reference-workload-light</pre> +<ul> + <li>200 contacts</li> + <li>200 sms messages</li> + <li>50 dialer history entries</li> + <li>20 gallery images</li> + <li>20 songs</li> + <li>5 videos</li> +</ul> +<pre class="brush: bash">make reference-workload-medium</pre> +<ul> + <li>500 contacts</li> + <li>500 sms messages</li> + <li>100 dialer history entries</li> + <li>50 gallery images</li> + <li>50 songs</li> + <li>10 videos</li> +</ul> +<pre class="brush: bash">make reference-workload-heavy</pre> +<ul> + <li>1000 contacts</li> + <li>1000 sms messages</li> + <li>200 dialer history entries</li> + <li>100 gallery images</li> + <li>100 songs</li> + <li>20 videos</li> +</ul> +<pre class="brush: bash">make reference-workload-x-heavy</pre> +<ul> + <li>2000 contacts</li> + <li>2000 sms messages</li> + <li>500 dialer history entries</li> + <li>250 gallery images</li> + <li>250 songs</li> + <li>50 videos</li> +</ul> +<p>These targets accept the <code>APP</code> environment variable, or an <code>APPS</code> environment variable that should contain the app names separated by a space, e.g.:</p> +<pre class="brush: bash">APP=sms make reference-workload-light +APPS="sms communications/contacts" make reference-workload-heavy +</pre> +<p>The apps available are:</p> +<pre class="brush: bash">APPS="gallery music video communications/contacts sms communications/dialer"</pre> +<p>In order to install music (songs) with reference workloads, the utility mid3v2 must be installed. This utility can be installed with:</p> +<pre class="brush: bash">sudo apt-get install python-mutagen</pre> +<p>If you run Fedora or RHEL instead, use:</p> +<pre class="brush: bash">sudo yum install python-mutagen</pre> +<h3 id="Documentation_make">Documentation make</h3> +<p>Gaia docs can be built, via jsdoc3. To generate these, you can use the following command:</p> +<pre class="brush: bash">make docs</pre> +<h3 id="Enabling_IME_layout_and_dictionaries">Enabling IME layout and dictionaries</h3> +<p>To enable keyboard IME layout and dictionaries enabled, use following command structure:</p> +<pre class="brush: bash">GAIA_KEYBOARD_LAYOUTS=en,zh-Hant-Zhuyin,el,de,fr,zh-Hans-Pinyin make</pre> +<h2 id="Customizing_the_build-time_apps">Customizing the build-time apps</h2> +<p>The apps that run on Firefox OS are all contained within the Gaia source tree, in one of two locations:</p> +<ul> + <li><code>gaia/apps</code>: This is where the system default apps are found, such as <code>calendar</code>, <code>email</code>, <code>settings</code>, etc.</li> + <li><code>gaia/external-apps</code>: This is where the Firefox Marketplace app is found (<code>marketplace.firefox.com</code>), and where apps subsequently installed by the user are stored.</li> + <li><code>gaia/showcase-apps</code>: This is a container for multiple showcase apps, for example a 3D Crystal Skull to show off WebGL performance on the device.</li> + <li><code>gaia/test-apps</code>: This directory is a repository for simple tests, designed to test simple B2G features.</li> + <li><code>gaia/external-apps</code>: This directory contains more tests.</li> + <li>There may be oters too, depending on the version of Gaia you have cloned.</li> +</ul> +<div class="note"> + <p><strong>Note</strong>: If you are building B2G rather than Gaia, the paths will of course have <code>B2G/</code> on the front, e.g. <code>B2G/gaia/apps</code> and <code>B2G/gaia/external-apps</code>.</p> +</div> +<p>If you want to omit some of these apps from your build of Gaia/B2G, you can do this in a few different ways:</p> +<ol> + <li> + <p>The "brute force" method is to simply delete the apps you don't want to be present at build time, before building.</p> + </li> + <li> + <p>The more refined method is to edit the <code>gaia/build/config/apps-*.list</code> files to include the paths to the apps you want to include at build time. For example, <code>gaia/build/config/apps-production.list </code>looks something like this:</p> + <pre class="brush: bash">apps/* +external-apps/* +outoftree_apps/*</pre> + <p>But you could also include specific apps rather than just picking them all, for example:</p> + <pre class="brush: bash">apps/clock</pre> + <p>The mechanism for choosing which <code>apps-*.list</code> file is used during the build to determine the available apps is contained inside <code>gaia/Makefile</code>:</p> + <pre class="brush: cpp">GAIA_APP_TARGET?=engineering +... +ifeq ($(MAKECMDGOALS), demo) +GAIA_DOMAIN=thisdomaindoesnotexist.org +GAIA_APP_TARGET=demo +else ifeq ($(MAKECMDGOALS), dogfood) +DOGFOOD=1 +else ifeq ($(MAKECMDGOALS), production) +PRODUCTION=1 +endif +... +ifeq ($(PRODUCTION), 1) +GAIA_OPTIMIZE=1 +GAIA_APP_TARGET=production +endif + +ifeq ($(DOGFOOD), 1) +GAIA_APP_TARGET=dogfood +endif +... +ifndef GAIA_APP_CONFIG +GAIA_APP_CONFIG=build$(SEP)config$(SEP)apps-$(GAIA_APP_TARGET).list +endif</pre> + <p>Initially, the <code>GAIA_APP_TARGET</code> variable is set to <code>engineering</code>, so by default building gaia from source will use <code>app-engineering.list</code> (which includes all the tests, demos, etc.):</p> + <pre class="brush: bash">make +</pre> + <p>To specify usage of a different apps list you specify different options when running the make command. To build with <code>apps-production.list</code>, for example, you'd use</p> + <pre class="brush: bash">PRODUCTION=1 make</pre> + <ul> + <li>If you specifically build with <code>DEMO=1</code> specified, then it will use <code>apps-demo.list</code>.</li> + <li>If you specifically build with <code>DOGFOOD=1</code> specified, then it will use <code>apps-dogfood.list</code>.</li> + <li>You can completely override the decision by using <code>GAIA_APP_CONFIG</code> and providing your own <code>apps-*.list</code> file.</li> + </ul> + <p><code>gaia/Android.mk</code> contains these lines:</p> + <pre class="brush: cpp">ifneq ($(filter user userdebug, $(TARGET_BUILD_VARIANT)),) +GAIA_MAKE_FLAGS += PRODUCTION=1 +B2G_SYSTEM_APPS := 1 +endif</pre> + <p>When you build, if <code>VARIANT=user</code> or <code>VARIANT=userdebug</code> are set (these wind up getting reflected in the <code>TARGET_BUILD_VARIANT</code> variable), <code>PRODUCTION=1</code> is automatically set when building gaia.</p> + </li> + <li> + <p>The third, and most refined (but most complex) method is to use customizations. These allow you to specify build-time customization instructions in separate difrectories, without modifying the core Gaia repo. You can include your own customizations in distinct directories, or use the preexisting directories that come with the source.</p> + <p>For example, the basic Firefox tablet customized app list is defined in <code>apps.list</code> under the <a href="https://github.com/mozilla-b2g/gaia/tree/master/distribution_tablet"><code>distribution_tablet</code></a> folder (<code>gaia/distribution_tablet</code>). These customizations can be applied at build time using options like this:</p> + <pre class="brush: bash">GAIA_DISTRIBUTION_DIR=distribution_tablet make</pre> + <div class="note"> + <p><strong>Note</strong>: Customizations is its own separate topic entirely. To learn more about it, read <a href="/en-US/Firefox_OS/Hacking_Firefox_OS/Market_customizations_guide">Market Customizations</a>.</p> + </div> + <div class="note"> + <p><strong>Note</strong>: If you want to include custom external apps as part of your Gaia build, you need to build them in a specific way, and then place them into the <code>gaia/external-apps/</code> folder. Read <a href="/en-US/Firefox_OS/Hacking_Firefox_OS/Market_customizations_guide#Building_Prebundled_web_apps">Building Prebundled web apps</a> to find out how.</p> + </div> + </li> +</ol> +<div class="warning"> + <p><strong>Important</strong>: If you are a device vendor creating a custom B2G/Gaia build for distribution, you need to satisfy certain criteria before you are allowed to include the Firefox Marketplace app on your phones/tablets/etc. Contact Mozilla for more details.</p> +</div> +<h2 id="Contacting_the_Team">Contacting the Team</h2> +<ul> + <li><a href="https://lists.mozilla.org/listinfo/dev-gaia" rel="nofollow">Gaia Mailing List</a></li> + <li>#gaia IRC channel on irc.mozilla.org</li> +</ul> diff --git a/files/vi/archive/b2g_os/platform/gaia/index.html b/files/vi/archive/b2g_os/platform/gaia/index.html new file mode 100644 index 0000000000..55c335022e --- /dev/null +++ b/files/vi/archive/b2g_os/platform/gaia/index.html @@ -0,0 +1,62 @@ +--- +title: Gaia +slug: Archive/B2G_OS/Platform/Gaia +tags: + - B2G + - Gaia + - Mobile + - NeedsTranslation + - TopicStub +translation_of: Archive/B2G_OS/Platform/Gaia +--- +<p>Gaia is the user interface level of <a href="/en-US/docs/Mozilla/Firefox_OS" title="Mozilla/Firefox_OS">Firefox OS</a>. Everything that appears on the screen after Firefox OS starts up is drawn by Gaia, including the lock screen, home screen, dialer, and other applications. Gaia is written entirely in <a href="/en-US/docs/en-US/HTML" title="HTML">HTML</a>, <a href="/en-US/docs/CSS" title="CSS">CSS</a>, and <a href="/en-US/docs/JavaScript" title="JavaScript">JavaScript</a>. Its only interface to the underlying operating system and hardware is through standard Web APIs, which are implemented by <a href="/en-US/docs/Gecko" title="Gecko">Gecko</a>.</p> + +<p>Because of this design, not only can Gaia be run on Firefox OS devices, but also on other operating systems and in other web browsers (albeit with potentially degraded functionality depending on the capabilities of the browser).</p> + +<p>Third party applications onto the device installed alongside Gaia can be launched by Gaia.</p> + +<table class="topicpage-table"> + <tbody> + <tr> + <td> + <h2 class="Documentation" id="Documentation" name="Documentation">Documentation about Gaia</h2> + + <dl> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Introduction_to_Gaia" title="Mozilla/Boot_to_Gecko/Introduction to Gaia">Introduction to Gaia</a></dt> + <dd>Gaia is the user interface application for Firefox OS devices; it's simply a Web application running atop the Firefox OS software stack. This guide introduces Gaia at a high level.</dd> + <dt><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Gaia_apps">Gaia apps</a></dt> + <dd>Information on each of the default apps available in the Gaia family, including tips on how to use them, and how to modify them.</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Hacking" title="Mozilla/Boot_to_Gecko/Gaia hacking guide">Gaia hacking guide</a></dt> + <dd>A guide to hacking and modifying the Gaia interface.</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Build_System_Primer" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Build_System_Primer">Gaia Build System Primer</a></dt> + <dd>Most of the meaningful work for the build steps are performed by the scripts that live inside the build/ subdirectory of Gaia.</dd> + <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Hacking_Tips_And_FAQ" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Hacking_Tips_And_FAQ">Gaia Hacking Tips And FAQ</a></dt> + <dd>A list of helpful tips and frequently asked questions around hacking on Gaia.</dd> + </dl> + + <p><span class="alllinks"><a href="/en-US/docs/tag/Gaia" title="tag/B2G">View All...</a></span></p> + </td> + <td> + <h2 class="Related_Topics" id="Related_Topics" name="Related_Topics">Related topics</h2> + + <ul> + <li><a href="/en-US/docs/Mobile" title="Mobile">Mobile</a></li> + <li><a href="/en-US/docs/Web" title="/en-US/docs/Web">Web Technology for developer</a> + <ul> + <li><a href="/en-US/docs/HTML" title="HTML">HTML</a></li> + <li><a href="/en-US/docs/CSS" title="CSS">CSS</a></li> + <li><a href="/en-US/docs/JavaScript" title="JavaScript">JavaScript</a></li> + </ul> + </li> + <li><a href="/en-US/docs/WebAPI" title="/en-US/docs/WebAPI">WebAPI</a></li> + </ul> + + <h2 class="Tools" id="Resources" name="Resources">Resources</h2> + + <ul> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Architecture" title="Mozilla/Firefox_OS/Architecture">Firefox OS architecture overview</a></li> + </ul> + </td> + </tr> + </tbody> +</table> diff --git a/files/vi/archive/b2g_os/platform/index.html b/files/vi/archive/b2g_os/platform/index.html new file mode 100644 index 0000000000..5708ef1ee5 --- /dev/null +++ b/files/vi/archive/b2g_os/platform/index.html @@ -0,0 +1,82 @@ +--- +title: The Firefox OS platform +slug: Archive/B2G_OS/Platform +tags: + - B2G + - Firefox OS + - Landing + - NeedsTranslation + - TopicStub +translation_of: Archive/B2G_OS/Platform +--- +<p>The Firefox OS platform consists of many components. While you don't need to understand its architecture in order to build applications that run on Firefox OS, if you're working on developing or porting the platform—or are simply curious—the following documentation may be of interest to you.</p> +<table class="topicpage-table"> + <tbody> + <tr> + <td> + <h2 class="Documentation" id="Documentation" name="Documentation">Documentation about the Firefox OS platform</h2> + <dl> + <dt> + <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia">Gaia</a></dt> + <dd> + Documentation about Gaia, the user interface application for Firefox OS devices; this is a Web application running atop the Firefox OS software stack.</dd> + <dt> + <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Gonk" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Gonk">Gonk</a></dt> + <dd> + Documentation about Gonk, the operating system layer underneath Gaia. This consists of a Linux kernel and a hardware abstraction layer to which Gecko communicates.</dd> + <dt> + <a href="/en-US/docs/Mozilla/Gecko" title="/en-US/docs/Mozilla/Gecko">Gecko</a></dt> + <dd> + Gecko is the layer of Firefox OS that provides the same open web standards implementation used by Firefox and Thunderbird, as well as many other applications.</dd> + <dt> + <a href="/en-US/docs/Mozilla/Firefox_OS/Security" title="/en-US/docs/Mozilla/Firefox_OS/Security"> Security</a></dt> + <dd> + Documentation about security in Firefox OS; this includes topics about security devices from every perspective: for app developers, device integrators, and so forth.</dd> + <dt> + <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Feature_support_chart" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Feature_support_chart">Feature support chart</a></dt> + <dd> + A chart of which features are available in which types of Firefox OS builds.</dd> + <dt> + <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Architecture" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Architecture">Firefox OS architecture overview</a></dt> + <dd> + An overview of how Firefox OS is structured internally; this is primarily of interest to platform developers and people doing porting work.</dd> + <dt> + <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Apps_architecture" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Apps_architecture">Firefox OS apps architecture</a></dt> + <dd> + An overview of the application model on Firefox OS.</dd> + <dt> + <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Settings_list" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Settings_list">Firefox OS settings list</a></dt> + <dd> + A list of common setting names that can be used with the <a href="/en-US/docs/WebAPI/Settings" title="/en-US/docs/WebAPI/Settings">Settings</a> API.</dd> + </dl> + <p><span class="alllinks"><a href="/en-US/docs/tag/B2G" title="/en-US/docs/tag/B2G">View All...</a></span></p> + </td> + <td> + <h2 class="Community" id="Community" name="Community">Getting help from the community</h2> + <p>If you're working with Firefox OS, or developing applications you'd like to run on Firefox OS devices, there are community resources to help you!</p> + <ul> + <li>Consult the Boot to Gecko project forum: {{ DiscussionList("dev-b2g", "mozilla.dev.b2g") }}</li> + </ul> + <ul> + <li>Ask your question on Mozilla's Boot to Gecko IRC channel: <a class="link-irc" href="irc://irc.mozilla.org/b2g" title="irc://irc.mozilla.org/b2g">#b2g</a></li> + </ul> + <p><span class="alllinks"><a class="external" href="http://www.catb.org/~esr/faqs/smart-questions.html" title="http://www.catb.org/~esr/faqs/smart-questions.html">Don't forget about the <em>netiquette</em>...</a></span></p> + <br> + <h2 class="Related_Topics" id="Related_Topics" name="Related_Topics">Related topics</h2> + <ul> + <li><a href="/en-US/docs/Mobile" title="en-US/docs/Mobile">Mobile</a></li> + <li><a href="/en-US/docs/HTML" title="en-US/docs/HTML">HTML</a></li> + <li><a href="/en-US/docs/CSS" title="en-US/docs/CSS">CSS</a></li> + <li><a href="/en-US/docs/JavaScript" title="en-US/docs/JavaScript">JavaScript</a></li> + </ul> + <h2 class="Tools" id="Resources">Resources</h2> + <ul> + <li><a class="link-https" href="https://wiki.mozilla.org/B2G/FAQ" title="B2G/FAQ">Mozilla wiki FAQ</a></li> + <li><a class="link-https" href="https://wiki.mozilla.org/B2G/Schedule_Roadmap" title="https://wiki.mozilla.org/B2G/Schedule_Roadmap">Roadmap</a></li> + <li><a href="/en-US/docs/Mozilla/Firefox_OS/Feature_support_chart" title="/en-US/docs/Mozilla/Firefox_OS/Feature_support_chart">Feature support chart</a></li> + </ul> + </td> + </tr> + </tbody> +</table> +<p> </p> diff --git a/files/vi/archive/b2g_os/simulator/index.html b/files/vi/archive/b2g_os/simulator/index.html new file mode 100644 index 0000000000..31251142c9 --- /dev/null +++ b/files/vi/archive/b2g_os/simulator/index.html @@ -0,0 +1,60 @@ +--- +title: Môi trường giả lập Firefox OS +slug: Archive/B2G_OS/Simulator +translation_of: Archive/B2G_OS/Simulator +--- +<div class="note"> + <p>Trang này mô tả trình giả lập của Firefox OS dành cho các lập trình viên sử dụng phiên bản Firefox OS từ 1.2 trở lên. Nếu bạn đang thiết kế ứng dụng cho phiên bản 1.1, bạn nên sử dụng <a href="/en-US/docs/Tools/Firefox_OS_1.1_Simulator">Trình giả lập cho Firefox OS 1.1</a>.</p> +</div> +<p><span style="line-height: 1.5;">Trình giả lập Firefox OS cho phép chạy hệ điều hành này trên máy tính thay vì các thiết bị được thiết kế chuyên biệt. Điều đó có nghĩa là bạn không cần thiết phải có một thiết bị thực để kiểm tra và chạy thử ứng dụng. Nó cho phép bạn chạy ứng dụng với kích cỡ màn hình tương tự trên thiết bị thực tế chạt Firefox OS, mô phỏng lại các giao diện người dùng, cài sẵn một số ứng dụng cũng như cung cấp các hàm APIs cần thiết.</span></p> +<p><span style="line-height: 1.5;">Trình giả lập được sử dụng như một trình cắm của trình duyệt Firefox. Ngay sau khi hoàn tất tải và cài đặt trình cắm này, bạn đã có thể sử dụng, thử nghiệm ứng dụng trên đó cũng như cài đặt thêm các công cụ phát triển cần thiết bằng cách sử dụng</span><span style="line-height: 1.5;"> </span><a href="/en-US/Firefox_OS/Using_the_App_Manager" style="line-height: 1.5;">App Manager</a><span style="line-height: 1.5;">.</span></p> +<h2 id="Cài_đặt"><span style="line-height: 1.5;">Cài đặt</span></h2> +<p><span style="line-height: 1.5;">Để cài đặt trình giả lập, nhấn nút bên dưới. Có nhiều phiên bản để bạn có thể lựa chọn, và chúng tôi khuyên bạn nên cài đặt tất cả chúng.):</span></p> +<p><a href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/" style="margin-bottom: 20px; padding: 10px; color: white; text-align: center; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; display: inline-block; background-color: rgb(129, 188, 46); white-space: nowrap; text-shadow: rgba(0, 0, 0, 0.247059) 0px 1px 0px; box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px 0px, rgba(0, 0, 0, 0.298039) 0px -1px 0px 0px inset;">Cài đặt trình giả lập</a></p> +<p>Để khởi chạy trình giả lập, xem <a href="/en-US/Firefox_OS/Using_the_App_Manager#Using_a_Firefox_OS_Simulator_Add-on" style="font-size: 14px; font-weight: normal; line-height: 1.5;">instructions in the App Manager documentation</a>. Sau khi hoàn tất quá trình cài đặt trình giả lập, bản có ngay lập tức cài đặt và quản lý ứng dụng thông qua tiện ích <em>App Manager</em>, tương tự như bạn đang sử dụng một thiết bị chạy Firefox OS</p> +<div class="note" style="line-height: 21px;"> + <p><strong>Cảnh báo</strong>: Các phiên bản 1.2 và 1,3 hiện đang được ghi nhận xảy ra lỗi đối với việc Gecko ghi nhận sai phản hồi người dùng: xem {{ Bug("964598") }} để biết thêm chi tiết.</p> +</div> +<h2 id="Giao_diện" style="line-height: 30px;">Giao diện</h2> +<p><span style="line-height: 22.00800132751465px;">Trình giả lập được thiết kế chạy trên một cửa sổ độc lập, kích thước giả lập là 320x480 pixels. Để mô phỏng các thao tác bấm chạm trên màn hình cảm ứng, bạn có thể sử click, kéo thả chuột trên trình giả lập. Bằng cách bấm và kéo thả từ phải qua trái trên màn hình chính, bạn có thể nhìn thấy các ứng dụng được cài đặt sẵn cũng như các ứng dụng bạn đã cài đặt lên</span><span style="line-height: 22.00800132751465px;">:</span></p> +<p><img alt="" src="https://mdn.mozillademos.org/files/7173/simulator-1.2.png" style="width: 810px; height: 623px; display: block; margin: 0px auto;"></p> +<p>Trình giả lập cung cấp 2 nút bấm điều khiển phía bên dưới:</p> +<ul> + <li>nút bên trái đưa bạn trở về màn hình chính, hoặc tắt trình giả lập nếu bạn giữ lâu.</li> + <li>nút bên phải thay đổi hiển thị màn hình theo hướng dọc - ngang. Nút bấm này sẽ sinh sự kiện <a href="https://developer.mozilla.org/en-US/docs/WebAPI/Managing_screen_orientation#Listening_orientation_change" title="/en-US/docs/WebAPI/Detecting_device_orientation">orientationchange</a>.</li> +</ul> +<h2 id="Giới_hạn">Giới hạn</h2> +<p>Nên chú ý rằng trình giả lập không phải là một giải pháp hoàn hảo.</p> +<h3 id="Giới_hạn_phần_cứng">Giới hạn phần cứng</h3> +<p>Bạn sẽ không thể giả lập Firefox OS với các thông tin về phần cứng như bộ nhớ trống, tốc độ xử lý của CPU ...</p> +<h3 id="Mã_hóa_audiovideo">Mã hóa audio/video</h3> +<p>Một số định dạng audio/video liên quan đến các bộ xử lý trên phần cứng sẽ không được giả lập:</p> +<ul> + <li>MP3</li> + <li>AAC</li> + <li>H.264 (MP4)</li> + <li>WebM</li> +</ul> +<p>Điều đó có nghĩa là bạn sẽ không thể phát video trên ứng dụng đang phát triển hoặc sử dụng từ các website phát vieo dựa trên các nền tảng công nghệ trên.</p> +<h3 id="Các_hàm_API_không_được_hỗ_trợ"><a name="Unsupported-APIs">Các hàm API không được hỗ trợ</a></h3> +<p>Một số hàm API chạy trên thiết bị sẽ không được hỗ trợ, nguyên nhân là do bạn sẽ không có các phần cứng phù hợp trên máy tính để sử dụng nó. Chúng tôi đã thiết kế bổ xung một số hàm API ví dụ như liên quan tới hệ thống định vị, và chúng tôi mong muốn sẽ hỗ trợ được nhiều hơn nữa trong tương lai. Tuy vậy, tại thời điểm hiện tại, những hàm API sau chưa được hỗ trợ, việc sử dụng chúng trên môi trường giả lập có thể sinh ra nhiều lỗi không dự báo trước:</p> +<ul> + <li><a href="/en-US/WebAPI/WebTelephony" title="/en-US/WebAPI/WebTelephony">Telephony</a></li> + <li><a href="/en-US/docs/WebAPI/WebSMS" title="/en-US/docs/WebAPI/WebSMS">WebSMS</a></li> + <li><a href="/en-US/docs/WebAPI/WebBluetooth" title="/en-US/docs/WebAPI/WebBluetooth">WebBluetooth</a></li> + <li><a href="/en-US/docs/WebAPI/Using_Light_Events" title="/en-US/docs/WebAPI/Using_Light_Events">Ambient Light</a></li> + <li><a href="/en-US/docs/WebAPI/Proximity" title="/en-US/docs/WebAPI/Proximity">Proximity</a></li> + <li><a href="/en-US/docs/WebAPI/Network_Information" title="/en-US/docs/WebAPI/Network_Information">Network Information</a></li> + <li><a href="/en-US/docs/Online_and_offline_events" title="/en-US/docs/Online_and_offline_events">navigator.onLine and offline events</a></li> + <li><a href="/en-US/docs/WebAPI/Vibration" title="/en-US/docs/WebAPI/Vibration">Vibration</a></li> +</ul> +<h2 id="Yêu_cầu_trợ_giúp"><a name="Simulator-help"></a>Yêu cầu trợ giúp</h2> +<p><span style="line-height: 1.5;">Nếu bạn có câu hỏi, sử dụng các kênh sau </span><a href="https://lists.mozilla.org/listinfo/dev-developer-tools" style="line-height: 1.5;">dev-developer-tools mailing list</a><span style="line-height: 1.5;"> hoặc </span><a href="irc://irc.mozilla.org/#devtools" style="line-height: 1.5;">#devtools on irc.mozilla.org</a><span style="line-height: 1.5;">.</span></p> +<h3 id="Bật_chế_độ_verbose_logging"><a name="Simulator-verbose-logging"></a>Bật chế độ "verbose logging"</h3> +<p>Bạn có thể nhận được các tin nhắn lưu trữ từ ứng dụng qua giao diện <a href="/en-US/docs/Tools/Web_Console">Web Console</a>, bạn có thể thêm vào ứng dụng sử dụng <a href="/en-US/Firefox_OS/Using_the_App_Manager#Debugging">App Manager</a>. Tuy nhiên nếu bạn muốn bắt những tin nhắn lưu trữ này sớm hơn, ngay khi ứng dụng khởi chạy, trước cả khi giao diện điều khiển được nạp, bạn có thể bật chế độ "verose logging" trên trình giả lập.</p> +<p>Vào địa chỉ: about:config và tạo cấu hình mới. Tên cấu hình được đặt theo nguyên tắc tùy theo phiên bản:</p> +<ul> + <li>extensions.fxos_1_3_simulator@mozilla.org.sdk.console.logLevel cho Firefox OS 1.3</li> + <li>extensions.fxos_1_2_simulator@mozilla.org.sdk.console.logLevel cho Firefox OS 1.2</li> +</ul> +<p>Đặt giá trị cho nó bằng 0, khởi chạy bằng cách vô hiệu hóa sau đó bật trở lại. Bạn đã hoàn thành cài đặt và những tin nhắn lưu trữ sẽ được hiển thị trên <a href="/en-US/docs/Tools/Browser_Console">Browser Console</a>.</p> |