aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/archive/b2g_os
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-tw/archive/b2g_os')
-rw-r--r--files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/contacts/index.html71
-rw-r--r--files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/device_storage/index.html111
-rw-r--r--files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/geolocation/index.html20
-rw-r--r--files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/index.html90
-rw-r--r--files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/web_activity/index.html116
-rw-r--r--files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/封包式_(packaged)_app/index.html70
-rw-r--r--files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/托管更新作業_(hosting_updates)_/index.html78
-rw-r--r--files/zh-tw/archive/b2g_os/add-ons/index.html282
-rw-r--r--files/zh-tw/archive/b2g_os/api/fmradio/index.html110
-rw-r--r--files/zh-tw/archive/b2g_os/api/index.html156
-rw-r--r--files/zh-tw/archive/b2g_os/apps/index.html45
-rw-r--r--files/zh-tw/archive/b2g_os/apps/writing_a_web_app_for_b2g/index.html25
-rw-r--r--files/zh-tw/archive/b2g_os/architecture/index.html717
-rw-r--r--files/zh-tw/archive/b2g_os/automated_testing/gaia-ui-tests/gaia_ui_tests_run_tests/index.html111
-rw-r--r--files/zh-tw/archive/b2g_os/automated_testing/gaia-ui-tests/index.html69
-rw-r--r--files/zh-tw/archive/b2g_os/automated_testing/index.html77
-rw-r--r--files/zh-tw/archive/b2g_os/building/index.html124
-rw-r--r--files/zh-tw/archive/b2g_os/building_and_installing_firefox_os/firefox_os_build_process_summary/index.html108
-rw-r--r--files/zh-tw/archive/b2g_os/building_and_installing_firefox_os/index.html65
-rw-r--r--files/zh-tw/archive/b2g_os/choosing_how_to_run_gaia_or_b2g/index.html59
-rw-r--r--files/zh-tw/archive/b2g_os/debugging/index.html21
-rw-r--r--files/zh-tw/archive/b2g_os/firefox_os_build_prerequisites/index.html606
-rw-r--r--files/zh-tw/archive/b2g_os/index.html222
-rw-r--r--files/zh-tw/archive/b2g_os/installing_boot_to_gecko_on_a_mobile_device/index.html53
-rw-r--r--files/zh-tw/archive/b2g_os/introduction/index.html86
-rw-r--r--files/zh-tw/archive/b2g_os/phone_guide/flame/index.html50
-rw-r--r--files/zh-tw/archive/b2g_os/phone_guide/index.html6
-rw-r--r--files/zh-tw/archive/b2g_os/phone_guide/zte_open/index.html287
-rw-r--r--files/zh-tw/archive/b2g_os/platform/apps_architecture/index.html24
-rw-r--r--files/zh-tw/archive/b2g_os/platform/gaia/gaia_apps/index.html78
-rw-r--r--files/zh-tw/archive/b2g_os/platform/gaia/index.html68
-rw-r--r--files/zh-tw/archive/b2g_os/platform/gaia/introduction_to_gaia/index.html13
-rw-r--r--files/zh-tw/archive/b2g_os/platform/gonk/index.html22
-rw-r--r--files/zh-tw/archive/b2g_os/platform/index.html75
-rw-r--r--files/zh-tw/archive/b2g_os/platform/out_of_memory_management_on_firefox_os/index.html53
-rw-r--r--files/zh-tw/archive/b2g_os/preparing_for_your_first_b2g_build/index.html138
-rw-r--r--files/zh-tw/archive/b2g_os/quickstart/app_tools/index.html28
-rw-r--r--files/zh-tw/archive/b2g_os/quickstart/index.html51
-rw-r--r--files/zh-tw/archive/b2g_os/quickstart/your_first_app/index.html265
-rw-r--r--files/zh-tw/archive/b2g_os/releases/1.2/index.html465
-rw-r--r--files/zh-tw/archive/b2g_os/releases/index.html24
-rw-r--r--files/zh-tw/archive/b2g_os/running_custom_builds_in_the_app_manager/index.html43
-rw-r--r--files/zh-tw/archive/b2g_os/screencast_series_colon__app_basics_for_firefox_os/index.html208
-rw-r--r--files/zh-tw/archive/b2g_os/security/application_security/index.html124
-rw-r--r--files/zh-tw/archive/b2g_os/security/index.html70
-rw-r--r--files/zh-tw/archive/b2g_os/security/security_model/index.html299
-rw-r--r--files/zh-tw/archive/b2g_os/security/system_security/index.html376
-rw-r--r--files/zh-tw/archive/b2g_os/simulator/index.html90
-rw-r--r--files/zh-tw/archive/b2g_os/simulator/simulator_walkthrough/index.html268
-rw-r--r--files/zh-tw/archive/b2g_os/using_the_app_manager/index.html259
-rw-r--r--files/zh-tw/archive/b2g_os/using_the_b2g_desktop_client/index.html180
-rw-r--r--files/zh-tw/archive/b2g_os/using_the_b2g_emulators/index.html69
-rw-r--r--files/zh-tw/archive/b2g_os/web_telephony_api/index.html25
-rw-r--r--files/zh-tw/archive/b2g_os/writing_apps_for_boot_to_gecko/index.html12
54 files changed, 7162 insertions, 0 deletions
diff --git a/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/contacts/index.html b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/contacts/index.html
new file mode 100644
index 0000000000..431f85c5f6
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/contacts/index.html
@@ -0,0 +1,71 @@
+---
+title: 聯絡人資訊
+slug: Archive/B2G_OS/3rd_Party_App_Developer_Guide/Contacts
+---
+<h3 id="聯絡人資訊_(contacts)">聯絡人資訊 (contacts)</h3>
+<p>Contacts API 讓您可以取得使用者手機中所儲存的聯絡人列表、聯絡人姓名、電話、… 等資訊。<br>
+ 由於它牽涉到使用者私密資訊,目前僅開放審查通過的應用(privileged/certified)能夠使用這個 API。您的應用必須提出使用這個 API 的聲明,並且通過審查方可使用。<br>
+ <br>
+ 權限宣告:分為 "readonly", "readwrite", "readcreate" 三種級別,分別代表「只讀取」、「讀取與修改」、「讀取與新增」。您可依照應用需求作適當的權限宣告。</p>
+<pre>"permissions": {
+ "contacts":{ "access": "readonly" }
+}</pre>
+<h4 id="1._讀取聯絡人列表">1. 讀取聯絡人列表</h4>
+<pre> var options = {
+ sortBy: 'familyName',
+ sortOrder: 'ascending'
+ };
+ var request = navigator.mozContacts.find(options);
+ request.onsuccess = function findSuccess() {
+ var firstContact = request.result[0];
+ console.log('name' + firstContact.name);
+ console.log('tel number' + firstContact.tel[0].value);
+ console.log('update time' + new Date(firstContact.updated));
+ };
+
+ request.onerror = function findError() {
+ console.warn('Error: cannot find any contacts - ' + request.error.name);
+ };</pre>
+<h4 id="2._新增聯絡人">2. 新增聯絡人</h4>
+<pre> var myContact = {
+ 'name': 'Alice Wang',
+ 'givenName': 'Alice',
+ 'familyName': 'Wang',
+ 'tel': [{'value': '0912345678'}]
+ };
+ var contact = new mozContact();
+ contact.init(myContact);
+ var request = navigator.mozContacts.save(contact);
+ request.onerror = function onerror() {
+ console.warn('Error: save contact - ' + request.error.name);
+ }; </pre>
+<h4 id="3._修改聯絡人資訊">3. 修改聯絡人資訊</h4>
+<pre> var options = {
+ filterBy: ['tel', 'givenName', 'familyName'],
+ filterOp: 'contains',
+ filterValue: 'Alice'
+ };
+ var request = navigator.mozContacts.find(options);
+ request.onsuccess = function findSuccess() {
+ var contact = req.result[0];
+ contact.tel[0].value = '0987654321';
+ var requestUpdate = navigator.mozContacts.save(contact);
+ requestUpdate.onerror = function onerror() {
+ console.warn('Error: update contact - ' + requestUpdate.error.name);
+ };
+ }; </pre>
+<h4 id="4._刪除聯絡人">4. 刪除聯絡人</h4>
+<pre> var options = {
+ filterBy: ['id'],
+ filterOp: 'equals',
+ filterValue: '0987654321'
+ };
+ var request = navigator.mozContacts.find(options);
+ request.onsuccess = function findSuccess() {
+ var contact = req.result[0];
+ var requestRemove = navigator.mozContacts.remove(contact);
+ requestRemove.onerror = function onerror() {
+ console.warn('Error: remove contact - ' + requestRemove.error.name);
+ };
+ }; </pre>
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/device_storage/index.html b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/device_storage/index.html
new file mode 100644
index 0000000000..d8c6fd2916
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/device_storage/index.html
@@ -0,0 +1,111 @@
+---
+title: 儲存裝置資訊
+slug: Archive/B2G_OS/3rd_Party_App_Developer_Guide/Device_Storage
+---
+<h3 id="儲存裝置資訊_(Device_Storage)">儲存裝置資訊 (Device Storage)</h3>
+<p>DeviceStorage API 提供 SD 記憶卡內的資料存取介面,可讀取圖片檔、聲音檔、影片檔,與 SD 記憶卡的其他檔案,並檢視 SD 記憶卡空間的使用率。<br>
+ 由於牽涉到使用者的儲存裝置資訊,目前僅開放 Privileged/Certified App 能夠使用此 API。你的 App 必須提出「使用此 API」的聲明,並且通過審查方可使用。<br>
+ <br>
+ 權限宣告:依照檔案類型 (圖片、影片、聲音、其他) 而有不同宣告方式,這種宣告另分為「readonly」、「readwrite」、「readcreate」共 3 種級別,分別代表「唯讀」、「讀取與修改」、「讀取與創建」。你可依照 App 需求作適當的權限宣告。</p>
+<pre>"permissions": {
+ "device-storage:pictures": { "access": "readonly" },
+ "device-storage:music": { "access": "readcreate" },
+ "device-storage:videos": { "access": "readwrite" },
+ "device-storage:sdcard": { "access": "readonly" }
+}</pre>
+<h4 id="1._音樂檔案列表">1. 音樂檔案列表</h4>
+<ul>
+ <li>權限宣告:"device-storage:music": { "access": "readonly" }</li>
+</ul>
+<pre> var type = 'music';
+ var deviceStorage = navigator.getDeviceStorage(type);
+ if (!deviceStorage) {
+ console.warn('Error: cannot get DeviceStorage for ' + type);
+ return;
+ }
+ var request = deviceStorage.enumerate();
+ request.onsuccess = function(e) {
+ var file = request.result;
+ console.log('file name ' + file.name);
+ console.log('file size ' + file.size);
+ console.log('file type ' + file.type);
+ console.log('file last Modified Date ' + file.lastModifiedDate);
+ request.continue();
+ };
+ request.onerror = function() {
+ console.warn('Error: cannot list files in SD card - ' + request.error.name);
+ };</pre>
+<h4 id="2._讀取某個_SD_卡檔案">2. 讀取某個 SD 卡檔案</h4>
+<ul>
+ <li>權限宣告:"device-storage:pictures": { "access": "readonly" }</li>
+</ul>
+<pre> var type = 'pictures';
+ var deviceStorage = navigator.getDeviceStorage(type);
+ if (!deviceStorage) {
+ console.warn('Error: cannot get DeviceStorage for ' + type);
+ return;
+ }
+ var filename = 'downloads/DSC02798.JPG';
+ var request = deviceStorage.get(filename);
+ request.onsuccess = function(e) {
+ var file = request.result;
+ var url = URL.createObjectURL(file);
+ var myImage = document.getElementById('profilePhoto');
+ myImage.src = url;
+ };
+ request.onerror = function() {
+ console.warn('Error: get file from SD card - ' + request.error.name);
+ };</pre>
+<h4 id="3._寫入檔案到_SD_卡">3. 寫入檔案到 SD 卡</h4>
+<ul>
+ <li>權限宣告:"device-storage:sdcard": { "access": "readcreate" }</li>
+</ul>
+<pre> var type = 'sdcard';
+ var deviceStorage = navigator.getDeviceStorage(type);
+ if (!deviceStorage) {
+ console.warn('Error: cannot get DeviceStorage for ' + type);
+ return;
+ }
+ var filename = 'test-' + Math.random().toString() + '.txt';
+ var pathname = 'test-tmp/' + filename;
+ console.log('file path: ' + pathname);
+ var blob = new Blob(['hello', 'world'], {type: 'text/plain'});
+ var request = deviceStorage.addNamed(blob, pathname);
+ request.onsuccess = function(e) {
+ // try to get the file
+ var readRequest = deviceStorage.get(pathname);
+ readRequest.onsuccess = function() {
+ var file = readRequest.result;
+ var reader = new FileReader();
+ reader.onload = function(e) {
+ console.log('file content ' + e.target.result);
+ };
+ reader.readAsText(file);
+ };
+ readRequest.onerror = function() {
+ console.warn("Error: read file failure - " + request.error.name);
+ };
+ };
+ request.onerror = function() {
+ console.warn('Error: write file failure - ' + request.error.name);
+ };</pre>
+<h4 id="4._SD_卡空間使用率">4. SD 卡空間使用率</h4>
+<ul>
+ <li>權限宣告:"device-storage:sdcard": { "access": "readonly" }</li>
+</ul>
+<pre> var type = 'sdcard';
+ var deviceStorage = navigator.getDeviceStorage(type);
+ if (!deviceStorage) {
+ console.warn('Error: cannot get DeviceStorage for ' + type);
+ return;
+ }
+ var request = deviceStorage.stat();
+ request.onsuccess = function(e) {
+ var totalSize = e.target.result.totalBytes;
+ var freeBytes = e.target.result.freeBytes;
+ console.log('totalSize ' + totalSize + ', freeBytes ' + freeBytes);
+ };
+ request.onerror = function() {
+ console.warn('Error: cannot get stat of SD card - ' + request.error.name);
+ };</pre>
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/geolocation/index.html b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/geolocation/index.html
new file mode 100644
index 0000000000..575d719313
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/geolocation/index.html
@@ -0,0 +1,20 @@
+---
+title: 位置資訊
+slug: Archive/B2G_OS/3rd_Party_App_Developer_Guide/Geolocation
+---
+<h3 id="位置資訊_(geolocation)">位置資訊 (geolocation)</h3>
+<p>Geolocation API 讓您可以取得使用者目前所在的地理位置資訊,雖然現今它已是一個 Web 開放標準的 API,但在 Firefox OS 中您必須做權限宣告才可使用。<br>
+ 但當您使用這個 API 企圖存取使用者位置時,系統會出現一個視窗詢問使用者是否願意透露位置訊息給您的應用,並且提供一個默認選項記住使用者的選擇。<br>
+ <br>
+ 權限宣告:需要</p>
+<pre>"permissions": {
+ "geolocation": {}
+}</pre>
+<p>範例:</p>
+<pre>navigator.geolocation.getCurrentPosition(function(position) {
+ console.log('latitude ' + position.coords.latitude);
+ console.log('longitude ' + position.coords.longitude);
+}, function() {
+ console.warn('Error: cannot fetch location');
+});
+</pre>
diff --git a/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/index.html b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/index.html
new file mode 100644
index 0000000000..d258c076d5
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/index.html
@@ -0,0 +1,90 @@
+---
+title: 第三方應用開發者指南
+slug: Archive/B2G_OS/3rd_Party_App_Developer_Guide
+---
+<h3 id="基本章節">基本章節</h3>
+<h4 id="快速入門">快速入門</h4>
+<h4 id="API_說明">API 說明</h4>
+<ul>
+ <li><a href="https://developer.mozilla.org/en-US/docs/tag/WebAPI" title="https://developer.mozilla.org/zh-TW/docs/WebAPI">API 列表</a></li>
+ <li><a href="https://developer.mozilla.org/zh-TW/docs/WebAPI/Permissions" title="https://developer.mozilla.org/zh-TW/docs/WebAPI/Permissions">權限宣告</a></li>
+ <li><a href="https://developer.mozilla.org/zh-TW/docs/Using_geolocation#.E7.80.8F.E8.A6.BD.E5.99.A8.E7.9B.B8.E5.AE.B9.E6.80.A7" title="/zh-TW/docs/Mozilla/Firefox_OS/第三方應用開發者指南/位置資訊">位置資訊 Geolocation API</a></li>
+ <li><a href="/zh-TW/docs/Mozilla/Firefox_OS/第三方應用開發者指南/聯絡人資訊" title="/zh-TW/docs/Mozilla/Firefox_OS/第三方應用開發者指南/聯絡人資訊">聯絡人資訊</a></li>
+ <li><a href="/zh-TW/docs/Mozilla/Firefox_OS/第三方應用開發者指南/儲存裝置資訊" title="/zh-TW/docs/Mozilla/Firefox_OS/第三方應用開發者指南/儲存裝置資訊">儲存裝置資訊</a></li>
+ <li>註冊系統訊息 (system message)</li>
+</ul>
+<h4 id="其他技術細節">其他技術細節</h4>
+<ul>
+ <li><a href="https://developer.mozilla.org/zh-TW/docs/Mozilla/Firefox_OS/Security/Security_model" title="https://developer.mozilla.org/zh-TW/docs/Mozilla/Firefox_OS/Security/Security_model">Firefox OS 安全性概述</a></li>
+ <li><a href="https://developer.mozilla.org/zh-TW/docs/WebAPI/Web_Activities" title="/zh-TW/docs/Mozilla/Firefox_OS/第三方應用開發指南/Web_Activity">Web Activity</a></li>
+ <li>video/graphic (?)</li>
+ <li>Attention screen</li>
+ <li>window.open</li>
+ <li>background service</li>
+ <li>touch event</li>
+ <li>special events
+ <ul>
+ <li>mozvisibilitychange</li>
+ </ul>
+ </li>
+ <li>special properties
+ <ul>
+ <li>windowsizechange</li>
+ </ul>
+ </li>
+</ul>
+<h4 id="除錯與預覽">除錯與預覽</h4>
+<ul>
+ <li><a href="/zh-TW/docs/Tools/Debugger" title="/zh-TW/docs/Tools/Debugger">除錯器 (Debugger)</a></li>
+ <li><a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator" title="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator">Firefox OS 模擬器 (r2d2b2g)</a></li>
+ <li>B2G desktop</li>
+ <li><a href="https://developer.mozilla.org/zh-TW/docs/Mozilla/Boot_to_Gecko/Using_Gaia_in_Firefox" title="https://developer.mozilla.org/zh-TW/docs/Mozilla/Boot_to_Gecko/Using_Gaia_in_Firefox">在 Firefox 裡使用 Gaia</a></li>
+</ul>
+<h4 id="測試">測試</h4>
+<ul>
+ <li>單元測試</li>
+ <li>UI 測試</li>
+</ul>
+<h4 id="應用上架">應用上架</h4>
+<ul>
+ <li><a href="https://developer.mozilla.org/zh-TW/docs/%E6%87%89%E7%94%A8%E7%A8%8B%E5%BC%8F/Manifest-840092-dup" title="https://developer.mozilla.org/zh-TW/docs/%E6%87%89%E7%94%A8%E7%A8%8B%E5%BC%8F/Manifest-840092-dup">App Manifest</a></li>
+ <li><a href="https://developer.mozilla.org/zh-TW/docs/WebAPI/Permissions" title="https://developer.mozilla.org/zh-TW/docs/WebAPI/Permissions">App 權限 (Permission</a>)</li>
+ <li>hosted app &amp; <a href="https://developer.mozilla.org/zh-TW/docs/%E6%87%89%E7%94%A8%E7%A8%8B%E5%BC%8F-840092-dup/Packaged_apps" title="https://developer.mozilla.org/zh-TW/docs/Mozilla/Firefox_OS/3rd_Party_App_Developer_Guide/%E5%B0%81%E5%8C%85%E5%BC%8F_%28Packaged%29_App">封裝式 (Packaged) App</a></li>
+ <li>安裝應用
+ <ul>
+ <li>應用來源 (open web/Firefox marketplace)</li>
+ <li>安裝方式 (hosted app/packaged app)</li>
+ </ul>
+ </li>
+ <li>應用審核流程</li>
+ <li><a href="https://developer.mozilla.org/zh-TW/docs/Mozilla/Firefox_OS/3rd_Party_App_Developer_Guide/%E6%89%98%E7%AE%A1%E6%9B%B4%E6%96%B0%E4%BD%9C%E6%A5%AD_%28Hosting_Updates%29_" title="https://developer.mozilla.org/zh-TW/docs/Mozilla/Firefox_OS/3rd_Party_App_Developer_Guide/%E6%89%98%E7%AE%A1%E6%9B%B4%E6%96%B0%E4%BD%9C%E6%A5%AD_%28Hosting_Updates%29_">B2G 托管更新作業 (Hosting Updates)</a></li>
+</ul>
+<h3 id="進階章節">進階章節</h3>
+<h4 id="樣式參考與範本">樣式參考與範本</h4>
+<ul>
+ <li>multiple resolution</li>
+ <li>viewport</li>
+ <li>Building Block</li>
+ <li>template</li>
+</ul>
+<h4 id="調校技巧">調校技巧</h4>
+<ul>
+ <li>lazy loading</li>
+ <li>preload small image (sprite)</li>
+</ul>
+<h4 id="Gaia_系統應用_(System_App)_細節">Gaia 系統應用 (System App) 細節</h4>
+<ul>
+ <li>系統應用角色</li>
+ <li>iframe 框架與程序 (Process) 的關係</li>
+ <li>zIndex</li>
+ <li>hardware buttons</li>
+ <li>running app management</li>
+</ul>
+<h4 id="其他_Open_Web_技術">其他 Open Web 技術</h4>
+<ul>
+ <li><a href="https://developer.mozilla.org/zh-TW/docs/Gecko_DOM_%E5%8F%83%E8%80%83/WebFM" title="https://developer.mozilla.org/zh-TW/docs/Gecko_DOM_%E5%8F%83%E8%80%83/WebFM">WebFM 收音機</a></li>
+ <li>HTML5 API</li>
+ <li>CSS</li>
+ <li>jQuery/backbone/... frameworks</li>
+ <li>appcache</li>
+</ul>
diff --git a/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/web_activity/index.html b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/web_activity/index.html
new file mode 100644
index 0000000000..8b9e1e52ad
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/web_activity/index.html
@@ -0,0 +1,116 @@
+---
+title: Web Activity
+slug: Archive/B2G_OS/3rd_Party_App_Developer_Guide/Web_Activity
+---
+<h4 id="Web_Activity">Web Activity</h4>
+<p>許多手機上常見的功能例如:選取聯絡人、撥打電話、照相是您的 App 會需要用到的功能。您可以不必重新發明輪子,而利用「Web Activity」的技術呼叫其他的 App 來完成任務。Web Activity 可以實作兩個 App 間的切換,例如從「相機」切換到「圖片集」,或者是「簡訊」使用「聯絡人」選取一個簡訊發送對象。<br>
+ <br>
+ 在您的 App 中只需要描述所需的操作,系統會幫您檢查手機中有哪些 App 提供這些操作。以下是一個具體的例子。這是在「相機」中的一段程式碼,用來切換到別的 App 瀏覽相片。</p>
+<pre> var act = new MozActivity({
+ name: 'browse',
+ data: {
+ type: 'photos'
+ }
+ });
+ act.onerror = function(e) {
+ if (act.error.name === 'NO_PROVIDER') {
+ console.warn('Error: no activity provider');
+ }
+ else {
+ console.warn('Error: unknown activity - ' + act.error.name);
+ }
+ };</pre>
+<p>在這段程式碼中,「相機」新增了一個 MozActivity 物件並在參數物件中聲明該 activity 是「瀏覽(browse)」的動作,瀏覽的資料是「相片(photos)」。請注意它並非直接指定要切換到「圖片集」 ,而是由系統決定哪個 App 提供這樣的行為,若有多個 App 同時提供一樣的行為時,系統會產生一個選單讓使用者選取。<br>
+ 參數物件的 'data' 欄位可以提供額外所需的資料內容,讓承接 activity 任務的 App 決定是否根據資料內容做其他處理。<br>
+ <br>
+ 讓我們來看看提供 Web Activity 的 App 該如何聲明它的 activity 及相關設定。</p>
+<pre>"activities": {
+ "browse": {
+ "filters": {
+ "type": "photos"
+ },
+ "disposition": "window"
+ }
+}</pre>
+<p><br>
+ 像「圖片集」這樣的 App 可以在它的 manifest.webapp 檔案中聲明它提供瀏覽相片的 activity,如上所示。它提供一個「瀏覽(browse)」動作的 activity,瀏覽的資料是「相片(photos)」作為篩選條件。這樣的 activity 聲明宣告,便能與上面的 MozActivity 呼叫匹配,成為能承接這個 activity 的對象之一。若手機中只有這一個 App 有這樣的 activity 宣告,那系統預設就會將這個 App 開啓,但若有多個 App 都能夠執行這個任務,系統會產生一個選單讓使用者選取。</p>
+<h4 id="disposition_window">"disposition": "window"</h4>
+<p>依照不同 App 的需求,目前在 Firefox OS 中有兩種形式的 Web Activity ,一種為「視窗切換」(window disposition) 、一種為「畫面滑入」(inline disposition)。前者視覺上是 App 之間的切換,後者則是承接 activity 的 App 會由下方滑入,覆蓋在目前 App 之上。除了視覺上的效果不同之外,「畫面滑入」的 Web Activity 在 activity 處理結束畫面關閉之後(例如選擇了一張圖片),會回到原本的 App ,而「視窗切換」的 Web Activity 則需要使用者自己手動回到主畫面 (homescreen) 或者 App 列表,才能夠切換回原本的 App 。提供 Web Activity 的 App 可以自行決定提供哪種形式讓其他 App 呼叫。<br>
+ <br>
+ 除了在 manifest.webapp 宣告 Web Activity 之外,程式碼中當然也要有具體的實作。如下所示是「圖片集」 App 的實作程式碼:</p>
+<pre> navigator.mozSetMessageHandler('activity', function activityHandler(a) {
+ var activityName = a.source.name;
+ if ( activityName === 'browse') {
+ // If this was a cold start, then the db needs to be initialized.
+ if (!photodb)
+ initDB(true); // Initialize both the photo and video databases
+ // Always switch to the list of thumbnails.
+ setView(thumbnailListView);
+ }
+ });
+</pre>
+<p>當有 MozActivity 的呼叫發生時,會以系統訊息的方式通知將要被開啓的 App 。因此這個 App 必須要註冊 'activity' 的系統訊息,提供對應的回呼函示 (callback function),明白表示當 MozActivity 的呼叫發生時, App 被開啓後將如何處理這個 activity。這邊「圖片集」 App 執行初始化圖庫、以縮圖方式列出圖庫內的相片。<br>
+ 「圖片集」 App 在 manifest.webapp 的聲明中使用 window disposition 的方式處理 activity,表示使用者並不會在完成什麼動作之後回到「相機」 App 。「圖片集」 App 就如同是被使用者手動在主畫面(homescreen)點選開啟一般,由使用者自行決定何時離開。</p>
+<h4 id="disposition_inline">"disposition": "inline"</h4>
+<p>我們來看另一種形式的  Web Activity。同樣以「圖片集」 App 為例,它可以提供一個  Web Activity 供其他 App 挑選照片。挑選照片的 actvity 必須要把被挑選到的相片名稱、路徑…等等的資訊傳回給呼叫方(caller),並且在挑選動作完成後回到呼叫方的 App 。這個情況下,使用 inline disposition 的形式來實作。<br>
+ manifest.webapp 的宣告是這樣的:</p>
+<pre>"activities": {
+ "pick": {
+ "filters": {
+ "type": ["image/jpeg", "image/png"]
+ },
+ "disposition": "inline",
+ "returnValue": true,
+ "href": "/index.html#pick"
+ }
+}</pre>
+<p><br>
+ 它提供一個「挑選(pick)」動作的 activity,挑選的資料形態以一個陣列作為篩選條件,提供挑選 "image/jpeg" 或 "image/png" 圖檔,並且會回傳挑選的值。<br>
+ 由於 inline disposition 的 Web Activity 是以單一畫面滑入的形式被開啓,不同於 window disposition 是整個 App 被開啓,這裡我們可以多指派一個聲明表示要處理這個  Web Activity 的頁面位置 ("href": "/index.html#pick")。<br>
+ <br>
+ 這個頁面會有具體的程式碼實作如下:</p>
+<pre> navigator.mozSetMessageHandler('activity', function activityHandler(activityRequest) {
+ var activityName = activityRequest.source.name;
+ if (activityName === 'pick') {
+ var pickType = activityRequest.source.data.type;
+ var width = activityRequest.source.data.width;
+ var height = activityRequest.source.data.height;
+ var blob = startPick(pickType, width, height);
+ if (blob) {
+ activityRequest.postResult({type: pickType, blob: blob});
+ } else {
+ activityRequest.postError('pick cancelled');
+ }
+ }
+ });</pre>
+<p><br>
+ 當有 MozActivity 的呼叫發生時,「圖片集」 App 收到 'activity' 的系統訊息,回呼函示 (callback function)會被運行,它可以讀取請求此 activity 的 App 所提供的數據,例如所需的圖片類型、寬度、高度… 等,作為陳列圖片清單的參考。當使用者成功選取了一張圖片,呼叫 activityRequest.postResult 傳回挑選結果。這個結果是個物件,讓呼叫 MozActivity 的 App 能夠知道圖片相關的資訊。<br>
+ <br>
+ 在「設定」 App 中希望能讓使用者選取一張圖片做為桌布,只需要呼叫 activity 來完成。</p>
+<pre> var activityRequest = new MozActivity({
+ name: 'pick',
+ data: {
+ type: 'image/jpeg',
+ width: 320,
+ height: 480
+ }
+ });
+ activityRequest.onsuccess = function onPickSuccess() {
+ if (!activityRequest.result.blob)
+ return;
+
+ var reader = new FileReader();
+ reader.readAsDataURL(activityRequest.result.blob);
+ reader.onload = function() {
+ navigator.mozSettings.createLock().set({
+ 'wallpaper.image': reader.result
+ });
+ displayImgae(reader.result);
+ };
+ };
+ activityRequest.onerror = function onPickError() {
+ console.warn('pick failed!');
+ };
+</pre>
+<p>在這段程式碼中,「設定」呼叫了一個 MozActivity 並在參數物件中聲明該 activity 是「挑選(pick)」的動作,挑選的是「image/jpeg」檔案,限定寬度與高度為 320 x 480。同樣的,「設定」 App 不知道實際上哪個 App 會被呼叫,它只在意當挑選動作完成時,它的 onsuccess 回呼函示會被執行,取得 blob 內容,並且畫面焦點將回到它身上,讓它可以顯示選取的圖片。系統將決定哪個 App 提供這樣的行為,若有多個 App 同時提供一樣的行為時,系統會產生一個選單讓使用者選取。<br>
+  </p>
diff --git a/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/封包式_(packaged)_app/index.html b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/封包式_(packaged)_app/index.html
new file mode 100644
index 0000000000..80a905ab88
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/封包式_(packaged)_app/index.html
@@ -0,0 +1,70 @@
+---
+title: 封包式 (Packaged) App
+slug: Archive/B2G_OS/3rd_Party_App_Developer_Guide/封包式_(Packaged)_App
+---
+<div class="note">
+ <p id="*.E5.8E.9F.E6.96.87.E5.87.BA.E8.99.95.EF.BC.9Ahttps.3A.2F.2Fmarketplace.firefox.com.2Fdevelopers.2Fdocs.2Fpackaged">原文出處:https://marketplace.firefox.com/developers/docs/packaged</p>
+</div>
+<p><strong>封包式</strong><strong> (Packaged) App</strong> 屬於 Open Web App,即以 ZIP 壓縮檔納入其 HTML、CSS、JavaScript、app manifest 等所有資源;取代「將資源置於 Web 伺服器之上」的方式。封包式 App 的 ZIP 壓縮檔另將 <a href="https://developer.mozilla.org/docs/Apps/Manifest">app manifest</a> 置於其根目錄之下,且此 manifest 檔案必須命名為 manifest.webapp。</p>
+<div class="note">
+ <p><strong>注意:</strong>截至 2013 年 1 月為止,Firefox Marketplace 上所提供的封包式 App 限定為 Firefox OS App。</p>
+</div>
+<p> </p>
+<h2 id="封包式_App_之用途"><strong>封包式</strong><strong> App </strong><strong>之用途</strong></h2>
+<p>若 App 會存取裝置上的 Sensitive API,則最好能透過封包式 App 而達到安全性的需求。App 均必須經過上架商城 (如 Firefox OS Marketplace) 認證方可販售。這些商城將審核 App,確認其是否可行,再以其自有金鑰完成加密簽核。再審核過安全性、隱私性、功能性等的可能問題之後,可為 App 的使用者更多添一份保障。</p>
+<p> </p>
+<h2 id="封包式_App_的類型"><strong>封包式</strong><strong> App </strong><strong>的類型</strong></h2>
+<p>封包式 App 可分為 3 類:</p>
+<h4 id="Privileged_app">Privileged app</h4>
+<p style="margin-left: 36.0pt;">Privileged App 是由 Firefox OS Marketplace 以特殊程序核准之後發出。如果任一 App 要存取裝置上的特定 Sensitive API,則可為使用者提供更高的安全性。此種 App 即等同 iOS 或 Android 平台上的 Native App,並具備下列特性:</p>
+<ul>
+ <li>經過程式碼審核或同等作業之後,才會由 App 商城發出許可</li>
+ <li>App 資源亦需由 App 商城簽署。</li>
+ <li>即使無法存取特定 Sensitive Web API 的未受信任內容,亦可透過 Privileged App 的方式使用之。</li>
+ <li>強制性的<a href="https://developer.mozilla.org/en-US/docs/Apps/CSP">內容安全政策 (CSP)</a>;Privileged App 即使用此CSP:</li>
+</ul>
+<pre>"default-src *; script-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline'"</pre>
+<ul>
+ <li>另具備安全性相關的必要機制。可參閱 <a href="https://wiki.mozilla.org/Apps/Security">Security</a> 以進一步了解。</li>
+</ul>
+<h4 id="Certified_app">Certified app</h4>
+<p style="margin-left: 36.0pt;">Certified App 將用於重要的系統功能,如智慧型手機上預設的撥號鍵盤,或系統設定用 App;當然亦可用於 Firefox OS 手機上的重要功能。Certified App 並不會用於第三方 App,所以大多數的 App 開發人員可略過此類 App 不管。除了所有的裝置許可均為隱式許可 (Implicit permission,意即不需要外部的使用者許可) 之外,Certified App 與 Privileged App 大部分均屬於相似的封包式 App。而 Certified App 必須取得 OEM 裝置或電信服務供應商裝置的許可,才能讓此隱式 App 使用重要 API。下列即為 Certified App 的 CSP (與 Privileged App 的 CSP 略有不同):</p>
+<pre>"default-src *; script-src 'self'; object-src 'none'; style-src 'self'"</pre>
+<p style="margin-left: 36.0pt;">若與 Certified App 相較,Privileged App 則針對 inline CSP 的影響而稍微放寬了限制。進一步了解其原因,可參閱<a href="https://wiki.mozilla.org/Apps/CSP">預設 CSP</a> 與 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=768029">Bug 768029</a>。</p>
+<h4 id="Plain_packaged_app">Plain packaged app</h4>
+<p style="margin-left: 36.0pt;">當然也可讓一般 App 封裝為 ZIP 壓縮檔。在 Marketplace 簽署之後,並不會執行如 Privileged/Certified App 所需的特殊授權程序。且 Plain Packaged App 並不會使用特定的 Sensitive Web API;同時也不屬於 Privileged/Certified App 所用 CSP 管轄所及。</p>
+<p> </p>
+<h2 id="與托管式_(Hosted)_App_的差異"><strong>與托管式</strong><strong> (Hosted) App </strong><strong>的差異</strong></h2>
+<p>封包式 App 的功能,其實與一般網站型態的 Open Web App (即所謂托管式 Hosted App) 功能相同。但封包式 App 的差異在於:</p>
+<ul>
+ <li>封包式 App 不需網際網路檔案供應源。托管式 App 所用的 one-app-per-origin 政策,並不適用於封包式 App。</li>
+ <li>封包式 App 的 ZIP 檔案內部使用特殊協定:<code>app://&lt;uuid&gt;</code>。舉例來說,若在封包式 App 內部載入<code> /index.html </code>作為內容,則其實載入了如下的字串 (僅 UUID 不同):</li>
+</ul>
+<pre>app://550e8400-e29b-41d4-a716-446655440000/index.html</pre>
+<ul>
+ <li>封包式 App 的 manifest 檔案必須命名為 <code>manifest.webapp</code>。</li>
+ <li>封包式 App 檔案源必須存取自 ZIP 壓縮檔;而 ZIP 壓縮檔又已儲存於 App 所安裝的裝置上。</li>
+ <li>封包式 App 均以不同 <code>mozApps</code> 函式所安裝:<code>installPackage()</code>。</li>
+ <li>針對所有應用程式的內容,封包式 App <code>均強制使用特定的</code> <a href="https://developer.mozilla.org/docs/Security/CSP/Introducing_Content_Security_Policy">CSP</a>;托管式 App 亦可使用 CSP,但非必要條件。</li>
+ <li>封包式 App 可於 iframes 之內嵌入遠端內容,但該內容將無法存取 Privileged API,亦不會具備預設的 CSP。</li>
+ <li>封包式 App 具備更新程序,可為使用者取得新版本的 App。托管式 App 則不需要此程序。</li>
+</ul>
+<p>與一般的托管式 App 相同,封包式 App 仍可存取 Web 伺服器上的資料庫。</p>
+<p> </p>
+<h2 id="使用_Sensitive_Web_API"><strong>使用</strong><strong> Sensitive Web API</strong></h2>
+<p>現在有許多惡意 Web API,因此應謹慎存取 Web API。針對 App 所要存取的所有 Sensitive API,你應該在 <a href="https://developer.mozilla.org/docs/Apps/Manifest">manifest 檔案</a>的 <code>permissions </code>欄位中新增輸入項。</p>
+<p>一般托管式 App 亦可存取某些 Sensitive API,但其他 API 就限定封包式 (Privileged 或 Certified) App 才可存取。可參閱 <a href="https://developer.mozilla.org/docs/Apps/App_permissions">App 許可</a>找到相關需求的表格。</p>
+<p> </p>
+<h2 id="封包式_App_與_Firefox_Marketplace"><strong>封包式</strong><strong> App </strong><strong>與</strong><strong> Firefox Marketplace</strong></h2>
+<p>與托管式 App 相較,Firefox Marketplace 處理封包式 App 的方式較為不同。一旦提交自己的封包式 App 之後,其 ZIP 壓縮檔即儲存於 Marketplace 的伺服器上,且 Marketplace 隨即根據該 ZIP 壓縮檔中的 manifest 檔案,產生新的 manifest 檔案並命名為「mini-manifest」。只要使用者想安裝此 App,就會將 mini-manifest 檔案傳送至 <code>installPackage()</code> 函式以安裝該 App。此 mini-manifest 檔案僅用於安裝與更新作業,與 App 的執行作業無關。</p>
+<p> </p>
+<h2 id="測試封包式_App_的安裝作業"><strong>測試封包式</strong><strong> App </strong><strong>的安裝作業</strong></h2>
+<p>透過 Firefox OS 模擬器 (Firefox OS Simulator),即可輕鬆安裝封包式 App。目前 Firefox OS 模擬器亦針對各個平台而提供 <a href="https://ftp.mozilla.org/pub/mozilla.org/labs/r2d2b2g/r2d2b2g-windows.xpi">Windows</a>、<a href="https://ftp.mozilla.org/pub/mozilla.org/labs/r2d2b2g/r2d2b2g-mac.xpi">OSX</a>、<a href="https://ftp.mozilla.org/pub/mozilla.org/labs/r2d2b2g/r2d2b2g-linux.xpi">Linux</a> 等不同版本。</p>
+<p>安裝模擬器時,將於 Firefox 的「網頁開發者 (Web Developer)」功能表中新增「Firefox OS Simulator」項目。在開啟附加元件之後,即可透過「Add Directory」而指定本端 webapp.manifest 檔案的位置。模擬器另可將該 App 封包 (即壓縮該資料夾),再透過剛封包完畢的 App 開啟模擬器。</p>
+<p>針對 Linux 與 Windows 的使用者,還需要其他步驟才能設定 Android Debug Bridge (adb),以溝通實際裝置。請參閱<a href="https://developer.android.com/tools/device.html#setting-up">步驟 3:設定系統以偵測自己的裝置</a>。</p>
+<p>在實際裝置上,可點選 Settings &gt; Device Information &gt; More Information &gt; Developer &gt; Remote Debugging,進而啟動遠端除錯功能。</p>
+<p>任何時間點均可連上受支援的裝置。一旦連上裝置,模擬器即可偵測並顯示所接上的裝置。而在 App 列表的旁邊,可看到「push」的新按鈕。按下「push」即可將剛封包完畢的 App 傳送至裝置上。</p>
+<p> </p>
+<h2 id="更新封包式_App"><strong>更新封包式</strong><strong> App</strong></h2>
+<p>若要進一步了解更新作業,請參閱<a href="https://developer.mozilla.org/docs/Apps/Updating_apps">更新 App</a>。</p>
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/托管更新作業_(hosting_updates)_/index.html b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/托管更新作業_(hosting_updates)_/index.html
new file mode 100644
index 0000000000..ea5b41073b
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/3rd_party_app_developer_guide/托管更新作業_(hosting_updates)_/index.html
@@ -0,0 +1,78 @@
+---
+title: 托管更新作業 (Hosting Updates)
+slug: Archive/B2G_OS/3rd_Party_App_Developer_Guide/托管更新作業_(Hosting_Updates)_
+---
+<div class="note">
+ <p>本文節錄自 <a href="https://wiki.mozilla.org/B2G/Updating" title="https://wiki.mozilla.org/B2G/Updating">B2G/Updating</a></p>
+</div>
+<p><strong>托管更新作業</strong><strong> (Hosting Updates) </strong></p>
+<p>其實亦可解釋為:用戶端針對更新檔案所進行的輪詢作業。</p>
+<p>B2G 用戶端針對更新所執行的輪詢 (Poll),即針對 <strong>update manifest</strong> 檔案進行提取 (Fetching) 與剖析 (Parsing)。此檔案即稱為「update.xml」。</p>
+<p>B2G 用戶端均已完成「輪詢特定伺服器上的更新」的設定,亦將查詢伺服器上特別架構而成的路徑。而我們建議透過 HTTPS 協定 (當然 HTTP 亦支援),讓用戶端查詢伺服器。若現有用戶端更改了輪詢程式碼,則只要將一筆更新傳送至此用戶端,即可針對「用戶端所輪詢過的路徑與伺服器」進行變更。</p>
+<p>在下列範例中,我們假設將更新作業托管 (Hosting) 給 updates.b2g.com 伺服器。</p>
+<p>則由用戶端所輪詢的 URL,主要可用下列參數呈現:</p>
+<table>
+ <tbody>
+ <tr>
+ <td>
+ <p>PRODUCT_MODEL</p>
+ </td>
+ <td>
+ <p>裝置型號的名稱。此為 B2G 屬性資料庫中的 ro.product.model 數值。</p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>CHANNEL</p>
+ </td>
+ <td>
+ <p>更新「頻道」,有助於測試作業。舉例來說,我們可設定伺服器托管「nightly」、「beta」、「release」等頻道。</p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>VERSION</p>
+ </td>
+ <td>
+ <p>此為用戶端的軟體版本,此以「18.0.2」為例。</p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>BUILD_ID</p>
+ </td>
+ <td>
+ <p>專屬 ID,如針對特定軟體版本 (Build) 所設的時間戳記。</p>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p>當然另有許多數值,可為查詢作業建構出更新用的 URL。</p>
+<p>B2G 用戶端隨後將整合「本身已設定的更新主機」的數值,搭配上述的相關數值,進而建構出 URL,以於執行期間執行輪詢作業。</p>
+<p>此 URL 範例可為:</p>
+<pre><a class="external free" href="https://updates.b2g.com/release/unagi1/18.0/20121203123456/update.xml" rel="nofollow">https://updates.b2g.com/release/unagi1/18.0/20121203123456/update.xml</a>
+</pre>
+<p> </p>
+<p>針對用戶端的請求,若伺服器回傳「404 Not Found」,即代表目前並無可用的更新;若回傳「200」與 manifest 檔案,則代表可能有更新。該 manifest 檔案將描述可用的新版本,亦即用戶端目前<strong>應該更新的</strong>版本。此 manifest 檔案範例為:</p>
+<pre>&lt;?xml version="1.0"?&gt;
+&lt;updates&gt;
+ &lt;update type="major" appVersion="19.0" version="19.0" extensionVersion="19.0" buildID="20121210123456"
+ licenseURL="http://www.mozilla.com/test/sample-eula.html"
+ detailsURL="http://www.mozilla.com/test/sample-details.html"&gt;
+ &lt;patch type="partial" URL="https://updates.b2g.com/release/unagi1/18.0/20121203123456/update.mar"
+ hashFunction="SHA512" hashValue="5111e033875752b7d9b32b4795152dea5ef954cb8a9d4a602dd19a923b464c43521287dcb5781faf3af76e6dc5e8a3dd9c13edea18c1f2c8f3bd89e17d103d6f"
+ size="41901319"/&gt;
+ &lt;/update&gt;
+&lt;/updates&gt;
+</pre>
+<p>而 manifest 檔案中的欄位則描述了:</p>
+<ul>
+ <li>可於用戶端顯示使用者介面的後設資料 (Metadata)</li>
+ <li>關於可用新版本的後設資料</li>
+ <li>更新封裝的位置</li>
+ <li>用以驗證更新裝包下載作業的後設資料</li>
+</ul>
+<p>當然,使用者或用戶端裝置可能會拒絕更新作業。</p>
+<p>透過這些機制,伺服器將可托管更新封裝,以利舊版用戶端的更新作業。或可僅托管「線性更新歷史紀錄 (Linear update history)」,讓用戶端必須透過單一路徑完成升級。</p>
+<p>針對「版本 (Build) 伺服器」和「更新主機」之間的互動細節,仍與作業環境息息相關。本文尚不足以詳細解說完畢。</p>
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/add-ons/index.html b/files/zh-tw/archive/b2g_os/add-ons/index.html
new file mode 100644
index 0000000000..13f42518cd
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/add-ons/index.html
@@ -0,0 +1,282 @@
+---
+title: Firefox OS 附加元件
+slug: Archive/B2G_OS/Add-ons
+translation_of: Archive/B2G_OS/Add-ons
+---
+<div class="warning">
+<p><strong>重要</strong>: 僅 Firefox OS 2.5+ 支援附加元件功能。</p>
+</div>
+
+<p class="summary">「附加元件」的概念在 Web 瀏覽器的世界中眾人皆知,而我們也將這個概念帶進 Firefox OS。Firefox OS 的附加元件可以僅僅作用於單一 App 上,也可以指定作用於多個、甚至所有 App 上。本文帶您一步步撰寫自己的 Firefox OS 附加元件,同時提供一些秘訣及其他應該了解的資訊。</p>
+
+<div class="note">
+<p><strong>附註</strong>:本文僅重點概略翻譯。</p>
+</div>
+
+<div class="note">
+<p><strong>附註</strong>:Firefox OS 附加元件採用 WebExtensions 擴充模式。此模式大部份源自於 Chrome/Blink 擴充套件機制,讓附加元件在開發時能擁有許多互通性與功能上的優勢。詳情可見持續編寫中的 <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions">WebExtensions 文件集</a>。</p>
+</div>
+
+<h2 id="開發附加元件">開發附加元件</h2>
+
+<p>Firefox OS 附加元件其實也是個內含 JavaScript / CSS / 其他必備檔案的 App,但不是拿來獨立運作,而是在描述檔中增加特別的說明來定義要在哪些 App 中使用這個附加元件。When apps are launched on a Firefox OS device that has an add-on installed, the add-on is injected into any app that matches the pattern specifed in the filter.</p>
+
+<p>Firefox OS add-ons use the same syntax and structure for their code as the new school of Firefox add-ons developed using the <a href="https://wiki.mozilla.org/WebExtensions">WebExtensions API</a>, which is itself based on the <a href="https://developer.chrome.com/extensions">Chrome extensions</a> model.</p>
+
+<h3 id="簡單範例">簡單範例</h3>
+
+<p>以下我們以一個簡單的例子說明 Firefox OS 附加元件的程式基礎。這個附加元件會在 system app 放上一塊看板,使用者可以點擊關閉。</p>
+
+<p><img alt="firefox os screenshot showing add-on banner" src="https://mdn.mozillademos.org/files/11445/add-on-screenshot.png" style="display: block; height: 445px; margin: 0px auto; width: 250px;"></p>
+
+<p>這個附加元件很簡單,但用來作為入門倒是相當足夠了。你可以在 <a href="https://github.com/mdn/simple-addon">GitHub 上下載範例程式</a>,而後用 WebIDE 裝到你的 Firefox OS 裝置上(參考 {{anch("Testing your add-on using WebIDE")}} 一節)。往後你也可以透過 <a href="https://marketplace.firefox.com/">Firefox Marketplace</a> 來發表自己的附加元件。</p>
+
+<p>Be aware that Firefox OS add-ons can do a lot more than what we've got listed here. The <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions">WebExtensions</a> documentation will have more information added as time goes on.</p>
+
+<h2 id="解析_Firefox_OS_add-on">解析 Firefox OS add-on</h2>
+
+<p>In this section we'll walkthrough the contents of the sample add-on repo, explaining each piece of content. 目錄結構看起來像這樣:</p>
+
+<ul class="directory-tree">
+ <li>simple-addon/
+ <ul>
+ <li>manifest.json</li>
+ <li>update.webapp</li>
+ <li>css/
+ <ul>
+ <li>style.css</li>
+ </ul>
+ </li>
+ <li>js/
+ <ul>
+ <li>index.js</li>
+ </ul>
+ </li>
+ <li>icons/
+ <ul>
+ <li>128.png</li>
+ </ul>
+ </li>
+ <li>extension.zip</li>
+ </ul>
+ </li>
+</ul>
+
+<h3 id="manifest.json">manifest.json</h3>
+
+<p>你應該發現了:在這個範例附加元件目錄中,有兩種類似的描述檔。第一個<code>「manifest.json</code>」的結構類似 Chrome 擴充套件,與 CSS、JavaScript 及其他檔案一起放在 {{anch("extensions.zip")}} 當中。It can contain a large variety of instructions (see <a href="https://developer.chrome.com/extensions/manifest">Chrome Manifest File Format</a>), but for now we're just going to concentrate on a simple subset:</p>
+
+<pre class="brush: json language-json"><code class="language-json"><span class="punctuation token">{</span>
+ <span class="key token">"manifest_version":</span> <span class="number token">1</span><span class="punctuation token">,</span>
+ <span class="key token">"name":</span> <span class="string token">"Add-on banner"</span><span class="punctuation token">,</span>
+ <span class="key token">"description":</span> <span class="string token">"Firefox OS add-on example"</span><span class="punctuation token">,</span>
+ <span class="key token">"version":</span> <span class="string token">"1.0"</span><span class="punctuation token">,</span>
+ <span class="key token">"author":</span> <span class="string token">"Chris Mills"</span><span class="punctuation token">,</span>
+ <span class="key token">"content_scripts":</span> <span class="punctuation token">[</span><span class="punctuation token">{</span>
+ <span class="key token">"matches":</span> <span class="punctuation token">[</span><span class="string token">"app://system.gaiamobile.org/index.html"</span><span class="punctuation token">]</span><span class="punctuation token">,</span>
+ <span class="key token">"css":</span> <span class="punctuation token">[</span><span class="string token">"css/style.css"</span><span class="punctuation token">]</span><span class="punctuation token">,</span>
+ <span class="key token">"js":</span> <span class="punctuation token">[</span><span class="string token">"js/index.js"</span><span class="punctuation token">]</span>
+ <span class="punctuation token">}</span><span class="punctuation token">]</span><span class="punctuation token">,</span>
+ <span class="key token">"icons":</span> <span class="punctuation token">{</span>
+ <span class="key token">"128":</span> <span class="string token">"/icons/128.png"</span>
+ <span class="punctuation token">}</span>
+<span class="punctuation token">}</span></code></pre>
+
+<p>Most of these fields are pretty self-explanatory, but we'll cover the last few.</p>
+
+<p>首先以 <code>content_scripts</code> 指定要植入 app 的檔案 — 你可以看到這邊以 <code>css</code> 及 <code>js</code> 兩欄分別指定 CSS 樣式檔及 JavaScript 程式檔。<code>matches</code> 欄位則是用以指定該把檔案放入哪些 app 裡,這個欄位的內容形式很多元(參考 <a href="https://developer.chrome.com/extensions/match_patterns">Chrome Match Patterns</a>),但我們先簡單指定為 <code>app://system.gaiamobile.org/index.html</code>,讓附加元件僅影響 system app。若想影響所有 app,可以將此欄位寫為 <code>app://*/* </code>。</p>
+
+<div class="note">
+<p><strong>Note</strong>: You can reference multiple scripts and stylesheets by simply including multiple items in the arrays, for example <code>"css": ["css/style.css", "css/more.css"]</code>.</p>
+</div>
+
+<div class="note">
+<p><strong>Note</strong>: Firefox OS does not currently support the Chrome &lt;all_urls&gt; keyword.</p>
+</div>
+
+<p>At the bottom of the manifest we've included the <code>icons</code> field; see the next section for more info on this.</p>
+
+<h3 id="update.webapp">update.webapp</h3>
+
+<p><code>update.webapp</code> 則是 <a href="https://developer.mozilla.org/en-US/Apps/Build/Manifest">Firefox OS 式的描述檔</a>,基本上就是跟打包 app 時用的描述檔格式相同。(參考 <a href="https://developer.mozilla.org/en-US/Marketplace/Options/Self_publishing#Self-publishing_packaged_apps">Self-publishing packaged apps</a>。)</p>
+
+<p>Our <code>update.webapp</code> file looks like so:</p>
+
+<pre class="brush: json language-json"><code class="language-json"><span class="punctuation token">{</span>
+ <span class="key token">"name" :</span> <span class="string token">"Add-on banner"</span><span class="punctuation token">,</span>
+ <span class="key token">"description":</span> <span class="string token">"Firefox OS add-on example"</span><span class="punctuation token">,</span>
+ <span class="key token">"developer":</span> <span class="punctuation token">{</span> <span class="key token">"name":</span> <span class="string token">"Chris Mills"</span> <span class="punctuation token">}</span><span class="punctuation token">,</span>
+ <span class="key token">"package_path":</span> <span class="string token">"extension.zip"</span><span class="punctuation token">,</span>
+ <span class="key token">"icons":</span> <span class="punctuation token">{</span>
+ <span class="key token">"128":</span> <span class="string token">"/icons/128.png"</span>
+ <span class="punctuation token">}</span>
+<span class="punctuation token">}</span></code></pre>
+
+<p>Again, most of this is fairly self-explanatory.</p>
+
+<p>這邊最重要的欄位該是 <code>package_path</code>,用以指定內含附加元件程式的包裝檔位置。</p>
+
+<p>You'll notice that the <code>icons</code> field is included here, the same as it is in {{anch("manifest.json")}} — <code>update.webapp</code> is the only place you <em>need</em> to have the icons information at the moment, but we'd recommend you include it in both places for now, just in case things change. The <code>icons</code> field points to the add-on icon so it can be used inside the Gaia Settings app, and the Firefox Marketplace when it starts to host add-ons.</p>
+
+<h3 id="指定圖示">指定圖示</h3>
+
+<p>你必須在描述檔中至少指定一個圖示,否則描述檔無效。詳情可參考 <a href="https://developer.mozilla.org/en-US/Apps/Build/Manifest#icons">Manifest 參考文件:圖示</a> 一節。</p>
+
+<h3 id="CSS">CSS</h3>
+
+<p>There is nothing special about the CSS included in the example. The only thing to bear in mind is that you should make sure your add-on classnames and selectors do not conflict with any of the existing CSS in the app(s) it is applied to.</p>
+
+<p>For example, we wrapped our example banner in a {{htmlelement("div")}} with class <code>fxos-banner</code>. But you could even consider using some kind of unique code for your classname.</p>
+
+<h3 id="JavaScript">JavaScript</h3>
+
+<p>Again, the JavaScript file that powers the add-on doesn't have any special functionality inside it (see the <a href="https://github.com/mdn/simple-addon/blob/gh-pages/js/index.js">JavaScript source on Github</a>.) It is injected into the apps it is applied to along with any CSS specified in the {{anch("manifest.json")}} file.</p>
+
+<div class="note">
+<p><strong>Note</strong>: Add-on code is injected every time an app is launched and the match specified in manifest.json pattern matches that app. It is also injected whenever add-ons are enabled. When an add-on is injected into an app because the app is launching, all add-on files are injected into the app before anything in the app is initialized, including the DOM. It is up to the add-on developer to handle the different launch cases cases (immediate injection vs. injection on launch); there is more info on this below.</p>
+</div>
+
+<p>Other main things to note are covered below.</p>
+
+<h4 id="The_window_object">The window object</h4>
+
+<p>Add-ons only share a proxied version of the content <code>window</code>. As a result, anything that is written to the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window">window</a> object from an add-on is unavailable to the app code. However, anything on the <code>window</code> object that is set by app code is available to add-ons. Similarly, the DOM is accessible as usual.</p>
+
+<h4 id="Injecting_code_at_the_correct_time">Injecting code at the correct time</h4>
+
+<p>You must be careful to properly handle cases where an add-on is injected into an app after the app has been loaded. Such a scenario can occur when an app is already running and an add-on that targets it is enabled.</p>
+
+<p>in such a case, a <a href="https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onload">window.onload</a> handler won't work because the <a href="https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded">DOMContentLoaded</a> event has already occured.</p>
+
+<p>There's no good solution to this problem right now. In the interim, we recommend to check whether or not the DOM has been loaded before setting a <code>DOMContentLoaded</code> callback. This pattern is used in the demo:</p>
+
+<pre class="brush: js language-js"><code class="language-js"><span class="comment token">// If injecting into an app that was already running at the time
+</span><span class="comment token">// the app was enabled, simply initialize it.
+</span><span class="keyword token">if</span> <span class="punctuation token">(</span>document<span class="punctuation token">.</span>documentElement<span class="punctuation token">)</span> <span class="punctuation token">{</span>
+ <span class="function token">initialize<span class="punctuation token">(</span></span><span class="punctuation token">)</span><span class="punctuation token">;</span>
+<span class="punctuation token">}</span>
+<span class="comment token">
+// Otherwise, we need to wait for the DOM to be ready before
+</span><span class="comment token">// starting initialization since add-ons are usually (always?)
+</span><span class="comment token">// injected *before* `document.documentElement` is defined.
+</span><span class="keyword token">else</span> <span class="punctuation token">{</span>
+ window<span class="punctuation token">.</span><span class="function token">addEventListener<span class="punctuation token">(</span></span><span class="string token">'DOMContentLoaded'</span><span class="punctuation token">,</span> initialize<span class="punctuation token">)</span><span class="punctuation token">;</span>
+<span class="punctuation token">}</span>
+
+<span class="keyword token">function</span> <span class="function token">initialize<span class="punctuation token">(</span></span><span class="punctuation token">)</span> <span class="punctuation token">{</span>
+ <span class="comment token"> // ...
+</span><span class="punctuation token">}</span></code></pre>
+
+<h4 id="避免重複植入">避免重複植入</h4>
+
+<p>為避免附加元件的程式碼多次重複植入到同一 App 中,您必須檢查附加元件是否曾經植入過,例如這樣</p>
+
+<p>you should check whether your add-on is already present, like this:</p>
+
+<pre class="brush: js language-js"><code class="language-js"><span class="keyword token">function</span> <span class="function token">initialize<span class="punctuation token">(</span></span><span class="punctuation token">)</span> <span class="punctuation token">{</span>
+ <span class="keyword token">if</span> <span class="punctuation token">(</span>document<span class="punctuation token">.</span><span class="function token">querySelector<span class="punctuation token">(</span></span><span class="string token">'.fxos-banner'</span><span class="punctuation token">)</span><span class="punctuation token">)</span> <span class="punctuation token">{</span>
+ <span class="comment token"> // Already injected, abort.
+</span> <span class="keyword token">return</span><span class="punctuation token">;</span>
+ <span class="punctuation token">}</span> <span class="keyword token">else</span> <span class="punctuation token">{</span>
+ <span class="keyword token">var</span> body <span class="operator token">=</span> document<span class="punctuation token">.</span><span class="function token">querySelector<span class="punctuation token">(</span></span><span class="string token">'body'</span><span class="punctuation token">)</span><span class="punctuation token">;</span>
+ <span class="keyword token">var</span> fxosBanner <span class="operator token">=</span> document<span class="punctuation token">.</span><span class="function token">createElement<span class="punctuation token">(</span></span><span class="string token">'div'</span><span class="punctuation token">)</span><span class="punctuation token">;</span>
+ fxosBanner<span class="punctuation token">.</span>classList<span class="punctuation token">.</span><span class="function token">add<span class="punctuation token">(</span></span><span class="string token">'fxos-banner'</span><span class="punctuation token">)</span><span class="punctuation token">;</span>
+ <span class="keyword token">var</span> bannerText <span class="operator token">=</span> document<span class="punctuation token">.</span><span class="function token">createElement<span class="punctuation token">(</span></span><span class="string token">'p'</span><span class="punctuation token">)</span><span class="punctuation token">;</span>
+ <span class="keyword token">var</span> closeBtn <span class="operator token">=</span> document<span class="punctuation token">.</span><span class="function token">createElement<span class="punctuation token">(</span></span><span class="string token">'button'</span><span class="punctuation token">)</span><span class="punctuation token">;</span>
+
+ fxosBanner<span class="punctuation token">.</span><span class="function token">appendChild<span class="punctuation token">(</span></span>bannerText<span class="punctuation token">)</span><span class="punctuation token">;</span>
+ fxosBanner<span class="punctuation token">.</span><span class="function token">appendChild<span class="punctuation token">(</span></span>closeBtn<span class="punctuation token">)</span><span class="punctuation token">;</span>
+ body<span class="punctuation token">.</span><span class="function token">appendChild<span class="punctuation token">(</span></span>fxosBanner<span class="punctuation token">)</span><span class="punctuation token">;</span>
+
+ closeBtn<span class="punctuation token">.</span>textContent <span class="operator token">=</span> <span class="string token">'X'</span><span class="punctuation token">;</span>
+ bannerText<span class="punctuation token">.</span>textContent <span class="operator token">=</span> <span class="string token">'Wow, you have an extension installed!'</span><span class="punctuation token">;</span>
+
+ closeBtn<span class="punctuation token">.</span>onclick <span class="operator token">=</span> <span class="keyword token">function</span><span class="punctuation token">(</span><span class="punctuation token">)</span> <span class="punctuation token">{</span>
+ fxosBanner<span class="punctuation token">.</span>parentNode<span class="punctuation token">.</span><span class="function token">removeChild<span class="punctuation token">(</span></span>fxosBanner<span class="punctuation token">)</span><span class="punctuation token">;</span>
+ <span class="punctuation token">}</span>
+ <span class="punctuation token">}</span>
+<span class="punctuation token">}</span></code></pre>
+
+<p>So here we are using <code>if (document.querySelector('.fxos-banner'))</code> to check whether the example banner already exists. If so, then we return out of the function. If not, then the <code>querySelector()</code> method returns <code>null</code>, and we run the code block that creates the banner.</p>
+
+<h4 id="App_management_functions_in_add-ons">App management functions in add-ons</h4>
+
+<p>All <code><a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMApplicationsRegistry">Apps</a></code> and <code><a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMApplicationsRegistry/mgmt">Mgmt</a></code> functions work on add-ons just like they do on apps. Be aware however that the latter are only available to add-ons when they are injected into a certified app that has the <code>webapps-manager</code> permission specified in the manifest.</p>
+
+<p>In addition to these functions, an <code><a href="http://mxr.mozilla.org/mozilla-central/source/dom/webidl/Apps.webidl#141">onenabledstatechange</a></code> callback is exposed for add-ons being enabled and disabled. This event is fired for all add-ons, so you will have to check which add-on was enabled/disabled before performing initialization or cleanup.</p>
+
+<pre class="brush: js language-js"><code class="language-js">navigator<span class="punctuation token">.</span>mozApps<span class="punctuation token">.</span>mgmt<span class="punctuation token">.</span>onenabledstatechange <span class="operator token">=</span> <span class="keyword token">function</span><span class="punctuation token">(</span>event<span class="punctuation token">)</span> <span class="punctuation token">{</span>
+ <span class="keyword token">var</span> app <span class="operator token">=</span> event<span class="punctuation token">.</span>application<span class="punctuation token">;</span>
+ <span class="keyword token">if</span> <span class="punctuation token">(</span>app<span class="punctuation token">.</span>manifestURL <span class="operator token">===</span> <span class="string token">'https://origin.of.manifest/manifest.webapp'</span><span class="punctuation token">)</span> <span class="punctuation token">{</span>
+ <span class="keyword token">var</span> wasEnabled <span class="operator token">=</span> app<span class="punctuation token">.</span>enabled<span class="punctuation token">;</span>
+ <span class="comment token"> // do something with this information
+</span> <span class="punctuation token">}</span>
+<span class="punctuation token">}</span><span class="punctuation token">;</span></code></pre>
+
+<h3 id="extension.zip">extension.zip</h3>
+
+<div class="note">
+<p><strong>Note</strong>: The <code>extension.zip</code> file has been left in the demo repo mainly for illustrative purposes, so it is clear how the system works. You actually don't need to include the zip in your directory, as WebIDE will generate it for you when you install the add-on. The Firefox Marketplace is likely to do the same when it starts to list add-ons.</p>
+</div>
+
+<p>The <code>extension.zip</code> archive contains the code for the extension, and is referenced in the {{anch("update.webapp")}} <code>package_path</code> field — This is how Gecko finds the code to be installed. Archived inside you'll find:</p>
+
+<ul class="directory-tree">
+ <li>css/
+ <ul>
+ <li>style.css</li>
+ </ul>
+ </li>
+ <li>js/
+ <ul>
+ <li>index.js</li>
+ </ul>
+ </li>
+ <li>icons/
+ <ul>
+ <li>128.png</li>
+ </ul>
+ </li>
+ <li>manifest.json</li>
+</ul>
+
+<p>So the <code>manifest.json</code> file sits inside the archive, and serves to reference the files to be injected and specify which apps to affect.</p>
+
+<h3 id="Testing_your_add-on_using_WebIDE">Testing your add-on using WebIDE</h3>
+
+<p>Mozilla's WebIDE tool is available in Firefox desktop by default. To use it for installing add-ons on your phone, follow the steps listed below:</p>
+
+<ol>
+ <li>Make sure you have Firefox 43 or above installed (this was <a href="https://nightly.mozilla.org/">Nightly</a> at the time of writing), as add-ons are not supported in WebIDE below this version.</li>
+ <li>Open your browser and open the WebIDE tool (press the WebIDE button, or choose <em>Tools &gt; Web Developer &gt; WebIDE</em> from the menu.)</li>
+ <li>Make sure your phone has remote debugging enabled (<em>Settings App &gt; Developer &gt; Set the "Debugging via USB " selection to "ADB and DevTools".</em>)</li>
+ <li>Connect your phone to your computer via a USB cable. Make sure you don't have other phones connected at the same time.</li>
+ <li>In the WebIDE UI, press the <em>Select Runtime</em> option, and select your phone, which should be listed under <em>USB Devices</em>.</li>
+ <li>At this point, your phone should be showing an <em>Allow USB debugging connection?</em> prompt. Choose <em>Allow</em>.</li>
+ <li>Select the <em>Open App</em> option, then choose <em>Open Packaged App...</em></li>
+ <li>In the resulting file chooser, navigate to the directory that contains your <code>update.webapp</code> manifest file, and press <em>Open</em>.</li>
+ <li>Providing there are no warnings or errors reported, you can install your add-on on the device using the "Play" button in the center (<em>Install and Run</em>.)</li>
+ <li>To see the add-on in action, enable it by choosing <em>Settings app &gt; Add-ons &gt; Add-on example &gt; toggle the checkbox at the top</em>.</li>
+</ol>
+
+<h2 id="Add-on_settings">Add-on settings</h2>
+
+<p>You can control the add-ons on your phone by going to <em>Settings app &gt; Add-ons</em>; in here you'll find a list of your installed add-ons, and you can tap each entry to see more information about each add-on.</p>
+
+<p style="width: 520px; margin: 0 auto;"><img alt="firefox os screenshot showing a list of installed add-ons in the settings app" src="https://mdn.mozillademos.org/files/11447/add-on-settings-screen.png" style="height: 445px; margin-right: 20px; width: 250px;"><img alt="information screen for an individual addon, with a list of apps this add-on affects, and controls to disable and delete the add-on" src="https://mdn.mozillademos.org/files/11449/individual-add-on-settings-page.png" style="height: 445px; width: 250px;"></p>
+
+<h3 id="Enablingdisabling_and_deleting_add-ons">Enabling/disabling and deleting add-ons</h3>
+
+<p>By default, add-ons will be enabled after installation when they are installed form the Firefox Marketplace. When installed via WebIDE however they will be disabled by default.</p>
+
+<p>You can manually enable/disable add-ons via the checkbox at the top of each individual add-on's page (found under <em>Settings app &gt; Add-ons</em>), or programmatically using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMApplicationsManager/setEnabled">navigator.mozApps.mgmt.setEnabled()</a> function (see this <a href="https://github.com/fxos/directory/blob/master/app/js/controller/list_controller.js#L220-L223">setEnabled() usage example</a> on Github.)</p>
+
+<p>You can delete an add-on entirely by tapping the <em>Delete</em> button found on individual app pages.</p>
+
+<h3 id="Apps_affected_by_add-ons">Apps affected by add-ons</h3>
+
+<p>You'll also notice that in the page for each individual add-on there is a section that lists which apps are affected by that add-on. Currently this doesn't seem to work (it always lists <em>This add-on does not affect any installed apps</em>.) This should be fixed soon (see {{Bug(1196386)}} for progress.)</p>
+
+<h2 id="權限">權限</h2>
+
+<p>附加元件的權限繼承自其所植入的 App,在描述檔中想多要一點權限是行不通的,也無法以此方式增加其植入對象的權限。</p>
diff --git a/files/zh-tw/archive/b2g_os/api/fmradio/index.html b/files/zh-tw/archive/b2g_os/api/fmradio/index.html
new file mode 100644
index 0000000000..ec662a0029
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/api/fmradio/index.html
@@ -0,0 +1,110 @@
+---
+title: WebFM
+slug: Archive/B2G_OS/API/FMRadio
+translation_of: Archive/B2G_OS/API/FMRadio
+---
+<p>WebFM API 可存取裝置上的 FM 收音機功能。此介面可開啟/關閉 FM 收音機,亦可搜尋各個電台。</p>
+<h2 id="Syntax" name="Syntax">進入點 (Entry point)</h2>
+<pre class="eval"><span class="nx">if (navigator.mozFMRadio)
+ navigator</span><span class="p">.</span><span class="nx">mozFMRadio.enable()</span>;
+</pre>
+<h2 id="API">API</h2>
+<pre>interface FM : EventTarget {
+   readonly attribute boolean enabled;
+   readonly attribute boolean antennaAvailable;
+   readonly attribute double frequency;
+ readonly attribute double frequencyUpperBound;
+ readonly attribute double frequencyLowerBound;
+ readonly attribute double channelWidth;
+
+   attribute Function onantennaavailablechange;
+   attribute Function onfrequencychange;
+   attribute Function onenabled;
+   attribute Function ondisabled;
+
+   DOMRequest enable(double frequency);
+   DOMRequest disable();
+   DOMRequest setFrequency(double frequency);
+   DOMRequest seekUp();
+   DOMRequest seekDown();
+   DOMRequest cancelSeek();
+}</pre>
+<h3 id="屬性_(Attribute)">屬性 (Attribute)</h3>
+<dl>
+ <dt>
+ enabled</dt>
+ <dd>
+ 表示目前是否開啟收音機</dd>
+ <dt>
+ antennaAvailable</dt>
+ <dd>
+ 表示是否已插上天線並可使用天線</dd>
+ <dt>
+ frequency</dt>
+ <dd>
+ 目前的收音機頻率</dd>
+ <dt>
+ frequencyUpperBound</dt>
+ <dd>
+ 以 <code>seek</code> 函式搜尋收音機電台的最高頻率</dd>
+ <dt>
+ frequencyLowerBound</dt>
+ <dd>
+ 以 <code>seek</code> 函式搜尋收音機電台的最低頻率</dd>
+ <dt>
+ channelWidth</dt>
+ <dd>
+ 頻率範圍內的頻寬,以「MHz」為單位。常用數值為 0.05、0.1 (預設)、0.2 其中之一。</dd>
+ <dd>
+ 指定了某一頻率之後,就會四捨五入到 channelWidth 所指定的最接近頻率。舉例來說,若 100 Mz 為有效頻率,且 channelWidth 為 0.2,則 100.2 與 99.8 將成為有效頻率。但若是 100.15 將四捨五入為 100.2。</dd>
+</dl>
+<h3 id="函式_(Method)">函式 (Method)</h3>
+<dl>
+ <dt>
+ enable(frequency)</dt>
+ <dd>
+ 開啟收音機並轉為指定頻率。若沒有參數 (Argument) 就呼叫此函式,將隨即丟出錯誤。作業成功或錯誤均將回傳 DOMRequest。</dd>
+ <dt>
+ disable()</dt>
+ <dd>
+ 關閉收音機。若回傳成功的 DOMRequest,則代表已正確關閉收音機。</dd>
+ <dt>
+ setFrenquecy(frequency)</dt>
+ <dd>
+ 非同步變更收音機的頻率。此數值必須位於 <code>frequencyLowerBound</code> 與 <code>frequencyUpperBound</code> 之間。若嘗試設定此範圍之外,將導致錯誤。</dd>
+ <dd>
+ 若回傳成功的 DOMRequest,則代表已正確變更頻率。</dd>
+ <dt>
+ seekUp()</dt>
+ <dd>
+ 要求收音機尋找新的頻率 (一般搜尋較目前頻率更高的頻率)。若成功搜尋到新的頻率,將隨即啟動 <code>frequencychange</code> 事件。若回傳成功的 DOMRequest,則代表已開始搜尋作業。一旦達到最高頻率,將回到較低頻率開始搜尋。</dd>
+ <dt>
+ seekDown()</dt>
+ <dd>
+ 與上方函式的功能相同,但將搜尋較目前頻率更低的頻率。一旦達到最低頻率,將回到較高頻率開始搜尋。</dd>
+ <dt>
+ cancelSeek()</dt>
+ <dd>
+ 取消目前的搜尋作業。若回傳成功的 DOMRequest,則代表已取消搜尋作業。</dd>
+</dl>
+<h3 id="事件_(Event)">事件 (Event)</h3>
+<dl>
+ <dt>
+ enabled</dt>
+ <dd>
+ 開啟收音機時觸發此事件</dd>
+ <dt>
+ disabled</dt>
+ <dd>
+ 關閉收音機時觸發此事件</dd>
+ <dt>
+ antennaavailablechange</dt>
+ <dd>
+ 插上/拔除天線時觸發此事件</dd>
+ <dt>
+ frequencychange</dt>
+ <dd>
+ 只要變更收音機頻率,均將觸發此事件</dd>
+</dl>
+<h2 id="另請參閱">另請參閱</h2>
+<p><a href="https://github.com/mozilla-b2g/gaia/tree/master/apps/fm" title="https://github.com/mozilla-b2g/gaia/tree/master/apps/fm">Gaia radio app</a></p>
diff --git a/files/zh-tw/archive/b2g_os/api/index.html b/files/zh-tw/archive/b2g_os/api/index.html
new file mode 100644
index 0000000000..706080ff54
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/api/index.html
@@ -0,0 +1,156 @@
+---
+title: B2G OS APIs
+slug: Archive/B2G_OS/API
+tags:
+ - API
+ - B2G API
+ - NeedsTranslation
+ - TopicStub
+ - b2g os api's
+translation_of: Archive/B2G_OS/API
+---
+<p id="B2G_OS_uses_standard_Web_API's">List of B2G OS APIs </p>
+
+<p></p><div class="index">
+<span>A</span><ul>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/AudioChannelManager" title="The AudioChannelManager interface of the AudioChannels API includes features for managing your device's audio channels, including setting what channel's volume to affect when the volume buttons are pressed inside a particular app."><code>AudioChannelManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+</ul>
+<span>B</span><ul>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothAdapter" title="The BluetoothAdapter interface of the Web Bluetooth API is used to handle all the operations requested by Bluetooth networks. A Bluetooth adapter is the physical interface which is used to interact with local Bluetooth device."><code>BluetoothAdapter</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothAdapterEvent" title="The BluetoothAdapterEvent interface of the Web Bluetooth API provides access to a BluetoothAdapter object and its address as the parameter of a adapteradded or adapterremoved event handler (see BluetoothManager.onadapteradded and BluetoothManager.onadapterremoved), when fired."><code>BluetoothAdapterEvent</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothAttributeEvent" title="The BluetoothAttributeEvent interface of the Web Bluetooth API provides access to changed attributes and their new values as the parameter of attributechanged event handlers (including BluetoothManager.onattributechanged, BluetoothAdapter.onattributechanged, and BluetoothDevice.onattributechanged), when fired."><code>BluetoothAttributeEvent</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothClassOfDevice" title="The BluetoothClassOfDevice interface of the Web Bluetooth API provides identifying/classification information about a given remote Bluetooth device, available at discovery stage."><code>BluetoothClassOfDevice</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothDevice" title="The BluetoothDevice interface of the Web Bluetooth API provides information regarding a given Bluetooth device."><code>BluetoothDevice</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothDeviceEvent" title="The BluetoothDeviceEvent interface of the Web Bluetooth API provides access to a found/paired device (BluetoothDevice) object or the address or an unpaired device as the parameter of a devicefound, devicepaired or deviceunpaired event handler (see BluetoothDiscoveryHandle.ondevicefound, BluetoothAdapter.ondevicepaired, and BluetoothAdapter.ondeviceunpaired), when fired."><code>BluetoothDeviceEvent</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothDiscoveryHandle" title="The BluetoothDiscoveryHandle interface of the Web Bluetooth API is used to notify the current application about the discovery of a remote bluetooth device."><code>BluetoothDiscoveryHandle</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothGatt" title="The BluetoothGatt interface of the Web Bluetooth API handles initial communications and connections with Gatt services."><code>BluetoothGatt</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothGattCharacteristic" title="The BluetoothGattCharacteristic interface of the Web Bluetooth API represents a GATT service characteristic, which includes characteristic definition, value, properties and configuration info, and a list of descriptors that provide related information."><code>BluetoothGattCharacteristic</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothGattCharacteristicEvent" title="The BluetoothGattCharacteristicEvent interface of the Web Bluetooth API provides access to an updated BluetoothGattCharacteristic object as the parameter of the BluetoothGatt.oncharacteristicchanged, handler, when the characteristicchanged event is fired."><code>BluetoothGattCharacteristicEvent</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothGattDescriptor" title="The BluetoothGattDescriptor interface of the Web Bluetooth API represents a GATT descriptor, which contains related information about a characteristic value."><code>BluetoothGattDescriptor</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothGattServer" title="The BluetoothGattServer interface of the Web Bluetooth API provides Bluetooth GATT server functionality to allow creation of Bluetooth Smart/LE services and characteristics."><code>BluetoothGattServer</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothGattService" title="The BluetoothGattService interface of the Web Bluetooth API represents a service provided by a GATT server, including the service definition, a list of referenced services, and a list of the characteristics of this service."><code>BluetoothGattService</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothLeDeviceEvent" title="The BluetoothLeDeviceEvent interface of the Web Bluetooth API provides access to an LE device BluetoothDevice object and its RSSI value and advertisement record, as the parameter of a devicefound event handler (see BluetoothDiscoveryHandle.ondevicefound), when fired."><code>BluetoothLeDeviceEvent</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothManager" title="The BluetoothManager interface of the Web Bluetooth API allows to access all Bluetooth adapters available on the device. Adapters are the connection interface to connect a Bluetooth device to that device."><code>BluetoothManager</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothPairingEvent" title="The BluetoothPairingEvent interface of the Web Bluetooth API provides access to a device's name and the BluetoothPairingHandle object required for pairing devices as the parameter of pairing-related handlers (for example including BluetoothPairingListener.ondisplaypasskeyreq and BluetoothPairingListener.onenterpincodereq), when fired."><code>BluetoothPairingEvent</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothPairingHandle" title="The BluetoothPairingHandle interface of the Web Bluetooth API contains the functionality required for completing a device pairing operation, including passkeys, and mechanisms to reply to user-entered pin codes and confirm passkeys."><code>BluetoothPairingHandle</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/BluetoothPairingListener" title="The BluetoothPairingListener interface of the Web Bluetooth API defines event handlers triggered for different pairing operations."><code>BluetoothPairingListener</code> (Firefox OS)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+</ul>
+<span>C</span><ul>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/CallEvent" title="The CallEvent interface of the Web Telephony API represents events related to telephone calls."><code>CallEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/CameraCapabilities" title="The CameraControl.capabilities property returns a CameraCapabilities object, which describes all the camera's capabilities."><code>CameraCapabilities</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/CameraControl" title="When you use the CameraManager.getCamera() method to get a reference to a camera, you specify a callback function to be invoked on success. That function receives as a parameter a CameraControl object. You can use its methods and properties to manage and make use of the camera."><code>CameraControl</code></a></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/CameraManager" title="The CameraManager interface provides access to any cameras available on the device being used."><code>CameraManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/ContactManager" title="The ContactManager interface is used to access and manage the contact available on the device."><code>ContactManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+</ul>
+<span>D</span><ul>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DOMApplication" title="In the Open Web apps JavaScript API, an App object is a JavaScript object that represents an app that is or could be installed in the user's app repository."><code>DOMApplication</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DOMCursor" title="A DOMCursor object represents an ongoing operation over a list of results. It is an enhanced DOMRequest that allows to iterate through a list of results asynchronously. Each time its continue() method is called, the DOMCursor tries to reach the next result in the list and calls its result's success or error accordingly."><code>DOMCursor</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DOMRequest" title="A DOMRequest object represents an ongoing operation. It provides callbacks that are called when the operation completes, as well as a reference to the operation's result. A DOM method that initiates an ongoing operation may return a DOMRequest object that you can use to monitor the progress of that operation."><code>DOMRequest</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DataStore" title="The DataStore interface of the Data Store API represents a retrieved set of data, and includes standard properties for accessing the store's name, owner, etc., methods for reading, modifying and syncing data, and the onchange event handler for reacting to changes to the data."><code>DataStore</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DataStoreChangeEvent" title="The DataStoreChangeEvent interface of the Data Store API represents the event related to a record changed in the data store, i.e. this is returned once a change is made and the change event is fired (see DataStore.onchange for the handler)."><code>DataStoreChangeEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DataStoreCursor" title="The DataStoreCursor interface of the Data Store API represents a cursor that allows apps to iterate through a list of DataStoreTask objects representing the change history of the data store, for use when synchronizing the data."><code>DataStoreCursor</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DataStoreTask" title="The DataStoreTask interface of the Data Store API represents a record changed in the data store when a DataStoreCursor is used to iterate through the data store's change history."><code>DataStoreTask</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DeviceStorage" title="The DeviceStorage interface is used to access files on a specific storage area available on the device. A storage area is, in essence, a file system repository even if it hides the reality of the underlying file system."><code>DeviceStorage</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/DeviceStorageChangeEvent" title="The DeviceStorageChangeEvent provides information about any change made to a file inside a given storage area. It extends the Event interface."><code>DeviceStorageChangeEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+</ul>
+
+
+<span>F</span><ul>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/FMRadio" title="The WebFM API provides access to the device FM radio. This interface lets you turn the FM radio on and off and tune it to different stations. It is accessible through the navigator.mozFMRadio property."><code>FMRadio</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+</ul>
+
+
+<span>H</span><ul>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/HTMLMediaElement" title=""><code>HTMLMediaElement</code> (Firefox OS extensions)</a></span></span></li>
+</ul>
+
+
+
+
+
+
+
+
+<span>M</span><ul>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MMICall" title="The MMICall interface of the Web Telephony API represents an MMI call, allowing us to receive the result of the call."><code>MMICall</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozActivity" title="The MozActivity interface allows apps to delegate an activity to another app."><code>MozActivity</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozActivityOptions" title="The MozActivityOptions interface allows apps to declare the activity they want to create and also to access information of activities they want to handle."><code>MozActivityOptions</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozActivityRequestHandler" title="The MozActivityRequestHandler interface allows apps that handle activities to access and interact with the request made by a third party app that tries to delegate an activity."><code>MozActivityRequestHandler</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozAlarmsManager" title="The MozAlarmsManager API allows to schedule notifications or applications to be started at a specific time."><code>MozAlarmsManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozContact" title="The MozContact interface is used to describe a single contact in the device's contact database."><code>MozContact</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozContactChangeEvent" title="The MozContactChangeEvent interface provides information about the contact that has changed. It inherits from the Event interface."><code>MozContactChangeEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozIccManager" title="The MozIccManager interface gives access to ICC related functionalities."><code>MozIccManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMmsEvent" title="The DOM MozMmsEvent represents events related to WebSMS MMS messages."><code>MozMmsEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMmsMessage" title="The DOM MozMmsMessage object represents an MMS message and has all the information about sender, recipient, body content, attachements, and date of the message itself."><code>MozMmsMessage</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileCFInfo" title="The MozMobileCFInfo interface defines options used to retrieve or define call forwarding settings."><code>MozMobileCFInfo</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileCellInfo" title="The MozMobileCellInfo interface allow to access to cell location information."><code>MozMobileCellInfo</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileConnection" title="This API is used to get information about the current mobile voice and data connection states of the device. It is accessible through navigator.mozMobileConnections, which returns an array of MozMobileConnection objects."><code>MozMobileConnection</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileConnectionInfo" title="The MozMobileConnectionInfo interface allows to access connection information for voice or data. The navigator.mozMobileConnection uses it through its voice and data properties."><code>MozMobileConnectionInfo</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileCCInfo" title="The MozMobileICCInfo interface allow to access access to information stored in the device's ICC card. The navigator.mozMobileConnection uses it through its iccInfo property."><code>MozMobileICCInfo</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileMessageManager" title="Provides support for sending and managing both MMS and SMS messages on a device with WebSMS."><code>MozMobileMessageManager</code></a></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileMessageThread" title="The DOM MozMobileMessageThread object represents a thread of messages."><code>MozMobileMessageThread</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozMobileNetworkInfo" title="The MozMobileNetworkInfo interface allows access to information related to the network carrier. The navigator.mozMobileConnection uses it through its voice.network and data.network properties."><code>MozMobileNetworkInfo</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNDEFRecord" title="MozNDEFRecord is a data structure that implements the NFC Data Exchange Format (NDEF). It is a standard common format for NFC-related data communication between applications, NFC tags, and devices."><code>MozNDEFRecord</code></a></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNFC" title="MozNFC is the top level API for operating in NFC Reader/Writer mode, NFC P2P mode and NFC Card Emulation mode."><code>MozNFC</code></a></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNFCPeer" title="The NFC implementation in Gecko follows the NFC Forum specifications."><code>MozNFCPeer</code></a></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNFCTag" title="MozNFCTag contains the basic functions needed to read, write, and inspect NDEF-compatible NFC Tags."><code>MozNFCTag</code></a></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNetworkStats" title="The MozNetworkStats object gives access to statistics about the data usage for a given network."><code>MozNetworkStats</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNetworkStatsData" title="The MozNetworkStatsData objects represent a chunk of data usage statistics."><code>MozNetworkStatsData</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozNetworkStatsManager" title="The MozNetworkStatsManager interface provides methods and properties to monitor data usage."><code>MozNetworkStatsManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozPowerManager" title="The MozPowerManager interface allows to explicitly control the part of the device that uses power."><code>MozPowerManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozSettingsEvent" title="The MozSettingsEvent represents a settingchange event, providing information about a change to the value of a setting on the device. It extends the DOM Event interface."><code>MozSettingsEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozSmsEvent" title="The DOM MozSmsEvent represents events related to WebSMS text messages."><code>MozSmsEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozSmsFilter" title="The MozSmsFilter interface provides a way to filter out MozSmsMessage or MozMmsMessage objects through the MozMobileMessageManager.getMessages() method."><code>MozSmsFilter</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozSmsManager" title="Provides support for sending and managing SMS messages on a device with WebSMS."><code>MozSmsManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span> <span title="This is an obsolete API and is no longer guaranteed to work."><i class="icon-trash"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozSmsMessage" title="The DOM MozSmsMessage object represents an SMS text message and has all the information about sender, recipient, body text and date of the message itself."><code>MozSmsMessage</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozSmsSegmentInfo" title="The DOM MozSmsSegmentInfo interface provides information about how a string of text will be automatically split into segments. Each segment represents a single SMS of a multi-part SMS message."><code>MozSmsSegmentInfo</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozTimeManager" title="The MozTimeManager interface is used to set the system time on a device."><code>MozTimeManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozVoicemail" title="The MozVoicemail interface allows access to the information regarding the voicemail features available through the RIL of a Firefox OS device."><code>MozVoicemail</code></a></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozVoicemailEvent" title="The MozVoicemailEvent API provides access to the event information when a statuschange event is triggered."><code>MozVoicemailEvent</code></a></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozVoicemailStatus" title="The MozVoicemailStatus API provides access to a voicemail status."><code>MozVoicemailStatus</code></a></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozWakeLock" title="The MozWakeLock interface of the Wake Lock API tracks a wake lock set on any resource set on the device."><code>MozWakeLock</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozWifiConnectionInfoEvent" title="The MozWifiConnectionInfoEvent interface provides developers with information regarding the state of the current Wifi connection."><code>MozWifiConnectionInfoEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozWifiP2pGroupOwner" title="The MozWifiP2pGroupOwner is an interface that represents the group owner of WiFi Direct connection."><code>MozWifiP2pGroupOwner</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozWifiP2pManager" title="The MozWifiP2pManager is an interface that allows to control Wi-Fi connection with other computers using Wi-Fi Direct."><code>MozWifiP2pManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/MozWifiStatusChangeEvent" title="The MozWifiStatusChangeEvent interface provides developers with information regarding the current status of the Wifi connection."><code>MozWifiStatusChangeEvent</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+</ul>
+<span>N</span><ul>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/Navigator" title="The Navigator interface represents the state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. This page represents the list of properties and methods added to Navigator on Firefox OS devices. For the list of properties and methods available to any Web sites, consult Navigator."><code>Navigator</code> (Firefox OS extensions)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+</ul>
+
+
+<span>P</span><ul>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/PermissionSettings" title="The PermissionSettings interface provides ways to let the user manage all the permissions requested by all apps on a Firefox OS device."><code>PermissionSettings</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+</ul>
+
+
+
+
+<span>S</span><ul>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/SettingsLock" title="The SettingsLock interface represents a lock on settings. it allows a script to modify settings asynchronously, but in a safe way: ordering is guaranteed and the no other script will modify the settings until the modification are done (the next lock objects will start processing after it has been closed)."><code>SettingsLock</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/SettingsManager" title="Provides access to the device's settings."><code>SettingsManager</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+</ul>
+<span>T</span><ul>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/TCPServerSocket" title="The TCPServerSocket interface provides an API to handle a persistent server that will listen for incoming connections on a given port."><code>TCPServerSocket</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/TCPSocket" title="The TCPSocket interface provides access to a raw TCP socket."><code>TCPSocket</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/Telephony" title="The Telephony interface of the Web Telephony API provides support for dialing, answering, and managing phone calls on a device with telephony support."><code>Telephony</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/TelephonyCall" title="The TelephonyCall interface of the Web Telephony API represents one telephone call, providing information about the call and offering mechanisms for controlling it and detecting changes to its status."><code>TelephonyCall</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/TelephonyCallGroup" title="The TelephonyCallGroup interface of the Web Telephony API represents a multi-person/conference call, providing functions to allow callers to be added and removed from the conference call, hanging up of the entire call, and more."><code>TelephonyCallGroup</code></a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+</ul>
+<span>U</span><ul>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/UDPSocket" title=""><code>UDPSocket</code></a></span></span></li>
+</ul>
+
+
+<span>W</span><ul>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/WifiManager" title="The WifiManager API provides access to the wifi device capability."><code>WifiManager</code></a></span></span></li>
+<li><span class="indexListRow"><span class="indexListTerm"><a href="/en-US/docs/Archive/B2G_OS/API/Window" title="The Window interface represents a window containing a DOM document. This page represents the list of properties and methods added to Window on Firefox OS devices. For the list of properties and methods available to any Web sites, consult Window."><code>Window</code> (Firefox OS extensions)</a></span><span class="indexListBadges"> <span title="This API has not been standardized."><i class="icon-warning-sign"> </i></span></span></span></li>
+</ul>
+
+
+
+
+
+
+
+</div><p></p>
diff --git a/files/zh-tw/archive/b2g_os/apps/index.html b/files/zh-tw/archive/b2g_os/apps/index.html
new file mode 100644
index 0000000000..7c848f3df1
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/apps/index.html
@@ -0,0 +1,45 @@
+---
+title: 製作 Firefox OS 的 apps
+slug: Archive/B2G_OS/Apps
+translation_of: Web/Apps/Fundamentals
+---
+<p>Firefox OS 裝置的應用程式其實只是開啟網頁上的Web<span style="line-height: inherit;">應用</span><span style="line-height: inherit;">;它們完全由各種開放的Web技術所組成,如 JavaScript, HTML, 和 CSS。雖然我們寫給 apps 的主要文件幾乎涵蓋了您所需要知道的所有事情,這裡列了一些特別著重於開發及測試 Firefox OS的文件。</span></p>
+<div class="row topicpage-table">
+ <div class="section">
+ <h2 class="Documentation" id="Documentation" name="Documentation">文件及入門教材</h2>
+ <dl>
+ <dt>
+ <a href="/en-US/docs/Mozilla/Firefox_OS/Apps/Writing_a_web_app_for_Firefox_OS">寫一個 Firefox OS 的 Web app</a></dt>
+ <dd>
+ 一份教您製作您的第一個 Firefox OS web 應用程式的入門指南。</dd>
+ <dt>
+ <a href="/en-US/docs/Mozilla/Firefox_OS/Apps/Tips_and_techniques">撇步及技巧</a></dt>
+ <dd>
+ 一份我們開發者建議您的撇步及技巧集(像是對於問題的替代方案)。</dd>
+ </dl>
+ <p><span class="alllinks"><a href="/en-US/docs/tag/Apps">全部文章...</a></span></p>
+ </div>
+ <div class="section">
+ <h2 class="Community" id="Community" name="Community">尋求社群協助</h2>
+ <p>您在 app 相關問題上需要幫助、且無法在文件中找到解法嗎?</p>
+ <ul>
+ <li>在 layout 論壇中請教,, 其中涵蓋 CSS 和 HTML: {{ DiscussionList("dev-tech-css", "mozilla.dev.tech.layout") }}
+ <ul>
+ <li>在 Mozilla IRC channel 裡面提出你的問題: <a class="link-irc" href="irc://irc.mozilla.org/openwebapps">#openwebapps</a></li>
+ </ul>
+ </li>
+ </ul>
+ <p><span class="alllinks"><a class="external" href="http://www.catb.org/~esr/faqs/smart-questions.html"><em>請遵守網路禮節</em>...</a></span></p>
+ <h2 class="Tools" id="Tools" name="Tools">工具</h2>
+ <ul>
+ <li><span class="external">Firefox </span>的<span class="external"> <a href="/en-US/docs/Tools/Debugger">Debugger</a> 支援 Firefox OS apps 的遠端除錯</span>。</li>
+ <li><span class="external">其他 <a href="/en-US/docs/Tools">開發者工具</a></span></li>
+ </ul>
+ <p><span class="alllinks"><a href="/en-US/docs/tag/Tools">View All...</a></span></p>
+ <h2 class="Related_Topics" id="Related_Topics" name="Related_Topics">相關文章</h2>
+ <ul>
+ <li><a href="/en-US/docs/Apps">Apps</a></li>
+ </ul>
+ </div>
+</div>
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/apps/writing_a_web_app_for_b2g/index.html b/files/zh-tw/archive/b2g_os/apps/writing_a_web_app_for_b2g/index.html
new file mode 100644
index 0000000000..4e612e8a87
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/apps/writing_a_web_app_for_b2g/index.html
@@ -0,0 +1,25 @@
+---
+title: 寫一個 Firefox OS 的 Web app
+slug: Archive/B2G_OS/Apps/Writing_a_web_app_for_B2G
+translation_of: Web/Apps/Fundamentals/Quickstart
+---
+<p>B2G apps 只是用 HTML、CSS、和 Javascript 寫的 Web apps。在網頁上發佈 Web apps 就跟發佈一般的網站一樣。為了讓網站可以像 Web app 一樣可以被安裝在行動裝置上,你只需要加上一個 manifest 以及掛上一個安裝按鈕,如以下說明。</p>
+<p>建議您從下面的文章著手:</p>
+<ul>
+ <li><a href="/en/Apps/Getting_Started" title="Getting started with making apps">從製作 apps 開始上手</a></li>
+ <li><a href="/en/Apps/Manifest" title="App manifest">App manifest</a></li>
+</ul>
+<p>當然,您也可以無拘無束地<a href="/en/Apps" title="https://developer.mozilla.org/en/Apps/"> 沉浸在 Open Web Apps 的深處</a>!</p>
+<h2 id="安裝_Web_app">安裝 Web app</h2>
+<p>在網頁上發佈 app 和 manifest 之後,接著要讓 Gecko 知道這個訊息。像是在安裝時,Gecko 查詢 manifest 並將必須的項目加入到 home 的畫面,等等。</p>
+<p>安裝 app 需要呼叫 <a href="/en/Apps/Apps_JavaScript_API/navigator.mozApps.install" title="https://developer.mozilla.org/en/Apps/Apps_JavaScript_API/navigator.mozApps.install">navigator.mozApps.install() API</a>。這裡有個安裝按鈕的範例,當您將 app 置於自己管理的位置時,這個範例可以讓您將按鈕嵌入於您自己的網頁:</p>
+<pre>&lt;script&gt;
+var manifest_url = "http://my.webapp.com/manifest.json";
+&lt;/script&gt;
+
+&lt;button onclick="navigator.mozApps.install(manifest_url); return false;"&gt;
+ Install this awesome app on your homescreen!
+&lt;/button&gt;
+</pre>
+<p>注意:這個安裝按鈕也可以被置於像是 <a href="/en/Apps/Submitting_an_app" title="https://developer.mozilla.org/en/Apps/Submitting_an_app">Mozilla Marketplace</a> 的 app market,然而一般而言,在您自己的主要頁面上面也放一個「安裝 web app」的按鈕是非常貼心的。</p>
+<p>現在請用 B2G 瀏覽器 app 瀏覽您的網站,並且點選安裝按鈕吧。</p>
diff --git a/files/zh-tw/archive/b2g_os/architecture/index.html b/files/zh-tw/archive/b2g_os/architecture/index.html
new file mode 100644
index 0000000000..a0a649e4f9
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/architecture/index.html
@@ -0,0 +1,717 @@
+---
+title: Firefox OS 架構
+slug: Archive/B2G_OS/Architecture
+translation_of: Archive/B2G_OS/Architecture
+---
+<div class="summary">
+<p><span class="seoSummary">本文件是 Firefox OS 平台架構的初步概要介紹,將會簡單地向您介紹 Firefox OS 的重要概念,並解釋元件間如何互動。</span></p>
+</div>
+
+<div class="note">
+<p><strong>注意:</strong>Firefox OS 仍算是開發中的產品。本文說明的架構仍非最後確定的架構,隨時可能修改。</p>
+</div>
+
+<h2 id="Firefox_OS_術語">Firefox OS 術語</h2>
+
+<p>在閱讀 Firefox OS 技術文件之前,建議先了解以下的詞彙:</p>
+
+<dl>
+ <dt>B2G</dt>
+ <dd>Boot to Gecko 的縮寫。</dd>
+ <dt>Boot to Gecko</dt>
+ <dd>Firefox OS 作業系統的工程代號。此代號常常用以代表 Firefox OS。因為在本專案還未定下正式名稱之前,此代號已經用了很長的一段時間,因此常常用以代表 Firefox OS。</dd>
+ <dt>Firefox OS</dt>
+ <dd>Firefox OS 即是將 Mozilla (及其 OEM 夥伴) 的品牌與服務,套用至 <strong>Boot to Gecko</strong> 的基礎之上開發而得的最終產品。</dd>
+ <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Gaia" title="/en-US/docs/Mozilla/Firefox_OS/Gaia">Gaia</a></dt>
+ <dd>Firefox OS 平台的使用者介面 (UI)。 在啟動 Firefox OS 之後,都是透過 Gaia 層產出螢幕上的任何東西。Gaia 建構出鎖定畫面、主畫面,以及大家預期智慧型手機所應提供的其他標準 App。Gaia 完全使用 HTML、CSS、JavaScript 實作而成。透過實作在 Gecko 層的開放 Web API,與其底層的作業系統溝通。第三方 App 均可安裝於 Gaia 層。</dd>
+ <dt><a href="/en-US/docs/Gecko" title="/en-US/docs/Accessibility/AT-APIs/Gecko">Gecko</a></dt>
+ <dd>Firefox OS App 的執行環境 (Runtime),也就是本層可支援所有的開放標準:HTML、CSS、JavaScript。本層另必須確保這些 API 可正確運作於 Gecko 支援的所有 OS。意即 Gecko 另包含了網路連線堆疊、圖形堆疊、配置引擎、JavaScript 虛擬機器、移植層。</dd>
+ <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Gonk" title="/en-US/docs/Mozilla/Firefox_OS/Gonk">Gonk</a></dt>
+ <dd>Gonk 是 Firefox OS 平台的底層作業系統,是由 Linux 核心 (以 <a href="http://source.android.com/">Android Open Source Project</a> 為架構),與使用者空間的硬體抽象層 (Hardware abstraction layer,HAL) 所組成。核心以及許多使用者空間的函式庫,均來自常見的開放源碼專案,如 Linux、libusb、bluez 等。HAL 的某些部分是與 AOSP 共享,如 GPS 或相機。你可將 Gonk 當成是簡單的 Linux 分支版本。Gonk 又是 Gecko 的移植目標;意即有一套 Gecko 可在 Gonk 上執行,就像是 Gecko 也有 Mac OS X、Windows、Android 等版本。因為 Firefox OS 可完整控制 Gonk,所以某些不能開放給其他 OS 用的介面,還是可開發給 Gecko 使用。舉例來說,Gecko 可直接存取 Gonk 的完整電話功能堆疊,並於 Gonk 上顯示緩衝區 (Frame buffer),但是其他 OS 不能進行類似的存取。</dd>
+ <dt><a name="Jank">Jank</a></dt>
+ <dd>此一詞彙常見於行動 App 領域,指在 APP 中執行了緩慢或沒有效率的程式碼,進而阻礙了 UI 更新並發商系統延遲或無回應的情形。Gaia 開發者使用不同的最佳化方法,要儘力避免此狀況發生。</dd>
+</dl>
+
+<h2 id="整體架構示意圖">整體架構示意圖</h2>
+
+<p>下圖比較了專利平台與 Firefox OS 之間的架構。</p>
+
+<p><img alt="on the left is a native mobile architecture stack, on the right is the Firefox OS architecture. they are similarm except that the native stack is all proprietary device functionality, and the Firefox OS stack is all done with open source and web technologies." src="https://mdn.mozillademos.org/files/9487/general-architecture.png" style="display: block; height: 488px; margin: 0px auto; width: 997px;"></p>
+
+<p>Firefox OS 即減去了 OS 與 App 層之間的原生 API 層。這種統合式的設計可減輕平台負擔並簡化安全機制,卻又不致犧牲效能,也不會影響智慧型手機的使用體驗。</p>
+
+<ol>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Gaia">Gaia</a> 作為裝置的核心 Web App 與 UI 層,並全以 HTML5、CSS、JavaScript 撰寫而成,並有許多 API 可供 UI 程式碼存取手機硬體與 Gecko 功能。</li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Gecko">Gecko</a> 即為 Firefox OS 的 Web 引擎與表現層 (Presentation layer),作為 Web 內容與底層裝置的之間介面,進而將硬體接上 HTML。Gecko 亦提供 HTML5 剖析 (Parsing) 與繪圖引擎,並透過程式設計的方式,以安全的 Web API 存取硬體功能、更新作業,以及其他核心服務。</li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Gonk">Gonk</a> 是 Firefox OS 堆疊中的核心層級元件,作為 Gecko 與底層硬體之間的介面。Gonk 可控制底層硬體,並將硬體功能告知 Gecko 中建構的 Web API。Gonk 可視為「黑盒子」,暗自進行所有複雜又零碎的背景作業,以於硬體層制定請求,進而控制行動裝置。</li>
+ <li>行動裝置,就是執行 Firefox OS 的行動電話硬體。OEM 廠商則負責提供行動裝置。</li>
+</ol>
+
+<h2 id="特殊_Firefox_OS_架構">特殊 Firefox OS 架構</h2>
+
+<p><img alt="Firefox OS Architecture" src="/files/4605/FirefoxOS.png" style="display: block; height: 915px; margin: 0px auto; width: 754px;"></p>
+
+<h2 id="Firefox_OS_開機流程">Firefox OS 開機流程</h2>
+
+<p>本段將說明 Firefox OS 的開機流程,包含整個流程所牽涉的部份,以及相關部分在系統裡的位置。流程順序大致如下:最先從核心空間裡的開機載入器 (Bootloader) 開始,到原生程式碼中開始程序,進入 B2G 再到使用者空間的 Gecko,最後到 Gecko 裡的系統 App、視窗管理器、主畫面 App。而其他 App 也同樣依照上述程序執行。</p>
+
+<p><img alt="" src="https://mdn.mozillademos.org/files/7491/bootup.png" style="height: 1979px; width: 2112px;"></p>
+
+<h3 id="開機程序">開機程序</h3>
+
+<p>在首次啟動 Firefox OS 裝置時,就會於主要的開機載入器 (bootloader) 中開始作業。自此,就如同一般作業系統程序,更高一階的開機相關載入器會載入執行,然後往上更高一階的載入器又會被接續執行,如此下去形成一串開機載入流程鏈,直到最後程序就會將執行權交到 Linux 核心。</p>
+
+<p>關於開機程序有幾點需要注意:</p>
+
+<ul>
+ <li>開機載入器通常顯示裝置開機時的第一個畫面,一般為硬體製造商的標誌。</li>
+ <li>開機載入器可將映像檔 (Image) 建構於裝置之中。不同的裝置另使用不同的通訊協定。大部分的手機均使用 <a href="http://android-dls.com/wiki/index.php?title=Fastboot">fastboot 協定</a>。但 Samsung Galaxy II 使用 odin 協定。</li>
+ <li>在開機流程的尾聲,往往會載入數據機映像檔,並於數據機處理器上執行之。各款裝置的方法均有所不同。</li>
+</ul>
+
+<h3 id="Linux_核心">Linux 核心</h3>
+
+<p>Gonk 使用 Linux 核心的版本,與 Android 開放源碼專案 (<a href="http://source.android.com/" title="http://source.android.com/">Android Open Source Project,AOSP</a>) 所衍生使用的版本非常相似,但是並未沿用幾項 AOSP 所進行的修改。除外,雖然 Lunix 基本上已經相當穩定,但仍有些製造商會自行修改。</p>
+
+<p><a href="http://en.wikipedia.org/wiki/Linux_startup_process" title="http://en.wikipedia.org/wiki/Linux_startup_process">Linux 的啟動程序</a>已經可在網路上找到相當詳盡的文件說明,所以在此不再贅述。</p>
+
+<p>Linux 核心會啟動一些基本的程序 (Process)。在執行 init.rc 中定義的程序後,會再執行 <a href="https://github.com/mozilla-b2g/gonk-misc/blob/master/init.b2g.rc">init.b2g.rc</a> 以啟動基本核心程序,如 <code>b2g</code> (Firefox OS 基礎程序,內含 Gecko) 以及 <code>rild</code> (通話功能的相關程序,各晶片組多有不同),請見下方所述細節。和大部分的 Unix 作業系統一樣,最後會啟動使用者空間 (Userspace) 程序。</p>
+
+<p>在啟動 <code>init </code>程序之後,Linux 核心就會處理由使用者空間傳來的系統呼叫,並中斷來自於硬體裝置的類似呼叫。許多硬體功能均透過 <a href="http://en.wikipedia.org/wiki/Sysfs" title="http://en.wikipedia.org/wiki/Sysfs"><code>sysfs </code></a>揭露給使用者空間,以下便是 Gecko 讀取電池狀態的<a href="https://github.com/cgjones/mozilla-central/blob/master/hal/gonk/GonkHal.cpp#L277" title="https://github.com/cgjones/mozilla-central/blob/master/hal/gonk/GonkHal.cpp#L277">程式碼片段</a>:</p>
+
+<pre class="brush:cpp;">FILE *capacityFile = fopen("/sys/class/power_supply/battery/capacity", "r");
+double capacity = dom::battery::kDefaultLevel * 100;
+if (capacityFile) {
+ fscanf(capacityFile, "%lf", &amp;capacity);
+ fclose(capacityFile);
+}</pre>
+
+<h3 id="更多有關_init_程序">更多有關 init 程序</h3>
+
+<p>Gonk 中的 <code>init</code> 程序,將處理必要的檔案系統並產生系統服務,之後就如同程序管理一般繼續待命,並將編譯指令碼 (也就是 <code>init*.rc</code> 檔案);指令碼內的指令則說明在啟動不同服務時所應進行的作業。</p>
+
+<p><code>init </code>程序必須處理一個相當關鍵的作業,即啟動 <code>b2g</code> 程序;這也是 Firefox OS 的核心。</p>
+
+<p>以下為 <code>init.rc</code> 中用以啟動 b2g 的程式碼:</p>
+
+<pre>service b2g /system/bin/b2g.sh
+ class main
+ onrestart restart media</pre>
+
+<div class="note">
+<p><strong>注意:</strong>Firefox OS 與 Android 的 init.rc 之間的差異,將各款裝置而有所不同。有時候只是附加 <code>init.b2g.rc</code>,但有時修改的幅度甚大。</p>
+</div>
+
+<h2 id="使用者空間_(Userspace)_的程序架構">使用者空間 (Userspace) 的程序架構</h2>
+
+<p>現在讓我們來看看高階一點的部分,到底Firefox OS的各個元件之間是如何運作互動的。下圖所描述的是Firefox OS的主要使用者空間程序。</p>
+
+<p>接著可進一步了解 Firefox OS 不同元件是如何運作互動。下圖呈現 Firefox OS 的主要使用者空間程序。</p>
+
+<p><img alt="Userspace diagram" src="https://developer.mozilla.org/files/3849/B2G%20userspace%20architecture.svg" style="float: right; height: 491px; position: relative; width: 520px;"></p>
+
+<p> </p>
+
+<p> </p>
+
+<p> </p>
+
+<p> </p>
+
+<p> </p>
+
+<p> </p>
+
+<p> </p>
+
+<p> </p>
+
+<p> </p>
+
+<p> </p>
+
+<div class="note">
+<p><strong>注意:</strong>由於 Firefox OS 尚處於開發階段,所以此示意圖可能隨時修改而非完全正確。</p>
+</div>
+
+<p>b2g 程序是主要的系統程序,能以高權限存取大部分的硬體;b2g 可溝通數據機、畫出顯示緩衝區 (Framebuffer),並與 GPS 或相機等硬體溝通。在系統內部,b2g 則執行 Gecko 層 (即以 libxul.so 所實作)。另可參考 <a href="#Gecko">Gecko</a> 以了解 Gecko 層的運作方式,以及 b2g 與 Gecko 層溝通的方法。</p>
+
+<h3 id="b2g">b2g</h3>
+
+<p>b2g 程序會生成許多低權限的內容程序 (Content process),並透過這些程序來載入 Web 的 App 與內容。這些程序會再透過訊息傳遞系統「<a href="/en-US/docs/IPDL" title="/en-US/docs/IPDL">IPDL</a>」溝通 Gecko 伺服器。</p>
+
+<p><code>b2g 程序所執行</code>的 libxul,即參照 <code>b2g/app/b2g.js </code>取得預設偏好設定。透過偏好設定,程序將開啟上述的 HTML 檔案「<code>b2g/chrome/content/shell.html</code>」,即於 <code>omni.ja</code> 檔案中編譯而得。而 <code>shell.html</code> 則包含了 <code>b2g/chrome/content/shell.js</code> 檔案,將觸發 Gaia 的「<code>system」</code>這個 App。</p>
+
+<h3 id="rild">rild</h3>
+
+<p><code>rild 為銜接</code>數據機處理器的介面,也是用以建構<strong>無線介面層 (Radio Interface Layer,RIL)</strong> 的常駐程式 (Daemon)。往往是由硬體製造商所撰寫的專屬程式碼,以溝通自家的數據機硬體。<code>rild 可讓用戶端</code>程式碼連接 <code>rild 本身</code>綁定的 Unix-domain socket。可經由以下類似的 <code>init 指令碼</code>啟動之:</p>
+
+<pre>service ril-daemon /system/bin/rild
+ socket rild stream 660 root radio</pre>
+
+<h3 id="rilproxy">rilproxy</h3>
+
+<p>在 Firefox OS 中,<code>rild</code> 用戶端即屬於 <code>rilproxy</code> 程序,作為 <code>rild</code> 與 <code>b2g</code> 之間不具功能的傳送代理dumb forwarding proxy。為何需要此代理伺服器,就必須從實作細節來說明了。但簡單來說,proxy 確實有其存在的必要。<a href="https://github.com/mozilla-b2g/rilproxy" title="https://github.com/mozilla-b2g/rilproxy"><code>可到 GitHub 上找到 rilproxy</code> 原始碼</a>。</p>
+
+<h3 id="mediaserver">mediaserver</h3>
+
+<p><a href="https://github.com/android/platform_frameworks_base/tree/ics-mr0-release/media/libmediaplayerservice" title="https://github.com/android/platform_frameworks_base/tree/ics-mr0-release/media/libmediaplayerservice"><code>mediaserver</code> 程序</a>用以控制音訊與視訊的播放作業。Gecko 透過 Android 的遠端程序呼叫 (Remote Procedure Call,RPC) 和其溝通。某些可由 Gecko 撥放的媒體檔案 (如 OGG Vorbis 音訊、OGG Theora 視訊、<a href="http://www.webmproject.org/about/" title="http://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;ved=0CDUQFjAA&amp;url=http%3A%2F%2Fwww.webmproject.org%2F&amp;ei=8Q84UOnoMoHH6wHZ44DwBA&amp;usg=AFQjCNHK9j6wyhUful5RmKCpU6b8GDfpYQ&amp;sig2=tCl8VxL3mCvrH86EyOwO_A">WebM</a> 視訊等),均是由 Gecko 解碼後直接傳送給 <code>mediaserver</code> 程序。其他的媒體檔案則是交由 <code>libstagefright</code> 解碼。<code>libstagefright 可存取特定</code>編碼與硬體編碼器 (Hardware encoder)。</p>
+
+<div class="note">
+<p><strong>注意:</strong>mediaserver 程序為 Firefox OS 的「暫時性」元件,主要是協助早期的開發作業。預計最快在 Firefox OS 2.0 階段就會移除。</p>
+</div>
+
+<h3 id="netd">netd</h3>
+
+<p><code>netd </code>程序可用來設定網路介面。</p>
+
+<h3 id="wpa_supplicant">wpa_supplicant</h3>
+
+<p><code>wpa_supplicant</code> 程序為標準 UNIX 樣式常駐程式,可處理 WiFi 存取點的連線作業。</p>
+
+<h3 id="dbus-daemon">dbus-daemon</h3>
+
+<p>dbus-daemon 用以建構 <a href="http://www.freedesktop.org/wiki/Software/dbus" title="http://www.freedesktop.org/wiki/Software/dbus">D-Bus</a> 訊息匯流系統,可供 Firefox OS 進行藍牙通訊作業。</p>
+
+<h2 id="Gecko">Gecko</h2>
+
+<p>如前所述,<a href="https://developer.mozilla.org/en-US/docs/Gecko" title="/en-US/docs/Gecko">Gecko</a> 即由 Web 標準 (<a href="https://developer.mozilla.org/en-US/docs/HTML" title="/en-US/docs/HTML">HTML</a>、<a href="https://developer.mozilla.org/en-US/docs/CSS" title="/en-US/docs/CSS">CSS</a>、<a href="https://developer.mozilla.org/en-US/docs/JavaScript" title="/en-US/docs/JavaScript">JavaScript</a>) 建構而成,並用以打造 Firefox OS 上所顯示的一切,另可控制手機硬體。Web App 則透過安全且受控制的 Web API (同樣以 Gecko 所建構而得) 來將 HTML5 連上硬體。Web API 可透過程式設計的方式,存取底層行動裝置硬體 (如電池或振動) 的功能,或取得儲存的資料 (如行事曆或聯絡資訊)。Web 內容亦可透過content invokes the accessible Web APIs within HTML5.</p>
+
+<p>App 是由相關 HTML5 網頁內容所組成。如果要撰寫 Web App 並於 Firefox OS 行動裝置上執行,則開發者也只要組合、封包、發佈此網頁內容即可。而在執行期間,即交由瀏覽器轉譯、編譯、換至此網頁內容。可參閱<a href="https://developer.mozilla.org/en-US/Apps">應用程式中心 (App Center)</a> 進一步了解。</p>
+
+<div class="note">
+<p><strong>注意:</strong>如果要搜尋 Gecko 的 Codebase,則可前往 <a href="http://dxr.mozilla.org" style="line-height: 1.5;">http://dxr.mozilla.org</a>,功能比較炫、參照功能不錯,但 Repo 較有限。亦可使用傳統的 <a href="http://mxr.mozilla.org" style="line-height: 1.5;">http://mxr.mozilla.org</a>,內含較多的 Mozilla 專案。</p>
+</div>
+
+<h3 id="Gecko_架構圖">Gecko 架構圖</h3>
+
+<p><img alt="" src="https://mdn.mozillademos.org/files/5027/securityframework.png" style="height: 591px; width: 979px;"></p>
+
+<ul>
+ <li><strong>安全架構:</strong>包含
+
+ <ul>
+ <li><strong>Permission Manager</strong>:用以存取 Web API 功能的閘門。</li>
+ <li><strong>Access Control List</strong>:存取 Web API 功能所必備的規則與許可。</li>
+ <li><strong>Credential Validation</strong>:App 與使用者的驗證。</li>
+ <li><strong>Permissions Store</strong>:存取 Web API 功能所必備的權限。</li>
+ </ul>
+ </li>
+ <li><strong>Web API</strong>:標準 API 的集合,可將硬體功能提供予網頁內容,讓 Web App 能透過程式設計的方式,安全存取行動裝置底層硬體的功能,以及裝置所儲存\可用的資料。</li>
+ <li><strong>I/O</strong>:銜接硬體與資料儲存區的介面。</li>
+ <li><strong>軟體更新</strong>:取得\安裝更新檔至系統軟體與第三方 App。</li>
+ <li><strong>內容配置與繪製</strong>:用以剖析、編譯、執行網頁內容的引擎,並可搭配格式資訊,將格式化過後的內容呈現於使用者眼前。</li>
+ <li><strong>b2g 程序:</strong>(Gecko) 於高度權限的系統程序中執行,可存取行動電話的硬體功能。執行 App 屬於 b2g 的子程序。</li>
+</ul>
+
+<h3 id="和_Firefox_OS_相關的_Gecko_檔案">和 Firefox OS 相關的 Gecko 檔案</h3>
+
+<h4 id="b2g_2">b2g/</h4>
+
+<p>b2g 資料夾主要包含 Firefox OS 相關功能。</p>
+
+<h5 id="b2gchromecontent">b2g/chrome/content</h5>
+
+<p>內含於系統 App 上運行的 Javascript 檔。</p>
+
+<h5 id="b2gchromecontentshell.html">b2g/chrome/content/shell.html</h5>
+
+<p>Gaia 的進入點。如前所述,shell.html 會拉進 shell.js 與 settings.js。用於系統 App 的 HTML。</p>
+
+<pre class="brush: html">&lt;script type="application/javascript;version=1.8" src="chrome://browser/content/settings.js"&gt; &lt;/script&gt;
+&lt;script type="application/javascript;version=1.8" src="chrome://browser/content/shell.js"&gt; &lt;/script&gt;</pre>
+
+<p><code>settings.js 裡面是系統預設的設定參數。</code></p>
+
+<h5 id="b2gchromecontentshell.js">b2g/chrome/content/shell.js</h5>
+
+<p><code>shell.js 是載入 Gaia「system」App 的第一個指令碼。</code></p>
+
+<p><code>shell.js 將匯入所有必要的模組、註冊關鍵的監聽器、定義</code> <code style="font-style: normal; line-height: 1.5;">sendCustomEvent 與<font face="Open Sans, sans-serif"> </font></code><code style="font-style: normal; line-height: 1.5;">sendChromeEvent 以溝通 </code>Gaia<code style="font-style: normal; line-height: 1.5;">、提供 webapp 安裝輔助程式:indexedDB 配額、遠端除錯器、鍵盤助手、螢幕截圖工具。</code></p>
+
+<p>不過<code> shell.js</code> 最重要的功能,則是啟動 Gaia 的<code>「system」</code>App,然後將整體系統相關的管理作業交給該「<code>system</code>」App。</p>
+
+<pre class="brush: js">let systemAppFrame =
+ document.createElementNS('http://www.w3.org/1999/xhtml', 'html:iframe');
+ ...
+ container.appendChild(systemAppFrame);</pre>
+
+<h5 id="b2gappb2g.js">b2g/app/b2g.js</h5>
+
+<p>此指令碼包含預先定義的設定,就像是瀏覽器的 about:config,以及 Gaia 的 pref.js。這些設定值另可透過「設定 (Settings)」App 變更,也可用 Gaia 建置指令碼中的 Gaia’s user.js 覆寫之。</p>
+
+<h4 id="domAPI">/dom/{API}</h4>
+
+<p>新實作的 API (post-b2g) 會位於 <code>dom/ 資料夾。</code>舊 API 位於 <code>dom/base</code>,例如<code>navigator.cpp</code>。</p>
+
+<h5 id="domapps">/dom/apps</h5>
+
+<p><code>將載入 .jsm。而</code> <code>.js</code> API 實作即如 <code>webapp.js 安裝、getSelf 等。</code></p>
+
+<h5 id="domappsPermissionsTable.jsm">dom/apps/PermissionsTable.jsm</h5>
+
+<p>所有的存取權限都定義在 <a href="http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/PermissionsTable.jsm">PermissionsTable.jsm</a> 之中。</p>
+
+<h4 id="domwebidl">/dom/webidl</h4>
+
+<p>WebIDL是用以定義 Web API 的語言,請參閱 <a href="https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings">WebIDL_bindings</a> 了解所支援的屬性。</p>
+
+<h4 id="halgonk">/hal/gonk</h4>
+
+<p>此目錄包含 gonk 銜接層 (Port layer) 的相關檔案。</p>
+
+<h4 id="所產生的檔案">所產生的檔案</h4>
+
+<h5 id="modulelibprefsrcinitall.js">module/libpref/src/init/all.js</h5>
+
+<p>內有全部的設定檔。</p>
+
+<h5 id="systemb2g_omni.ja_and_omni.js">/system/b2g/ omni.ja and omni.js</h5>
+
+<p>內有裝置內資源所適用的樣式。</p>
+
+<h3 id="處理輸入事件">處理輸入事件</h3>
+
+<p>Gecko 內絕大多數的行動,都是由使用者的行動所觸發,可用輸入事件為代表 (如按下按鈕、觸碰裝置的螢幕等)。這些事件必須透過 <code><a href="/zh-TW/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIAppShell" title="">nsIAppShell</a></code> 的 <a href="https://dxr.mozilla.org/mozilla-central/source/widget/gonk/nsAppShell.cpp" rel="custom">Gonk implementation</a> (為 Gecko 介面之一,作為 Gecko App 的主要進入點),進入到Gecko。也就是說,輸入裝置驅動程式將呼叫 <code>nsAppShell</code> 物件 (代表 Gecko 子系統) 上的函式,來將事件發送到使用者介面。</p>
+
+<p>例如:</p>
+
+<pre class="brush:cpp;">void GeckoInputDispatcher::notifyKey(nsecs_t eventTime,
+ int32_t deviceId,
+ int32_t source,
+ uint32_t policyFlags,
+ int32_t action,
+ int32_t flags,
+ int32_t keyCode,
+ int32_t scanCode,
+ int32_t metaState,
+ nsecs_t downTime) {
+ UserInputData data;
+ data.timeMs = nanosecsToMillisecs(eventTime);
+ data.type = UserInputData::KEY_DATA;
+ data.action = action;
+ data.flags = flags;
+ data.metaState = metaState;
+ data.key.keyCode = keyCode;
+ data.key.scanCode = scanCode;
+ {
+ MutexAutoLock lock(mQueueLock);
+ mEventQueue.push(data);
+ }
+ gAppShell-&gt;NotifyNativeEvent();
+}</pre>
+
+<p>這些事件來自於Linux標準<code>input_event</code>系統. Firefox OS在其上添加了一層簡單的<a href="https://dxr.mozilla.org/mozilla-central/source/widget/gonk/libui/InputReader.cpp" rel="custom">抽象層</a>,提供了一些像是事件過濾等不錯的功能。產生事件的程式碼在<a href="https://dxr.mozilla.org/mozilla-central/source/widget/gonk/libui/EventHub.cpp" rel="custom">widget/gonk/libui/EventHub.cpp</a>裡的<code>EventHub::getEvents()方法。</code></p>
+
+<p>Gecko接收到事件後,這些事件會透過<code><a href="https://dxr.mozilla.org/mozilla-central/source/widget/gonk/nsAppShell.cpp" rel="custom">nsAppShell</a>發送到DOM:</code></p>
+
+<pre class="brush:cpp;">static nsEventStatus sendKeyEventWithMsg(uint32_t keyCode,
+ uint32_t msg,
+ uint64_t timeMs,
+ uint32_t flags) {
+ nsKeyEvent event(true, msg, NULL);
+ event.keyCode = keyCode;
+ event.location = nsIDOMKeyEvent::DOM_KEY_LOCATION_MOBILE;
+ event.time = timeMs;
+ event.flags |= flags;
+ return nsWindow::DispatchInputEvent(event);
+}
+</pre>
+
+<p>之後,事件有可能被Gecko處理掉或是當作<a href="/en-US/docs/DOM_Client_Object_Cross-Reference/DOM_Events" style="line-height: 1.5;" title="/en-US/docs/DOM_Client_Object_Cross-Reference/DOM_Events">DOM事件</a>被<span style="line-height: 1.5;">發送到網頁應用程式做進一步處裡。</span></p>
+
+<h3 id="影像繪圖">影像繪圖</h3>
+
+<p>在最底層,Gecko利用 <a href="http://www.khronos.org/opengles/2_X/" title="http://www.khronos.org/opengles/2_X/">OpenGL ES 2.0</a> 向包有硬體影格緩衝區(frame buffers)的GL context物件繪圖,這是由Gonk所實作的<code><a href="https://dxr.mozilla.org/mozilla-central/source/widget/gonk/nsWindow.cpp" rel="custom">nsWindow</a>完成</code>:</p>
+
+<pre class="brush:cpp;">gNativeWindow = new android::FramebufferNativeWindow();
+sGLContext = GLContextProvider::CreateForWindow(this);</pre>
+
+<p><code>FramebufferNativeWindow類別(</code>class)是直接從Android而來,請見<code><a href="https://github.com/android/platform_frameworks_base/blob/ics-mr1-release/libs/ui/FramebufferNativeWindow.cpp" title="https://github.com/android/platform_frameworks_base/blob/ics-mr1-release/libs/ui/FramebufferNativeWindow.cpp">FramebufferNativeWindow.cpp</a>;使用了</code><strong>gralloc</strong> API存取繪圖驅動,好配對影格緩衝裝置的緩衝到記憶體之中。</p>
+
+<p>Gecko透過圖層(Layers)系統合成螢幕上的影像,大體而言如下:</p>
+
+<ol>
+ <li>Gecko將不同部分的記憶體分頁(pages)畫入記憶體緩衝,有時後這些緩衝存在系統記憶體,有時候因為Gecko會直接畫入視訊記憶體(video memory),所以這些緩衝也可能會是配對在Gecko定址空間的材質(textures) ,以上的工作主要是由<code><a href="http://mxr.mozilla.org/mozilla-central/source/gfx/layers/basic/BasicThebesLayer.cpp#83" title="http://mxr.mozilla.org/mozilla-central/source/gfx/layers/basic/BasicThebesLayer.cpp#201">BasicThebesLayer::PaintThebes()</a>方法完成。</code></li>
+ <li>Gecko利用OpenGL命令將這些材質合成起來,合成工作由<code><a href="http://mxr.mozilla.org/mozilla-central/source/gfx/layers/opengl/ThebesLayerOGL.cpp#124" title="http://mxr.mozilla.org/mozilla-central/source/gfx/layers/basic/BasicThebesLayer.cpp#201">ThebesLayerOGL::RenderTo()</a>方法執行。</code></li>
+</ol>
+
+<p>因為有關Gecko如何處理影像繪圖的作法已經超出本文範圍,所以本文不再做進一步討論了。</p>
+
+<h3 id="硬體抽象層(Hardware_Abstraction_Layer_HAL)">硬體抽象層(Hardware Abstraction Layer, HAL)</h3>
+
+<p>Gecko HAL是Gecko接口層之一,它使用高階層Gecko能取用的C++ API存取跨平台間的底層系統介面,這些API以每個平台為基礎實作在Gecko HAL之內。Gecko的Javacsript程式碼並不能看到這個HAL層。</p>
+
+<h4 id="HAL如何運作">HAL如何運作</h4>
+
+<p>讓我們先來看看<a href="/zh-TW/docs/Web/API/Window/navigator/vibrate" title="The documentation about this has not yet been written; please consider contributing!"><code>Vibration</code></a> API。這個Gecko HAL API被定義在<a href="https://dxr.mozilla.org/mozilla-central/source/hal/Hal.h" rel="custom">hal/Hal.h</a>,基本上你可以看到如下函式(為了說明需要,經過函式簽名(function signature)簡化):</p>
+
+<pre>void Vibrate(const nsTArray&lt;uint32&gt; &amp;pattern);</pre>
+
+<p>Gecko呼叫這個函式來根據某個特定型態開啟震動(另外有一個對應的函式用來關閉震動)。Gonk對這個函式的實作在<a href="https://dxr.mozilla.org/mozilla-central/source/hal/gonk/GonkHal.cpp" rel="custom">hal/gonk/GonkHal.cpp</a>:</p>
+
+<pre class="brush:cpp;">void Vibrate(const nsTArray&lt;uint32_t&gt; &amp;pattern) {
+ EnsureVibratorThreadInitialized();
+ sVibratorRunnable-&gt;Vibrate(pattern);
+}
+</pre>
+
+<p>下面以<code style="font-style: normal; line-height: 1.5;">VibratorRunnable::Run()實作的</code><span style="line-height: 1.5;">程式碼發送震動</span><span style="line-height: 1.5;">開啟</span><span style="line-height: 1.5;">請求到另一個執行緒,其中主要的迴圈部分如下:</span></p>
+
+<pre class="brush:cpp;">while (!mShuttingDown) {
+ if (mIndex &lt; mPattern.Length()) {
+ uint32_t duration = mPattern[mIndex];
+ if (mIndex % 2 == 0) {
+ vibrator_on(duration);
+ }
+ mIndex++;
+ mMonitor.Wait(PR_MillisecondsToInterval(duration));
+ }
+ else {
+ mMonitor.Wait();
+ }
+}
+</pre>
+
+<p><code>vibrator_on()便是打開震動馬達的Gonk HAL API,這個函式透過sysfs向內部核心驅動程式送出訊息,寫入值到核心物件之中。</code></p>
+
+<h4 id="HAL_API退回替代(Fallback)實作">HAL API退回替代(Fallback)實作</h4>
+
+<p>Gecko HAL API 跨平台支援。當為沒有震動馬達的平台(如桌上型電腦)建置Gecko,則另一個HAL退回替代API會被使用,這個替代API實作於<a href="https://dxr.mozilla.org/mozilla-central/source/hal/fallback/FallbackVibration.cpp" rel="custom">hal/fallback/FallbackVibration.cpp</a>:</p>
+
+<pre class="brush:cpp;">void Vibrate(const nsTArray&lt;uint32_t&gt; &amp;pattern) {
+}</pre>
+
+<h4 id="沙箱(Sandbox)實作">沙箱(Sandbox)實作</h4>
+
+<p>因為大多數的網頁內容都是在低權限的內容程序運行,所以我們無法確保這些程序有權限去,例如,打開震動馬達,除此之外,為了避免出現程序爭相啟動震動的狀況出現,採用中央控制的作法較為理想。在Gecko HAL,透過sandbox作法可以達到中央控制的目標;其實sandbox也就是一個由內容程序發出到Gecko"伺服器"的<span style="line-height: 1.5;">代理請求,這個代理請求式透過IPDL送出。</span></p>
+
+<p>以震動為例,這是由<a href="https://dxr.mozilla.org/mozilla-central/source/hal/sandbox/SandboxHal.cpp" rel="custom">hal/sandbox/SandboxHal.cpp</a>所實作的<code>Vibrate()完成</code>:</p>
+
+<pre class="brush:cpp;">void Vibrate(const nsTArray&lt;uint32_t&gt;&amp; pattern, const WindowIdentifier &amp;id) {
+ AutoInfallibleTArray&lt;uint32_t, 8&gt; p(pattern);
+
+ WindowIdentifier newID(id);
+ newID.AppendProcessID();
+ Hal()-&gt;SendVibrate(p, newID.AsArray(), GetTabChildFrom(newID.GetWindow()));
+}</pre>
+
+<p>這會發送一個 PHal 介面定義的訊息,亦即<span style="line-height: 1.5;">IPDL的<a href="https://dxr.mozilla.org/mozilla-central/source/hal/sandbox/PHal.ipdl" rel="custom">hal/sandbox/PHal.ipdl</a>內所描述的。其中呼叫的函式大致如下:</span></p>
+
+<pre>Vibrate(uint32_t[] pattern);</pre>
+
+<p>訊息的接收端是<code>HalParent::RecvVibrate()函式,這個函式定義在</code><a href="https://dxr.mozilla.org/mozilla-central/source/hal/sandbox/SandboxHal.cpp" rel="custom">hal/sandbox/SandboxHal.cpp</a>裡面,大致如下:</p>
+
+<pre class="brush:cpp;">virtual bool RecvVibrate(const InfallibleTArray&lt;unsigned int&gt;&amp; pattern,
+ const InfallibleTArray&lt;uint64_t&gt; &amp;id,
+ PBrowserParent *browserParent) MOZ_OVERRIDE {
+
+ hal::Vibrate(pattern, newID);
+ return true;
+}</pre>
+
+<p>本段範例雖然有省略一些相關性不高的部分,不過確實的說明訊息傳遞是如何由Gecko到Gonk,再到Gonk HAL實作Vibrate(),最後到震動馬達驅動程式。</p>
+
+<h3 id="DOM_APIs">DOM APIs</h3>
+
+<p><strong>DOM介面</strong>是網頁根本上和Gecko溝通的方法,如果想知道更多這方面的細節,請參考<a href="/en-US/docs/DOM/About_the_Document_Object_Model" title="/en-US/docs/DOM/About_the_Document_Object_Model">關於DOM</a>。 DOM介面是用<a href="/en-US/docs/XPIDL" title="/en-US/docs/XPIDL">IDL</a>定義的,其中包括了外部函式介面(foreign function interface, FFI)以及介於javascript和C++的物件模型(object model, OM) 。</p>
+
+<p>像是vibration API便是透過IDL讓網頁內容使用,這部分程式碼定義在<code><a href="https://dxr.mozilla.org/mozilla-central/source/dom/interfaces/base/nsIDOMNavigator.idl" rel="custom">nsIDOMNavigator.idl</a>:</code></p>
+
+<pre>[implicit_jscontext] void mozVibrate(in jsval aPattern);</pre>
+
+<p>mozVibrate(冠有廠商前綴的函式,這個函式背後的震動規格尚未定案)接受<code><a href="/en-US/docs/SpiderMonkey/JSAPI_Reference/Jsval" title="/en-US/docs/SpiderMonkey/JSAPI_Reference/JSVAL_IS_OBJECT">jsval</a>型態的參數,也就是Javascript的值。IDL編譯器<font face="Open Sans, sans-serif">,</font></code><code style="line-height: 1.5;"><a href="/en-US/docs/XPIDL/xpidl" style="line-height: 1.5;" title="/en-US/docs/XPIDL/xpidl">xpidl</a>,會產生C++的介面,這個介面會由</code><span style="font-family: courier new,andale mono,monospace; line-height: 1.5;"><a href="https://dxr.mozilla.org/mozilla-central/source/dom/base/Navigator.cpp" rel="custom">Navigator.cpp</a>內的</span><code style="font-style: normal; line-height: 1.5;">Navigator類別實作之。</code></p>
+
+<pre class="brush:cpp;">NS_IMETHODIMP Navigator::MozVibrate(const jsval&amp; aPattern, JSContext* cx) {
+ // ...
+ hal::Vibrate(pattern);
+ return NS_OK;
+}</pre>
+
+<p>這個函式最關鍵的部分在於呼叫 hal::Vibreate() 將控制權由DOM移交給Gecko HAL,自此我們便會如前所述地進入HAL層,最後到達驅動程式。在上層的 DOM 並不在意現在是在哪個平台上執行(Gonk, WIndows, Mac OS X等等),DOM 也不在意現在是內容程序的程式碼在跑或是Gecko伺服器的在跑,所有的一切都交由底層系統處理。</p>
+
+<p>vibration API相對單純,適合用於說明,而<a href="/en-US/docs/API/WebSMS" title="/en-US/docs/API/WebSMS">SMS API</a> 便是比較複雜的API,它用到自己的"遠端"層將內容程序和伺服器連接起來。</p>
+
+<h2 id="無線介面層(Radio_Interface_Layer_RIL)">無線介面層(Radio Interface Layer, RIL)</h2>
+
+<p><a href="#The_userspace_process_architecture">The userspace process architecture</a>段落已經提過RIL,這邊我們將更進一步檢視各個元件是如何互動運作。</p>
+
+<p>和RIL有關的元件有:</p>
+
+<dl>
+ <dt><code>rild</code></dt>
+ <dd>和特定數據機韌體溝通的背景程序(daemon)。</dd>
+ <dt><code>rilproxy</code></dt>
+ <dd>rild和Gecko b2g程序之間訊息傳遞的代理背景程序(daemon)。rilproxy的存在解決了無法和rild直接溝通的問題,因為rild只可以在radio群組內溝通。</dd>
+ <dt><code>b2g</code></dt>
+ <dd>實作Gecko的程序,又稱為<strong>chrome process</strong>。其中和RIL相關的部分有<a href="https://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/ril_worker.js" rel="custom">dom/system/gonk/ril_worker.js</a>(這是一個worker執行緒,會透過rilproxy和rild溝通,並且實作了無線狀態機(radio state machine))以及<code><a href="/zh-TW/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIRadioInterfaceLayer" title="">nsIRadioInterfaceLayer</a></code>介面(是主執行緒的<a href="/en-US/docs/XPCOM" style="line-height: 1.5;" title="/en-US/docs/XPCOM">XPCOM</a>服務,主要是作為ril_worker.js和Gecko各元件,包括Gecko內容程序,之間的訊息傳遞<span style="line-height: 1.5;">)。</span></dd>
+ <dt>Gecko's content process</dt>
+ <dd><code><a href="/zh-TW/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIRILContentHelper" title="">nsIRILContentHelper</a></code>介面會提供XPCOM服務,有了這個服務,Gecko內容程序會使用到的DOM API,例如<a href="/en-US/docs/API/WebTelephony" title="/en-US/docs/API/WebTelephony">Telephony</a>與<a href="/en-US/docs/API/WebSMS" title="/en-US/docs/API/WebSMS">SMS</a> API,便能夠和Chrome程序的無線介面溝通。</dd>
+</dl>
+
+<h3 id="範例_Example_Communicating_from_rild_to_the_DOM">範例: Example: Communicating from rild to the DOM</h3>
+
+<p>讓我們來看看一段例子,看一下系統底層是如何和DOM程式碼溝通。當數據機接收到來電時,它會透過專屬機制通知rild,rild接著按照<code style="line-height: 1.5;"><a href="https://github.com/mozilla-b2g/android-hardware-ril/blob/master/include/telephony/ril.h" style="line-height: 1.5;" title="https://github.com/mozilla-b2g/android-hardware-ril/blob/master/include/telephony/ril.h">ril.h</a>內定義的</code><span style="line-height: 1.5;">"open"協定發送訊息到rild客戶端,以來電通話為例,</span><code style="font-style: normal; line-height: 1.5;">RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED</code><span style="line-height: 1.5;"> 訊息會被rild發送至rilporxy。</span></p>
+
+<p>實作在<code><a href="https://github.com/mozilla-b2g/rilproxy/blob/master/src/rilproxy.c" title="https://github.com/mozilla-b2g/rilproxy/blob/master/src/rilproxy.c">rilproxy.c</a>的rilproxy會透過以下程式碼,和rild</code><span style="font-family: courier new,andale mono,monospace; line-height: 1.5;">建立</span><span style="font-family: courier new,andale mono,monospace; font-style: inherit; font-weight: inherit; line-height: 1.5;">連線:</span></p>
+
+<pre class="brush:cpp;">ret = read(rilproxy_rw, data, 1024);
+
+if(ret &gt; 0) {
+ writeToSocket(rild_rw, data, ret);
+}</pre>
+
+<p>一旦從rild那裏取回訊息後,訊息便會經由連接rilproxy和Gecko的socket傳給Gecko,Gecko是藉由<a href="https://dxr.mozilla.org/mozilla-central/source/ipc/ril/Ril.cpp" rel="custom">IPC thread</a>接收訊息:</p>
+
+<pre class="brush:cpp;">int ret = read(fd, mIncoming-&gt;Data, 1024);
+// ... handle errors ...
+mIncoming-&gt;mSize = ret;
+sConsumer-&gt;MessageReceived(mIncoming.forget());
+</pre>
+
+<p>訊息的接收端是<a href="https://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/SystemWorkerManager.cpp" rel="custom">SystemWorkerManager</a>,然後訊息又會被重新打包發送到<code>{source("dom/system/gonk/ril_worker.js", "ril_worker.js")}}執行緒,這個</code><span style="font-family: courier new,andale mono,monospace; line-height: 1.5;">ril_worker.js</span><code style="font-style: normal; line-height: 1.5;">實做了RIL狀態機(</code><span style="line-height: 1.5;">RIL state machine); 這其中的過程是透過 </span><code style="font-style: normal; line-height: 1.5;">RILReceiver::MessageReceived()函式完成</code><span style="line-height: 1.5;">:</span></p>
+
+<pre class="brush:cpp;">virtual void MessageReceived(RilRawData *aMessage) {
+ nsRefPtr&lt;DispatchRILEvent&gt; dre(new DispatchRILEvent(aMessage));
+ mDispatcher-&gt;PostTask(dre);
+}</pre>
+
+<p><span style="font-family: courier new,andale mono,monospace; line-height: 1.5;">訊息</span><span style="line-height: 1.5;">傳遞到</span><span style="font-family: courier new,andale mono,monospace; line-height: 1.5;">ril_worker.js執行緒後,onRILMessage()函數接著會被呼叫。其中呼叫方法是利用Javascript API函式</span><code style="font-style: normal; line-height: 1.5;"><a href="/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_CallFunctionName" title="/en-US/docs/SpiderMonkey/JSAPI_Reference/JS_CallFunctionName">JS_CallFunctionName</a>()</code><span style="line-height: 1.5;">:</span></p>
+
+<pre>return JS_CallFunctionName(aCx, obj, "onRILMessage", NS_ARRAY_LENGTH(argv),
+ argv, argv);</pre>
+
+<p><code>onRILMessage()定義在</code><a href="https://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/ril_worker.js" rel="custom">dom/system/gonk/ril_worker.js</a>中;然後訊息會被切割成包裹,之後每一個包裹會被送給適當的處理函式:</p>
+
+<pre class="brush:js;">handleParcel: function handleParcel(request_type, length) {
+ let method = this[request_type];
+ if (typeof method == "function") {
+ if (DEBUG) debug("Handling parcel as " + method.name);
+ method.call(this, length);
+ }
+}
+</pre>
+
+<p>ril_worker.js對每一個請求類型有實作一個同名的處理函式,所以程式碼能夠簡單地取得請求類型名稱,然後再比對是否有對應的函式存在,如果有便呼叫對應函式起來處理。</p>
+
+<p><code><font face="Open Sans, sans-serif">以</font>RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED</code>為例,下面的處理函式會被呼叫:</p>
+
+<pre class="brush:js;">RIL[UNSOLICITED_RESPONSE_CALL_STATE_CHANGED] = function UNSOLICITED_RESPONSE_CALL_STATE_CHANGED() {
+ this.getCurrentCalls();
+};</pre>
+
+<p>當收到訊息通知後,通話狀態也跟著改變,所以狀態機接著呼叫getCurrentCall()取得目前通話狀態:</p>
+
+<pre class="brush:js;">getCurrentCalls: function getCurrentCalls() {
+ Buf.simpleRequest(REQUEST_GET_CURRENT_CALLS);
+}</pre>
+
+<p>這樣會回傳一個請求給rild,要求目前所有進行中通話的狀態。這個請求會沿著<code>RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED</code> 訊息之前所行進過的路走,只不過方向相反(從<span style="line-height: 1.5;"> </span><code style="font-style: normal; line-height: 1.5;">ril_worker.js</code><span style="line-height: 1.5;"> 到 </span><code style="font-style: normal; line-height: 1.5;">SystemWorkerManager</code><span style="line-height: 1.5;"> 、到 </span><code style="font-style: normal; line-height: 1.5;">Ril.cpp、</code><span style="line-height: 1.5;">再到</span><code style="font-style: normal; line-height: 1.5;">rilproxy,最後是</code><span style="line-height: 1.5;"> </span><code style="font-style: normal; line-height: 1.5;">rild</code><span style="line-height: 1.5;"> socket</span><span style="line-height: 1.5;">)。</span><span style="line-height: 1.5;"> </span><code style="font-style: normal; line-height: 1.5;">rild</code><span style="line-height: 1.5;"> 然後會回應請求,再回到ril_worker.js的</span><span style="font-family: courier new,andale mono,monospace; line-height: 1.5;">REQUEST_GET_CURRENT_CALLS訊息處理器,整個過程是雙向溝通。</span></p>
+
+<p>通話狀態然後會被處理,和之前的狀態比較,如果狀態有變更,ril_worker.js 會再通知在主執行緒上的<code><a href="/zh-TW/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIRadioInterfaceLayer" title="">nsIRadioInterfaceLayer</a></code>服務:</p>
+
+<pre class="brush:js;">_handleChangedCallState: function _handleChangedCallState(changedCall) {
+ let message = {type: "callStateChange",
+ call: changedCall};
+ this.sendDOMMessage(message);
+}</pre>
+
+<p><code><a href="/zh-TW/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIRadioInterfaceLayer" title="">nsIRadioInterfaceLayer</a></code>實作在<a href="https://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/RadioInterfaceLayer.js" rel="custom">dom/system/gonk/RadioInterfaceLayer.js</a>,而訊息是透過onmessage()收到:</p>
+
+<pre class="brush:js;"> onmessage: function onmessage(event) {
+ let message = event.data;
+ debug("Received message from worker: " + JSON.stringify(message));
+ switch (message.type) {
+ case "callStateChange":
+ // This one will handle its own notifications.
+ this.handleCallStateChange(message.call);
+ break;
+ ...
+</pre>
+
+<p>之後訊息會透過父程序訊息管理器(Parent Process Message Manager, PPMM)送到內容程序:</p>
+
+<pre class="brush:js;">handleCallStateChange: function handleCallStateChange(call) {
+ [some internal state updating]
+ ppmm.sendAsyncMessage("RIL:CallStateChanged", call);
+}</pre>
+
+<p>內容程序透過<code><a href="/zh-TW/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIRILContentHelper" title="">nsIRILContentHelper</a></code> 服務的<span style="background-color: rgba(234, 239, 242, 0.247059); font-family: consolas,monaco,andale mono,monospace; font-size: 1rem; line-height: 19px; white-space: pre;">receiveMessage()從子</span><span style="line-height: 1.5;">程序訊息管理器(</span><span style="line-height: 1.5;">Child Process Message Manager, CPMM)那裡</span><span style="background-color: rgba(234, 239, 242, 0.247059); font-family: consolas,monaco,andale mono,monospace; font-size: 1rem; line-height: 19px; white-space: pre;">接受訊息:</span></p>
+
+<pre class="brush:js;">receiveMessage: function receiveMessage(msg) {
+ let request;
+ debug("Received message '" + msg.name + "': " + JSON.stringify(msg.json));
+ switch (msg.name) {
+ case "RIL:CallStateChanged":
+ this._deliverTelephonyCallback("callStateChanged",
+ [msg.json.callIndex, msg.json.state,
+ msg.json.number, msg.json.isActive]);
+ break;</pre>
+
+<p>接著,每一個電話callback物件的<code><a href="https://developer.mozilla.org/zh-TW/docs/XPCOM_Interface_Reference/nsIRILTelephonyCallback#callStateChanged()">nsIRILTelephonyCallback.callStateChanged()</a></code>方法會被呼叫;每一個有存取<a href="/zh-TW/docs/Web/API/Window/navigator/mozTelephony" title="The documentation about this has not yet been written; please consider contributing!"><code>window.navigator.mozTelephony</code></a> API的網頁應用程式會註冊這樣一個callback物件,這個callback物件會發送事件到網頁應用程式,如現階段通話物件狀態改變或有新通話來電事件。</p>
+
+<pre class="brush:cpp;">NS_IMETHODIMP Telephony::CallStateChanged(PRUint32 aCallIndex, PRUint16 aCallState,
+ const nsAString&amp; aNumber, bool aIsActive) {
+ [...]
+
+ if (modifiedCall) {
+ // Change state.
+ modifiedCall-&gt;ChangeState(aCallState);
+
+ // See if this should replace our current active call.
+ if (aIsActive) {
+ mActiveCall = modifiedCall;
+ }
+
+ return NS_OK;
+ }
+
+ nsRefPtr&lt;TelephonyCall&gt; call =
+ TelephonyCall::Create(this, aNumber, aCallState, aCallIndex);
+ nsRefPtr&lt;CallEvent&gt; event = CallEvent::Create(call);
+ nsresult rv = event-&gt;Dispatch(ToIDOMEventTarget(), NS_LITERAL_STRING("incoming"));
+ NS_ENSURE_SUCCESS(rv, rv);
+ return NS_OK;
+}</pre>
+
+<p>應用程式收到事件後可以跟著進行更新使用者介面等等:</p>
+
+<pre class="brush:js;">handleEvent: function fm_handleEvent(evt) {
+ switch (evt.call.state) {
+ case 'connected':
+ this.connected();
+ break;
+ case 'disconnected':
+ this.disconnected();
+ break;
+ default:
+ break;
+ }
+}</pre>
+
+<p>更進一步的範例請見<code style="line-height: 1.5;"><a href="https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/dialer/js/dialer.js" style="line-height: 1.5;" title="https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/dialer/js/dialer.js">撥號應用程式的</a></code><code style="line-height: 1.5;"><a href="https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/dialer/js/dialer.js" style="line-height: 1.5;" title="https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/dialer/js/dialer.js">handleEvent()</a>。</code></p>
+
+<h3 id="3G_data">3G data</h3>
+
+<p>有一個 RIL 訊息會向電信服務(cellular service)發起數據請求(data call),這會啟動數據機的數據傳輸狀態。數據請求會開啟 Linux 核心的<a href="https://zh.wikipedia.org/wiki/Point-to-Point Protocol" title="Point-to-Point Protocol">Point-to-Point Protocol</a> (PPP) 介面裝置,這個裝置能夠透過使用者介面設定。</p>
+
+<h3 id="相關DOM_APIs">相關DOM APIs</h3>
+
+<p>以下是和 RIL 溝通相關的DOM APIs:</p>
+
+<ul>
+ <li><a href="/en-US/docs/API/WebTelephony/Introduction_to_WebTelephony" title="/en-US/docs/API/WebTelephony/Introduction_to_WebTelephony">Telephony API</a></li>
+ <li><a href="/en-US/docs/API/WebSMS/Introduction_to_WebSMS" title="/en-US/docs/API/WebSMS/Introduction_to_WebSMS">SMS API</a></li>
+ <li>Mobile Connection API</li>
+</ul>
+
+<h2 id="WiFi">WiFi</h2>
+
+<p>Firefox OS 的 WiFi 後端使用 <code>wpa_supplicant</code> 處裡大部份工作。所以說WiFi 後端的主要工作是管理請求者(supplicant),還有輔助一些任務,例如載入 WiFi 驅動程式和開關網路介面;從根本上來看,WiFi 後端就是一個狀態機(state machine),而其狀態會跟隨請求者狀態。</p>
+
+<div class="note">
+<p><strong>Note:</strong> 許多 WiFi 有關的有趣東西都和 wpa_supplicant 程序可能的狀態變更息息相關。</p>
+</div>
+
+<p>WiFi 元件的實作可以分成兩份檔案:</p>
+
+<dl>
+ <dt><a href="https://dxr.mozilla.org/mozilla-central/source/dom/wifi/DOMWifiManager.js" rel="custom">dom/wifi/DOMWifiManager.js</a></dt>
+ <dd>實作網頁內容所看到的API;定義在 <code><a href="/zh-TW/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIWifi.idl" title="">nsIWifi.idl</a></code>.</dd>
+ <dt><a href="https://dxr.mozilla.org/mozilla-central/source/dom/wifi/WifiWorker.js" rel="custom">dom/wifi/WifiWorker.js</a></dt>
+ <dd>實作狀態機和驅動請求者的程式碼。</dd>
+</dl>
+
+<p>這兩份檔案利用<a href="/en-US/docs/The_message_manager" title="/en-US/docs/The_message_manager">訊息管理員(message manager)</a> 溝通。 後端聆聽請求訊息,比如說"連接",然後回應訊息當請求行動完成後;DOM 端聆聽回應以及狀態改變和資訊更新的訊息。</p>
+
+<div class="note">
+<p><strong>Note:</strong> 任何同步 DOM API 都會藉由快取資料來實作,同步訊息會盡量避免。</p>
+</div>
+
+<h3 id="WifiWorker.js">WifiWorker.js</h3>
+
+<p>這份檔案實作了 WiFi 介面背後的主要邏輯,由 SystemWorkerManager 喚起,然後運行在 chrome 程序裡(對多執行緒版本來說)。 WifiWorker.js 可以切成兩塊: 一個巨大無名函式與 WifiWorker;無名函式會產出 WifiManager,為本地提供 API,包含和請求者連線以及可取得的掃描結果等事件通知,它會回應請求的資訊,控管和請求者連線的細節,遵照 API 使用客戶的指示行動。</p>
+
+<p>WifiManager 和 DOM 中間是 WifiWorker 物件。WifiWorker 根據事件行動並且轉傳事件給 DOM,反過來,它也會收到 DOM 傳過來的請求,並且對請求者(supplicant)採取適當的動作,WifiWorker 也會維護請求者的狀態資訊和下不步行動的資訊。</p>
+
+<h3 id="DOMWifiManager.js">DOMWifiManager.js</h3>
+
+<p>實作 DOM API,負責在呼叫方和 WiFi worker 之間傳遞訊息。</p>
+
+<div class="note">
+<p><strong>Note:</strong> 為了避免和 chrome 程序之間同步訊息,WiFi Manager 需要根據收到的事件快取狀態。</p>
+</div>
+
+<p>有一個同步訊息,那就是當 DOM API 初始化時為了取得請求者(supplicant)當下的狀態。</p>
+
+<h3 id="DHCP">DHCP</h3>
+
+<p>DHCP 和 DNS 由標準 Linux DHCP 客戶端,dhcpcd,負責。當網路連線中斷後,因為無法運作,Firefox OS 會終止 dhcpcd,直到又重新連上網路,dhcpcd 會被再重啟。<code>dhcpcd</code> 也負責設定預設路徑(route)。</p>
+
+<h2 id="Network_Manager">Network Manager</h2>
+
+<p>Network Manager 負責設定 3G 數據和 WiFi 元件的網路介面。</p>
+
+<h2 id="程序與執行緒">程序與執行緒</h2>
+
+<p>Firefox OS 採用 POSIX threads 實現所有應用程式的執行緒,這包括了應用成程式主執行緒、Web Worker 和輔助執行緒。Nice值決定了程序和執行緒的執行優先順序,然後再依賴 Linux 核心排程器先後執行;根據程序不同的狀態會有不同的Nice值。目前有7種Nice層級:</p>
+
+<table class="standard-table">
+ <caption>程序執行優先順序</caption>
+ <thead>
+ <tr>
+ <th scope="col">優先順序</th>
+ <th scope="col">Nice</th>
+ <th scope="col">用於</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>MASTER</code></td>
+ <td>0</td>
+ <td>主 b2g process</td>
+ </tr>
+ <tr>
+ <td><code>FOREGROUND_HIGH</code></td>
+ <td>0</td>
+ <td>持有 CPU wakelock 的程式</td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <td><code>FOREGROUND</code></td>
+ <td>1</td>
+ <td>前景(foreground)程式</td>
+ </tr>
+ <tr>
+ <td><code>FOREGROUND_KEYBOARD</code></td>
+ <td>1</td>
+ <td>鍵盤程式</td>
+ </tr>
+ <tr>
+ <td><code>BACKGROUND_PERCEIVABLE</code></td>
+ <td>7</td>
+ <td>音樂播放背景(background)程式</td>
+ </tr>
+ <tr>
+ <td><code>BACKGROUND_HOMESCREEN</code></td>
+ <td>18</td>
+ <td>主畫面程式</td>
+ </tr>
+ <tr>
+ <td><code>BACKGROUND</code></td>
+ <td>18</td>
+ <td>其他背景程式</td>
+ </tr>
+ </tbody>
+</table>
+
+<p>有些層級的 Nice 值雖然一樣,不過記憶體不足時的終止行為不一樣。所有的優先順序可以在建置時調整,相關的程式碼請見<a href="http://hg.mozilla.org/mozilla-central/file/54e8c6492dc4/b2g/app/b2g.js#l610"><code>b2g/app/b2g.js</code></a>。</p>
+
+<p>一個程序(process)之內,主執行緒繼承了該程序的 Nice 值,而 Web Worker 執行緒所得到的 Nice 值為主執行緒的加一點,所以優先權較低,這麼做是為了避免耗費 CPU 資源的worker 拖慢的主執行續的運作。程序優先順趣會因為事件發生而變化,比如說當一個程式由前景轉到背景時、一個新的程式啟動、現存程式取得 CPU wakelock,一旦程序的執行優先權變動,旗下所屬的執行緒的執行優先權也會跟著變動。</p>
+
+<div class="note">
+<p><strong>Note:</strong> cgroups 目前沒有在資源管理用上,因為在某些裝置和核心上並不可靠。</p>
+</div>
+
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/automated_testing/gaia-ui-tests/gaia_ui_tests_run_tests/index.html b/files/zh-tw/archive/b2g_os/automated_testing/gaia-ui-tests/gaia_ui_tests_run_tests/index.html
new file mode 100644
index 0000000000..3924fbf5a6
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/automated_testing/gaia-ui-tests/gaia_ui_tests_run_tests/index.html
@@ -0,0 +1,111 @@
+---
+title: Gaia UI Tests Run Tests
+slug: Archive/B2G_OS/Automated_testing/gaia-ui-tests/Gaia_UI_Tests_Run_Tests
+translation_of: Archive/B2G_OS/Automated_testing/gaia-ui-tests/Gaia_UI_Tests_Run_Tests
+---
+<div class="warning">
+ <p>這個頁面尚未完成。請有志一同的夥伴幫忙補充。<br>
+ 有任何意見都可以寄到 gaia-ui-automation@mozilla.org。</p>
+</div>
+<h2 id="Running_Tests">Running Tests</h2>
+<p>    Basically, we can run gaia-ui-tests on a device with marionette server, emulators, and desktop B2G. However, please notice again that you should <u><strong>choose the right branch</strong></u> of gaia-ui-tests describing your B2G the best as we talked on previous section.</p>
+<h3 id="Testing_on_Devices">Testing on Devices</h3>
+<p>    First of all, connect your device through USB to computer, and then forward the package from the phone to computer port:</p>
+<pre>adb forward tcp:2828 tcp:2828
+</pre>
+<p>    <a name="adb_forward_error">You might get weird error</a>, such as "no permission", from the command above. In that case, you could try to do the commands below:</p>
+<pre>adb kill-server
+sudo adb devices
+adb forward tcp:2828 tcp:2828
+</pre>
+<p>    It's almost all done before you start to run your tests! Before you start to run the test, read through <a href="https://developer.mozilla.org/en-US/docs/Gaia_Test_Runner#Risks" title="https://developer.mozilla.org/en-US/docs/Gaia_Test_Runner#Risks">this warning</a> in order to start gaia-ui-tests correctly.<br>
+     Now, you can send this command to execute all gaiatests:</p>
+<pre><code>gaiatest &lt;gaia_ui_tests folder&gt;/tests/ --address=localhost:2828 --type=b2g-xfail &lt;your manifest file location&gt;</code>
+</pre>
+<p>    Or, if you want to run solely one file, just do:</p>
+<pre><code>gaiatest &lt;file&gt; --address=localhost:2828 --type=b2g-xfail &lt;your manifest file location&gt;</code>
+</pre>
+<p>    After the test, you will see all the result on pass/fail. And, for each individual test, it might have more information that you can go through. Here are some common examples you might be able to see:</p>
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <td style="text-align: center;"><strong>Error Message </strong></td>
+ <td style="text-align: center;"><strong>Corresponding Actions</strong></td>
+ </tr>
+ <tr>
+ <td>error: [Errno 111] Connection refused</td>
+ <td>reissue adb forward command</td>
+ </tr>
+ <tr>
+ <td>Element ... not visible before timeout</td>
+ <td>make sure the element would display on the app you test</td>
+ </tr>
+ <tr>
+ <td>TimeoutException: Condition timed out</td>
+ <td>make sure the condition on the app is the same as your expectations</td>
+ </tr>
+ <tr>
+ <td>broken pip</td>
+ <td>mostly bad marionette server issue</td>
+ </tr>
+ </tbody>
+</table>
+<p> </p>
+<h3 id="Testing_on_Emulator">Testing on Emulator</h3>
+<p><strong>Automatically launched emulator</strong></p>
+<div class="geckoVersionNote">
+ <p>TODO</p>
+</div>
+<p><strong>Mannually launched emulator</strong></p>
+<div class="geckoVersionNote">
+ <p>TODO</p>
+</div>
+<h3 id="Testing_on_Desktop_B2G">Testing on Desktop B2G</h3>
+<p>    After you downloaded the Gaia UI test from GitHub, you also can use <span class="author-g-bbktpz122z7l6tqfmcrf">desktop build to run the tests.</span><span class="author-g-bbktpz122z7l6tqfmcrf"> The Firefox OS desktop client, also called the </span><span class="author-g-bbktpz122z7l6tqfmcrf i"><i>B2G desktop client</i></span><span class="author-g-bbktpz122z7l6tqfmcrf">,  lets you run Gaia and Web apps in a Gecko-based environment somewhat  similar to an actual device. It doesn't emulate device hardware, so it's  not adequate for testing device APIs, and isn't a replacement for  testing on actual hardware. However, it does have a several APIs enabled  that aren't available on Firefox such as the Contacts and Settings  APIs. It can therefore be useful during the development of your  application, or while working on the Gaia user interface itself.</span></p>
+<p>    You can download the latest build of the desktop client from <a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-b2g18/">this location</a>, but make sure you download the appropriate file for your operating system.</p>
+<ul>
+ <li><strong>Mac</strong>: b2g-[VERSION].multi.mac64.dmg</li>
+ <li><strong>Linux (32bit)</strong>: b2g-[VERSION].multi.linux-i686.tar.bz2</li>
+ <li><strong>Linux (64bit)</strong>: b2g-[VERSION].multi.linux-x86_64.tar.bz2</li>
+</ul>
+<div class="note">
+ <p>Note 1: Unfortunately, due to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=832469">Bug 832469</a> the nightly desktop builds do not currently work on Windows, so you will need either Mac or Linux to continue :</p>
+ <p>Note 2: If you do not have the required operating systems installed on your machine, a virtual machine is fine as well.</p>
+</div>
+<p>    Once downloaded, you will need to extract the contents to a local folder. For the purposes of the rest of this guide, I’ll refer to this location as<code> <strong>$B2G_HOME</strong></code>.<br>
+ Add the following line to your gaia/profile/user.js file,</p>
+<pre><code>user_pref('marionette.force-local', true)</code></pre>
+<p>which on :</p>
+<ul>
+ <li><strong>Mac</strong> is located in $B2G_HOME/B2G.app/Contents/MacOS</li>
+ <li><strong>Linux</strong> is located in $B2G_HOME/b2g</li>
+</ul>
+<p>    Because we’re running against the desktop client we must filter out all tests that are unsuitable. To run the tests, use the following command:</p>
+<pre><code>gaiatest --address=localhost:2828 --type=b2g-antenna-bluetooth-carrier-camera-sdcard-wifi-xfail &lt;your manifest file location&gt;</code>
+</pre>
+<h2 id="Test_Variables">Test Variables</h2>
+<p>    There is one warning previously mentioned here. Please do read <a href="https://developer.mozilla.org/en-US/docs/Gaia_Test_Runner#Risks" title="https://developer.mozilla.org/en-US/docs/Gaia_Test_Runner#Risks">the warning</a> before you setup your json test variables file.</p>
+<p>    We use the --testvars option to pass in local variables, particularly those that cannot be checked into the repository. For example in gaia-ui-tests these variables can be your private login credentials, phone number or details of your WiFi connection.</p>
+<p>    To use it, copy testvars_template.json to a different filename but add it into .gitignore so you don't check it into your repository.</p>
+<p>    When running your tests add the argument: --testvars=(filename).json</p>
+<p><strong>Variables</strong></p>
+<p><code>this_phone_number (string)</code> The phone number of the SIM card in your device. Prefix the number with '+' and your international dialing code.</p>
+<p><code>remote_phone_number (string)</code> A phone number that your device can call during the tests (try not to be a nuisance!). Prefix the number with '+' and your international dialing code.</p>
+<p><code>wifi.ssid (string)</code> This is the SSID/name of your WiFi connection. Currently this supports WPA/WEP/etc. You can add WiFi networks by doing the following (remember to replace "KeyManagement" and "wep" with the value your network supports) :</p>
+<p><code>"wifi": { "ssid": "MyNetwork", "keyManagement": "WEP", "wep": "MyPassword" } </code></p>
+<p><code>WPA-PSK: "wifi": { "ssid": "MyNetwork", "keyManagement": "WPA-PSK", "psk": "MyPassword" } </code></p>
+<p><code>Marketplace: "marketplace": { "username": "MyUsername", "password": "MyPassword" } </code></p>
+<div class="note">
+ <p>Due to <a href="http://bugzil.la/775499">Bug 775499</a>, WiFi connections via WPA-EAP are not capable at this time.</p>
+</div>
+<p> </p>
+<h2 id="Test_Parameters">Test Parameters</h2>
+<p>    As you see in the last command we gave out on previous sections, there are many test variables for you to know. You can do this to get more information:</p>
+<pre>gaiatest --help</pre>
+<p> </p>
+<h2 id="Test_Data_Prerequisites">Test Data Prerequisites</h2>
+<p>Occasionally a test will need data on the hardware that cannot be set during the test setUp. The following tests need data set up before they can be run successfully:</p>
+<p><u><code>test_ftu</code></u> Requires a single record/contact saved onto the SIM card to test the SIM contact import</p>
+<p> </p>
+<p style="text-align: center;"><strong>Go to <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/gaia-ui-tests/Gaia_UI_Tests_Write_Tests" title="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/gaia-ui-tests/Gaia_UI_Tests_Run_Tests">"Writing Tests"</a> section</strong></p>
+<p style="text-align: center;"> </p>
diff --git a/files/zh-tw/archive/b2g_os/automated_testing/gaia-ui-tests/index.html b/files/zh-tw/archive/b2g_os/automated_testing/gaia-ui-tests/index.html
new file mode 100644
index 0000000000..2c11cea761
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/automated_testing/gaia-ui-tests/index.html
@@ -0,0 +1,69 @@
+---
+title: Gaia UI Tests Guidelines
+slug: Archive/B2G_OS/Automated_testing/gaia-ui-tests
+translation_of: Archive/B2G_OS/Automated_testing/gaia-ui-tests
+---
+<div class="summary">
+ <p>Gaia-ui-tests 是 Mozilla 的一套用於自動測試 Gaia UI 的架構。所有的測試都是以 Python 撰寫,佐以少數的 Javascript 來與 Firefox OS 的 API 溝通。此一系列的教學文章將會描述如何設定環境、撰寫及執行測試。</p>
+</div>
+<p>Gaia-ui-tests uses <strong>Gaiatest</strong>, a Python package based around <a href="https://developer.mozilla.org/en-US/docs/Marionette" title="https://developer.mozilla.org/en-US/docs/Marionette">Marionette</a>. Gaiatest is designed to wrap HTML locators, Marionette calls and API calls together for interoperble communication and functionality. Marionette is based on the W3C standard developed for the <a href="http://docs.seleniumhq.org/projects/webdriver/" title="http://docs.seleniumhq.org/projects/webdriver/">Selenium WebDriver</a> a programming interface for browser automation. If you have used WebDriver and page/app objects before then you will find using Marionette and gaiatest easy.</p>
+<h2 id="Getting_started_with_Gaia_UI_tests">Getting started with Gaia UI tests</h2>
+<p>For those keen to get started with automated testing on Gaia/Firefox OS we have a tutorial series that will help you go from nothing to writing your own tests. Once you've completed this tutorial you'll have enough knowledge of testing, Firefox OS and Marionette to get started as a Mozilla tests contributor. It is <strong>highly</strong> recommended that you complete this tutorial if you wish to become a contributor.</p>
+<dl>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_1_Marionette_Firefox_OS_start">Part 1: Getting started with Marionette and Firefox OS</a></dt>
+ <dd>
+ This article covers installing the tools you need to get started with running tests, such as B2G Desktop, Python and Marionette.</dd>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_2_Marionette_Firefox_OS_interactions">Part 2: Basic interactions with Firefox OS using Marionette</a></dt>
+ <dd>
+ An overview of the basic commands you will use to manipulate Firefox OS via Marionette.</dd>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_3_Reusable_tests">Part 3: Upgrading our code into a reusable test</a></dt>
+ <dd>
+ Moving on, in this article we will assemble some basic commands into a simple test inside a Python file so they can all be run as a single entity.</dd>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_4_Reusing_commands_Firefox_OS_setup">Part 4: Re-using commands to set up Firefox OS</a></dt>
+ <dd>
+ Here we look at moving some of the commands into Python methods to promote code reuse.</dd>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_5_Introducing_a_test_runner">Part 5: Introducing a test runner</a></dt>
+ <dd>
+ A test runner is a central feature of any good test suite, allowing you to run multiple tests and report and aggregate results. In this article we will explore the basics of Python's unittest runner.</dd>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_6_Marionette_By_class">Part 6: Using tuples, and Marionette's By class</a></dt>
+ <dd>
+ This time around we explain how to further reduce duplication of code, by storing repeated locators in tuples and simplifying the syntax with Marionette's <code>By</code> class.</dd>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_7_Writing_your_own_tests">Part 7: Writing your own tests</a></dt>
+ <dd>
+ Now the basics and behind you, and it is time to start to writing your own tests! Here we give you some tool recommendations to make the work easier, and suggest some tests to try your hand at writing.</dd>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_8_Using_a_base_class">Part 8: Using a base class</a></dt>
+ <dd>
+ In its current state, our test file contains all the test runner code. This is ok for now, but as soon as you start to run many test files it will mean a lot of duplication. Here we solve this problem by abstracting the test runner code into a separate Python class.</dd>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Part_9_app_objects">Part 9: Reducing duplication with app objects</a></dt>
+ <dd>
+ As a final improvement to the code's maintainability, in this article we explore abstracting code that handles interaction with specific Firefox OS apps out into Python app objects.</dd>
+</dl>
+<h2 id="Advanced_topics">Advanced topics</h2>
+<p>One you've got the basics of writing and running tests under your belt, you way want to move on to some more involved or advanced work, such as running the full gaia-ui-tests tests suite, or logging power draw as the result of a test.</p>
+<dl>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Gaia_UI_Tests_Run_Tests" title="Gaia UI Tests Run Tests">Running the gaia-ui-tests</a></dt>
+ <dd>
+ Guides to running the gaia-ui-tests suite against real Firefox OS devices and <a href="https://developer.mozilla.org/en-US/Firefox_OS/Using_the_B2G_desktop_client">B2G Desktop</a> in a variety of configurations.</dd>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Gathering_power_draw_data_using_gaiatest">Gathering Power Draw</a></dt>
+ <dd>
+ How to use gaiatest to log power draw while a test is running.</dd>
+</dl>
+<h2 id="See_also">See also</h2>
+<p><a href="https://github.com/mozilla-b2g/gaia/tree/master/tests/python/gaia-ui-tests">Gaia-ui-tests main repository</a></p>
+<h2 id="QuestionsCommentsConcerns"><span class="mw-headline" id="Questions.2FComments.2FConcerns">Questions/Comments/Concerns </span></h2>
+<p>This project is at a fairly early stage, and your feedback would be greatly appreciated:</p>
+<ul>
+ <li>Send mails to the <a href="http://mailto:_gaia-ui-automation@mozilla.org">gaia-ui-automation@mozilla.org</a> list.</li>
+ <li>Alternatively, find us on <a href="https://wiki.mozilla.org/IRC">Mozilla IRC</a> at channels #ateam, #mozwebqa, and #moztpeqa.</li>
+</ul>
diff --git a/files/zh-tw/archive/b2g_os/automated_testing/index.html b/files/zh-tw/archive/b2g_os/automated_testing/index.html
new file mode 100644
index 0000000000..66f4eb520d
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/automated_testing/index.html
@@ -0,0 +1,77 @@
+---
+title: 測試 Boot to Gecko
+slug: Archive/B2G_OS/Automated_testing
+translation_of: Archive/B2G_OS/Automated_testing
+---
+<p>因為 Boot to Gecko 還在開發中,不久的將來即將有對新硬體的支援,因此如何做測試就是很重要的事情。這個頁面提供了從多種方面測試 Boot to Gecko 的文章及資訊。</p>
+<table class="topicpage-table">
+ <tbody>
+ <tr>
+ <td>
+ <h3 id="Documentation" name="Documentation">Unit testing</h3>
+ <ul>
+ <li><a href="/en-US/docs/Mozilla/Boot_to_Gecko/Gaia_Unit_Tests" title="/en-US/docs/Mozilla/Boot_to_Gecko/Gaia_Unit_Tests">Gaia Unit Tests</a></li>
+ <li><a href="/en-US/docs/Mozilla/Boot_to_Gecko/B2G_Mochitests" title="/en-US/docs/Mozilla/Boot_to_Gecko/B2G_Mochitests">Mochitests</a></li>
+ </ul>
+ <dl>
+ </dl>
+ <h3 id="Documentation" name="Documentation">Miscellaneous testing topics</h3>
+ <dl>
+ <dt>
+ <a href="/en-US/docs/Debugging/Debugging_OpenGL" title="/en-US/docs/Debugging/Debugging_OpenGL">Debugging OpenGL</a></dt>
+ <dd>
+ How to debug OpenGL code on Boot to Gecko.</dd>
+ <dt>
+ <a href="/en-US/docs/Mozilla/Boot_to_Gecko/Feature_support_chart" title="/en-US/docs/Mozilla/Boot_to_Gecko/Feature support chart">Feature support chart</a></dt>
+ <dd>
+ A chart of what features are supported by the different builds of Boot to Gecko.</dd>
+ </dl>
+ <h3 id="Documentation" name="Documentation">Marionette for Boot to Gecko</h3>
+ <ul>
+ <li><a class="link-https" href="https://wiki.mozilla.org/Auto-tools/Projects/Marionette" title="https://wiki.mozilla.org/Auto-tools/Projects/Marionette">The Marionette Test Automation Framework</a></li>
+ <li><a href="/en/Marionette" title="https://developer.mozilla.org/en/Marionette">Marionette on MDN</a></li>
+ </ul>
+ <h4 id="Gaia_Unit_Tests">Gaia Unit Tests</h4>
+ <ul>
+ <li><a href="/en/Mozilla/Boot_to_Gecko/Gaia_Unit_Tests" title="https://developer.mozilla.org/en/Mozilla/Boot_to_Gecko/Gaia_Unit_Tests">Running/Writing Unit Tests</a></li>
+ </ul>
+ <h4 id="Marionette_Tutorials">Marionette Tutorials</h4>
+ <ul>
+ <li><a href="/en/Mozilla/Boot_to_Gecko/Setting_Up_Marionette_for_B2G" title="Building B2G for QEMU Emulator">Setting up Marionette for Boot to Gecko</a></li>
+ <li><a href="/en/Mozilla/Boot_to_Gecko/Marionette_for_Interactive_Python" title="https://developer.mozilla.org/en/Mozilla/Boot_to_Gecko/Marionette_for_Interactive_Python">Marionette for Interactive Python</a></li>
+ <li>Marionette for QEMU emulator</li>
+ </ul>
+ <h4 id="Writing_Tests_For_Marionette">Writing Tests For Marionette</h4>
+ <ul>
+ <li><a href="/en/Marionette/Marionette_Python_Tests" title="en/Marionette/Marionette_Python_Tests">Marionette Python Tests</a></li>
+ <li><a href="/en-US/docs/Marionette/Marionette_JavaScript_Tests" title="/en-US/docs/Marionette/Marionette_JavaScript_Tests">Marionette JavaScript Tests</a></li>
+ <li><a href="/en/Marionette/Running_Tests" title="en/Marionette/Running_Tests">Running Marionette Tests</a></li>
+ </ul>
+ <p><span class="alllinks"><a href="/Special:Tags?tag=B2G&amp;language=en" title="Special:Tags?tag=B2G&amp;language=en">View All...</a></span></p>
+ </td>
+ <td>
+ <h3 id="Community" name="Community">Getting help from the community</h3>
+ <p>If you're working with Boot to Gecko, or developing applications you'd like to run on Boot to Gecko based devices, there are community resources to help you!</p>
+ <ul>
+ <li>Consult the Boot to Gecko forum: <ul>
+ <li><a href="https://lists.mozilla.org/listinfo/dev-b2g"> 郵件討論</a></li>
+
+
+ <li><a href="http://groups.google.com/group/mozilla.dev.b2g"> 新聞群組</a></li>
+ <li><a href="http://groups.google.com/group/mozilla.dev.b2g/feeds"> feed 消息來源</a></li>
+</ul></li>
+ </ul>
+ <ul>
+ <li>Ask your question on the Mozilla 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>
+ <h3 id="Related_Topics" name="Related_Topics">Related topics</h3>
+ <ul>
+ <li><a href="/en/HTML" title="en/HTML">QA</a></li>
+ </ul>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/building/index.html b/files/zh-tw/archive/b2g_os/building/index.html
new file mode 100644
index 0000000000..9e5c54202c
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/building/index.html
@@ -0,0 +1,124 @@
+---
+title: 建置 Boot to Gecko
+slug: Archive/B2G_OS/Building
+translation_of: Archive/B2G_OS/Building
+---
+<div>
+ </div>
+<p>當您已經建立好編譯的系統、第一次成功地抓了程式碼以及設定好程式碼,您就可以編譯 Boot to Gecko。</p>
+<h2 id="更新程式碼">更新程式碼</h2>
+<p>如果您不是第一次編譯B2G,您需要在編譯之前先抓取最新的程式碼。您可以執行以下指令來更新B2G工具及相依套件:</p>
+<pre>git pull
+./repo sync
+</pre>
+<p>您可以藉由指定名稱來更新某部分的倉儲:</p>
+<pre>./repo sync gaia
+</pre>
+<p>repo指令也有其他您可能會有興趣的選項可用;您可執行 <span style="font-family: 'Courier New', 'Andale Mono', monospace;">repo help </span>指令來獲取有用的資訊。</p>
+<h2 id="編譯">編譯</h2>
+<div class="note">
+ <p>注意:在編譯前,您可以設置一個 <span style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal;">.userconfig 檔案來訂製這次編譯。</span><a href="/en-US/docs/Mozilla/Boot_to_Gecko/Customization_with_the_.userconfig_file" title="/en-US/docs/Mozilla/Boot_to_Gecko/Customization_with_the_.userconfig_file">使用 .userconfig 檔案來客製</a> <span style="font-family: 'Courier New', 'Andale Mono', monospace; line-height: normal;">有更多詳細資訊。</span></p>
+</div>
+<p>執行 <span style="font-family: 'Courier New', 'Andale Mono', monospace;">build.sh 就可以開始編譯 Boot to Gecko:</span></p>
+<pre>cd B2G
+./build.sh
+</pre>
+<p>是時候該再喝杯咖啡,或小睡一下了(尤其是第一次編譯)。</p>
+<h3 id="專程編譯某些模組">專程編譯某些模組</h3>
+<p>如果您只想要編譯某個模組,例如 Gecko,您可以指定名稱:</p>
+<pre>./build.sh gecko
+</pre>
+<p>您也可以用這個指令來取得您編譯的模組的列表:</p>
+<pre>./build.sh modules
+</pre>
+<h3 id="設定要使用的處理器數目">設定要使用的處理器數目</h3>
+<p>B2G 的編譯 scripts 預設使用系統的 cores 數量加二作為平行工作的數量。您可以再執行 <code>build.sh</code> 的時候指定 <code>-j </code>參數來改變這個預設值。如果您想要把編譯工作丟到背景、並且減輕 CPU 負載來做其他事情的話,這對您就很方便。當您面臨到編譯問題時,如果您一次就只執行一個編譯工作的話、設定處理器數目也可以讓您更容易讀取編譯的錯誤輸出,真的很方便。</p>
+<p>舉例來說,設定同時只會有兩個工作來編譯:</p>
+<pre>./build.sh -j2
+</pre>
+<p>對於此對常見的使用案例就是防止不要平行編譯。這會讓編譯的輸出更加容易閱讀,更容易釐清編譯的問題。執行下面指令:</p>
+<pre>./build.sh -j1
+</pre>
+<h3 id="多語系編譯">多語系編譯</h3>
+<p>建立多語系的編譯版本:</p>
+<h4 id="Gaia">Gaia</h4>
+<ol>
+ <li>決定要用哪個 Gaia 語系檔。這邊我們用 <a href="http://hg.mozilla.org/integration/gaia-nightly/file/e2eed5263e77/shared/resources/languages-dev.json"><code>locales/languages_dev.json</code></a> 和 <a href="http://hg.mozilla.org/integration/gaia-nightly/file/e2eed5263e77/shared/resources/languages-all.json"><code>locales/languages_all.json</code></a> 當做我們 Gaia 的語系檔。</li>
+ <li>Clone the appropriate locales</li>
+ <li>從 <a href="http://hg.mozilla.org/gaia-l10n">http://hg.mozilla.org/gaia-l10n</a> 複製適當的語系到目錄下;<code>這裡我們放於 gaia-l10n/</code> 下。接著您會需要將列於語系檔之內的美個語系的倉儲(repo)都複製下來。</li>
+ <li>您需要將上面步驟二目錄的絕對路徑設定在<code> LOCALE_BASEDIR</code> 環境變數中。也要把步驟一中檔案的絕對路徑設定在 <code>LOCALES_FILE</code> 環境變數中。</li>
+</ol>
+<p>如例:</p>
+<pre>export LOCALE_BASEDIR=$PWD/gaia-l10n
+export LOCALES_FILE=$PWD/gecko/gaia/shared/resources/languages-dev.json
+</pre>
+<h4 id="Gecko">Gecko</h4>
+<ol>
+ <li>決定要用哪個 Gecko 語系檔。這邊我們用 <a href="http://hg.mozilla.org/releases/mozilla-b2g18/file/default/b2g/locales/all-locales">b2g/locales/all-locales</a> 當做我們的 Gecko 語系檔。</li>
+ <li>複製適當的語系到目錄下;像是 <code>gecko-l10n/</code> 。
+ <ul>
+ <li>mozilla-central 要用 <a href="http://hg.mozilla.org/l10n-central/">http://hg.mozilla.org/l10n-central/</a></li>
+ <li>mozilla-aurora 要用 <a href="http://hg.mozilla.org/releases/l10n/mozilla-aurora/">http://hg.mozilla.org/releases/l10n/mozilla-aurora/</a></li>
+ <li>mozilla-beta 或 mozilla-b2g18 則是 <a href="http://hg.mozilla.org/releases/l10n/mozilla-beta/">http://hg.mozilla.org/releases/l10n/mozilla-beta/</a></li>
+ </ul>
+ </li>
+ <li>複製 <a href="http://hg.mozilla.org/build/compare-locales">compare-locales</a>.</li>
+ <li>
+ <p>將步驟二目錄的絕對路徑設定在 <code>L10NBASEDIR </code>環境變數中。將步驟一中的語系以空白分隔方式設定在 <code>MOZ_CHROME_MULTILOCALE </code>環境變數中。</p>
+ </li>
+ <li>
+ <p>將 <code>compare-locales/scripts</code> 目錄加入到 <code>PATH</code> 變數、 <code>compare-locales/lib</code> 加入到 <code>PYTHONPATH</code> 變數中.</p>
+ 如例:
+ <pre>export L10NBASEDIR=$PWD/gecko-l10n
+export MOZ_CHROME_MULTILOCALE="ja zh-TW"
+export PATH="$PATH:$PWD/compare-locales/scripts"
+export PYTHONPATH="$PWD/compare-locales/lib"
+</pre>
+ <p>當您完成這些設定之後,就可以執行 build.sh 了。</p>
+ <p>看起來您也可以用<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=818560#c9/"> .userconfig</a> 來做這些事情。</p>
+ <p>當我們整理好之後,可能會修改這些指令。</p>
+ </li>
+</ol>
+<h2 id="已知的錯誤">已知的錯誤</h2>
+<ul>
+ <li>
+ <h3 id="KeyedVector.h19331_error_indexOfKey_was_not_declared_in_this_scope">KeyedVector.h:193:31: error: indexOfKey was not declared in this scope</h3>
+ </li>
+</ul>
+<p>當您的 gcc 版本太新的時候會出現這個錯誤。請安裝 gcc/g++/g++-multilib 4.6.x 版本.</p>
+<p><a href="/en-US/docs/Mozilla/Boot_to_Gecko/B2G_build_prerequisites" title="en-US/docs/Mozilla/Boot_to_Gecko/B2G_build_prerequisites">設置您的編譯環境</a> 有更多資訊。</p>
+<div class="note">
+ <p><strong>社群上的提醒:</strong> 用 4.7.x 加上修改一些 B2G 程式碼可能可以 (gcc 會告訴你要改哪些地方) 但是這邊就沒人能幫你了!但是不改就不會碰到這些問題。</p>
+</div>
+<ul>
+ <li>
+ <h3 id="arm-linux-androideabi-g_Internal_error_Killed_program_cc1plus">arm-linux-androideabi-g++: Internal error: Killed (program cc1plus)</h3>
+ </li>
+</ul>
+<p>如果看到這個訊息,通常是代表記憶體不夠。在執行 <code>./build.sh </code>之前請確認有足夠的記憶體,如果您的系統記憶體有4G的話,應該可以跑的很順利。</p>
+<ul>
+ <li>
+ <h3 id="If_you_get_build_errors_while_the_build_system_is_running_tests">If you get build errors while the build system is running tests</h3>
+ </li>
+</ul>
+<p>有時候(尤其是在作業系統或是編譯工具更新後)您在編譯系統執行編譯後測試時,會碰到一些靈異現象就像下面這樣:</p>
+<pre>Generating permissions.sqlite...
+test -d profile || mkdir -p profile
+run-js-command permissions
+WARNING: permission unknown:offline-app
+WARNING: permission unknown:indexedDB-unlimited
+build/permissions.js:122: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPermissionManager.add]
+make[1]: *** [permissions] Error 3
+make: *** [gaia/profile.tar.gz] Error 2</pre>
+<p>這種情況下試著刪除 <code>gaia/xulrunner-sdk </code>目錄然後再重新抓程式碼:</p>
+<pre>rm -r gaia/xulrunner-sdk
+</pre>
+<p>這樣會刪掉由編譯系統自動抓取、預先編譯的 <a href="/en-US/docs/XULRunner" title="/en-US/docs/XULRunner">XULRunner</a>;在下一次編譯的時候,XULRunner 會再被自動抓取一份。</p>
+<h2 id="接著的步驟">接著的步驟</h2>
+<p>在編譯後,下個步驟就取決於您編譯的 Boot to Gecko 是給模擬器還是給實體手機;細節請參考下列文章:</p>
+<ul>
+ <li><a href="/en-US/docs/Mozilla/Boot_to_Gecko/Using_the_B2G_emulators" title="en-US/docs/Mozilla/Boot_to_Gecko/Using_the_B2G_emulators">使用 B2G 模擬器</a></li>
+ <li><a href="/en-US/docs/Mozilla/Boot_to_Gecko/Using_the_B2G_desktop_client" title="en-US/docs/Mozilla/Boot_to_Gecko/Using_the_B2G_desktop_client">使用 B2G 的電腦桌面 client 程式</a></li>
+ <li><a href="https://developer.mozilla.org/en/Mozilla/Boot_to_Gecko/Installing_Boot_to_Gecko_on_a_mobile_device" title="en/Mozilla/Boot_to_Gecko/Installing Boot to Gecko on a mobile device">將 Boot to Gecko 安裝於行動裝置</a></li>
+ <li><a href="/en-US/docs/Mozilla/Boot_to_Gecko/Pandaboard" title="en-US/docs/Mozilla/Boot_to_Gecko/Pandaboard">將 Boot to Gecko 安裝於 pandaboard</a></li>
+</ul>
diff --git a/files/zh-tw/archive/b2g_os/building_and_installing_firefox_os/firefox_os_build_process_summary/index.html b/files/zh-tw/archive/b2g_os/building_and_installing_firefox_os/firefox_os_build_process_summary/index.html
new file mode 100644
index 0000000000..0dc0cd18b7
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/building_and_installing_firefox_os/firefox_os_build_process_summary/index.html
@@ -0,0 +1,108 @@
+---
+title: Firefox OS 建置程序摘要
+slug: >-
+ Archive/B2G_OS/Building_and_installing_Firefox_OS/Firefox_OS_build_process_summary
+translation_of: Archive/B2G_OS/Building_and_installing_B2G_OS/B2G_OS_build_process_summary
+---
+<div class="summary">
+ <p><font><font>建置</font></font><font><font>和安裝Firefox OS需要大量的時間,網路頻寬和電腦計算能力。</font><font>不幸的是,一路上事情很容易出問題,所以</font><font>此頁面列出了<font><font>建置</font></font>的目標和步驟,希望</font></font><font><font>可以在用戶<font><font><font><font>建置的</font></font>過程中</font></font><font><font>幫上忙</font></font>。</font><font>至於每一步驟的細節,會在其他文</font></font>件討論<font><font>。</font></font></p>
+</div>
+<div class="note">
+ <p><span style="font-weight: bold;"><font><font>注:</font></font></span><font><font>Firefox OS<font><font>建置</font></font>過程會提及到“B2G”或“Boot2Gecko”。</font><font>“Boot2Gecko”是Firefox OS專案的原始代號名稱。</font></font></p>
+</div>
+<h2 id="建置目標:4個“映像”檔"><font><font><font><font>建置</font></font>目標:4個“映像”檔</font></font></h2>
+<p><font><font><font><font>建置</font></font>的目標是建立4個可以被複製到Firefox OS設備的映像檔。</font></font></p>
+<table style="width: 90%; vertical-align: top; margin: 4px auto;">
+ <tbody>
+ <tr>
+ <td><b><font><font>boot.img</font></font></b></td>
+ <td><font><font>Linux核心和根檔案系統映像檔(root filesystem image),後者提供<font><font>一套</font></font>可用的基本Unix工具。</font></font></td>
+ </tr>
+ <tr>
+ <td><b><font><font>system.img</font></font></b></td>
+ <td><font><font>Firefox的操作系統核心,包括部分<font><font>的</font></font>Gonk,Gecko的接口,可執行b2g檔。</font></font></td>
+ </tr>
+ <tr>
+ <td><b><font><font>userdata.img</font></font></b></td>
+ <td>
+ <p><font><font>使用者的</font></font><font><font>Gecko profile</font></font><font><font>以及Gaia網頁應用程式。</font></font></p>
+ </td>
+ </tr>
+ <tr>
+ <td><b><font><font>recovery.img</font></font></b></td>
+ <td><font><font>Linux核心和根<font><font>檔案系統</font></font>映像檔,另外還有簡單的工具,好讓使用戶能夠從問題中<font><font>修復</font></font>。</font></font></td>
+ </tr>
+ </tbody>
+</table>
+<p><font><font>一旦四個映像檔產生好後,它們可以被轉移到一個裝置。</font></font></p>
+<p><font><font>Firefox OS是建立在Android開源專案上(Android Open Source Project, AOSP)。</font><font>AOSP的</font></font><code><font><font>ADB</font></font></code><font><font>和</font></font><code><font><font>fastboot工具</font></font></code><font><font>提供了十分好用的方法來存取和操作設備。</font></font><font><font>值得一提的是</font></font><font><font><code>adb reboot-bootloader命令</code></font></font><font><font>可以讓已經</font></font><font><font>連接上的裝置重開機,並且暫停至bootloader早期階段,在這個早期階段中可以下<code>fastboot flash $partition $image命令</code></font></font><font><font><code>,把映像檔複製到裝置之上</code>。</font></font></p>
+<h3 id="開機映像檔(The_Boot_image)"><font><font>開機映像檔(The Boot image)</font></font></h3>
+<p><font><font>boot.img(開機映像檔)</font></font><font><font>包含Linux核心和初始根磁碟分區,boot.img</font></font><font><font>提供核心軟體工具和初始化腳本。為了效率考量,</font><font><font><font>初始根磁碟分區會</font></font>被複製到記憶體之中,因此被稱為“ramdisk”。boot.img</font><font>將被複製到設備上的“啟動”(boot)分區</font></font><code>,而在裝置的檔案系統運作時,<font><font>ramdisk的內容是可以在根目錄底下看見,比如說下adb shell指令</font></font></code><font><font>。</font></font></p>
+<p><font><font>boot.img還<font><font>在根目錄下的<code><font><font>default.prop</font></font></code>文<font><font><font><font>件</font></font></font></font>裡</font></font>建立了root用戶的權限</font></font><font><font>。</font></font></p>
+<p><font><font>另外也可以通過檔案<font><font>檢查</font></font>,分割<font><font>檔案</font></font>到核心和ramdisk映像檔,<font><font>修改從</font></font>ramdisk映像抓出來的內容,並重新組裝ramdisk映像檔,然後重新建置boot.img,這樣來修改現存的開機映像檔 。</font><font><font><font>例如請參考</font></font></font></font><font><font><a href="http://k.japko.eu/alcatel-otf-hackers-guide-1.html">Alcatel One Touch Fire Hacking (Mini)</a></font></font><font><font>指南。</font></font></p>
+<p><font><font>可以在安裝<font><font><font><font>開機映像檔</font></font></font></font>前測試<font><font><font><font>開機映像檔。</font></font></font></font></font></font>首先讓裝置開機後暫停於bootloader,然後下<code>fastboot boot /some/path/to/boot.img命令來開機進入尚未安裝的boot.img。</code></p>
+<h3 id="系統映像"><font><font>系統映像</font></font></h3>
+<p><font><font>系統映像檔(</font></font><code><font><font>system.img</font></font></code><font><font>)是Firefox OS的核心:</font></font></p>
+<ul>
+ <li><strong><font><font>Gonk</font></font></strong><font><font>:操作系統的底層元件</font></font></li>
+ <li><strong>Gecko</strong><font><font>:Firefox的HTML和JavaScript引擎</font></font></li>
+ <li><strong><font><font>B2G</font></font></strong><font><font>:操作系統核心運行程序。</font></font></li>
+</ul>
+<div class="note">
+ <p><font><font>有<font><font>關於平台架構的更多資訊,</font></font>請見</font></font><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform"><font><font>Firefox OS平台</font></font></a><font><font>指南。</font></font></p>
+</div>
+<p><font><font>system.img會被複製到system分區,而在檔案系統運作時會在/system/目錄底下。</font></font></p>
+<div class="note">
+ <p><strong><font><font>注</font></font></strong><font><font>:system.img提供了許多裝置會用到的二進位大型物件(BLOB),特別是RIL(Radio Interface Layer)的blob控制了設備上的蜂巢式行動網路(cellular radio network)。</font></font></p>
+</div>
+<h3 id="用戶資料映像檔"><font><font>用戶資料映像檔</font></font></h3>
+<p><font><font>用戶資料應像檔(</font></font><code><font><font>userdata.img</font></font></code><font><font>)提供了運行中載入的各種Gaia應用程式。</font></font></p>
+<p><font><font><code><font><font>userdata.img會被複製到裝置的userdata分區,然後檔案系統</font></font></code></font></font><font><font><code>運作時會在/data/目錄底下。值得一提的是</code></font></font><font><font><code>/data/b2g/目錄含有使用者的Gecko profile,而/data/local/webapps/目錄則含有使用者實際可以用的網頁應用程式</code></font></font><font><font>。</font></font></p>
+<h3 id="復原映像檔"><font><font>復原映像檔</font></font></h3>
+<p><font><font>復原映像檔(</font></font><code><font><font>recovery.img</font></font></code><font><font>)包含了和boot.img相同的核心和類似的ramdisk。</font><font>然而,<code><font><font>recovery.img</font></font></code>採用不同的初始化腳本,所以使用者</font></font><font><font>會被導引到另一個介面,這個介面會有可以透過裝置實體按鍵來操作的復原指令。</font></font></p>
+<p><font><font><code><font><font>recovery.img會被複製到recovery分區,檔案系統運作時並不會掛載復原映像檔。</font></font></code></font></font></p>
+<h2 id="構建過程:準備,設定,建置,安裝"><font><font>構建過程:準備,設定,建置,安裝</font></font></h2>
+<p><font><font>建置和安裝Firefox OS的整個過程包括四個步驟:</font></font></p>
+<table style="width: 90%; vertical-align: top; margin: 4px auto;">
+ <tbody>
+ <tr>
+ <td><b><font><font>準備</font></font></b></td>
+ <td><font><font>取得建置需要的程式和檔案,如正確的編譯器和函式庫。</font></font></td>
+ </tr>
+ <tr>
+ <td><b><font><font>配置</font></font></b></td>
+ <td><font><font>下載原始碼,並創建</font></font><code><font><font>.configure</font></font></code><font><font>檔定義環境變數</font></font>,例如路徑等。</td>
+ </tr>
+ <tr>
+ <td><b><font><font>建置</font></font></b></td>
+ <td>
+ <p><font><font>建置使用者</font></font><font><font>的Gaia個人檔案和Gaia網頁應用程式。</font></font></p>
+ </td>
+ </tr>
+ <tr>
+ <td><b><font><font>安裝</font></font></b></td>
+ <td><font><font>在設備上安裝檔案。</font></font></td>
+ </tr>
+ </tbody>
+</table>
+<p> </p>
+<h3 id="準備"><font><font>準備</font></font></h3>
+<p><font><font>一開始需要準備好<font><font>建置需要的程式和檔案,如正確的編譯器和函式庫</font></font>。</font></font></p>
+<p><font><font>這個步驟可以通過手動執行或使用腳本來完成。</font><font>詳情將在</font></font><font><font><a href="/en-US/Firefox_OS/Firefox_OS_build_prerequisites" title="火狐OS建立的先決條件"><font><font>建置Firefox </font></font></a>OS的先決條件</font></font><font><font>頁面<font><font>討論</font></font>。</font></font></p>
+<div class="note">
+ <p><strong><font><font>注</font></font></strong><font><font>:在UNIX和類UNIX的機器,</font></font><font><font>我們可以利用which指令,搭配需要的程式名稱當作變數,來檢查這些需要的工具是否存在。</font></font></p>
+</div>
+<h3 id="設定"><font><font>設定</font></font></h3>
+<p><font><font>接著我們需要複製一份Firefox OS(B2G)的原始碼,通常可以透過git從B2G專案那裡複製一份,另外我們也需要產生一份.config檔,這個檔案會定義建置用的變數。</font></font></p>
+<p><font><font>設定會執行</font></font><code><font><font>config.sh</font></font></code><font><font>腳本。</font><font>詳情請見</font></font><a href="/en-US/Firefox_OS/Preparing_for_your_first_B2G_build" title="準備進行首次B2G構建"><font><font>準備進行首次B2G建置</font></font></a><font><font>頁面。</font></font></p>
+<p><font><font>configure腳本需要一個參數,指定建置的裝置種類。</font><font>建置名稱是和CPU架構而非裝置相關的代碼<font><font>名稱,目前可取得的代碼名稱請見<a href="/en-US/Firefox_OS/Phones"><font><font>這裡</font></font></a>。</font></font></font></font></p>
+<p><font><font>設定步驟也將使用Android開源專案的repo</font></font><font><font>工具,來下載(或<font><font>更新)建置的原始碼到/repo/project目錄下。這個步驟會下載大量的</font></font></font></font><font><font>檔案並且花費不少時間。</font></font></p>
+<h3 id="建置"><font><font>建置</font></font></h3>
+<p><font><font>建置步驟實際上將編譯所有的原始碼,並且生成的映像檔。</font></font></p>
+<p><font><font>建置會執行</font></font><code><font><font>build.sh</font></font></code><font><font>腳本。</font><font>詳情請見</font></font><a href="/en-US/Firefox_OS/Building" title="建築"><font><font>建置Firefox OS</font></font></a><font><font>頁面。</font></font></p>
+<p><font><font>基本上建置十分單調,這個步驟就是從AOSP工具、到Linux核心、到Gaia網頁應用程式把一切都建置起來,而且有時候很不好判斷是那一個環節出錯導致</font></font><font><font>建置失敗。</font></font></p>
+<p><font><font>我們可以只建置全部的某一部份,例如執行建置腳本時只帶入gecko參數,就會只建置Gecko系統,相同地,只帶入gaia參數,就只會建置Gaia。這些分別建置的部份可以分別地</font></font><font><font>被安裝到裝置上。</font></font></p>
+<p><font><font>另外,也可以建置之前所討論的映像檔,例如建置系統映像檔可以這樣建置./build.sh out/platform/$target/system.img,其中$target參數和設定步驟中所提供的參數相同。</font></font></p>
+<h3 id="安裝"><font><font>安裝</font></font></h3>
+<p><font><font>安裝的步驟會將新編譯的程式碼放置到設備上。</font><font>這個步驟會執行</font></font><code><font><font>flash.sh</font></font></code><font><font>腳本。</font></font></p>
+<p><font><font>如果只要安裝那些在建置步驟中分別被建置的部份,我們可以通過在執行falsh.sh時多帶入一個參數,例如./falsj.sh gaia就只會安裝Gaia網頁應用程式。</font></font></p>
diff --git a/files/zh-tw/archive/b2g_os/building_and_installing_firefox_os/index.html b/files/zh-tw/archive/b2g_os/building_and_installing_firefox_os/index.html
new file mode 100644
index 0000000000..f01f67100c
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/building_and_installing_firefox_os/index.html
@@ -0,0 +1,65 @@
+---
+title: 建置並安裝 Firefox OS
+slug: Archive/B2G_OS/Building_and_installing_Firefox_OS
+translation_of: Archive/B2G_OS/Building_and_installing_B2G_OS
+---
+<p>由於 Firefox OS 現正積極開發中,而且仍處於預先發佈的階段。如果要確保自己安裝的是最新版本,最好能自己動手建置並安裝。透過此頁面所整理的文章,你可在模擬器或相容裝置上建置並安裝 Firefox OS,或於 Firefox 瀏覽器上安裝 <a href="https://developer.mozilla.org/en/Mozilla/Boot_to_Gecko/Introduction_to_Gaia" title="en/Mozilla/Boot_to_Gecko/Introduction_to_Gaia">Gaia</a> 使用者介面。</p>
+<p><nobr></nobr></p>
+<table class="topicpage-table">
+ <tbody>
+ <tr>
+ <td>
+ <h2 class="Documentation" id="取得並建置_Firefox_OS">取得並建置 Firefox OS</h2>
+ <dl>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites" title="Mozilla/Firefox_OS/Firefox OS build prerequisites">Firefox OS 必備建置條件</a></dt>
+ <dd>
+ 首次建置 Firefox OS 時的必要步驟。</dd>
+ <dt>
+ <a href="/en/Mozilla/Boot_to_Gecko/Preparing_for_your_first_B2G_build" title="/en/Mozilla/Boot_to_Gecko/Preparing for your first B2G build">準備首次建置 Firefox OS</a></dt>
+ <dd>
+ 在建置 Firefox OS 之前,必須先複製 Firefox OS 的 Repo 並完成細部設定。本篇文章將解釋相關細節。</dd>
+ <dt>
+ <a href="/en/Mozilla/Boot_to_Gecko/Building_Boot_to_Gecko" title="en/Mozilla/Boot_to_Gecko/Building Boot to Gecko">建置 Firefox OS</a></dt>
+ <dd>
+ 建置 Firefox OS 的方法。</dd>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Porting" title="/en-US/docs/Mozilla/Firefox_OS/Porting">匯入 Firefox OS</a></dt>
+ <dd>
+ 將 Firefox OS 匯入新裝置的相關資訊。</dd>
+ </dl>
+ <p><span class="alllinks"><a href="/en-US/docs/tag/B2G" title="Special:Tags?tag=B2G&amp;language=en">全部文章...</a></span></p>
+ </td>
+ <td>
+ <h2 class="Community" id="安裝_Firefox_OS_及或_Gaia">安裝 Firefox OS 及/或 Gaia</h2>
+ <dl>
+ <dt>
+ <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Choosing_how_to_run_Gaia_or_B2G" title="Mozilla/Firefox_OS/Choosing how to run Gaia or B2G">選擇 Gaia 或 Firefox OS 的執行方式</a></dt>
+ <dd>
+ 可於 Firefox 中執行 Gaia;亦可於行動裝置或桌面版模擬器中執行 Firefox OS。本篇指南將協助你根據自己需要,找出最適合的方式。</dd>
+ <dt>
+ <a href="/en/Mozilla/Boot_to_Gecko/Using_Gaia_in_Firefox" title="en/Mozilla/Boot_to_Gecko/Using Gaia in Firefox">在 Firefox 中執行 Gaia</a></dt>
+ <dd>
+ 於 Firefox 桌面版瀏覽器中執行 Gaia。</dd>
+ <dt>
+ <a href="/en/Mozilla/Boot_to_Gecko/Using_the_B2G_desktop_client" title="en/Mozilla/Boot_to_Gecko/Using_the_B2G_desktop_client">使用 Firefox OS 桌面用戶端</a></dt>
+ <dd>
+ 執行並使用 Firefox OS 桌面用戶端;即是在桌面版應用程式中模擬 Gaia 環境。相較於 Firefox 中執行 Gaia,此種方式雖然更精確,但仍不如模擬器所達的精確度。</dd>
+ <dt>
+ <a href="/en/Mozilla/Boot_to_Gecko/Using_the_B2G_emulators" title="en/Mozilla/Boot_to_Gecko/Using the B2G emulators">使用 Firefox OS 模擬器</a></dt>
+ <dd>
+ 本指南將說名 Firefox OS 模擬器的建置與使用方式,及使用何種模擬器的適當時機。</dd>
+ <dt>
+ <a href="/en/Mozilla/Boot_to_Gecko/Installing_Boot_to_Gecko_on_a_mobile_device" title="en/Mozilla/Boot_to_Gecko/Installing Boot to Gecko on a mobile device">於行動裝置上安裝 Firefox OS</a></dt>
+ <dd>
+ 在實際的行動裝置上安裝 Firefox OS。</dd>
+ <dt>
+ <a href="/en-US/docs/Mozilla/Boot_to_Gecko/Dual_boot_of_B2G_and_Android_on_SGS2" title="/en-US/docs/Mozilla/Boot_to_Gecko/Dual boot of B2G and Android on SGS2">在 SGS2 上的 Firefox OS 與 Android 雙重開機</a></dt>
+ <dd>
+ 於 Samsung Galaxy S2 上建立 Firefox OS/Android 雙重開機環境的方法。</dd>
+ </dl>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/choosing_how_to_run_gaia_or_b2g/index.html b/files/zh-tw/archive/b2g_os/choosing_how_to_run_gaia_or_b2g/index.html
new file mode 100644
index 0000000000..20566a839b
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/choosing_how_to_run_gaia_or_b2g/index.html
@@ -0,0 +1,59 @@
+---
+title: 選擇如何運作 Gaia 或 B2G
+slug: Archive/B2G_OS/Choosing_how_to_run_Gaia_or_B2G
+translation_of: Archive/B2G_OS/Choosing_how_to_run_Gaia_or_B2G
+---
+<p>根據各別的需求,當您以 Boot to GEcko 或是 <a href="/en/Mozilla/Boot_to_Gecko/Introduction_to_Gaia" title="en/Mozilla/Boot_to_Gecko/Introduction_to_Gaia">Gaia</a> 使用者介面時、您會思考各種選項及組合。您可以挑出接著列出的這些選項;每個選項都需要考慮其優缺點,有些會比其他的更具延展性。</p>
+<h2 id="在_Firefox_中運作_Gaia">在 Firefox 中運作 Gaia</h2>
+<p>如果您很清楚您在做什麼的話,您可以複製 <a class="link-https" href="https://github.com/mozilla-b2g/gaia" title="https://github.com/mozilla-b2g/gaia">Gaia 的 repository</a> 並且 <a href="/en/Mozilla/Boot_to_Gecko/Using_Gaia_in_Firefox" title="en/Mozilla/Boot_to_Gecko/Using_Gaia_in_Firefox">在 Firefox 15 或以上版本中運作 Gaia</a>.</p>
+<h3 id="優點">優點</h3>
+<ul>
+ <li>不必 build 任何東西,只需簡單的安裝。</li>
+ <li>可以使用 Firefox 內建的開發者工具來除錯。</li>
+</ul>
+<h3 id="缺點">缺點</h3>
+<ul>
+ <li>看到的範圍是基於瀏覽器的視窗大小,而不是行動裝置的螢幕大小。</li>
+ <li>很多硬體介面的功能無法使用。</li>
+ <li>應用程式在各自、釘著的分頁中運作,而不是主要的 UI 分頁。</li>
+ <li>如果您用 Firefox nightly 版本的話,它不一定很穩定。</li>
+</ul>
+<h3 id="為什麼要在_Firefox_中運作_Gaia">為什麼要在 Firefox 中運作 Gaia</h3>
+<p>有兩個很重要的理由會讓您不在行動裝置或模擬器、而是在 <a href="/en/Mozilla/Boot_to_Gecko/Using_Gaia_in_Firefox" title="en/Mozilla/Boot_to_Gecko/Using_Gaia_in_Firefox">Firefox 上運作 Gaia</a>;容易開始著手開發和運作、也可以使用 Firefox 中優秀的開發者工具。如同要了解 Gaia 的 hackers 一般,開發者一開始測試 apps 的 UI 和基本功能的時候會享受到這極大的好處。</p>
+<div class="note">
+ <strong>Note:</strong> 在開始配送 app 之前,您絕對會需要在實體的行動裝置上做測試。</div>
+<h2 id="在桌面環境中運作_B2G_模擬器">在桌面環境中運作 B2G (模擬器)</h2>
+<p>可以自己建置一個 Boot to Gecko 模擬器,並且在上面運作 Gaia。這個軟體雖然是以 Firefox 為基礎,但和行動裝置上的 Boot to Gecko 的行為非常類似。現在 Mozilla 提供 nightly 版本的模擬器給開發者,且這項工作在 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=744008" title="FIXED: Produce B2G builds for desktop operating systems.">bug 744008</a> 裡持續追蹤著。如果您熟悉建置 Firefox code-base 或是 C++ 專案的話,您可以 <a class="link-https" href="https://wiki.mozilla.org/Gaia/Hacking#Building_B2G" title="https://wiki.mozilla.org/Gaia/Hacking#Building_B2G">依循這些步驟</a> 自己建置這個應用程式。</p>
+<h3 id="優點_2">優點</h3>
+<ul>
+ <li>模擬器提供行動裝置大小的範圍。</li>
+ <li>大部分而言,使用模擬器的體驗是近似實際的行動裝置的。</li>
+ <li>可以使用更多行動裝置的 APIs (但不是全部)。</li>
+</ul>
+<h3 id="缺點_2">缺點</h3>
+<ul>
+ <li>您需要一個安裝好的 C/C++ 編譯環境。</li>
+ <li>您需要自己建置 Gecko 以及模擬器。</li>
+ <li>Firefox 開發者工具無法使用。</li>
+</ul>
+<h3 id="為什麼要運作_B2G_模擬器">為什麼要運作 B2G 模擬器</h3>
+<p>這是一個不錯且折衷的測試和開發解決方案。對於將您的 app 或是其他程式碼放在近似行動裝置的環境中、卻不用再每次測試時都燒進手機而言,是一個不錯的方案。</p>
+<div class="note">
+ <strong>Note:</strong> 在開始配送 app 之前,您絕對會需要在實體的行動裝置上做測試。</div>
+<h2 id="在行動裝置上運作_B2G">在行動裝置上運作 B2G</h2>
+<p>對於測試 B2G 或 Gaia 環境、或是您的 web app 而言,最徹底的方式是建置並將 Boot to Gecko 安裝在實體的行動裝置上。同時這也是最複雜的處理程序。</p>
+<h3 id="優點_3">優點</h3>
+<ul>
+ <li>您可以得到完整的行動裝置體驗。</li>
+ <li>所有的行動裝置 APIs 都可以使用。</li>
+ <li>您可以在實際操作行動裝置中,體驗您的程式的效能。</li>
+</ul>
+<h3 id="缺點_3">缺點</h3>
+<ul>
+ <li>您需要具備一個完整的 C/C++ 建置系統。</li>
+ <li>您需要自己編譯 Gecko 和 Gaia。</li>
+ <li>您需要一個相容的行動裝置來安裝 B2G 作業系統。</li>
+ <li>您需要把 B2G 燒到行動裝置上,同時移除掉原本在運作的作業系統。</li>
+</ul>
+<h3 id="為什麼要在行動裝置上運作_B2G">為什麼要在行動裝置上運作 B2G</h3>
+<p>對於在 B2G 或 Gaia 上測試任何程式或網頁專案而言,這毫無疑問地是最精準的方式。經由在實際的行動裝置硬體上執行,您可以確認您的專案表現及顯示都相當良好,並且都可以正確地使用所有的行動裝置 APIs。另外,在您開始配送任何程式之前,您應該一定要在實體行動裝置上測試;沒這樣做的話,一定會不幸地發生一些難以預測的影響。</p>
diff --git a/files/zh-tw/archive/b2g_os/debugging/index.html b/files/zh-tw/archive/b2g_os/debugging/index.html
new file mode 100644
index 0000000000..1084a2f201
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/debugging/index.html
@@ -0,0 +1,21 @@
+---
+title: 在 Boot to Gecko 上除錯
+slug: Archive/B2G_OS/Debugging
+translation_of: Archive/B2G_OS/Debugging
+---
+<p>基本上,在 B2G 有兩種除錯的方法。開發者可以在電腦上藉由 Firefox 15 以上的版本來 執行 <a href="/en/Mozilla/Boot_to_Gecko/Using_Gaia_in_Firefox" title="en/Mozilla/Boot_to_Gecko/Using_Gaia_in_Firefox">Gaia</a> (以及很多相容於 B2G 的 <a href="/en/Apps" title="en/Apps">web apps</a> )來進行高階的除錯。這樣會讓開發者可以利用 Firefox 裡面優秀的<a href="/en/Tools" title="en/Tools"> 開發工具 </a>開發工具來幫忙除錯,就像是在抓 web app 的 bug 一樣。</p>
+<p>開發者也可以在 gdb 除錯器的控制之下,使用自己的行動裝置來執行 B2G。</p>
+<h2 id="使用_Firefox_除錯_Gaia_和_web_apps">使用 Firefox 除錯 Gaia 和 web apps</h2>
+<p>&lt;快馬加鞭中,請耐心等待&gt;</p>
+<h2 id="使用_gdb_除錯_B2G">使用 gdb 除錯 B2G</h2>
+<p>用 gdb 來對 Boot to Gecko 除錯很簡單。只要用 <code>run-gdb.sh</code> 這個 script 指令,就會重新啟動 B2G 並在 gdb 的控制之下執行:</p>
+<pre>./run-gdb.sh
+</pre>
+<p>如果 B2G 已經在執行了,而現在只想要 attach,就要執行下面這個 script 指令:</p>
+<pre>./run-gdb.sh attach
+</pre>
+<h2 id="OOP">OOP</h2>
+<p>首先,用「MOZ_DEBUG_CHILD_PROCESS=1 ./run-gdb.sh」啟動 b2g,接著當啟動 OOP app 的時候,會顯示 plugin-container 的 PID。使用&lt;./run-gdb.sh attach PID&gt;啟動第二個 gdb instance。</p>
+<p>必須在很短的時間之內啟動除錯器的第二個 instance,且在啟動的短時間之內,就要按 c 繼續。</p>
+<h2 id="更多...">更多...</h2>
+<p>我們需要在這裡添加更多內容。</p>
diff --git a/files/zh-tw/archive/b2g_os/firefox_os_build_prerequisites/index.html b/files/zh-tw/archive/b2g_os/firefox_os_build_prerequisites/index.html
new file mode 100644
index 0000000000..dd2fd2efb5
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/firefox_os_build_prerequisites/index.html
@@ -0,0 +1,606 @@
+---
+title: Firefox OS build prerequisites
+slug: Archive/B2G_OS/Firefox_OS_build_prerequisites
+translation_of: Archive/B2G_OS/B2G_OS_build_prerequisites
+---
+<div class="summary">
+<p><span class="seoSummary">在您開始取得程式碼並建立您的Firefox OS作業系統以前,需要一個設定正確的編譯環境,請參考<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>這個頁面,裡面有詳細的說明。這裡簡單的提一下,您可以在64位元的Linux以及OS X上面作編譯。</span></p>
+</div>
+
+<div class="note">
+<p><strong>註</strong>: 若您計畫編譯一個Firefox OS並裝載在一隻手機上,請確認該手機在編譯動作開始時"並未"跟您的電腦連接,正確的連結時機會在詳細步驟中說明。</p>
+</div>
+
+<h2 id="支援的裝置或模擬器">支援的裝置或模擬器</h2>
+
+<p>您需要一個目標來裝載您建立的Firefox OS,他可以是一個真實的裝置或是一個模擬器。我們支援數種裝置但一個裝製常常有多種的版本,這樣的情況我們只支援特定的版本。另外不同的裝置我們的支援程度也稍有不同。</p>
+
+<div class="note">
+<p>註:Mozilla的<a href="https://github.com/mozilla-b2g/B2G">B2G source code</a>是一個B2G的參考實現,而手機製造商是可以自由的為他們的手機做出patch以及修改的。舉例來說,您在市場上購買的Alcatel One Touch這隻手機裡面的B2G就是一個製造商的版本。這樣B2G版本的差異安裝在上面的應用程式是沒有差異的,不過在平台這一層是有一些差別的。由於Nexus 4的版本是直接由Mozilla維護的,因此跟其他第三級支援裝置比較起來我們各版本的Gecko應該更能直接在Nexus 4上直接無問題的使用。</p>
+</div>
+
+<h3 id="第一級支援裝置">第一級支援裝置</h3>
+
+<p>第一級支援裝置是一些主要開發用的裝置,因此一般來說能得最快的新功能與新的bug fixes。</p>
+
+<dl>
+ <dt>Keon</dt>
+ <dd>Keon 即為 <a href="http://www.geeksphone.com/" title="http://www.geeksphone.com/">Geeksphone</a> Keon 裝置, 也是最初的開發機種中的一個。 請注意這個裝置上的Forefox OS是由 Geeksphone提供.</dd>
+ <dt>Inari</dt>
+ <dd>Inari 是另外一個測試裝置. 在您建立Firefox OS給ZTE Open的裝置時請使用這個configuration (configuration的細節後面會提到)。<strong>注意:</strong> 較新版本的Firefox版本可能會無法在ZTE Open手機的default boot partition中開機成功。</dd>
+ <dt>Flame</dt>
+ <dd>Flame 是 Mozilla 最新的 Firefox OS 標準參考開發裝置,除了Flame這隻手機以外,在您建立給 ZTE Open C 這個裝置的Firefox OS時請也在configuration 中選用Flame(configuration 的細節後面會提到)。 兩隻手機都用一樣的設定原因是他們都是基於 Android jellybean。</dd>
+ <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_emulators" title="en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_emulators">模擬器 (ARM 與 x86)</a></dt>
+ <dd>有兩種模擬器,一種是模擬ARM code,另外一種直接用x86 code執行所有的功能. 更多相關資訊請參考<a href="/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_emulators" title="/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_emulators">Learn more about installing and using the emulators</a>.</dd>
+ <dd><strong>請注意基本上您應該不要使用 x86 模擬器 — 這個模擬器安裝不易而且支援的程度不是很理想。</strong></dd>
+ <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_desktop_client" title="/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_desktop_client">桌面 client 程式</a></dt>
+ <dd>您也可以建立一個桌面版本的Firefox OS; 這個版本是讓 <a href="/en-US/docs/Mozilla/Gecko" title="/en-US/docs/Mozilla/Gecko">Gecko</a> 跑在一個 <a href="/en-US/docs/XULRunner" title="/en-US/docs/XULRunner">XULRunner</a> 程式裡面讓您可以使用 <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Introduction_to_Gaia" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Introduction_to_Gaia">Gaia</a> 提供的使用者界面.</dd>
+ <dt>Flatfish</dt>
+ <dd>Flatfist 是第一隻 Firefox OS 平板版本,雖然某些功能像是<a href="/zh-TW/docs/Web/Guide/Telephony">Web Telephony</a> 沒有辦法使用。在編譯 Flatfish 時,會需要一些<a href="https://github.com/flatfish-fox/flatfish-kernel">額外的設定</a>。</dd>
+</dl>
+
+<p>另外雖然可能很顯而易見,還是提一下您在建立 <a href="/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_desktop_client" title="en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_desktop_client">桌面 client 程式</a> 或任意一個 <a href="/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_emulators" title="en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_emulators">模擬器</a> 時是不需要手機的。</p>
+
+<h3 id="第二級支援裝置">第二級支援裝置</h3>
+
+<p><span id="answer_long1" style="display: block;">一般來說,Firefox的功能在第二級支援裝置上都是可用的,這一些裝置被許多開發者使用(特別是應用程式開發者),因此並不需要太過即時的得到Firefox OS上新的改變。</span></p>
+
+<dl>
+ <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Samsung_Nexus_S" title="/en-US/docs/Mozilla/Firefox_OS/Samsung_Nexus_S"><span class="link-https">Samsung Nexus S</span></a></dt>
+ <dd>已知的 Nexus S 支援型號為 GT-I9020A 以及 GT-I9023,其他的型號可能可以支援</dd>
+ <dt>Samsung Nexus S 4G</dt>
+ <dd>SPH-D720 這個型號被當作第二級的支援裝置</dd>
+</dl>
+
+<h3 id="第三級支援裝置">第三級支援裝置</h3>
+
+<p><span id="answer_long1" style="display: block;">給這一些裝置的Firefox OS是可以被建立的,不過工程師並不會時常用這一些裝置做開發,因此穩定度與功能上面會明顯的比前兩級的支援裝置要不足。</span></p>
+
+<dl>
+ <dt>Samsung Galaxy S2</dt>
+ <dd>只有i9100這個型號是被正式支援的。(i9100P 應該也可以支援因為差異只在 NFC 晶片)</dd>
+ <dt>Samsung Galaxy Nexus</dt>
+ <dd>現在看起來所有的型號都可以支援</dd>
+ <dt>Nexus 4</dt>
+ <dd>有一些在 IRC 上的使用者測試並成功過。 如果機器本身是 Android 4.4 也許需要降回 4.3 (Android <a href="https://developers.google.com/android/nexus/images#occamjwr66y">images available from Google</a>)</dd>
+ <dt>Nexus 5</dt>
+ <dd>一些在 IRC 上的使用者測試並成功過。</dd>
+ <dt>Tara</dt>
+ <dd>Tara 是另一之測試裝置. Tara 的 manifest 只在 master branch. 取得 Tara 的 script 為 "BRANCH=master ./config.sh tara"。</dd>
+ <dt>Unagi</dt>
+ <dd>Unagi 用來當作中低階智慧型手機的測試與開發裝置。很多 Firefox OS的開發者使用 Unagi 作開發。</dd>
+ <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Pandaboard" title="/en-US/docs/Mozilla/Firefox_OS/Pandaboard">Pandaboard</a></dt>
+ <dd>Pandaboard 是一片基於 OMAP 4 架構的開發板,作為在各種不同行動平台的開發使用。</dd>
+</dl>
+
+<div class="warning"><strong>重要</strong>: 只有基於 <strong>Android 4</strong> (aka <strong>Ice Cream Sandwich</strong>) 以上的裝置才被支援。若您手上的裝置是上面提到的其中之一但 Android 的版本比較舊,請務必在做任何動作前先將它升級。</div>
+
+<div class="note">
+<p><strong>註</strong>: 第二級與第三級支援裝置沒有硬體的 Home 按鈕,不過會有一個軟體的 Home 按鈕</p>
+
+<p>所有第一級支援裝置都有一個硬體的 Home 按鈕,這個按鈕可以讓使用者直接回到 Home screen。現在市面上大多數基於 ICS 的 Android 裝置使用在螢幕上的觸碰按鍵。我們現在提供一個虛擬的 Home 按鈕給這一些缺少硬體按鍵的裝置。若您發現這個虛擬的 Home 按鈕沒出現,請打開 Setting 程式,然後到<span style="font-size: 14px; line-height: 1.5em;"> <a href="/en-US/Firefox_OS/Debugging/Developer_settings">Developer settings</a> 並選取 <a href="/en-US/Firefox_OS/Debugging/Developer_settings#Enable_software_home_button">Enable software home button</a>。</span></p>
+
+<p><span style="font-size: 14px; line-height: 1.5em;">在 Firefox OS 1.4 版有另外一個 developer option 叫做 "Home gesture enabled"; 開啟這的選項表示虛擬的 Home 按鈕將消失,取而代之的是一個由螢幕下方向上滑動的手勢。</span></p>
+</div>
+
+<h2 id="使用_GNULinux_的需求">使用 GNU/Linux 的需求</h2>
+
+<div class="warning">
+<p><strong>重要</strong>: 即使您沒有要編譯自己的 Boot 2 Gecko,而只有要使用到<a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/make_options_reference"> Gaia's make system</a>,  您仍需要正確版本的 <strong>Python</strong> 與 <strong>Node.js</strong>。</p>
+</div>
+
+<p>在 Linux 建立 Firefox OS, 您需要:</p>
+
+<ul>
+ <li>一種 <strong>64 bit 的 GNU/Linux</strong> distribution (建議Ubuntu 14.04).</li>
+ <li>至少 <strong>4 GB</strong> 的記憶體.</li>
+ <li>至少 <strong>40 GB</strong> 的硬碟空間.</li>
+</ul>
+
+<p>這其實比最低需求要高不過常常在建立 Firefox OS 的過程出現問題只是因為資源不太夠。一個常見的例子為 "<span style="line-height: 1.5;"><strong>arm-linux-androideabi-g++: Internal error: Killed (program cc1plus)</strong>".</span></p>
+
+<p>下面列出個工具也必須被安裝:</p>
+
+<ul>
+ <li><strong>autoconf 2.13</strong></li>
+ <li><strong>bison</strong></li>
+ <li><strong>bzip2</strong></li>
+ <li><strong>ccache</strong></li>
+ <li><strong>curl</strong></li>
+ <li><strong>flex</strong></li>
+ <li><strong>gawk</strong></li>
+ <li><strong>git</strong></li>
+ <li><strong>gcc / g++ / g++-multilib</strong></li>
+ <li><strong>java sdk (jdk)</strong></li>
+ <li><strong>lzop</strong></li>
+ <li><strong>make</strong></li>
+ <li><strong>OpenGL shared libraries</strong></li>
+ <li><strong>patch</strong></li>
+ <li><strong>X11 headers</strong></li>
+ <li><strong>32-bit ncurses</strong></li>
+ <li><strong>32-bit zlib</strong></li>
+</ul>
+
+<h3 id="64_位元安裝需求">64 位元安裝需求</h3>
+
+<p>這個部份列出了一些在不同的Linux發行版本中你必須執行的指令, 以利於安裝所有的需求來建構 Firefox OS.</p>
+
+<h4 id="Ubuntu_12.04_Linux_Mint_13_Debian_6">Ubuntu 12.04 / Linux Mint 13 / Debian 6</h4>
+
+<p>在終端機中執行下列指令:</p>
+
+<pre class="language-html"><code class="language-html">sudo apt-get update
+sudo apt-get install autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib git ia32-libs lib32ncurses5-dev lib32z1-dev libasound-dev libgconf2-dev libgl1-mesa-dev libx11-dev lzop make zip</code></pre>
+
+<p>如果您將建構 <a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide/Flame">"Flame"</a> reference device 或是 Nexus 5, 請在終端機執行以下指令:</p>
+
+<pre>sudo apt-get install libxml2-utils </pre>
+
+<p>您可以透過<a href="http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html">這個ppa</a>來安裝 jdk。</p>
+
+<p>And see the above comments about emulator build issues!</p>
+
+<h4 id="Ubuntu_12.10_Debian_7">Ubuntu 12.10 / Debian 7</h4>
+
+<p>在終端機中執行下列指令:</p>
+
+<pre>sudo apt-get install autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib gcc-4.6 g++-4.6 g++-4.6-multilib git ia32-libs lib32ncurses5-dev lib32z1-dev libgl1-mesa-dev libx11-dev make zip</pre>
+
+<p>In addition to the emulator build issues discussed above, the compiler will default to <code>gcc-4.7</code>, which will fail to build with an error along the following lines:</p>
+
+<p>"<code>KeyedVector.h:193:31: error: indexOfKey was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation"</code></p>
+
+<p>To fix this, you will need to specify GCC 4.6 as the default host compiler after having retrieved the B2G sources: Read <a href="/en-US/docs/Mozilla/Firefox_OS/Customization_with_the_.userconfig_file#Changing_the_default_host_compiler">Changing the default host compiler</a> to find out how to do it.</p>
+
+<p class="note">In a fresh Ubuntu 12.10 install, you'll get an error about unmet dependencies for ia32-libs. The following commands fix it:</p>
+
+<pre>sudo dpkg --add-architecture i386
+sudo apt-get update
+sudo apt-get install ia32-libs</pre>
+
+<h4 id="Ubuntu_13.04">Ubuntu 13.04</h4>
+
+<p>Run the following command in Terminal:</p>
+
+<pre>sudo apt-get install --no-install-recommends autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib gcc-4.6 g++-4.6 g++-4.6-multilib git ia32-libs lib32ncurses5-dev lib32z1-dev zlib1g:amd64 zlib1g-dev:amd64 zlib1g:i386 zlib1g-dev:i386 libgl1-mesa-dev libx11-dev make zip</pre>
+
+<p>In addition to the emulator build issues discussed above, the compiler will default to <code>gcc-4.7</code>, which will fail to build with an error along the following lines:</p>
+
+<p>"<code>KeyedVector.h:193:31: error: indexOfKey was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation"</code></p>
+
+<p>To fix this, you will need to specify GCC 4.6 as the default host compiler after having retrieved the B2G sources: Read <a href="/en-US/docs/Mozilla/Firefox_OS/Customization_with_the_.userconfig_file#Changing_the_default_host_compiler">Changing the default host compiler</a> to find out how to do it.</p>
+
+<h4 id="Ubuntu_13.10">Ubuntu 13.10</h4>
+
+<p>With Ubuntu 13.10, multi-arch packages are now the main way to support multiple architectures (e.g. 32-bit on a 64-bit install).  You must tell your Ubuntu system that you want to support 32-bit packages as well:<br>
+  </p>
+
+<pre>sudo dpkg --add-architecture i386
+sudo apt-get update</pre>
+
+<p>Once you've completed that, then you can install the necessary packages:</p>
+
+<pre style="font-family: 'Open Sans', sans-serif; line-height: 21px;">sudo apt-get install --no-install-recommends autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib gcc-4.6 g++-4.6 g++-4.6-multilib git lib32ncurses5-dev lib32z1-dev zlib1g:amd64 zlib1g-dev:amd64 zlib1g:i386 zlib1g-dev:i386 libgl1-mesa-dev libx11-dev make zip libxml2-utils
+
+sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 1
+
+sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 2
+
+sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 1
+
+sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 2
+
+sudo update-alternatives --set gcc "/usr/bin/gcc-4.6"
+
+sudo update-alternatives --set g++ "/usr/bin/g++-4.6" </pre>
+
+<h4 id="Ubuntu_14.04">Ubuntu 14.04</h4>
+
+<p>Follow the instructions given for Ubuntu 13.10.</p>
+
+<h4 id="Fedora_17181920">Fedora 17/18/19/20</h4>
+
+<p>Run the following command in Terminal:</p>
+
+<pre class="note">sudo yum install autoconf213 bison bzip2 ccache curl flex gawk gcc-c++ git glibc-devel glibc-static libstdc++-static libX11-devel make mesa-libGL-devel ncurses-devel patch zlib-devel ncurses-devel.i686 readline-devel.i686 zlib-devel.i686 libX11-devel.i686 mesa-libGL-devel.i686 glibc-devel.i686 libstdc++.i686 libXrandr.i686 zip perl-Digest-SHA wget</pre>
+
+<p>In addition to the above you will need GCC 4.6.x in order to compile the project:</p>
+
+<ul>
+ <li><a href="http://people.mozilla.org/~gsvelto/gcc-4.6.4-fc18.tar.xz">Pre-compiled GCC 4.6.x for  Fedora 17/18</a></li>
+ <li><a href="http://people.mozilla.org/~gsvelto/gcc-4.6.4-fc19.tar.xz">Pre-compiled GCC 4.6.x for Fedora 19/20</a></li>
+</ul>
+
+<p>Download the right version for your Fedora installation, then install it to <code>/opt,</code> with the following command on Fedora 17/18:</p>
+
+<pre class="note">curl -O http://people.mozilla.org/~gsvelto/gcc-4.6.4-fc18.tar.xz
+sudo tar -x -a -C /opt -f gcc-4.6.4-fc18.tar.xz
+</pre>
+
+<p>And with the following command for Fedora 19/20:</p>
+
+<pre class="note">curl -O http://people.mozilla.org/~gsvelto/gcc-4.6.4-fc19.tar.xz
+sudo tar -x -a -C /opt -f gcc-4.6.4-fc19.tar.xz
+</pre>
+
+<p>You will need to specify GCC 4.6.x as the default host compiler after having retrieved the B2G sources: Read <a href="/en-US/docs/Mozilla/Firefox_OS/Customization_with_the_.userconfig_file#Changing_the_default_host_compiler">Changing the default host compiler</a> to find out how to do it.</p>
+
+<p>If build fails with the compiler complaining about not finding libmpc.so.2, install the package compat-libmpc</p>
+
+<h4 id="Arch_Linux"><strong>Arch Linux</strong></h4>
+
+<p>Run the following command in Terminal:</p>
+
+<pre class="note">sudo <span><span>pacman -S --needed </span></span><span><span>alsa-lib </span></span><span><span>autoconf2.13</span></span><span><span> bison</span></span><span><span> ccache</span></span><span><span> </span></span><span><span>curl firefox </span></span><span><span>flex </span></span><span><span>gcc-multilib </span></span><span><span>git </span></span><span><span>gperf </span></span><span><span>libnotify </span></span><span><span>libxt </span></span><span><span>libx11 mesa multilib-devel </span></span><span><span>wget wireless_tools </span></span><span><span>yasm</span></span><span><span> zip </span></span><span><span>lib32-mesa </span></span>lib32-mesa-libgl <span><span>lib32-ncurses lib32-readline</span></span><span><span> </span></span><span><span>lib32-zlib</span></span></pre>
+
+<p>To install the lib32-* packages you need to have the multilib repository enabled.</p>
+
+<p>B2G <a href="https://developer.mozilla.org/en-US/Firefox_OS/Building#KeyedVector.h.3A193.3A31.3A_error.3A_indexOfKey_was_not_declared_in_this_scope">can only be compiled with gcc4.6.4</a>, and because Arch Linux always has bleeding edge software you will need to install <a href="https://aur.archlinux.org/packages/gcc46-multilib">gcc46-multilib from AUR</a>. Note that you will have to edit the PKGBUILD and add <code>staticlibs</code> to the <code>options</code> array, or gcc will be unable to compile B2G and give you a <code>cannot find -lgcc</code> error when compiling. You will also need to add the following to your <code>.userconfig</code> file:</p>
+
+<pre class="language-html">export CC=gcc-4.6.4
+export CXX=g++-4.6.4</pre>
+
+<p>By default, Arch Linux uses Python3. You'll have to force it to use the old python2. You can do that by linking the python2 executable to python but this is discouraged and considered error-prone. This will also break python 3 if it is installed on your system. A better way is to use <code>virtualenv</code>/<code>virtualenvwrapper</code>:</p>
+
+<pre><span><span>sudo pacman -S python-virtualenvwrapper
+</span></span>source /usr/bin/virtualenvwrapper.sh
+mkvirtualenv -p `which python2` firefoxos
+workon firefoxos
+</pre>
+
+<p>Android will complain that you need make 3.81 or make 3.82 instead of 4.0. You can download <a href="https://aur.archlinux.org/packages/make-3.81/">make 3.81 from AUR</a>.  This will install the make-3.81 binary on your path, you need to create a symlink named make to a location earlier in the PATH variable for the build to use the correct version.</p>
+
+<pre>mkdir -p ~/bin
+ln -s `which make-3.81` ~/bin/make
+export PATH=~/bin:$PATH
+</pre>
+
+<p>Android also needs the Java6 SDK and Arch only has Java7.  Unfortunately the aur build is broken, but you can still download the <a href="http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR">Java 6 SDK</a> and install it manually.  You will then need to put it in your path.</p>
+
+<pre>cp ~/Downloads/jdk-6u45-linux-x64.bin /opt
+su
+cd /opt
+chmod +x jdk-6u45-linux-x64.bin
+./jdk-6u45-linux-x64.bin
+exit
+ln -s /opt/jdk1.6.0_45/bin/java ~/bin/java
+
+</pre>
+
+<h4 id="Gentoo_Linux"><strong>Gentoo Linux</strong></h4>
+
+<h5 id="Installing_ccache">Installing ccache</h5>
+
+<p>You will need to install <strong><a href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=3#doc_chap3">ccache</a></strong>, a tool for caching partial builds.</p>
+
+<pre><span><span># emerge -av ccache</span></span>
+</pre>
+
+<p>Because ccache is known to frequently cause support issues, Gentoo encourages you to use it <em>explicitly</em> and <em>sparingly</em>.</p>
+
+<p>To enable the required use of ccache, on <em>the subsequent step</em> of this guide where the <code>./build.sh</code> script is called, Gentoo users should instead run the command with an explicitly extended path, ie.</p>
+
+<pre><span><span><strong>PATH=/usr/lib64/ccache/bin:$PATH</strong> ./build.sh</span></span>
+</pre>
+
+<h5 id="Generating_Partition_Images">Generating Partition Images</h5>
+
+<p>If you are building B2G for actual physical hardware, then you may at some point also wish to generate some partition images for upload to your device. (For example, to restore backed up files to the device via the <strong><em>fastboot</em></strong> utility)</p>
+
+<p>The filesystem image format used in this case is YAFFS2 (Yet Another Filesystem 2). Gentoo has support for the very latest (ie. git HEAD) <code>yaffs2-utils</code> userland package in portage. (Note: You will also need kernel patches if you want to mount YAFFS2 images, but this is not really required since you can deconstruct and rebuild them instead.)</p>
+
+<pre># emerge --autounmask-write yaffs2-utils; etc-update; emerge -av yaffs2-utils</pre>
+
+<p>In order to generate such an image, simply change to the parent directory of the partition filesystem tree you wish to package, and issue a command like this:</p>
+
+<pre>mkyaffs2image system/ system.img</pre>
+
+<h2 id="使用_Mac_OS_X_的需求">使用 Mac OS X 的需求</h2>
+
+<p>要在Mac OS X 上建構 Firefox OS, 您必須遵循一些步驟, 以下將會詳細說明. 我們也會提出一些您可能在特殊情況下會遇到的錯誤, 以及他們的解決方法.</p>
+
+<div class="note">
+<p><strong>Note: Configuring and Building B2G for Keon WON'T WORK on a Mac</strong>. You'll need to use Linux to build B2G for this device.</p>
+</div>
+
+<h3 id="版本相容性"><strong>版本相容性</strong></h3>
+
+<p>XCode 4.2 以下的版本與 Mac OS X 10.9 (a.k.a. "Mavericks") 並不相容, 所以您可能會很驚訝地發現Firefox OS會建構錯誤. 基本上您無法在 Mac OS X 10.9 以上的版本建構 ICS emulator, 並且 flatfish 在XCode 5.x系列會無法建構.</p>
+
+<table class="standard-table">
+ <caption>Mac OS X 10.9.x 的版本相容性</caption>
+ <tbody>
+ <tr>
+ <td> </td>
+ <td>emulator (ICS)</td>
+ <td>flatfish (JB-4.2)</td>
+ <td>emulator-jb (JB-4.3)</td>
+ <td>emulator-kk (KitKat-4.4)</td>
+ </tr>
+ <tr>
+ <td>XCode 4.3.3</td>
+ <td style="text-align: center;">X</td>
+ <td style="text-align: center;">X</td>
+ <td style="text-align: center;">X</td>
+ <td style="text-align: center;">X</td>
+ </tr>
+ <tr>
+ <td>XCode 4.4.1</td>
+ <td style="text-align: center;">X</td>
+ <td style="text-align: center;">O[1]</td>
+ <td style="text-align: center;">O</td>
+ <td style="text-align: center;">O</td>
+ </tr>
+ <tr>
+ <td>XCode 4.5.2</td>
+ <td style="text-align: center;">X</td>
+ <td style="text-align: center;">O[1]</td>
+ <td style="text-align: center;">O</td>
+ <td style="text-align: center;">O</td>
+ </tr>
+ <tr>
+ <td>XCode 4.6.3</td>
+ <td style="text-align: center;">X</td>
+ <td style="text-align: center;">O[1]</td>
+ <td style="text-align: center;">O</td>
+ <td style="text-align: center;">O</td>
+ </tr>
+ <tr>
+ <td>XCode 5.0.2</td>
+ <td style="text-align: center;">X</td>
+ <td style="text-align: center;">X</td>
+ <td style="text-align: center;">O</td>
+ <td style="text-align: center;">O</td>
+ </tr>
+ <tr>
+ <td>XCode 5.1.1</td>
+ <td style="text-align: center;">X</td>
+ <td style="text-align: center;">X</td>
+ <td style="text-align: center;">O</td>
+ <td style="text-align: center;">O</td>
+ </tr>
+ </tbody>
+</table>
+
+<ol>
+ <li>您必須將設定環境變數 <strong>BUILD_MAC_SDK_EXPERIMENTAL=1</strong> 並將其 export  以建構 flatfish.</li>
+</ol>
+
+<h3 id="安裝_XCode_Command_Line_Utilities"><strong>安裝 XCode Command Line Utilities</strong></h3>
+
+<p>您必須安裝 Xcode's Command Line Utilities. 您可以只下載 Command Line Utilities, 只需要在 <a href="https://developer.apple.com/downloads/" title="https://developer.apple.com/downloads/">Apple's developer downloads page</a> 挑選您的 OS X 版本, 然而如果您想要完整的 Xcode suite, 你可以在 Mac App Store <a href="http://itunes.apple.com/us/app/xcode/id497799835?mt=12">安裝</a>他們<span style="line-height: 1.572;">. </span></p>
+
+<p>Xcode 4.3.1 (OS X 10.7 "Lion") 以及其他較新的版本如 4.4.1+ (也就是 Mac OS X 10.8 "Mountain Lion"), 並不會自動包含我們所需的 Command Line Utilities. 當您安裝 Xcode 時, 請確認進入 Preferences, then the Downloads panel, and install the Command Line Utilities. 另外, 請確認您至少有 20 GB 的硬碟空間.</p>
+
+<p><img alt="Screenshot of Xcode Downloads Command Line Tools" src="/files/4557/xcode_downloads_command_line_tools.png" style="height: 528px; width: 750px;"></p>
+
+<div class="note">
+<p><strong>Note:</strong> The Firefox OS 模擬器 需要 Core 2 Duo processor 或較新的處理器; 也就是, 一個相容於Mac OS X 10.7 "Lion"的作業系統. 您的作業系統不一定要是OS X Lion, 您只需要與其相容. 也就是您當然可以建構Firefox OS 在較舊版本的Mac 上.</p>
+</div>
+
+<div class="note">
+<p><strong>Note:</strong> XCode 4.2.x or older is not compatible with Mac OS X 10.9 or above, and XCode 4.3.x has no platform SDK for 10.8. Please install a newer version. If you're also working on flatfish, please make sure any of XCode 4.4, 4.5, and 4.6 is available.</p>
+</div>
+
+<h3 id="Run_Firefox_OS_Mac_Bootstrap">Run Firefox OS Mac Bootstrap</h3>
+
+<p>Next, open a terminal and run the following command:</p>
+
+<pre class="brush: bash">curl -fsSL https://raw.github.com/mozilla-b2g/B2G/master/scripts/bootstrap-mac.sh | bash</pre>
+
+<p>This will pull and run a bootstrap script that makes sure you have all the prerequisites met to build the emulator. It will also prompt you for permission to install anything you're missing, and provide warnings and suggested fixes to problems. The script will check for and install the following items:</p>
+
+<ul>
+ <li><code>git</code></li>
+ <li><code>gpg</code></li>
+ <li><code>ccache</code></li>
+ <li><code>yasm</code></li>
+ <li><code>autoconf-213</code></li>
+ <li><code>gcc-4.6</code></li>
+ <li><code>gnu-tar</code></li>
+ <li><code>homebrew</code></li>
+</ul>
+
+<h4 id="Xcode_wrangling">Xcode wrangling</h4>
+
+<p>If you have already upgraded to Xcode 4.4+ and get the message that Xcode is outdated, check the Xcode path with:</p>
+
+<pre>xcode-select -print-path</pre>
+
+<p>If it still points to <code>/Developer</code> you can update the path with:</p>
+
+<pre>sudo xcode-select -switch /Applications/Xcode.app</pre>
+
+<h4 id="Making_the_Mac_OS_X_10.6_SDK_available">Making the Mac OS X 10.6 SDK available</h4>
+
+<p>You also need to have the Mac OS X 10.6 SDK available. The SDK needs to be available at</p>
+
+<pre>/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/</pre>
+
+<p>If it cannot be found there you will need to extract and copy it from Xcode 4.3. To do this:</p>
+
+<ol>
+ <li>Download the XCode 4.3 .dmg file from the <a class="external" href="https://developer.apple.com/downloads/index.action">Apple Developer</a> portal (you'll need an <a href="https://developer.apple.com/register/index.action" title="https://developer.apple.com/register/index.action">Apple Developer account</a>).</li>
+ <li>Download the utility <a href="http://www.charlessoft.com/" title="http://www.charlessoft.com/">Pacifist</a> and use it to extract the 10.6 SDK from the XCode 4.3 .dmg file. Click on the "Extract Package" button, find the SDK by searching for 10.6 in the search box, then <em>Ctrl + click</em> on the MacOSX10.6.sdk directory and Extract it to a suitable location.</li>
+ <li>Add a symlink from the 10.6 SDK location to the <code>/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/</code> directory. For example, if you put the 10.6 SDK on your desktop, the comment would be</li>
+</ol>
+
+<pre>ln -s /Users/<em>&lt;yourusername&gt;</em>/Desktop/MacOSX10.6.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/</pre>
+
+<div class="note">
+<p><strong>Note:</strong> This is not necessary for Mac OS X 10.9 or above, because 10.6 SDK is for ICS and ICS doesn't supports Mac OS X 10.9.</p>
+</div>
+
+<h3 id="Be_aware_of_Mac_file_system_case_sensitivity">Be aware of Mac file system case sensitivity</h3>
+
+<p>By default, Mac OS X ships with a case-insensitive file system.  This is problematic because the Linux kernel has a number of files with the same name, but different case.  For example, see the header files <code>xt_CONNMARK.h</code> and <code>xt_connmark.h</code>.  This results in a number of files appearing to be modified in <code>/kernel</code> after a fresh <code>./config.sh</code>.</p>
+
+<p>In many cases you can run the build just fine; for some platforms, however, you may encounter the following error:</p>
+
+<pre><span class="quote">ERROR: You have uncommited changes in kernel
+You may force overwriting these changes
+with |source build/envsetup.sh force|
+
+ERROR: Patching of kernel/ failed.</span></pre>
+
+<p><span class="quote">Please see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=867259" title="https://bugzilla.mozilla.org/show_bug.cgi?id=867259">bug 867259</a></span> for more discussion and possible fixes for this problem.</p>
+
+<p>Alternatively, it will always be safest to build on a case sensitive file system.  The easiest way to do this is to create a separate, mountable disk image with case-sensitivity enabled.  You can do this using Apple's Disk Utility application or from the command line:</p>
+
+<pre>hdiutil create -volname 'firefoxos' -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/firefoxos.sparseimage</pre>
+
+<p>Mount the drive with:</p>
+
+<pre>open ~/firefoxos.sparseimage</pre>
+
+<p>Change into the mounted drive with:</p>
+
+<pre>cd /Volumes/firefoxos/</pre>
+
+<p>You can then check out the code and compile from this location without worrying about case-sensitivity problems.</p>
+
+<h3 id="Mountain_Lion_homebrew_gotcha">Mountain Lion homebrew gotcha</h3>
+
+<div>
+<div>If you are on Mountain Lion and you receive an error during the installation of the dependencies via homebrew, such as:</div>
+</div>
+
+<div>
+<pre>clang: error: unable to execute command: Segmentation fault: 11</pre>
+... try reinstalling the dependency manually adding the <code>--use-gcc</code> flag, for example:
+
+<pre>brew install mpfr --use-gcc</pre>
+</div>
+
+<h3 id="Follow_Samsung_Galaxy_S2_extra_steps">Follow Samsung Galaxy S2 extra steps</h3>
+
+<p>If you plan to build for the Samsung Galaxy S2, you will also need to install heimdall. See {{ anch("Installing heimdall") }} for details. This is <strong>not</strong> done for you by the bootstrap script!</p>
+
+<div class="note"><strong>Note:</strong> If you have installed the <a class="external" href="http://www.samsung.com/us/kies/" title="http://www.samsung.com/us/kies/">Samsung Kies</a> tool, which is used to manage the contents of many Samsung phones, you will have to remove it before you can flash Firefox OS onto your device. You can use the standard application removal process on Windows; on Mac, the Kies install disk image has a utility to fully remove Kies from your system. Flashing <strong>will not work</strong> if you have Kies installed. If you forget to remove Kies, the build system will detect it and remind you to uninstall it. Note also that the uninstall tool does not correctly remove the folder <code>~/Library/Application Support/.FUS</code>, and leaves a reference to a utility there in your user startup items list. You will want to remove these manually.</div>
+
+<h3 class="note" id="Fix_libmpc_dependency_if_broken">Fix libmpc dependency if broken</h3>
+
+<p><code>gcc 4.6</code> was built with <code>libmpc 0.9</code>; if you then use homebrew to update packages, libmpc gets updated to version 1.0, but homebrew doesn't rebuild <code>gcc 4.6</code> after the library version changes. So you need to create a symlink to make things work again, like this:</p>
+
+<pre>cd /usr/local/lib/
+ln -s libmpc.3.dylib libmpc.2.dylib</pre>
+
+<h3 id="Optional_Install_HAX">Optional: Install HAX</h3>
+
+<p>Intel provides a special driver that lets the B2G emulator run its code natively on your Mac instead of being emulated, when you're using the x86 emulator. If you wish to use this, you can <a class="external" href="http://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager/" title="http://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager/">download and install</a> it. It's not required, but it can improve emulation performance and stability.  </p>
+
+<p>Before you install HAX you will need to install the <a href="http://developer.android.com/sdk/index.html" title="http://developer.android.com/sdk/index.html">Android SDK</a>.</p>
+
+<h2 class="note" id="Install_adb">Install adb</h2>
+
+<p>The build process needs to pull binary blobs from the Android installation on the phone before building B2G (unless you're building the emulator, of course).  For this, you will need <code>adb</code>, the Android Debug Bridge. Our <a href="/en-US/Firefox_OS/Debugging/Installing_ADB">Installing ADB</a> article explains how to get <code>adb</code> installed.</p>
+
+<div class="warning">
+<p>Note for future when you start to use adb: adb needs the phone's lock screen to be unlocked in order to see your phone (at least in later versions of Firefox OS). You'll probably want to disable the lock screen (we'll get to how later in the build instructions).</p>
+</div>
+
+<h2 class="note" id="Install_heimdall">Install heimdall</h2>
+
+<p>Heimdall is a utility for flashing the Samsung Galaxy S2. It's used by the Boot to Gecko flash utility to replace the contents of the phone with Firefox OS, as well as to flash updated versions of B2G and Gaia onto the device. You'll need it if you want to install Firefox OS on a Galaxy S2; it is <strong>not</strong> needed for any other device. For other devices, we build and use the fastboot utility instead.</p>
+
+<div class="note"><strong>Note:</strong> Again, it's important to note that this is <strong>only required for installing Firefox OS on the Samsung Galaxy S2</strong>.</div>
+
+<p>There are two ways to install heimdall:</p>
+
+<ul>
+ <li>You can <a class="link-https" href="https://github.com/Benjamin-Dobell/Heimdall" title="https://github.com/Benjamin-Dobell/Heimdall">download the code</a> GitHub and build it yourself.</li>
+ <li>Use a package manager to install it.
+ <ul>
+ <li>On Linux: <code>sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev</code></li>
+ <li>On Mac, you can <a class="link-https" href="https://github.com/downloads/Benjamin-Dobell/Heimdall/heimdall-suite-1.3.2-mac.dmg" title="https://github.com/downloads/Benjamin-Dobell/Heimdall/heimdall-suite-1.3.2-mac.dmg">download an installer package</a> and use that.</li>
+ </ul>
+ </li>
+</ul>
+
+<h2 id="Configure_ccache">Configure ccache</h2>
+
+<p>The B2G build process uses ccache. The default cache size for ccache is 1GB, but the B2G build easily saturates this; around 3GB is recommended. You can configure your cache by running the following command inside terminal:</p>
+
+<pre><code>$ ccache --max-size 3GB</code></pre>
+
+<h2 id="For_Linux_configure_the_udev_rule_for_your_phone">For Linux: configure the udev rule for your phone</h2>
+
+<div class="note">
+<p><strong>Note</strong>: This section is specific to Linux; Mac OS X has the necessary device permissions set up already.</p>
+</div>
+
+<p>Next, you need to confingure the udev rule for your phone,</p>
+
+<p>You can get the <a href="https://developer.android.com/tools/device.html#VendorIds">USB vendor ID</a> by running <code>lsusb</code> with your phone plugged in, but typically it's Google <code>18d1,</code> Samsung <code>04e8</code>, ZTE <code>19d2</code>, Geeksphone/Qualcomm <code>05c6</code>. Add this line in your <code>/etc/udev/rules.d/android.rules</code> file (replacing <code>XXXX</code> with the ID for your device):</p>
+
+<h2 id="相容的">相容的</h2>
+
+<pre>SUBSYSTEM=="usb", ATTR{idVendor}=="XXXX", MODE="0666", GROUP="plugdev"</pre>
+
+<p>Take ZTE for example, the content in android.rules will be</p>
+
+<pre style="font-size: 14px;">SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", GROUP="plugdev"</pre>
+
+<div class="note">
+<p><span style="line-height: 1.572;">If the file doesn't exist, create it. The <code>rules.d</code> directory is usually read only by default, so you may have to use <code>chmod</code> to make the directory writeable, or the file, or both.</span></p>
+</div>
+
+<p><span style="line-height: 1.572;">Once you've saved the file, and closed it,  make the file readable:</span></p>
+
+<pre>sudo chmod a+r /etc/udev/rules.d/android.rules
+</pre>
+
+<p>Now that the udev rules have been updated, restart the udev daemon.</p>
+
+<p><strong>Ubuntu</strong></p>
+
+<pre>sudo service udev restart</pre>
+
+<p><strong>Fedora 20</strong></p>
+
+<pre>sudo systemctl restart systemd-udevd.service</pre>
+
+<p>Finally, unplug and the USB cable but don't replug it in because we need to enable remote debugging on the phone first.</p>
+
+<h2 id="Enable_remote_debugging">Enable remote debugging</h2>
+
+<p>Before you plug your phone back into your USB port, put it USB developer mode. This allows you to debug and flash the phone. To enable developer mode, on your phone enable <a href="/en-US/Firefox_OS/Debugging/Developer_settings#Remote_debugging">Remote Debugging</a> in <a href="/en-US/Firefox_OS/Debugging/Developer_settings">Developer settings</a> (this was called Developer mode on older versions.) Once the option is checked, remote debugging is enabled, and you are ready to go.</p>
+
+<p>At this point, connect your phone to your computer via a USB cable (if you created the udev rule before, this will trigger udev to detect the phone and create the device node with the right permissions). Now you can check if you can list your device via the <code>adb devices</code> command (remember that adb can only see your phone when the lock screen is unlocked). If everything has worked ok, you should see an output similar to this (the following is for a Geeksphone Keon):</p>
+
+<pre style="font-size: 14px;">$ adb devices
+List of devices attached
+full_keon device</pre>
+
+<p>If the device did not list as expect, check the file name and the script are all correct (see previous section), then restart the computer and retype the command again. Note also that if your device uses fastboot, the bootloader may identify itself with a different vendor ID than the one you see when the device boots normally.</p>
+
+<h2 id="Backup_the_phone_system_partition">Backup the phone system partition</h2>
+
+<div class="note">
+<p><strong>Note</strong>: You have to do this before you build your device if you do not have an existing system backup, because some libraries will be referenced in build time. These library might be proprietary so we can't provide in our code base.</p>
+</div>
+
+<p>It is recommended that you back up the entire Android system partition on your phone.</p>
+
+<p>You can use this copy of the binary blobs for Android in case you later delete your B2G tree. To do this, run:</p>
+
+<pre>adb pull /system &lt;backup target dir&gt;/system
+</pre>
+
+<p> Depending on the phone, you may also need to pull the <code>/data</code> and/or <code>/vendor</code> directories:</p>
+
+<pre>adb pull /data &lt;backup target dir&gt;/data
+adb pull /vendor &lt;backup target dir&gt;/vendor
+</pre>
+
+<p>If the pull commands fail with an "insufficient permission" message, try the following:</p>
+
+<ul>
+ <li>stop and restart the adb server, or if that fails,</li>
+ <li>double-check that you have granted root permissions to the <code>adb</code> tool within your custom ROM (e.g. under CyanogenMod, change <em>Settings &gt; System &gt; Developer Options &gt; Root Access</em> to <em>Apps and ADB</em> or <em>ADB only</em>).</li>
+ <li>Verify that you have set up the udev rule correctly (see {{ anch("For Linux: configure the udev rule for your phone") }}.</li>
+</ul>
+
+<h2 id="On_to_the_next_step">On to the next step</h2>
+
+<p>At this point, you should be ready to <a href="/en-US/docs/Mozilla/Firefox_OS/Preparing_for_your_first_B2G_build" title="en-US/docs/Mozilla/Firefox_OS/Preparing_for_your_first_B2G_build">fetch the Firefox OS code</a>!</p>
diff --git a/files/zh-tw/archive/b2g_os/index.html b/files/zh-tw/archive/b2g_os/index.html
new file mode 100644
index 0000000000..7c258aaeea
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/index.html
@@ -0,0 +1,222 @@
+---
+title: B2G OS
+slug: Archive/B2G_OS
+translation_of: Archive/B2G_OS
+---
+<div class="summary">
+<p><span class="seoSummary">由 Mozilla 所開發的 Firefox OS 全新行動作業系統,即是以 Linux 與 Firefox 的核心 (Gecko 引擎) 為其架構。</span></p>
+</div>
+
+<div class="column-container zone-callout">
+<p>開放源碼的<strong> Firefox OS</strong> 不受任何專利技術的限制,同樣能讓 App 開發者享受 Web 的功能與靈活度,打造出絕佳的消費性 App。</p>
+
+<p>對 Web 開發者而言,首要應先理解「<strong>整個使用者介面就是 Web App</strong>」,且該 Web App 又能顯示並啟動其他的 Web App。不論是專為 Firefox OS 撰寫的 App,或是對使用者介面所進行的任何修正,都能算是以 HTML、CSS、JavaScript 所建構的 Web App,且亦能存取行動裝置的硬體和服務。</p>
+
+<p>從產品的角度來看,Firefox OS 即是 Mozilla 與其 OEM 夥伴,在 <strong>Boot to Gecko (B2G)</strong> 技術上所套用的品牌及支援服務。B2G 為作業系統在工程設計時所用的代號,即透過 Mozilla 與其廣大 Mozilla/開放源碼社群的貢獻者所開發。</p>
+</div>
+
+<section class="outer-apps-box" id="sect1">
+<h2 id="開發_Firefox_OS"><a href="https://developer.mozilla.org/en-US/Apps/Build/installable_apps_for_Firefox_OS">開發 Firefox OS</a></h2>
+
+<h2 id="專屬的_App">專屬的 App</h2>
+
+<p>此為我們的 App 中心,內含資訊可協助開發者撰寫 Open Web App,並安裝於 Firefox OS 之上。</p>
+</section>
+
+<div class="column-container">
+<div class="column-third">
+<h2 id="平台指南"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform">平台指南</a></h2>
+
+<p>平台開發者可了解 Firefox OS 平台的各個元件如何搭配及運作。</p>
+
+<ul>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia">Gaia</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Gonk" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Gonk">Gonk</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Gecko" title="/en-US/docs/Mozilla/Gecko">Gecko</a></li>
+</ul>
+</div>
+
+<div class="column-third">
+<h2 id="建構與安裝"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Build_and_install">建構與安裝</a></h2>
+
+<p>說明應如何於模擬器、相容裝置、桌機版模擬器上建構\安裝 Firefox OS。</p>
+
+<ul>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites" title="Mozilla/Firefox_OS/Firefox OS build prerequisites">Firefox OS 必要建構條件</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Preparing_for_your_first_B2G_build" title="Mozilla/Firefox_OS/Preparing for your first B2G build">準備第一次編譯</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Building" title="Mozilla/Firefox_OS/Building">建構 Firefox OS</a></li>
+</ul>
+</div>
+
+<div class="column-third">
+<h2 id="開發者手機"><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Developer_phone_guide">開發者手機</a></h2>
+
+<p>關於特定開發者手機的調整、更新、復原、購買等資訊。</p>
+
+<ul>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide/Flame">Flame</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Developer_phone_guide/Updating_and_Tweaking_Geeksphone">Geeksphone</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Developer_phone_guide/ZTE_OPEN">ZTE Open</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide/ZTE_OPEN_C">ZTE Open C</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Troubleshooting">疑難排解</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide/Phone_specs">手機與相關裝置的規格</a></li>
+</ul>
+</div>
+</div>
+
+<div class="column-container equalColumnHeights">
+<div class="zone-callout">
+<h2 id="Firefox_OS_書籍">Firefox OS 書籍</h2>
+
+<p>有許多已出版與編寫中的書籍,涵蓋了 Firefox OS 多樣的開發面相。可參閱 <a href="http://firefoxosbooks.org/">Firefox OS 書籍</a>。</p>
+</div>
+
+<div class="zone-callout">
+<h2 id="其他專頁"><strong>其他專頁</strong></h2>
+
+<ul>
+ <li><a href="https://www.mozilla.org/en-US/styleguide/products/firefox-os/"><span class="gmw_">Firefox OS <span class="gm-spell gm_ gm_d869ea80-e62d-d8a6-6929-a6e9983578ff">風格指南</span></span></a></li>
+ <li><a class="link-https" href="https://wiki.mozilla.org/B2G/FAQ" title="B2G/FAQ">Mozilla wiki FAQ</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Feature_support_chart" title="/en-US/docs/Mozilla/Firefox_OS/Feature_support_chart">支援功能表</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Geeksphone_FAQ" title="/en-US/docs/Mozilla/Firefox_OS/Geeksphone_FAQ">Geeksphone FAQ</a></li>
+</ul>
+</div>
+</div>
+
+<div class="note">
+<p><strong>注意:</strong>我們將透過〈<a href="https://developer.mozilla.org/en-US/docs/MDN/Doc_status/Firefox_OS">Firefox OS 說明文件狀態</a>〉頁面,持續更新 Firefox OS 相關文件。如果你也想貢獻 Firefox OS 說明文件,請參閱此頁面並看看有哪些需要調整的內容!</p>
+</div>
+
+<h2 id="Subnav">Subnav</h2>
+
+<ol>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Introduction">介紹</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform" title="Documentation about the Firefox OS platform, including Gonk, Gaia, and everything in between.">平台指南</a>
+ <ol>
+ <li><strong><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform">平台指南概述</a></strong></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Architecture" title="An overview of how Firefox OS is structured internally; this is primarily of interest to platform developers and people doing porting work.">架構概述</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Apps_architecture" title="An overview of the application model on Firefox OS.">App 架構</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Gonk" title="Documentation about Gonk, the operating system layer underneath Gaia. This consists of a Linux kernel and a hardware abstraction layer to which Gecko communicates."><span class="gm-spell gm_ gm_db111eae-c215-78a2-9789-97be921cbbdc">Gonk</span></a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Gecko" title="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.">Gecko</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Gaia" title="Documentation about Gaia, the user interface application for Firefox OS devices; this is a Web application running atop the Firefox OS software stack.">Gaia</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Gaia/Gaia_apps">Gaia App 指南</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Security" title="Documentation about security in Firefox OS">安全性</a>
+ <ol>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Security/Security_model">Firefox OS 安全模型</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Security/System_security">系統安全</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Security/Application_security">Firefox OS 中的 App 安全</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Security/Installing_and_updating_applications">安全的安裝\更新 App</a></li>
+ </ol>
+ </li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Out_of_memory_management_on_Firefox_OS">Firefox OS 記憶體耗盡時的管理 </a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Feature_support_chart" title="A chart of which features are available in which types of Firefox OS builds.">支援功能表</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Settings_list" title="A list of common setting names that can be used with the settings API">設定清單</a></li>
+ </ol>
+ </li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS" title="This includes documentation for building and installing the platform onto devices, as well as building the simulator and emulators.">建構並安裝</a>
+ <ol>
+ <li><strong><a href="https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS">建構與安裝概述</a></strong></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS/Firefox_OS_build_process_summary">Firefox OS 建構程序摘要</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Firefox_OS_build_prerequisites" title="Steps to take before you build Firefox OS for the first time.">必要建構條件</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Preparing_for_your_first_B2G_build" title="Before you can build Firefox OS, you need to clone the repository and configure your build.">準備第一次編譯</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Building" title="How to build Firefox OS.">建構 Firefox OS</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS/Building_Firefox_OS_for_flame_on_OSX">於 OSX 上為「Flame」建構適用的</a><a href="https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS/Building_Firefox_OS_for_flame_on_OSX"> Firefox OS</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Choosing_how_to_run_Gaia_or_B2G" title="Using Gaia within Firefox, running Firefox OS on a mobile device, or in a desktop-based simulator. Which is best?">選擇 Gaia 或 Firefox OS 的執行方式</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Building_the_B2G_desktop_client" title="Simulating the Gaia environment in a desktop application - more accurate than running Gaia in Firefox but not as accurate as the emulators.">建構 B2G 桌機用戶端</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Using_the_B2G_emulators" title="A guide to building and using the Firefox OS emulators, and when to use which emulator.">使用 Firefox OS 模擬器</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Installing_on_a_mobile_device" title="How to install Firefox OS on a real mobile device.">於行動裝置上安裝 Firefox OS</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS/Firefox_OS_update_packages">建構並套用 Firefox OS 更新封包</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Runtime_tools">執行環境 (Runtime) 工具</a></li>
+ </ol>
+ </li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Firefox_OS" title="Hack the OS, customize your builds, get things the way you think they should be!">開發 Firefox OS</a>
+ <ol>
+ <li><strong><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Firefox_OS">Firefox OS 開發概述</a></strong></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Firefox_OS/Filing_bugs_against_Firefox_OS">提報 Firefox OS 的錯誤</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Firefox_OS/modifying_hosts_file" title="A guide to what can be achieved by modifying the Firefox OS hosts file.">修改主機端的檔案</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Customization_with_the_.userconfig_file" title="How to customize the build and execution of Firefox OS by changing the .userconfig file.">以 .userconfig 檔案進行自訂</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Firefox_OS/Customizing_the_b2g.sh_script">自訂 b2g.sh 指令碼</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Firefox_OS/Porting" title="Information about how to port Firefox OS to new devices.">移植 Firefox OS</a></li>
+ </ol>
+ </li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia">開發 Gaia</a>
+ <ol>
+ <li><strong><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia">Gaia 開發概述</a></strong></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Running_the_Gaia_codebase">執行 Gaia 的 Codebase</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Understanding_the_Gaia_codebase">了解 Gaia 的 Codebase</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Making_Gaia_code_changes">更改 Gaia 程式碼</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Test_Gaia_code_changes">測試更改過的 Gaia 程式碼</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Submitting_a_Gaia_patch">提交 Gaia 修正檔</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Gaia/Build_System_Primer">Gaia 版本系統入門</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Customizing_build-time_apps">自訂「建構時間」App</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Market_customizations_guide">市場自訂指南</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Customizing_the_keyboard">自訂 Firefox OS App 中的鍵盤</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Localizing_Firefox_OS">本地化 Firefox OS</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/L10n_Best_Practices">本地化最佳實例</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/make_options_reference">「make」選擇參考</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Gaia_tools_reference">Gaia 工具參考</a></li>
+ </ol>
+ </li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Phone_guide" title="A developer's guide to the Firefox OS developer phones available.">Firefox OS 手機指南</a>
+ <ol>
+ <li><strong><a href="https://developer.mozilla.org/en-US/Firefox_OS/Phone_guide">Firefox OS 手機指南概述</a></strong></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide/Phone_specs">手機與相關裝置的規格</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide/Geeksphone">Geeksphone</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide/ZTE_OPEN">ZTE OPEN</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide/ZTE_OPEN_C">ZTE OPEN C</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide/Flame">Flame</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide/Firefox_OS_device_features">一般裝置功能</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Troubleshooting" title="A guide to resolving common problems with Firefox OS.">疑難排解</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide/Best_practices_open_reference_devices">開放參考裝置的最佳實例</a></li>
+ </ol>
+ </li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Releases" title="This section of the site contains release notes, explaining what new features and changes of significance to developers have landed in each new release of Gaia and Gecko on Firefox OS.">Firefox OS 版本說明</a>
+ <ol>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Releases">Firefox OS 版本說明概述</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Releases/2.1">Firefox OS 2.1 for developers</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Releases/2.0">Firefox OS 2.0 for developers</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Releases/1.4">Firefox OS 1.4 for developers</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Releases/1.3">Firefox OS 1.3 for developers</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Releases/1.2">Firefox OS 1.2 for developers</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Releases/1.1">Firefox OS 1.1 for developers</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Releases/1.0.1">Firefox OS 1.0.1 for developers</a></li>
+ </ol>
+ </li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing">自動化測試</a>
+ <ol>
+ <li><strong><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing">Firefox OS 自動化測試概述</a></strong></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Running_Tests_on_Firefox_OS_for_Developers">於 Firefox OS 執行測試作業:開發者指南</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/gaia-ui-tests" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/gaia-ui-tests">Gaia UI 測試</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/Gaia_integration_tests">Gaia 整合測試</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/Gaia_unit_tests" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/Gaia_unit_tests">Gaia 單元測試</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/Gaia_performance_tests">Gaia 效能測試</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/Mochitests" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/Mochitests"><span class="gm-spell gm_ gm_8ea2aeb5-60d9-d796-930f-2db1e4217eaa">Mochitests</span></a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/Reftests" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/Reftests"><span class="gm-spell gm_ gm_9567400a-e713-3d43-ffa9-05fd8c3a28a2">Reftests</span></a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Marionette/Marionette_JavaScript_Tests" title="/en-US/docs/Marionette/Marionette_JavaScript_Tests">WebAPI 測試</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/XPCShell" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/XPCShell"><span class="gmw_"><span class="gm-spell gm_ gm_cc093417-aacf-72e2-e15f-c15a7509a6a8">xpcshell</span> 測試</span></a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/endurance_tests" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/endurance_tests">耐久測試</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/MTBF_tests">MTBF 測試</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Marionette" title="/en-US/docs/Marionette">Marionette</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Treeherder">Treeherder</a></li>
+ <li><a class="external external-icon" href="https://wiki.mozilla.org/QA/Execution/Web_Testing/Automation/Jenkins">Jenkins</a></li>
+ </ol>
+ </li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Debugging" title="A guide to debugging both your mobile apps and Firefox OS itself.">除錯</a>
+ <ol>
+ <li><strong><a href="https://developer.mozilla.org/en-US/Firefox_OS/Debugging">Firefox OS 除錯概述</a></strong></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Developer_settings">Firefox OS 的開發者設定</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Connecting_a_Firefox_OS_device_to_the_desktop">將 Firefox OS 裝置連上桌機</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Setting_up">以 Firefox 開發者工具設定 Firefox OS 的除錯作業</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Debugging/On-device_console_logging">裝置上的 console 記錄</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Installing_ADB">安裝並使用 ADB</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Firefox_OS_usage_tips/taking_screenshots">螢幕截圖</a></li>
+ <li><a href="https://developer.mozilla.org/en_US/docs/Tools/WebIDE" title="A tool that allows you to install open web apps from your computer to a device capable of installing them (such as Firefox OS) - and debug any running app.">使用 WebIDE</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager">使用「應用程式管理員 (App Manager)」</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Firefox_OS_crash_reporting">Firefox OS 當機回報</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Debugging_OOMs">Firefox OS 記憶體耗盡的除錯</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Debugging_and_security_testing">Firefox OS 安全性測試與除錯</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Debugging_B2G_using_gdb"><span class="gmw_">使用 <span class="gm-spell gm_ gm_7a44a2c7-9d5d-e693-57b5-a88dd9adacd8">gdb 為 B2G 除錯</span></span></a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Debugging_B2G_using_valgrind">使用 Valgrind 為 B2G 除錯</a></li>
+ </ol>
+ </li>
+</ol>
diff --git a/files/zh-tw/archive/b2g_os/installing_boot_to_gecko_on_a_mobile_device/index.html b/files/zh-tw/archive/b2g_os/installing_boot_to_gecko_on_a_mobile_device/index.html
new file mode 100644
index 0000000000..7605d27e06
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/installing_boot_to_gecko_on_a_mobile_device/index.html
@@ -0,0 +1,53 @@
+---
+title: 將 Boot to Gecko 安裝於行動裝置
+slug: Archive/B2G_OS/Installing_Boot_to_Gecko_on_a_mobile_device
+translation_of: Archive/B2G_OS/Installing_on_a_mobile_device
+---
+<p>如果您編譯給行動裝置的 Boot to Gecko 之後,您就將他安裝在行動裝置上。這篇文章會引導您進行這個動作。</p>
+<div class="note">
+ <strong>Note:</strong> 第一次把 B2G 寫入手機時,手機必須安裝 Androidd 4.0 (Ice Cream Sandwich) 版本。否則這個動作就不會正常的運作。而一旦您完成第一次 B2G 的安裝之後,您就可以熟練的更新了。</div>
+<h2 id="燒錄手機">燒錄手機</h2>
+<p>您只要將您的手機連結到電腦上、並打下列指令,就可以燒任何東西到手機上:</p>
+<pre>./flash.sh
+</pre>
+<p>就這樣。您編譯好的 B2G 就會被燒錄到您的行動裝置上。</p>
+<h3 id="為您的行動裝置設定_udev_規則">為您的行動裝置設定 udev 規則</h3>
+<p>在 Linux,如果您看到這個訊息,</p>
+<pre>&lt; waiting for device &gt;</pre>
+<p>那或許意味著這個 fastboot 裝置和提供給 adb 裝置的不同,而那個裝置沒有被加入 udev 規則。您現在可以藉由執行 <code>lsusb</code> 來取得 USB 廠商的 ID,但是它會是 Google 的 ID:18d1,所以將下面這一行加入 <code>/etc/udev/rules.d/51-android.rules 這個檔案,然後就會正常運作了:</code></p>
+<pre>SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"</pre>
+<div class="note">
+ <strong>Note:</strong> 如果您在 Linux 上碰到一個非常有幫助的 <code>libusb</code> 錯誤 "-3"的話,這意味著手機需要被 root 來取得 USB 裝置的權限。請使用 <code>sudo</code> 再執行一次這個 script。</div>
+<h3 id="Samsung_Galaxy_S2_要特別注意的地方">Samsung Galaxy S2 要特別注意的地方</h3>
+<p>如果您的手機是 Galaxy S2 且使用 heimdall 1.3.2 (最新版;可以用 <code>heimdall version</code> 指令檢查版本) 的話,您可能會看到一個警告訊息「FACTORYFS upload failed!」、後面接著「Heimdall flashing failed」和一些額外的資訊。實際上這是一個成功的狀況,所以您可以忽略這個建議。</p>
+<p>為了要擺脫這個奇怪的行為,您可以去抓 heidmall 的 <a class="link-https" href="https://github.com/Benjamin-Dobell/Heimdall" title="https://github.com/Benjamin-Dobell/Heimdall">複製的原始碼</a>、並且降級到 1.3.1 release 版 ("<code>git checkout fbbed42c1e5719cc7a4dceeba098981f19f37c06</code>"),接著根據 <code>README</code> 編譯、然後安裝,這樣就不會再看到這個錯誤訊息了。然而,這並不是必須的 (看起來比較爽就是了)。</p>
+<p>heimdall 的所有版本都無法燒錄超過 100MB 的 system.img。執行下列指令:</p>
+<pre>ls -l ./out/target/product/galaxys2/system.img
+</pre>
+<p>就可以看到您的 system.img 有多大。如果太大的話,先到 IRC 找人問問求救;有幾種方法可以分兩階段來燒錄。</p>
+<h2 id="Samsung_Galaxy_S2_額外的步驟">Samsung Galaxy S2 額外的步驟</h2>
+<p>如果您正在燒錄到 Galaxy S2 的話,需要遵守一個額外的步驟。因為使用 <code>flash.sh</code> script 不會自動將 Gaia 燒錄上去;您需要也打下列指令:</p>
+<pre>./flash.sh gaia
+</pre>
+<h2 id="燒錄某個分割區partitions到具備_fastboot_的手機">燒錄某個分割區(partitions)到具備 fastboot 的手機</h2>
+<p>您可以燒錄某個分割區 (partitions)到 fastboot 的手機 (也就是說,除了 Samsung Galaxy S2 之外的任何其他手機)。指令如下:</p>
+<pre>./flash.sh system
+./flash.sh boot
+./flash.sh user
+</pre>
+<h2 id="更新某個模組">更新某個模組</h2>
+<p>在燒錄的時候,您可以藉由指名元件名稱來更新某個 B2G 的元件。如下:</p>
+<pre>./flash.sh gaia
+./flash.sh gecko
+</pre>
+<h2 id="接著,下一步">接著,下一步</h2>
+<p>此時,您的手機應該正在運作 Boot to Gecko!是時候該體驗、<a href="/en/Mozilla/Boot_to_Gecko/Writing_apps_for_Boot_to_Gecko" title="en/Mozilla/Boot_to_Gecko/Writing_apps_for_Boot_to_Gecko">寫些程式</a>、 <a href="/en/Mozilla/Boot_to_Gecko/Testing_Boot_to_Gecko" title="en/Mozilla/Boot_to_Gecko/Testing_Boot_to_Gecko">測試</a>、或是 <a href="/en/Mozilla/Boot_to_Gecko/Debugging_on_Boot_to_Gecko" title="en/Mozilla/Boot_to_Gecko/Debugging_on_Boot_to_Gecko">除些錯</a> 了!</p>
+<div class="note">
+ <strong>Note:</strong> 一個有用的技巧:如果您的 B2G 版本啟動的時候有螢幕鎖且需要密碼才能解鎖的話,預設的解鎖密碼是 0000。</div>
+<h2 class="note" id="Troubleshooting">Troubleshooting</h2>
+<p>如果行動裝置在安裝或更新 B2G 到新版本後不會正常運作的話,這裡還有一些技巧可以參考。</p>
+<h3 class="note" id="如果使用者介面_Gaia_沒有啟動">如果使用者介面 (Gaia) 沒有啟動</h3>
+<p>如果您更新您的手機導致使用者介面不會啟動的話,您可以重置手機來清除一些過期的設定或是之類的東西。這樣做可能會讓它回過魂來繼續運作。參考及使用下列指令:</p>
+<pre>cd gaia
+make reset-gaia
+</pre>
diff --git a/files/zh-tw/archive/b2g_os/introduction/index.html b/files/zh-tw/archive/b2g_os/introduction/index.html
new file mode 100644
index 0000000000..5b0319863d
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/introduction/index.html
@@ -0,0 +1,86 @@
+---
+title: Firefox OS 簡介
+slug: Archive/B2G_OS/Introduction
+translation_of: Archive/B2G_OS/Introduction
+---
+<div class="summary">
+<p>Firefox OS 正將無限開拓 Web 的行動界線,且要讓擁有第一支智慧型手機的使用者,能獲得全新的網路體驗。<strong>此開放源碼的行動作業系統,即以</strong> Linux、Open Web 標準、Mozilla 的 Gecko 技術為基礎,勢將重新定義「行動平台」。</p>
+
+<p>在導入 WebAPI 以存取硬體功能,並提供直覺且豐富的智慧型手機體驗之後,Mozilla 相信 Web 必將成為開發者的絕佳機會,讓更多消費者能觸及有趣且多樣的產品。</p>
+</div>
+
+<h2 id="目標客戶">目標客戶</h2>
+
+<p>此一系列說明文件,主要將讓 Web\平台開發者能夠進一步了解 Firefox OS 的運作方式、貢獻專案的方法,並打造自己的客製化軟體版本以利安裝於裝置之上。若是想建立並發佈自己的 Web App,亦可透過 <a href="https://developer.mozilla.org/en-US/Apps">「應用程式中心 (App Center)」</a>與 <a href="https://developer.mozilla.org/en-US/Marketplace">Marketplace 的「專區 (Zone)」</a>輕鬆達成。</p>
+
+<h2 id="Firefox_OS_的基本承諾">Firefox OS 的基本承諾</h2>
+
+<p>對 Web\平台開發者來說,所應了解的最重要部分就是:整個使用者介面 (UI) 就是 Web App,且此 Web App 又能夠顯示並啟動其他的 Web App。不論是修改 UI、撰寫 Firefox OS 上執行的 App,甚至是存取行動裝置硬體與服務,都是透過標準的 Web 技術進行。</p>
+
+<p>從產品面來看,Firefox OS 已是 Mozilla 的品牌名稱,透過 Boot to Gecko (B2G,為作業系統產品的設計代號) 而提供相關服務。Firefox OS 的 UI 稱為 Gaia,並包含了 OS 的預設 App 與系統功能。</p>
+
+<p>若要進一步了解平台架構,可參閱《<a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform">平台指南</a>》。</p>
+
+<h2 id="目前與未來的規劃">目前與未來的規劃</h2>
+
+<p>現正開發 Firefox OS 2.0 版,且 1.3/1.4 版已經趨於穩定。目前市面上已有多款手機,消費者或開發者所適用的型號均有。若要進一步了解,可參閱:</p>
+
+<ul>
+ <li>Firefox OS <a href="https://developer.mozilla.org/en-US/Firefox_OS/Releases">開發者版本說明</a>:各版本新支援的功能。</li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide">手機指南</a>:目前市面上的手機型號。</li>
+ <li><a href="https://wiki.mozilla.org/B2G/Roadmap">B2G 規劃</a>:Firefox OS 的進度表及時間表。</li>
+</ul>
+
+<h3 id="版本週期">版本週期</h3>
+
+<p>從 Firefox OS 1.2 開始,Firefox OS 版本週期即已儘量同步於 Gecko 與 Firefox 桌面版的版本週期 (即 6 週)。現每 3 個月即釋出新版本 Firefox OS,因此每 2 個 Gecko (Firefox 瀏覽器核心) 版本週期就會釋出 1 次新版本 Firefox OS。</p>
+
+<p>舉例來說,Gecko 30 即與 Firefox OS 1.4 一同釋出 (跨過 Gecko 29);Gecko 32 即與 Firefox OS 2.0 (本為 1.5) 一同釋出 (跨過 Gecko 31)。</p>
+
+<div class="note">
+<p><strong>注意:</strong>可參閱我們的<a href="https://wiki.mozilla.org/RapidRelease/Calendar">版本釋出排程</a>,確認 Firefox OS 與 Gecko\桌面版 Firefox 之間的對應版本,另可參閱 <a href="https://wiki.mozilla.org/Release_Management/FirefoxOS/Release_Milestones">Firefox OS Release Milestones</a> 進一步了解版本管理的相關細節。</p>
+</div>
+
+<h2 id="社群">社群</h2>
+
+<p>Boot to Gecko 與 Gaia 均是由 Mozilla 內部的工程師團隊開發而得,另加上 Mozilla 外部與開放源碼社群的一同貢獻。如果你想聯繫 Firefox OS 或 Gaia 開發的社群,則可利用下列的郵件群組與 IRC 頻道。</p>
+
+<p>同樣的,可使用 Bugzilla 系統提報 <a href="https://bugzilla.mozilla.org/describecomponents.cgi?product=Firefox%20OS">Firefox OS 元件</a>的任何問題。如果你不確定哪些元件應該提報問題,歡迎隨時發問。</p>
+
+<div class="note">
+<p><strong>注意:</strong>如果你對 B2G/Gaia 原始碼的特定部分 (例如特定的 Gaia App) 有任何問題或意見,則可在 <a href="https://wiki.mozilla.org/Modules/FirefoxOS">Firefox Modules 頁面</a>上找到特定聯絡細節。</p>
+</div>
+
+<h2 id="打造作業系統">打造作業系統</h2>
+
+<p>B2G 作業系統是以 Mozilla 的 <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Gecko">Gecko</a> 繪圖引擎為基礎,並從 Linux kernel 以及稱為 <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Gonk">Gonk</a> 的硬體抽象層 (Hardware Abstraction Layer,HAL) 延伸。這裡所說的 Gecko,基本上就是 Firefox for Android 或 Windows 或 Mac OS X 所用的相同 Gecko。而 Gonk 就是 Gecko 所衍生的另項系統。</p>
+
+<p>若要進一步打造並安裝 Firefox OS,可參閱《<a href="https://developer.mozilla.org/zh-TW/Firefox_OS/Building_and_installing_Firefox_OS">建立並安裝 Firefox OS</a>》。你也可以<a href="https://github.com/mozilla-b2g/B2G">到 Github 找到 B2G 的原始碼</a>。</p>
+
+<h2 id="貢獻_Gaia">貢獻 Gaia</h2>
+
+<p>若想為 Gaia 貢獻,其實並不需要深入了解 Web 的開發概念。如果要入門 Gaia 並執行,可參閱《<a href="https://developer.mozilla.org/en-US/Firefox_OS/Hacking_Firefox_OS/Quickstart_guide_to_Gaia_development">入門開發 Gaia</a>》。</p>
+
+<p>還有許多有用的工具,可讓你針對 Gaia 與 Firefox OS 的 Web App 進行除錯。若要進一步了解,亦可參閱《<a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Gaia/Hacking">Hacking Gaia</a>》。</p>
+
+<h2 id="開發_Firefox_OS_的_App">開發 Firefox OS 的 App</h2>
+
+<p>Firefox OS App 同樣是以標準的 Web 技術 (如 HTML、CSS、JavaScript 等等) 所打造而成。如果你本來就是 Web 開發者,就已經具備了大部分的技術。另必須知道數個特定的 JavaScript API,以利存取裝置的硬體與重要功能 (如相機、陀螺儀、光線感測器、聯絡人資訊、系統警示\通知......)。這些也同樣能參閱<a href="https://developer.mozilla.org/en-US/Apps">應用程式中心</a>與 <a href="https://developer.mozilla.org/en-US/docs/Web">Web 平台</a>頁面獲得更多資訊。</p>
+
+<div class="note">
+<p><strong>注意:</strong>如果你剛開始打造 Open Web/Firefox OS App,或想要初步了解 Web App 與傳統網頁之間的差異,可參閱《<a href="https://developer.mozilla.org/en-US/Apps/Quickstart">App 迅速入門指南</a>》。</p>
+</div>
+
+<h3 id="支援_Firefox_OS_的多個版本">支援 Firefox OS 的多個版本</h3>
+
+<p>在開發 Firefox OS 的 App 時,必須留意消費者手上的裝置到底搭載了哪個版本 (可參閱<a href="https://developer.mozilla.org/en-US/Firefox_OS/Developer_phone_guide/Phone_specs#Firefox_OS_phones_available">目前可用手機表</a>)。另請注意,更新手機平台軟體,可不像更新桌面版軟體一樣簡單。消費者往往受制於網路服務供應商。因此開發者應該讓 App 能夠支援不同的版本。舉例來說,multiline 的「Flexbox」就無法在 Firefox OS 1.3 以下的版本中執行。你可能必須使用較簡單的配置函式,或退而使用較舊的版本。</p>
+
+<p>隨著有越來越多消費性的 Firefox OS 裝置上市,並搭載更高版本的 Firefox OS,這個問題很快就能解決。</p>
+
+<div class="warning">
+<p>我們目前建議能針對 <a href="https://developer.mozilla.org/en-US/Firefox_OS/Releases/1.1">Firefox OS 1.1</a> 版本的特性來開發 App。</p>
+</div>
+
+<div class="note">
+<p><strong>注意:</strong>MDN 上的《<a href="https://developer.mozilla.org/en-US/docs/Web">Web 平台參考頁面</a>》,包含瀏覽器\平台的支援資訊。另可到《<a href="https://developer.mozilla.org/en-US/Apps/Reference">Apps API Reference</a>》找到特定 App 技術的相關資訊。</p>
+</div>
diff --git a/files/zh-tw/archive/b2g_os/phone_guide/flame/index.html b/files/zh-tw/archive/b2g_os/phone_guide/flame/index.html
new file mode 100644
index 0000000000..60b3a7ad8f
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/phone_guide/flame/index.html
@@ -0,0 +1,50 @@
+---
+title: Firefox OS 參考平台手機「Flame」
+slug: Archive/B2G_OS/Phone_guide/Flame
+translation_of: Archive/B2G_OS/Phone_guide/Flame
+---
+<div class="note">
+ <p><strong>Flame 的更新檔案</strong>:我們建議你加入下方的郵件群組,即可收到軟體版本定期更新檔案,以及其他可影響 Flame 效能的檔案:<a href="https://mail.mozilla.org/listinfo/flamenews">https://mail.mozilla.org/listinfo/flamenews</a></p>
+</div>
+<p><img alt="A picture of the Flame device, showing the Firefox OS homescreen containing several app icons." src="https://mdn.mozillademos.org/files/8373/flame-dev-hud.png" style="float: left; margin-right: 50px; margin-bottom: 20px; width: 25%;"></p>
+<h2 id="Available_to_order" style="text-indent: 100%; white-space: nowrap; overflow: hidden; margin: 0; height: 0;">Available to order</h2>
+<p>專為開發者所設計的「Flame」參考平台手機,是 Firefox OS 相關裝置的里程碑。Flame 的硬體規格均為一時之選,包含 FWVGA 顯示功能與雙核心處理器,可協助開發者打造絕佳的內容與經驗。且單一硬體平台同樣適合測試人員,可更輕鬆的測試並找出軟體問題,不必擔心裝置型號既有的特定問題。</p>
+<p style="">如果你手上有 Flame,也打算開始把玩、開發\發佈 App,或為 Firefox 平台有所貢獻,則應先參閱下列連結:</p>
+<ul>
+ <li><a href="https://developer.mozilla.org/zh-TW/Firefox_OS">Firefox OS 專區</a>:可打造自己的 Firefox OS 版本,並貢獻到 B2G 與 Gaia 專案。</li>
+ <li><a href="https://developer.mozilla.org/zh-TW/Apps">應用程式中心</a>:打造 Open Web App 並相容於 Firefox OS。</li>
+ <li><a href="https://developer.mozilla.org/zh-TW/docs/Mozilla/Marketplace">Marketplace 專區</a>:發佈 App 所需的各種資訊。</li>
+ <li><a href="https://marketplace.firefox.com/">Firefox Marketplace</a>:尋找並發佈 Firefox OS 新 App 的最佳去處。</li>
+</ul>
+<p style="">如果你想進一步了解作業系統的更新程序、探索手機的其他部分、將 App 送入手機,或觀看手機本身的規格,則可從下列 2 篇文章中找到相關資訊:</p>
+<ul>
+ <li style=""><a href="/en-US/Firefox_OS/Developer_phone_guide/Flame/Initial_setup">初始設定</a> — 設定電腦的必要步驟,才能妥善配合 Flame。</li>
+ <li style=""><a href="/en-US/Firefox_OS/Developer_phone_guide/Flame/Updating_your_Flame">更新自己的 Flame</a> — 更新 Flame 上的 Firefox OS,將 App 送入手機之後,即可測試 App 並排解疑難雜症。</li>
+</ul>
+<h2 id="購買_Flame">購買 Flame</h2>
+<p>Flame 銷售已經告一段落。但我們仍為 Mozilla 貢獻者保留了許多機會要免費送出手機,包含第二輪的 Foxtrot 方案。如果你想免費獲得手機,請儘速聯絡 IRC 上的 Asa Dotzler。</p>
+<h2 id="連線網路與裝置的規格">連線網路與裝置的規格</h2>
+<p><strong>連線網路:</strong></p>
+<ul>
+ <li>802.11b/g/n 無線網路</li>
+ <li>GSM 850/900/1800/1900MHz</li>
+ <li>UMTS 850/900/1900/2100MHz</li>
+</ul>
+<p><strong>硬體:</strong>請透過<a href="/en-US/Firefox_OS/Developer_phone_guide/Phone_specs">手機與裝置的規格頁面</a>找到更多硬體特色。</p>
+<p>其他特色包含:</p>
+<ul>
+ <li>NFC</li>
+ <li>Bluetooth 3.0</li>
+ <li>加速規</li>
+ <li>FM 收音機</li>
+ <li>距離感測器</li>
+ <li>GPS 並支援 A-GPS</li>
+ <li>環境光源感測器</li>
+</ul>
+<h2 id="另請參閱">另請參閱</h2>
+<ul>
+ <li style=""><a href="/en-US/Firefox_OS/Developer_phone_guide/Flame/Initial_setup">初始設定</a> — 設定電腦的必要步驟,才能妥善配合 Flame。</li>
+ <li style=""><a href="/en-US/Firefox_OS/Developer_phone_guide/Flame/Updating_your_Flame">更新自己的 Flame</a> — 更新 Flame 上的 Firefox OS,將 App 送入手機之後,即可測試 App 並排解疑難雜症。</li>
+ <li><a href="http://blog.mozilla.com.tw/posts/6263/">Flame 開發入門</a>:技術傳教士 Chris Heilmann 錄製的相關影片。</li>
+ <li><a href="http://mozilla.github.io/flame-on/">Flame On</a>:由擁有 Flame 的開發者在 Mozilla Festival 2014 所打造的絕佳網頁。</li>
+</ul>
diff --git a/files/zh-tw/archive/b2g_os/phone_guide/index.html b/files/zh-tw/archive/b2g_os/phone_guide/index.html
new file mode 100644
index 0000000000..7e301af2de
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/phone_guide/index.html
@@ -0,0 +1,6 @@
+---
+title: Boot to Gecko 開發者手機指南
+slug: Archive/B2G_OS/Phone_guide
+translation_of: Archive/B2G_OS/Phone_guide
+---
+<p>如果您已經從 Mozilla 收到了可以運作 B2G 的開發者手機,或是已經有人幫您將 B2G 安裝好在您的手機上的話,這裡有一份 <a href="https://wiki.mozilla.org/B2G/DeveloperPhone" class="link-https" title="https://wiki.mozilla.org/B2G/DeveloperPhone">關於手機運作的基礎指南</a>。我們正在改善這個部分,也希望可以快一點放更有效率的指令放上 MSN。如果您對建置/燒錄有興趣,請看 <a href="/en/Mozilla/Boot_to_Gecko/Setting_Up_Boot_to_Gecko_Build_Environment" title="Setting up &amp; building Boot to Gecko">'設定和建置 Boot to Gecko'</a> 章節,裡面有更細節的資訊。</p>
diff --git a/files/zh-tw/archive/b2g_os/phone_guide/zte_open/index.html b/files/zh-tw/archive/b2g_os/phone_guide/zte_open/index.html
new file mode 100644
index 0000000000..36ababcb56
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/phone_guide/zte_open/index.html
@@ -0,0 +1,287 @@
+---
+title: The Firefox OS ZTE OPEN
+slug: Archive/B2G_OS/Phone_guide/ZTE_OPEN
+translation_of: Archive/B2G_OS/Phone_guide/ZTE_OPEN
+---
+<div class="summary">
+<p>Mozilla 與 ZTE 共同合作開發了 ZTE Open。ZTE Open 是一款為開發者和早期接受者所開發的 Firefox OS 裝置,它已解鎖、開放用於測試和實驗。</p>
+</div>
+
+<div class="note">
+<p><strong>Note</strong>: 本指南不適用於 ZTE Open C 裝置,針對 ZTE Open C 請參考 <a href="/en-US/Firefox_OS/Developer_phone_guide/ZTE_OPEN_C">ZTE Open C</a> 頁面。</p>
+</div>
+
+<h2 id="購買裝置">購買裝置</h2>
+
+<p>請連至 ZTE 美國、歐洲或香港 ebay 商店購買。</p>
+
+<ul>
+ <li><a href="http://stores.ebay.com/ztemobileuk">Buy from UK eBay store</a></li>
+ <li><a href="http://stores.ebay.com/zteauthorizedstoreus/">Buy from US eBay store</a></li>
+ <li><a href="http://www.ebay.com/itm/331031989534">Buy from Hong Kong page</a></li>
+</ul>
+
+<h2 id="升級_Firefox_OS">升級 Firefox OS</h2>
+
+<p>接下來我們將提供升級 ZTE Open 的說明指示:</p>
+
+<h3 id="一般">一般</h3>
+
+<p>一般 Firefox OS 的建置、更新和測試都是透過用 USB 連接電腦和手機後,利用 ADB (Android Debugging Bridge) 以及 Fastboot 發送指令進行操作,所以我們需要安裝 ADB 以及 fastboot 到電腦上 (可至 <a href="http://developer.android.com/sdk/index.html" title="Android Developer Tookit">Android Developer Toolkit</a> 取得) ,並不需要安裝整個 Android 開發工具包,adb 以及 fastboot 可以到 <code>/platform-tools/</code> 資料夾找到。</p>
+
+<p>然後,請打開手機的遠端除錯選項<a href="/en-US/Firefox_OS/Debugging/Developer_settings#Remote_debugging">,enable remote debugging</a>。</p>
+
+<h3 id="Firefox_OS_1.1">Firefox OS 1.1</h3>
+
+<p>2013/12/10,ZTE 發佈了 ZTE Open 的 Firefox OS 1.1 更新包,<strong>這個更新開啟了 fastboot</strong>, 解決了前一個發佈版本這方面的問題。</p>
+
+<p>在升級到 v1.2 前,最好先升級到 v1.1。升級 v1.1 首先先到 <a href="http://www.ztedevices.com/support/smart_phone/b5a2981a-1714-4ac7-89e1-630e93e220f8.html">OPEN (American Standard</a> 或 <a href="http://www.ztedevices.com/support/smart_phone/cba40ed6-d3ab-44c0-bdee-3a15803dc187.html">OPEN (European Standard)</a> 下載升級包,請注意我們需要下載對應 OS 版本,所以從 v1.0 升級的人請下載 "V1.1.0B02(for V1.0)",下載檔案中同時也含有說明文件。接下來請解開下載檔案按照以下步驟升級你的 ZTE Open。</p>
+
+<div class="note">
+<p><strong>Note</strong>: 使用者資料會在 microSD 卡升級過程中被刪除,請先<a href="https://developer.mozilla.org/en-US/Firefox_OS/Firefox_OS_build_prerequisites#Backup_the_phone_system_partition">備份你的資料</a> 。</p>
+</div>
+
+<p>以下是透過 microSD 卡升級步驟:</p>
+
+<ol>
+ <li>關機、打開背蓋、取下電池背後的 microSD 記憶卡。</li>
+ <li>將 SD 卡插入電腦。</li>
+ <li>把下載的 <strong>US_DEV_FFOS_V1.1.0B04_UNFUS_SD.zip</strong> 或 <strong>EU_DEV_FFOS_V1.1.0B04_UNFUS_SD.zip</strong> (看你下載的版本) 複製到 microSD 卡的 root 底下,請不要解開 zip 檔。</li>
+ <li>卸除 SD 卡、裝回到手機上。</li>
+ <li>同時按下音量向上鍵和電源鍵。音量向上鍵位於手機左側長條型按鍵的上半部。兩顆鍵同時按下後會進入 Firefox OS recovery 模式 (注意 Firefox logo 會先出現一陣子再進入 recovery 模式)。</li>
+ <li>按音量上下鍵再選項間移動,請選擇 “<strong>apply update from external storage</strong>.”</li>
+ <li>按電源鍵確認選項後會看見 microSD 卡裡的檔案列表。</li>
+ <li>再用音量上下鍵選擇你剛剛複製過來的軔體檔 <strong>US_DEV_FFOS_V1.1.0B04_UNFUS_SD.zip</strong> 或 <strong>EU_DEV_FFOS_V1.1.0B04_UNFUS_SD.zip</strong>,然後按電源鍵確認。</li>
+</ol>
+
+<p>如果一切順利的話,你會看到一連串訊息,當你看到 <em>“<strong>Install from sdcard complete</strong>.”</em> 那就代表升級完成,請選擇 “reboot system now” 重新開機,重新開機後你將會看到手機第一次啟動的設定頁面。</p>
+
+<h3 id="Firefox_OS_1.2">Firefox OS 1.2</h3>
+
+<p>2014, 1月,ZTE 發佈了一版 Firefox OS v1.2 beta 版 (fastboot 開啟、擁有 root 權限),此 beta 版本基本上是由 v1.1 baseline + v1.2 Gecko 與 Gaia, 而且不需要把檔案放在 microSD 卡中。</p>
+
+<p>請先確認 v1.1 已經上面說明安裝完成,接著打開 terminal 然後輸入以下指令確認連線建立成功:</p>
+
+<pre class="brush: bash">adb devices -l
+</pre>
+
+<p>如果連線成功,你會看到類似 "roamer2    device usb:2-1.2" 的回應訊息。</p>
+
+<p>請前往 ZTE 建立的 Dropbox 帳戶下載對應 OS: <a href="https://www.dropbox.com/sh/rnj3rja7gd54s98/32KXfFmedN/P752D04_DEV_US_20131212_v1.2.7z" title="Firefox OS 1.2 build for ZTE Open US">US 版</a> 或 <a href="https://www.dropbox.com/sh/rnj3rja7gd54s98/_twgXEkMFH/P752D04_DEV_EU_20131212_v1.2.7z" title="Firefox OS 1.2 build for ZTE Open UK">UK 版,</a>,Windows 使用者可以去<a href="https://www.dropbox.com/sh/rnj3rja7gd54s98/6ZoJwmlRjn/Installation%20Instruction.docx" title="Special upgrade instructions for Windows users">下載特殊說明</a>還有<a href="https://www.dropbox.com/sh/rnj3rja7gd54s98/-fyi2XHFPG/upgrade_tool" title="Upgrade tool">升級工具</a>來協助安裝新版本。底下的說明指示無需特殊工具、適用於所有作業系統 – Linux, OS X, 和 Windows。</p>
+
+<p>請解開下載好的檔案,開啟 terminal 進入到解開後的檔案資料夾。請注意以下步驟會刪除個人資料,所以請先<a href="https://developer.mozilla.org/en-US/Firefox_OS/Firefox_OS_build_prerequisites#Backup_the_phone_system_partition">備份</a>好你的資料,接著輸入下列指令:</p>
+
+<pre class="brush: bash">adb reboot bootloader</pre>
+
+<p>這個指令會讓裝置重開機,由於 fastboot 只在重開機過程中有效,請在重開機中輸入以下指令:</p>
+
+<pre class="brush: bash">sudo fastboot devices
+</pre>
+
+<p>如果看到 "&lt; waiting for device &gt;" 訊息,請按下 Ctrl-C 並且再次輸入指令直到看見 "ROAMER2    fastboot" 之類的訊息回應。</p>
+
+<p>接著請快速在重開機當中輸入下面指令:</p>
+
+<pre class="brush: bash">fastboot flash boot boot.img
+fastboot flash userdata userdata.img
+fastboot flash system system.img
+fastboot flash recovery recovery.img
+fastboot erase cache
+fastboot reboot</pre>
+
+<div class="note">
+<p><strong>Note</strong>: 如果一直看到 "&lt; waiting for device &gt;" 訊息,請嘗試在指令開頭前加上 <strong>sudo</strong> ,例如 "sudo falshboot flash boot boot.img"。</p>
+</div>
+
+<p>如果來不及輸入完指令,請從 "adb reboot bootloader" 指令開始再試一次。</p>
+
+<p>一切順利的話,重開機後又會看到第一次手機啟用頁面,ZTE Open 此刻已經升級到 v1.2,進入系統後會看到許多測試 app ,請隨意自由自由刪除。</p>
+
+<div class="note">
+<p><strong>Note</strong>: <a href="https://hacks.mozilla.org/2014/01/upgrading-your-zte-open-to-firefox-1-1-or-1-2-fastboot-enabled/">Upgrading your ZTE Open to Firefox 1.1 or 1.2 (fastboot enabled)</a> 由 <span class="url">Frédéric Harper</span> 所撰寫的文章也提供了有用的安裝步驟說明。</p>
+</div>
+
+<div class="note">
+<p><strong>Note</strong>: ZTE Open 的 v1.2 版有一個通知欄無法展開的問題,這個問題可以藉由燒錄最新的 Firefox OS 1.2 工程版解決,請確認 <a href="/en-US/Firefox_OS/Debugging/Installing_ADB">ADB 安裝好了</a> 還有 <a href="/en-US/Firefox_OS/Debugging/Developer_settings#Debugging_via_USB">遠端除錯</a> 開啟,然後在 terminal 輸入下面指令:<br>
+ <br>
+ <code>git clone -b v1.2 <a href="https://github.com/mozilla-b2g/gaia.git" rel="nofollow">https://github.com/mozilla-b2g/gaia.git</a> gaia_v1.2<br>
+ cd gaia_v1.2<br>
+ make reset-gaia</code></p>
+</div>
+
+<h3 id="Firefox_OS_1.3_and_beyond">Firefox OS 1.3 and beyond</h3>
+
+<p>ZTE currently haven't released builds for Firefox OS 1.3 and beyond. To get these on your ZTE open you'll have to manually <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Building_and_installing_Firefox_OS">build and install a new Firefox OS/B2G</a> build on it (start at the <a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites">build prerequisite</a> instructions, and treat the ZTE like it is an Inari device, for the purposes of configuration). You can recover your phone if necessary, using the procedure cited in the {{ anch("I bricked my phone") }} section.</p>
+
+<h2 id="Phone_features">Phone features</h2>
+
+<ul>
+ <li>CPU Qualcomm MSM7225A 1.0Ghz</li>
+ <li>UMTS 850/1900 or UMTS900/2100</li>
+ <li>GSM 850/900/1800/1900 (2G EDGE)</li>
+ <li>Screen 3.5" HVGA</li>
+ <li>Camera 2 MP (back)</li>
+ <li>256 MB (RAM)</li>
+ <li>MicroSD (support up to 32GB)</li>
+ <li>Battery 1200 mAh</li>
+ <li>Wifi b, g, n, Bluetooth 2.1 EDR</li>
+ <li>Light &amp; Prox. Sensor, G-Sensor</li>
+ <li>Radio FM, GPS</li>
+ <li>MicroUSB</li>
+</ul>
+
+<div class="note">
+<p><strong>Note</strong>: the Hong Kong phones also support tri-band 3G Networks — HSDPA 850/1900/2100 (850/1900 for US, CA, 850/1900/2100 for Asia, AU, and 900/2100 for EU.)</p>
+</div>
+
+<h2 id="Wireless_carriers">Wireless carriers</h2>
+
+<div class="warning">
+<p>Pricing information is for reference only and may not be accurate. Visit the associated link for official information.</p>
+</div>
+
+<h3 id="US_carriers">US carriers</h3>
+
+<h4 id="ATT">AT&amp;T</h4>
+
+<ul>
+ <li><a href="http://www.att.com/shop/wireless.html">Website</a></li>
+ <li>Nationwide coverage for 2G EDGE and 3G</li>
+</ul>
+
+<h5 id="Sampling_of_prepaid_ATT_plans">Sampling of prepaid AT&amp;T plans</h5>
+
+<p><a href="http://www.att.com/shop/wireless/gophone.html">Prepaid GoPhone®</a>, Smartphone Plans</p>
+
+<ul>
+ <li>$25/month, $5/50MB 3G data</li>
+ <li>$60/month with 2GB data, $10/GB additional 3G data</li>
+</ul>
+
+<h4 id="Aio">Aio</h4>
+
+<ul>
+ <li><a href="http://www.aiowireless.com/home.html">Website</a></li>
+ <li>{{ anch("AT&amp;T") }}'s own MVNO</li>
+</ul>
+
+<h5 id="Sampling_of_prepaid_Aio_plans">Sampling of prepaid Aio plans</h5>
+
+<ul>
+ <li>Aio Smart - $55/month with 2GB 3G data, $10/GB additional 3G data</li>
+ <li>Aio Pro - $70/month with 7GB 3G data, $10/GB additional 3G data</li>
+</ul>
+
+<h4 id="Good2GO">Good2GO</h4>
+
+<ul>
+ <li><a href="https://us.good2gomobile.com/">Website</a></li>
+ <li>{{ anch("AT&amp;T") }} MVNO</li>
+</ul>
+
+<h5 id="Sampling_of_prepaid_Good2GO_plans">Sampling of prepaid Good2GO plans</h5>
+
+<ul>
+ <li>$50/month with 1GB 3G data, $20/GB additional 3G data</li>
+</ul>
+
+<h4 id="Other_anch(ATT)_MVNOs">Other {{ anch("AT&amp;T") }} MVNOs</h4>
+
+<p>These carriers do not offer additional 3G data.</p>
+
+<ul>
+ <li><a href="http://goredpocket.com/">RedPocket</a></li>
+ <li><a href="http://www.net10wireless.com/">Net10</a></li>
+ <li><a href="http://www.straighttalk.com/">Straight Talk</a></li>
+ <li><a href="https://www.airvoicewireless.com/">Airvoice</a></li>
+</ul>
+
+<h4 id="T-Mobile">T-Mobile</h4>
+
+<ul>
+ <li><a href="http://www.t-mobile.com/">Website</a></li>
+ <li>Nationwide coverage for 2G EDGE, limited metropolitan coverage for 3G</li>
+</ul>
+
+<h3 id="Canadian_carriers">Canadian carriers</h3>
+
+<p>The US version of the ZTE Open also work in Canada on carriers that use the Bell/Telus network, or the Rogers network. Some regional carriers like Sasktel or MTS that have UMTS should work too.</p>
+
+<p>It will not work on carriers that do not use UMTS or GSM, like Public Mobile, nor on the carriers that use the AWS band like WIND Mobile, Mobilicity, Videotron or Eastlink.</p>
+
+<h2 id="Memory_card">Memory card</h2>
+
+<h3 id="File_system">File system</h3>
+
+<p>In order to be recognized by the phone, the MicroSD card must be formatted as a FAT32 file system. If a card is new or has never been reformatted, it should work as is.</p>
+
+<h2 id="Device_revisions">Device revisions</h2>
+
+<h3 id="Revision_01">Revision 01</h3>
+
+<p>Phones produced before 09/27/2013 do not have fastboot enabled and must be updated. Normally, this would be handled by Software Updates, but since some users have reported trouble with this method, ZTE have made SD card packages available to enable fastboot on earlier devices. Flash images for:</p>
+
+<ul>
+ <li><a href="http://www.ztedevices.com/support/smart_phone/b5a2981a-1714-4ac7-89e1-630e93e220f8.html">Phones purchased at ZTE eBay US/Hong Kong store</a></li>
+ <li><a href="http://www.ztedevices.com/support/smart_phone/cba40ed6-d3ab-44c0-bdee-3a15803dc187.html">Phones purchased at ZTE eBay UK store</a></li>
+</ul>
+
+<p>The zip file is linked under Downloads.  Note that you need to download the version with your OS revision in it (that is, download the "V1.1.0B02(for V1.0)" if you are upgrading <em>from</em> V1.0).  Once the file is downloaded and unzipped, follow the instructions in the bundled PDF to flash the package to your phone.</p>
+
+<p>Related Support Forum Questions:</p>
+
+<ul>
+ <li><a href="https://support.mozilla.org/en-US/questions/971252">ZTE Open update crashes</a></li>
+ <li><a href="https://support.mozilla.org/en-US/questions/967817">Why is my ZTE Open unable to update Firefox OS?</a></li>
+ <li><a href="https://support.mozilla.org/en-US/questions/976414?page=3">How can I unbrick ZTE Open with adb debug Disabled?</a></li>
+</ul>
+
+<h3 id="Revision_02">Revision 02</h3>
+
+<p>Phones produced on or after 09/27/2013 are fastboot enabled by default. <strong>This includes the Hong Kong phones.</strong></p>
+
+<div class="note">
+<p><strong>Note</strong>: If you are unsure of your phone's revision, check it in <strong>Settings &gt; Device Information &gt; Software</strong>. If it is older than the following version numbers, you will need to update your phone using the above SD packages to enable fastboot.</p>
+
+<ul>
+ <li>Phones from UK store:OPEN_EU_DEV_FFOS_V1.0.0B02</li>
+ <li>Phones from US store:OPEN_US_DEV_FFOS_V1.0.0B02 <em>(Some phones may display this version incorrectly, see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=916098#c39">bug 916098</a>.)</em></li>
+</ul>
+</div>
+
+<h2 id="Device_support">Device support</h2>
+
+<p>Once your phone has {{ anch("Device revisions","fastboot enabled") }}, you will then be able to <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Building_and_installing_Firefox_OS">build and install new Firefox OS/B2G</a> builds on it (start at the <a href="/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites">build prerequisite</a> instructions, and treat the ZTE like it is an Inari device, for the purposes of configuration), and recover your phone if necessary, using the procedure cited in the {{ anch("I bricked my phone") }} section.</p>
+
+<p>If you encounter errors about setting the system time while flashing a custom build, you may need to download a <a href="http://sl.edujose.org/2013/10/adapted-boot-image-for-use-with-b2g.html">modified boot image</a>.</p>
+
+<h3 id="I_bricked_my_phone">I bricked my phone</h3>
+
+<p>If you are in the process of modifying your phone and it becomes “unresponsive” you should be able to recover it using fastboot with the following simple procedure.</p>
+
+<p>First remove the USB cable and then remove the battery from the phone for 30 seconds. Then reinsert the battery and press the volume up button while holding the power button for a few seconds. Next reconnect the USB cable and run the following commands from a terminal window in the directory that contains the SD package files described above (it is worth checking for an update to the SD package before you do this):</p>
+
+<pre class="brush: bash" lang="bash">fastboot flash recovery recovery.img
+fastboot flash boot boot.img
+fastboot flash userdata userdata.img
+fastboot flash system system.img
+fastboot reboot
+</pre>
+
+<p>This process should recover your phone. If it doesn't seem to work, you may have to try it a second time.</p>
+
+<h3 id="Headphones_not_working">Headphones not working?</h3>
+
+<p>We found that the headset jack is designed by a Chinese manufacturer that has compatibility problems with other brands of headsets that include microphones. You may have voice mute problems when you try to use headsets made by Apple, Samsung, HTC, and others. You can buy a 3.5 mm headset adapter that reverses the microphone and ground pins to avoid this problem. For more information, see {{ Bug("812607") }}.</p>
+
+<h3 id="Other_support_notes">Other support notes</h3>
+
+<p>Some customers have come across an Issue of FOTA updates failing to enable fastboot; this is still under investigation, and we are assisting ZTE to analyze every scenario. We will post more information as it is available.</p>
+
+<p>If your phone was unfortunately damaged during the FOTA update because of ZTE providing false or wrong update files, you can attempt to restore it to factory settings using the appropriate SD image and instructions referenced in {{ anch("Revision 01") }}. Otherwise, send your phone back to the eBay store you purchased it from in exchange for a new one. You may contact the store owner directly via an eBay message.</p>
+
+<h2 id="See_also">See also</h2>
+
+<p><a href="https://marketplace.firefox.com/developers/dev_phone">Official Dev Phone page on Firefox Marketplace</a></p>
+
+<p><a href="http://www.movistar.co/documentos/manualesProductos/ZTE_Mozilla_Open_P752-Manual_de_Usuario.pdf">Draft User Manual [en-US]</a> - PDF</p>
diff --git a/files/zh-tw/archive/b2g_os/platform/apps_architecture/index.html b/files/zh-tw/archive/b2g_os/platform/apps_architecture/index.html
new file mode 100644
index 0000000000..2524c81d0b
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/platform/apps_architecture/index.html
@@ -0,0 +1,24 @@
+---
+title: Firefox OS apps 架構
+slug: Archive/B2G_OS/Platform/Apps_architecture
+translation_of: Archive/B2G_OS/Platform/Apps_architecture
+---
+<div class="summary">
+ <p>本文旨在說明 Firefox OS 內部如何管理和啟動應用程式,主要是針對 Firefox OS 平台開發者以及正在移植 Firefox OS 到新硬體裝置上的開發者,如果你只是一個單純 App 開發者並不會需要知道,不過有興趣的話還是可以看看了解 Firefox OS。</p>
+</div>
+<h2 id="App_啟動程序">App 啟動程序</h2>
+<p>當 app 被啟動時,主畫面 app (Home screen app) 會透過 {{domxref("App")}} API 取得 app 的參照,然後呼叫 {{domxref("App.launch()")}} 方法來啟動 app。</p>
+<p>Gecko 收到相關請求後會發送一個含有 app 詳細資訊的 {{domxref("mozChromeEvent")}} 到系統 app (System app),系統 app 接著會將一個 {{HTMLElement("iframe")}} 加入 DOM 樹(DOM tree)中,然後將 app 載入該 {{HTMLElement("iframe")}} 裡,直到 app 終止前這個 iframe 就是 app 的家。</p>
+<p>每一支 app 都需要一個描述該 app 的 manifest 檔,app 包也需要遵照特定檔案階層,詳情請見 <a href="/en-US/docs/Web/Apps/App_Manifest">App manifest</a>。</p>
+<h2 id="和_Gecko_溝通">和 Gecko 溝通</h2>
+<p>Gecko 和 Gaia' 系統 app 之間的溝通是經由 {{domxref("mozChromeEvent")}} 以及 {{domxref("mozContentEvent")}} 完成。 <code>mozChromeEvent</code>s 是從 chrome 廣播到內容,而 <code>mozContentEvent</code>s 是從內容廣播到 chrome,這些溝通主要在控管受信任 UI 的創建與終止,還有在為通知和其他任務,包括通知系統 app 啟動某個 app,提供必要的功能。</p>
+<div class="note">
+ <p><strong>Note:</strong> 請參考 <a href="/en-US/Firefox_OS/Platform/Gaia/Gaia_apps/System">System app 文件</a> 以取得更多有關這些事件如何運作的細節,同時也可以參考相關的原始碼 {{source("b2g/chrome/content/shell.js")}}。</p>
+</div>
+<h2 id="延伸閱讀">延伸閱讀</h2>
+<ul>
+ <li><a href="/en-US/docs/Web/Apps">Apps</a></li>
+ <li>{{domxref("App")}}</li>
+ <li><a href="/en-US/Firefox_OS/Platform/Gaia/Gaia_apps/System">System app</a></li>
+ <li><a href="/en-US/Firefox_OS/Platform/Architecture">Firefox OS architecture</a></li>
+</ul>
diff --git a/files/zh-tw/archive/b2g_os/platform/gaia/gaia_apps/index.html b/files/zh-tw/archive/b2g_os/platform/gaia/gaia_apps/index.html
new file mode 100644
index 0000000000..4a284db78e
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/platform/gaia/gaia_apps/index.html
@@ -0,0 +1,78 @@
+---
+title: Gaia apps
+slug: Archive/B2G_OS/Platform/Gaia/Gaia_apps
+translation_of: Archive/B2G_OS/Platform/Gaia/Gaia_apps
+---
+<div class="summary">
+ <p><span class="seoSummary">Gaia 位在 Firefox OS 的上層,其中包含系統管理功能以及一系列 Firefox OS 內建 apps。所有 Gaia 的原始碼 — 即便系統和鍵盤輸入法 — 都是由 HTML5 (HTML + CSS + JavaScript) 和 Open WebAPIs 技術所建構而成的,本文旨在說明 Gaia 內建的 apps 是如何運作之。</span></p>
+</div>
+<h2 id="Gaia_功能類別">Gaia 功能類別</h2>
+<p>Gaia 內不同的 apps 大致上可以分成以下幾類。</p>
+<div class="note">
+ <p><strong>Note</strong>: 許多 app 運作說明都會連結到 <a href="https://github.com/mozilla-b2g/gaia/">Gaia Github repo</a> 上的 README 頁面,那是因為很多 app 都還在快速開發迭代階段,常常會有更動,所以一直更新 MDN 相當不切實際,如果想要進一步獲取最新的資訊,請再參考各 README 頁面。</p>
+</div>
+<h3 id="平台類">平台類</h3>
+<p>包括系統、設定、螢幕鎖定、建置腳本和藍芽 apps。</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/7503/platform_team.png" style="width: 355px; height: 269px; margin: 0px auto; display: block;"></p>
+<h4 id="平台類_apps">平台類 apps:</h4>
+<dl>
+ <dt>
+ <a href="/en-US/Firefox_OS/Platform/Gaia/Gaia_apps/System">系統 (System)</a></dt>
+ <dd>
+ System app 是第一個在 <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Architecture#Firefox_OS_bootup_procedure">Firefox OS 開機程序 </a>中被 Gecko 載入的web app,它負責處理許許多多系統運行工作,所以不算是在一般個別 web app 的範疇內。</dd>
+ <dt>
+ <a href="/en-US/Firefox_OS/Platform/Gaia/Gaia_apps/Browser">瀏覽器 (Browser)</a></dt>
+ <dd>
+ Browser app (現在算是 System 一部分) 當有相關需求時,如網頁瀏覽、搜尋或書籤標記,提供瀏覽器類的功能。</dd>
+ <dt>
+ <a href="/en-US/Firefox_OS/Platform/Gaia/Gaia_apps/Window_Management">視窗管理 (Window Management)</a></dt>
+ <dd>
+ Firefox OS 視窗管理功能 — 包括 app 生命週期和互動、通知、動畫等等 — 由 System app 特定一塊負責。</dd>
+ <dt>
+ <a href="/en-US/Firefox_OS/Platform/Gaia/Gaia_apps/Settings">設定 (Settings)</a></dt>
+ <dd>
+ Settings app 讓使用者設定裝置、回應當前活動呼叫 (帶有 <code>configure</code> 名稱的<a href="/en-US/docs/WebAPI/Web_Activities"> Web 活動</a>),讓其他 app 可以跳轉到 Settings app 其中的設定面板處理需要的設定任務 (例如說顯示 wifi 設定面板當數據傳輸無法使用時)。</dd>
+</dl>
+<h3 id="通訊類">通訊類</h3>
+<p>包括 Dialer, Contact, SMS apps 與 FTU apps.</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/7499/comms_team.png" style="width: 317px; height: 246px; margin: 0px auto; display: block;"></p>
+<h3 id="生產力類">生產力類</h3>
+<p>包括 Email, Calendar, 與 Clock apps.</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/7505/productivity_team.png" style="width: 303px; height: 178px; margin: 0px auto; display: block;"></p>
+<h4 id="生產力類_apps">生產力類 apps:</h4>
+<dl>
+ <dt>
+ <a href="https://github.com/mozilla-b2g/gaia/blob/master/apps/calendar/README.md">日歷 (Calendar)</a></dt>
+ <dd>
+ Firefox OS 內建 calendar app.</dd>
+ <dt>
+ <a href="https://github.com/mozilla-b2g/gaia/blob/master/apps/clock/README.md">時鐘 (Clock</a>)</dt>
+ <dd>
+ Firefox OS 預設 Clock app,具備鬧鈴、計時等功能</dd>
+ <dt>
+ <a href="https://github.com/mozilla-b2g/gaia/blob/master/apps/email/README.md">Email</a></dt>
+ <dd>
+ Gaia e-mail app.</dd>
+</dl>
+<h3 id="媒體類">媒體類</h3>
+<p>包括 Camera, Gallery, Music, 和 Video apps 等等媒體相關功能,如桌布和轉送 DRM 鎖。</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/7501/media_team.png" style="width: 386px; height: 250px; margin: 0px auto; display: block;"></p>
+<h4 id="媒體類_apps">媒體類 apps:</h4>
+<dl>
+ <dt>
+ <a href="/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Gaia_apps/Video">影音 (Video)</a></dt>
+ <dd>
+ Video 是影音媒體撥放器。</dd>
+ <dt>
+ <a href="https://github.com/mozilla-b2g/gaia/blob/master/apps/camera/README.md">相機 (Camera)</a></dt>
+ <dd>
+ Firefox OS 使用者透過相機照相、錄影,它也會回應 type 為pick 的 <a href="/en-US/docs/WebAPI/Web_Activities">Web 活動</a>,讓其他想使用相機功能的 app 使用相機。</dd>
+</dl>
+<h3 id="其他_Gaia_特色功能">其他 Gaia 特色功能</h3>
+<p>除了上述功能,Gaia 還有其他功能如 browser, homescreen, marketplace, test framework, PDF viewer, 和 app manager 等。</p>
+<dl>
+ <dt>
+ <a href="https://github.com/mozilla/pdf.js/blob/master/README.md">pdf.js</a></dt>
+ <dd>
+ pdf.js 是 HTML5 基礎的 PDF 瀏覽器,Gaia 用其來瀏覽 PDF,請注意 pdf.js 的程式碼庫 (repo) 和 Gaia 是分開來的。</dd>
+</dl>
diff --git a/files/zh-tw/archive/b2g_os/platform/gaia/index.html b/files/zh-tw/archive/b2g_os/platform/gaia/index.html
new file mode 100644
index 0000000000..d2a4886cf1
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/platform/gaia/index.html
@@ -0,0 +1,68 @@
+---
+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="https://developer.mozilla.org/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="https://developer.mozilla.org/en-US/docs/en-US/HTML" title="HTML">HTML</a>, <a href="https://developer.mozilla.org/en-US/docs/CSS" title="CSS">CSS</a>, and <a href="https://developer.mozilla.org/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="https://developer.mozilla.org/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="/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 meaniful 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="Community" id="Community" name="Community">Getting help from the community</h2>
+ <p>If you're working with Gaia, or developing Gaia applications, there are community resources to help you!</p>
+ <ul>
+ <li>Consult the Boot to Gecko project forum: {{ DiscussionList("dev-gaia", "mozilla.dev.gaia") }}</li>
+ </ul>
+ <p> </p>
+ <br>
+ <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>
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/platform/gaia/introduction_to_gaia/index.html b/files/zh-tw/archive/b2g_os/platform/gaia/introduction_to_gaia/index.html
new file mode 100644
index 0000000000..27c9ea5ea4
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/platform/gaia/introduction_to_gaia/index.html
@@ -0,0 +1,13 @@
+---
+title: Gaia 簡介
+slug: Archive/B2G_OS/Platform/Gaia/Introduction_to_Gaia
+translation_of: Archive/B2G_OS/Platform/Gaia/Introduction_to_Gaia
+---
+<p><a class="external" href="/en/Mozilla/Boot_to_Gecko/Gaia" title="en/Mozilla/Boot_to_Gecko/Gaia">Gaia</a> 是 Boot to Gecko (B2G) 的使用者介面;它只是在 B2G 裝置、模擬器、桌上型電腦版本、或是 Firefox 版本上運作的一個網頁應用程式 (Web application)。如果想要在 Gaia 上添加 apps 程式或是做一些改變的話,所有你需要了解的就是網頁科技 (Web Technologies),例如 <a href="/en/JavaScript" title="en/JavaScript">JavaScript</a>、 <a href="/en/HTML" title="en/HTML">HTML</a>、和 <a href="/en/CSS" title="en/CSS">CSS</a>。</p>
+<h2 id="Gaia_的鎖定畫面">Gaia 的鎖定畫面</h2>
+<p>鎖定畫面預設是啟動的,而預設解鎖密碼 (PIN) 是「0000」。隨著這個功能會隨著時間愈趨完整。</p>
+<h2 id="預設的_Gaia_介面">預設的 Gaia 介面</h2>
+<p>Gaia 的預設介面跟大家所見最典型的智慧型手機相仿,如這邊所看到的圖。</p>
+<p><a href="/@api/deki/files/6276/=screenshot.png" title="screenshot.png"><img align="left" alt="screenshot.png" class="internal lwrap" src="/@api/deki/files/6276/=screenshot.png?size=webview" style="width: 330px; height: 550px;"></a>這是張 prerelease 版本作業系統的圖,有一些暫時使用的圖示(和一些測試的程式)。頂端的狀態條顯示手機正在使用哪個行動網路 (如果行動裝置沒有網路的話,會顯示「No SIM card」)、行動網路強度、WiFi 訊號強度、電池使用狀態、和現在的時間。</p>
+<p>畫面的中間區域顯示應用程式的圖示;透過螢幕的圖示切換左右頁。</p>
+<p>在螢幕的底部是一個底座,可以放四個最常用的應用程式。現在底座還不能修改,且被預設顯示播號 (Dialer)、訊息 (Messages)、市集 (Market)、和瀏覽器 (Browser)的程式。</p>
diff --git a/files/zh-tw/archive/b2g_os/platform/gonk/index.html b/files/zh-tw/archive/b2g_os/platform/gonk/index.html
new file mode 100644
index 0000000000..71d064ac30
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/platform/gonk/index.html
@@ -0,0 +1,22 @@
+---
+title: Gonk
+slug: Archive/B2G_OS/Platform/Gonk
+translation_of: Archive/B2G_OS/Platform/Gonk
+---
+<p>{{draft()}}</p>
+<div class="summary">
+ <p>Gonk是<a href="/en-US/docs/Mozilla/Firefox_OS" style="line-height: 1.5;" title="/en-US/docs/Mozilla/Firefox_OS">Firefox OS</a><span style="line-height: 1.5;">的底層系統,包含基於</span><a class="external" href="http://source.android.com/" style="line-height: 1.5;">Android Open Source Project</a><span style="line-height: 1.5;"> (AOSP)</span><span style="line-height: 1.5;">的Linux核心以及硬體抽象層(hardware abstraction layer, HAL)。本文旨在說明Gonk的組成,更多有關FireFox OS架構以及Gonk是如何配置在其中的細節,請參考</span><a href="/en-US/Firefox_OS/Platform/Architecture" style="line-height: 1.5;">Firefox OS架構</a><span style="line-height: 1.5;">指南。</span></p>
+</div>
+<h2 id="Gonk_概觀">Gonk 概觀</h2>
+<p>在Gecko原始碼中,有一個b2g/資料夾,這個資料夾含有Gonk接口,它為網頁開啟了行動裝置的硬體能力。這其中包含了Linux核心、HAL和其他OEM特定的函式庫(library)。好機個Gonk函式庫是開放原始碼專案,如libusb, bluez等,有些HAL部分則是和Android專案共享,如GPS, camera等。</p>
+<p>Gonk是裝置接口層,介於硬體和Gecko之間的配接器。Gonk是一個相對簡單的Linux發布版本,可以視為<a href="/en-US/docs/Gecko" style="line-height: 1.5;">Gecko</a><span style="line-height: 1.5;">的配接目標,就像是Gecko和OS X, Windows和Android的接口。</span></p>
+<div class="note">
+ <p><strong>Note</strong>: 由於不同的行動裝置有不同的晶片組與硬體規格,所以可能會有不同的Gonk發布版本。</p>
+</div>
+<p>Firefox OS專案擁有Gonk百分之百的控制權,所以能夠提供Gecko那些原本在其他作業系統上無法看到的介面,例如,Gecko可以直接存取電話系統框架和Gonk的顯示frame buffer。</p>
+<h2 id="Gonk_原始碼">Gonk 原始碼</h2>
+<p><a href="https://github.com/mozilla-b2g/B2G">B2G repo on Github</a> 上有多種裝置的官方Gonk支援移植,可以視為Gonk的檔案庫。至於裝置支援列表,請見B2G/config.sh。</p>
+<p>大部分Gonk相關的日常工作包括了移植Gonk到不同硬體上,還有確保Gecko能在不同硬體上順利運行。</p>
+<dl>
+</dl>
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/platform/index.html b/files/zh-tw/archive/b2g_os/platform/index.html
new file mode 100644
index 0000000000..fe9474eed5
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/platform/index.html
@@ -0,0 +1,75 @@
+---
+title: Firefox OS 平台
+slug: Archive/B2G_OS/Platform
+translation_of: Archive/B2G_OS/Platform
+---
+<p><span class="seoSummary">Firefox OS 平台是由多樣的元件所組成。如果你只是要撰寫能在 Firefox OS 上執行的 App,其實不太需要通盤了解其架構。但如果你從事平台開發、平台移植,甚或只是單純好奇的話,也許會對以下說明文件感興趣。</span></p>
+
+<table class="topicpage-table">
+ <tbody>
+ <tr>
+ <td>
+ <h2 class="Documentation" id="Documentation" name="Documentation">關於 Firefox OS 平台的說明文件</h2>
+
+ <dl>
+ <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Introduction" title="en-US/docs/Mozilla/Firefox_OS/Introduction">Firefox OS 架構概述</a></dt>
+ <dd>簡單概述 Firefox OS 的內部架構,可供平台開發或移植工程師初步了解 Firefox OS。</dd>
+ <dt> </dt>
+ <dt><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Apps_architecture" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Apps_architecture">Firefox OS 的 A</a><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Apps_architecture" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Apps_architecture">pp 架構</a></dt>
+ <dd>概述 Firefox OS 的 App 模型。</dd>
+ <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Gaia" title="/en-US/docs/Mozilla/Gaia">Gaia</a></dt>
+ <dd>Gaia 是 Firefox OS 裝置的使用者介面 (UI) App,也是在 Firefox OS 軟體堆疊上執行的 Web App。</dd>
+ <dt><a href="/en-US/docs/Mozilla/Firefox_OS/Gonk" title="/en-US/docs/Mozilla/Firefox_OS/Gonk">Gonk</a></dt>
+ <dd>Gonk 的說明文件。Gonk 屬於 Gaia 之下的作業系統層,包含 Linux kernel 硬體抽象層 (Hardware abstraction layer),且由 Gecko 負責之間的溝通。</dd>
+ <dt><a href="/en-US/docs/Gecko" title="/en-US/docs/Gecko">Gecko</a></dt>
+ <dd>Gecko 即為 Firefox、Thunderbird,以及其他許多 App 所使用的相同 Open Web 標準實作。</dd>
+ <dt><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Security" title="/en-US/docs/Mozilla/Firefox_OS/Security">安全性</a></dt>
+ <dd>Firefox OS 的安全性說明文件,包含各個面相的裝置安全,適合 App 開發者、裝置整合商等參考。</dd>
+ <dt><a href="https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Out_of_memory_management_on_Firefox_OS">Firefox OS 記憶體耗盡時的管理作業</a></dt>
+ <dd>本文將解釋 Firefox OS 記憶體不足時的管理方式,可透過記憶體清理與記憶體不足通知等功能。</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">功能支援表</a></dt>
+ <dd>各個 Firefox OS 版本所支援的各項功能特色。</dd>
+ <dt><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Settings_list" title="/en-US/docs/Mozilla/Firefox_OS/Platform/Settings_list">Firefox OS 設定清單</a></dt>
+ <dd>常見的設定名稱清單,可搭配 <a href="https://developer.mozilla.org/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">全部文章...</a></span></p>
+ </td>
+ <td>
+ <h2 class="Community" id="Community" name="Community">尋求社群協助</h2>
+
+ <p>如果你正在開發 Firefox OS,或是可於 Firefox OS 裝置上執行的 App,則能參閱以下社群資源!</p>
+
+ <ul>
+ <li>Boot to Gecko 論壇:{{ DiscussionList("dev-b2g", "mozilla.dev.b2g") }}</li>
+ </ul>
+
+ <ul>
+ <li>在「Boot to Gecko」的 IRC 頻道上提問:<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">請遵守網路禮節...</a></span></p>
+
+
+ <h2 class="Related_Topics" id="Related_Topics" name="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="相關資源">相關資源</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">版本進程</a></li>
+ <li><a href="/en-US/docs/Mozilla/Firefox_OS/Feature_support_chart" title="/en-US/docs/Mozilla/Firefox_OS/Feature_support_chart">支援功能表</a></li>
+ </ul>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/platform/out_of_memory_management_on_firefox_os/index.html b/files/zh-tw/archive/b2g_os/platform/out_of_memory_management_on_firefox_os/index.html
new file mode 100644
index 0000000000..5b7f2045cc
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/platform/out_of_memory_management_on_firefox_os/index.html
@@ -0,0 +1,53 @@
+---
+title: Firefox OS 記憶體管理
+slug: Archive/B2G_OS/Platform/Out_of_memory_management_on_Firefox_OS
+translation_of: Archive/B2G_OS/Platform/Out_of_memory_management_on_Firefox_OS
+---
+<div class="summary">
+ <p><span class="seoSummary">Firefox OS 會運行在一些記憶體容量不大的裝置上,當程序用盡了記憶體,系統核心就必須關閉其他程序好釋放出記憶體使用。本文旨在描述記憶體關閉和記憶體不足通知如何運作、如何控制關閉那些程序,以確保當記憶體不夠時,主系統還是可以運作。</span></p>
+</div>
+<p>記憶體不足時會有兩個系統介入管理: <strong>Low memory killer (LMK)</strong> 與<strong> Low memory notifications</strong>.</p>
+<h2 id="Low_memory_killer">Low memory killer</h2>
+<p><a href="https://android.googlesource.com/kernel/common.git/+/edd540ea92954f896bfb7ee0ebf5dfdde6e6cb41/drivers/staging/android/lowmemorykiller.txt">LMK</a> 是 Android 核心的次系統,這個次系統負責關閉程序好騰出記憶體使用。為了決定程序關閉優先順序,每一個程序都會透過 <a href="https://www.kernel.org/doc/Documentation/filesystems/proc.txt">/proc/&lt;pid&gt;/oom_adj or /proc/&lt;pid&gt;/oom_score_adj files</a> 被賦予一個優先值,這個優先值為調整分數(adjustment score 或 <code>oom_adj</code>)。</p>
+<p>一般來說 oom_adj 值越大,程序越容易被刪除,LMK 提供多個層級,每個層級對應到一定容量的可用記憶體以及最小 oom_adj 值。當可用記憶體掉到某一個層級,所有 oom_adj 值大於該層級 oom_adj 值的程序都有可能被關閉,LMK 會從占用最多記憶體的程序開始一個一個關閉,直到可用記憶體回復到安全層級為止。</p>
+<div class="note">
+ <p><strong>Note</strong>: 被 LMK 關閉的背景 app 仍然以 "殭屍 app" 的形式存在在程序管理員 (task manager),下次再回到該 app,app 會被重新喚醒。目前最大殭屍 app 的數量是 10。</p>
+</div>
+<div class="note">
+ <p><strong>Note</strong>: 為了記憶體不足被關閉的 app 不一定就是造成記憶體不足的原因。</p>
+</div>
+<h3 id="程序關閉優先順序">程序關閉優先順序</h3>
+<p>Firefox OS 關閉 app 的優先順序是由每個 app 給定的優先層級和相關聯的 OOM 調整分數所決定 (<a href="http://hg.mozilla.org/mozilla-central/file/545c35907eff/b2g/app/b2g.js#l661">現有值都存在 pref</a>):</p>
+<ol>
+ <li>最先關閉的 app 是背景 app,最近最少使用的。</li>
+ <li>第二是 homescreen app。</li>
+ <li>接下來是使用者可察覺的背景 app (例如,在背景撥放音樂的程式,或高優先 (high-priority)、或持有 cpu wakelock 並且註冊有系統訊息處理器(system messages handler) 的 app)。</li>
+ <li>第四是鍵盤程式。</li>
+ <li>前景 (Foreground) app 則是第五順位被關閉的 app。</li>
+ <li>最後則是前景高優先 (high-priority)、或持有 cpu wakelock 的前景 app。</li>
+</ol>
+<div class="note">
+ <p><strong>Note</strong>: 大部分在前景的子程序持有為 2 的oom_adj,背景子程序則持有 3 ~ 6 的 oom_adj,背景子程序到底會持有多大 oom_adj 值取決於許多因素,比如說是否撥放音月或是否屬於 homescreen app。</p>
+</div>
+<p>下面是例外:</p>
+<ul>
+ <li>主程序永遠不會被關閉,因為一旦主程序被關閉,所有子程序也會被關閉,系統會重新啟動;主程序的 oom_adj 為 0。</li>
+ <li>為了加速新程序啟動,會有一個 <strong>preallocated process</strong> 被一直保留著,這個程序耗費的記憶體相當少,但卻可以顯著加速程式啟動。除非所有能關閉的程序都關閉了,但主程序需要的記憶體依然不足,這時 preallocated process 才會被關閉。</li>
+</ul>
+<h2 id="記憶體過低通知">記憶體過低通知</h2>
+<p>第二個釋放記憶體的機制是記憶體過低通知。當可用記憶體量低過一定的<a href="https://www.codeaurora.org/cgit/quic/la//kernel/msm/commit/?id=b3f986cba580b14438b77b42070ebbc77b69d4c4">門檻值</a>,LMK 便會向使用者空間 (userspace) 發出記憶體過低通知,系統 app 和一般使用者 app 都會等待這個通知,然後透過觀察器服務 (observer service) 發出 <code>memory-pressure 事件回應之;這個事件</code> app 不會直接看見,只有 C++ 和 Chrome JS 程式碼會看到,在 Gecko 裡我們從這個事件中會盡一切可能釋放記憶體 — 通常是刪除內部快取 (images, DNS, sqlite, 等等),拋棄可以回復的物件 (比如 WebGL contexts) 還有執行垃圾回收機制。<br>
+ <br>
+ 當碰到記憶體過低狀況時,第一個發出的 <code>memory-pressure</code> 事件會有 <code>low-memory</code> <code>負載,倘若經過預定的5秒後我們依然處於記憶體過低狀態,另一個 <code>memory-pressure</code> 事件會發出,不過這一次是帶著</code> <code>low-memory-ongoing</code> 負載,這個時候我們持續處於記憶體過低狀態,很明顯地像一些垃圾回收機制等大動作的作法也不夠了,所以其他一些更低階的記憶體釋放作法會被採行。</p>
+<h2 id="LMK_和記憶體過低通知如何協同運作">LMK 和記憶體過低通知如何協同運作</h2>
+<p>目前<a href="http://hg.mozilla.org/mozilla-central/file/545c35907eff/b2g/app/b2g.js#l722">記憶體過低門檻介於 LMK 的背景 app 層級(大於)和 homescreen 層級(小於)之間</a>,所以整體記憶體不足的反應機制如下:</p>
+<ol>
+ <li>關閉最近最不常用的背景 app。</li>
+ <li>當記憶體依然不足,發出 <code>memory-pressure</code> 事件通知給所有的 app。</li>
+ <li>當記憶體依然不足,每5秒發出 <code>memory-pressure</code> 事件,但標記為 ongoing 讓垃圾回收機制不要回應。</li>
+ <li>關閉 homescreen.</li>
+ <li>關閉使用者可察覺或高優先值的背景 app。</li>
+ <li>關閉運作中的鍵盤 app。</li>
+ <li>關閉前景 app。</li>
+ <li>關閉高優先值的前景 app。</li>
+ <li>關閉 preallocated 程序。</li>
+</ol>
diff --git a/files/zh-tw/archive/b2g_os/preparing_for_your_first_b2g_build/index.html b/files/zh-tw/archive/b2g_os/preparing_for_your_first_b2g_build/index.html
new file mode 100644
index 0000000000..1d165926a1
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/preparing_for_your_first_b2g_build/index.html
@@ -0,0 +1,138 @@
+---
+title: 準備第一次建置 B2G
+slug: Archive/B2G_OS/Preparing_for_your_first_B2G_build
+translation_of: Archive/B2G_OS/Preparing_for_your_first_B2G_build
+---
+<p>在開始建置 B2G 前,要先複製整個倉儲 (repository)並且作編譯的設定。這篇文章說明要怎麼做。</p>
+
+<h2 id="複製_B2G_倉儲repository">複製 B2G 倉儲(repository)</h2>
+
+<p>在第一次編譯前,要做的第一步就是複製 B2G 的倉儲(repository)。這個步驟將不會把所有東西抓下來!相反地,他會抓 B2G 建置系統和安裝工具。B2G 大部分的程式碼都在主要的 Mozilla <a href="/en/Mercurial" title="en/Mercurial">Mercurial</a> 倉儲。</p>
+
+<p>用 git 來複製倉儲:</p>
+
+<pre>git clone git://github.com/mozilla-b2g/B2G.git</pre>
+
+<p>複製了之後(應該會花個幾分鐘),<code>cd</code> 到 B2G 的目錄:</p>
+
+<pre>cd B2G
+</pre>
+
+<h2 id="複製_B2G_樹tree到一台新機器">複製 B2G 樹(tree)到一台新機器</h2>
+
+<p>當您有一台新電腦時(超幸運的!),您會覺得把 B2G tree 從一台電腦轉移到另一台電腦的話,生活會簡單很多。</p>
+
+<p>將您就電腦的磁碟掛上(mount)到新的電腦,然後敲入下面的指令,就可以做到:</p>
+
+<pre>rsync -a <em>source</em>/ <em>dest</em>/
+</pre>
+
+<p><code>source </code>是整個原始碼樹(source tree)的完整路徑 (包括後面的斜線),而 <code>dest</code> 是您要複製的目的位置 (同樣也包含後面的斜線,它很重要!)。</p>
+
+<p>這樣做之後,您可以跳過這篇文章剩下的部份,然後直接跳到的「<a href="/en/Mozilla/Boot_to_Gecko/Building_Boot_to_Gecko" title="en/Mozilla/Boot_to_Gecko/Building_Boot_to_Gecko">建置</a>」部份。</p>
+
+<h2 id="設定專屬於您的行動裝置的_B2G">設定專屬於您的行動裝置的 B2G</h2>
+
+<div class="warning"><strong>重要</strong>:請注意只支援 <strong>Android 4</strong> (aka. <strong>Ice Cream Sandwich</strong>) 的行動裝置。請確認您的手機運作的真的是 ICS,否則這個步驟很可能會失敗於某些非 Nexus 裝置的驅動程式。另外,如果您必須要將行動裝置燒成 ICS,請留意有些 USB hubs 和燒錄工具不相容,因此您可能需要將行動裝置連接到內建的 USB port。</div>
+
+<p>擷取了核心的 B2G 建置系統之後,您需要為了要安裝的行動裝置作設定。您可以使用 <code>config.sh</code> 工具來擷取支援的行動裝置列表,如下:</p>
+
+<pre>./config.sh
+</pre>
+
+<p>這會顯示支援的行動裝置列表;舉例來說:</p>
+
+<pre>Usage: ./config.sh [-cdflnq] (device name)
+Flags are passed through to |./repo sync|.
+
+Valid devices to configure are:
+- galaxy-s2
+- galaxy-nexus
+- nexus-4
+- nexus-4-kk
+- nexus-5
+- nexus-5-l
+- nexus-s
+- nexus-s-4g
+- flo (Nexus 7 2013)
+- otoro
+- unagi
+- inari
+- keon
+- peak
+- hamachi
+- helix
+- tarako
+- dolphin
+- dolphin-512
+- pandaboard
+- vixen
+- flatfish
+- flame
+- flame-kk
+- flame-l
+- rpi (Revision B)
+- emulator
+- emulator-jb
+- emulator-kk
+- emulator-l
+- emulator-x86
+- emulator-x86-jb
+- emulator-x86-kk
+- emulator-x86-l
+&gt; Sony Xperia devices
+- aries (Z3 Compact KK)
+- aries-l (Z3 Compact L)
+- leo-kk (Z3 KK)
+- leo-l (Z3 L)
+- scorpion-l (Z3 Tablet Compact L)
+- sirius-l (Z2 L)
+- tianchi-l (T2U L)
+- flamingo-l (E3 L)</pre>
+
+<p>如果您的行動裝置沒被列出,您應該馬上停止來幫忙將 B2G 移植到您的行動裝置,或是等到某個人移植完之後再安裝。我們當然比較希望您可以幫忙移植!</p>
+
+<div class="note">注意:如果因為任何原因您想要編譯某個版本的 Gecko,請在您著手之前先看 <a href="#Building_against_a_custom_Gecko">Building against a custom Gecko</a>。</div>
+
+<h3 id="設定給行動裝置">設定給行動裝置</h3>
+
+<p>首先,連接您的裝置;設定的過程會需要存取它。</p>
+
+<p>如果您的裝置有被列出,您可以再執行一次 <code>config.sh 來開始設定的程序,這次需要指名您的行動裝置的名字。舉例來說,如果要編譯給 Samsung Google Nexus S的話,您要打:</code></p>
+
+<pre>./config.sh nexus-s
+</pre>
+
+<p>在設定一開始的附近您可能會需要設定使用顏色的選項,而在這之後設定程序會繼續下去。接著可以去喝個咖啡休息一下,因為這個時候您會第一次把建置 Boot to Gecko 中所有需要的程式碼都抓下來。</p>
+
+<p>如果您的手機不再使用 Android 且 B2G tree 還沒裝到手機上,而您又有遵照前幾頁所說、聰明地作了一份 <code>/system</code> 磁區的備份的話,您可以這樣使用它:</p>
+
+<pre>ANDROIDFS_DIR=&lt;absolute path to parent dir of system dir&gt; ./config.sh &lt;target&gt;
+</pre>
+
+<h3 id="設定來建置模擬器">設定來建置模擬器</h3>
+
+<p>如果您要編譯模擬器的話,就需要指定 "emulator" 來使用 ARM 的模擬器,或是 "emulator-x86" 來編譯 x86 模擬器。後者比較快,但也因此在表現實際行動裝置上較不準確。<br>
+ <br>
+ 舉例來說,您要像下面這樣設定來編譯 ARM 模擬器:</p>
+
+<pre>./config.sh emulator
+</pre>
+
+<p>在設定一開始的附近您可能會需要設定使用顏色的選項,而在這之後設定程序會繼續下去。接著可以去喝個咖啡休息一下,因為這個時候您會第一次把建置 Boot to Gecko 中所有需要的程式碼都抓下來。</p>
+
+<h2 id="編譯客製的_Gecko">編譯客製的 Gecko</h2>
+
+<p>可能您會想要或需要以好幾種版本的 Gecko 來編譯 Boot to Gecko (manifest 中預設是一種)。您可以在您抓倉儲 (在上述的 config.sh 之前),藉由編輯 .userconfig 來做到這件事情。舉例來說,如果您要根據 mozilla-central 來編譯:</p>
+
+<pre>GECKO_PATH=/path/to/mozilla-central
+GECKO_OBJDIR=/path/to/mozilla-central/objdir-gonk
+</pre>
+
+<div class="note">
+<p>注意: 如果是在 Mac OS X 下客製化編譯的話,檔案系統本身會注意 mozilla-central 的大小寫。</p>
+</div>
+
+<p>您可以參考 <a href="/en-US/docs/Mozilla/Boot_to_Gecko/Customization_with_the_.userconfig_file" title="/en-US/docs/Mozilla/Boot_to_Gecko/Customization_with_the_.userconfig_file">客製化 .userconfig 設定檔</a> 來客製化更多東西。</p>
+
+<p>接著,<a href="/en/Mozilla/Boot_to_Gecko/Building_Boot_to_Gecko" title="en/Mozilla/Boot_to_Gecko/Building_Boot_to_Gecko">開始編譯</a></p>
diff --git a/files/zh-tw/archive/b2g_os/quickstart/app_tools/index.html b/files/zh-tw/archive/b2g_os/quickstart/app_tools/index.html
new file mode 100644
index 0000000000..bc539adefa
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/quickstart/app_tools/index.html
@@ -0,0 +1,28 @@
+---
+title: App tools
+slug: Archive/B2G_OS/Quickstart/App_tools
+translation_of: Archive/B2G_OS/Quickstart/App_tools
+---
+<div class="summary">
+ <p><span class="short_text" id="result_box" lang="zh-TW"><span><span class="short_text" id="result_box" lang="zh-TW"><span>您</span></span>用什麼</span><span>來建</span><span>立開放式</span><span>Web應用程序</span></span>?<span class="short_text" id="result_box" lang="zh-TW"><span>答案</span><span>是,"</span><span>你通常會</span><span>用它來</span><span>建立</span><span>網絡'</span><span>。</span></span><span class="short_text" id="result_box" lang="zh-TW"><span>以下是</span><span>工具和資源</span><span>的清單</span><span>,可以</span><span>幫助您開始</span><span>做</span><span>開放式</span><span>Web應用程序</span><span>。</span></span><span id="result_box" lang="zh-TW"><span>他們可以</span><span>很容易地成</span><span>您現有的</span><span>Web開發工作流程</span><span>,如果</span><span>你有一個,</span><span>或者你</span><span>可以將它們</span><span>周圍</span><span>建立為一個</span><span>新的工作流程</span><span>。</span></span></p>
+</div>
+<h2 id="應用程序驗證程序"><span class="short_text" id="result_box" lang="zh-TW"><span>應用程序</span><span>驗證程序</span></span></h2>
+<p><span class="short_text" id="result_box" lang="zh-TW"><span>您的應用程序</span><span>以準備好</span><span>進入Firefox</span><span>市場</span><span>?</span></span><span class="short_text" id="result_box" lang="zh-TW"><span><a href="https://marketplace.firefox.com/developers/validator">應用程序驗證器</a><span>會</span><span>檢查你的</span><span>清單</span><span>,並會</span><span>顯示任何</span><span>錯誤,</span><span>它也有可能<span class="short_text" id="result_box" lang="zh-TW"><span><span>會</span><span>顯示</span></span></span></span><span>你沒有考慮</span><span>過的警告</span><span>。</span></span></span></p>
+<h2 id="火狐系統模擬器"><span class="short_text" id="result_box" lang="zh-TW"><span>火狐</span><span>系統</span><span>模擬器</span></span></h2>
+<p><span class="short_text" id="result_box" lang="zh-TW"><span>安裝和</span><span>使用</span></span><span class="short_text" id="result_box" lang="zh-TW"><span><a href="https://marketplace.firefox.com/developers/docs/firefox_os_simulator">火狐系統模擬器</a>是</span><span>開始</span><span>和令</span><span>你的應用程序</span><span>運行</span><span>的</span><span>最簡單的方法</span><span>。</span></span><span class="short_text" id="result_box" lang="zh-TW"><span>安裝</span><span>後</span><span>的</span><span>模擬器,</span><span>通過 工具</span><span>-</span><span>&gt;</span> <span class="hps">Web開發</span><span> -</span><span>&gt;</span><span> 火狐</span><span class="short_text" id="result_box" lang="zh-TW"><span>系統</span></span><span>模擬器</span><span>菜單。<span class="short_text" id="result_box" lang="zh-TW"><span>啟動後,</span></span></span></span><span class="short_text" id="result_box" lang="zh-TW"><span> 便會有JavaScript控制台</span><span>,以便您</span><span>可以</span><span>從模擬器</span><span>中</span><span><span class="short_text" id="result_box" lang="zh-TW"><span>測</span></span>試應用程序</span><span>的</span><span>啟動</span><span><span class="short_text" id="result_box" lang="zh-TW"><span>和刪除</span><span>錯誤</span></span>!</span></span></p>
+<h2 id="應用程序管理器"><span class="short_text" id="result_box" lang="zh-TW"><span>應用程序管理器</span></span></h2>
+<div class="almost_half_cell" id="gt-res-content">
+ <div dir="ltr" style="zoom: 1;">
+  </div>
+</div>
+<p><span class="short_text" id="result_box" lang="zh-TW"><span>新</span><span>的測試工具</span><span>被稱為</span><span><a href="/en-US/docs/Mozilla/Firefox_OS/Using_the_App_Manager">應用程序管理器</a></span><span>。</span></span><span class="short_text" id="result_box" lang="zh-TW"><span><span class="short_text" id="result_box" lang="zh-TW"><span>這個工具</span><span>可以讓你</span><span>通過USB</span>以<span>火狐</span><span>來連接至兼容的</span><span>設備(或</span><span>一個<span class="short_text" id="result_box" lang="zh-TW"><span>火狐</span><span class="short_text" id="result_box" lang="zh-TW"><span>系統</span></span><span>模擬器</span></span></span><span>)</span></span></span></span><span class="short_text" id="result_box" lang="zh-TW"><span>把</span><span>應用程序</span><span>直接</span><span>存在設備上,</span><span>驗證</span><span>的應用程序,</span><span>並</span><span>在</span><span>設備上<span class="short_text" id="result_box" lang="zh-TW"><span><span class="short_text" id="result_box" lang="zh-TW"><span>刪除</span><span>錯誤</span></span></span></span></span><span>。</span></span></p>
+<h2 id="Firefox的開發者工具">Firefox的<span class="short_text" id="result_box" lang="zh-TW"><span>開發者工具</span></span></h2>
+<div class="almost_half_cell" id="gt-res-content">
+ <div dir="ltr" style="zoom: 1;">
+ <div class="almost_half_cell" id="gt-res-content">
+ <div dir="ltr" style="zoom: 1;">
+ <span class="short_text" id="result_box" lang="zh-TW"><span>火狐</span><span>現在提供</span><span>了一套</span><span>開發</span><span>工具</span><span>,確保</span><span>了極大的發展</span><span>經驗</span><span>,既</span><span>好用</span><span>,又高效率。<span id="result_box" lang="zh-TW"><span>欲了解更多</span><span>有關這些工具</span><span>如何運作</span><span>,看看</span><span>還有什麼</span><span>的Mozilla</span><span>所提供的,</span><span>請到我們的</span><span><a href="/en-US/docs/Tools">工具區域</a></span><span>。</span></span></span></span></div>
+ </div>
+ </div>
+</div>
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/quickstart/index.html b/files/zh-tw/archive/b2g_os/quickstart/index.html
new file mode 100644
index 0000000000..a5bb4fa406
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/quickstart/index.html
@@ -0,0 +1,51 @@
+---
+title: Build
+slug: Archive/B2G_OS/Quickstart
+tags:
+ - Apps
+ - NeedsTranslation
+ - Quickstart
+ - TopicStub
+translation_of: Archive/B2G_OS/Quickstart
+---
+<div class="summary">
+ <p><span class="seoSummary">Quickstart information on coding open web apps.</span></p>
+</div>
+<dl>
+ <dt>
+ <a href="/en-US/docs/Web/Apps/Quickstart/Build/Intro_to_open_web_apps">Introduction to open web apps</a></dt>
+ <dd>
+ What are open web apps? How they differ from regular web pages? Why is this significant? This article aims to answer these questions and more.</dd>
+ <dt>
+ <a href="/en-US/docs/Web/Apps/Quickstart/Build/Your_first_app">Your first app</a></dt>
+ <dd>
+ This article takes you through the basic steps and additional knowledge on top of regular web development required to create installable open web apps.</dd>
+ <dt>
+ <a href="/en-US/docs/Web/Apps/Quickstart/Build/Intro_to_Firefox_OS">Introduction to Firefox OS</a></dt>
+ <dd>
+ An introduction to Firefox OS, Mozilla's new open web app-based mobile platform.</dd>
+ <dt>
+ <a href="/en-US/docs/Web/Apps/Quickstart/Build/Intro_to_manifests">Introduction to manifests</a></dt>
+ <dd>
+ An FAQ designed to answer any questions you may have about manifests, hosting apps, origins, and other such topics.</dd>
+ <dt>
+ <a href="/en-US/docs/Web/Apps/Quickstart/Build/For_Web_developers">App development for web developers</a></dt>
+ <dd>
+ If you're a web developer, how do open web apps differ from what you're used to? This article explains all.</dd>
+ <dt>
+ <a href="/en-US/docs/Web/Apps/Quickstart/Build/For_mobile_developers">App development for mobile developers</a></dt>
+ <dd>
+ If you're a native mobile application developer, what advantages can open web apps bring to you, and how do they differ from what you are used to? Here are some ideas.</dd>
+ <dt>
+ <a href="/en-US/docs/Web/Apps/Quickstart/Build/Developing_app_functionality">Developing app functionality</a></dt>
+ <dd>
+ This page talks about the kinds of different functionality that you might want to build into your apps, with links to further information.</dd>
+ <dt>
+ <a href="/en-US/docs/Web/Apps/Quickstart/Build/Payments">Payments</a></dt>
+ <dd>
+ How do you build functionality to make people pay for installing your open web apps? Here is the lowdown.</dd>
+ <dt>
+ <a href="/en-US/docs/Web/Apps/Quickstart/Build/App_tools">App tools</a></dt>
+ <dd>
+ Last for this section, we provide some links to more information on the tools available to help you develop great open web apps.</dd>
+</dl>
diff --git a/files/zh-tw/archive/b2g_os/quickstart/your_first_app/index.html b/files/zh-tw/archive/b2g_os/quickstart/your_first_app/index.html
new file mode 100644
index 0000000000..d40315b16c
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/quickstart/your_first_app/index.html
@@ -0,0 +1,265 @@
+---
+title: Your first app
+slug: Archive/B2G_OS/Quickstart/Your_first_app
+translation_of: Archive/B2G_OS/Quickstart/Your_first_app
+---
+<div class="note">
+<p><strong>Note</strong>: 快速入門這段章節已經取代先前舊的快速入門章節,更新為最新的及更專注於<a href="/en-US/Apps/Build/installable_apps_for_Firefox_OS/Firefox_OS_app_essentials">Firefox OS app essentials</a> 文章。我們希望你將發現這份是比舊文更有用和更快學習經驗的文章。</p>
+</div>
+
+<article class="brush: js">
+<div class="summary">
+<p>開放式Web應用讓開發人員實現了期盼多年的夙願:通過Firefox OS這一首款開放式Web應用平台,可以僅僅使用HTML、CSS和JavaScript在跨平台的環境中生成可部署的應用。本手冊包含了基本的架構和應用構建指南,你能夠迅速掌握這些內容並開始創造自己的下一個偉大的應用!</p>
+</div>
+
+<p>如果你想按照本指南開發,你可以下載我們的<a href="https://github.com/chrisdavidmills/mdn-app-template">quick start app template</a>.  或可以藉由參閱我們的<a href="/en-US/docs/Project:MDN/Style_guide/Sample_app_coding_guidelines#Apps_template">Apps template</a> 指南,找到更多有關的內容。</p>
+
+<h2 id="App_結構">App 結構</h2>
+
+<h3 id="打包型_Apps_VS._托管型_Apps">打包型 Apps VS. 托管型 Apps</h3>
+
+<p>開放網絡應用有兩種類型:打包型和托管型。打包型apps本質上來說就是一個包含各種HTML、CSS、JavaScript、圖像、表單等應用資源的zip文件。托管型apps在一個給定域名的服務器上運行,就像是一個獨立的網站。兩種應用都需要有有效的表單。到了要在火狐市場中列出你的app,你要上傳app zip文件或提供托管app所在的URL。</p>
+
+<div style="width: 480px; margin: 0 auto;">
+<p>{{EmbedYouTube("Q7x-B13y33Q")}}</p>
+
+<div class="video-caption">
+<p>用Treehouse為製作夥伴: <a class="button" href="http://teamtreehouse.com/?cid=1154">Check them out!</a></p>
+</div>
+</div>
+
+<p>本指南的目的,會讓你將創建一個於本機(localhost)地址上的托管型app。一旦你的app準備好進入火狐市場,你可以選擇把它作為打包app或作為托管app啓動。</p>
+
+<h3 id="App_表單">App 表單</h3>
+
+<p>每一個火狐app都需要一個位於根目錄下的manifest.webapp文件, 這個<a href="https://developer.mozilla.org/en-US/docs/Web/Apps/Manifest"><code>manifest.webapp</code></a> 文件提供app有關的重要信息,如:版本、名稱、描述、圖標位址、本地字符串、指明app可以從哪兒被安裝等等。只有名稱和描述是必須的。app模板中的簡單表單如下所示:</p>
+
+<pre class="brush: js">{
+ "version": "0.1",
+ "name": "Open Web App",
+ "description": "Your new awesome Open Web App",
+ "launch_path": "/app-template/index.html",
+ "icons": {
+ "16": "/app-template/app-icons/icon-16.png",
+ "48": "/app-template/app-icons/icon-48.png",
+ "128": "/app-template/app-icons/icon-128.png"
+ },
+ "developer": {
+ "name": "Your Name",
+ "url": "http://yourawesomeapp.com"
+ },
+ "locales": {
+ "es": {
+ "description": "Su nueva aplicación impresionante Open Web",
+ "developer": {
+ "url": "http://yourawesomeapp.com"
+ }
+ },
+ "it": {
+ "description": "La tua nuova fantastica Open Web App",
+ "developer": {
+ "url": "http://yourawesomeapp.com"
+ }
+ }
+ },
+ "default_locale": "en"
+}</pre>
+
+<div style="width: 480px; margin: 0 auto;">
+<p>{{EmbedYouTube("dgAUgHQOm8M")}}</p>
+
+<div class="video-caption">
+<p>Made in partnership with Treehouse: <a class="button" href="http://teamtreehouse.com/?cid=1154">Check them out!</a></p>
+</div>
+</div>
+
+<p> </p>
+
+<p>一個基本的表單是你所需要最先上手的地方。關於表單的更多細節,見<a href="/en-US/docs/Web/Apps/Manifest">App Manifest</a>.</p>
+
+<h2 id="App_佈局_設計">App 佈局 &amp; 設計</h2>
+
+<p>隨著不同設備上屏幕解析度標準的增多,響應式設計已經變得越來越重要。即使你app的主要目標平台是移動平台比如Firefox OS,其他設備很有可能也會訪問它。<a href="//developer.mozilla.org/docs/CSS/Media_queries">CSS media queries</a> 使你可以根據設備調整佈局,如下的CSS樣例中所示的結構:</p>
+
+<pre class="brush: css">/* The following are examples of different CSS media queries */
+
+/* Basic desktop/screen width sniff */
+@media only screen and (min-width : 1224px) {
+ /* styles */
+}
+
+/* Traditional iPhone width */
+@media
+ only screen and (-webkit-min-device-pixel-ratio : 1.5),
+ only screen and (min-device-pixel-ratio : 1.5) {
+ /* styles */
+}
+
+/* Device settings at different orientations */
+@media screen and (orientation:portrait) {
+ /* styles */
+}
+@media screen and (orientation:landscape) {
+ /* styles */
+}</pre>
+
+<p>有許多JavaScript和CSS的框架可以用於協助響應式設計和移動app發展(<a href="http://twitter.github.com/bootstrap">Bootstrap</a>等),選擇最適合你的app和開發樣式的框架即可。</p>
+
+<h2 id="Web_APIs">Web APIs</h2>
+
+<p>JavaScript APIs正隨著設備快速開發,同時地被創造和增強。Mozilla的<a href="https://wiki.mozilla.org/WebAPI">WebAPI</a> 致力於為JavaScript APIs引入成打的標準移動端特性。設備支援和狀況列表可以在<a href="https://wiki.mozilla.org/WebAPI">WebAPI</a> 頁面中查看。在下面這個例子中,JavaScript 特徵偵測仍然是最好的例子:</p>
+
+<pre class="brush: js">// If this device supports the vibrate API...
+if('vibrate' in navigator) {
+ // ... vibrate for a second
+ navigator.vibrate(1000);
+}</pre>
+
+<p>在下面這個例子中,&lt;div&gt;的顯示樣式會根據設備的電池狀態的改變而改變:</p>
+
+<pre class="brush: javascript">// Create the battery indicator listeners
+(function() {
+ var battery = navigator.battery || navigator.mozBattery || navigator.webkitBattery,
+ indicator, indicatorPercentage;
+
+ if(battery) {
+ indicator = document.getElementById('indicator'),
+ indicatorPercentage = document.getElementById('indicator-percentage');
+
+ // Set listeners for changes
+ battery.addEventListener('chargingchange', updateBattery);
+ battery.addEventListener('levelchange', updateBattery);
+
+ // Update immediately
+ updateBattery();
+ }
+
+ function updateBattery() {
+ // Update percentage width and text
+ var level = (battery.level * 100) + '%';
+ indicatorPercentage.style.width = level;
+ indicatorPercentage.innerHTML = 'Battery: ' + level;
+ // Update charging status
+ indicator.className = battery.charging ? 'charging' : '';
+ }
+})();</pre>
+
+<p>在上面的示例代碼中,一旦你確定設備支持<a href="https://developer.mozilla.org/en-US/docs/DOM/window.navigator.battery">Battery API</a>,你就可以為chargingchange 和 levelchange添加 event listeners 來更新元素的樣式。試試添加下面的指令到快速入門模板,你會看到你的工作效果。</p>
+
+<p>時常檢查<a href="https://wiki.mozilla.org/WebAPI">WebAPI</a> 頁面以確保更新設備API的狀態。</p>
+
+<h3 id="Install_API_功能">Install API 功能</h3>
+
+<p>在我們的快速入門應用模板範例中,我們已經實現了一個安裝按鈕,可以在你把應用當作一個標準網頁來瀏覽時可以單擊它來把那個網站當作一個應用安裝在Firefox OS上。按鈕標籤並沒有什麼特別的:</p>
+
+<pre class="brush: html">&lt;button id="install-btn"&gt;Install app&lt;/button&gt;</pre>
+
+<p>按鈕的功能由Install API實現(見install.js):</p>
+
+<pre class="brush: js">var manifest_url = location.href + 'manifest.webapp';
+
+function install(ev) {
+  ev.preventDefault();
+  // define the manifest URL
+  // install the app
+  var installLocFind = navigator.mozApps.install(manifest_url);
+  installLocFind.onsuccess = function(data) {
+    // App is installed, do something
+  };
+  installLocFind.onerror = function() {
+    // App wasn't installed, info is in
+    // installapp.error.name
+    alert(installLocFind.error.name);
+  };
+};
+
+// get a reference to the button and call install() on click if the app isn't already installed. If it is, hide the button.
+var button = document.getElementById('install-btn');
+
+var installCheck = navigator.mozApps.checkInstalled(manifest_url);
+
+installCheck.onsuccess = function() {
+  if(installCheck.result) {
+    button.style.display = "none";
+  } else {
+    button.addEventListener('click', install, false);
+  };
+};
+</pre>
+
+<p>我們來簡要的看一下發生了什麼:</p>
+
+<p>1. 我們得到一個安裝按鈕的引用並把它儲存在button變量中。<br>
+ 2. 我們使用navigator.mozApps.checkInstalled 來檢查這個由http://people.mozilla.com  /~cmills/location-finder/manifest.webapp 這個表單來定義的應用是否已經安裝在設備上。這個測試結果被儲存在installCheck這個變量中。<br>
+  3. 當測試被成功完成時,它的成功會完成事件被觸發,因此installCheck.onsuccess = function() { ... }會被執行。<br>
+  4. 然後我們用一個if語句判斷installCheck.result是否存在?如果存在,以為著app已經被安裝了,我們就隱藏安裝按鈕。在應用已經被安裝的情況下不需要安裝按鈕。<br>
+  5. 如果app沒有被安裝,為按鈕添加一個單擊事件監聽器。所以在按鈕被單擊的時候,install()函數會被執行。<br>
+  6. 當單擊按鈕並且install()函數執行時,我們把表單檔案位置保存在一個叫manifest_url的變量中,然後利用navigator.mozApps.install(manifest_url)來安裝app,用一個installLocFind變量來儲存對那個安裝的app參考資訊。你會注意到安裝也會觸發success和error事件,所以你可以根據應用是否成功安裝來執行不同的動作。</p>
+
+<p>第一次遇到可安裝web apps時,你可能想要覈實<a href="https://developer.mozilla.org/en-US/docs/Web/Apps/JavaScript_API">implementation state of the API</a> 的執行狀態。</p>
+
+<p>注意:可安裝開放web apps有一個「每個來源(origin,感覺就是URL的意思)就是一個app」的安全策略;基本上, 你不可以在一個來源上托管多個可安裝apps。這會讓檢測變得有一點複雜,但是仍有很多辦法解決這個問題,比如為應用創建多個子域名、用Firefox OS模擬器測試應用、或者在Firefox Aurora/Nightly上安裝測試功能,通過這種方式你可以在桌面環境上安裝開發web app。關於來源的跟多信息詳見<a href="https://developer.mozilla.org/en-US/docs/Web/Apps/FAQs/About_app_manifests">FAQs about apps manifests</a>。</p>
+
+
+<h2 id="WebRT_APIs_(基於權限的_APIs)">WebRT APIs (基於權限的 APIs)</h2>
+
+<p>有些WebAPI雖然可以使用但是需要特定的功能開啓才具有使用的權限。應用可能會像下面這樣在manifest.webapp中記錄權限請求:</p>
+
+<pre class="brush: js">// New key in the manifest: "permissions"
+// Request access to any number of APIs
+// Here we request permissions to the systemXHR API
+"permissions": {
+ "systemXHR": {}
+}</pre>
+
+<p>權限分為下面三個等級:</p>
+
+<ol>
+ <li>
+ <p>一般權限——不需要任何特定訪問權限的API。</p>
+ </li>
+ <li>
+ <p>特殊權限——只要開發者在app表單文件中設置了訪問權限就可以在應用中利用並通過可信任來源進行分發的API。</p>
+ </li>
+ <li>
+ <p>認證權限——控制力設備上關鍵功能的API,比如打電話和發短信的服務。這些一般不允許第三方開發者使用。</p>
+
+ <p>關於應用權限等級的更多信息,請閱讀<a href="https://developer.mozilla.org/en-US/docs/Web/Apps/Packaged_apps#Types_of_packaged_apps" title="/en-US/docs/Web/Apps/Packaged_apps#Types_of_packaged_apps">Types of packaged apps</a>。你可以在應用權限中找到更多關於API要求權限和需要什麼樣的<a href="/en-US/docs/Web/Apps/App_permissions">App permissions</a>.。</p>
+ </li>
+</ol>
+
+<div class="note">
+<p>有一點需要注意的很重要就是不是所有的Web API都可以在Firefox OS模擬器中執行。</p>
+</div>
+
+<h2 id="工具_測試">工具 &amp; 測試</h2>
+
+<p>測試在對移動應用的支持中是至關重要的。測試可安裝的開放web app有多種方式。</p>
+
+<h2 id="WebIDE_和_Firefox_OS_模擬器">WebIDE 和 Firefox OS 模擬器</h2>
+
+<p>安裝和使用Firefox OS模擬器是啓動和運行你的應用最簡單的方式。在你安裝模擬器之後,可以通過工具-&gt;web開發者-&gt;Firefox OS模擬器菜單來啓動。模擬器啓動時會有一個Javascript控制台,這樣你就可以在模擬器中調試你的應用。</p>
+
+<p>測試工具的新寵兒被稱為app管理器<a href="/en-US/docs/Tools/WebIDE">WebIDE</a>。這個工具允許你通過USB鏈接桌面火狐瀏覽器和一個可兼容性設備(或者一個Firefox OS模擬器),直接將app推送到設備上,驗證app並且像運行在設備上一樣的調試。</p>
+
+<h3 id="單元測試">單元測試</h3>
+
+<p>當在測試不同設備和版本時,單元測試就會非常有價值。jQuery的<a href="http://qunitjs.com">QUnit</a> 是一個流行的客戶端測試工具,當然你也可以使用任何你喜歡的測試工具。</p>
+
+<h3 id="在設備上安裝Firefox_OS">在設備上安裝Firefox OS</h3>
+
+<p>既然Firefox OS是一個開源平台,代碼和工具都可以用於在你自己的設備上構建和安裝Firefox OS。構建和安裝指南以及什麼設備可以安裝的注意事項可以在<a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform">MDN</a>上發現。</p>
+
+<p>特定的Firefox OS開發者預覽版設備可以在<a href="https://marketplace.firefox.com/developers/dev_phone">Developer preview phone page</a>找到更多信息。<br>
+ 應用。</p>
+
+<h2 id="App_提交和分發">App 提交和分發</h2>
+
+<p>一旦你的app完成,你可以像標準網站或app一樣托管它(更多信息請閱讀<a href="/en-US/docs/Web/Apps/Publishing/Self-publishing_Apps">Self-publishing apps</a> ),或者可以<a href="https://marketplace.firefox.com/developers/submit/app/manifest">submitted</a>到<a href="https://marketplace.firefox.com">Firefox Marketplace</a>。你的app表單將被驗證並且你可以選擇你的應用將支持的設備(比如:Firefox OS、桌面版火狐瀏覽器、移動版火狐瀏覽器、平板火狐瀏覽器)。一旦驗證通過,你可以為你的app添加更多細節(截屏、描述、價格等)並且正式在火狐市場中提交app列表。提交成功後,你的應用可以被任何人購買和安裝。</p>
+
+<h3 id="更多商場_上市信息">更多商場 &amp; 上市信息</h3>
+
+<p>    1. 向Firefox OS商場中提交應用 <a href="/en-US/docs/Web/Apps/Publishing/Submitting_an_app">Submitting an App to the Firefox OS Marketplace </a><br>
+     2. 市場審查標準<a href="/en-US/docs/Web/Apps/Publishing/Marketplace_review_criteria"> Marketplace Review Criteria </a><br>
+     3. 應用提交演練視頻 <a href="http://s.vid.ly/embeded.html?link=8k2n4w&amp;autoplay=false">App Submission Video Walkthrough</a></p>
+</article>
diff --git a/files/zh-tw/archive/b2g_os/releases/1.2/index.html b/files/zh-tw/archive/b2g_os/releases/1.2/index.html
new file mode 100644
index 0000000000..bc8f785f6b
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/releases/1.2/index.html
@@ -0,0 +1,465 @@
+---
+title: Firefox OS 1.2 for developers
+slug: Archive/B2G_OS/Releases/1.2
+translation_of: Archive/B2G_OS/Releases/1.2
+---
+<div class="summary">
+<p><span class="seoSummary">Firefox OS 1.2 is at a pre-release stage right now. Its Gecko component is based on Firefox 26 (encompassing all Gecko additions between Firefox 19 and Firefox 26; see <a href="/en-US/docs/Mozilla/Firefox/Releases/26">Firefox 26 release notes for developers</a> for the latest.) This page details the developer features newly implemented in Firefox OS 1.2.</span></p>
+</div>
+
+<h2 id="Developer_Tools">Developer Tools</h2>
+
+<ul>
+ <li>Firefox OS versions 1.2 and above are compatible with the <a href="/en-US/docs/Mozilla/Firefox_OS/Using_the_App_Manager">Firefox App Manager</a>.</li>
+</ul>
+
+<h2 id="HTML">HTML</h2>
+
+<p>General Gecko:</p>
+
+<ul>
+ <li>The <code><a href="/zh-TW/docs/Web/HTML/Element/iframe#attr-srcdoc">srcdoc</a></code> attribute of <a href="/zh-TW/docs/Web/HTML/Element/iframe" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;iframe&gt;</code></a>, allowing the inline specification of the content of an <a href="/zh-TW/docs/Web/HTML/Element/iframe" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;iframe&gt;</code></a>, is now supported (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=802895" title="FIXED: implement &lt;iframe srcdoc=''> to allow document content in iframe to be specified inline">bug 802895</a>).</li>
+ <li>When used with a <code>"image/jpeg"</code> type, the method <code>HTMLCanvasElement.toBlob</code> now accepts a third attribute defining the quality of the image (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=891884" title="FIXED: toBlob should support the quality parameter as toDataURL does">bug 891884</a>).</li>
+ <li>The <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track" title="The track element is used as a child of the media elements—&lt;audio> and &lt;video>—and does not represent anything on its own. It lets you specify timed text tracks (or time-based data)."><code>&lt;track&gt;</code></a> element has been implemented behind the <code>media.webvtt.enabled</code> property (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=833385" title="FIXED: [webvtt] Implement Track element and TextTrack* DOM classes">bug 833385</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/HTML/Element/blink" title="非標準元素 HTML Blink(&lt;blink>)可以讓該元素裡面的文字緩慢閃爍。"><code>&lt;blink&gt;</code></a> element support is now completely dropped. The <code>&lt;blink&gt;</code> tag now implements the <a href="/zh-TW/docs/Web/API/HTMLUnknownElement" title="The documentation about this has not yet been written; please consider contributing!"><code>HTMLUnknownElement</code></a> interface (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=857820" title="FIXED: Drop only blink effect from text-decoration: blink; and completely remove &lt;blink> element">bug 857820</a>).</li>
+ <li>The <code>range</code> state of the <a href="/zh-TW/docs/Web/HTML/Element/input" title="The HTML &lt;input> element is used to create interactive controls for web-based forms in order to accept data from the user."><code>&lt;input&gt;</code></a> element (<code>&lt;input type="range"&gt;</code>) has been switched on by default (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=841950" title="FIXED: Flip the pref to enable &lt;input type=range> for release builds">bug 841950</a>).</li>
+ <li>The HTML5 <a href="/zh-TW/docs/Web/HTML/Element/data" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;data&gt;</code></a> element has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=839371" title="FIXED: Implement HTML5 &lt;data> element">bug 839371</a>).</li>
+ <li>The HTML5 <a href="/zh-TW/docs/Web/HTML/Element/time" title="HTML &lt;time> element 用以表示時間,可以是24小時制時間或以公曆紀年的日期(日期可以添加時間和時區的資訊)"><code>&lt;time&gt;</code></a> element has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=629801" title="FIXED: Implement HTML5 &lt;time> element">bug 629801</a>).</li>
+ <li>The <code>range</code> state of the <a href="/zh-TW/docs/Web/HTML/Element/input" title="The HTML &lt;input> element is used to create interactive controls for web-based forms in order to accept data from the user."><code>&lt;input&gt;</code></a> element (<code>&lt;input type="range"&gt;</code>) has been implemented, behind the preference <code>dom.experimental_forms_range</code>, only enabled by default on Nightly and Aurora channel (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=841948" title="FIXED: Flip the pref to enable &lt;input type=range> on Nightly and Aurora">bug 841948</a>).</li>
+ <li>The support for the <a href="/zh-TW/docs/Web/HTML/Element/template" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;template&gt;</code></a> element, part of the Web component specification has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=818976" title="FIXED: Implement web components template.">bug 818976</a>).</li>
+ <li>The <code><a href="/zh-TW/docs/Web/HTML/Element/style#attr-scoped">scoped</a></code> attribute has been added to the <a href="/zh-TW/docs/Web/HTML/Element/style" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;style&gt;</code></a> element. It allows to include styles that are isolated from the rest of the document. Such styles can be selected using the <a href="/zh-TW/docs/Web/CSS/:scope" title="The documentation about this has not yet been written; please consider contributing!"><code>:scope</code></a> CSS pseudo-element introduced in Firefox 20. (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=508725" title="FIXED: Implement HTML 5 scoped attribute on STYLE tag">bug 508725</a>).</li>
+ <li>The new HTML <a href="/zh-TW/docs/Web/HTML/Element/main" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;main&gt;</code></a> element has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=820508" title="FIXED: Add support for &lt;main> element">bug 820508</a>).</li>
+ <li>Support for the <code><a href="/zh-TW/docs/Web/HTML/Element/a#attr-download">download</a></code> attribute on the <a href="/zh-TW/docs/Web/HTML/Element/a" title="HTML 的超連結元素(&lt;a>,意為 Anchor)用來定義超連結或連結,至位在任何一個網頁(可以是自己)的目標位置。超連結元素同時也可以用來(儘管此方法已被淘汰)作為網頁中的錨點,此錨點可以讓其他超連結指向網頁中的某部份內容,讓超連結不只是單純連接到網頁的最頂端而已。"><code>&lt;a&gt;</code></a> and <a href="/zh-TW/docs/Web/HTML/Element/area" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;area&gt;</code></a> element has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=676619" title="FIXED: Implement proposed download attribute">bug 676619</a>).</li>
+ <li>The value <code>auto </code>for the <a href="/en-US/docs/HTML/Global_attributes" title="HTML/Global_attributes">global attribute</a> <a href="/en-US/docs/HTML/Global_attributes#attr-dir" title="HTML/Global_attributes"><code>dir</code></a> has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=548206" title="FIXED: Implement the auto value for the HTML dir attribute">bug 548206</a>).</li>
+</ul>
+
+<h2 id="CSS">CSS</h2>
+
+<p>General Gecko:</p>
+
+<ul>
+ <li>@font-feature-values rule support (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=549861" title="FIXED: implement parsing of font feature properties">bug 549861</a>)</li>
+ <li>StyleRule{Added,Removed,Changed}, StyleSheetApplicableStateChange, StyleSheetChange events (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=839103" title="FIXED: Provide notifications for style sheet added and removed to chrome JS">bug 839103</a>)</li>
+ <li>The <a href="/zh-TW/docs/Web/CSS/text-decoration-line" title="The documentation about this has not yet been written; please consider contributing!"><code>text-decoration-line</code></a> property, still prefixed, now considers <code>'blink'</code> as a valid value, though it doesn't blink the content at all (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=812995" title="FIXED: add 'blink' to -moz-text-decoration-line and drop -moz-text-blink">bug 812995</a>).</li>
+ <li>The non-standard<code> </code><a href="/zh-TW/docs/Web/CSS/-moz-text-blink" title="The documentation about this has not yet been written; please consider contributing!"><code>-moz-text-blink</code></a> property has been removed (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=812995" title="FIXED: add 'blink' to -moz-text-decoration-line and drop -moz-text-blink">bug 812995</a>).</li>
+ <li>Support for the <a href="/zh-TW/docs/Web/CSS/image-orientation" title="The documentation about this has not yet been written; please consider contributing!"><code>image-orientation</code></a> property, in its CSS Images &amp; Values Level 4 version, that is with the <code>from-image</code> keyword and EXIF support, has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=825771" title="FIXED: [css3-images] implement 'image-orientation' property">bug 825771</a>).</li>
+ <li>Support for <code>position: sticky</code> can be enabled by pref <code>layout.css.sticky.enabled</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=886646" title="FIXED: implement position:sticky">bug 886646</a>).</li>
+ <li>The support for the keyword <code>local</code> as a value of the <a href="/zh-TW/docs/Web/CSS/background-attachment" title="The documentation about this has not yet been written; please consider contributing!"><code>background-attachment</code></a> CSS property has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=483446" title="FIXED: CSS3 background-attachment: local support">bug 483446</a>).</li>
+ <li>Support of a non-standard Mozilla-only media query to determine the operating system version has been added: <code><a href="/en-US/docs/Web/Guide/CSS/Media_queries#-moz-os-version" title="/en-US/docs/Web/Guide/CSS/Media_queries#-moz-os-version">-moz-os-version</a></code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=810399" title="FIXED: Add a CSS Media Query for Windows 8 Desktop theme">bug 810399</a>). The property is currently only implemented on Windows.</li>
+ <li>The <a href="/zh-TW/docs/Web/CSS/-moz-osx-font-smoothing" title="The documentation about this has not yet been written; please consider contributing!"><code>-moz-osx-font-smoothing</code></a> CSS property has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=857142" title="FIXED: Add CSS property for author control over antialiasing on Mac OS X, for cases where fonts appear too heavy">bug 857142</a>)</li>
+ <li>The two values <code>-moz-zoom-in</code> and <code>-moz-zoom-out</code> of the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/cursor" title=""><code>cursor</code></a> property have been unprefixed to <code>zoom-in</code> and <code>zoom-out</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=772153" title="FIXED: unprefix CSS cursor: -moz-zoom-in | -moz-zoom-out">bug 772153</a>)).</li>
+ <li>The blink effect for <code><a href="/en-US/docs/CSS/text-decoration" title="/en-US/docs/CSS/text-decoration">text-decoration</a>: blink;</code> has no more effect, but is still a valid value (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=857820" title="FIXED: Drop only blink effect from text-decoration: blink; and completely remove &lt;blink> element">bug 857820</a>).</li>
+ <li>In-flow <a href="/zh-TW/docs/Web/CSS/::after" title="The documentation about this has not yet been written; please consider contributing!"><code>::after</code></a> and <a href="/zh-TW/docs/Web/CSS/::before" title="The documentation about this has not yet been written; please consider contributing!"><code>::before</code></a> pseudo-elements are now flex items (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=867454" title="FIXED: Support ::before, ::after as flex items">bug 867454</a>).</li>
+ <li>Following a spec change, the initial value for <a href="/zh-TW/docs/Web/CSS/min-width" title="The documentation about this has not yet been written; please consider contributing!"><code>min-width</code></a> and <a href="/zh-TW/docs/Web/CSS/min-height" title="The documentation about this has not yet been written; please consider contributing!"><code>min-height</code></a> has been changed back to <code>0</code>, even on flex items (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=848539" title="FIXED: Remove support for &quot;min-width: auto&quot; and &quot;min-height: auto&quot;, since they're being dropped from flexbox spec">bug 848539</a>).</li>
+ <li>Support for CSS Conditionals (<a href="/zh-TW/docs/Web/CSS/@supports" title="The documentation about this has not yet been written; please consider contributing!"><code>@supports</code></a> and <a href="/zh-TW/docs/Web/API/CSS/supports" title="The documentation about this has not yet been written; please consider contributing!"><code>CSS.supports</code></a>) has been enabled by default (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=855455" title="FIXED: enable @supports rule in all builds">bug 855455</a>).</li>
+ <li>Support for <a href="/zh-TW/docs/Web/CSS/background-clip" title="The documentation about this has not yet been written; please consider contributing!"><code>background-clip</code></a> and <a href="/zh-TW/docs/Web/CSS/background-origin" title="The documentation about this has not yet been written; please consider contributing!"><code>background-origin</code></a> properties in the <a href="/zh-TW/docs/Web/CSS/background" title="The documentation about this has not yet been written; please consider contributing!"><code>background</code></a> shorthand has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=570896" title="FIXED: add support for different background-origin and background-clip in background shorthand (css3-background)">bug 570896</a>).</li>
+ <li>The <code>none</code> value of <a href="/zh-TW/docs/Web/CSS/user-select" title="The documentation about this has not yet been written; please consider contributing!"><code>-moz-user-select</code></a> has now the same behavior than the <code>-moz-none</code> value, aligning Gecko on WebKit (Chrome, Safari), Presto (Opera) and Trident (Internet Explorer) (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=816298" title='FIXED: Change "-moz-user-select:none" to behave like WebKit, IE, and Opera (and "-moz-user-select:-moz-none")'>bug 816298</a>).</li>
+ <li>On XHTML content, the <code>auto</code> value of <a href="/zh-TW/docs/Web/CSS/hyphens" title="The documentation about this has not yet been written; please consider contributing!"><code>-moz-hyphens</code></a> incorrectly applied hyphenation rules when the language was not explicitly declared. This is fixed by (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=702121" title="FIXED: Incorrect hyphenation patterns used by CSS moz-hyphens in XHTML content (en-US patterns used, regardless of lang declaration)">bug 702121</a>).</li>
+ <li>An <code>auto</code> value has been added to the CSS <a href="/zh-TW/docs/Web/CSS/-moz-orient" title="The documentation about this has not yet been written; please consider contributing!"><code>-moz-orient</code></a> property. The <code>auto</code> value is equivalent to <code>horizontal</code> when applied to <a href="/zh-TW/docs/Web/HTML/Element/meter" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;meter&gt;</code></a> and <a href="/zh-TW/docs/Web/HTML/Element/progress" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;progress&gt;</code></a> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=835883" title="FIXED: Give the -moz-orient property an 'auto' value, and make that its initial value">bug 835883</a>).</li>
+ <li>The media query <a href="/en-US/docs/Web/Guide/CSS/Media_queries#-moz-windows-glass" title="/en-US/docs/Web/Guide/CSS/Media_queries#-moz-windows-glass"><code>-moz-windows-glass</code></a> has been added on Windows 7 and earlier Windows system (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=816803" title="FIXED: Need a way to detect existence of Aero Glass via CSS">bug 816803</a>).</li>
+ <li><a href="/en-US/docs/CSS/Using_CSS_flexible_boxes" title="CSS/Using_CSS_flexible_boxes">CSS Flexbox</a> has been unprefixed, and is now enabled by default (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=841876" title="FIXED: Re-enable flexbox pref (by default) in release builds">bug 841876</a>).</li>
+ <li>The <code>mask-type</code> property from the <a href="https://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html" title="https://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html">CSS Masking specification</a> has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=793617" title="FIXED: implement mask-type property from CSS Masking">bug 793617</a>).</li>
+ <li>Experimental support for the <a href="/zh-TW/docs/Web/CSS/:scope" title="The documentation about this has not yet been written; please consider contributing!"><code>:scope</code></a> pseudo-class has been added. Enabled by default in Aurora and Nightly, it can be enabled in release and beta version by setting the <code>layout.css.scope-pseudo.enabled</code> about:config preference to <code>true</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=648722" title="FIXED: Add support for :scope as :-moz-scope">bug 648722</a>).</li>
+ <li>Support for the viewport-relative <a href="/zh-TW/docs/Web/CSS/length" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;length&gt;</code></a> units, <code>vh</code>, <code>vw</code>, <code>vmin</code>, and <code>vmax</code>, has landed (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=503720" title="FIXED: Implement vw/vh/vmin/vmax (viewport sizes) from CSS 3 Values and Units">bug 503720</a>).</li>
+ <li>The <code>-moz-initial</code> value has been unprefixed (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=806068" title="FIXED: Unprefix -moz-initial">bug 806068</a>). <code>-moz-initial</code> will be kept for a while as an alias; however, authors are strongly encouraged to switch over to <code>initial</code>.</li>
+ <li>The CSS <a href="/zh-TW/docs/Web/CSS/text-transform" title="The documentation about this has not yet been written; please consider contributing!"><code>text-transform</code></a> property now supports the <code>full-width</code> keyword, which allows a more seamless inclusion of Latin characters in text using ideographic fixed-width characters, like Chinese or Japanese (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=774560" title="FIXED: Implement text-transform: full-width">bug 774560</a>).</li>
+ <li>The CSS <a href="/zh-TW/docs/Web/CSS/page-break-inside" title="The documentation about this has not yet been written; please consider contributing!"><code>page-break-inside</code></a> has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=685012" title="FIXED: Implement page-break-inside: avoid">bug 685012</a>).</li>
+ <li>The CSS <a href="/zh-TW/docs/Web/CSS/calc" title="The documentation about this has not yet been written; please consider contributing!"><code>calc()</code></a> function can now be used on <code>&lt;color-stop&gt;</code> (on <a href="/zh-TW/docs/Web/CSS/gradient" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;gradient&gt;</code></a>).</li>
+ <li>The CSS <a href="/zh-TW/docs/Web/CSS/@page" title="The documentation about this has not yet been written; please consider contributing!"><code>@page</code></a> at-rule is now supported (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=115199" title="FIXED: @page in CSS2 not implemented">bug 115199</a>). Note that the pseudo-classes <a href="/zh-TW/docs/Web/CSS/:first" title="The documentation about this has not yet been written; please consider contributing!"><code>:first</code></a>, <a href="/zh-TW/docs/Web/CSS/:right" title="The documentation about this has not yet been written; please consider contributing!"><code>:right</code></a>, and <a href="/zh-TW/docs/Web/CSS/:left" title="The documentation about this has not yet been written; please consider contributing!"><code>:left</code></a> are not yet implemented.</li>
+ <li>The <a href="/zh-TW/docs/Web/CSS/:-moz-placeholder" title="The documentation about this has not yet been written; please consider contributing!"><code>:-moz-placeholder</code></a> pseudo-class is replaced by the <a href="/zh-TW/docs/Web/CSS/::-moz-placeholder" title="The documentation about this has not yet been written; please consider contributing!"><code>::-moz-placeholder</code></a> pseudo-<em>element</em> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=737786" title="FIXED: Switch from :-moz-placeholder to ::-moz-placeholder (pseudo-class to pseudo-element)">bug 737786</a>).</li>
+</ul>
+
+<h2 id="JavaScript">JavaScript</h2>
+
+<p>General Gecko:</p>
+
+<p><a href="/en-US/docs/Web/JavaScript/ECMAScript_6_support_in_Mozilla" title="/en-US/docs/Web/JavaScript/ECMAScript_6_support_in_Mozilla">EcmaScript 6</a> (Harmony) implementation continues!</p>
+
+<ul>
+ <li>New mathematical methods have been implemented on <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math"><code>Math</code></a>: <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Math/fround" title="/en-US/docs/JavaScript/Reference/Global_Objects/Math/fround"><code>Math.fround()</code></a> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=900125" title="FIXED: Float32: add Math.fround to the interpreter">bug 900125</a>).</li>
+ <li>The method <code>Array.of()</code> is now implemented on <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=866849" title="FIXED: Implement ES6 Array.of">bug 866849</a>).</li>
+ <li>The methods <a href="/zh-TW/docs/Web/JavaScript/Reference/Global_Objects/Number/parseInt" title="The documentation about this has not yet been written; please consider contributing!"><code>Number.parseInt()</code></a> and <a href="/zh-TW/docs/Web/JavaScript/Reference/Global_Objects/Number/parseFloat" title="The documentation about this has not yet been written; please consider contributing!"><code>Number.parseFloat()</code></a> have been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=886949" title="FIXED: Add Number.parseInt and Number.parseFloat">bug 886949</a>)</li>
+ <li>The methods <code>Map.prototype.forEach()</code> and <code>Set.prototype.forEach()</code> are now implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=866847" title="FIXED: Implement Map#forEach and Set#forEach">bug 866847</a>)</li>
+ <li>New mathematical methods have been implemented on <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math"><code>Math</code></a>: <code>Math.log10()</code>, <code>Math.log2()</code>, <code>Math.log1p()</code>, <code>Math.expm1()</code>, <code>Math.cosh()</code>, <code>Math.sinh()</code>, <code>Math.tanh()</code>, <code>Math.acosh()</code>, <code>Math.asinh()</code>, <code>Math.atanh()</code>, <code>Math.trunc()</code>, <code>Math.sign()</code> and <code>Math.cbrt()</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=717379" title="FIXED: Implement the new ES6 math functions">bug 717379</a>).</li>
+ <li>Support for binary and octal integer literals has been added: <code>0b10101010</code>, <code>0B1010</code>, <code>0o777</code>, <code>0O237</code> are now valid (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=894026" title="FIXED: Implement BinaryIntegerLiteral and OctalIntegerLiteral">bug 894026</a>).</li>
+ <li>The machine epsilon constant, that is <font>the smallest representible number that added to 1 will not be 1,</font> is now available as <a href="/zh-TW/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON" title="The documentation about this has not yet been written; please consider contributing!"><code>Number.EPSILON</code></a> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=885798" title="FIXED: Add new ES6 Number constants: EPSILON, MAX_SAFE_INTEGER, MIN_SAFE_INTEGER">bug 885798</a>).</li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/arrow_functions" title="/en-US/docs/Web/JavaScript/Reference/arrow_functions">Arrow functions</a> are no longer automatically in strict mode unless explicitly requested with <code>"use strict"</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=852762" title="FIXED: Arrow functions are not automatically strict after all">bug 852762</a>)).</li>
+ <li>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat"><code>String.prototype.repeat</code></a> JS method has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=815431" title="FIXED: implement String.prototype.repeat">bug 815431</a>).</li>
+ <li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty"><code>Object.defineProperty</code></a> method can now be used to redefine the <code>length</code> property of an <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array"><code>Array</code></a> object.</li>
+ <li>The option to disable JavaScript, including the options to allow moving windows/replace context menu, have been removed. You may still disable JavaScript by double clicking the "javascript.enabled" option in about:config.</li>
+ <li><a href="http://asmjs.org/spec/latest/" title="http://asmjs.org/spec/latest/">Asm.js </a>optimizations are enabled, making it possible to compile C/C++ applications to a subset of Javascript for better performance.</li>
+ <li>ES6 <a href="/en-US/docs/JavaScript/Reference/arrow_functions" title="/en-US/docs/JavaScript/Reference/arrow_functions">Arrow Function</a> syntax has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=846406" title="FIXED: Implement arrow functions">bug 846406</a>).</li>
+ <li>The new <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is">Object.is</a> function has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=839979" title="FIXED: Implement Object.is">bug 839979</a>).</li>
+ <li><a href="/en-US/docs/E4X" title="E4X">E4X</a>, an ancient JavaScript extension, has been removed. Implemented only in Gecko, it never got significant traction (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=788293" title="FIXED: Remove E4X from SpiderMonkey">bug 788293</a>).</li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/parseInt" title="">parseInt</a> no longer treats strings with leading "0" as octal (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=786135" title='FIXED: Make parseInt("042") === 42, now that other engines are moving that way'>bug 786135</a>).</li>
+ <li>Support for the <code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/WeakMap" title="JavaScript/Reference/Global_Objects/WeakMap">Weakmap</a>.prototype.clear()</code> method, recently added to the Harmony (EcmaScript 6) draft proposal has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=814562" title="FIXED: Implement clear() on WeakMaps">bug 814562</a>).</li>
+ <li>Support for the <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Math/imul" title="JavaScript/Reference/Global_Objects/Math/imul"><code>Math.imul()</code></a> method, a C-style 32-bit multiplication function. Though proposed for Harmony (EcmaScript 6) it has not yet accepted and still is non-standard (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=808148" title="FIXED: prototype Math.imul">bug 808148</a>).</li>
+ <li>Web apps using draggable text with Kinetic 3.x are working, even when using the Cairo canvas backend (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=835064" title="Firefox 18 won't drag text on some installations.">bug 835064</a>).</li>
+ <li>The <a href="/en-US/docs/JavaScript/Reference/Statements/for_each...in" title="JavaScript/Reference/Statements/for_each...in"><code>for each…in</code></a> statement has been deprecated and should not be used. Consider using the new <a href="/en-US/docs/JavaScript/Reference/Statements/for...of" title="JavaScript/Reference/Statements/for...of"><code>for…of</code></a> statement (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=804834" title='FIXED: Hide "for each" from content'>bug 804834</a>).</li>
+ <li>Support for the <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map">Map</a>.prototype.keys</code>, <code><code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map">Map</a></code>.prototype.values</code>, and <code><code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map">Map</a></code>.prototype.entries</code> has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=817368" title="FIXED: Map.prototype.{keys,values,entries}">bug 817368</a>).</li>
+ <li><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Map" title="JavaScript/Reference/Global_Objects/Map">Map</a></code> and <code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Set" title="JavaScript/Reference/Global_Objects/Set">Set</a></code> objects have changed from having a <code>size()</code> method to a <code>size</code> property (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=807001" title="FIXED: Map.prototype.size and Set.prototype.size should be accessor properties">bug 807001</a>).</li>
+ <li><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Map" title="JavaScript/Reference/Global_Objects/Map">Map</a></code> and <code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Set" title="JavaScript/Reference/Global_Objects/Set">Set</a></code> objects also have a clear() method now. (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=805003" title="FIXED: Implement Map.prototype.clear and Set.prototype.clear methods">bug 805003</a>).</li>
+</ul>
+
+<h2 id="Telephony-specific_additions_(mostly_API-related)">Telephony-specific additions (mostly API-related)</h2>
+
+<ul>
+ <li>Fuzzy matcher API for phone numbers (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=883923" title="FIXED: Provide a Fuzzy Matcher API for phone numbers">bug 883923</a>)</li>
+ <li>CDMA
+ <ul>
+ <li>Registration info (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=882984" title="FIXED: [B2G] [CDMA] Update nsIDOMMozMobileCellInfo to also report base station id, base station latitude, base station longitude, system id, network id">bug 882984</a>)
+ <ul>
+ <li>(<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=882984" title="FIXED: [B2G] [CDMA] Update nsIDOMMozMobileCellInfo to also report base station id, base station latitude, base station longitude, system id, network id">bug 882984</a>)</li>
+ <li>multiple new CDMA specific attributes in <code>MozMobileCellInfo</code></li>
+ <li>dom/network/interfaces/nsIDOMMobileConnection.idl</li>
+ </ul>
+ </li>
+ <li>Emergency callback mode support (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=887690" title="FIXED: B2G RIL: Support emergency callback mode">bug 887690</a>)
+ <ul>
+ <li>new method <code>exitEmergencyCbMode</code> and new event <code>emergencycbmodechange</code> in <code>MozMobileConnection</code></li>
+ <li>dom/network/interfaces/nsIDOMMozEmergencyCbModeEvent.idl</li>
+ </ul>
+ </li>
+ <li>OTASP (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=882983" title="FIXED: B2G RIL: Support for CDMA OTASP - expose ota status">bug 882983</a>)
+ <ul>
+ <li>new event <code>otastatuschange</code> in <code>MozMobileConnection</code></li>
+ <li>dom/network/interfaces/nsIDOMMozOtaStatusEvent.idl</li>
+ </ul>
+ </li>
+ <li>MDN/MIN (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=869778" title="FIXED: [B2G][CDMA]Get the CDMA subscription information.">bug 869778</a>)
+ <ul>
+ <li>new interface <code>MozGsmIccInfo</code> &amp; <code>MozCdmaIccInfo</code></li>
+ <li>new attribute <code>iccType</code> in <code>MozIccInfo</code></li>
+ <li>dom/icc/interfaces/nsIDOMIccInfo.idl</li>
+ </ul>
+ </li>
+ <li>Preferred voice mode (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=869769" title="FIXED: [B2G][CDMA] Set and Query the preferred voice mode in CDMA">bug 869769</a>)
+ <ul>
+ <li>new methods <code>setVoicePrivacyMode</code> and <code>getVoicePrivacyMode</code> in <code>MozMobileConnection</code></li>
+ <li>dom/network/interfaces/nsIDOMMobileConnection.idl</li>
+ </ul>
+ </li>
+ <li>Roaming preference (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=869768" title="FIXED: [B2G][CDMA] Set and Query the roaming preference in CDMA">bug 869768</a>)
+ <ul>
+ <li>new methods <code>setRoamingPreference</code> and <code>getRoamingPreference</code> in <code>MozMobileConnection</code></li>
+ <li>dom/network/interfaces/nsIDOMMobileConnection.idl</li>
+ </ul>
+ </li>
+ <li>Call Waiting (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=822210" title="FIXED: B2G CDMA: support call waiting">bug 822210</a>)
+ <ul>
+ <li>new attribute <code>secondNumber</code> in <code>TelephonyCall</code></li>
+ <li>dom/webidl/TelephonyCall.webidl</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ <li>Support Change Call Barring Password (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=905479" title="FIXED: B2G RIL: Support Change Call Barring Password">bug 905479</a>)
+ <ul>
+ <li>new method <code>changeCallBarringPassword</code> in <code>MozMobileConnection</code></li>
+ <li>dom/network/interfaces/nsIDOMMobileConnection.idl</li>
+ </ul>
+ </li>
+ <li>Move ICC functions out from <code>MobileConnection</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=875721" title="FIXED: B2G RIL: Move iccInfo related attribute/event from mozMobileConnection to mozIccManager">bug 875721</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=874744" title="FIXED: B2G RIL: Move card state related attribute/event from mozMobileConnection to mozIccManager">bug 874744</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=860585" title="FIXED: B2G RIL: Move cardLock related API from mozMobileConnection to mozIccManager">bug 860585</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=859220" title="FIXED: B2G RIL: Separate MozIccManager from MozMobileConnection">bug 859220</a>)
+ <ul>
+ <li><code>MozIccInfo</code>
+ <ul>
+ <li><code>navigator.mozIccManager.iccInfo</code></li>
+ <li>new interface</li>
+ <li>dom/icc/interfaces/nsIDOMIccInfo.idl</li>
+ </ul>
+ </li>
+ <li><code>MozIccManager</code>
+ <ul>
+ <li><code>navigator.mozIccManager</code></li>
+ <li>new attributes, methods, and events</li>
+ <li>dom/icc/interfaces/nsIDOMIccManager.idl</li>
+ </ul>
+ </li>
+ <li><code>MozMobileConnection</code>
+ <ul>
+ <li><code>navigator.mozMobileConnection</code></li>
+ <li>numerous attributes, methods and events removed</li>
+ <li>dom/network/interfaces/nsIDOMMobileConnection.idl</li>
+ </ul>
+ </li>
+ <li><code>nsIDOMMozMobileICCInfo</code>
+ <ul>
+ <li><code>navigator.mozMobileConnection.iccInfo</code></li>
+ <li>interface removed</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ <li>ICC card lock improvements
+ <ul>
+ <li>Rename <code>ICCCardLockErrorEvent</code> to <code>IccCardLockErrorEvent</code>
+ <ul>
+ <li>dom/webidl/IccCardLockErrorEvent.webidl</li>
+ </ul>
+ </li>
+ <li>Retry count (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=886239" title="FIXED: B2G RIL: Remove retryCount from MobileConnection">bug 886239</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=875710" title="FIXED: B2G RIL: Get PIN/PUK remaining retry count">bug 875710</a>)
+ <ul>
+ <li>attribute <code>retryCount</code> removed from <code>MozMobileConnection</code></li>
+ <li>new method <code>getCardLockRetryCount</code> in <code>MozIccManager</code></li>
+ <li>dom/network/interfaces/nsIDOMMobileConnection.idl</li>
+ <li>dom/icc/interfaces/nsIDOMIccManager.idl</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ <li>Import/export SIM Contacts (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=847741" title="FIXED: B2G RIL: Move mozContact.getSimContacts to IccManager">bug 847741</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=847820" title="FIXED: B2G RIL: Support exporting contacts to SIM card in IccManager">bug 847820</a>)
+ <ul>
+ <li>new methods <code>readContacts</code>, <code>updateContact</code> in <code>MozIccManager</code></li>
+ <li>dom/icc/interfaces/nsIDOMIccManager.idl</li>
+ </ul>
+ </li>
+ <li>ICC Secure Elements (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=840780" title="FIXED: (webicc) WebICC - Secure Elements">bug 840780</a>)
+ <ul>
+ <li>new methods <code>iccOpenChannel</code>, <code>iccExchangeAPDU</code>, <code>iccCloseChannel</code> in <code>MozIccManager</code></li>
+ <li>dom/icc/interfaces/nsIDOMIccManager.idl</li>
+ </ul>
+ </li>
+ <li>STK improvements
+ <ul>
+ <li>'duration' for Display Text, Setup Call commands (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=831630" title="FIXED: B2G STK: Add 'duration' property for DISPLAY_TEXT and SET_UP_CALL">bug 831630</a>)
+ <ul>
+ <li>new attribute <code>duration</code> in both <code>MozStkTextMessage</code> and <code>MozStkSetUpCall</code></li>
+ <li>dom/icc/interfaces/SimToolKit.idl</li>
+ </ul>
+ </li>
+ <li>support "Language Selection Event" (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=831627" title='FIXED: B2G STK: Support "Language Selection Event" Envelope command.'>bug 831627</a>)
+ <ul>
+ <li>new dictionary <code>MozStkLanguageSelectionEvent</code></li>
+ <li>dom/icc/interfaces/SimToolKit.idl</li>
+ </ul>
+ </li>
+ <li>support "Idle Screen Available Event" (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=831628" title='FIXED: B2G STK: Support "Idle Screen Available Event" Envelope command'>bug 831628</a>)
+ <ul>
+ <li>new dictionary <code>MozStkGeneralEvent</code></li>
+ <li>dom/icc/interfaces/SimToolKit.idl</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ <li>MobileMessage
+ <ul>
+ <li>Turn <code>getSegmentInfoForText</code> into an async call (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=903403" title="FIXED: [sms][mms] Make getSegmentInfoForText() Asynchronous to Improve Typing Performance">bug 903403</a>)
+ <ul>
+ <li>dom/mobilemessage/interfaces/nsIDOMMobileMessageManager.idl</li>
+ </ul>
+ </li>
+ <li>Remove navigator.mozSms (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=891235" title="FIXED: WebSMS: remove navigator.mozSms">bug 891235</a>)</li>
+ </ul>
+ </li>
+ <li>Telephony
+ <ul>
+ <li>support "Conference Call" (certified only) (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=772765" title="FIXED: B2G telephony: support conference calls">bug 772765</a>)
+ <ul>
+ <li><code>navigator.mozTelephony.conferenceGroup</code></li>
+ <li>new interface</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+</ul>
+
+<h2 id="DOMAPI">DOM/API</h2>
+
+<p>Firefox OS-specific:</p>
+
+<ul>
+ <li><span id="summary_alias_container"><span id="short_desc_nonedit_display">Device Storage API: When getting a cursor callback from <code>navigator.getDeviceStorage("sdcard").enumerate</code>, <code><span id="summary_alias_container"><span id="short_desc_nonedit_display">this.done</span></span></code> was undefined in Firefox &lt;1.2 (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=902565" title='this.done in cursor callback of naviagtor.getDeviceStorage("sdcard").enumerate is undefined'>bug 902565</a>). This is now fixed. The referenced bug discusses possible compatibility checks/workarounds for this issue. </span></span></li>
+ <li>The <a href="/zh-TW/docs/Web/API/RTCPeerConnection" title="The documentation about this has not yet been written; please consider contributing!"><code>RTCPeerConnection</code></a> Interface from WebRTC is implemented, but currently disabled by default in B2G, as it is not yet functional on Firefox OS devices (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=942343" title="FIXED: Pref off media.peerconnection.enabled on Firefox OS">bug 942343</a>.)</li>
+ <li><a href="/zh-TW/docs/Web/API/Notification" title="Notifications API 的 Notification interface 是用來設置及顯示「桌面通知」給使用。"><code>Web notifications</code></a> are supported in Firefox 1.2, therefore the <code>Notification</code> object should be used in preference to the old deprecated <a href="/zh-TW/docs/Web/API/Window/navigator/mozNotification" title="The documentation about this has not yet been written; please consider contributing!"><code>mozNotification</code></a> object (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=899574" title="FIXED: Notification API follow-up: provide a way to get current Notification objects">bug 899574</a> .)</li>
+ <li><a href="/zh-TW/docs/Web/API/Window/navigator/mozInputMethod" title="The documentation about this has not yet been written; please consider contributing!"><code>mozInputMethod</code></a> has been added to allow for people to write 3rd party keyboards. See the test application in gaia/test_apps for a reference implementation.</li>
+ <li>The Media Recording API has been implemented (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=803414" title="FIXED: Media Recording - Web API &amp; Implementation">bug 803414</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=889720" title="FIXED: Media Recording - implement Pause/Resume DOM API">bug 889720</a>)</li>
+ <li>KeyboardEvent.repeat now supported (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=600117" title="FIXED: Implement DOM3 KeyboardEvent.repeat">bug 600117</a>)</li>
+ <li>3rd party keyboards now supported (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=816869" title="FIXED: [Meta] Enable third-party keyboards">bug 816869</a>)</li>
+</ul>
+
+<div id="magicdomid15">New WebGL 1 extensions supported in Firefox OS 1.2:</div>
+
+<ul>
+ <li><a href="http://www.khronos.org/registry/webgl/extensions/OES_element_index_uint/">OES_element_index_uint</a></li>
+ <li><a href="http://www.khronos.org/registry/webgl/extensions/OES_texture_float_linear/">OES_texture_float_linear</a></li>
+ <li><a href="http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/">OES_vertex_array_object</a></li>
+ <li><a href="http://www.khronos.org/registry/webgl/extensions/WEBGL_draw_buffers/">WEBGL_draw_buffers</a></li>
+ <li id="magicdomid26"><a href="http://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/">ANGLE_instanced_arrays</a></li>
+</ul>
+
+<div class="note">
+<div><strong>Note</strong>: availability of these extensions depends on device capabilities; not all extensions will be available on all devices.</div>
+</div>
+
+<p>General Gecko:</p>
+
+<ul>
+ <li>A <code>.default</code> attribute has now been added to the DeviceStorage API (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=874213" title="FIXED: DeviceStorage: Add a .default attribute to the device storage object.">bug 874213</a>)</li>
+ <li>The TCP Socket API has landed (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=797561" title="FIXED: Expose a server tcp socket API to web applications">bug 797561</a>)</li>
+ <li>Make the last argument (doctype) to <a href="/zh-TW/docs/Web/API/DOMImplementation/createDocument" title="The documentation about this has not yet been written; please consider contributing!"><code>DOMImplementation.createDocument</code></a> optional (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=909859" title="FIXED: Make the doctype argument of createDocument optional">bug 909859</a>).</li>
+ <li>Implement the new <a href="/zh-TW/docs/Web/API/Element/classList" title="Element.classList 唯讀屬性代表了該元素所擁有之類別屬性(Class Attribute)的即時更新集-DOMTokenList。"><code>element.classList</code></a> specification which permits adding/removing several classes with one call (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=814014" title="FIXED: implement the new classList specification which permits adding/removing several classes with one call">bug 814014</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/URL/URL" title="The documentation about this has not yet been written; please consider contributing!"><code>URL()</code></a> constructor have been implemented on the <a href="/zh-TW/docs/Web/API/URL" title="URL 介面提供了建立 URL 物件的靜態方法。"><code>URL</code></a> interface (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=887364" title="FIXED: Implement URL API">bug 887364</a>).</li>
+ <li>The properties <a href="/zh-TW/docs/Web/API/URLUtils/origin" title="The documentation about this has not yet been written; please consider contributing!"><code>URLUtils.origin</code></a>, <a href="/zh-TW/docs/Web/API/URLUtils/password" title="The documentation about this has not yet been written; please consider contributing!"><code>URLUtils.password</code></a>, and <a href="/zh-TW/docs/Web/API/URLUtils/username" title="The documentation about this has not yet been written; please consider contributing!"><code>URLUtils.username</code></a> are now available to all interfaces implementing <a href="/zh-TW/docs/Web/API/URLUtils" title="The documentation about this has not yet been written; please consider contributing!"><code>URLUtils</code></a>: <a href="/zh-TW/docs/Web/API/URL" title="URL 介面提供了建立 URL 物件的靜態方法。"><code>URL</code></a>, <a href="/zh-TW/docs/Web/API/Location" title="The documentation about this has not yet been written; please consider contributing!"><code>Location</code></a>, <a href="/zh-TW/docs/Web/API/HTMLAnchorElement" title="The documentation about this has not yet been written; please consider contributing!"><code>HTMLAnchorElement</code></a>, and <a href="/zh-TW/docs/Web/API/HTMLAreaElement" title="The documentation about this has not yet been written; please consider contributing!"><code>HTMLAreaElement</code></a> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=887364" title="FIXED: Implement URL API">bug 887364</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/URL" title="URL 介面提供了建立 URL 物件的靜態方法。"><code>URL</code></a> interface is now accessible from Web Workers (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=887364" title="FIXED: Implement URL API">bug 887364</a>).</li>
+ <li>IndexedDB can now be used as a "optimistic" storage area so it doesn't require any prompts and data is stored in a pool with LRU eviction policy, in short temporary storage (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=785884" title="FIXED: Implement support for temporary storage (aka shared pool)">bug 785884</a>).</li>
+ <li>Path of the persistent storage has been changed from &lt;profile&gt;/indexedDB to &lt;profile&gt;/storage/persistent (on b2g from /data/local/indexedDB to /data/local/storage/persistent).</li>
+ <li>The <a href="/en-US/docs/Web_Audio_API" title="/en-US/docs/Web_Audio_API">Web Audio API</a> is now supported. An incomplete implementation was previously available behind a preference (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=779297" title="FIXED: Implement and ship Web Audio">bug 779297</a>).</li>
+ <li>Some IME related keys on Windows are supported by <code>KeyboardEvent.key</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=865565" title="FIXED: D3E KeyboardEvent.key values of IME related keys should be considered with keyboard layout locale">bug 865565</a>), see <a href="/en-US/docs/Web/API/KeyboardEvent#keyname_table_win" title="/en-US/docs/Web/API/KeyboardEvent#keyname_table_win">the key name table</a> for the detail.</li>
+ <li>Firefox for Metro now dispatches key events in the same way as the desktop version (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=843236" title="FIXED: Defect - Send the correct DOM keycodes in keyboard events from metro widget for US and non-US keyboards">bug 843236</a>).</li>
+ <li><code>keypress</code> event is no longer dispatched if <code>preventDefault()</code> of preceding <code>keydown</code> event is called (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=501496" title="FIXED: preventDefault on keydown does not cancel following keypress">bug 501496</a>), see <a href="/en-US/docs/Web/Reference/Events/keydown#preventDefault()_of_keydown_event" title="/en-US/docs/Web/Reference/Events/keydown#preventDefault()_of_keydown_event">the document of <code>keydown</code> event</a> for the detail.</li>
+ <li>Renamed the <code>Future</code> interface to <code>Promise</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=884279" title="FIXED: renaming future to promise">bug 884279</a>).</li>
+ <li>The <code>srcDoc</code> property on the <a href="/zh-TW/docs/Web/API/HTMLIFrameElement" title="The documentation about this has not yet been written; please consider contributing!"><code>HTMLIFrameElement</code></a> interface, allowing the inline specification of the content of an <a href="/zh-TW/docs/Web/HTML/Element/iframe" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;iframe&gt;</code></a>, is now supported (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=802895" title="FIXED: implement &lt;iframe srcdoc=''> to allow document content in iframe to be specified inline">bug 802895</a>).</li>
+ <li>The <code>createTBody()</code> method on the <a href="/zh-TW/docs/Web/API/HTMLTableElement" title="The documentation about this has not yet been written; please consider contributing!"><code>HTMLTableElement</code></a> interface, allowing to get its <a href="/zh-TW/docs/Web/HTML/Element/tbody" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;tbody&gt;</code></a>, is now supported (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=813034" title="FIXED: Implement table.createTBody">bug 813034</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/Range/collapse" title="The documentation about this has not yet been written; please consider contributing!"><code>Range.collapse()</code></a> method <code>toStart</code> parameter is now optional and default to <code>false</code>, like defined in the spec (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=891340" title="FIXED: Make Range.collapse optional and default to false">bug 891340</a>).</li>
+ <li>Support of <a href="/zh-TW/docs/Web/API/ParentNode" title="ParentNode 介面定義了可以擁有子節點之 Node 物件的方法。"><code>ParentNode</code></a> interface on <a href="/zh-TW/docs/Web/API/Document" title="Document 介面代表所有在瀏覽器中載入的網頁,也是作為網頁內容 DOM 樹"><code>Document</code></a> and <a href="/zh-TW/docs/Web/API/DocumentFragment" title="DocumentFragment 介面表示了一個沒有父節點的最小化文件物件。DocumentFragment 被當作一種輕量化的 Document,用如同標準文件一般的方式保存片段的文件結構(由節點組成)。關鍵的區別在於文件片段不是真實的 DOM 結構,文件片段的變動並不會影響目前的網頁文件,也不會導致回流(reflow)或引起任何影響效能的情況發生。"><code>DocumentFragment</code></a> has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=895974" title="FIXED: document.firstElementChild is not defined">bug 895974</a>).</li>
+ <li>The <code>previousElementSibling</code> and <code>nextElementSibling</code> have been moved to <a href="/zh-TW/docs/Web/API/ChildNode" title="childNodes 介面定義了可以擁有父節點之 Node 物件的方法。"><code>ChildNode</code></a> allowing them to be called not only on a <a href="/zh-TW/docs/Web/API/Element" title="Element 介面表示了一個在 Document 中的物件,其描述了各類型元素的共同屬性與方法,Element 的子介面則定義了不同類型元素的具體行為並增加額外的功能。"><code>Element</code></a> object but also on a <a href="/zh-TW/docs/Web/API/CharacterData" title="CharacterData 介面表示了含有字元的 Node 物件。CharacterData 為抽象介面,代表不會有型別為 CharacterData 的物件。物件是由其子介面,如 Text、Comment 或 ProcessingInstruction 等非抽象介面來實作。"><code>CharacterData</code></a> or <a href="/zh-TW/docs/Web/API/DocumentType" title="DocumentType 介面表示了一個代表文件類型的 Node 節點。"><code>DocumentType</code></a> object (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=895974" title="FIXED: document.firstElementChild is not defined">bug 895974</a>).</li>
+ <li>The <code>navigator.geolocation</code> property has been updated to match the spec. It never returns <code>null</code>. When the preference <code>geo.enabled</code> is set to <code>false</code>, it now returns <code>undefined</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=884921" title="FIXED: Align navigator.geolocation with spec">bug 884921</a>).</li>
+ <li>The <code>videoPlaybackQuality</code> attribute on the <a href="/zh-TW/docs/Web/API/HTMLVideoElement" title="The documentation about this has not yet been written; please consider contributing!"><code>HTMLVideoElement</code></a> interface has been changed to the <code>getVideoPlaybackQuality</code> method. (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=889205" title="FIXED: Make HTMLVideoElement.videoPlaybackQuality a method">bug 889205</a>)</li>
+ <li>Support for the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Range.Range" title="The Range() constructor returns a newly created Range object whose start and end is the global Document object."><code>Range()</code></a> constructor has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=868999" title="FIXED: Range should be constructable">bug 868999</a>).</li>
+ <li>Support for the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Text.Text" title="The Text() constructor returns a newly created Text object with the optional DOMString given in parameter as its textual content."><code>Text()</code></a> constructor has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=869000" title="FIXED: Text should be constructable">bug 869000</a>).</li>
+ <li>Support for the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Comment.Comment" title="The Comment() constructor returns a newly created Comment object with the optional DOMString given in parameter as its textual content."><code>Comment()</code></a> constructor has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=869006" title="FIXED: Comment should be constructable">bug 869006</a>).</li>
+ <li>Support for the <a href="https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment.DocumentFragment" title="The DocumentFragment() constructor returns an empty newly created DocumentFragment object ."><code>DocumentFragment()</code></a> constructor has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=869002" title="FIXED: DocumentFragment should be constructable">bug 869002</a>).</li>
+ <li>The <a href="https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent" title="The FocusEvent interface represents focus-related events like focus, blur, focusin, or focusout."><code>FocusEvent</code></a> interface has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=855741" title="FIXED: FocusEvent interface is missing">bug 855741</a>).</li>
+ <li>Support for the <a href="https://developer.mozilla.org/en-US/docs/Web/API/ChildNode.remove" title="The ChildNode.remove method removes the object from the tree it belongs to."><code>ChildNode.remove()</code></a> method has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=856629" title="FIXED: Implement ChildNode.remove()">bug 856629</a>).</li>
+ <li>The interfaces related to the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track" title="The track element is used as a child of the media elements—&lt;audio> and &lt;video>—and does not represent anything on its own. It lets you specify timed text tracks (or time-based data)."><code>&lt;track&gt;</code></a> element, <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement" title="The HTMLTrackElement interface provides access to the properties of &lt;track> elements, as well as methods to manipulate them."><code>HTMLTrackElement</code></a>, <a class="new" href="https://developer.mozilla.org/en-US/docs/Web/API/TextTrack" title="The documentation about this has not yet been written; please consider contributing!"><code>TextTrack</code></a>, <a class="new" href="https://developer.mozilla.org/en-US/docs/Web/API/TextTrackCue" title="The documentation about this has not yet been written; please consider contributing!"><code>TextTrackCue</code></a>, <a class="new" href="https://developer.mozilla.org/en-US/docs/Web/API/TextTrackList" title="The documentation about this has not yet been written; please consider contributing!"><code>TextTrackList</code></a>, and <a class="new" href="https://developer.mozilla.org/en-US/docs/Web/API/TextTrackCueList" title="The documentation about this has not yet been written; please consider contributing!"><code>TextTrackCueList</code></a> have been implemented behind the <code>media.webvtt.enabled</code> property, defaulting to <code>false</code> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=833385" title="FIXED: [webvtt] Implement Track element and TextTrack* DOM classes">bug 833385</a>).</li>
+ <li>The <a class="new" href="https://developer.mozilla.org/en-US/docs/Web/API/Gamepad" title="The documentation about this has not yet been written; please consider contributing!"><code>Gamepad</code></a> interface, and <a class="new" href="https://developer.mozilla.org/en-US/docs/Web/API/Navigator.getGamepads" title="The documentation about this has not yet been written; please consider contributing!"><code>Navigator.getGamepads</code></a> have been implemented behind the <code>dom.gamepad.enabled</code> property, defaulting to <code>false</code> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=690935" title="FIXED: Implement navigator.getGamepads() method">bug 690935</a>).</li>
+ <li>On desktop Firefox only, <code>HTMLCanvasElement.getContext()</code> can now take the <code>webgl</code> value, in addition to <code>experimental-webgl</code> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=870232" title='FIXED: Implement getContext("webgl") for Desktop FF'>bug 870232</a>).</li>
+ <li>The non-standard method <code>mozLoadFrom()</code> of <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement" title="The HTMLMediaElement interface has special properties and methods (beyond the properties and methods available for all children of HTMLElement), that are common to all media-related objects."><code>HTMLMediaElement</code></a> has been removed (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=877135" title="FIXED: Remove mozLoadFrom">bug 877135</a>).</li>
+ <li>D3E <a href="/en-US/docs/DOM/KeyboardEvent#Key_names_and_Char_values" title="/en-US/docs/DOM/KeyboardEvent#Key_names_and_Char_values"><code>KeyboardEvent.key</code></a> is now supported, but only for non-printable keys (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=842927" title="FIXED: Implement DOM3 KeyboardEvent.key only for non-printable key, first">bug 842927</a>).</li>
+ <li>The <code>title</code> attribute of <a href="/zh-TW/docs/Web/API/DOMImplementation/createHTMLDocument" title="The documentation about this has not yet been written; please consider contributing!"><code>DOMImplementation.createHTMLDocument</code></a> is now optional as per updated DOM specification.</li>
+ <li>The ability to add a sidebar panel (<code>window.sidebar.addPanel</code>) has been dropped (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=691647" title="FIXED: clean up nsISidebar (remove window.sidebar.addPanel/addPersistentPanel)">bug 691647</a>).</li>
+ <li>The unprefixed <a href="/zh-TW/docs/Web/API/Window/requestAnimationFrame" title="The documentation about this has not yet been written; please consider contributing!"><code>Window.requestAnimationFrame</code></a> and <a href="/zh-TW/docs/Web/API/Window/cancelAnimationFrame" title="The documentation about this has not yet been written; please consider contributing!"><code>Window.cancelAnimationFrame</code></a> methods has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=704063" title="FIXED: Add unprefixed requestAnimationFrame">bug 704063</a>).</li>
+ <li>The callback for <a href="/zh-TW/docs/Web/API/Window/requestAnimationFrame" title="The documentation about this has not yet been written; please consider contributing!"><code>Window.requestAnimationFrame</code></a> now receives a <a href="/zh-TW/docs/Web/API/DOMHighResTimeStamp" title="The documentation about this has not yet been written; please consider contributing!"><code>DOMHighResTimeStamp</code></a> as argument instead of the less precise <a href="/zh-TW/docs/Web/API/DOMTimeStamp" title="The documentation about this has not yet been written; please consider contributing!"><code>DOMTimeStamp</code></a> used in the unprefixed version (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=753453" title="FIXED: requestAnimationFrame callback should return DOMHighResTimeStamp">bug 753453</a>).</li>
+ <li>The text argument for <a href="/zh-TW/docs/Web/API/Window/alert" title="The documentation about this has not yet been written; please consider contributing!"><code>window.alert</code></a> and <a href="/zh-TW/docs/Web/API/Window/confirm" title="The documentation about this has not yet been written; please consider contributing!"><code>window.confirm</code></a> is now optional (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=861605" title="FIXED: Make the arguments to Window.alert, Window.confirm optional">bug 861605</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/HTMLMediaElement/initialTime" title="The documentation about this has not yet been written; please consider contributing!"><code>HTMLMediaElement.initialTime</code></a> property, removed from the spec, is no more supported (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=742537" title="FIXED: Remove HTMLMediaElement.initialTime">bug 742537</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/AnimationEvent/AnimationEvent" title="The documentation about this has not yet been written; please consider contributing!"><code>AnimationEvent()</code></a> constructor has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=848293" title="FIXED: Update AnimationEvent to be compatible with the spec">bug 848293</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/AnimationEvent/pseudoElement" title="The documentation about this has not yet been written; please consider contributing!"><code>AnimationEvent.pseudoElement</code></a> property has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=848293" title="FIXED: Update AnimationEvent to be compatible with the spec">bug 848293</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/TransitionEvent/TransitionEvent" title="The documentation about this has not yet been written; please consider contributing!"><code>TransitionEvent()</code></a> constructor has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=848291" title="FIXED: Update TransitionEvent to be compatible with the spec">bug 848291</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/TransitionEvent/pseudoElement" title="The documentation about this has not yet been written; please consider contributing!"><code>TransitionEvent.pseudoElement</code></a> property has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=848291" title="FIXED: Update TransitionEvent to be compatible with the spec">bug 848291</a>).</li>
+ <li>The non-standard <a href="/zh-TW/docs/Web/API/TransitionEvent/initTransitionEvent" title="The documentation about this has not yet been written; please consider contributing!"><code>TransitionEvent.initTransitionEvent()</code></a> and <a href="/zh-TW/docs/Web/API/AnimationEvent/initAnimationEvent" title='The AnimationEvent.initAnimationEvent() method Initializes an animation event created using the deprecated Document.createEvent("AnimationEvent") method.'><code>AnimationEvent.initAnimationEvent()</code></a> have been removed (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=868751" title='FIXED: Remove support for document.createEvent("AnimationEvent"), document.createEvent("TransitionEvent"), AnimationEvent.initAnimationEvent, and TransitionEvent.initTransitionEvent'>bug 868751</a>).</li>
+ <li>Support for the <code>multipart</code> property on <code>XMLHttpRequest</code> and <code>multipart/x-mixed-replace</code> responses in <code>XMLHttpRequest</code> has been removed. This was a Gecko-only feature that was never standardized. <a href="/en-US/docs/Server-sent_events" title="Server-sent_events">Server-Sent Events</a>, <a href="/en-US/docs/WebSockets" title="WebSockets">Web Sockets</a> or inspecting <code>responseText</code> from progress events can be used instead.</li>
+ <li>Support for <a href="/en-US/docs/WebAPI/Using_Web_Notifications" title="/en-US/docs/WebAPI/Using_Web_Notifications">Web Notifications</a> has been landed (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=782211" title="FIXED: Implement notification API spec">bug 782211</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/FormData" title="FormData 介面提供了一個簡單的方式來建立表單欄位與其值的名值對(key/value)集合,還能方便的使用 XMLHttpRequest.send() 方法來送出表單資料。如果 &lt;form> 元素的 enctype 屬性(attribute)值為 multipart/form-data 編碼,則 FormData 物件也會採用與表單相同的格式。"><code>FormData</code></a> <code>append</code> method now accepts a third optional <code>filename</code> parameter (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=690659" title="FIXED: filename parameter in the FormData.append method">bug 690659</a>).</li>
+ <li><a href="/zh-TW/docs/Web/API/Node/isSupported" title="The documentation about this has not yet been written; please consider contributing!"><code>Node.isSupported</code></a> has been removed (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=801562" title="FIXED: Remove Node.isSupported">bug 801562</a>).</li>
+ <li><a href="/zh-TW/docs/Web/API/Node/setUserData" title="The documentation about this has not yet been written; please consider contributing!"><code>Node.setUserData</code></a> and <a href="/zh-TW/docs/Web/API/Node/getUserData" title="The documentation about this has not yet been written; please consider contributing!"><code>Node.getUserData</code></a> has been removed for web content and are deprecated for chrome content (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=842372" title="FIXED: Make getUserData and setUserData ChromeOnly">bug 842372</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/Element/attributes" title="The documentation about this has not yet been written; please consider contributing!"><code>Element.attributes</code></a> property has been moved there from <a href="/zh-TW/docs/Web/API/Node" title="Node 是一個被多種 DOM 類型繼承的介面,它讓各種類型的 DOM 都能以同樣的方式來操作。如繼承了相同的方法,或能以相同的方式測試。"><code>Node</code></a> as required by the spec (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=844134" title="FIXED: attributes should be defined on Element and not Node">bug 844134</a>).</li>
+ <li>The Mac OS X backend for <a href="/zh-TW/docs/Web/API/DeviceLightEvent" title="The documentation about this has not yet been written; please consider contributing!"><code>Ambient Light Events</code></a> has been implemented.</li>
+ <li>Elements in the HTML namespace with local names <a href="/zh-TW/docs/Web/HTML/Element/bgsound" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;bgsound&gt;</code></a>, <a href="/zh-TW/docs/Web/HTML/Element/multicol" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;multicol&gt;</code></a>, and <a href="/zh-TW/docs/Web/HTML/Element/image" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;image&gt;</code></a> no longer implement the <a href="/zh-TW/docs/Web/API/HTMLSpanElement" title="The documentation about this has not yet been written; please consider contributing!"><code>HTMLSpanElement</code></a> interface. <a href="/zh-TW/docs/Web/HTML/Element/bgsound" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;bgsound&gt;</code></a> and <a href="/zh-TW/docs/Web/HTML/Element/bgsound" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;bgsound&gt;</code></a> implement <a href="/zh-TW/docs/Web/API/HTMLUnknownElement" title="The documentation about this has not yet been written; please consider contributing!"><code>HTMLUnknownElement</code></a> and <a href="/zh-TW/docs/Web/HTML/Element/image" title="The documentation about this has not yet been written; please consider contributing!"><code>&lt;image&gt;</code></a> implements <a href="/zh-TW/docs/Web/API/HTMLElement" title="HTMLElement 介面表示了所有的 HTML 元素。部分元素直接實作了此介面,其它則是實作繼承自 HTMLElement 的子介面。"><code>HTMLElement</code></a>.</li>
+ <li>The <a href="/zh-TW/docs/Web/API/NodeIterator/detach" title="The documentation about this has not yet been written; please consider contributing!"><code>NodeIterator.detach</code></a> method has been changed to do nothing (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=823549" title="FIXED: Make NodeIterator.detach() a no-op">bug 823549</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/BlobEvent" title="The documentation about this has not yet been written; please consider contributing!"><code>BlobEvent</code></a> interface has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=834165" title="FIXED: Implement BlobEvent">bug 834165</a>).</li>
+ <li>The properties <code>HTMLMediaElement.crossorigin</code> and <code>HTMLInputElement.inputmode</code> has been removed to match the spec in <a href="/zh-TW/docs/Web/API/HTMLMediaElement/crossOrigin" title="The documentation about this has not yet been written; please consider contributing!"><code>HTMLMediaElement.crossOrigin</code></a> and <code>HTMLInputElement.inputMode</code>, respectively (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=847370" title="FIXED: HTMLMediaElement - crossOrigin vs crossorigin">bug 847370</a> and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=850346" title="FIXED: inputmode vs inputMode for nsHTMLInputElement">bug 850346</a>).</li>
+ <li>WebRTC: the Media Stream API and Peer Connection API are now supported by default.</li>
+ <li>Web Components: the <a href="/zh-TW/docs/Web/API/Document/register" title="The documentation about this has not yet been written; please consider contributing!"><code>Document.register</code></a> method has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=783129" title="FIXED: Implement the document.register interface method">bug 783129</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/ProgressEvent/initProgressEvent" title="The documentation about this has not yet been written; please consider contributing!"><code>ProgressEvent.initProgressEvent()</code></a> constructor method has been removed. Uses the standard constructor, <a href="/zh-TW/docs/Web/API/ProgressEvent/ProgressEvent" title="The documentation about this has not yet been written; please consider contributing!"><code>ProgressEvent()</code></a> to construc and initialize <a href="/zh-TW/docs/Web/API/ProgressEvent" title="The ProgressEvent interface represents events measuring progress of an underlying process, like an HTTP request (for an XMLHttpRequest, or the loading of the underlying resource of an &lt;img>, &lt;audio>, &lt;video>, &lt;style> or &lt;link>)."><code>ProgressEvent</code></a> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=843489" title='FIXED: [Progress Events] Remove support for ProgressEvent.initProgressEvent() and Document.createEvent("ProgressEvent")'>bug 843489</a>).</li>
+ <li>Manipulated data associated with a <code><a href="/zh-TW/docs/Web/Reference/Events/cut" title="/zh-TW/docs/Web/Reference/Events/cut">cut</a></code>, <code><a href="/zh-TW/docs/Web/Reference/Events/copy" title="/zh-TW/docs/Web/Reference/Events/copy">copy</a></code>, or <code><a href="/zh-TW/docs/Web/Reference/Events/paste" title="/zh-TW/docs/Web/Reference/Events/paste">paste</a></code> event can now be accessed via the <a href="/zh-TW/docs/Web/API/ClipboardEvent/clipboardData" title="The documentation about this has not yet been written; please consider contributing!"><code>ClipboardEvent.clipboardData</code></a> property (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=407983" title="FIXED: Add support clipboardData object for the onpaste, oncopy, oncut events">bug 407983</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/HTMLTimeElement" title="The documentation about this has not yet been written; please consider contributing!"><code>HTMLTimeElement</code></a> interface has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=629801" title="FIXED: Implement HTML5 &lt;time> element">bug 629801</a>).</li>
+ <li>When a <a href="/zh-TW/docs/Web/API/Worker" title="The documentation about this has not yet been written; please consider contributing!"><code>Worker</code></a> constructor is passed an invalid URL, it now throws <a href="/zh-TW/docs/Web/API/DOMException" title="The documentation about this has not yet been written; please consider contributing!"><code>DOMException</code></a> of type <code>SECURITY_ERR</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=587251" title="FIXED: new Worker(badURL) should throw a SECURITY_ERR">bug 587251</a>).</li>
+ <li>The <code>origin</code> property has been added to the <a href="/zh-TW/docs/Web/API/Window/location" title="The documentation about this has not yet been written; please consider contributing!"><code>window.location</code></a> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=828261" title="FIXED: Implement `window.location.origin`.">bug 828261</a>).</li>
+ <li>The <code>valueAsDate</code> and <code>valueAsNumber</code> methods have been added for <code>&lt;input type="time"&gt;</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=781570" title="FIXED: implement valueAsNumber and valueAsDate for input &lt;input type=time>">bug 781570</a>).</li>
+ <li>The <code>min</code> and <code>max</code> attributes now apply to <code>&lt;input type="time"&gt;</code> too (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=781572" title="FIXED: implement the min and max attribute for &lt;input type=time>">bug 781572</a>).</li>
+ <li>Some new keyCodes for volume control are supported (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=674739" title="FIXED: Implement DOM3 KeyboardEvent types for audio">bug 674739</a>).</li>
+ <li>Some new keyCodes for ancient keyboard layout such as AS/400 are now supported on Windows and Linux (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=833719" title="FIXED: Some function keys are not working since Firefox Version 15">bug 833719</a>).</li>
+ <li>Various keyCode values for OEM sepecific keys on Windows are now supported again (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=833719" title="FIXED: Some function keys are not working since Firefox Version 15">bug 833719</a>).</li>
+ <li>The function <a href="/en-US/docs/DOM/window.crypto.getRandomValues" title="DOM/window.crypto.getRandomValues"><code>window.crypto.getRandomValues</code></a> has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=440046" title="FIXED: expose secure PRNG in the DOM (window.crypto.getRandomValues)">bug 440046</a>).</li>
+ <li>The methods <a href="/zh-TW/docs/Web/API/NodeIterator/expandEntityReferences" title="The documentation about this has not yet been written; please consider contributing!"><code>NodeIterator.expandEntityReferences()</code></a> and <a href="/zh-TW/docs/Web/API/TreeWalker/expandEntityReferences" title="The documentation about this has not yet been written; please consider contributing!"><code>TreeWalker.expandEntityReferences()</code></a>, no more in the latest DOM spec, has been removed (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=672190" title="FIXED: consider removing expandEntityReferences from NodeIterator and TreeWalker">bug 672190</a>).</li>
+ <li>CSSOM: the method <a href="/zh-TW/docs/Web/API/CSSKeyframesRule" title="The documentation about this has not yet been written; please consider contributing!"><code>CSSKeyframesRule</code></a><code>.insertRule</code> has been removed to <a href="/zh-TW/docs/Web/API/CSSKeyframesRule" title="The documentation about this has not yet been written; please consider contributing!"><code>CSSKeyframesRule</code></a><code>.appendRule</code> to match a spec change (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=841896" title="FIXED: CSSKeyframesRule should have a `appendRule` method, not `insertRule`">bug 841896</a>).</li>
+ <li>CSSOM If the given parameter given to <a href="/zh-TW/docs/Web/API/CSSStyleSheet/insertRule" title="CSSStyleSheet.insertRule() 方法新增一個新的 CSS 規則,到當前的樣式表,他伴隨著一些限制."><code>CSSStyleSheet.insertRule</code></a> contains more than one rule, a <a href="/zh-TW/docs/Web/API/DOMException" title="The documentation about this has not yet been written; please consider contributing!"><code>DOMException</code></a> with a <code>SYNTAX_ERR</code> is now thrown (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=765599" title="FIXED: CSSStyleSheet.insertRule should throw when there are more than one rule">bug 765599</a>).</li>
+ <li>Until now, when the same headers were repeatedly set with <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#setRequestHeader" title="/en-US/docs/Web/API/XMLHttpRequest#setRequestHeader"><code>XMLHttpRequest.setRequestHeader</code></a>, the last-specified value was used. This behavior has been changed to comply with the spec, so those values will be properly combined (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=819051" title="FIXED: XMLHttpRequest.setRequestHeader() overwrites instead of combines values for the same header.">bug 819051</a>).</li>
+ <li><a href="/zh-TW/docs/Web/API/HTMLMediaElement" title="The documentation about this has not yet been written; please consider contributing!"><code>HTMLMediaElement</code></a> supports now <code>playbackRate</code> (both read and write), with pitch correction. Pitch correction can be controlled using the property <code>mozPreservesPitch</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=495040" title="FIXED: Implement playbackRate and related bits">bug 495040</a>).</li>
+ <li>CSSOM: Support for the new <a href="/zh-TW/docs/Web/API/CSSGroupingRule" title="The documentation about this has not yet been written; please consider contributing!"><code>CSSGroupingRule</code></a> and <a href="/zh-TW/docs/Web/API/CSSConditionRule" title="The documentation about this has not yet been written; please consider contributing!"><code>CSSConditionRule</code></a> has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=814907" title="FIXED: implement CSSGroupingRule and CSSConditionRule">bug 814907</a>).</li>
+ <li>CSSOM: On <a href="/zh-TW/docs/Web/API/CSSRule" title="The documentation about this has not yet been written; please consider contributing!"><code>CSSRule</code></a> the constant CSSRule.MOZ_KEYFRAME_RULE and CSSRule.MOZ_KEYFRAMES_RULE have been unprefixed to CSSRule.KEYFRAME_RULE and CSSRule.KEYFRAMES_RULE. The prefixed version are temporarily kept for helping Web author to transition their code <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=816431" title="FIXED: unprefix CSSRule.MOZ_KEYFRAME{,S}_RULE constants">bug 816431</a>).</li>
+ <li>CSSOM: It is now possible to set the value of <code>conditionText</code> for <a href="/zh-TW/docs/Web/API/CSSMediaRule" title="The documentation about this has not yet been written; please consider contributing!"><code>CSSMediaRule</code></a> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=815021" title="FIXED: implement CSSMediaRule.conditionText assignment">bug 815021</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/DOMParser" title="DOMParser可以將XML或是HTML格式的字串轉成DOM 文件. DOMParser的規格請參閱DOM解譯與串流化."><code>DOMParser</code></a> <code>parseFromStream</code> and <code>parseFromBuffer</code> methods are no longer available from web content (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=816410" title="FIXED: Convert XMLSerializer and DOMParser to WebIDL bindings">bug 816410</a>).</li>
+ <li>The <code><a href="/en-US/docs/XMLSerializer">XMLSerializer</a></code> <code>serializeToStream</code> method is no longer available from web content (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=816410" title="FIXED: Convert XMLSerializer and DOMParser to WebIDL bindings">bug 816410</a>).</li>
+ <li><a href="/zh-TW/docs/Web/API/TextDecoder" title="The documentation about this has not yet been written; please consider contributing!"><code>TextDecoder</code></a> and <a href="/zh-TW/docs/Web/API/TextEncoder" title="The documentation about this has not yet been written; please consider contributing!"><code>TextEncoder</code></a> interfaces have been updated to match the latest spec (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=801487" title="FIXED: Update StringEncoding API per the latest spec and fix some bugs">bug 801487</a>) and are now available in Workers (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=795542" title="FIXED: Implement StringEncoding API in Workers">bug 795542</a>).</li>
+ <li>Support for the <code>CSS.supports()</code> method has been added, behind the <code><code>layout.css.supports-rule.enabled</code></code> pref (off by default) (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=779917" title="FIXED: Implement CSS.supports()">bug 779917</a>).</li>
+ <li>Support for UndoManager has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=617532" title='FIXED: implement the HTML5 "undo history" feature (UndoManager interface)'>bug 617532</a>).</li>
+ <li>The CSSOM <a href="/zh-TW/docs/Web/API/Document/caretPositionFromPoint" title="The documentation about this has not yet been written; please consider contributing!"><code>document.caretPositionFromPoint</code></a> method, which returns a <a href="/zh-TW/docs/Web/API/CaretPosition" title="The documentation about this has not yet been written; please consider contributing!"><code>CaretPosition</code></a> has been implemented.</li>
+ <li>The index argument of the <a href="/zh-TW/docs/Web/API/TableRow/insertCell" title="The documentation about this has not yet been written; please consider contributing!"><code>tableRow.insertCell</code></a> and <a href="/zh-TW/docs/Web/API/Table/insertRow" title="The documentation about this has not yet been written; please consider contributing!"><code>table.insertRow</code></a> methods has been made optional as per HTML specification.</li>
+ <li><a href="/zh-TW/docs/Web/API/Navigator/getUserMedia" title="The documentation about this has not yet been written; please consider contributing!"><code>Navigator.getUserMedia</code></a>, still prefixed as <code>Navigator.mozGetUserMedia</code> is now activated by default.</li>
+ <li>The third, optional, <code>transfer</code> argument of <a href="/zh-TW/docs/Web/API/Window/postMessage" title="The documentation about this has not yet been written; please consider contributing!"><code>Window.postMessage</code></a> is now supported. It allows to transfer a sequence of <a href="/zh-TW/docs/Web/API/Transferable" title="The documentation about this has not yet been written; please consider contributing!"><code>Transferable</code></a> objects to the destination (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=822094" title="FIXED: Implement transfer parameter of window.postMessage">bug 822094</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/Element/getElementsByTagName" title="The documentation about this has not yet been written; please consider contributing!"><code>element.getElementsByTagName</code></a> method will now return <code>HTMLCollection</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=799464" title="FIXED: Make Element.getElementsBy* return HTMLCollection">bug 799464</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/File" title="File 介面提供了檔案的資訊並且允許網頁中的 JavaScript 存取檔案的內容。"><code>File</code></a> <code>mozLastModifiedDate</code> property has been implemented. (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=793955" title="FIXED: [DeviceStorage] files returned by DeviceStorage.get() don't always have lastModifiedDate">bug 793955</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/File" title="File 介面提供了檔案的資訊並且允許網頁中的 JavaScript 存取檔案的內容。"><code>File</code></a> <code>lastModifiedDate</code> property returns the current date, when the date of the last modification is unknown. (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=793459" title="FIXED: Update File.lastModifiedDate to latest spec">bug 793459</a>.</li>
+ <li>The <a href="/zh-TW/docs/Web/API/CanvasRenderingContext2D" title='要取得此實作此介面的實體物件,可以於一個 &amp;amp;lt;canvas> 元素上以 "2d" 為參數呼叫 getContext() 方法:'><code>CanvasRenderingContext2D</code></a> <code>isPointInStroke</code> method has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=803124" title="FIXED: Implement isPointInStroke">bug 803124</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/HTMLCanvasElement" title="HTMLCanvasElement 介面提供控制 canvas 元素的屬性和方法. HTMLCanvasElement 介面也繼承了 HTMLElement 介面的屬性和方法."><code>HTMLCanvasElement</code></a> <code>toBlob</code> method has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=648610" title="FIXED: Implement &lt;canvas>.toBlob">bug 648610</a>).</li>
+ <li>The <a href="/zh-TW/docs/Web/API/Node/isSupported" title="The documentation about this has not yet been written; please consider contributing!"><code>Node.isSupported</code></a> and the <a href="/zh-TW/docs/Web/API/Document/implementation" title="The documentation about this has not yet been written; please consider contributing!"><code>document.implementation.hasFeature()</code></a> methods have been changed to always return <code>true</code> (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=801425" title="FIXED: Make hasFeature() and isSupported() always return true">bug 801425</a>).</li>
+ <li>When calling <code>document.createElement(null)</code>, <code>null</code> will now be stringified and works like <code>document.createElement("null")</code>.</li>
+</ul>
+
+<h2 id="SVG">SVG</h2>
+
+<p>General Gecko:</p>
+
+<ul>
+ <li>Inconsistent renderings of <code><a href="/zh-TW/docs/Web/MathML/Element/mmultiscripts" title="&lt;mmultiscripts>">&lt;mmultiscripts&gt;</a></code>, <code><a href="/zh-TW/docs/Web/MathML/Element/msub" title="&lt;msub>">&lt;msub&gt;</a></code>, <code><a href="/zh-TW/docs/Web/MathML/Element/msup" title="&lt;msup>">&lt;msup&gt;</a></code> and <code><a href="/zh-TW/docs/Web/MathML/Element/msubsup" title="&lt;msubsup>">&lt;msubsup&gt;</a></code> have been unified and the error handling of these elements has been improved (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=827713" title="FIXED: Inconsistent rendering of mub / mup / msubsup / mmultiscripts">bug 827713</a>).</li>
+ <li>The <a href="/en-US/docs/Web/SVG/Attribute/paint-order" title="/en-US/docs/Web/SVG/Attribute/paint-order">paint-order</a> attribute has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=828805" title="FIXED: implement paint-order property from SVG 2">bug 828805</a>).</li>
+ <li>The implementation of the <code>contentScriptType</code> and <code>contentStyleType</code> properties has been removed from <a href="https://developer.mozilla.org/en-US/docs/Web/API/SVGSVGElement" title="/en-US/docs/Web/API/SVGSVGElement"><code>SVGSVGElement</code></a> along with the removal from SVG2 (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=819731" title="FIXED: remove contentStyleType and contentScriptType from SVGSVGElement">bug 819731</a>).</li>
+</ul>
+
+<h2 id="MathML">MathML</h2>
+
+<p>General Gecko:</p>
+
+<ul>
+ <li>The <code>dir</code> attribute for controlling directionality of formulas on e.g. <code><a href="https://developer.mozilla.org/en-US/docs/Web/MathML/Element/math" title="&lt;math>">&lt;math&gt;</a></code> or <code><a href="https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mrow" title="&lt;mrow>">&lt;mrow&gt;</a></code> elements is now equivalent to using the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/direction" title=""><code>direction</code></a> CSS property.</li>
+ <li>The equal sign ("=") is now <a href="https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mo#attr-stretchy">stretchable</a>.</li>
+ <li>The "<code>updiagonalarrow</code>" value for the <code>notation</code> attribute on <code><a href="https://developer.mozilla.org/en-US/docs/Web/MathML/Element/menclose" title="&lt;menclose>">&lt;menclose&gt;</a></code> elements has been added.</li>
+ <li>Negative widths for the <code><a href="/zh-TW/docs/Web/MathML/Element/mspace" title="&lt;mspace>">&lt;mspace&gt;</a></code> element has been implemented (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=717546" title="FIXED: Implement mspace with negative width">bug 717546</a>).</li>
+ <li>The <code><a href="/zh-TW/docs/Web/MathML/Element/semantics" title="&lt;semantics>">&lt;semantics&gt;</a></code> element now determines the visible child as described in the MathML3 specification.</li>
+ <li>To help MathML authors debugging "invalid-markup" errors in their documents, MathML parsing errors (such as having too many / too few child elements) and warnings about deprecated attributes or wrong attribute values are now reported to the <a href="/en-US/docs/Error_Console" title="Error_Console">Error Console</a>.</li>
+ <li>The <code>scriptminsize</code> attribute now accepts unitless values and percent values. They are interpreted as multiples of the default value ("<code>8pt</code>").</li>
+ <li>Unitless values are now also allowed for the <code>mathsize</code> and <code>fontsize</code> attributes; they multiply the default value.</li>
+</ul>
+
+<h2 id="Network">Network</h2>
+
+<p>General Gecko:</p>
+
+<ul>
+ <li>We continue to update our CSP implementation to match the CSP 1.0 spec, which reached Candidate Recommendation:
+ <ul>
+ <li>Support for the spec-compliant <code>Content-Security-Policy</code> HTTP header (in addition to the experimental <code>X-Content-Security-Policy</code>) has been added (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=783049" title="FIXED: CSP : use existing/old parser for X-Content-Security-Policy header, new/CSP 1.0 spec compliant parser for Content-Security-Policy header">bug 783049</a>). <strong>Note</strong>: the patch for this new header landed in Firefox 21, it is disabled on builds (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=842657" title="FIXED: Flip the pref to enable the CSP 1.0 parser for Firefox">bug 842657</a>).</li>
+ </ul>
+ </li>
+</ul>
+
+<h2 id="Worker">Worker</h2>
+
+<p>General Gecko:</p>
+
+<ul>
+ <li>The functions <a href="/zh-TW/docs/Web/API/Window/URL/createObjectURL" title="The documentation about this has not yet been written; please consider contributing!"><code>URL.createObjectURL</code></a> and <a href="/zh-TW/docs/Web/API/Window/URL/revokeObjectURL" title="The documentation about this has not yet been written; please consider contributing!"><code>URL.revokeObjectURL</code></a> are now included in the set of <a href="/en-US/docs/DOM/Worker/Functions_available_to_workers" title="DOM/Worker/Functions_available_to_workers">functions available to workers</a>.</li>
+</ul>
+
+<h2 id="Security">Security</h2>
+
+<p>General Gecko:</p>
+
+<ul>
+ <li>Mixed content blocking. Firefox will no longer load non-secure (http) resources on secure (https) pages (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=834836" title="FIXED: Turn on pref to block mixed active content">bug 834836</a>).</li>
+ <li>The standard syntax of <a href="/en-US/docs/Security/CSP" title="/en-US/docs/Security/CSP">CSP</a> 1.0 policies are now implemented and enforced by default.</li>
+</ul>
+
+<h2 id="XForms">XForms</h2>
+
+<p>General Gecko:</p>
+
+<p>Support for <a href="/en-US/docs/XForms" title="XForms">XForms</a> has been <a href="http://www.philipp-wagner.com/blog/2011/07/the-future-of-mozilla-xforms/" title="http://www.philipp-wagner.com/blog/2011/07/the-future-of-mozilla-xforms/"><strong>removed</strong></a> in Firefox 19.</p>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li><a href="http://www.mozilla.org/en-US/firefox/os/notes/1.2/" title="http://www.mozilla.org/en-US/firefox/os/notes/1.2/">Firefox OS 1.2 Notes</a></li>
+</ul>
+
+<h2 id="Older_versions">Older versions</h2>
+
+<p></p><div class="multiColumnList">
+<ul>
+<li><a href="/en-US/docs/Mozilla/Firefox_OS/Releases/1.1">Firefox OS 1.1 for developers</a></li><li><a href="/en-US/docs/Mozilla/Firefox_OS/Releases/1.0.1">Firefox OS 1.0.1 for developers</a></li></ul>
+</div><p></p>
+
+<p> </p>
+
+<p>Share this article: <a href="http://mzl.la/1av9ZRr">http://mzl.la/1av9ZRr</a></p>
diff --git a/files/zh-tw/archive/b2g_os/releases/index.html b/files/zh-tw/archive/b2g_os/releases/index.html
new file mode 100644
index 0000000000..3edbcd4c75
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/releases/index.html
@@ -0,0 +1,24 @@
+---
+title: Firefox OS developer release notes
+slug: Archive/B2G_OS/Releases
+tags:
+ - Firefox OS
+ - NeedsTranslation
+ - TopicStub
+translation_of: Archive/B2G_OS/Releases
+---
+<h2 id="Firefox_OS_release_notes_by_version">Firefox OS release notes by version</h2>
+<p>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.</p>
+<div class="multiColumnList">
+ {{ListSubpages("",1,0,1)}}</div>
+<h2 id="Other_supporting_information">Other supporting information</h2>
+<dl>
+ <dt>
+ <a href="/en-US/docs/Mozilla/Firefox_OS/API_support_table">Firefox OS API support table</a></dt>
+ <dd>
+ Lists the different APIs available, and what versions of Firefox have support for them.</dd>
+ <dt>
+ <a href="/en-US/docs/Web/Apps/App_permissions">App permissions</a></dt>
+ <dd>
+ Lists hosted, privileged and certified APIs, along with information on the permissions they need to have set in the App Manifest of your installable apps, such as the manifest permission name, app type required, description, access property, and default permission.</dd>
+</dl>
diff --git a/files/zh-tw/archive/b2g_os/running_custom_builds_in_the_app_manager/index.html b/files/zh-tw/archive/b2g_os/running_custom_builds_in_the_app_manager/index.html
new file mode 100644
index 0000000000..be4fefd747
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/running_custom_builds_in_the_app_manager/index.html
@@ -0,0 +1,43 @@
+---
+title: 在 WebIDE 中執行 Firefox OS/Gaia 自訂版本
+slug: Archive/B2G_OS/Running_custom_builds_in_the_App_Manager
+translation_of: Archive/B2G_OS/Developing_Gaia/Running_custom_builds_in_WebIDE
+---
+<div class="summary">
+ <p><span class="seoSummary">Firefox OS 模擬器 (Firefox OS Simulator) 已於 2014 年 2 月新增功能,可執行自訂的 B2G 執行環境及/或 Gaia 設定檔 (Profile)。本文將說明相關設定方式,並透過 <a href="https://developer.mozilla.org/en-US/docs/Tools/WebIDE">WebIDE</a> 執行模擬器。</span></p>
+</div>
+<div class="note">
+ <p><strong>注意:</strong>在本文發表之時,滑鼠事件尚未能正確對應觸控事件。例如回到主畫面鈕並無法回應滑鼠點擊的動作。但只要使用 B2G Desktop 鍵盤指令,即可解決此問題。可參閱「<a href="https://developer.mozilla.org/en-US/Firefox_OS/Using_the_B2G_desktop_client">Using the B2G Desktop client</a>」。</p>
+</div>
+<div class="note">
+ <p><strong>注意:</strong>如果你能提交 Try 版本,則可在各個 B2G 桌面平台的版本路徑中產生模擬器附加元件。如此可讓模擬器搭配自訂的 Gecko,或搭配對 Gaia 上進行的修改。在某些使用條件下可選用此較簡易的方式。</p>
+</div>
+<h2 id="必要條件">必要條件</h2>
+<p>要在模擬器內執行自訂版本,必須齊備相關工具。</p>
+<ol>
+ <li>安裝 Firefox 並確定其內有 <a href="https://developer.mozilla.org/en-US/docs/Tools/WebIDE">WebIDE</a> (工具<em> &gt; </em>網頁開發者<em> &gt; </em>WebIDE)。</li>
+ <li>安裝最新版 <a href="http://nightly.mozilla.org/">B2G Desktop Nightly</a>,或<a href="https://developer.mozilla.org/en-US/Firefox_OS/Using_the_B2G_desktop_client#Building_the_desktop_client">建構自己的版本</a>。</li>
+ <li>安裝<a href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/">最新版 Firefox OS 模擬器</a>套件,即 7.0pre7.20140113 或更高版本。或可將 FXOS_SIMULATOR=1 添增到自己的 mozconfig,並使用 ./mach build &amp;&amp; ./mach package,從自己的 B2G Desktop 原始碼來建構。</li>
+ <li>用 <code>SIMULATOR=1 flag</code> 建立 Gaia 設定檔。舉例來說,你可在自己的 Gaia 路徑中執行 <code>make SIMULATOR=1 PROFILE_FOLDER=profile-b2g profile-b2g</code> 指令 (請參閱 <a href="https://developer.mozilla.org/en-US/Firefox_OS/Platform/Gaia/Hacking#Make_options">Hacking Gaia</a> 進一步了解)。</li>
+</ol>
+<h2 id="設定自己的模擬器">設定自己的模擬器</h2>
+<p>你必須完成某些設定,才能讓模擬器找到你的 B2G Desktop 與自訂的 Gaia。</p>
+<ol>
+ <li>打開附加元件管理分頁 (工具 &gt; 附加元件;或在網址列中輸入 <code>about:addons</code>)。</li>
+ <li>點擊「擴充套件 (Extensions)」分頁,可列出現已安裝的套件。</li>
+ <li>在清單中找到新的 Firefox OS 模擬器擴充套件。應該會顯示如 <em>Firefox OS 1.3 Simulator 7.0pre.7.20140113</em>。</li>
+ <li>點擊此擴充套件內的「選項 (Preferences)」按鈕。<br>
+ <img alt="the Firefox OS simulator preferences: Preferences, disable and remove." src="https://mdn.mozillademos.org/files/7241/about-addon.png" style="width: 1247px; height: 63px; display: block; margin: 0px auto;"></li>
+ <li>如果你要使用自訂的可執行檔 (最新的 B2G Desktop 版本),以利於 WebIDE 中執行 Firefox OS,則點擊「<em>Select a custom runtime executable</em>」旁邊的「<em>Browse...</em>」按鈕,在檔案選擇介面中找到自己的 B2G Desktop 可執行檔。如果是 Windows/Linux 環境就很好找;而在 Mac 環境中,只要安裝於 <code>Applications</code> 路徑下,就可於 <code>/Applications/B2G.app/Contents/MacOS/b2g</code> 找到。</li>
+ <li>你也能在 WebIDE 中執行自訂的 Gaia 設定檔。同樣點擊「<em>Select a custom Gaia profile directory</em>」旁邊的「<em>Browse...</em>」按鈕,找到自訂的設定檔路徑 (應該是 <em>gaia/profile-b2g</em>)。</li>
+ <li>如果要回到非自訂的模擬器,只要重新設定組態值即可。但<strong>不能</strong>單純的刪除再重新安裝模擬器附加元件。你必須開啟新的分頁,在網址列中輸入「about:config」,繼續在該頁的搜尋欄位中輸入「fxos」或「simulator」,找到如「extensions.fxos_2_0_simulator@mozilla.org.customRuntime」,或「extensions.fxos_2_0_simulator@mozilla.org.gaiaProfile」。這時按下滑鼠右鍵並點選「Reset」。最後重新啟動模擬器版本,就能使用非自訂版本的模擬器。</li>
+</ol>
+<h2 id="使用自訂的模擬器">使用自訂的模擬器</h2>
+<p>最後說明該如何使用自訂的模擬器。</p>
+<ol>
+ <li>啟動 <a href="https://developer.mozilla.org/en-US/docs/Tools/WebIDE">WebIDE</a> (工具<em> &gt; </em>網頁開發者<em> &gt; WebIDE</em>);或可按下「Shift + F8」。</li>
+ <li>點擊右上方的按鈕,開啟「Runtime」選單。</li>
+ <li>點擊「Firefox OS 1.3」按鈕 (或你安裝的任何最新版本)。即使你的 B2G desktop/Gaia 版本比較新,仍建議點選 Firefox OS 1.3 版。</li>
+ <li>接著就會啟動模擬器,將載入 B2G Desktop 並執行你的 B2G Nightly 版本與自訂 Gaia!</li>
+</ol>
+<p><img alt="a screenshot of the b2g desktop simulator " src="https://mdn.mozillademos.org/files/7239/b2g-desktop.png" style="width: 434px; height: 616px; display: block; margin: 0px auto;"></p>
diff --git a/files/zh-tw/archive/b2g_os/screencast_series_colon__app_basics_for_firefox_os/index.html b/files/zh-tw/archive/b2g_os/screencast_series_colon__app_basics_for_firefox_os/index.html
new file mode 100644
index 0000000000..ae38c355ea
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/screencast_series_colon__app_basics_for_firefox_os/index.html
@@ -0,0 +1,208 @@
+---
+title: 系列影片:Firefox OS App 開發入門
+slug: 'Archive/B2G_OS/Screencast_series:_App_Basics_for_Firefox_OS'
+translation_of: 'Archive/B2G_OS/Firefox_OS_apps/Screencast_series:_App_Basics_for_Firefox_OS'
+---
+<div class="summary">
+<p><span class="seoSummary"><a href="http://mozilla.com.tw/firefox/os/">Firefox OS</a> 這款作業系統,就是要將 Web 帶入行動裝置所設計。Firefox OS 不是以新技術或新開發環境所建構的全新 OS;而是以行之有年的標準化 Web 技術所打造而成。如果你本身就是 Web 開發者且想建構行動 App,那麼 Firefox OS 就能提供最適合的工具,且不會要求你改變自己以熟悉的工作流程,也不需再重新學習另一套開發環境。此系列短片是由 Mozilla 與 Telenor 在挪威共同錄製而成,將引領你入門 Firefox OS App 的開發作業。</span></p>
+</div>
+
+<p>你可透過本系列影片了解:</p>
+
+<ul>
+ <li>該如何建構自己的第一個 Firefox OS App</li>
+ <li>該如何在桌機與實際裝置上測試 App 並除錯</li>
+ <li>該如何將 App 提交至 <a href="https://developer.mozilla.org/en-US/Marketplace">Firefox Marketplace</a> 中</li>
+ <li>該如何使用 API,以及 Firefox OS 針對 JavaScript 所提供的特殊介面,進而存取智慧型手機中的硬體</li>
+</ul>
+
+<div class="note">
+<p><strong>注意:</strong>每部短片均極為精簡扼要,讓你短暫休息時也能欣賞。一口氣看完整個系列也不會超過一個小時。</p>
+</div>
+
+<h2 id="程式碼與開發環境">程式碼與開發環境</h2>
+
+<p>除了短片之外,你也能<a href="https://github.com/comoyo/fxos-video-script/">從 GitHub 下載程式碼範例</a>。如果你想自己測試程式碼範例,就必須先設定簡易的開發環境。必備條件如下:</p>
+
+<ul>
+ <li>最新版本的 <a href="http://mozilla.com.tw/firefox/new/">Firefox</a> (內含現成的開發工具)─ 如果你真的要把玩最新技術,那我們建議可下載 <a href="http://www.mozilla.org/en-US/firefox/aurora/">Firefox Aurora</a> 或 <a href="https://nightly.mozilla.org/">Nightly</a> 版本</li>
+ <li>文字編輯器 ─ 短片中使用了 <a href="http://www.sublimetext.com/">Sublime Text</a>,但其實任何文字編輯器均可。如果你想直接在 Web 上編輯程式,則可嘗試 <a href="http://brackets.io/">Adobe Brackets</a></li>
+ <li>可供你推播自己 Demo 檔案的伺服器。某些展示用 App 需要 HTTP 連線,而不適用本地伺服器</li>
+</ul>
+
+<h2 id="系列影片介紹">系列影片介紹</h2>
+
+<p>此系列短片是由 Telenor Digital 的 <a href="http://twitter.com/janjongboom">Jan Jongboom (@janjongboom)</a> 與 <a href="http://twitter.com/sergimansilla">Sergi Mansilla (@sergimansilla)</a>,以及 Mozilla 的 <a href="http://twitter.com/codepo8">Chris Heilmann (@codepo8)</a> 於 2014 年 2 月所錄製。地點位於挪威首都奧斯陸的 Telenor Digital 辦公室內。</p>
+
+<p>這三位接下來將為大家簡短介紹系列影片:</p>
+
+<p>{{EmbedYouTube("835Z2RTPdQk")}}</p>
+
+<h2 id="Section_1:建構並發佈">Section 1:建構並發佈</h2>
+
+<h2 id="自己的第一款_Firefox_OS_App">自己的第一款 Firefox OS App</h2>
+
+<p>接下來 5 支短片將說明如何建構 Firefox OS App、如何在電腦和實體裝置上測試 App 並除錯、如何將 App 發佈至 <a href="https://marketplace.firefox.com/">Firefox Marketplace</a> 中。這看起來好像很複雜,但其實只要你已經知道怎麼寫網站,就等於能完成 90% 的 App。</p>
+
+<h3 id="不只是網站">不只是網站</h3>
+
+<p>Firefox OS App 就是 HTML5 App;其所使用的技術本質上也與網站技術相同。你可以先寫個網站,再提供 manifest 檔案 (可參閱《<a href="https://developer.mozilla.org/zh-TW/docs/%E6%87%89%E7%94%A8%E7%A8%8B%E5%BC%8F/Manifest-840092-dup#csp">App manifest</a>》進一步了解) 即可將網站轉為 App。這個動作就等於告知 Firefox OS 你在撰寫 App,並可讓你:</p>
+
+<ul>
+ <li>能把 App 發佈到 Marketplace 上</li>
+ <li>可存取裝置的硬體,蒐集如<a href="https://developer.mozilla.org/en-US/docs/Web/API/Geolocation">地理位置資訊 (Geolocation)</a> 與<a href="https://developer.mozilla.org/en-US/Apps/Build/gather_and_modify_data/Keep_it_level_responding_to_device_orientation_changes">裝置方向 (Device Orientation)</a> 等資訊</li>
+ <li>還有更多功能!</li>
+</ul>
+
+<p>HTML5 App 其實是透過網站強化其功能,也同樣遵循相同的規則,如:</p>
+
+<ul dir="ltr">
+ <li>「Progressive enhancement」,亦即先撰寫可用的配置,再視情況套用適合的版面。</li>
+ <li>因應當前的執行裝置環境。如透過 <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries">media queries</a> 與 <a href="https://developer.mozilla.org/en-US/Apps/app_layout/responsive_design_building_blocks#Responsive_images.2Fvideo">responsive images</a> 而最佳化 App,已配合不同的螢幕尺寸、解析度、可用網路的速度等。</li>
+ <li>採用 <a href="https://developer.mozilla.org/en-US/docs/Web/HTML">HTML</a>、<a href="https://developer.mozilla.org/en-US/docs/Web/CSS">CSS</a>、<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">JavaScript</a> 作為其核心技術。</li>
+</ul>
+
+<p>若要將網頁轉為絕佳的 App,其中的差異就在於開發者就必須考量到行動裝置使用者。也代表 App 首先必須要能:</p>
+
+<ul dir="ltr">
+ <li><a href="https://developer.mozilla.org/en-US/Apps/Build/Offline">離線作業</a></li>
+ <li>在讓使用者進行某個作業之餘,也要提供可輕鬆使用的介面</li>
+ <li>妥善利用有限的電池容量、處理器的速度、可用的螢幕空間而能盡情把玩 App</li>
+</ul>
+
+<p>在大多數的情況下,開發者必須稍微讓網頁「瘦身」並簡化介面。而使用者也確實能因此獲得更好的經驗。</p>
+
+<p>{{EmbedYouTube("oUbOw2cQC4k")}}</p>
+
+<div class="note">
+<p><strong>注意:</strong>若要進一步設計出絕佳的 HTML5 App,可參閱 <a href="https://developer.mozilla.org/zh-TW/docs/%E6%87%89%E7%94%A8%E7%A8%8B%E5%BC%8F-840092-dup/Publishing/In-app_payments">MDN 上的《應用程式中心》</a>一文。</p>
+</div>
+
+<h3 id="App_的_Manifest_檔案">App 的 Manifest 檔案</h3>
+
+<p><a href="https://developer.mozilla.org/en-US/Apps/Developing/Manifest">Firefox OS App 的 manifest 檔案</a> (你會在「應用程式管理員 App Manager」看到中文翻譯為「安裝資訊檔」),屬於簡易的 JSON 檔案,將告知作業系統該 App 的相關訊息;另外也可將網頁轉為 <a href="https://developer.mozilla.org/en-US/Apps/Quickstart/Build/Intro_to_open_web_apps">Open Web App</a>。開發者可於 manifest 定義 App 不同語系的名稱,也可要求作業系統存取不同的服務與硬體。當然亦可定義該 App 適合的方向 (直幅或橫幅),亦能依需要而鎖定畫面。</p>
+
+<p>{{EmbedYouTube("UTXIVg6sYtA")}}</p>
+
+<p>進一步了解 manifest 檔案與相關工具:</p>
+
+<ul>
+ <li><a href="https://marketplace.firefox.com/developers/validator">Open Web Apps Manifest Validator</a> ─ 亦可作為 <a href="http://firefox-marketplace-api.readthedocs.org/en/latest/">API</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/Apps/Developing/Manifest">Open Web App 的 Manifest 檔案相關 MDN 文章 </a> ─ 另說明該如何從自己的伺服器提供 manifest 檔案</li>
+</ul>
+
+<h3 id="應用程式管理員_(App_Manager)">應用程式管理員 (App Manager)</h3>
+
+<p>要想開始入門 Firefox OS,最簡單的方法就是使用「<a href="https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager">應用程式管理員 (App Manager)</a>」。應用程式管理員也是<a href="https://developer.mozilla.org/en-US/docs/Tools/">桌面版 Firefox 的開發者工具之一</a>,可在電腦上模擬 Firefox OS 裝置。開發者可盡情把玩 Firefox OS,也可像在實際裝置上安裝並測試 App。此外,你也能離線或上線編輯 App,進而體驗 App 並進行除錯,在模擬裝置中即時看到修改之後的結果。</p>
+
+<p>{{EmbedYouTube("oyAlYjpK-PE")}}</p>
+
+<p>若要進一步了解應用程式管理員:</p>
+
+<ul>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager">MDN 上的《</a><a href="https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager">App Manager</a><a href="https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager">》說明文章</a></li>
+ <li><a href="https://hacks.mozilla.http://blog.mozilla.com.tw/posts/3965/">介紹「應用程式管理員」的部落格文章</a></li>
+</ul>
+
+<h3 id="在實體裝置上測試">在實體裝置上測試</h3>
+
+<p>在模擬器上測試 App 當然不錯,但畢竟會受限於模擬的環境。如果想測試 App 互動時的效能或畫面呈現方向,就需要實體裝置。實機同樣可搭配既有的開發者工具,以及「應用程式管理員 (App Manager)」。在實機上使用 App 時,可透過上述 2 種工具進一步了解 App 所發生的作業。而且 App 不必更新,也不必解除安裝,即可即時看到 App 的變化。</p>
+
+<p>{{EmbedYouTube("T8sr9SHKDHE")}}</p>
+
+<h3 id="發佈至_Marketplace">發佈至 Marketplace</h3>
+
+<p><a href="http://marketplace.firefox.com/">Firefox Marketplace</a> 可供開發者提交 App,並讓消費者能夠接觸到自己的作品。Marketplace 亦可發佈如 Firefox 桌面版與行動版所適用的 App。而消費者只需要簡單的幾個步驟,就能對 App 評分、提出反饋意見、購買自己所需的 App。要發佈自己的 App 真的很簡單:</p>
+
+<ul>
+ <li>為 manifest 檔案 (你可能會看到中文翻譯為「安裝資訊檔」) 設定網址</li>
+ <li>為 App 填寫必要敘述說明 (可讓消費者更快找到自己需要的 App)</li>
+ <li>提供 App 的截圖或影片</li>
+ <li>為 App 挑選適合的分類</li>
+ <li>填寫自己的電子郵件,讓 Mozilla 能聯絡你</li>
+ <li>如果開發者有自己的隱私權政策與支援服務網站,也應提供給消費者知道</li>
+ <li>為自己的 App 設定內容分級</li>
+</ul>
+
+<p>{{EmbedYouTube("kk3gYALtE0Q")}}</p>
+
+<p>App 在提交到 Marketplace 之後,均會由 Mozilla 審查團隊進行審閱,並在幾天內就會通知審查結果。如果 App 有任何問題,在提交期間就會收到相關的檢驗訊息。開發者也有可能收到詳細的問題說明,並獲得修復問題的方法。</p>
+
+<h2 id="Section_2:Firefox_OS_進階說明">Section 2:Firefox OS 進階說明</h2>
+
+<h3 id="引言">引言</h3>
+
+<p>在前幾支影片中,我們談了 Firefox OS 的基礎概念、打造自己第一個 App 的步驟、在桌機與 Firefox OS 實體裝置上進行 App 除錯,最後把自己的 App 提交到 Marketplace 上。</p>
+
+<p>而接下來的影片會再進一步說明 Firefox OS App 的技術;也會談談存取功能,讓開發者能妥善利用平板電腦與智慧型手機。但這些技術目前僅適用於 Firefox OS,還未能擴及其他平台。Firefox OS 內的所有程式,都是針對標準化與開放源碼的目標所設計。也就是說,我們很快就能在其他裝置或平台上看到 Firefox OS App 的蹤跡。</p>
+
+<h3 id="Web_API">Web API</h3>
+
+<p>智慧型手機具備 GPS、相機、加速規等的多樣高階功能。但問題是 Web 技術並無法碰觸到這些功能技術。如果要存取這些功能,就必須撰寫原生應用程式。為了克服這個問題,Mozilla 與合作夥伴定義了一系列 API,可讓開發者以安全的方式,透過 JavaScript 存取行動裝置所搭載的硬體。這些開放的 API 即所謂的<a href="https://wiki.mozilla.org/WebAPI"> Web API</a>,同樣也提供給他人建構更多功能。Firefox OS 也是第一個使用 Web API 的平台。開發者不需另外撰寫原生的應用程式,即可存取智慧型手機上所需的功能。</p>
+
+<p>{{EmbedYouTube("QkpH_qugrPk")}}</p>
+
+<p>若要進一步了解 Web API:</p>
+
+<ul>
+ <li>此 <a href="https://wiki.mozilla.org/WebAPI">Wiki 頁面說明目前 API 的建構情形</a>;也有作為該 API 基礎的其他標準</li>
+ <li><a href="https://hacks.mozilla.org/category/webapi/">Mozilla Hacks 上亦有其他文章</a>提及 WebAPI</li>
+</ul>
+
+<h3 id="Web_Activities">Web Activities</h3>
+
+<p><a href="https://wiki.mozilla.org/WebAPI/WebActivities">Web Activities</a> 可視為 Web API 的替代方案,同樣可存取某些特定裝置的硬體。相較於 API 直接與裝置溝通,Web Activities 則是在裝置上建立所有 App 的生態系統,讓 App 彼此相互溝通。舉例來說,App 不會存取相機而是要求圖片,讓使用者可透過自己最愛用的 App 取得圖片。也就是說,App 不要求使用者存取硬體 (偏安全性的考量),而是讓使用者所信賴的 App 去取得圖片。此外,你也可以註冊特定 App 負責處理 OS 中的特定作業。Web Activities 其實就像對桌機裡的檔案按下滑鼠右鍵,你能在右鍵選單中看到有多種 App 可開啟檔案。而使用者可要求 OS 預設特定 App 開啟此一類型的檔案。Web Activities 可讓裝置上的 App 相互溝通,而不需再透過伺服器作為媒介。App 之間傳送的資料均已為最終資料。</p>
+
+<p>{{EmbedYouTube("RQbCyDd9ejE")}}</p>
+
+<p>進一步了解 Web Actitivies:</p>
+
+<ul>
+ <li><a href="https://wiki.mozilla.org/WebAPI/WebActivities">Web Activities 的 Wiki 頁面</a></li>
+ <li><a href="https://hacks.mozilla.org/2013/01/introducing-web-activities/">介紹 Web Activities 的相關 Hacks 文章</a></li>
+</ul>
+
+<h3 id="推播通知">推播通知</h3>
+
+<p>使用 <a href="https://wiki.mozilla.org/WebAPI/SimplePush">SimplePush WebAPI</a> 的推播通知 (Push notification) 功能,可在裝置接收到特定訊息時喚醒 App。如此可在省電狀態下讓 App 保持待機,再隨時根據需求喚醒 App;此功能對行動裝置 App 格外重要。用這種方式所傳送的通知也有其優點:這種通知不會攜帶任何資料,Mozilla 不會取得 App 的資訊,而惡意攻擊者也無法監聽。</p>
+
+<p>{{EmbedYouTube("F5UF4dKojzw")}}</p>
+
+<p>若要進一步了解 SimplePush 所推播的通知:</p>
+
+<ul>
+ <li><a href="https://wiki.mozilla.org/WebAPI/SimplePush">SimplePush 的 Wiki 頁面 </a></li>
+ <li>Mozilla Hacks 對 <a href="https://hacks.mozilla.org/2013/07/dont-miss-out-on-the-real-time-fun-use-firefox-os-push-notifications/">SimplePush 的介紹</a></li>
+</ul>
+
+<h3 id="離線功能">離線功能</h3>
+
+<p>如果 App 無法離線作業,那可用性就會大大降低。有部分使用者也因為這個理由,比較喜歡安裝 App 之後只要開啟瀏覽器,就能在裝置的瀏覽器上查看所需的內容。其實「Web App」這個詞看起來會有「需要網路連線才能運作」的感覺。但使用者總是有無法上網的時候:飛機上必須關機、地底下收不到訊號,甚或手機內沒留任何資料。開發者應該要確保自己的 App 能離線運作。而 HTML5 即具備幾項離線作業的技術,主要就是 <a href="https://developer.mozilla.org/en-US/docs/HTML/Using_the_application_cache">AppCache</a> 與 <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage">DOMStorage</a>。</p>
+
+<p>{{EmbedYouTube("Q_WmkCzEKho")}}</p>
+
+<p>進一步了解離線功能:</p>
+
+<ul>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage">DOMStorage 的 Wiki 頁面</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/HTML/Using_the_application_cache">AppCache 的 Wiki 頁面</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/IndexedDB/Using_IndexedDB">使用 IndexedDB</a> - 用戶端的進階儲存方式</li>
+ <li><a href="https://github.com/mozilla/localForage">LocalForage</a> 是 Firefox OS 中所使用的 wrapper,可兼顧 DOMStorage 的簡單易用,與 IndexedDB 的強大功能 (<a href="https://hacks.mozilla.org/2014/02/localforage-offline-storage-improved/">本篇 Mozilla Hacks 文章</a> 另外詳細說明)</li>
+</ul>
+
+<h2 id="深入了解">深入了解</h2>
+
+<p>我們希望這一系列的影片,能夠順利帶領開發者建構出自己的第一款 Open Web App。如果你很感興趣也想了解更多細節,也有許多其他資源與管道可供你利用:</p>
+
+<p>{{EmbedYouTube("UVf2EVrLpl8")}}</p>
+
+<ul>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Apps/">MDN 上的「應用程式中心」</a>另提供有關絕佳 Open Web App 的設計訣竅、可供下載的範例程式碼,另有將自己 App 提交到 Marketplace 的詳細說明</li>
+ <li><a href="https://hacks.mozilla.org">Hacks 部落格</a>將持續提供 Firefox OS App 的文章 (當然也有像你的第三方開發者所撰寫的心得文),並有說明 WebAPI 等不同技術的進階文章,讓你能提早了解下一版 Firefox 與 Firefox OS 所將具備的特色功能</li>
+ <li><a href="https://developer.mozilla.org/en-US/Firefox_OS">MDN 的 Firefox OS 區塊</a>以及 <a href="https://wiki.mozilla.org/B2G">B2G 的 Wiki 頁面</a>,均有 Firefox OS 的深入資訊</li>
+ <li>我們很多人都掛在 IRC 上;只要到 <a href="http://irc.mozilla.org">irc.mozilla.org</a> 並透過 #devrel、#b2g、#openwebapps、#marketplace 都能找到我們</li>
+</ul>
+
+<p>歡迎大家多多交流</p>
+
+<p>影片錄製人:Chris、Sergi、Jan</p>
diff --git a/files/zh-tw/archive/b2g_os/security/application_security/index.html b/files/zh-tw/archive/b2g_os/security/application_security/index.html
new file mode 100644
index 0000000000..3e8f8d576e
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/security/application_security/index.html
@@ -0,0 +1,124 @@
+---
+title: 應用程式安全
+slug: Archive/B2G_OS/Security/Application_security
+translation_of: Archive/B2G_OS/Security/Application_security
+---
+<div class="summary">
+ <p>本文涵蓋 Firefox OS 應用程式安全模型細節內容。</p>
+</div>
+<p>Firefox OS Web app 核心安全控制如下:</p>
+<ul>
+ <li>Web app 並非瀏覽器中的網頁,而是實際需要安裝後執行的,為了保護使用者更新和移除 app 都會有安全管理機制。</li>
+ <li>存取 Web API 都有權限系統管制,Web app 安裝前必須宣告會使用到那些權限,如果要存取功能更強大的 API,Web app 還得要符合特定條件、被檢驗、受到 Marketplace 簽署。</li>
+ <li>Web app 都在 sandbox 環境下運作,只能看到自己的資源 (cookies、離線 IndexedDB 資料庫等等)。即使剛好兩個 app 載入一樣網址的網頁,這兩份網頁也不會被視為來自同一個網域。</li>
+</ul>
+<h3 id="App_類別">App 類別</h3>
+<p>Firefox OS 支援: "<strong>web</strong>", "<strong>privileged</strong>" 和 <strong>internal</strong> ("<strong>certified</strong>") 三種類別的 Web app,app 的類別宣告在 <a href="/en-US/docs/Apps/Manifest" title="/en-US/docs/Apps/Manifest">manifest</a> 裡 (另外使用權限也在裡面) 。</p>
+<ul>
+ <li><strong>Web Apps:</strong> 大多數第三方 app 都屬於這一類;算是預設類別,沒有超出網頁可用的多餘權限。Web app 能自其他網站安裝而無須額外的驗證程序,也可以被<a href="/en-US/docs/Web/Apps/Packaged_apps" title="/en-US/docs/Web/Apps/Packaged_apps">封裝 (packaged)</a> 起來,但同樣沒有多餘權限。</li>
+ <li><strong>Privileged Apps</strong>: 要求提高權限的 app,一定要被驗證以及通過 Marketplace 簽署。</li>
+ <li><strong>Internal/Certified Apps: </strong>只能,如被 OEM 廠商,預裝的 app。</li>
+</ul>
+<div class="note">
+ <p><strong>Note</strong>: 關於 App 類別,詳細說明請見 <a href="/en-US/docs/Apps/Manifest#type" title="/en-US/docs/Apps/Manifest#type">App Manifest</a>。</p>
+</div>
+<h3 id="App_下載">App 下載</h3>
+<p>Firefox OS 共有兩種 App 下載機制:hosted 以及 packaged。一般 web app 兩種方式都能適用,但 privileged 和 certified apps 只能走 packaged 的方式。</p>
+<h4 id="Hosted(託管式)_apps"><span class="mw-headline" id="Hosted_apps">Hosted(託管式</span><span class="mw-headline">) apps </span></h4>
+<p>Hosted app 只包含開發者網站伺服器上的 <a class="external text" href="/en-US/docs/Apps/Manifest" rel="nofollow">application manifest</a> 檔案,Manifest 檔案裏面有 app 開啟時的<a href="/en-US/Apps/Build/Manifest#launch_path">啟動頁面路徑</a>。從安全性角度來看 hosted app 和網頁差不多,當打開 hosted app ,載入頁面的 URL 就是網頁在伺服器上的一般 URL,如果之前有 appcache 存檔的話則會從裝置上載入。</p>
+<h4 id="Packaged(封裝式)_apps"><span class="mw-headline" id="Packaged_apps">Packaged(封裝式) apps</span></h4>
+<p>Packaged app 將所有的資源 (HTML, CSS, JavaScript, app manifest 等等) 包在一份 zip 檔中,而非網頁伺服器,細節請見<a href="/en-US/docs/Apps/Packaged_apps" title="Apps/Packaged_apps"> Packaged apps</a>. </p>
+<h3 id="App_來源">App 來源</h3>
+<p>對於 hosted app,<a class="external text" href="/en-US/docs/Apps/Manifest" rel="nofollow">application manifest</a> 檔案所在地就是其來源。</p>
+<p>至於 packaged apps,其來源就是安裝當下決定的應用程式識別,而 <a href="/en-US/Apps/Publishing/Packaged_Apps#Types_of_packaged_apps">Privileged 和 Internal apps </a>另外可以在 applications manifest 檔案裡用 <a href="/en-US/Apps/Build/Manifest#origin">origin</a> 參數請求使用特定來源。</p>
+<h3 id="App_安裝"><strong>App 安裝</strong></h3>
+<p>App 透過 <a href="/en-US/docs/JavaScript_API" title="/en-US/docs/JavaScript_API">Apps JavaScript API</a> 安裝:</p>
+<ul>
+ <li>Hosted App: Hosted app 是藉由呼叫 <code>navigator.mozApps.<a href="/en-US/docs/Web/API/Apps.install" title="/en-US/docs/Web/API/Apps.install">install</a>(manifestURL)進行安裝,其中</code> manifestURL 是一個指向 app 位置的 URL。更多資訊請參考<a href="/en-US/docs/DOM/Apps.install">安裝 Apps</a>。</li>
+ <li>Packaged App: Packaged app 是藉由呼叫 <code>navigator.mozApps.<a href="/en-US/docs/Web/API/Apps.installPackage" title="/en-US/docs/Web/API/Apps.installPackage">installPackage</a>(packageURL) 進行安裝。</code>Packaged app 的主程式 manifest 檔經過簽署、存在封裝包之中,另外還會有一個用來發起安裝程序的 "mini-manifest" 檔。更多資訊請見<a href="/en-US/docs/DOM/Apps.installPackage">安裝 Packaged Apps</a> 和<a href="/en-US/docs/Apps/Packaged_apps" title="Apps/Packaged_apps"> Packaged apps</a>。</li>
+</ul>
+<p>App manifest 和 App 來源必須一致,這樣避免了未知的第三方冒用 App;另外為了避免網站被不小心或故意被偽裝成有 app manifest,manifest 檔必須以特定 mime-type,<code>application/x-web-app-manifest+json,</code> 發送。</p>
+<h3 id="更新"><span class="mw-headline" id="Updates">更新</span></h3>
+<p>更新程序請見<a href="/en-US/docs/Apps/Updating_apps" title="Apps/Updating_apps">更新 apps</a>。</p>
+<h2 id="權限">權限</h2>
+<p>App 能夠被授予比一般網頁更多的權限。基本上 app 擁有和網頁同等的權限,如果 app 需要更多額外權限,那麼 app 便需要在 manifest 檔裡明白列出需要的額外權限。</p>
+<h3 id="Manifest_宣告">Manifest 宣告</h3>
+<p>在 manifest 裡,每一個需要的額外權限必須加入供人閱讀的描述說明為何需要此額外權限,例如 app 想要 <a href="/en-US/docs/Web/API/window.navigator.geolocation" title="/en-US/docs/Web/API/window.navigator.geolocation">navigator.geolocation</a> API 使用權限,manifest 裡就必須如此宣告:</p>
+<pre class="brush: html">"permissions": {
+ "geolocation":{
+<code class="language-js"><span class="token string"> "description"</span><span class="token punctuation">:</span> <span class="token string">"Required for autocompletion in the share screen"</span><span class="token punctuation">,</span></code>
+ }
+},
+</pre>
+<p>這樣 app 便可以如同網頁一般提示使用者來請求地理位置存取權限。更多細節請見 <a href="/en-US/docs/Apps/Manifest" title="Apps/Manifest">App manifest</a>。</p>
+<div class="note">
+ <p><strong>Note</strong>: 目前權限使用目的並不會呈現給使用者看 — 見 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=823385" title="https://bugzilla.mozilla.org/show_bug.cgi?id=823385">bug 823385</a>.</p>
+</div>
+<h3 id="權限授予">權限授予</h3>
+<p>當權限需求在 manifest 中宣告後,依據權限不同,可能會直接被同意,但也可能需要在第一次相關 API 被存取時提示使用者徵詢其同意。一般來說會影響到使用者隱私的權限會需要額外徵詢使用者同意,而且這種情況下使用者也有理由知道甚麼權限被請求使用,例如存取通訊錄前會需要徵詢,但存取 TCP 連線則不需要。權限直接同意會經過 Marketplace 安全審核程序以確保安全性。</p>
+<h3 id="權限駁回">權限駁回</h3>
+<p>使用者可以在任何時候從設定駁回先前授予的權限,但這不包括那些直接同意的權限。</p>
+<h2 id="Web_App_Sandbox">Web App Sandbox</h2>
+<h3 id="App_資料獨立"><span class="mw-headline" id="Data_stored_per_app">App 資料獨立 </span></h3>
+<p>每一個 app 都運行在 sandbox 之中,所以所有資料都和其他 app 隔離開來,這涵蓋了 cookie、localStorage、indexedDB 以及網站權限。</p>
+<p><img alt="A diagram showing three Firefox OS apps all open is separate sandboxes, so none of them can affect each other." src="https://mdn.mozillademos.org/files/7091/sandbox.png" style="width: 1040px; height: 437px; display: block; margin: 0px auto;"></p>
+<p>所以說即使 App A 和 App B 都開啟了指向同一來源 (如<a class="external free" href="http://www.mozilla.org" rel="nofollow"> http://www.mozilla.org</a>) 的 {{ htmlelement("iframe") }},但他們兩者的 cookie 資料還是會不同。結果就是當用  App A 登入 Facebook 帳號,開啟了 App B 前往 Facebook 時,因為 App B 無法存取 App A 的 cookie,所以 App B 還是必須要再執行登入作業,如此一來變確保了 App 之間不互相影響、資料安全。</p>
+<h3 id="Apps_無法啟動彼此"><span class="mw-headline" id="Apps_can.27t_open_each_other">Apps 無法啟動彼此 </span></h3>
+<p>App 不能利用 &lt;iframe&gt; 開啟另一個 App,如果 App A 開啟了一個指向 App B URL 的 iframe,這並不會啟動 App B,相反地這只會前往那個 URL 指向的網頁,任何 App B 的 cookie 都無法被存取,這就和 App B 沒有被安裝的情況一樣。</p>
+<p>就算是 App A 嘗試開啟透過 packaged 式 App B 的 app:// URL,來將 App B 載入到 &lt;iframe&gt; 裡啟動,也會失敗,而且不論 App B 有沒有被安裝,失敗訊息都會一樣,所以說 App A 也無法推敲 App B 的安裝狀態。</p>
+<p>當 App A 上層的 frame 前往 App B 所在的 URL,結果依然相同。我們永遠知道是哪個 frame 開啟哪個 app,所以說透過上層 frame 開啟其他 app 就和前述一樣會失敗,App 之間資料絕對獨立、無法被盜取。</p>
+<h3 id="動機"><span class="mw-headline" id="Motivation">動機</span></h3>
+<p>資料獨立的做法有好有壞,壞處是使用者必須每開一個 app 都要登錄一次同一個網站,或者是網站有存放一些資料於本地端,每個 app 都會儲存一份資料,同樣的資料可能被重複儲存,如果資料剛好又不小的話,將會相當佔儲存空間。</p>
+<p>好處是這是比較安全的做法,app 之間不能透過第三方網站互相影響進而導致未預期的行為,或是一個 App A 移除後,另一個 App B 不會因為依賴 App B 的資料或功能而無法運作。更重要的是,資料獨立確保了惡意 app 難以利用漏洞竊取其他網站的資料。</p>
+<p>最後資料獨立也確保了 app 無法得知使用者是否有裝甚麼其他 app、其他 app 的資料,保護了使用者隱私。</p>
+<h3 id="權限_Sandbox"><span class="mw-headline" id="Sandboxed_Permissions">權限 Sandbox</span></h3>
+<p>如同資料在 snadbox 下是獨立隔離開來的,權限亦然。App A 打開了 <a class="external free" href="http://maps.google.com" rel="nofollow">http://maps.google.com</a> 網頁,而使用者也准許永遠允許 <a class="external free" href="http://maps.google.com" rel="nofollow">http://maps.google.com</a> 使用地理位置服務,但這也只限於 App A,改天換 App B 打開 <a class="external free" href="http://maps.google.com" rel="nofollow">http://maps.google.com</a> 網頁,地理位置服務使用權限還是得再徵詢使用者同意。</p>
+<p>如同一般網頁,每個來源的權限同樣獨立,App A 取得地理位置服務使用權限,但這不代表所有 App A 開啟的網頁都有權使用地理位置服務,如果說 App A 開啟 <a class="external free" href="http://maps.google.com" rel="nofollow">http://maps.google.com</a>,<a class="external free" href="http://maps.google.com" rel="nofollow">http://maps.google.com</a> 照樣需要取得使用者同意才能使用地理位置服務。</p>
+<h3 id="瀏覽器_API_Sandbox">瀏覽器 API Sandbox</h3>
+<p>對於會開啟大量 URL 的應用程式,如瀏覽器,我們引進了一個 <em>browserContent</em> 旗標來強化安全性,這個 browserContent 讓 app 可以有兩個 sandbox,一個供 app 本身使用,另一個給開啟的網頁使用,例如說:</p>
+<p>有一個 MyBrowser app 自 <a class="external free" href="https://mybrowser.com" rel="nofollow">https://mybrowser.com</a> 載入,所以程式碼和資源都隸屬於這個網域。</p>
+<p>當這個 app 建立一個 <code>&lt;iframe mozbrowser&gt;</code>,另一個 sandbox 便會產生,所以說 <code>&lt;iframe mozbrowser&gt;</code> 裡的 cookie、IndexedDB、localStorage 資料都會獨立隔離開來,兩者間不會互相影響。</p>
+<p>從另一方面來看,如果 MyBrowser app 想要整合 Google Map 的地理位置功能,那麼從一般 &lt;iframe&gt; 裡載入 <a class="external free" href="http://maps.google.com" rel="nofollow">http://maps.google.com</a>,便可以存取 Google Map 網站的 cookie 資料;但若是從 <code>&lt;iframe mozbrowser&gt;</code> 裡載入的話,便無法取得 Google Map 的 cookie 資料了。</p>
+<p>假設另一個情況,有一個類似 Yelp、會造訪餐廳網站的 app,這個 app 只要利用 <code>&lt;iframe mozbrowser&gt;</code> 來打開餐廳網站,就可以確保餐廳網站不能含有指回這個 app 的 &lt;iframe&gt; (例如指回 <a class="external free" href="http://yelp.com" rel="nofollow">http://yelp.com</a>),如果有的話,該餐廳網站將只能收到 Yelp 網站的資料,而非此 Yelp app,所以該餐廳網站便無法和 Yelp app 共享資料和權限,進而攻擊 Yelp app。</p>
+<h2 id="App_安全性總結">App 安全性總結</h2>
+<p>下表總結各類 Firefox OS App 的格式、安裝、更新特性:</p>
+<table>
+ <caption>
+ Web App 類型</caption>
+ <thead>
+ <tr>
+ <th scope="col">類型</th>
+ <th scope="col">發布</th>
+ <th scope="col">權限</th>
+ <th scope="col">安裝</th>
+ <th scope="col">更新</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Web</td>
+ <td>Hosted 或 Packaged</td>
+ <td>較不敏感的權限,既使未驗證的網站取得也沒關係。</td>
+ <td>可以從各種來源安裝</td>
+ <td>依據安裝來源和發布機制可以背景更新或透過 marketplace 更新。</td>
+ </tr>
+ <tr>
+ <td>Privileged</td>
+ <td>Packaged 和 Signed</td>
+ <td>需要驗證和審核才可以取得特殊權限 API。</td>
+ <td>從可信任的 marketplace 安裝</td>
+ <td>從可信任的 marketplace 更新,需要使用者同意更新。</td>
+ </tr>
+ <tr>
+ <td>Internal</td>
+ <td>Packaged</td>
+ <td>第三方 app 無法存取高度敏感 API</td>
+ <td>裝置預裝</td>
+ <td>跟隨系統層級類別更新。</td>
+ </tr>
+ </tbody>
+</table>
+<div class="note">
+ <p><strong>Note</strong>: 版本 1.0 的 Firefox OS,privileged app 只能從 Mozilla Marketplace 安裝,至於其他多種安全 marketplace 的支援尚未底定。</p>
+</div>
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/security/index.html b/files/zh-tw/archive/b2g_os/security/index.html
new file mode 100644
index 0000000000..468bab0472
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/security/index.html
@@ -0,0 +1,70 @@
+---
+title: Firefox OS security
+slug: Archive/B2G_OS/Security
+tags:
+ - B2G
+ - Firefox OS
+ - Mobile
+ - NeedsTranslation
+ - Security
+ - TopicStub
+translation_of: Archive/B2G_OS/Security
+---
+<p>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.</p>
+<table class="topicpage-table">
+ <tbody>
+ <tr>
+ <td>
+ <h2 class="Documentation" id="Documentation" name="Documentation">Firefox OS security documentation</h2>
+ <dl>
+ <dt>
+ <a href="/en-US/docs/Mozilla/Firefox_OS/Security/Security_model" title="/en-US/docs/Mozilla/Firefox_OS/Security/Security_model">The Firefox OS security model</a></dt>
+ <dd>
+ An overview of the Firefox OS security model.</dd>
+ <dt>
+ <a href="/en-US/docs/Mozilla/Firefox_OS/Security/System_security" title="/en-US/docs/Mozilla/Firefox_OS/Security/Security_model">System security</a></dt>
+ <dd>
+ Details of security controls built-in to the FirefoxOS runtime.</dd>
+ <dt>
+ <a href="/en-US/docs/Mozilla/Firefox_OS/Security/Application_security" title="/en-US/docs/Mozilla/Firefox_OS/Security/Application_security">Application security in Firefox OS</a></dt>
+ <dd>
+ An overview of how applications are made secure on Firefox OS.</dd>
+ <dt>
+ <a href="/en-US/docs/Mozilla/Firefox_OS/Security/Installing_and_updating_applications" title="/en-US/docs/Mozilla/Firefox_OS/Security/Installing_and_updating_applications">Securely installing and updating applications</a></dt>
+ <dd>
+ How Firefox OS securely installs and updates applications.</dd>
+ <dt>
+ <a href="/en-US/docs/Mozilla/Firefox_OS/Security/Software_permissions" title="/en-US/docs/Mozilla/Firefox_OS/Security/Software_permissions">Software permissions in Firefox OS</a></dt>
+ <dd>
+ A guide to what types of software have permission to perform various tasks on Firefox OS.</dd>
+ <dt>
+ <a href="/en-US/docs/Mozilla/Firefox_OS/Security/Debugging_and_security_testing#Marionette.3A_A_JavaScript_debugging_shell_for_Firefox_OS" title="/en-US/docs/Mozilla/Firefox_OS/Security/Debugging_and_security_testing#Marionette.3A_A_JavaScript_debugging_shell_for_Firefox_OS"><span style="display: none;"> </span>Debugging and security testing with Firefox OS</a></dt>
+ <dd>
+ This guide shows you the basic security testing steps, from opening a remote JavaScript debugger to setting up an intercepting HTTP(S) proxy against a desktop version of Firefox OS</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/Security" title="/en-US/docs/Security">Security</a></li>
+ </ul>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p> </p>
+<div id="cke_pastebin" style="position: absolute; top: 483px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">
+ <br>
+ Firefox OS</div>
diff --git a/files/zh-tw/archive/b2g_os/security/security_model/index.html b/files/zh-tw/archive/b2g_os/security/security_model/index.html
new file mode 100644
index 0000000000..d71380833f
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/security/security_model/index.html
@@ -0,0 +1,299 @@
+---
+title: Firefox OS 安全性概述
+slug: Archive/B2G_OS/Security/Security_model
+translation_of: Archive/B2G_OS/Security/Security_model
+---
+<p>此篇文章將概述 Firefox OS 的安全架構,可阻絕 App、平台、資料所挾帶的惡意威脅,進而保護行動裝置。Mozilla 建構了完整且多層次的安全模式,為行動電話提供絕佳的防護效果。</p>
+<p> </p>
+<h1 id="平台安全性">平台安全性</h1>
+<p>Firefox OS 平台具備多層次安全模式,可將各層次的開發風險降至最低。第一線的保護機制更整合了深度防禦 (Defense-in-depth) 策略,進而達到完整的防護機制。</p>
+<p> </p>
+<h2 id="安全架構">安全架構</h2>
+<p>Firefox OS 將銜接網路架構的應用與其底層硬體,而其整合式技術囊括了下列層級:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5023/platform.png" style="width: 678px; height: 478px;"></p>
+<p>行動裝置 (Mobile device) 即是執行 Firefox OS 的智慧型手機。Gonk 則包含 Linux kernel、韌體、系統函式庫、裝置驅動程式。Gecko 屬於應用程式的執行時間層,為 App提供執行框架,另建構 Web API 以存取行動裝置的功能。Gaia 則是網頁 App (包含 HTML5、CSS、JavaScript、圖片、媒體等) 套件,可隨時改善使用者經驗。</p>
+<p>Gecko 扮演守門人的角色,可強制執行安全策略,避免行動裝置遭到誤用;並可作為網頁 App (位於 Gaia) 之間的中介層 (Intermediary)。Gonk 則可將行動電話底層的硬體功能,直接提供予 Gecko 使用。只有在 Gecko 放行存取請求時,網頁 App 才能透過 Web API 而存取行動電話的功能;而不會有直接存取或「走後門」的情況發生。Gecko 將強制執行許可,並阻擋未經授權的請求。</p>
+<p> </p>
+<h2 id="佈署安全系統">佈署安全系統</h2>
+<p>手機上的 Firefox OS 系統映像檔 (System image) 是由受信任的來源 (一般為該裝置的 OEM 廠商) 所提供,這些受信任的系統映像檔提供者負責發布檔案的組建、建置、測試以及數位簽章作業。</p>
+<p>整個技術層均需經過安全驗證。由Linux 的存取控制清單 (ACL) 執行檔案系統的權限控制。系統 App 則安裝於唯讀 (僅於更新期間才暫時轉為可讀寫) 媒體之中;若是使用者相關內容的區域,則可能為讀寫性質。裝置硬體中的不同元件,均已內建了業界標準的防護機制。舉例來說,晶片製造商會加入安全防護技巧來提高安全性,我們同樣強化了核心平台 (Gecko 與 Gonk),以阻絕潛在的可能威脅,亦提升了相關編譯器的功能。可參閱<a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Security/Runtime_security" title="/en-US/docs/Mozilla/Firefox_OS/Security/Runtime_security">執行期間的安全性</a>進一步了解細節。</p>
+<p> </p>
+<h2 id="更新安全系統">更新安全系統</h2>
+<p>Firefox OS 平台的後續升級與修正,將透過安全的 Mozilla 程序完成佈署,並確保行動電話上的系統映像保有其完整性。同樣由已知且受信任的來源 (一般為該裝置的 OEM 廠商) 提供更新作業,並負責更新封裝的組裝、建構、測試、數位簽章等作業。</p>
+<p>系統更新可能牽涉 Firefox OS 部分或所有的層級。若更新作業必須變更 Gonk,則安裝作業將使用 FOTA (Firmware Over the Air)。FOTA 更新作業亦可能包含 Firefox OS 的其他層級,如 Gaia、Gecko、安全更新、裝置管理 (FOTA/韌體/驅動程式)、設定管理 (Firefox OS 的設定),還有更多修正檔。</p>
+<p>若更新作業並未牽涉 Gonk,則僅需 Mozilla 系統更新公用程式 (System Update Utility) 即可完成。Firefox OS 所使用之更新架構、程序、Mozilla ARchive (MAR) 格式 (用於更新封裝),與 Firefox 桌面版產品完全相同。可參閱 <a href="https://wiki.mozilla.org/Software_Update">https://wiki.mozilla.org/Software_Update</a> 以進一步了解。</p>
+<p>而行動電話所內建的更新服務 (亦可能由 OEM 廠商提供),將定期檢查是否有系統更新。一旦發佈系統封裝,更新服務隨即將偵測到該封裝,並提醒使用者完成安裝作業。在行動裝置安裝更新檔案之前,另將檢查裝置的儲存容量是否足夠,且將驗證下列分配空間:</p>
+<ul>
+ <li>更新檔案來源 (驗證系統更新與 manifest 檔案的來源位置 protocol:domain:port)</li>
+ <li>檔案完整性 (SHA-256 雜湊檢查)</li>
+ <li>程式碼簽章 ─ 針對憑證簽發源頭 (Trusted Root) 進行憑證檢查</li>
+</ul>
+<p>更新期間應注意下列要點:</p>
+<ul>
+ <li>Mozilla 建議透過 SSL 連線進行更新。</li>
+ <li>安裝韌體封裝之前,需要高強度的加密驗證作業。</li>
+ <li>開始更新程序之前,必須將完整更新檔案下載至特定且安全位置。</li>
+ <li>開始更新程序時,系統必須處於安全狀態且不執行任何 Web App。</li>
+ <li>必須將金鑰儲存於裝置中的安全位置。</li>
+</ul>
+<p>請確實完成相關檢查,讓行動電話確實完成更新作業。</p>
+<p> </p>
+<h1 id="App_的安全性">App 的安全性</h1>
+<p>Firefox OS 使用深度防禦 (Defense-in-depth) 策略,可保護行動電話免受惡意應用程式的攻擊。此策略必須佈署多種機制,如根據 App 信任模式 (Trust model) 所建構的隱式許可 (Implicit permission) 層級;執行期間的沙箱執行作業 (Sandboxed execution);僅限 API 存取行動電話的底層硬體;健全的許可模型 (Permission model);安全的安裝與更新程序。若要進一步了解相關技術,可參閱<a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Security/Application_security" title="/en-US/docs/Mozilla/Firefox_OS/Security/Application_security">應用程式安全性</a>。</p>
+<p>在 Firefox OS 中的所有應用程式,均為 Web App ─ 即以 HTML5、JavaScript、CSS、媒體、其他開放式 Web 技術 (可於瀏覽器中執行的網頁,並不屬於本文所提的 Web App) 所撰寫的程式。由於這些 Web App 並非二進制 ─ 即所謂的「原生 (Native)」─ 應用,因此將由 Web API居中嚴格協調所有的系統存取作業。甚至檔案系統存取都只能透過 Web API 與後端的 SQLite 資料庫, App 不能直接存取 SD 記憶卡上的檔案。</p>
+<p>Firefox OS 可限制 App 所能存取/使用的資源規模,同時又可針對多樣的 App 而支援不同的許可層級。Mozilla 嚴格控制各類 App 所能存取的 API。舉例來說,僅有 Certified App (隨手機出貨) 可存取 Telephony API。另外,Dialer App 必須存取 Telephony API 才能撥打電話,而非所有 Certified App 均可存取此 API。如此可避免安裝了任何第三方 App 之後,撥打出國際/長途電話而讓帳單金額暴增。但針對其他 OEM App,仍可選擇是否給予 Telephony API 存取權。舉例來說,電信服務商可提供系統管理應用程式,讓客戶能管理自己的帳戶,甚至能直接以電話送出電信服務帳單或支援辦公室作業。</p>
+<p> </p>
+<h2 id="受信任_(Trusted)_與未信任_(Untrusted)_的_App">受信任 (Trusted) 與未信任 (Untrusted) 的 App</h2>
+<p>Firefox OS 將 App 分為下列類型:</p>
+<table>
+ <thead>
+ <tr>
+ <th style="width: 82px;">
+ <p>類型</p>
+ </th>
+ <th style="width: 102px;">
+ <p>受信任層級</p>
+ </th>
+ <th style="width: 447px;">
+ <p>說明</p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td style="width: 82px;">
+ <p>Certified</p>
+ </td>
+ <td style="width: 102px;">
+ <p>受高度信任</p>
+ </td>
+ <td style="width: 447px;">
+ <p>這類系統 App 經過電信服務商或 OEM (起因於裝置毀損或重要功能所產生的風險) 所核可。但僅限系統 App 與相關服務,並無第三方 App。<br>
+ 此信任層級僅用於極少部分的重要 App,例如 SMS、藍牙、相機、電話、系統時鐘、預設的電話播號鍵盤 (為了可確實用於緊急電話)。</p>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 82px;">
+ <p>Privileged</p>
+ </td>
+ <td style="width: 102px;">
+ <p>受信任</p>
+ </td>
+ <td style="width: 447px;">
+ <p>由授權的商城審視、核可、數位簽章過的第三方 App。</p>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 82px;">
+ <p>Web (與其他 App)</p>
+ </td>
+ <td style="width: 102px;">
+ <p>未受信任</p>
+ </td>
+ <td style="width: 447px;">
+ <p>屬於一般網頁內容。包含安裝式 App (儲存於行動電話中) 與托管式 (Hosted,儲存於遠端,僅有 manifest 檔案儲存於行動裝置中) App。另外也可以從 Marketplace 取得托管式 App 的  manifest 檔案。</p>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p>App 的受信任層級,某種程度上將決定其所能取用的行動電話功能。</p>
+<ul>
+ <li>Certified App 可使用大多數的 Web API 作業。</li>
+ <li>針對 Certified App 所能存取的 Web API 作業,Privileged App 可使用這些 Web API 作業的子集。</li>
+ <li>針對 Privileged App 所能存取的 Web API 作業,未受信任的 App 則能使用這些 Web API 作業的子集。而相關 Web API 則具備必要的安全機制,以隨時因應未受信任的網頁內容。</li>
+</ul>
+<p>某些作業 (如網路存取) 均先假設為所有 App 的隱式許可。一般來說,越是高敏感性的作業 (如撥打電話號碼或取得通訊錄內容),就僅有更高信任度的 App 才能執行。</p>
+<h3 id="最小權限原則_(Principle_of_Least_Permissions)">最小權限原則 (Principle of Least Permissions)</h3>
+<p>針對 Web App,Firefox OS 安全架構則以《最小權限原則 (<em>principle of least permissions</em>)》為架構:先給予最低權限,僅在必要或合理的情況下,才選擇性的提高權限。依預設值,任一 App 均具備最低權限,以因應未受信任的網頁內容。如果 App 所呼叫的 Web API 需要額外權限,則其 <em>manifest </em>檔案 (本文稍後將敘述) 必須先列舉這些額外權限。而僅在 App 的 manifest 檔案明確要求 App 授權時,Gecko 才會給予 Web API 的存取權。此外,只有在 Web App 的類型 (即上述的 Certified 或 Trusted 或 Web 分類) 符合其存取層級,Gecko 才會給予必要的授權。</p>
+<h3 id="Marketplace_對_Privileged_App_的審核程序">Marketplace 對 Privileged App 的審核程序</h3>
+<p>若要達到 Privileged App,則 App 開發/供應商必須將之提交予經過授權的 Marketplace。而 Marketplace 隨即開始嚴格的程式碼審核程序:檢視其完整性與穩定性、審查其索取的授權是否符合其載明的用途、確認其隱式許可是否使用合宜、審核「Privileged App 的內容」與「未授權的外部內容」之間的介面,是否具備合適的緩衝,以避免權限提升 (Elevation of privilege) 的影響。Marketplace 另需負責確保 Web App 不會對其給予的權限進行惡意動作。</p>
+<p>在 App 通過審核之後即許可使用,且 Marketplace 亦將以數位方式簽署其 manifest 檔案,以供行動裝置的使用者下載之。一旦 Marketplace 遭駭,數位簽章可確保駭客無法將任意內容或惡意程式碼,安裝於使用者的行動電話上。也基於此審查程序,Firefox OS 從 Marketplace 取得的 Privileged App,其可信任度亦高於一般的 (未受信任的) 網頁內容。</p>
+<p> </p>
+<h2 id="封裝式_(Packaged)_與托管式_(Hosted)_App">封裝式 (Packaged) 與托管式 (Hosted) App</h2>
+<p>Firefox OS 可用封裝式 (儲存於行動電話中) 或托管式 (儲存於遠端伺服器中,僅有 manifest 檔案儲存於行動電話中) App。而此 2 種 App 的安全管理方式亦有所不同。封裝式與托管式 App 同可作為應用程式的封閉沙箱,本文稍後將說明。</p>
+<h3 id="封裝式_(Packaged)_App">封裝式 (Packaged) App</h3>
+<p>封裝式 App 是以 ZIP 壓縮檔所構成,內含應用程式的相關資源 (HTML5、CSS、JavaScript、影像、媒體),另以 manifest 檔案提供上述資源的清單,與其對應的 雜湊值 (Hash)。由於 Certified 與 Privileged App 的 manifest 檔案均需完成數位簽章,因此Certified/Privileged App 必為封裝式 App。只要使用者取得封裝式 App,就會將 ZIP 檔案下載至行動電話中,另從 ZIP 檔案內的已知位置讀取 manifest 檔案。系統將在安裝過程中驗證 App 的資源,其他則儲存於本端的封裝內。執行期間將請求所有的顯式許可 (Explicit permission)、顯示使用者 App 的資料儲存目標,最後依預設值完成保存。</p>
+<p>若要清楚指明封裝式 App 中的資源,則 URL 應以 App 開頭並使用下列格式:</p>
+<div class="note">
+ <p><code>app://<em>identifier</em>/<em>path_within_zipfile</em>/file.html</code></p>
+</div>
+<p>這裡的「app://」代表 ZIP 檔案的掛載點 (Mount point)。於行動電話上安裝 App 時,隨即產生「<em>identifier</em>」作為 UUID。如此可確保以 :app 的 URL 指向了特定資源,且已納入於 ZIP 檔案中。而 app: 中的路徑為相對路徑,因此可於 ZIP 檔案中允許資源的相對鏈結。</p>
+<p>封裝式 App 主要用於 Certified 與 Privileged App,不過一般的 Web App 亦可作為封裝式。但這些 Web App 不會因為封裝格式,就自動提高其信任度或存取權限。</p>
+<h3 id="托管式_(Hosted)_App">托管式 (Hosted) App</h3>
+<p>托管式 App 均儲存於網頁伺服器上,或需透過 HTTP 載入。僅有其 manifest 檔案儲存於行動電話中;其他所有檔案均儲存於遠端。僅 Privileged 與 Certified App 才能使用特定 API,以因應數位簽章作業而必須將 App 封裝。因此,即使 Web API 作業需要 Privileged/Certified App 的狀態,托管式 App 亦不需存取任何 Web API 作業。</p>
+<p>從安全性的觀點來說,托管式 App 的作業方式比較像一般網頁。在該網頁伺服器上,必須以寫死 (Hard-coded) 的完整 URL 指向 App 根目錄中的起始頁面,才能載入托管式 App。一旦載入托管式 App 之後,行動電話將根據網頁瀏覽時的 URL,跟著連至相同頁面。</p>
+<p> </p>
+<h2 id="App_的_Manifest_檔案">App 的 Manifest 檔案</h2>
+<p>Open Web App 的 manifest 檔案,將提供瀏覽器與 App 互動時的必要資訊。而 manifest 即為 JSON 檔案,至少均具備 App 的名稱與描述。可參閱 <a href="https://developer.mozilla.org/en-US/docs/Apps/FAQs/About_app_manifests" title="/en-US/docs/Apps/FAQs/About_app_manifests">App 的 manifest 檔案常見問題</a>以進一步了解。</p>
+<h3 id="Manifest_範例">Manifest 範例</h3>
+<p>下列程式碼則具備基礎設定的 manifest 範例:</p>
+<table>
+ <tbody>
+ <tr>
+ <td>
+ <p>1</p>
+ <p>2</p>
+ <p>3</p>
+ <p>4</p>
+ <p>5</p>
+ <p>6</p>
+ <p>7</p>
+ <p>8</p>
+ <p>9</p>
+ <p>10</p>
+ <p>11</p>
+ <p>12</p>
+ <p>13</p>
+ </td>
+ <td>
+ <p><code>{</code></p>
+ <p><code>  "name": "My App",</code></p>
+ <p><code>  "description": "My elevator pitch goes here",</code></p>
+ <p><code>  "launch_path": "/",</code></p>
+ <p><code>  "icons": {</code></p>
+ <p><code>    "128": "/img/icon-128.png"</code></p>
+ <p><code>  },</code></p>
+ <p><code>  "developer": {</code></p>
+ <p><code>    "name": "Your name or organization",</code></p>
+ <p><code>    "url": "http://your-homepage-here.org"</code></p>
+ <p><code>  },</code></p>
+ <p><code>  "default_locale": "en"</code></p>
+ <p><code>}</code></p>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<h3 id="Manifest_檔案的安全性設定">Manifest 檔案的安全性設定</h3>
+<p>manifest 檔案亦可具備其他設定,如下列的安全性設定:</p>
+<table>
+ <thead>
+ <tr>
+ <th style="width: 152px;">
+ <p>欄位</p>
+ </th>
+ <th style="width: 479px;">
+ <p>說明</p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td style="width: 152px;">
+ <p>permissions</p>
+ </td>
+ <td style="width: 479px;">
+ <p>App 的必要許可。任何 App 需列出所要使用的 Web API,以取得使用者的許可。Privileged/Certified App 可識別大多數的許可,但托管式 App 不適用。API 必具備的屬性:</p>
+ <ul>
+ <li><strong>description</strong> ─ 在請求使用此 API 時,此字串將指定其背後的目的地。必填。</li>
+ <li><strong>access</strong> ─ 此字串將指定許可所需的存取類型。安裝時即給予隱式許可 (Implicit permission)。僅數種 API  為必填欄位。僅接受:<strong>read</strong>、<strong>readwrite</strong><strong>、</strong><strong>readcreate</strong><strong>、</strong><strong>createonly</strong> 等數值。</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 152px;">
+ <p>installs_allowed_from</p>
+ </td>
+ <td style="width: 479px;">
+ <p>App 的來源。而構成來源的陣列 (scheme+unique hostname) 則可觸發此 App 的安裝作業。另可讓 App 廠商限制僅授權過的 Marketplace (如 <a href="https://marketplace.firefox.com/">https://marketplace.firefox.com/</a>) 才可安裝 App。</p>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 152px;">
+ <p>csp</p>
+ </td>
+ <td style="width: 479px;">
+ <p>內容安全政策 (Content Security Policy),將套用至 App 所載入的所有頁面。可強化 App 而避免遭惡意插入任何程式碼。若未指定 CSP,則 Privileged 與 Certified App 均已預設了系統定義值,其語法為:<br>
+ <a href="https://developer.mozilla.org/en-US/docs/Apps/Manifest#csp">https://developer.mozilla.org/en-US/docs/Apps/Manifest#csp</a></p>
+ <p>另請注意,此指令僅能增加所套用的 CSP。舉例來說,此指令並無法減少 Privileged App 所套用的 CSP。</p>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 152px;">
+ <p>type</p>
+ </td>
+ <td style="width: 479px;">
+ <p>App 的類型,即 Web、Privileged、Certified 等類型。</p>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<p>Firefox OS 要求 manifest 檔案必須為特定的 mime-type 格式 ("application/x-web-app-manifest+json"),而且必須與該 App 為相同來源的完整主機名稱 (即來源)。若「App 的 manifest 檔案」與「要求安裝 App 的頁面」兩者的來源相同,則將放寬此限制。此機制可確保不能偽裝網站並托管 App 的 manifest 檔案。</p>
+<p> </p>
+<h2 id="隔離式_(Sandboxed)_執行作業">隔離式 (Sandboxed) 執行作業</h2>
+<p>本章節將說明 App 與執行作業的沙箱隔離區 (Sandbox)。</p>
+<h3 id="App_隔離區">App 隔離區</h3>
+<p>Firefox OS 的安全架構,即是將隔離區作為深度防禦 (Defense-in-depth,DID) 策略,以減少風險並保護資料、平台、行動電話。在執行期間,隔離區可為 App 產生邊界與限制。各個 App 僅於自己的工作空間 (Working space) 內執行,另僅經過授權可存取的 Web API 與資料,才能存取;工作空間相關的資訊 (IndexedDB 資料庫、Cookies、離線儲存等) 亦然。請參閱 <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Security/Security_model">https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Security/Security_model</a> 以進一步了解。</p>
+<p>下圖則簡略說明了安全模型:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5025/sandbox.png"></p>
+<p>在隔離各個 App 之後,所產生的影響亦僅限於其工作空間之內,而不會受到工作空間之外的干擾 (如其他 App 或資料)。</p>
+<h3 id="執行作業隔離區">執行作業隔離區</h3>
+<p>B2G (Gecko) 在一個高授權度的系統程序 (可存取行動電話中的硬體功能) 中執行。在執行期間,各個執行環境裡的 App 皆是 B2G 系統程序的子程序。而各個子程序又具備嚴格的 OS 授權。舉例來說,子程序並無法直接讀寫檔案系統中的任意檔案。必須由 Web API 提供相關存取權限;且該權限又由 B2G 母程序所居中協調。在子程序要求授權過的 API 時,母程序將確認子程序具備必要的許可,以執行相關動作。</p>
+<p>App 僅能透過 B2G 核心程序 (非其他程序或 App) 而相互溝通。App 無法於 B2G 之外獨立執行;各 App 亦無法互相開放。App 之間僅能間接「溝通」─ 例如接收器 (Listener) 程序偵測到其他程序所產生的事件,且必須由 B2G 程序居中協調。</p>
+<h3 id="僅透過_Web_API_才能存取硬體">僅透過 Web API 才能存取硬體</h3>
+<p>Web App 若要存取行動電話的功能,唯一管道只有以 Gecko 所建構的 Firefox OS Web API 。Gecko 是行動裝置與底層服務的單一出口,因此必須讓 Web API 進行呼叫作業,才能存取裝置的硬體功能。絕對沒有「原生 (Native)」的 API 或其他途徑可繞過此機制,而直接存取硬體或滲透至初階的軟體層。</p>
+<p> </p>
+<h1 id="安全架構_2">安全架構</h1>
+<p>下圖則為安全架構的元件:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5027/securityframework.png" style="width: 979px; height: 591px;"></p>
+<ul>
+ <li><strong>Permission Manager</strong>:可於 Web API 中存取功能的管道,是底層硬體唯一存取路徑。</li>
+ <li><strong>Access Control List</strong>:由角色 (Role) 與許可 (Permission) 所構成,存取 Web API 功能所必備。</li>
+ <li><strong>Credential Validation</strong>:App 與使用者的授權。</li>
+ <li><strong>Permissions Store</strong>:存取 Web API 功能所需的授權集合。</li>
+</ul>
+<p> </p>
+<h2 id="許可的管理與強化">許可的管理與強化</h2>
+<p>針對 Web App 所需的許可 (Permission),Firefox OS 安全機制將進一步驗證並強化。<br>
+ 僅當內容 (Content) 請求特殊許可,或當內容具備 manifest 所要求的適當許可時,系統才會發出特定許可至 App。若需要使用者進一步的授權,則某些許可亦將提出請求 (例如 App 要存取使用者目前的位置)。與傳統「角色為中心 (Role-centric)」的方式 (各個獨立角色將獲得一系列的許可)相較,這種「應用為中心 (app-centric)」的架構更能嚴密控管許可。</p>
+<p>現有的 Web API 集合了一系列動作 (Action) 與接收器 (Listener)。各個 Web API 則具備必須的許可層級。每次只要呼叫 Web API,則 Gecko 檢查許可 (角色查找) 的基準為:</p>
+<ul>
+ <li>呼叫中 App 的相關許可 (已於 manifest 檔案中指定,並以 App 類型為準)</li>
+ <li>執行必要作業 (Web API 呼叫) 所需的許可</li>
+</ul>
+<p>若該請求並不符合許可的準則,則 Gecko 隨即拒絕該請求。舉例來說,只要是受信任 App 所保留的 Web API,未受信任的 App 均無法執行。</p>
+<p> </p>
+<h2 id="要求使用者給予許可">要求使用者給予許可</h2>
+<p>除了與 Web App 隱性關連 (Implicitly associated) 的許可之外,在執行特定作業之前需要使用者給予顯式許可。針對這些作業,Web App 必須在 manifest 檔案中表示索取許可的理由 (Justification)。這種「資料使用意圖 (Data usage intention)」,可讓使用者在給予許可之後,知道 Web App 處理資料的方式,亦將了解可能的風險,進而能做出決定並控管自己的資料。</p>
+<p> </p>
+<h2 id="安全的_App_更新程序">安全的 App 更新程序</h2>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5029/updateprocess.png" style="width: 979px; height: 102px;"></p>
+<p>針對 Privileged app 的升級與修正,開發/供應商必須將更新封裝提交至授權過的 Marketplace,以供 Marketplace 進一步審查。而在核准之後,隨即完成數位簽章並提供予使用者。在搭載 Firefox OS 的裝置上,亦可透過 App 更新公用程式 (暫譯 App Update Utility) 定期檢查 App 是否有可用的更新。若發現可用的更新,系統隨即會詢問使用者是否安裝。在行動裝置安裝更新檔案之前,必將驗證封裝的:</p>
+<ul>
+ <li>更新檔來源 (驗證更新與 manifest 檔案的來源位置 protocol:domain:port)</li>
+ <li>檔案完整性 (SHA-256 雜湊檢查)</li>
+ <li>程式碼簽章 ─ 針對憑證簽發源頭 (Trusted root) 而檢查認證</li>
+</ul>
+<p>透過適當且嚴格的檢查,可確保行動電話已正確套用了更新。<br>
+ 在開始更新程序之前,必須先下載完整的更新封裝至特定且安全的位置。安裝作業並不會覆寫任何使用者資料。</p>
+<p> </p>
+<h1 id="裝置安全性_(硬體)">裝置安全性 (硬體)</h1>
+<p>行動裝置硬體的安全機制,一般均由 OEM 廠商所決定。舉例來說,OEM 廠商可能提供 SIM (Subscriber Identity Module) 卡的鎖定機制,另搭配 PUK (PIN Unlock Key) 密碼,以用於輸入錯誤 PIN 而遭鎖定的 SIM 卡。這部份需聯絡 OEM 廠商以了解細節。Firefox OS 則可讓使用者設定密碼與待機畫面,將於稍後說明。</p>
+<p> </p>
+<h1 id="資料安全性">資料安全性</h1>
+<p>使用者可將個人資料儲存於手機中,並可設定其隱私性,包含聯絡資訊、金融資訊 (銀行與信用卡細節)、密碼、行事曆等。Firefox OS 則針對惡意 App (竊取、挖掘、破壞私密資料) 而設計了防護機制。</p>
+<p> </p>
+<h2 id="密碼與待機畫面">密碼與待機畫面</h2>
+<p>Firefox OS 可供使用者設定行動電話的密碼,往後必須輸入正確密碼才能使用該行動電話。Firefox OS 另提供待機畫面的功能。只要設定特定時間內未使用行動電話,隨即顯示待機畫面。此時必須輸入密碼授權才能繼續使用手機。</p>
+<p> </p>
+<h2 id="隔離式_(Sandboxed)_資料">隔離式 (Sandboxed) 資料</h2>
+<p>如之前所述,執行期間的 App 均進入隔離狀態。如此可避免 App 相互存取其內的資料;<strong>除非</strong>該筆資料已設為共享資料,且其他 App 擁有夠高的許可層級可存取之。</p>
+<p> </p>
+<h2 id="序列化_(Serialized)_資料">序列化 (Serialized) 資料</h2>
+<p>Web App 並無法直接讀寫檔案系統。相反的,僅能透過 Web API 而存取儲存媒體。Web API 另將透過 SQLite 資料庫居中協調,才能進一步讀取、寫入儲存媒體。不會直接以 I/O 進行存取作業。各個 App 均擁有自己的資料儲存媒體,將經過資料庫而序列化至磁碟中。</p>
+<p> </p>
+<h2 id="資料銷毀">資料銷毀</h2>
+<p>一旦使用者取消安裝 App,則將刪除該 App 所有的相關資料,如 cookies、localStorage、Indexeddb 等。</p>
+<p> </p>
+<h2 id="隱私性">隱私性</h2>
+<p>根據隱私權原則 (<a href="https://www.mozilla.org/privacy/)%3c">https://www.mozilla.org/privacy/)</a>,Mozilla 致力保護使用者隱私與資料,同時可參閱 Mozilla Manifesto (<a href="https://www.mozilla.org/about/manifesto.html">https://www.mozilla.org/about/manifesto.html</a>)。而 Mozilla 的 Firefox Privacy Policy 則說明 Mozilla 將如何蒐集、利用 Mozilla Firefox 瀏覽器的使用者資訊,包含 Firefox 所傳送至網頁的資料、Mozilla 的資料保護方式、Mozilla 資料實務情況等。若要進一步了解相關細節,可參閱:</p>
+<ul>
+ <li><a href="http://www.mozilla.org/en-US/legal/privacy/firefox.html">http://www.mozilla.org/en-US/legal/privacy/firefox.html</a></li>
+ <li><a href="https://blog.mozilla.org/privacy/">https://blog.mozilla.org/privacy/</a></li>
+ <li><a href="http://support.mozilla.org/en-US/kb/privacy-and-security-settings-firefox-os-phones">http://support.mozilla.org/en-US/kb/privacy-and-security-settings-firefox-os-phones</a></li>
+</ul>
+<p>在擬定 Firefox OS 的原則時,均將使用者資料的控制權交付給使用者本身。而使用者必須自己決定個人資訊的運用方法。Firefox OS 將提供下列功能:</p>
+<ul>
+ <li>「不要追蹤我 (Do Not Track)」選項</li>
+ <li>可停用 Firefox 瀏覽器的 Cookies</li>
+ <li>可刪除 Firefox OS 的瀏覽記錄</li>
+</ul>
diff --git a/files/zh-tw/archive/b2g_os/security/system_security/index.html b/files/zh-tw/archive/b2g_os/security/system_security/index.html
new file mode 100644
index 0000000000..edb0e64697
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/security/system_security/index.html
@@ -0,0 +1,376 @@
+---
+title: 系統安全
+slug: Archive/B2G_OS/Security/System_security
+translation_of: Archive/B2G_OS/Security/System_security
+---
+<div class="summary">
+ <p><span class="seoSummary">本文旨在提供 Firefox OS 系統安全模型概觀,說明系統是如何保持安全性與實施權限管理。</span></p>
+</div>
+<h2 id="名詞解釋">名詞解釋</h2>
+<p>在開始之前,有幾個名詞需要了解一下。</p>
+<dl>
+ <dt>
+ 網頁應用程式 (Web application)</dt>
+ <dd>
+ 網頁應用程式 (<strong>web application, web app, open web app</strong>, <strong>moz app</strong>, <strong>application</strong>) 是運行在 Firefox OS (或其他支援平台)、用 <a href="/en-US/docs/HTML" title="/en-US/docs/HTML">HTML</a>, <a href="/en-US/docs/JavaScript" title="/en-US/docs/JavaScript">JavaScript</a>, 以及其他開源網頁技術所寫成的應用程式。所有 B2G 上使用者使用的應用程式都是網頁應用程式,例如撥號程式是一個 web app,但顯示在瀏覽中的網頁並不屬於網頁應用程式的範疇。</dd>
+ <dt>
+ b2g 程序 (b2g process)</dt>
+ <dd>
+ Firefox OS <strong>b2g process</strong> 通常會被叫做 "<strong>b2g</strong>" 或 "<strong>Gecko</strong>"。b2g 實際上是一個高權限 (root 權限) 應用程式,控制了所有 web app 對資源和硬體的存取。</dd>
+ <dt>
+ 內容程序 (Content process)</dt>
+ <dd>
+ b2g 產生的子程序,會和 b2g 溝通,代表了 web app。它擁有的權限較低 (一般使用者權限;受限的作業系統資源存取),透過 inter-process communication (IPC) 和 OS 核心溝通。</dd>
+ <dt>
+ IPDL</dt>
+ <dd>
+ Intercommunication Protocol Definition Language, 請參照 <a href="/en-US/docs/IPDL" title="/en-US/docs/">IPDL</a>.</dd>
+ <dt>
+ AOSP</dt>
+ <dd>
+ Android Open Source Project.</dd>
+ <dt>
+ System call</dt>
+ <dd>
+ 一個介於使用者空間 (user space) 和核心 (kernel) 的溝通介面,使用者空間只能透過這個介面和核心溝通。</dd>
+ <dt>
+ DAC, MAC</dt>
+ <dd>
+ 使用者可設定的自主存取控制 (Discretionary Access Control) 和 系統強制的<span class="st">強制存取控制 (</span>Mandatory Access Control)。</dd>
+ <dt>
+ FOTA</dt>
+ <dd>
+ 自動韌體更新機制 (Firmware Over The Air),透過無線網路"空中"更新韌體。</dd>
+ <dt>
+ MSU (Mozilla System Updater), MAR (Mozilla ARchive)</dt>
+ <dd>
+ 和 Firefox 桌面產品一樣的更新機制和檔案格式。</dd>
+</dl>
+<h2 id="Firefox_作業系統安全模型目標與範疇">Firefox 作業系統安全模型目標與範疇</h2>
+<p>Firefox OS 安全模型的設計目標:</p>
+<ul>
+ <li>限制 web app 所能存取的資源範疇。</li>
+ <li>確保作業系統各層安全措施正確執行。</li>
+ <li>從 Gonk 層起,限制與控管安全漏洞所造成之衝擊影響。</li>
+ <li>Web app 權限以及所有應用程式相關安全性特色都在<a href="/en-US/docs/Mozilla/Firefox_OS/Security/Application_security" title="/en-US/docs/Mozilla/Firefox_OS/Security/Application_security">應用程式安全</a>模型詳述。</li>
+</ul>
+<p>下面將說明每一個目標以及 Firefox OS 如何達成個目標。</p>
+<h2 id="權限強制">權限強制</h2>
+<p><a href="/en-US/docs/Mozilla/Firefox_OS/Security/Application_security" title="/en-US/docs/Mozilla/Firefox_OS/Security/Application_security">應用程式安全</a>模型描述了使用者如何直接或透過受信任第三方來授予應用程式權限,這些強制加諸於內容程序 (content process) 的權限是透過限制資源存取必須經過和核心程序 (core process) 之間的 IPC call。</p>
+<ul>
+ <li>Firefox OS 核心程序, <code>b2g</code>, 的權限極高,同時能夠存取大部分硬體資源。</li>
+ <li>較低權限的 Web app 的內容程序只能透過 IPC 和 b2g 溝通;IPC 是用 <a href="/en-US/docs/IPDL" title="/en-US/docs/IPDL">IPDL</a> 實現。</li>
+ <li>內容程序無法存取系統層級的資源。</li>
+ <li>每一個 Web API 都有一個以上相關聯的 IPDL 協定宣告檔 (*.ipdl).</li>
+</ul>
+<h2 id="內容程序初始化"><a name="Content_processes">內容程序初始化</a></h2>
+<p>所有的 web app 都運行在低權限、分開的內容程序。當 web app 載入到一個特別的 {{HTMLElement("iframe")}} 型態: <em>&lt;iframe mozapp&gt;</em> 時 b2g 程序會啟動內容程序,這樣會將 web app 和其他內容隔離開來,而且和 web app 的 manifest 高度相關 (請參照 <a href="/en-US/docs/Mozilla/Firefox_OS/Security/Application_security" title="/en-US/docs/Mozilla/Firefox_OS/Security/Application_security">應用程式安全</a>模型),內容程序會在一個稱為 "out of process" (OOP) 的容器裡啟動,這個 OOP 即是 <code>plugin-container</code> 程序,並且和桌面 Firefox 所用的 <code>plugin-container</code> 程序有著相似的原始碼。</p>
+<h3 id="風險">風險</h3>
+<ul>
+ <li>當產生 web app 內容程序時的資訊外洩。</li>
+ <li>提高到和 b2g 一樣權限層級以及存取作業系統資源的意外可能性。</li>
+ <li>跳過內容程序初始化過程。</li>
+</ul>
+<h3 id="實作">實作</h3>
+<h4 id="在_b2g_程序裡啟動">在 b2g 程序裡啟動</h4>
+<p>順序如下:</p>
+<ol>
+ <li><code>fork()</code></li>
+ <li><code>setuid(new, different, unused user id|nobody)</code> (無特權的使用者)</li>
+ <li><code>chrdir('/')</code></li>
+ <li><code>execve('plugin-container')</code></li>
+</ol>
+<p>這邊的啟動順序確保 OOP 程序運行在隔離的記憶體空間,同時只是低權限使用者,無法提高到 b2g 的高權限。</p>
+<h4 id="File_descriptor_(檔案描述子)_管理">File descriptor (檔案描述子) 管理</h4>
+<p>File descriptors 的管理方法是白名單;一份受允許的 file descriptors (FDs) 清單儲存在 <code>mFileMap</code> 物件,在呼叫 fork() 後 (FDs 複製前) 和呼叫 execve()前 (新 web app 開始運行),<code>LaunchApp()</code> 函數會強制關閉不在白名單上的 FD。</p>
+<p>不同於傳統的黑名單作法 (close-on-exec flag: <code>CLOEXEC</code>),這種做法確保不會有多餘的開啟 FD,比較可靠。</p>
+<h2 id="Content_process_sandboxing_(沙箱,低權限內容程序)"><a name="Content_process_sandboxing"></a>Content process sandboxing (沙箱,低權限內容程序)</h2>
+<h3 id="風險_2">風險</h3>
+<ul>
+ <li>記憶體錯誤或 Gecko 執行時期邏輯錯誤可能導致意外程式碼的執行。</li>
+ <li>作業系統,特別是核心,類似錯誤可能導致意外程式碼的執行。</li>
+ <li>資訊洩漏、檔案系統讀寫。</li>
+</ul>
+<p>下表為 sandbox 開啟下可能的威脅列表,附帶前述的可能風險。</p>
+<div class="warning">
+ <p dir="ltr"><strong>範疇</strong>: 當攻擊者以內容程序執行意外執行碼時,會出現下面的威脅,也就是說,攻擊者發現了 Gecko 的安全漏洞。</p>
+</div>
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">威脅</th>
+ <th scope="col">潛在衝擊</th>
+ <th scope="col">可能性因子</th>
+ <th scope="col">建議對應作法</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>惡意內容程序利用核心安全漏洞</p>
+ <p>"2 steps attack".</p>
+ </td>
+ <td><strong>嚴重</strong>:整個裝置都將受到控制</td>
+ <td><strong>低</strong>: 內容程序只有有限的方法呼叫系統。</td>
+ <td>
+ <ul>
+ <li>減少允許的系統呼叫數量到最低需要量。</li>
+ <li>用預防性修正檔保護核心,例如 PaX (Protection Against eXecution).</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>提升到父程序權限</p>
+ <p>惡意內容程序利用和父程序之間的 IPDL 安全漏洞</p>
+ <p>"2 steps attack".</p>
+ </td>
+ <td><strong>高</strong>: 許多敏感的系統呼叫都可以被執行 (資料損失、相機存取、網路存取等等)</td>
+ <td><strong>中</strong>: 父程序大量的程式碼代表大範圍的可能攻擊點。少量的 IPDL 資料消毒,例如傳送指標。</td>
+ <td>
+ <ul>
+ <li>以非 root / 非特權使用者執行父程序</li>
+ <li>盡可能以 sandbox 方法執行父程序</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>惡意內容程序利用父程序攻擊核心安全漏洞</p>
+ <p>"3 steps attack".</p>
+ </td>
+ <td><strong>嚴重</strong>:整個裝置都將受到控制</td>
+ <td>
+ <p><strong>低</strong>: 需要父程序有可以透過 IPDL 攻擊的 bug。</p>
+ <p>需要核心和父程序之間的系統呼叫可利用的漏洞 (相較內容程序,父程序有更多可行的系統呼叫)</p>
+ </td>
+ <td>
+ <ul>
+ <li>以非 root / 非特權使用者執行父程序</li>
+ <li>盡可能以 sandbox 方法執行父程序</li>
+ <li>用預防性修正檔保護核心,例如 PaX (Protection Against eXecution)</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>惡意內容程序、父程序、web app 利用硬體裝置的 bug</p>
+ <p>"1 and 2 steps attack".</p>
+ </td>
+ <td>
+ <p><strong>高</strong>: 可以執行特別權限的作業 (如撥號、傳 SMS 簡訊等)</p>
+ <p><strong>嚴重</strong>:整個裝置都將受到控制或執行硬體程式碼。</p>
+ </td>
+ <td><strong>低</strong>: 需要硬體 bug 以及 IPDL 或系統呼叫授予的硬體溝通管道</td>
+ <td>
+ <ul>
+ <li>對硬體裝置實施模糊測試 (Fuzz testing)</li>
+ <li>利用核心或父程序 API 修正檔避開問題 (關閉不安全的硬體功能、消毒資料等等)</li>
+ </ul>
+ </td>
+ </tr>
+ </tbody>
+</table>
+<div class="note">
+ <p><strong>Note</strong>:</p>
+ <p>* PaX (Protection Against eXecution) 是一個由 <a href="http://grsecurity.net/~paxguy1/" title="http://grsecurity.net/~paxguy1/">GrSecurity</a> (<a href="http://pax.grsecurity.net/docs" title="http://pax.grsecurity.net/docs">docs</a>) 所發佈的核心修正檔,實作了 PaX 以及額外的保護措施,如 UDEREF 和 SMAP。</p>
+ <p>* 未列出的安全性漏洞代表已被 snadbox 解決掉了。</p>
+</div>
+<h3 id="實作內容">實作內容</h3>
+<p><img alt="Process Model Sandbox" src="https://mdn.mozillademos.org/files/5347/sq1ftZvuape-uCT8CDfJ10Q.png" style="width: 708px; height: 470px;"></p>
+<div class="note">
+ <p><strong>Note</strong>: 內容程序 (Content Processes) 就是運行中的 web app,也會被限制在 sandbox 環境。</p>
+</div>
+<h4 id="Gecko_APIs_實作">Gecko APIs 實作</h4>
+<p>內容程序可見的 APIs 絕不應該直接存取檔案系統,取而代的是應該透過 IPDL,所以說會需要存取資源的 API 都需要在父程序中有一個對應的元件代表 API 存取資源。</p>
+<p>實作相關部分時要特別小心,所有送到父程序的輸入都應該要先消毒,不可以相信內容程序以及來自內容程序的 IPDL 訊息。</p>
+<div class="warning">
+ <p><strong>Warning</strong>: 任何內容程序取得的受信任授權都可以被用來繞過 sandbox 所加諸的限制。</p>
+</div>
+<h4 id="何謂_seccomp">何謂 seccomp</h4>
+<p>Seccomp 代表 secure computing mode (安全電腦模式),目前有兩種版本:</p>
+<ol>
+ <li>
+ <p><code>seccomp</code>, 可見於 Linux kernel 2.6.12 以上版本:</p>
+ <ul>
+ <li>
+ <p>開啟 <code>seccomp</code> 會將程序的系統呼叫 (System call) 限制在 <code>read</code>, <code>write</code>, <code>sigreturn</code>, 和 <code>exit</code></p>
+ </li>
+ <li>
+ <p>使用 <code>prctl()</code> system call</p>
+ </li>
+ <li>
+ <p>可以在指定地方、程序初始化後啟動</p>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <p><code>seccomp-bpf</code>, 又稱為 seccomp mode filter 或 mode 2, 可見於 Linux kernel 3.5 以上版本:</p>
+ <ul>
+ <li>
+ <p>如同 <code>seccomp</code>,但多了 BPF 過濾系統呼叫</p>
+ </li>
+ <li>
+ <p>可以使用系統呼叫白名單和啟動時傳入參數,而非單單預先寫死的作法</p>
+ </li>
+ <li>
+ <p>更有彈性,可以有"較多自由的 sandbox",對限制性較低的 sandbox 來說很有用,而且也可以移轉到限制性較高的 sandbox</p>
+ </li>
+ <li>
+ <p>多了一個安全性旗幟避免程序和子程序推翻既有權限限制</p>
+ </li>
+ </ul>
+ </li>
+</ol>
+<div class="note">
+ <p><strong>Note</strong>: 基於 <code>seccomp-bpf 更有彈性,所以我們決定採用,並且替版本低於3.5 的 kernel (涵蓋了目前大部分的 Android kernel)提供向下相容移植。</code>目前已經有不會造成衝突、可供使用的移植包 (請見 bug <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=790923" title="https://bugzilla.mozilla.org/show_bug.cgi?id=790923">790923</a>).</p>
+</div>
+<h4 id="Seccomp-bpf_效能">Seccomp-bpf 效能</h4>
+<p><code>seccomp-bpf</code> 會對每一次系統呼叫造成效能負擔,目前沒有一定的效能標竿準則,但我們預估大約最高 1% 的系統呼叫負擔會產生。</p>
+<p>由於我們的程序模型減少許多系統呼叫,所以實際上我們預估效能負擔將會趨近於無。</p>
+<p>不過因實作細節而異, IPDL 呼叫卻可能造成效能負擔以及增加延遲,建議對於資源需求密集的 API,如 OpenGL 呼叫,可以看一下 <a href="http://code.google.com/p/chromium/issues/detail?id=29120" style="text-decoration: none;">Chromium的實作細節</a>。和 <code>seccomp-bpf</code> 一樣,我們能夠最少化 IPDL 呼叫次數來最小化效能負擔。</p>
+<h3 id="實作內容_2">實作內容</h3>
+<p><code>seccomp</code> 在 Gecko 以 <em><code>--enable-content-sandbox </code></em>開啟。<em>.</em></p>
+<p>預設上系統呼叫拒絕資訊不會被回報,我們可以透過 <code>--enable-content-sandbox-reporter 打</code>開回報機制。</p>
+<p>程式碼放在<em> </em><code>gecko/security/sandbox</code>,白名單放在 <code>gecko/security/sandbox/seccomp_filter.h</code>。</p>
+<h2 id="檔案系統安全強化"><a name="File_system_hardening"></a>檔案系統安全強化</h2>
+<h3 id="風險_3">風險</h3>
+<ul>
+ <li>讀、寫、刪除另一位使用者的檔案可能會導致資訊洩漏或未預期權限提升</li>
+ <li>經由應用程式漏洞執行本地編譯碼</li>
+ <li>setuid 程式的安全漏洞導致權限提升</li>
+</ul>
+<h3 id="實作內容_3">實作內容</h3>
+<p>原則上只有使用者內容區域可以讀寫 (除非 OS 未來要求新的讀寫區域),而且一定要包含 <code>nodev</code>、<code>nosuid</code> 和 <code>noexec</code> 選項。標準檔案系統掛載點限制如下:</p>
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">掛載點</th>
+ <th scope="col">檔案系統</th>
+ <th scope="col">選項</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>/</code></td>
+ <td>rootfs</td>
+ <td>read-only</td>
+ </tr>
+ <tr>
+ <td><code>/dev</code></td>
+ <td>tmpfs</td>
+ <td>read-write, nosuid, noexec, mode=0755</td>
+ </tr>
+ <tr>
+ <td><code>/dev/pts</code></td>
+ <td>ptsfs</td>
+ <td>read-write, nosuid, noexec, mode=0600</td>
+ </tr>
+ <tr>
+ <td><code>/proc</code></td>
+ <td>proc</td>
+ <td>read-write, nosuid, nodev, noexec</td>
+ </tr>
+ <tr>
+ <td><code>/sys</code></td>
+ <td>sysfs</td>
+ <td>read-write, nosuid, nodev, noexec</td>
+ </tr>
+ <tr>
+ <td><code>/cache</code></td>
+ <td>yaffs2 or ext4</td>
+ <td>read-write, nosuid, nodev, noexec</td>
+ </tr>
+ <tr>
+ <td><code>/efs</code></td>
+ <td>yaffs2 or ext4</td>
+ <td>read-write, nosuid, nodev, noexec</td>
+ </tr>
+ <tr>
+ <td><code>/system</code></td>
+ <td>ext4</td>
+ <td>read-only, nodev</td>
+ </tr>
+ <tr>
+ <td><code>/data</code></td>
+ <td>ext4</td>
+ <td>read-write, nosuid, nodev, noexec</td>
+ </tr>
+ <tr>
+ <td><code>/mnt/sdcard</code></td>
+ <td>ext4 or vfat</td>
+ <td>read-write, nosuid, nodev, noexec, uid=1000, fmask=0702, dmask=0702</td>
+ </tr>
+ <tr>
+ <td><code>/acct</code></td>
+ <td>cgroup</td>
+ <td>read-write, nosuid, nodev, noexec</td>
+ </tr>
+ <tr>
+ <td><code>/dev/cpuctl</code></td>
+ <td>cgroup</td>
+ <td>read-write, nosuid, nodev, noexec</td>
+ </tr>
+ </tbody>
+</table>
+<div class="note">
+ <p><strong>Note:</strong> 實際的掛載點可能有所變更</p>
+</div>
+<h3 id="Linux_DAC_2"><span class="mw-headline" id="Linux_DAC">Linux DAC</span></h3>
+<p>Linux DAC represents 是一個有名的 Linux 檔案系統權限模型。</p>
+<div class="note">
+ <p><strong>Note: </strong>這是傳統的 user/group/others 權限模型,而非 Linux POSIX 1.e ACLs.</p>
+</div>
+<ul>
+ <li>Web app 系統使用者沒有寫入任何檔案的權限</li>
+ <li>setuid 二進位檔只能在必要時使用</li>
+ <li>新內容程序以合理的 umask 啟動</li>
+</ul>
+<h2 id="安全系統更新"><a name="System_updates"></a>安全系統更新</h2>
+<h3 id="風險_4">風險</h3>
+<ul>
+ <li>受感染的更新檔案導致未受信任的更新檔被安裝</li>
+ <li>受感染的更新檢查
+ <ul>
+ <li>使用者看不到更新</li>
+ <li>使用者更新到過時的更新檔,導致軟體降級</li>
+ </ul>
+ </li>
+ <li>安裝更新時受感染或未知的系統狀態可能導致:
+ <ul>
+ <li>遺失安裝檔案,例如一些安全性修正檔</li>
+ <li>安全性修正被受感染的系統推翻</li>
+ </ul>
+ </li>
+ <li>更新機制的安全漏洞</li>
+ <li>對已知漏洞缺乏更新或追蹤</li>
+</ul>
+<h3 id="實作內容_4">實作內容</h3>
+<p>Firefox OS 的更新機制使用安全的 Mozilla 程序,更新檔是由受信任,通常是 OEM 廠商,組建、測試、簽署數位簽章。</p>
+<h4 id="FOTA_(Firmware_over_the_air)_更新">FOTA (Firmware over the air) 更新</h4>
+<p>系統更新可能涵蓋全部或部分 Firefox OS,如果更新涵蓋到 Gonk,那麼 <strong>FOTA</strong> (Firmware Over the Air) 安裝程序會被採用。FOTA 也可涵蓋到 OS 其他部分,例如裝置管理 (FOTA, firmware / drivers)、設定管理 (Firefox OS settings)、安全更新、Gaia、Gecko 等等。</p>
+<h4 id="MSUMAR_更新">MSU/MAR 更新</h4>
+<p>不牽涉到 Gonk 的更新可以透過 Mozilla 系統更新工具。Firefox OS 使用和桌面 FIrefox 一樣的更新架構、程序 Mozilla ARchive (MAR) 格式 (用於更新包)。</p>
+<h4 id="更新服務">更新服務</h4>
+<div class="note">
+ <p><strong>Note: </strong>更新服務能由 OEM 廠商提供。</p>
+</div>
+<p>手機內建的更新系統會定期檢查更新,一但發現新更新,會提示使用者安裝更新,另外安裝前也會檢查手機儲存空間以及驗證發行者身分:</p>
+<ul>
+ <li>更新來源 (驗證更新和 manifest 檔的來源位置,protocol:domain:port)</li>
+ <li>檔案完整性 (加密 hash checksums).</li>
+ <li>程式碼簽章</li>
+</ul>
+<p>下列安全性作法會用在更新程序:</p>
+<ul>
+ <li>Mozilla 建議並且預期更新有受信任的證明以及通過 SSL 下載。</li>
+ <li>更新韌體需要高度加密驗證。</li>
+ <li>更新前完整的更新檔必須從特定、安全的來源下載。</li>
+ <li>當系統更新時,系統必須要在安全的狀態下,不可以運行任何 web app。</li>
+ <li>金鑰必須存在裝置上安全的地方。</li>
+</ul>
+<p>縝密的更新檢查確保正常地安裝更新。</p>
+<div class="note">
+ <p><strong>Note</strong>: 更多有關更新資訊,請見 <a href="/en-US/Firefox_OS/Building_and_installing_Firefox_OS/Creating_Firefox_OS_update_packages">Creating and applying Firefox OS update packages</a>.</p>
+</div>
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/simulator/index.html b/files/zh-tw/archive/b2g_os/simulator/index.html
new file mode 100644
index 0000000000..3b5677a518
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/simulator/index.html
@@ -0,0 +1,90 @@
+---
+title: Firefox OS 模擬器
+slug: Archive/B2G_OS/Simulator
+translation_of: Archive/B2G_OS/Simulator
+---
+<div class="note">
+<p>本文將針對 Firefox OS 1.2 或更高版本,說明 Firefox OS 模擬器 (Firefox OS Simulator) 相關使用方式。如果開發者目前正開發 Firefox OS 1.1 的 App,則請參閱 <a href="https://developer.mozilla.org/en-US/docs/Tools/Firefox_OS_1.1_Simulator">Firefox OS 1.1 Simulator</a> 的相關文章。</p>
+</div>
+
+<p>Firefox OS 模擬器可於桌機中模擬 Firefox OS 裝置。開發者不用真的弄到實際設備就能夠測試 App 並進行除錯。模擬器會在視窗中以 Firefox OS 裝置的實際尺寸執行,亦包含 Firefox OS 使用者介面與已內建的 App,進而模擬多樣的 Firefox OS 裝置 API。</p>
+
+<p>Firefox OS 模擬器是以 Firefox 附加元件的格式發佈,可下載並安裝於 Firefox 瀏覽器之上,接著可透過<a href="https://developer.mozilla.org/zh-TW/docs/Mozilla/Firefox_OS/Using_the_App_Manager">應用程式管理員 (App Manager)</a> 來執行模擬器、將 App 送入模擬器、搭配其他開發者工具。</p>
+
+<h2 id="安裝"><span style="line-height: 1.5;">安裝</span></h2>
+
+<p>直接點擊下方按鈕即可安裝模擬器。現有多個版本可供安裝。我們也建議開發者能安裝所有版本,以達最佳開發靈活度。</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;">安裝 Firefox OS Simulator</a></p>
+
+<p>另請參閱<a href="https://developer.mozilla.org/zh-TW/docs/Mozilla/Firefox_OS/Using_the_App_Manager">《應用程式管理員》中的說明</a>來啟動模擬器。一旦模擬器開始執行,開發者即可將 App 送入應用程式管理員進行除錯;就如同使用實際裝置一樣。</p>
+
+<div class="note" style="line-height: 21px;">
+<p><strong>注意:模擬器</strong> (1.2 與 1.3 版) 目前正回報 1 組錯誤的 Gecko user agent 字串:請參閱 {{ Bug("964598") }} 進一步了解。</p>
+</div>
+
+<h2 id="模擬器的使用者介面_(UI)" style="line-height: 30px;">模擬器的使用者介面 (UI)</h2>
+
+<p>模擬器將另外顯示獨立的視窗,且模擬畫面則為 320x480 像素。若要模擬觸控事件,則可按下滑鼠按鈕不放並拖曳。只要在主畫面上按下滑鼠不放並從右向左拖曳,即可看到已內建的 App,還有開發者剛送入的 App:</p>
+
+<p><img alt="" src="https://mdn.mozillademos.org/files/7173/simulator-1.2.png" style="display: block; height: 623px; margin: 0px auto; width: 810px;"></p>
+
+<p>在模擬器視窗底部的工具列共有 2 個按鈕:</p>
+
+<ul>
+ <li>左邊「<strong>主畫面</strong>」按鈕可回到主畫面;或長按不放則可關閉模擬器</li>
+ <li>右邊「<strong>畫面旋轉</strong>」按鈕可切換裝置的橫向、直向畫面;即產生 <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="模擬器的限制">模擬器的限制</h2>
+
+<p>請注意,Firefox OS 模擬器仍無法提供完美的模擬作業。</p>
+
+<h3 id="硬體限制"><strong>硬體限制</strong></h3>
+
+<p>模擬器除了螢幕尺寸的限制之外,也無法模擬 Firefox OS 裝置的硬體 (例如 CPU 速度或可用的記憶體容量)。</p>
+
+<h3 id="音訊視訊編碼">音訊/視訊編碼</h3>
+
+<p>下列編碼 (Codecs) 因硬體加速解碼而有所不同,因此尚未支援:</p>
+
+<ul>
+ <li>MP3</li>
+ <li>AAC</li>
+ <li>H.264 (MP4)</li>
+ <li>WebM</li>
+</ul>
+
+<p>也就是說,若 App 或網站 (如 Youtube) 使用這些編碼,則模擬器將無法測試其中的視訊回播功能。</p>
+
+<h3 id="未支援的_API"><a name="Unsupported-APIs">未支援的 API</a></h3>
+
+<p>一般來說,因為桌上型電腦無法使用支援硬體,所以可於裝置上運作的特定 API,可能無法用於模擬器之上。我們另外針對某些 API (例如 Geolocation 地理位置定位) 建構了模擬功能,未來版本亦將新增更多模擬 API。但目前仍尚未支援下列 API。如果使用了這些 API,也只會得到錯誤的報告或結果:</p>
+
+<ul>
+ <li><a href="https://developer.mozilla.org/en-US/WebAPI/WebTelephony" title="/en-US/WebAPI/WebTelephony">Telephony</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/WebAPI/WebSMS" title="/en-US/docs/WebAPI/WebSMS">WebSMS</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/WebAPI/WebBluetooth" title="/en-US/docs/WebAPI/WebBluetooth">WebBluetooth</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/WebAPI/Using_Light_Events" title="/en-US/docs/WebAPI/Using_Light_Events">Ambient Light</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/WebAPI/Proximity" title="/en-US/docs/WebAPI/Proximity">Proximity</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/WebAPI/Network_Information" title="/en-US/docs/WebAPI/Network_Information">Network Information</a></li>
+ <li><a href="https://developer.mozilla.org/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="https://developer.mozilla.org/en-US/docs/WebAPI/Vibration" title="/en-US/docs/WebAPI/Vibration">Vibration</a></li>
+</ul>
+
+<h2 id="獲得協助"><a name="Simulator-help"></a>獲得協助</h2>
+
+<p>如果有任何問題,請透過 <a href="https://lists.mozilla.org/listinfo/dev-developer-tools">dev-developer-tools 郵件群組</a>或到 <a href="irc://irc.mozilla.org/#devtools">#devtools on irc.mozilla.org</a> 上發問。</p>
+
+<h3 id="啟動詳細資訊_(verbose)_記錄的方法"><a name="Simulator-verbose-logging"></a>啟動詳細資訊 (verbose) 記錄的方法</h3>
+
+<p>開發者可到<a href="https://developer.mozilla.org/en-US/docs/Tools/Web_Console">網頁主控台 (Web Console)</a> 觀看 App 的記錄訊息,並透過<a href="https://developer.mozilla.org/zh-TW/docs/Mozilla/Firefox_OS/Using_the_App_Manager">應用程式管理員</a>將記錄附加到 App 上。如果想知道 App 啟動時的早期訊息,甚至早於主控台連線並開始作業的訊息,則開發者可啟動模擬器中的詳細資訊記錄功能。</p>
+
+<p>可透過 about:config 並建立新的 preference 設定。依照模擬器的版本,preference 的名稱也有所差異:</p>
+
+<ul>
+ <li>Firefox OS 1.3 為extensions.fxos_1_3_simulator@mozilla.org.sdk.console.logLevel</li>
+ <li>Firefox OS 1.2 為 extensions.fxos_1_2_simulator@mozilla.org.sdk.console.logLevel</li>
+</ul>
+
+<p>針對「附加元件管理員 (Add-on Manager)」中的附加元件,可將字串值設為「all」、停用,再啟用。目前有關模擬器作業的額外訊息,均將出現於<a href="https://developer.mozilla.org/en-US/docs/Tools/Browser_Console">瀏覽器主控台 (Browser Console)</a> 中。</p>
diff --git a/files/zh-tw/archive/b2g_os/simulator/simulator_walkthrough/index.html b/files/zh-tw/archive/b2g_os/simulator/simulator_walkthrough/index.html
new file mode 100644
index 0000000000..9e7fba8c07
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/simulator/simulator_walkthrough/index.html
@@ -0,0 +1,268 @@
+---
+title: Firefox OS 模擬器簡易攻略
+slug: Archive/B2G_OS/Simulator/Simulator_Walkthrough
+translation_of: Archive/B2G_OS/Simulator/Simulator_Walkthrough
+---
+<p>這裡將透過 <a href="https://developer.mozilla.org/en-US/docs/Tools/Firefox_OS_Simulator" title="/en-US/docs/Tools/Firefox_OS_Simulator">Firefox OS 模擬器 (Firefox OS Simulator)</a> 對 Web Apps 進行很簡單的除錯 (但要找的 bug 有點多)。</p>
+<p>整個簡易攻略分成 6 個部分,各自使用不同的診斷/除錯工具,包含 <a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator/Simulator_Walkthrough#manifest_.E6.AA.A2.E9.A9.97.E5.8A.9F.E8.83.BD" title="#Using-manifest-validation">manifest 檢驗功能</a>、<a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator/Simulator_Walkthrough#.E4.BD.BF.E7.94.A8.E7.B6.B2.E9.A0.81.E4.B8.BB.E6.8E.A7.E5.8F.B0_(Web_Console)">網頁主控台 (Web Console)</a>、<a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator/Simulator_Walkthrough#.E4.BD.BF.E7.94.A8_JavaScript_.E9.99.A4.E9.8C.AF.E5.99.A8_(JavaScript_Debugger)" title="#Using-the-JavaScript-Debugger">JavaScript 除錯器 (JavaScript Debugger)</a>、<a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator/Simulator_Walkthrough#.E4.BD.BF.E7.94.A8.E7.B6.B2.E8.B7.AF.E7.9B.A3.E6.B8.AC.E5.99.A8_(Network_Monitor)" title="#Using-the-NetworkMonitor">網路監測器 (Network Monitor)</a>、<a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator/Simulator_Walkthrough#.E4.BD.BF.E7.94.A8.E6.A8.A3.E5.BC.8F.E7.B7.A8.E8.BC.AF.E5.99.A8_(Style_Editor)" title="#Using-the-StyleEditor">樣式編輯器 (Style Editor)</a>、<a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator/Simulator_Walkthrough#.E4.BD.BF.E7.94.A8.E6.94.B6.E6.93.9A_(Receipts)_.E6.B8.AC.E8.A9.A6.E5.8A.9F.E8.83.BD" title="#Using-the-TestReceipts">收據 (Receipts) 測試</a>。</p>
+<p>這 6 個部分各自獨立。就算你只挑其中幾段來看,應該也能看得懂而不會有銜接上的問題。</p>
+<h3 id="manifest_檢驗功能"><a name="Using-manifest-validation">manifest 檢驗功能</a></h3>
+<div class="note">
+ <p>GitHub 上的 <a href="https://github.com/rpl/firefoxos-simulator-walkthrough" title="https://github.com/rpl/firefoxos-simulator-walkthrough">firefoxos-simulator-walkthrough</a> 現有不同版本的 App。如果你想從第一段開始了解 App 的修正程序,可從 App 的 <a href="https://github.com/rpl/firefoxos-simulator-walkthrough/tree/master/whereami-1" title="https://github.com/rpl/firefoxos-simulator-walkthrough/tree/master/whereami-1">whereami-1</a> 版本著手,逐步完成此攻略。</p>
+ <p>這個 App 只會顯示 1 個「Where am I?」按鈕。只要點擊按鈕,則 App 就會透過 Geolocation API 取得使用者目前的位置,並於地圖上顯示。</p>
+ <p>此處假設你<a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator#.E5.AE.89.E8.A3.9D.E6.A8.A1.E6.93.AC.E5.99.A8.E9.99.84.E5.8A.A0.E5.85.83.E4.BB.B6" title="/en-US/docs/Tools/Firefox_OS_Simulator#Installing_the_Simulator_add-on">已經安裝了 Firefox OS 模擬器 (Firefox OS Simulator)</a>,並開啟了 Dashboard。</p>
+</div>
+<p>首先我們點選「<strong>Add Directory</strong>」,將 App 新增至 Dashboard 中,再選擇 manifest 檔案。畫面如下:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5529/manifest-error-collapsed-4.0.png" style="width: 1044px; height: 680px;"><br>
+ <br>
+ 點選「<strong>(2 errors and 0 warnings)</strong><strong>」就會看到:</strong></p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5531/manifest-error-expanded-4.0.png" style="width: 1044px; height: 680px;"><br>
+ 畫面將清楚顯示錯誤訊息。此時看到「<strong>manifest.webapp</strong>」就會發現少了 1 組「<strong>name</strong><strong>」:</strong></p>
+<pre>{
+  "description": "A simple web app",
+  "launch_path": "/index.html",
+  "icons": {
+    "128": "/style/icons/earth.png"
+  }
+}</pre>
+<p><br>
+ 我們把「<strong>name</strong>」欄位加入 manifest 檔案之後儲存,再點選 Dashboard 中的「<strong>Refresh</strong>」:</p>
+<pre>{
+  "name": "Where am I?",
+  "description": "A simple web app",
+  "launch_path": "/index.html",
+  "icons": {
+    "128": "/style/icons/earth.png"
+  }
+}</pre>
+<p><br>
+ 此時 Dashboard 應該會告知沒有錯誤,也就能執行 App:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5533/whereami-no-map-4.0.png" style="width: 1044px; height: 478px;"></p>
+<p>但這時就算你按下按鈕,模擬器也不會有任何動作。我們會在下一段中使用 WebConsole 診斷此問題。</p>
+<h3 id="使用網頁主控台_(Web_Console)"><a name="Using-the-WebConsole">使用網頁主控台 (Web Console)</a></h3>
+<div class="note">
+ <p><strong>如果你要從這裡開始研讀攻略:</strong></p>
+ <p>這一段將透過 <a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator" title="/en-US/docs/Tools/Firefox_OS_Simulator">Firefox OS 模擬器 (Firefox OS Simulator)</a>,對很簡單的 Web App 進行除錯。GitHub 上的 <a href="https://github.com/rpl/firefoxos-simulator-walkthrough" title="https://github.com/rpl/firefoxos-simulator-walkthrough">firefoxos-simulator-walkthrough</a> 已有不同版本的 App。如果你想從本段開始了解 App 的修正程序,可從 App 的 <a href="https://github.com/rpl/firefoxos-simulator-walkthrough/tree/master/whereami-2" title="https://github.com/rpl/firefoxos-simulator-walkthrough/tree/master/whereami-2">whereami-2</a> 版本著手,逐步完成此攻略。</p>
+ <p>這個 App 只會顯示 1 個「Where am I?」按鈕。只要點擊按鈕,則 App 就會透過 Geolocation API 取得使用者目前的位置,並於地圖上顯示。</p>
+ <p>但此版本的 App 不會執行任何作業。本段透過 WebConsole 診斷出問題。</p>
+ 此處假設你<a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator#.E5.AE.89.E8.A3.9D.E6.A8.A1.E6.93.AC.E5.99.A8.E9.99.84.E5.8A.A0.E5.85.83.E4.BB.B6" title="/en-US/docs/Tools/Firefox_OS_Simulator#Installing_the_Simulator_add-on">已經安裝了 Firefox OS 模擬器 (Firefox OS Simulator)</a>、開啟 Dashboard、點選 Dashboard 中的「Add Directory」而新增了 App,並點選 App 的「manifest.webapp」檔案。</div>
+<p>這裡必須按下 Dashboard 上的「<strong>Connect</strong>」按鈕:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5497/connect-to-app-button.png" style="width: 1044px; height: 650px;"></p>
+<p>隨即自動開啟模擬器視窗並執行 App。而 Dashboard 分頁另將出現網頁主控台 (WebConsole)。</p>
+<p>主控台的輸出結果會提示幾項錯誤、警告、訊息。但請注意最後一項:<br>
+ <br>
+ <img alt="" src="https://mdn.mozillademos.org/files/5535/webconsole-whereami-error.png" style="width: 1044px; height: 680px;"><br>
+ <br>
+ 看來是 App 的程式碼「whereami.js」明顯出了問題。這裡列出程式碼的前幾行:</p>
+<pre class="brush: js">var whereami = document.getElementById('whereami');
+
+whereami.onclick = function() {
+  navigator.geolocation.getCurrentPosition(getMap, error);
+};</pre>
+<p><br>
+ 若與 App 的「index.html」相較,則問題明顯是:</p>
+<pre class="brush: html">&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+
+ &lt;head&gt;
+  &lt;meta charset='utf-8'&gt;
+  &lt;script src="http://open.mapquestap.com/sdk/js/v7.0.s/mqa.toolkit.js"&gt;&lt;/script&gt;
+  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt;
+
+ &lt;/head&gt;
+
+ &lt;body&gt;
+  &lt;button id ="where-am-i"&gt;Where am I?&lt;/button&gt;
+  &lt;div id="map"&gt;&lt;/div&gt;
+  &lt;script src="scripts/whereami.js"&gt;&lt;/script&gt;
+  &lt;link media="all" href="style/style.css" type="text/css" rel="stylesheet"&gt;
+ &lt;/body&gt;
+
+&lt;/html&gt;</pre>
+<p><br>
+ 在 HTML 中的按鈕 ID 是「where-am-i」,而不是我們在前面 JavaScript 中所使用的「whereami」。所以我們修改為:</p>
+<pre class="brush: js">var whereami = document.getElementById('where-am-i');
+
+whereami.onclick = function() {
+  navigator.geolocation.getCurrentPosition(getMap, error);
+};</pre>
+<p>接著啟動 App 時雖然沒有問題,但仍未顯示地圖。這時主控台又出現新的訊息:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5537/webconsole-whereami-geolocation-error.png" style="width: 1044px; height: 680px;"></p>
+<p>此訊息是由「whereami.js」程式碼所記錄,指出 Geolocation API 回傳了錯誤,卻沒有說明是哪種錯誤。接著我們可用 JavaScript 除錯器 (JavaScript Debugger) 找出錯誤類型。</p>
+<h3 id="使用_JavaScript_除錯器_(JavaScript_Debugger)"><a name="Using-the-JavaScript-Debugger">使用 JavaScript 除錯器 (JavaScript Debugger)</a></h3>
+<div class="note">
+ <p><strong>如果你要從這裡開始研讀攻略:</strong></p>
+ <p>這一段將透過 <a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator" title="/en-US/docs/Tools/Firefox_OS_Simulator">Firefox OS 模擬器 (Firefox OS Simulator)</a>,對很簡單的 Web App 進行除錯。GitHub 上的 <a href="https://github.com/rpl/firefoxos-simulator-walkthrough" title="https://github.com/rpl/firefoxos-simulator-walkthrough">firefoxos-simulator-walkthrough</a> 已有不同版本的 App。如果你想從本段開始了解 App 的修正程序,可從 App 的 <a href="https://github.com/rpl/firefoxos-simulator-walkthrough/tree/master/whereami-3" title="https://github.com/wbamberg/firefoxos-simulator-walkthrough/tree/master/whereami-1">whereami-3 </a>版本著手,逐步完成此攻略。</p>
+ <p>這個 App 只會顯示 1 個「Where am I?」按鈕。只要點擊按鈕,則 App 就會透過 Geolocation API 取得使用者目前的位置,並於地圖上顯示。</p>
+ <p>此版本 App 的 Geolocation API 將回傳錯誤。所以本段將透過 JavaScript 除錯器 (JavaScript Debugger) 找出到底是哪種問題。</p>
+ <p>此處假設你<a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator#.E5.AE.89.E8.A3.9D.E6.A8.A1.E6.93.AC.E5.99.A8.E9.99.84.E5.8A.A0.E5.85.83.E4.BB.B6" title="/en-US/docs/Tools/Firefox_OS_Simulator#Installing_the_Simulator_add-on">已經安裝了 Firefox OS 模擬器 (Firefox OS Simulator)</a>、開啟 Dashboard、點選 Dashboard 中的「Add Directory」而新增了 App,並點選 App 的「manifest.webapp」檔案。</p>
+</div>
+<p>在連上 App 的網頁主控台 (WebConsole) 中,點選 Geolocation 錯誤記錄的右側鏈結:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5539/webconsole-whereami-geolocation-error-annotated.png" style="width: 1044px; height: 680px;"><br>
+ 按下「<strong>whereami.js:8</strong>」鏈結之後,JavaScript 除錯器隨即自動載入相關檔案並跳到有問題的行數。</p>
+<p>根據<a href="https://developer.mozilla.org/en-US/docs/DOM/window.navigator.geolocation.getCurrentPosition#PositionError" title="/en-US/docs/DOM/window.navigator.geolocation.getCurrentPosition#PositionError">這篇 Geolocation API 參考</a>所述,這裡將由錯誤處理器 (Error handler) 的 <code>error() 屬性送入 </code><code>code</code> 物件<code>,而我們再透過 </code><code>error 物件的</code><code> code</code><code> 屬性</code><code>獲知此特定錯誤的詳細資訊</code>。所以我們點選左側行數為 8 的那一行,即可於 <code>error()</code> 之內設定中斷點:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5541/webconsole-whereami-set-breakpoint.png" style="width: 1044px; height: 680px;"></p>
+<p>在 App 之內點選「<strong>Where am I?</strong>」之後,執行作業就會停在中斷點:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5545/webconsole-whereami-hit-breakpoint.png" style="width: 1044px; height: 680px;"></p>
+<p>此時只要按下「<strong>Add watch expression</strong>」的地方並鍵入「<strong>error.code</strong>」,就會立刻看到其值為「<strong>1</strong>」:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5547/webconsole-whereami-watch.png" style="width: 1044px; height: 680px;"><br>
+ 同樣根據 <a href="https://developer.mozilla.org/en-US/docs/DOM/window.navigator.geolocation.getCurrentPosition#PositionError" title="/en-US/docs/DOM/window.navigator.geolocation.getCurrentPosition#PositionError">Geolocation API 參考文件</a>所述,「1」即代表「權限已遭否決」。如果 Web Apps 尚未請求 <a href="https://developer.mozilla.org/en-US/docs/Apps/App_permissions" title="/en-US/docs/Apps/App_permissions">Geolocation 權限</a>,或使用者尚未許可該權限,都會發生這種錯誤。<br>
+ <br>
+ 這時來看「manifest.webapp」檔案,就會看到我們尚未要求權限:</p>
+<pre>{
+  "name": "Where am I?",
+  "description": "A simple web app",
+  "launch_path": "/index.html",
+  "icons": {
+    "128": "/style/icons/earth.png"
+  }
+}</pre>
+<p><br>
+ 接著修復如下:</p>
+<pre>{
+  "name": "Where am I?",
+  "description": "A simple web app",
+  "launch_path": "/index.html",
+  "icons": {
+    "128": "/style/icons/earth.png"
+  },
+  "permissions": {
+    "geolocation": {
+      "description": "Needed to tell the user where they are"
+      }
+  }
+}</pre>
+<p><br>
+ 儲存「<strong>manifest.webapp</strong>」之後,再按下 Dashboard 中的「<strong>Refresh</strong>」。這裡記得要在除錯器停在中斷點時,才能繼續除錯。而當你點選「Where am I?」,App 隨即會要求你分享你的位置。而你允許分享之後仍看不到地圖,接著又在 WebConsole 中找到新的訊息:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5549/webconsole-whereami-mapquestapi-not-defined.png" style="width: 1044px; height: 680px;"></p>
+<p>此訊息指出 MapQuest API (在 App 中以 script 標籤所指定) 並未正確載入。接著可使用網路監測器 (Network Monitor) 找出問題。</p>
+<h3 id="使用網路監測器_(Network_Monitor)"><a name="Using-the-NetworkMonitor"></a>使用網路監測器 (Network Monitor)</h3>
+<div class="note">
+ <p><strong>如果你要從這裡開始研讀攻略:</strong></p>
+ <p>這一段將透過 <a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator" title="/en-US/docs/Tools/Firefox_OS_Simulator">Firefox OS 模擬器 (Firefox OS Simulator)</a>,對很簡單的 Web App 進行除錯。GitHub 上的 <a href="https://github.com/rpl/firefoxos-simulator-walkthrough" title="https://github.com/rpl/firefoxos-simulator-walkthrough">firefoxos-simulator-walkthrough</a> 已有不同版本的 App。如果你想從本段開始了解 App 的修正程序,可從 App 的 <a href="https://github.com/rpl/firefoxos-simulator-walkthrough/tree/master/whereami-4" title="https://github.com/rpl/firefoxos-simulator-walkthrough/tree/master/whereami-4">whereami-4 </a>版本著手,逐步完成此攻略。</p>
+ <p>這個 App 只會顯示 1 個「Where am I?」按鈕。只要點擊按鈕,則 App 就會透過 Geolocation API 取得使用者目前的位置,並於地圖上顯示。</p>
+ <p>此版本 App 的網頁主控台 (WebConsole) 將顯示「MQA is not defined」錯誤。所以本段將透過網路監測器 (Network Monitor) 找出未載入 MapQuest API 的原因。</p>
+ <p>此處假設你<a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator#.E5.AE.89.E8.A3.9D.E6.A8.A1.E6.93.AC.E5.99.A8.E9.99.84.E5.8A.A0.E5.85.83.E4.BB.B6" title="/en-US/docs/Tools/Firefox_OS_Simulator#Installing_the_Simulator_add-on">已經安裝了 Firefox OS 模擬器 (Firefox OS Simulator)</a>、開啟 Dashboard、點選 Dashboard 中的「Add Directory」而新增了 App,並點選 App 的「manifest.webapp」檔案。</p>
+</div>
+<div class="warning">
+ <p><strong>警告:</strong><a href="https://hacks.mozilla.org/2013/06/network-monitor-now-in-firefox-beta/" title="https://hacks.mozilla.org/2013/06/network-monitor-now-in-firefox-beta/">需 Firefox 23.0 或更高版本才具備網路監測器</a>功能。</p>
+</div>
+<p>在連上 App 的開發者工具中,點選「<strong>Network</strong>」分頁就會看到下列面板。可以看到「<strong>open.mapquestap.com</strong>」網域針對「<strong>mqa.toolkit.js</strong>」資源所發出的請求,從未完全成功過:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5551/network-monitor-timing-panel.png" style="width: 1044px; height: 680px;"></p>
+<p>成功的請求均標記為<strong>綠色</strong>。如果我們點選「<strong>open.mapquestap.com</strong><strong>」</strong>網域 (<strong>深灰色</strong>) 的請求之一,點選「<strong>Timings</strong>」的細節面板,就會看到 DNS 解析 (DNS resolution) 並未成功,因此該請求從未達到「<strong>Connecting</strong>」的狀態。</p>
+<p>再看到「<strong>index.html</strong>」檔案,會發現 script 標籤指向錯誤網域。</p>
+<p>這裡變更 script 標籤以使用正確的網域:<strong>open.mapquestapi.com</strong> (於網域名稱內加入缺少的「i」) 之後,即可修復此錯誤。</p>
+<pre class="brush: html">&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+
+ &lt;head&gt;
+  &lt;meta charset='utf-8'&gt;
+  &lt;script src="<span style="background-color: #ffff00;">http://open.mapquestapi.com/sdk/js/v7.0.s/mqa.toolkit.js</span>"&gt;&lt;/script&gt;
+  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt;
+
+ &lt;/head&gt;
+
+ &lt;body&gt;
+  &lt;button id ="where-am-i"&gt;Where am I?&lt;/button&gt;
+  &lt;div id="map"&gt;&lt;/div&gt;
+  &lt;script src="scripts/whereami.js"&gt;&lt;/script&gt;
+  &lt;link media="all" href="style/style.css" type="text/css" rel="stylesheet"&gt;
+ &lt;/body&gt;
+
+&lt;/html&gt;</pre>
+<p>儲存「<strong>index.html</strong>」並點選 Dashboard 中的「<strong>Refresh</strong>」。在 App 執行時按下「Where am I?」,系統就會要求你分享你的位置。在你允許分享之後,App 終於顯示地圖:<br>
+ <img alt="" src="https://mdn.mozillademos.org/files/5553/whereami-map.png" style="width: 399px; height: 663px;"></p>
+<h3 id="使用樣式編輯器_(Style_Editor)"><a name="Using-the-StyleEditor"></a>使用樣式編輯器 (Style Editor)</h3>
+<div class="note">
+ <p><strong>如果你要從這裡開始研讀攻略:</strong></p>
+ <p>這一段將透過 <a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator" title="/en-US/docs/Tools/Firefox_OS_Simulator">Firefox OS 模擬器 (Firefox OS Simulator)</a> 客製化 App 的樣式表 (Stylesheets)。 GitHub 上的 <a href="https://github.com/rpl/firefoxos-simulator-walkthrough" title="https://github.com/rpl/firefoxos-simulator-walkthrough">firefoxos-simulator-walkthrough</a> 已有不同版本的 App。如果你想從本段開始了解 App 的修正程序,可從 App 的 <a href="https://github.com/rpl/firefoxos-simulator-walkthrough/tree/master/whereami-5" title="https://github.com/rpl/firefoxos-simulator-walkthrough/tree/master/whereami-5">whereami-5</a> 版本著手,逐步完成此攻略。</p>
+ <p>這個 App 只會顯示 1 個「Where am I?」按鈕。只要使用者點擊按鈕,則 App 就會透過 Geolocation API 取得使用者目前的位置,並於地圖上顯示。</p>
+ <p>此版本的 App 已修復前述的所有錯誤。接著我們將透過樣式編輯器 (Style Editor),為執行中的 App 即時變更樣式並儲存之。</p>
+ <p>此處假設你<a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator#.E5.AE.89.E8.A3.9D.E6.A8.A1.E6.93.AC.E5.99.A8.E9.99.84.E5.8A.A0.E5.85.83.E4.BB.B6" title="/en-US/docs/Tools/Firefox_OS_Simulator#Installing_the_Simulator_add-on">已經安裝了 Firefox OS 模擬器 (Firefox OS Simulator)</a>、開啟 Dashboard、點選 Dashboard 中的「Add Directory」而新增了 App,並點選 App 的「manifest.webapp」檔案。</p>
+</div>
+<div class="warning">
+ <p><strong>警告:</strong><a href="https://hacks.mozilla.org/2013/06/network-monitor-now-in-firefox-beta/" title="https://hacks.mozilla.org/2013/06/network-monitor-now-in-firefox-beta/">必須 Firefox 23.0 或更高版本才具備網路監測器</a> (目前 <a href="http://www.mozilla.org/en-US/firefox/beta/" title="http://www.mozilla.org/en-US/firefox/beta/">Firefox Beta 試用版才是 23.0 版</a>)</p>
+</div>
+<p>在連上 App 的開發者工具中,點選「<strong>Style Editor</strong>」分頁就會看到下列面板:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5555/whereami-style-editor.png" style="width: 1044px; height: 536px;"></p>
+<p>點選左側樣式表清單中的「<strong>style/style.css</strong>」,並修改 CSS 規則。新的規則會立刻套用至已連線的 App 上:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5557/whereami-style-editor-changes.png" style="width: 1044px; height: 528px;"></p>
+<p>現在點選樣式表「<strong>style/style.css</strong>」正下方的「<strong>Save</strong>」,即可將之儲存回專案中。</p>
+<h3 id="使用收據_(Receipts)_測試功能"><a name="Using-the-TestReceipts"></a>使用收據 (Receipts) 測試功能</h3>
+<div class="note">
+ <p><strong>如果你要從這裡開始研讀攻略:</strong></p>
+ <p>這一段將透過 <a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator" title="/en-US/docs/Tools/Firefox_OS_Simulator">Firefox OS 模擬器 (Firefox OS Simulator)</a>,為 Web App 新增付款收據驗證碼。GitHub 上的 <a href="https://github.com/rpl/firefoxos-simulator-walkthrough" title="https://github.com/rpl/firefoxos-simulator-walkthrough">firefoxos-simulator-walkthrough</a> 已有不同版本的 App。如果你想從本段開始了解 App 的修正程序,可從 App 的 <a href="https://github.com/rpl/firefoxos-simulator-walkthrough/tree/master/whereami-6" title="https://github.com/rpl/firefoxos-simulator-walkthrough/tree/master/whereami-6">whereami-6</a> 版本著手,逐步完成此攻略。</p>
+ <p>這個 App 只會顯示 1 個「Where am I?」按鈕。只要點擊按鈕,則 App 就會透過 Geolocation API 取得使用者目前的位置,並於地圖上顯示。</p>
+ <p>我們要把此版本 App 變更為付費 Web App。</p>
+ <p>此處假設你<a href="https://developer.mozilla.org/zh-TW/docs/Tools/Firefox_OS_Simulator#.E5.AE.89.E8.A3.9D.E6.A8.A1.E6.93.AC.E5.99.A8.E9.99.84.E5.8A.A0.E5.85.83.E4.BB.B6" title="/en-US/docs/Tools/Firefox_OS_Simulator#Installing_the_Simulator_add-on">已經安裝了 Firefox OS 模擬器 (Firefox OS Simulator)</a>、開啟 Dashboard、點選 Dashboard 中的「Add Directory」而新增了 App,並點選 App 的「manifest.webapp」檔案。</p>
+</div>
+<p>目前你已經將 App 修改為無錯誤的 App,並已擁有合適的樣式。現在可新增付款收據驗證 (Payment Receipt Validation) 功能,確保使用者必須購買此 App。</p>
+<p>Mozilla 另已提供小型的 JavaScript 函式庫,可協助 Apps 檢查自己的收據:<a href="https://github.com/mozilla/receiptverifier" title="https://github.com/mozilla/receiptverifier">http://github.com/mozilla/receiptverifier</a>。</p>
+<p>為 App 新增 receiptverifier (把新的 script 標籤加入「index.html」檔案中):</p>
+<pre class="brush: html">&lt;!DOCTYPE html&gt;
+
+&lt;html&gt;
+
+ &lt;head&gt;
+  &lt;meta charset='utf-8'&gt;
+  <span style="background-color: #ffff00;">&lt;script src="https://raw.github.com/mozilla/receiptverifier/master/receiptverifier.js"&gt;&lt;/script&gt;</span>
+  &lt;script src="http://open.mapquestapi.com/sdk/js/v7.0.s/mqa.toolkit.js"&gt;&lt;/script&gt;
+  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt;
+
+ &lt;/head&gt;
+
+ &lt;body&gt;
+  &lt;button id ="where-am-i"&gt;Where am I?&lt;/button&gt;
+  &lt;div id="map"&gt;&lt;/div&gt;
+  &lt;script src="scripts/whereami.js"&gt;&lt;/script&gt;
+  &lt;link media="all" href="style/style.css" type="text/css" rel="stylesheet"&gt;
+ &lt;/body&gt;
+
+&lt;/html&gt;</pre>
+<p>接著再以「<strong>mozmarket.receipts.Verifier</strong>」API 檢查「<strong>scripts/whereami.js</strong>」中的收據 (將於按下按鈕,或於載入 App 時檢查收據):</p>
+<pre class="brush: js">...
+
+var verifier = new mozmarket.receipts.Verifier({
+  installs_allowed_from: '*',
+  typsAllowed: 'test-receipt',
+  logLevel: mozmarket.receipts.Verifier.levels.DEBUG,
+  onlog: mozmarket.receipts.Verifier.consoleLogger
+});
+verifier.clearCache();
+
+function verifyPaymentReceipts(cb) {
+  verifier.verify(function (verifier) {
+    if (verifier.state instanceof verifier.states.OK) {
+      cb(null); // valid payment
+    } else {
+      cb("invalid-payment"); // invalid payment
+    }
+  });
+  setTimeout(function checkNoReceipts() {
+    if (verifier.state instanceof verifier.states.NoReceipts) {
+      cb("no-receipts");
+    }
+  }, 2000);
+}
+
+whereami.onclick = function() {
+  verifyPaymentReceipts(function (err) {
+    if (err) {
+      alert("Invalid Payment Receipt.");
+    } else {
+      navigator.geolocation.getCurrentPosition(getMap, error);
+    }
+  });
+};
+</pre>
+<p>正常情況需透過 Marketplace 與 Payment 服務,以加密方式簽署收據。但目前可先用模擬器 App 項目中的「<strong>Receipts</strong>」選單,點選所要安裝的收據類型 (預設為「<strong>None</strong>」),即可為 App 安裝測試收據。</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5559/receipts-whereami-menu-annotated.png" style="width: 1044px; height: 742px;"></p>
+<p>現在即可測試 App 具備「<strong>Valid</strong>」、「<strong>Invalid</strong>」、「<strong>Refunded</strong>」收據,或無收據時的行為。另可於網頁主控台觀看「<strong>receiptverifier</strong>」函式庫所產生的記錄,藉以了解相關結果:</p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5561/whereami-receipt-invalid.png" style="width: 1044px; height: 539px;"></p>
+<p><img alt="" src="https://mdn.mozillademos.org/files/5563/whereami-receipt-valid.png" style="width: 1044px; height: 535px;"></p>
+<div class="note">
+ <p><strong>注意:</strong><a href="https://github.com/rpl/firefoxos-simulator-walkthrough/tree/master/whereami-7" title="https://github.com/rpl/firefoxos-simulator-walkthrough/tree/master/whereami-7">whereami-7 </a>版本即為最終完成的 App。</p>
+</div>
+<p> </p>
diff --git a/files/zh-tw/archive/b2g_os/using_the_app_manager/index.html b/files/zh-tw/archive/b2g_os/using_the_app_manager/index.html
new file mode 100644
index 0000000000..8486eeb959
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/using_the_app_manager/index.html
@@ -0,0 +1,259 @@
+---
+title: 應用程式管理員 (App Manager)
+slug: Archive/B2G_OS/Using_the_App_Manager
+translation_of: Archive/B2G_OS/Using_the_App_Manager
+---
+<div class="summary">
+<p>「應用程式管理員 (App Manager)」為 Firefox 桌面版的新工具,具備多樣的有效工具,可透過開發者的瀏覽器,直接於 Firefox OS 手機與 Firefox OS 模擬器 (Firefox OS Simulator) 中進行 HTML5 Web App 的測試、佈署、除錯等作業。</p>
+
+<p>應用程式管理員適用於 Firefox OS 1.2 或更高版本。如果你正為 Firefox OS 1.1 開發 App,則請參閱《<a href="https://developer.mozilla.org/en-US/docs/Tools/Firefox_OS_1.1_Simulator">Firefox OS 1.1 Simulator</a>》一文。</p>
+</div>
+
+<p>{{EmbedYouTube("z1Bxg1UJVf0")}}</p>
+
+<p>應用程式管理員具備下列元件:</p>
+
+<ul>
+ <li><a href="#Apps_panel">「Apps」面板</a>將管理本端 App (即位於你電腦上的 App 原始碼) 與托管 (Hosted) 於外部的 App,讓開發者能在自己的裝置或模擬器上進行封裝與安裝作業,並透過 Toolboxes 除錯。</li>
+ <li><a href="#Device_panel">「Device」面板</a>則顯示已連線裝置的相關資訊,包含 Firefox OS 的版本、所使用裝置 API 的必要權限、已安裝的 App 等。</li>
+ <li><a href="/en-US/docs/Tools_Toolbox">Toolboxes</a> 集合一系列的開發者工具 (網頁主控台、檢測器、除錯器等),將透過 Apps panel 而連上執行中的 App,以利執行除錯作業。</li>
+</ul>
+
+<h2 id="快速設定:"><a name="Configuring_device">快速設定:</a></h2>
+
+<p>本段將協助開發者儘快設定並執行應用程式管理員。如果你需要進一步詳細資訊,則請略過本段文章而直接觀看下一段《裝置與系統設定》。若發生任何問題,亦可參閱本文最後一段《疑難排解》。</p>
+
+<ol>
+ <li>確認已安裝桌面版 Firefox 26 或更高版本</li>
+ <li>開啟應用程式管理員 (可於網址列中鍵入 <code>about:app-manager</code>)</li>
+ <li>若你手上並沒有實際的 Firefox OS 裝置:
+ <ol>
+ <li><a href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/">先安裝 Firefox OS 模擬器 (Firefox OS Simulator)</a></li>
+ <li>在應用程式管理員底部的工具列中,點選 <em>Start Simulator</em> 再點選已安裝的模擬器名稱 (已安裝的模擬器均應出現)。</li>
+ </ol>
+ </li>
+ <li>若你擁有 Firefox OS 實體裝置:
+ <ol>
+ <li>確認目前為 Firefox OS 1.2 或更高版本</li>
+ <li>確認已在視窗系統中安裝該款手機的驅動程式</li>
+ <li>進入裝置的「Settings」,停用「Screen Lock (<code>Settings &gt; <code>Screen Lock</code></code>)」並啟用「Remote Debugging (<code>Settings &gt; Device information &gt; More information &gt; Developer</code>)」</li>
+ <li>另為 Firefox 桌面版<a href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/adb-helper/">安裝 ADB Helper</a> 附加元件</li>
+ <li>使用 USB 纜線銜接裝置與電腦</li>
+ <li>接著應可於應用程式管理員的底部看到裝置名稱,點選該裝置</li>
+ </ol>
+ </li>
+ <li>底部應顯示「Connected to: xxx」</li>
+ <li>點選 Apps panel 並新增 App;封裝式 (Packaged) 或托管式 (Hosted) App 均可</li>
+ <li>Refresh 按鈕將驗證該 App 並安裝於裝置/模擬器中</li>
+ <li>Debug 按鈕則銜接開發者工具與執行中的 App</li>
+ <li>若遇上任何錯誤,可參閱〈疑難排解〉章節</li>
+</ol>
+
+<h2 id="裝置與系統設定">裝置與系統設定</h2>
+
+<p>使用應用程式管理員前的第一件事,就是必須正確設定現有的系統與手機。本段將逐步說明各個步驟。</p>
+
+<h3 id="需要_Firefox_1.2_或更高版本">需要 Firefox 1.2 或更高版本</h3>
+
+<p>確認裝置目前為 Firefox OS 1.2/Boot2Gecko 1.2 或更高版本。若要檢查目前 Firefox OS 版本,可點選 <code>Settings &gt; Device Information &gt; Software</code>。</p>
+
+<p>如果尚未安裝必要的 Firefox OS 版本,則根據手機型號的不同,你可能必須安裝 Firefox 1.2 或更高的 nightly 版本,或自行透過原始碼進行設定與建置 (Build)。</p>
+
+<p>目前可用的建置:</p>
+
+<ul>
+ <li><a href="http://downloads.geeksphone.com/">Geeksphone Keon/Peak builds</a> (若要進一步了解使用方式,可參閱 <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Developer_phone_guide/Updating_and_Tweaking_Geeksphone">Updating and Tweaking your Firefox OS Developer Preview phone/Geeksphone</a>)</li>
+ <li>敬請期待更多後續資訊</li>
+</ul>
+
+<p>若要建構自己的 Firefox OS 1.2 或更高版本,請參閱 <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Building_and_installing_Firefox_OS">Building and installing Firefox OS</a> 說明,並從 <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites">Firefox OS build prerequisites</a> 著手開始。</p>
+
+<h3 id="遠端除錯_(Remote_debugging)">遠端除錯 (Remote debugging)</h3>
+
+<p>接著必須啟動 Firefox OS 中的遠端除錯 (Remote debugging) 功能。點選<code>Settings &gt; Device information &gt; More information &gt; Developer</code>,最後勾選 Remote Debugging 方塊即可。</p>
+
+<h3 id="Adb_Helper_Add-on" name="Adb_Helper_Add-on">ADB 或 ADB helper</h3>
+
+<p>透過 Android Debug Bridge (ADB) 處理裝置與電腦之間的連線作業。現有 2 種 ADB 執行方式:</p>
+
+<ul>
+ <li>
+ <p>讓 Firefox 直接處理 ADB (建議使用)。<a href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/adb-helper/">先安裝 ADB Helper 附加元件</a>可簡化相關流程。安裝 ADB Helper 之後就不需再安裝 ADB,也不需再輸入 <code>adb forward</code> 指令。此附加元件將處理所有作業。</p>
+ <a href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/" style="margin-bottom: 20px; padding: 10px; text-align: center; border-radius: 4px; display: inline-block; background-color: #81BC2E; white-space: nowrap; color: white; text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.25); box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.2), 0px -1px 0px 0px rgba(0, 0, 0, 0.3) inset;" title="https://addons.mozilla.org">下載 ADB Helper 附加元件</a></li>
+ <li>手動操作 ADB。你必須自行下載並安裝 <code>adb</code> (可參閱 <a href="http://developer.android.com/sdk/index.html">Get the Android SDK</a>),再於終端機內鍵入下列指令,以啟動轉發通訊埠 (Port forwarding):
+ <pre>adb forward tcp:6000 localfilesystem:/data/local/debugger-socket</pre>
+ 另請注意,每次只要重新啟動或重新插拔手機,均必須重複上述動作 1 次。</li>
+</ul>
+
+<div class="note">
+<p>注意:只要安裝 ADB Helper 附加元件,就不需執行此指令。</p>
+</div>
+
+<h2 id="將裝置連上應用程式管理員">將裝置連上應用程式管理員</h2>
+
+<p>完成所有設定之後,就可將裝置連上電腦並啟動應用程式管理員:</p>
+
+<ol>
+ <li>以 USB 纜線銜接裝置與電腦。</li>
+ <li>進入 <code>Settings &gt; Screen Lock</code> 並取消勾選 <code>Lock Screen</code><code>,以停用裝置的螢幕鎖定功能。一旦螢幕鎖定之後,手機與電腦的連線將隨之中斷,也就無法進行除錯作業。因此最好先停用此功能。</code></li>
+ <li>啟動應用程式管理員 — 到 Firefox 桌面版中點選「工具 (<code>Tools)」&gt;「網頁開發者 (Web Developer)」&gt;「</code>應用程式管理員 (<code>App Manager)」選單;或於網址列中鍵入</code> <code>about:app-manager</code>。</li>
+ <li>應用程式管理員分頁的底部可看到連線狀態顯示列 (如下圖所示)。只要點選「Connect to localhost:6000」按鈕即可連線裝置。</li>
+ <li>若連線成功,裝置畫面隨即出現「An incoming request to permit remote debugging connection was detected. Allow connection?」對話框。按下「OK」鈕 (你可能必須按下手機的電源鍵,才會看到該對話框)。接著應會更新連線狀態列並顯示「Connected to B2G」。此時也將出現「Disconnect」按鈕,以利隨時中斷連線。</li>
+</ol>
+
+<p><img alt="" src="https://mdn.mozillademos.org/files/6263/connection-status.png" style="width: 600px; height: 30px; display: block; margin: 0px auto;"></p>
+
+<div class="note">
+<p>另請注意,位於連線狀態列中的其他控制鈕,可讓你銜接模擬器與應用程式管理員 (將於下一段中說明),並更改連線所使用的通訊埠。若要更改通訊埠,則必須啟動該通訊埠的「轉發通訊埠 (Port forwarding)」功能。可參閱上述的<a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Using_the_App_Manager#Enable_port_forwarding">啟動轉發通訊埠</a>。</p>
+</div>
+
+<h2 id="使用_Firefox_OS_Simulator_附加元件"><a name="Simulator">使用 Firefox OS Simulator 附加元件</a></h2>
+
+<p>如果你手上還沒有實際的 Firefox OS 裝置可搭配 App Manager,也能透過 Firefox OS 模擬器 (Firefox OS Simulator) 附加元件體驗應用程式管理員。請先為自己的作業系統安裝合適的模擬器:</p>
+
+<p><a href="https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/" style="margin-bottom: 20px; padding: 10px; text-align: center; border-radius: 4px; display: inline-block; background-color: #81BC2E; white-space: nowrap; color: white; text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.25); box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.2), 0px -1px 0px 0px rgba(0, 0, 0, 0.3) inset;">安裝 Firefox OS 模擬器</a></p>
+
+<div class="note">
+<p><strong>注意:</strong>目前僅有 Firefox OS 1.2 模擬器。未來將提供更多版本選擇。</p>
+</div>
+
+<p>安裝模擬器之後,請透過 about:app-manager 找到應用程式管理員分頁底部的連線狀態列,點選「Start simulator」按鈕。接著將出現至少 3 組按鈕:</p>
+
+<ul>
+ <li>「Firefox OS 1.3」、「Firefox OS 1.2」或類似的呈現方式:左邊按鈕將顯示目前安裝的模擬器版本。點選按鈕即可連線至模擬器。</li>
+ <li>「Add」:中間按鈕則提供本文所提到的模擬器安裝鏈結,讓你新增更多版本的模擬器 (Firefox OS 1.2、Firefox OS 1.3 等)。</li>
+ <li>「Cancel」:右邊按鈕可取消連線。</li>
+</ul>
+
+<div class="note">
+<p><strong>注意:</strong>模擬器 (1.2 與 1.3 版) 目前回報 1 組錯誤的 Gecko user agent 字串:可參閱 {{ Bug("964598") }} 進一步了解。</p>
+</div>
+
+<h2 id="「Apps」面板"><a name="Apps_panel">「Apps」面板</a></h2>
+
+<p>所有要件設定完畢之後,就從「Apps」面板開始了解應用程式管理員的功能吧。先透過 Apps 面板將現有 App 送入裝置中並進行除錯:</p>
+
+<ul>
+ <li>若要安裝本端 App,則請點選「Add Packaged App」按鈕旁的「+」加號按鈕,再從檔案選擇對話框中找到放置該 App 的目錄即可。</li>
+ <li>若要安裝外部的托管式 (Hosted) App,請將該 App manifest 檔案的絕對路徑輸入「Add Hosted App」對話框中,再點選「+」加號按鈕。</li>
+</ul>
+
+<p>視窗右側隨即顯示 App 的相關資訊,如下圖所示:</p>
+
+<p><img alt="" src="https://mdn.mozillademos.org/files/6261/apps-panel.png" style="width: 600px; height: 375px; display: block; margin: 0px auto;"></p>
+
+<h3 id="Manifest_檔案編輯器_(Manifest_Editor)">Manifest 檔案編輯器 (Manifest Editor)</h3>
+
+<p>從 Firefox 28 開始,「Apps」面板即包含編輯器功能,可用於 App 的 manifest 檔案:</p>
+
+<p><img alt="" src="https://mdn.mozillademos.org/files/6613/apps-panel-fx-28.png" style="width: 600px; display: block; margin: 0px auto;"></p>
+
+<h3 id="除錯">除錯</h3>
+
+<p>此時點選「Update」就會更新 (或安裝) 裝置上的 App。點選「Debug」則會連上工具箱,以利直接對程式碼進行除錯:</p>
+
+<p><img alt="" src="https://mdn.mozillademos.org/files/6265/debug.png" style="width: 600px; height: 375px; display: block; margin: 0px auto;"></p>
+
+<div class="note">
+<p><strong>注意:</strong>你可能會玩工具箱玩到上癮 — 快試著修改 DOM、CSS 等。接著就能看到裝置即時反應出更新的效果。相關更新均將儲存於已安裝的 App 程式碼中,下次再開啟裝置中的 App 就能一目了然。</p>
+</div>
+
+<p>若是 Firefox 28 之前的版本,這些工具將顯示於另一個獨立視窗中。從 Firefox 28 開始,這些工具均顯示於應用程式管理員之內的獨立分頁中;就接在「Apps」與「Device」分頁之下。此分頁將顯示目前 App 的圖示,因此極容易辨識:</p>
+
+<p><img alt="" src="https://mdn.mozillademos.org/files/6615/toolbox-fx-28.png" style="width: 600px; height: 375px; display: block; margin: 0px auto;"></p>
+
+<h3 id="錯誤">錯誤</h3>
+
+<p>如果新增 App 失敗 (可能是 URL 錯誤,或選到了封裝式 App 的資料夾),則該頁仍會顯示所新增的 App 項目,也會包含錯誤資訊。</p>
+
+<p><img alt="" src="https://mdn.mozillademos.org/files/6259/apps-error.png" style="width: 600px; height: 375px; display: block; margin: 0px auto;"></p>
+
+<p>另外只要將滑鼠游標移至視窗左邊的 App 名稱/說明之上,在「X」按鈕出現時按下,即可在此畫面中刪除該 App。請注意此動作並不會刪除裝置中的 App。必須從裝置上手動移除 App,才會真正刪除裝置中的 App。</p>
+
+<h2 id="「Device」面板"><a name="Device_panel">「Device」面板</a></h2>
+
+<p>「Device」面板將顯示已連線裝置的相關資訊。另可透過「Installed Apps」視窗中開啟裝置上的 App 並進行除錯。</p>
+
+<p><img alt="" src="https://mdn.mozillademos.org/files/6267/device-tab.png" style="width: 600px; height: 375px; display: block; margin: 0px auto;"></p>
+
+<div class="note">
+<p><strong>注意:</strong>依預設值,此處並不會顯示 Certified App。<a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Using_the_App_Manager#Debugging_Certified_Apps">可參閱 Certified App 的除錯方式</a>。</p>
+</div>
+
+<p>「Permissions」視窗將針對目前裝置上的不同 <a href="https://developer.mozilla.org/zh-TW/docs/WebAPI">Web API</a>,顯示必要的權限。</p>
+
+<p><img alt="" src="https://mdn.mozillademos.org/files/6269/permissions.png" style="width: 600px; height: 375px; display: block; margin: 0px auto;"></p>
+
+<p>最後可按下「Screenshot」按鈕,即可對目前裝置的顯示項目拍下截圖。此截圖將以 Firefox 的新分頁開啟,讓你決定是否要儲存該圖。</p>
+
+<h2 id="Certified_App_的除錯"><a name="Debugging_Certified_Apps">Certified App 的除錯</a></h2>
+
+<p>目前僅限搭載 Firefox OS 1.2 開發版本的裝置,才能進行 Certified Apps 的除錯。若你手上的裝置正執行開發版本,則可將設定檔中的「 <code>devtools.debugger.forbid-certified-apps</code><code>」變更為「</code><code>false</code><code>」,即可開始 </code>Certified App<code> 的除錯。可參閱下列步驟:</code></p>
+
+<ol>
+ <li>
+ <p>在電腦的終端/主控台上輸入下列指令,以進入裝置的 filesystem:</p>
+
+ <pre class="brush: bash">adb shell</pre>
+
+ <p>接著命令列提示將轉為 <code>root@android</code>。</p>
+ </li>
+ <li>
+ <p>接著以下列指令暫停執行 B2G:</p>
+
+ <pre class="brush: bash">stop b2g</pre>
+ </li>
+ <li>
+ <p>進入以下目錄:</p>
+
+ <pre>cd /data/b2g/mozilla/*.default/</pre>
+ </li>
+ <li>
+ <p>以下列指令更改 prefs.js 檔案:</p>
+
+ <pre class="brush: js">echo 'user_pref("devtools.debugger.forbid-certified-apps", false);' &gt;&gt; prefs.js</pre>
+ </li>
+ <li>
+ <p>在完成編輯並儲存檔案之後,再以下列指令重新啟動 B2G:</p>
+
+ <pre class="brush: bash">start b2g</pre>
+ </li>
+ <li>
+ <p>輸入 <code>exit</code> 指令以退出 Android 的 filesystem 之後,就會回到正常的終端畫面。</p>
+ </li>
+ <li>
+ <p>最後再次連回應用程式管理員,就能看到 Certified App 出現,即可進行除錯。</p>
+ </li>
+</ol>
+
+<div class="note">
+<p><strong>注意:</strong>如果你想把這個偏好設定加入自己的 Gaia 版本,則可執行 <code>DEVICE_DEBUG=1 reset-gaia</code></p>
+</div>
+
+<h2 id="在應用程式管理員中執行自訂的版本">在應用程式管理員中執行自訂的版本</h2>
+
+<p>只要透過 Firefox OS 模擬器,即可於應用程式管理員中執行自訂的 B2G Desktop 與 Gaia 版本。可參閱《<a href="https://developer.mozilla.org/en-US/Firefox_OS/Running_custom_builds_in_the_App_Manager">Running custom Firefox OS/Gaia builds in the App Manager</a>》進一步了解。</p>
+
+<h2 id="疑難排解"><a name="Troubleshooting">疑難排解</a></h2>
+
+<p id="My_device_is_not_recognized">如果系統無法辨認裝置:</p>
+
+<ul>
+ <li>請先完整閱讀上方的《裝置與系統設定》段落,確認已完成所有步驟:</li>
+ <li>自己的裝置是否執行 Firefox OS 1.2 或更高版本?</li>
+ <li>是否已啟用手機的「Remote Debugging」設定?</li>
+ <li>如果你尚未使用 <a href="#Adb_Helper_Add-on">ADB Helper 附加元件</a>:
+ <ul>
+ <li>是否已成功執行 <code>adb forward</code> 指令?</li>
+ </ul>
+ </li>
+ <li>如果你正使用 <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Using_the_App_Manager#Adb_Helper_Add-on">ADB Helper 附加元件</a>,但自己的裝置並未出現於底部的工具列中:
+ <ul>
+ <li>如果是使用 Linux,<a href="http://developer.android.com/tools/device.html#setting-up">請確認已正確設定 udev</a></li>
+ <li>如果是使用 Windows,<a href="http://developer.android.com/tools/device.html#setting-up">請確認已安裝正確的驅動程式</a></li>
+ </ul>
+ </li>
+ <li>你手機的螢幕解鎖了嗎?</li>
+</ul>
+
+<p>還是無法讓自己的裝置連上應用程式管理員或啟動模擬器嗎?<a href="https://wiki.mozilla.org/DevTools/GetInvolved#Communication">快讓我們知道</a>或<a href="https://bugzilla.mozilla.org/enter_bug.cgi?alias=&amp;assigned_to=nobody%40mozilla.org&amp;attach_text=&amp;blocked=&amp;bug_file_loc=http%3A%2F%2F&amp;bug_ignored=0&amp;bug_severity=normal&amp;bug_status=NEW&amp;cf_blocking_b2g=---&amp;cf_crash_signature=&amp;cf_status_b2g18=---&amp;cf_status_b2g_1_1_hd=---&amp;cf_status_b2g_1_2=---&amp;cf_status_firefox24=---&amp;cf_status_firefox25=---&amp;cf_status_firefox26=---&amp;cf_status_firefox27=---&amp;cf_status_firefox_esr17=---&amp;cf_status_firefox_esr24=---&amp;cf_tracking_b2g18=---&amp;cf_tracking_firefox24=---&amp;cf_tracking_firefox25=---&amp;cf_tracking_firefox26=---&amp;cf_tracking_firefox27=---&amp;cf_tracking_firefox_esr17=---&amp;cf_tracking_firefox_esr24=---&amp;cf_tracking_firefox_relnote=---&amp;cf_tracking_relnote_b2g=---&amp;comment=&amp;component=Developer%20Tools%3A%20App%20Manager&amp;contenttypeentry=&amp;contenttypemethod=autodetect&amp;contenttypeselection=text%2Fplain&amp;data=&amp;defined_groups=1&amp;dependson=&amp;description=&amp;flag_type-203=X&amp;flag_type-37=X&amp;flag_type-41=X&amp;flag_type-5=X&amp;flag_type-607=X&amp;flag_type-720=X&amp;flag_type-721=X&amp;flag_type-737=X&amp;flag_type-748=X&amp;flag_type-781=X&amp;flag_ty">到 bugzilla 回報錯誤</a>。</p>
diff --git a/files/zh-tw/archive/b2g_os/using_the_b2g_desktop_client/index.html b/files/zh-tw/archive/b2g_os/using_the_b2g_desktop_client/index.html
new file mode 100644
index 0000000000..46fc57a972
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/using_the_b2g_desktop_client/index.html
@@ -0,0 +1,180 @@
+---
+title: 使用 Firefox OS 的電腦桌面 client 程式
+slug: Archive/B2G_OS/Using_the_B2G_desktop_client
+translation_of: Archive/B2G_OS/Building_the_B2G_OS_simulator
+---
+<p>Firefox OS 的 desktop client,也被稱為 <em>B2G desktop client</em>,讓您可以在一個以 Gecko 為基礎的環境-有點類似實際行動裝置的環境下執行 Gaia 和 web apps。它不會模擬行動裝置的硬體,因此它並不適合拿來測試行動裝置的 API,也不能取代在實際硬體上的測試。然而,它的確擁有一些 Firefox 上所沒有 APIs,像是聯絡人(Contacts)和設定(Settings)的 Apis。因此,當我們在開發應用程式、或是在操作 Gaia 使用者介面上可以派上用場。</p>
+
+<p>這篇文章不但涵蓋下載或是建置 Firefox desktop client,也包含了如何使用它。</p>
+
+<h2 id="下載_nightly_版本">下載 nightly 版本</h2>
+
+<p>如同 <a href="http://nightly.mozilla.org" title="http://nightly.mozilla.org">Firefox Nightlies</a> 一般,Firefox OS 的 desktop client 每天都會用最新的原始碼編譯出一個版本。最新的版本將 <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/">可以從 Mozilla FTP 伺服器取得</a>。請確定挑到最新的版本和對的封存給您的作業系統。</p>
+
+<p>我們現在可以略過下面內容,直接到「執行<a href="#Running_the_desktop_client" title="#Running_the_desktop_client"> desktop client</a>」。</p>
+
+<h2 id="建置_desktop_client">建置 desktop client</h2>
+
+<p>我們需要做的地一件事情是架起<a href="/En/Developer_Guide/Build_Instructions#Build_prerequisites" title="En/Developer_Guide/Build_Instructions#Build_prerequisites"> Mozilla 的標準建置環境</a>。一旦我們有了這個環境,我們可以降低我們所需要的原始碼,並且設定建置 Firefox OS 的 desktop client。</p>
+
+<h3 id="第一次下載原始碼">第一次下載原始碼</h3>
+
+<p>在我們要放置程式碼的目錄(資料夾)中,讓我們將包含所有 Gecko 的 <code>mozilla-central</code> 倉儲 (repository)給複製下來。</p>
+
+<pre> hg clone http://hg.mozilla.org/mozilla-central
+</pre>
+
+<h3 id="更新程式碼">更新程式碼</h3>
+
+<p>當我們之後編譯後來的版本時,我們要確定我們有最新的原始碼。下列就是如何拉到最新的更新的指令:</p>
+
+<pre>cd mozilla-central
+hg pull -u
+</pre>
+
+<h3 id="建立_mozconfig">建立 mozconfig</h3>
+
+<p>接著,我們要在 <code>mozilla-central</code> 目錄下新增一個檔案 <code>mozconfig</code> 來設定建置系統去編譯 Boot to Gecko client 程式而不是 Firefox:</p>
+
+<pre>mk_add_options MOZ_OBJDIR=../build
+mk_add_options MOZ_MAKE_FLAGS="-j9 -s"
+
+ac_add_options --enable-application=b2g
+ac_add_options --disable-libjpeg-turbo
+
+# This option is required if you want to be able to run Gaia's tests
+ac_add_options --enable-tests
+
+# turn on mozTelephony/mozSms interfaces
+# Only turn this line on if you actually have a dev phone
+# you want to forward to. If you get crashes at startup,
+# make sure this line is commented.
+#ac_add_options --enable-b2g-ril</pre>
+
+<h3 id="建置(編譯)">建置(編譯)</h3>
+
+<p>現在我們已經準備好要在目錄 <code>mozilla-central</code> 裡面、透過下面的指令來編譯 desktop client。</p>
+
+<pre class="brush: bash language-html"><code class="language-bash">./mach build</code></pre>
+
+<p>編譯好的 client 會被放在 <code>../build/dist </code>目錄下 (基本上是依照 <code>mozconfig </code>檔案裡面的 <code>MOZ_OBJDIR 參數</code>所指定的值)。</p>
+
+<h2 id="執行_desktop_client">執行 desktop client</h2>
+
+<p>預設 desktop client 會顯示空的畫面,因為它並不知道一開始要載入哪個 web app 來當做系統 app。系統 apps 和 Firefox OS 中預設會有的 apps 就被稱為 Gaia。</p>
+
+<h3 id="下載_Gaia">下載 Gaia</h3>
+
+<p>第一次下載 Gaia、讓我們從 GitHub 上複製原始碼的倉儲 (repository):</p>
+
+<pre> git clone https://github.com/mozilla-b2g/gaia</pre>
+
+<p>為了更新成 Gaia 的一個已存在的版本,我們可以從 GitHub 拉最新的更新:</p>
+
+<pre>cd gaia
+git pull
+</pre>
+
+<h3 id="產生_profile">產生 profile</h3>
+
+<p>接著我們需要設定 desktop client 中 Gaia 的 apps。這包括包裝行動裝置上也有的 Gaia apps,以及設定系統 apps 的權限。我們透過產生一個 profile 來做這些事情。接著的指令會做這些事情:新的 profile 包含一個客製的擴充以及其他 B2G 正常運作所需的設定。所以在 <code>gaia</code> 目錄裡執行下面的指令:</p>
+
+<pre>cd gaia
+make
+</pre>
+
+<p>這應該會在 <code>gaia </code>目錄下面建立一個 <code>profile</code> 目錄。</p>
+
+<h3 id="在_Linux_上執行">在 Linux 上執行</h3>
+
+<p>只要在啟動 <code>b2g</code> 執行檔的時候加上 profile 參數,就可以使用我們剛剛產生的 profile 來啟動 desktop client 。如果是自己編譯的話,執行檔的位置會在早先下載下來的 tarball 裡面,如果是自己編譯的話,就會在 <code>../build/dist/bin 的目錄裡。</code></p>
+
+<pre>.../b2g -profile gaia/profile
+</pre>
+
+<p>您可能會碰到惱人的 rendering 問題。只要在 <code>gaia/profile/prefs.js</code> 裡面加上下面這行就可以避開這個問題:</p>
+
+<pre>user_pref("layers.acceleration.disabled", true);
+</pre>
+
+<h3 id="在_Mac_上執行">在 Mac 上執行</h3>
+
+<p>在 Mac 上,<code>b2g 執行檔的位置和需要指定 profile 的絕對路徑,因此指令比較複雜:</code></p>
+
+<pre>.../B2G.app/Contents/MacOS/b2g -profile /full/path/to/gaia/profile
+</pre>
+
+<h2 id="指令的選項(或參數)">指令的選項(或參數)</h2>
+
+<p>在使用 desktop client 時,你可以使用一些指令的參數來調校執行時的體驗。您可以用 <code>-help</code> 這個參數來列出參數的列表。這一節涵蓋一些特別的參數。</p>
+
+<h3 id="option-screen" name="option-screen">明確指定螢幕大小</h3>
+
+<p>您可以用 <code>--screen</code> 來指定您想要模擬的行動裝置的螢幕大小:</p>
+
+<pre>b2g --screen=<em>&lt;width&gt;</em>x<em>&lt;height&gt;</em>[@<em>&lt;dpi&gt;</em>]</pre>
+
+<p><em>&lt;width&gt;</em>, <em>&lt;height&gt;</em>, and <em>&lt;dpi&gt;</em> 都是相當不用解釋的參數:行動裝置以 pixels 為單位的長和寬以及 DPI 解析度。舉例來說:</p>
+
+<pre>b2g --screen=320x480
+b2g --screen=320x480@160
+</pre>
+
+<p>或者,您可以使用某些行動裝置的名字來模擬他們的螢幕大小和解析度:</p>
+
+<ul>
+ <li><code>iphone</code></li>
+ <li><code>ipad</code></li>
+ <li><code>nexus_s</code></li>
+ <li><code>galaxy_nexus</code></li>
+ <li><code>galaxy_tab</code></li>
+ <li><code>wildfire</code></li>
+ <li><code>tattoo</code></li>
+ <li><code>salsa</code></li>
+ <li><code>chacha</code></li>
+</ul>
+
+<h3 id="option-console" name="option-console">開啟 JavaScript console</h3>
+
+<p>在您開啟 B2G 的 desktop client 時,您可以藉由加上 <code>-jsconsole</code> 這個記號來開啟<br>
+ JavaSCript console。在編譯之後,只要:</p>
+
+<pre>.../b2g -jsconsole -profile <em>/path/to/your/profile</em></pre>
+
+<p>如果您已經在 Mac 上安裝了 nightly 版本的話,您可以照著下面的指令:</p>
+
+<pre>/Applications/B2G.app/Contents/MacOS/b2g -jsconsole -profile <em>/path/to/your/profile</em></pre>
+
+<h3 id="option-runapp" name="option-runapp">在 B2G 啟動時,指定開啟一個應用程式</h3>
+
+<p>您現在可以指定一個應用程式在 b2g desktop client 開始運作時,自動執行起來。這會在其他系統程式被掛載起來之後,馬上讓指定的應用程式被執行起來。只要加上 <code>--runapp</code> 這個參數、後面在加上要執行應用程式的名字,就可以做到了。如下:</p>
+
+<pre> .../b2g -profile <em>/path/to/your/gaia/profile</em> --runapp email</pre>
+
+<p>在尋找要執行的 app 之前,指定的名字要被正規化為全部小寫、且不能帶有 - 和空白的符號。接著這個正規化過的名字會被拿來和 app 的 manifest 的名字做比較。</p>
+
+<p>舉例來說,現在 email app 的名字是「E-mail」,但是因為正規化的效果, <code>--runapp</code> <code>email</code> 這個參數是 ok<u> 且</u>可以執行的。</p>
+
+<p>如果您加了 <code>--runapp</code> 參數但是卻沒有帶後面的 app 名字、或是帶了空的名字的話,b2g client 會列出一串列表,其中包括已知的應用程式和簡短的使用訊息。</p>
+
+<div class="note">
+<p><strong>Note:</strong> 用 <code>--runapp</code> 參數會有關閉螢幕鎖的副作用,且不會再度啟用螢幕鎖。這是假設您不會用這個指令加上 profile 來測試螢幕鎖,否則您會重新打開這個選項。如果這個行為會造成問題的話,也歡迎提供 patch 來改變這個它。</p>
+</div>
+
+<h2 id="Usage_tips">Usage tips</h2>
+
+<p>這一節提供一些在使用 B2G desktop client 時,有幫助的技巧。</p>
+
+<ul>
+ <li>ESC 鍵提供了和 "back" 一樣的功能。</li>
+ <li>Home 鍵提供了和 "home" 按鈕一樣的功能;如果您用的是 Mac 的話,Home 鍵是 Fn+← (Fn + 左鍵)。</li>
+</ul>
+
+<h2 id="Next_steps">Next steps</h2>
+
+<p>現在您有一個執行 Boot to Gecko 的 desktop 版本了,您可以在上面測試、開發以及做其他事情:</p>
+
+<ul>
+ <li><a href="/en/Mozilla/Boot_to_Gecko/Debugging_on_Boot_to_Gecko" title="en/Mozilla/Boot_to_Gecko/Debugging_on_Boot_to_Gecko">在 Boot to Gecko 上除錯</a></li>
+ <li><a href="/en/Mozilla/Boot_to_Gecko/Testing_Boot_to_Gecko" title="en/Mozilla/Boot_to_Gecko/Testing_Boot_to_Gecko">測試 Boot to Gecko</a></li>
+</ul>
diff --git a/files/zh-tw/archive/b2g_os/using_the_b2g_emulators/index.html b/files/zh-tw/archive/b2g_os/using_the_b2g_emulators/index.html
new file mode 100644
index 0000000000..6dccacbe06
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/using_the_b2g_emulators/index.html
@@ -0,0 +1,69 @@
+---
+title: 使用 B2G 模擬器
+slug: Archive/B2G_OS/Using_the_B2G_emulators
+translation_of: Archive/B2G_OS/Using_the_B2G_emulators
+---
+<p>這篇文章提供簡潔的指南,包括使用 Boot to Gecko 模擬器時需要知道的一些重要的事情。這不意味著這是一個完整的使用手冊;相反地,它只告訴您一些有用的事情,讓您不必自己去學。</p>
+<p>這篇指南假設您已經編譯了一個模擬器;如果您還沒編譯的話,請跳回「<a href="/en/Mozilla/Boot_to_Gecko/Building_and_installing_Boot_to_Gecko" title="en/Mozilla/Boot_to_Gecko/Building_and_installing_Boot_to_Gecko">建置和安裝 Boot to Gecko</a>」!</p>
+<h2 id="關於_B2G_模擬器">關於 B2G 模擬器</h2>
+<p>有兩種 B2G 模擬器。第一種是 x86 行動裝置的模擬器,使用 "emulator-x86" 設定以 <code>config.sh</code> 編譯而成。雖然這遠比模擬 ARM 處理器快多了,但是它執行的沒有那麼接近一個實體行動裝置的結果。而第二種則是 ARM 行動裝置的模擬器,使用 "emulator" 的設定編譯。</p>
+<p>一旦你選擇、設定及編譯模擬器,就使用者而言,剩下來要做的事情都是一樣的,所以這篇導覽剩下的共同部分是兩種模擬器都適用的。</p>
+<div class="note">
+ <strong>Note:</strong> 在 Mac OS X 上,B2G 模擬器需要 Core 2 Duo 或更快 CPU;也就是說,一個相容於 Mac OS X 10.7 "Lion" 的系統。你不必一定得使用 Lion,只是要在和 Lion 相容的系統上面執行就可以了。</div>
+<h2 id="啟動模擬器">啟動模擬器</h2>
+<p>執行下列指令,就可以打開 B2G 模擬器了:</p>
+<pre>./run-emulator.sh
+</pre>
+<p>這個指令將會會您操作所有模擬器的起始作業。現在就耐心等模擬器啟動以及 Boot to Gecko 在上面開始運作起來。啟動會花好幾分鐘,所以請耐心等候。</p>
+<h2 id="當模擬器掛了">當模擬器掛了</h2>
+<p>有時候模擬器會啟動失敗。歡迎來到尖端科技的前緣。這裡有一些派的上用場的技巧,可用來解決問題。</p>
+<h3 id="確定_adb_server_是不是還活著">確定 adb server 是不是還活著</h3>
+<p>adb server 處理與模擬的行動裝置之間的互動,而這裡常常出問題的原因是 adb server 不是沒在執行就是故障。</p>
+<div class="note">
+ <p><strong>Note:</strong> 舉例來說,如果您使用 B2G 版本所編譯出的 <code>adb</code> 的話,它的位置會在 <code>$B2G/out/host/&lt;platform&gt;/bin</code> 目錄裡。在 Mac 上的話,則是在 <code>$B2G/out/host/darwin-x86/bin</code> 目錄下。</p>
+</div>
+<p>使用下列指令來看 <code>adb</code> 是否還在運作中:</p>
+<pre>ps aux | grep adb
+</pre>
+<p>If it's there, do this to kill it, because it's probably not working correctly.</p>
+<pre>adb kill-server
+</pre>
+<p>If it's not there, do this:</p>
+<pre>adb start-server
+</pre>
+<p>接著試試看再執行模擬器一次看看。如果還是沒辦法運作的話, 就是時候到 irc.mozilla.org 使用 <a class="link-irc" href="irc://irc.mozilla.org/b2g" title="irc://irc.mozilla.org/b2g">#b2g</a> 搜尋尋求幫助了。</p>
+<h3 id="抹掉_configuration_設定值">抹掉 configuration 設定值</h3>
+<p>有時候,在模擬的行動裝置上使用過期的設定檔的設定值也會讓它暴走。你可以砍掉 indexedDB 資料庫來解決這個問題,如下:</p>
+<ol>
+ <li>確定 adb 在執行中,如同 <a href="#Make_sure_the_adb_server_is_running">Make sure the adb server is running</a> 中所描述的一般。</li>
+ <li>啟動模擬器。</li>
+ <li>先打開電腦裡的 terminal,然後切換到編譯模擬器的主目錄 (root code build directory),接著打:「<code>out/host/&lt;platform&gt;/bin/adb -e shell</code>」;在 Mac 上使用「<code>out/host/darwin-x86/bin/adb -e shell</code>」。</li>
+ <li>現在你已經在 adb 的 shell 裡面、且可以直接在模擬器的行動 裝置上執行 shell 指令 (commands)了。讓我們使用「<code>stop b2g</code>」來停止裝置上的 B2G。</li>
+ <li>刪除 indexedDB 資料庫:<code>rm -rf /data/local/indexedDB</code>。</li>
+ <li>在模擬的行動裝置上重新啟動 B2G:<code>start b2g</code>。</li>
+</ol>
+<p>希望此時您所打開 Gaia 介面一切都恢復正常。</p>
+<h2 id="設定模擬器">設定模擬器</h2>
+<p>如果您想要調整模擬器更接近您想要模擬的裝置的話,有幾個選項可以改改看。這一節提供一些關於「如何調校」的基本資訊。您可以編輯 <code>run-emulator.sh</code> (觀念上還是複製一份來編輯)這個 script 來調校模擬器的設定。這裡指會討論到一些最常用到的參數;您可以 <a class="external" href="http://www.qemu.org/" title="http://www.qemu.org/">連到 qemu 網站</a> 來看其他部分的細節。</p>
+<div class="note">
+ <strong>Tip:</strong> 您可以為每個想要模擬的裝置建立一個 <code>run-emulator.sh 的</code>複製版本;這會您比較容易以不同的設定啟動模擬器。</div>
+<h3 id="改變外觀">改變外觀</h3>
+<p>模擬器預設會以 HVGA 模式啟動;VGA 的一半、也就是 320x480 pixels 的外觀。在啟動時,我們可以給模擬器加上 -skin 的參數來指定外觀。您可以編輯 <code>run-emulator.sh 來</code>切換成不同的顯示模式來執行模擬器。可以使用的外觀列表如下:</p>
+<ul>
+ <li>HVGA (320x480)</li>
+ <li>QVGA (240x320)</li>
+ <li>WQVGA (240x400)</li>
+ <li>WQVGA432 (240x432)</li>
+ <li>WSVGA (1024x600)</li>
+ <li>WVGA800 (480x800)</li>
+ <li>WVGA854 (480x854)</li>
+ <li>WXGA720 (1280x720)</li>
+ <li>WXGA800 (1280x800)</li>
+</ul>
+<p>外觀的存放位置在 <code>B2G/development/tools/emulator/skins</code> 目錄。外觀的格式很簡單;如果您打開來看的話,他們只是一些資料夾,裝著一些使用者介面物件的 PNG 檔案以及一個描述使用者介面的配置及螢幕區域的文字檔 <code>layout。如果需要建立客製化的外觀的話,是還蠻簡單的。</code></p>
+<h3 id="改變記憶體的大小">改變記憶體的大小</h3>
+<p>另一個您可能想要/需要改變的選項就是行動裝置的記憶體大小。預設是 512MB;然而,如果您要模擬的行動裝置的記憶體比較大或小的話,或許對您而言,將記憶體調整成一樣的大小是很重要的,這樣才能確定您的 app 會在您想要執行的基礎裝置上執行。您可以將 <code>-memory</code> 參數的數值修改成您需要的數字(以 MB 為單位),就可以改變執行時的記憶體大小。除了預設的 512MB 之外,您可能會想要以 256MB 和 1024MB 來做測試。</p>
+<p>而如果想要改變模擬裝置的儲存容量大小的話 (就是 local 資料的儲存空間,像是行動電話的內建快閃記憶體或是電腦的硬碟),可以改變 <code>-partition-size</code> 參數的數值。預設是 512MB,但是您可以改成任何大小 (以 MB 為單位)來模擬想要測試的行動裝置。</p>
+<h3 id="網路連線">網路連線</h3>
+<p>如果因為某些原因,您沒辦法將您的模擬器連上網際網路 (internet)的話,您可以從命令提示字元來執行下面的指令 (commandline):</p>
+<pre>adb shell setprop net.dns1 10.0.2.3</pre>
diff --git a/files/zh-tw/archive/b2g_os/web_telephony_api/index.html b/files/zh-tw/archive/b2g_os/web_telephony_api/index.html
new file mode 100644
index 0000000000..c9e0c9516b
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/web_telephony_api/index.html
@@ -0,0 +1,25 @@
+---
+title: Web Telephony
+slug: Archive/B2G_OS/Web_Telephony_API
+translation_of: Archive/B2G_OS/Web_Telephony_API
+---
+<p>WebTelephony API 可透過 JavaScript 程式碼,讓網頁內容處理一般音訊電話。</p>
+<p>透過 <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.mozTelephony" title="Returns a Telephony object you can use to initiate and control telephone calls from the browser."><code>window.navigator.mozTelephony</code></a> 即可存取此 API。另請參閱下列的完整介面列表:</p>
+<h2 id="DOM_介面">DOM 介面</h2>
+<ul>
+ <li>{{domxref("window.navigator.mozTelephony")}}</li>
+ <li><a href="/en-US/docs/Web/API/Telephony"><code>Telephony</code></a></li>
+ <li><a href="/en-US/docs/Web/API/TelephonyCall"><code>TelephonyCall</code></a></li>
+ <li><a href="/en-US/docs/Web/API/CallEvent"><code>CallEvent</code></a></li>
+</ul>
+<h2 id="範例程式碼與介紹">範例程式碼與介紹</h2>
+<div>
+ <ul>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/Telephony/Introduction_to_WebTelephony">WebTelephony 介紹</a></li>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Web/Guide/Telephony/Using_the_Telephony_API">使用 Telephony API</a></li>
+ </ul>
+</div>
+<h2 id="另可參閱">另可參閱</h2>
+<ul>
+ <li><a class="link-https" href="https://wiki.mozilla.org/WebAPI/WebTelephony">WebTelephony API</a> (設計文件)</li>
+</ul>
diff --git a/files/zh-tw/archive/b2g_os/writing_apps_for_boot_to_gecko/index.html b/files/zh-tw/archive/b2g_os/writing_apps_for_boot_to_gecko/index.html
new file mode 100644
index 0000000000..a38efda16e
--- /dev/null
+++ b/files/zh-tw/archive/b2g_os/writing_apps_for_boot_to_gecko/index.html
@@ -0,0 +1,12 @@
+---
+title: 寫 Boot to Gecko 的 apps
+slug: Archive/B2G_OS/Writing_apps_for_Boot_to_Gecko
+translation_of: Archive/B2G_OS/Firefox_OS_apps/Building_apps_for_Firefox_OS
+---
+<p>B2G apps 不外乎是安裝於 B2G 手機的 <a href="/en/Apps" title="https://developer.mozilla.org/en/Apps">Open Web apps</a>。</p>
+<ul>
+ <li><a href="/en/Apps/Getting_Started" title="Getting started with making apps">從製作 apps 開始上手</a>。</li>
+ <li><a href="/en/Mozilla/Boot_to_Gecko/Writing_a_web_app_for_B2G" title="Writing a web app">寫一個 B2G 的 Web app。</a></li>
+</ul>
+<div class="note">
+ <strong>Note:</strong> B2G 現在和 Fennec 用相同的 UA (User Agent) 來分辨。例如:"Mozilla/5.0 (Android; Mobile; rv:15.0) Gecko/15.0 Firefox/15.0a1".</div>