From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/ko/archive/b2g_os/api/camera_api/index.html | 38 ++ .../b2g_os/api/camera_api/introduction/index.html | 247 ++++++++++ files/ko/archive/b2g_os/api/index.html | 120 +++++ files/ko/archive/b2g_os/api/tcpsocket/index.html | 102 ++++ .../b2g_os/application_development/index.html | 12 + files/ko/archive/b2g_os/apps/index.html | 57 +++ .../writing_a_web_app_for_firefox_os/index.html | 25 + .../ko/archive/b2g_os/automated_testing/index.html | 84 ++++ files/ko/archive/b2g_os/building/index.html | 125 +++++ .../building_and_installing_firefox_os/index.html | 49 ++ .../debugging/debugging_b2g_using_gdb/index.html | 153 ++++++ files/ko/archive/b2g_os/debugging/index.html | 84 ++++ .../index.html | 79 +++ files/ko/archive/b2g_os/firefox_os_apps/index.html | 85 ++++ .../b2g_os/firefox_os_apps/localization/index.html | 92 ++++ .../firefox_os_build_prerequisites/index.html | 267 +++++++++++ files/ko/archive/b2g_os/firefox_os_faq/index.html | 39 ++ files/ko/archive/b2g_os/index.html | 181 +++++++ .../installing_on_a_mobile_device/index.html | 61 +++ files/ko/archive/b2g_os/introduction/index.html | 83 ++++ files/ko/archive/b2g_os/pandaboard/index.html | 36 ++ files/ko/archive/b2g_os/phone_guide/index.html | 6 + .../b2g_os/platform/architecture/index.html | 532 +++++++++++++++++++++ files/ko/archive/b2g_os/platform/gonk/index.html | 103 ++++ files/ko/archive/b2g_os/platform/index.html | 99 ++++ files/ko/archive/b2g_os/porting/index.html | 121 +++++ .../preparing_for_your_first_b2g_build/index.html | 148 ++++++ files/ko/archive/b2g_os/quickstart/index.html | 49 ++ .../quickstart/intro_to_firefox_os/index.html | 14 + .../quickstart/intro_to_open_web_apps/index.html | 53 ++ files/ko/archive/b2g_os/security/index.html | 58 +++ .../index.html" | 253 ++++++++++ files/ko/archive/b2g_os/simulator/index.html | 280 +++++++++++ .../b2g_os/\354\204\261\353\212\245/index.html" | 146 ++++++ .../index.html" | 247 ++++++++++ 35 files changed, 4128 insertions(+) create mode 100644 files/ko/archive/b2g_os/api/camera_api/index.html create mode 100644 files/ko/archive/b2g_os/api/camera_api/introduction/index.html create mode 100644 files/ko/archive/b2g_os/api/index.html create mode 100644 files/ko/archive/b2g_os/api/tcpsocket/index.html create mode 100644 files/ko/archive/b2g_os/application_development/index.html create mode 100644 files/ko/archive/b2g_os/apps/index.html create mode 100644 files/ko/archive/b2g_os/apps/writing_a_web_app_for_firefox_os/index.html create mode 100644 files/ko/archive/b2g_os/automated_testing/index.html create mode 100644 files/ko/archive/b2g_os/building/index.html create mode 100644 files/ko/archive/b2g_os/building_and_installing_firefox_os/index.html create mode 100644 files/ko/archive/b2g_os/debugging/debugging_b2g_using_gdb/index.html create mode 100644 files/ko/archive/b2g_os/debugging/index.html create mode 100644 files/ko/archive/b2g_os/dual_boot_of_b2g_and_android_on_sgs2/index.html create mode 100644 files/ko/archive/b2g_os/firefox_os_apps/index.html create mode 100644 files/ko/archive/b2g_os/firefox_os_apps/localization/index.html create mode 100644 files/ko/archive/b2g_os/firefox_os_build_prerequisites/index.html create mode 100644 files/ko/archive/b2g_os/firefox_os_faq/index.html create mode 100644 files/ko/archive/b2g_os/index.html create mode 100644 files/ko/archive/b2g_os/installing_on_a_mobile_device/index.html create mode 100644 files/ko/archive/b2g_os/introduction/index.html create mode 100644 files/ko/archive/b2g_os/pandaboard/index.html create mode 100644 files/ko/archive/b2g_os/phone_guide/index.html create mode 100644 files/ko/archive/b2g_os/platform/architecture/index.html create mode 100644 files/ko/archive/b2g_os/platform/gonk/index.html create mode 100644 files/ko/archive/b2g_os/platform/index.html create mode 100644 files/ko/archive/b2g_os/porting/index.html create mode 100644 files/ko/archive/b2g_os/preparing_for_your_first_b2g_build/index.html create mode 100644 files/ko/archive/b2g_os/quickstart/index.html create mode 100644 files/ko/archive/b2g_os/quickstart/intro_to_firefox_os/index.html create mode 100644 files/ko/archive/b2g_os/quickstart/intro_to_open_web_apps/index.html create mode 100644 files/ko/archive/b2g_os/security/index.html create mode 100644 "files/ko/archive/b2g_os/security/\353\263\264\354\225\210_\353\252\250\353\215\270/index.html" create mode 100644 files/ko/archive/b2g_os/simulator/index.html create mode 100644 "files/ko/archive/b2g_os/\354\204\261\353\212\245/index.html" create mode 100644 "files/ko/archive/b2g_os/\354\225\261_\352\264\200\353\246\254\354\236\220_\354\202\254\354\232\251\355\225\230\352\270\260/index.html" (limited to 'files/ko/archive/b2g_os') diff --git a/files/ko/archive/b2g_os/api/camera_api/index.html b/files/ko/archive/b2g_os/api/camera_api/index.html new file mode 100644 index 0000000000..d18716974b --- /dev/null +++ b/files/ko/archive/b2g_os/api/camera_api/index.html @@ -0,0 +1,38 @@ +--- +title: Camera API +slug: Archive/B2G_OS/API/Camera_API +tags: + - API + - Firefox OS + - Graphics + - NeedsTranslation + - Reference + - Référence(2) + - TopicStub + - WebAPI + - camera +translation_of: Archive/B2G_OS/API/Camera_API +--- +

+ +

+

Non-standard
+ This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

+

+ +

The Camera API allows applications to manage the camera of the device. It allows them to take photographs, record videos, and get information like the focus, the zoom, the white balance, the flash, … It is a priviledged API and can only be used by certified applications.

+ +

This API was initially only available to certified applications, but is available to privileged apps on Firefox 2.0 onwards.

+ +
+

Note: Except if you are implementing a replacement for the default Camera application, you shouldn't use this API. Instead, if you want to use the camera in your device, you should use the Web Activities API.

+
+ +

See also

+ + diff --git a/files/ko/archive/b2g_os/api/camera_api/introduction/index.html b/files/ko/archive/b2g_os/api/camera_api/introduction/index.html new file mode 100644 index 0000000000..1ea6d25a38 --- /dev/null +++ b/files/ko/archive/b2g_os/api/camera_api/introduction/index.html @@ -0,0 +1,247 @@ +--- +title: Introduction to the Camera API +slug: Archive/B2G_OS/API/Camera_API/Introduction +translation_of: Archive/B2G_OS/API/Camera_API/Introduction +--- +

+ +

Camera API 를 사용하면 디바이스의 카메라를 이용해 사진을 찍어 현재 웹페이지에 업로드하는것이 가능해집니다. This is achieved through an input element with type="file" and an accept attribute to declare that it accepts images. The HTML looks like this:

+ +
<input type="file" id="take-picture" accept="image/*">
+
+ +

When users choose to activate this HTML element, they are presented with an option to choose a file, where the device's camera is one of the options. If they select the camera, it goes into picture taking mode. After the picture has been taken, the user is presented with a choice to accept or discard it. If accepted, it gets sent to the <input type="file"> element and its onchange event is triggered.

+ +

Get a reference to the taken picture

+ +

With the help of the File API you can then access the taken picture or chosen file:

+ +
var takePicture = document.querySelector("#take-picture");
+takePicture.onchange = function (event) {
+    // Get a reference to the taken picture or chosen file
+    var files = event.target.files,
+        file;
+    if (files && files.length > 0) {
+        file = files[0];
+    }
+};
+
+ +

Presenting the picture in the web page

+ +

Once you have a reference to the taken picture (i.e., file), you can then use window.URL.createObjectURL() to create a URL referencing the picture and setting it as the src of an image:

+ +
// Image reference
+var showPicture = document.querySelector("#show-picture");
+
+// Create ObjectURL
+var imgURL = window.URL.createObjectURL(file);
+
+// Set img src to ObjectURL
+showPicture.src = imgURL;
+
+// For performance reasons, revoke used ObjectURLs
+URL.revokeObjectURL(imgURL);
+
+ +

If createObjectURL() isn't supported, an alternative is to fallback to FileReader:

+ +
// Fallback if createObjectURL is not supported
+var fileReader = new FileReader();
+fileReader.onload = function (event) {
+    showPicture.src = event.target.result;
+};
+fileReader.readAsDataURL(file);
+
+ +

Complete example

+ +

If you want to see it in action, take a look at the complete working Camera API example.

+ +

Here is the code used for that demo:

+ +

HTML page

+ +
<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <title>Camera API</title>
+        <link rel="stylesheet" href="css/base.css" type="text/css" media="screen">
+    </head>
+
+    <body>
+
+        <div class="container">
+            <h1>Camera API</h1>
+
+            <section class="main-content">
+                <p>A demo of the Camera API, currently implemented in Firefox and Google Chrome on Android. Choose to take a picture with your device's camera and a preview will be shown through createObjectURL or a FileReader object (choosing local files supported too).</p>
+
+                <p>
+                    <input type="file" id="take-picture" accept="image/*">
+                </p>
+
+                <h2>Preview:</h2>
+                <p>
+                    <img src="about:blank" alt="" id="show-picture">
+                </p>
+
+                <p id="error"></p>
+
+            </section>
+
+            <p class="footer">All the code is available in the <a href="https://github.com/robnyman/robnyman.github.com/tree/master/camera-api">Camera API repository on GitHub</a>.</p>
+        </div>
+
+
+        <script src="js/base.js"></script>
+
+
+    </body>
+</html>
+
+ +

JavaScript file

+ +
(function () {
+    var takePicture = document.querySelector("#take-picture"),
+        showPicture = document.querySelector("#show-picture");
+
+    if (takePicture && showPicture) {
+        // Set events
+        takePicture.onchange = function (event) {
+            // Get a reference to the taken picture or chosen file
+            var files = event.target.files,
+                file;
+            if (files && files.length > 0) {
+                file = files[0];
+                try {
+                    // Create ObjectURL
+                    var imgURL = window.URL.createObjectURL(file);
+
+                    // Set img src to ObjectURL
+                    showPicture.src = imgURL;
+
+                    // Revoke ObjectURL
+                    URL.revokeObjectURL(imgURL);
+                }
+                catch (e) {
+                    try {
+                        // Fallback if createObjectURL is not supported
+                        var fileReader = new FileReader();
+                        fileReader.onload = function (event) {
+                            showPicture.src = event.target.result;
+                        };
+                        fileReader.readAsDataURL(file);
+                    }
+                    catch (e) {
+                        //
+                        var error = document.querySelector("#error");
+                        if (error) {
+                            error.innerHTML = "Neither createObjectURL or FileReader are supported";
+                        }
+                    }
+                }
+            }
+        };
+    }
+})();
+
+ +

Browser compatibility

+ +

We're converting our compatibility data into a machine-readable JSON format. + This compatibility table still uses the old format, + because we haven't yet converted the data it contains. + Find out how you can help!

+ +
+ + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Camera APINo supportNo supportNo supportNo supportNo support
createObjectURL()168.0 (8.0)10No supportNo support
FileReader163.6 (1.9.2)1011.6No support
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Camera API3.0(Yes)10.0 (10.0)No supportNo supportNo support
createObjectURL()4(Yes)10.0 (10.0)No supportNo supportNo support
FileReader3(Yes)10.0 (10.0)No support11.10No support
+
diff --git a/files/ko/archive/b2g_os/api/index.html b/files/ko/archive/b2g_os/api/index.html new file mode 100644 index 0000000000..9a3c418536 --- /dev/null +++ b/files/ko/archive/b2g_os/api/index.html @@ -0,0 +1,120 @@ +--- +title: B2G OS APIs +slug: Archive/B2G_OS/API +tags: + - NeedsTranslation + - TopicStub +translation_of: Archive/B2G_OS/API +--- +

+ +

This page lists all B2G OS-specific APIs.

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

diff --git a/files/ko/archive/b2g_os/api/tcpsocket/index.html b/files/ko/archive/b2g_os/api/tcpsocket/index.html new file mode 100644 index 0000000000..a9efe494eb --- /dev/null +++ b/files/ko/archive/b2g_os/api/tcpsocket/index.html @@ -0,0 +1,102 @@ +--- +title: TCPSocket +slug: Archive/B2G_OS/API/TCPSocket +translation_of: Archive/B2G_OS/API/TCPSocket +--- +

+ +

+

This API is available on Firefox OS for privileged or certified applications only.

+

+ +

요약

+ +

The TCPSocket interface provides access to a raw TCP socket.

+ +

The main entry point for this API is the navigator.mozTCPSocket property which is a TCPSocket object.

+ +
+

참고: 인증 된 앱만 1024보다 작은 포트에서 들어오는 연결을 허용 할 수 있습니다.

+
+ +

API 개요

+ +
interface TCPSocket{
+  readonly attribute DOMString host;
+  readonly attribute unsigned short port;
+  readonly attribute boolean ssl;
+  readonly attribute unsigned long bufferedAmount;
+  readonly attribute DOMString binaryType;
+  readonly attribute DOMString readyState;
+
+  TCPSocket open(DOMString host, unsigned short port, [object options]);
+  TCPServerSocket listen(unsigned short port, [object options, [unsigned short backlog]]);
+  void upgradeToSecure();
+  void suspend();
+  void resume();
+  void close();
+  boolean send(in jsval data);
+
+  attribute onopen;
+  attribute ondrain;
+  attribute ondata;
+  attribute onerror;
+  attribute onclose;
+};
+ +

속성

+ +
+
TCPSocket.host Read only
+
A string representing the host name of the server the socket is connected to.
+
TCPSocket.port Read only
+
A number representing the port the socket is connected to.
+
TCPSocket.ssl Read only
+
A boolean indicating whether the socket is encrypted with SSL (true) or not (false).
+
TCPSocket.bufferedAmount Read only
+
The number of bytes of not-yet-sent data in the socket buffered.
+
TCPSocket.binaryType Read only
+
The type of data used. Possible value is arraybuffer or string.
+
TCPSocket.readyState Read only
+
The socket state. Possible value is connecting, open, closing, or closed.
+
+ +

이벤트 핸들러

+ +
+
TCPSocket.onopen
+
A handler for the open event. After this event, the socket is ready to send and receive data.
+
TCPSocket.ondrain
+
A handler for the drain event. This event is triggered each time the buffer of data is flushed.
+
TCPSocket.onerror
+
A handler for the error event.
+
TCPSocket.ondata
+
A handler for the data event. This event is triggered each time data has been received.
+
TCPSocket.onclose
+
A handler for the close event.
+
+ +

메소드

+ +
+
TCPSocket.close()
+
Closes the connection.
+
TCPSocket.open(host, port [, options])
+
Returns a new TCPSocket object connected to the given host at the given port.
+
TCPSocket.resume()
+
Resumes the data events.
+
TCPSocket.send(data)
+
Buffers data to be sent across the network.
+
TCPSocket.suspend()
+
데이터 이벤트를 일시 정지합니다.
+
+ +

Specification

+ +

아직 사양에 포함되어 있지 않습니다. 그러나이 API는 W3C에서 TCP 및 UDP Socket API (이전에는 Raw Sockets API) 제안에 따라 시스템 응용 프로그램 작업 그룹의 일부로 논의되었습니다.

+ +

관련항목

+ + diff --git a/files/ko/archive/b2g_os/application_development/index.html b/files/ko/archive/b2g_os/application_development/index.html new file mode 100644 index 0000000000..2f961c72d6 --- /dev/null +++ b/files/ko/archive/b2g_os/application_development/index.html @@ -0,0 +1,12 @@ +--- +title: Firefox OS 앱 개발 +slug: Archive/B2G_OS/Application_development +translation_of: Archive/B2G_OS/Firefox_OS_apps/Building_apps_for_Firefox_OS +--- +

Firefox OS에서 사용하는 애플리케이션은 오픈 웹 앱을 휴대폰에 설치할 수 있게 해 주는 것입니다. 아래 문서를 참고하세요.

+ +
+ 주의: Firefox OS의 현재 User-Agent 스트링은 Android;만 빠진 모바일 버전과 동일 합니다. 예: Mozilla/5.0 (Mobile; rv:15.0) Gecko/15.0 Firefox/15.0a1.
diff --git a/files/ko/archive/b2g_os/apps/index.html b/files/ko/archive/b2g_os/apps/index.html new file mode 100644 index 0000000000..76095d479d --- /dev/null +++ b/files/ko/archive/b2g_os/apps/index.html @@ -0,0 +1,57 @@ +--- +title: Creating Apps for Firefox OS +slug: Archive/B2G_OS/Apps +tags: + - Apps + - B2G + - Firefox OS + - NeedsTranslation + - TopicStub +translation_of: Web/Apps/Fundamentals +--- +

Applications for Firefox OS devices are simply open Web apps; they consist entirely of open Web technologies such as JavaScript, HTML, and CSS. While our primary documentation for apps covers nearly everything you need to know, there are a few documents specific to developing and testing for Firefox OS that are presented here.

+
+
+

Documentation and tutorials

+
+
+ Writing a web app for Firefox OS
+
+ A tutorial to creating your first web application for Firefox OS.
+
+ Tips and techniques
+
+ An assortment of tips and tricks (as well as workarounds for problems) that our developers have suggested for you!
+
+

View All...

+
+
+

Getting help from the community

+

You need help on an app-related problem and can't find the solution in the documentation?

+ +

Don't forget about the netiquette...

+

Tools

+ +

View All...

+ + +
+
+

 

diff --git a/files/ko/archive/b2g_os/apps/writing_a_web_app_for_firefox_os/index.html b/files/ko/archive/b2g_os/apps/writing_a_web_app_for_firefox_os/index.html new file mode 100644 index 0000000000..d5d3be42e1 --- /dev/null +++ b/files/ko/archive/b2g_os/apps/writing_a_web_app_for_firefox_os/index.html @@ -0,0 +1,25 @@ +--- +title: Writing a web app for Firefox OS +slug: Archive/B2G_OS/Apps/Writing_a_web_app_for_Firefox_OS +translation_of: Web/Apps/Fundamentals/Quickstart +--- +

B2G 앱은 HTML, CSS, Javascript 로 작성된 웹앱입니다. 다른 일반적인 웹 사이트를 공개하는 것과 같이 웹 상에 배포할 수 있습니다. 웹 사이트를 단말에 웹앱으로 설치 가능하게 하려면, 아래 설명에 따라 매니페스트를 꾸며야하고 설치 버튼과 연결해야 합니다.

+

우선 아래의 기사를 먼저 읽는 것을 추천합니다.

+ +

물론, Open Web Apps 에 대해 보다 깊게 배우기도 좋을 것입니다.

+

Installing the Web app

+

앱과 매니페스트를 웹 상에 배포한 뒤, Gecko 에 인식시킬 필요가 있습니다. 설치 시, Gecko 는 매니페스트의 내용을 읽고 홈 화면에 아이콘을 추가하는 등 필요한 처리를 합니다.

+

앱을 인스톨하려면, navigator.mozApps.install API 를 호출해야합니다. 아래는 앱을 스스로 배포하는 경우 앱에 포함되는 설치 버튼에 대한 예제입니다.

+
<script>
+var manifest_url = "http://my.webapp.com/manifest.json";
+</script>
+
+<button onclick="navigator.mozApps.install(manifest_url); return false;">
+  Install this awesome app on your homescreen!
+</button>
+
+

Note: 설치 버튼은 Firefox Marketplace 와 같은 앱 마켓에서 찾을 수 있습니다. 그러나 사이트의 메인 페이지에 "Install as web app" 버튼이 있다면 아주 편리할 것입니다.

+

이제 B2G 브라우저 앱으로 웹 사이트에 방문하고 인스톨 버튼을 눌러보세요.

diff --git a/files/ko/archive/b2g_os/automated_testing/index.html b/files/ko/archive/b2g_os/automated_testing/index.html new file mode 100644 index 0000000000..a03dba9376 --- /dev/null +++ b/files/ko/archive/b2g_os/automated_testing/index.html @@ -0,0 +1,84 @@ +--- +title: Firefox OS 테스트 +slug: Archive/B2G_OS/Automated_testing +tags: + - 테스팅 +translation_of: Archive/B2G_OS/Automated_testing +--- +

+

Firefox OS는 아직 개발중이지만 조만간 새로운 하드웨어도 지원하게 될 것이기에, 테스트를 하는 방법을 아는 게 중요합니다. 이 페이지는 Firefox OS를 테스트 하는 다양한 방법에 대한 정보를 제공하는 문서들로의 링크들을 제공합니다.

+ + + + + + + +
+

유닛 테스트

+ +
+
+

다양한 테스팅 관련 논의

+
+
+ OpenGL 디버깅
+
+ Firefox OS에서 OpenGL 코드를 디버깅 하는 방법.
+
+ 지원 기능 목록
+
+ Firefox OS의 빌드 별로 지원하는 기능들의 목록.
+
+

Firefox OS를 위한 Marionette

+ +

Gaia Tests

+ +

Marionette 튜토리얼

+ +

Marionette용 테스트 작성하기

+ +

모두 표시...

+
+

커뮤니티에서 도움 받기

+

Firefox OS로 일을 하거나 Firefox OS가 설치된 기기 위에 올라갈 어플리케이션을 개발 중이라면, 도움을 받을 수 있는 커뮤니티가 많이 있습니다!

+ +
    +
  • Mozilla IRC 채널에 질문을 할 수 있습니다: #b2g
  • +
+

질문 할 땐 예의를 잊지 말아 주세요...

+
+ + +
+

 

diff --git a/files/ko/archive/b2g_os/building/index.html b/files/ko/archive/b2g_os/building/index.html new file mode 100644 index 0000000000..87f6b1fff6 --- /dev/null +++ b/files/ko/archive/b2g_os/building/index.html @@ -0,0 +1,125 @@ +--- +title: Firefox OS 빌드하기 +slug: Archive/B2G_OS/Building +translation_of: Archive/B2G_OS/Building +--- +
+
+
+ 중요: 번역은 제가 필요한 부분 및 확인 가능한 부분만 진행 하였으며 변역된 날자는(2013/02/25)이며 문서 변경이 잦아 오늘 이후는 원문과 번역이 다를 수 있습니다. 참고하세요. 미 번역/변경된 부분은 추가로 다른 분이 해 주실 것으로 믿습니다.
+

빌드환경 설정코드 복사 및 초기 환경 설정이 완료 되고 나면, Boot to Gecko를 시작 할 수 있습니다.

+

최신 코드로 업데이트

+

B2G빌드가 처음이 아닐 경우, 빌드를 시작하기 전에 최신 코드를 가져 오고 싶다면 아래와 같이 빌드용 툴과 코드를 최신으로 업데이트 하실 수 있습니다.

+
git pull
+./repo sync
+
+

원하는 repository의 이름만 입력 함으로서 부분적으로 업데이트도 가능합니다.

+
./repo sync gaia
+
+

"repo"의 다른 옵션들에 관심이 있다면 "repo help"를 입력 해 보세요.

+

빌드하기

+
+

주의: 빌드 하기 전에, 빌드 환경을 개조 하려면 .userconfig파일을 수정하시면 됩니다.  .userconfig 파일 개조하기를 참고하세요.

+
+

아래와 같이 입력하면 B2G를 빌드 하실 수 있습니다.

+
cd B2G
+./build.sh
+
+

이번 과정 또한 수행 시간이 많이(2시간 이상)걸리므로 잠깐 다른 일을 처리 하셔도 됩니다. As in the configure step on the previous page, if you are using a directory of previously-extracted Android system files, you should set ANDROIDFS_DIR before running build.sh.

+

특정 모듈 빌드하기

+

Gecko와 같은 특정 모듈만 빌드하려면 아래와 같습니다.

+
./build.sh gecko
+
+

특정 애플리케이션 하나만 빌드하려면, 아래와 같이 환경 변수 BUILD_APP_NAME에 "gaia"를 설정 하여 gaia만 빌드 하실 수 있습니다.

+
BUILD_APP_NAME=calendar ./build.sh gaia
+

빌드 가능한 모듈을 확인 하고 싶으시면 아래와 같이 수행 하십시오.

+
./build.sh modules
+
+

빌드에 사용되는 코어 갯수 변경

+

기본적으로, B2G 빌드 스크립트는 시스템이 가진 코어보다 2개 더 많은 수로 병렬 빌드를 진행 합니다. "build.sh" 수행시 -j 파라미터를 통해 그 갯수를 변경 하실 수 있습니다. 이를 통해 빌드 시스템의 CPU로드를 조정하실 수 있습니다. 빌드에서 에러가 발생하면 병렬 빌드의 경우 에러 가 복잡하게 보이므로 코어 갯수를 줄이거나 하나로 한다면 빌드 에러 추적이 용이합니다.

+

아래는 2개의 코어로 설정하여 빌드하는 예입니다.

+
./build.sh -j2
+
+

빌드 에러가 발생시는 아래처럼 1개의 코어로 할 경우 에러 결과를 읽고 분석하기 용이 합니다.

+
./build.sh -j1
+
+

다국어 빌드하기

+

다국어 지원하도록 한다면:

+

Gaia

+
    +
  1. 먼저 어떤 언어를 지원할 것인지 정하시고. 현재는 locales/languages_dev.jsonlocales/languages_all.json가 Gaia의 언어 설정 관련 파일로 사용됩니다.
  2. +
  3. http://hg.mozilla.org/gaia-l10n에서 지원하고자 하는 언어를 가져옵니다. 언어 파일에 리스트 된 각 언어를 가져 오려면 "repo"를 사용해야 합니다.
  4. +
  5. 환경 설정으로, set LOCALE_BASEDIR에 위의 2번에서 가져온 파일 절대 경로를 설정합니다. LOCALES_FILE을 1번 설정의 절대 경로로 설정합니다.
  6. +
+

예를 들면,

+
export LOCALE_BASEDIR=$PWD/gaia-l10n
+export LOCALES_FILE=$PWD/gecko/gaia/shared/resources/languages-dev.json
+
+

Gecko

+
    +
  1. Determine which Gecko languages file to use. We're currently using b2g/locales/all-locales as our Gecko languages file.
  2. +
  3. Clone the appropriate locales into a directory; this can be gecko-l10n/ . + +
  4. +
  5. Clone compare-locales.
  6. +
  7. +

    In your environment, set L10NBASEDIR to the absolute path of the directory in step 2. Set MOZ_CHROME_MULTILOCALE to a string of space-delimited locales from step 1.

    +

    Add the compare-locales/scripts dir to your PATH, and compare-locales/lib to your PYTHONPATH.

    + For instance, +
    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"
    +
    +

    Once you have the above set up, you can run build.sh .

    +

    It looks like you can use .userconfig as well.

    +

    These instructions may change as we smooth things out.

    +

    Known errors

    +
      +
    • +

      KeyedVector.h:193:31: error: indexOfKey was not declared in this scope

      +
    • +
    +

    This error appears when your gcc version is too recent. Install gcc/g++/g++-multilib 4.6.x versions.

    +

    See Customizing with the .userconfig file for more information.

    +
    +

    Community Note: It is possible to use gcc 4.7.x with slight modifications to the B2G code (gcc will guide you) but you won't get any help! Neither with modifying the code nor with bugs you encounter.

    +
    +
      +
    • +

      arm-linux-androideabi-g++: Internal error: Killed (program cc1plus)

      +
    • +
    +

    If you see this message, it most likely means that are lacking of free memory. Ensure having enough free memory before running ./build.sh. It should run fine if you system has 4GB of ram.

    +
      +
    • +

      If you get build errors while the build system is running tests

      +
    • +
    +

    Sometimes (especially after build tool or operating system updates) you'll get weird errors like this when the build system runs its post-build tests:

    +
    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
    +

    In this situation, try deleting the gaia/xulrunner-sdk directory and re-pulling the code:

    +
    rm -r gaia/xulrunner-sdk
    +
    +

    This deletes the downloaded, precompiled copy of XULRunner that the build system retrieves automatically; on your next build, a new copy of XULRunner will be automatically retrieved.

    +

    다음 단계

    +

    빌드가 완료되면 다음 단계로는 에뮬레이터로 넣을 것인지 단말기로 놓을 것인지에 따라 아래와 같은 선택사항이 있습니다. 자세한 사항은 각각을 참고 하세요.

    + +
  8. +
diff --git a/files/ko/archive/b2g_os/building_and_installing_firefox_os/index.html b/files/ko/archive/b2g_os/building_and_installing_firefox_os/index.html new file mode 100644 index 0000000000..a6c5dd7472 --- /dev/null +++ b/files/ko/archive/b2g_os/building_and_installing_firefox_os/index.html @@ -0,0 +1,49 @@ +--- +title: Firefox OS를 빌드 및 설치하기 +slug: Archive/B2G_OS/Building_and_installing_Firefox_OS +translation_of: Archive/B2G_OS/Building_and_installing_B2G_OS +--- +

Firefox OS는 현재 활발히 개발 중이며, 릴리즈되기 전입니다. 최신버전을 설치하려면 여러분이 직접 빌딩하고 설치해야 합니다. 이 페이지에 나와있는 글들은 여러분에게 에뮬레이터나 호환기기에 Firefox OS를 빌딩하고 설치하거나 Firefox 브라우저에 Gaia 유저 인터페이스를 빌딩하고 설치하는 방법을 알려줄 겁니다.

+ + + + + + + + +
+

FIREFOX OS 빌드하기

+ +
+
Firefox OS 빌드 과정 요약
+
Firefox OS를 빌드하고 설치하는데에는 상당량의 시간, 네트워크 데이터 사용, 그리고 컴퓨터 성능 등을 요구한다. 이 글은 사용자의 빌드 과정의 목적과 절차 등을 이해시키고자한다.
+
Firefox OS 빌드 요구사양
+
처음 Firefox OS를 빌드하기 전에 필요하거나 필요해질 것들.
+
Firefox OS 빌드 준비하기
+
Firefox OS를 빌드하기 전에 여러분은 저장소를 복제하고 빌드 환경을 설정해야 한다. 이 글은 그 방법을 설명한다.
+
Firefox OS 빌딩하기
+
Firefox OS 빌드 방법.
+
+ +

전체보기...

+
+

FIREFOX OS 설치하기

+ +
+
Gaia나 Firefox OS를 선택하여 실행하기
+
여러분은 Firefox에서 Gaia를 사용하거나 모바일 기기에서 Firefox OS를 실행하거나 데스크톱용 시뮬레이션을 사용할 수 있습니다. 여러분의 필요에 대해 어떤 것을 선택해야 할지 도와줄 것입니다.
+
Firefox 에서 Gaia 사용하기
+
Firefox 데스크톱 버전에서 Gaia 사용하는 방법.
+
Firefox OS 데스크톱 클라이언트(시뮬레이터) 사용하기
+
Firefox OS 데스크톱 클라이언트를 실행하고 사용하는 방법;데스크톱 애플리케이션안 Gaia환경을 만듭니다. Firefox 에서 Gaia를 실행하는 것보다는 더 나은 환경이나 에뮬레이터를 사용하는 것보다는 못합니다.
+
Firefox OS 에뮬레이터 사용하기
+
Firefox OS 에뮬레이터를 빌드하고 사용하고, 언제 어떤 에뮬레이터를 사용해야 하는지에 대한 안내.
+
모바일 기기에 Firefox OS 설치하기
+
모바일 기기에 Firefox OS를 설치하는 방법.
+
SGS2에서 Firefox OS와 Android 듀얼 부팅하기
+
삼성 갤럭시 S2에서 Firefox OS/Android 듀얼 부트환경을 설정하는 방법.
+
+
+ +

 

diff --git a/files/ko/archive/b2g_os/debugging/debugging_b2g_using_gdb/index.html b/files/ko/archive/b2g_os/debugging/debugging_b2g_using_gdb/index.html new file mode 100644 index 0000000000..b7578dff62 --- /dev/null +++ b/files/ko/archive/b2g_os/debugging/debugging_b2g_using_gdb/index.html @@ -0,0 +1,153 @@ +--- +title: GDB 및 관련 Tool을 이용한 B2G 디버깅 +slug: Archive/B2G_OS/Debugging/Debugging_B2G_using_gdb +translation_of: Archive/B2G_OS/Debugging/Debugging_B2G_using_gdb +--- +
+

gdb는 Firefox OS의 애플리케이션 디버깅을 위한 많은 유용한 옵션을 제공하는 command line debugger입니다. B2G상에서 실행 중인 각 프로세스의 app 이름을 보여주는 표준 ps의 wrapper인 b2g-ps와 같은 다른 tool들도 있습니다. 이 문서는 이런 tool들로 Firefox OS 디버깅을 어떻게 수행하는지 보여드립니다.

+
+ +

단일 프로세스 모드에서 디버거 시작하기

+ +

(역자 주: b2g 프로세스에 대한 디버깅을 뜻하는 듯)

+ +
+

Note: 디버거를 실행하기 전에 자신만의 설정을 위해 .userconfig 파일을 셋업할 수 있습니다. 이에 대한 더 자세한 내용은 Customization with the .userconfig file을 참고하시기 바랍니다.

+
+ +

Firefox OS를 재시작한 후 gdb 상에서 실행하기 위해서는 간단히 run-gdb.sh를 사용하시면 됩니다 :

+ +
./run-gdb.sh
+
+ +
+

Note: 만약 에뮬레이터 상에서 디버깅 하길 원한다면, 혹시 연결되어 있는 폰은 없는지 확인해 보시기 바랍니다; 에뮬레이터를 연결하려는 gdb와 충돌이 발생할 수 있습니다.

+
+ +

Firefox OS가 이미 동작 중이고, 재시작없이 Firefox OS를 붙이길 원한다면 아래처럼 할 수 있습니다:

+ +
./run-gdb.sh attach
+
+ +

Out-of-process tasks 디버깅

+ +

(역자 주: b2g 외 다른 프로세스에 대한 디버깅을 뜻하는 듯)

+ +

Firefox OS의 쓰레드 기반 특성(threaded nature) 때문에 종종 B2G task외에 다른 task들을 디버깅 해야할 필요가 있을 수 있습니다. 이를 위해 디버깅 하길 원하는 프로세스의 PID를 확인하는 가장 간단한 방법은 b2g-ps 명령을 사용하는 것입니다:

+ +
$ adb shell b2g-ps
+b2g              root      106   1     189828 56956 ffffffff 40101330 S /system/b2g/b2g
+Browser          app_0     4308  106   52688  16188 ffffffff 400db330 S /system/b2g/plugin-container
+
+ +

위에서 Browser는 browser 애플리케이션을 위한 "content process"로 사용되는 (b2g의) 자식 프로세스입니다. 이 예에서 content process를 디버깅하고 싶다면 아래처럼 하시기 바랍니다:

+ +
$ ./run-gdb.sh attach 4308
+ +

종종 자식 프로세스 생성에 대해 즉시 통보받는게 유용할 때가 있습니다. 이렇게 하기 위해선 MOZ_DEBUG_CHILD_PROCESS 환경변수와 함께 run-gdb.sh를 실행하면 됩니다:

+ +
MOZ_DEBUG_CHILD_PROCESS=1 ./run-gdb.sh
+ +

이렇게 하면 Firefox OS에서 out-of-process 애플리케이션이 실행될 때 새로운 task용 plugin-container의 PID를 출력할 것입니다. 그리고 위에서 봤던 attach 명령을 사용하기에 충분한 시간인 30초 동안 sleep 할 것 입니다:

+ +
$ ./run-gdb.sh attach 4308
+ +

만일 부팅 중 발생하는 어떤 부분을 디버깅하려고 한다면, 새로운 애플리케이션에 대한 디버거 인스턴스(debugger instance)를 적절하게 빨리 실행해야 합니다. 일단 새로운 디버거가 실행되면 새로운 task의 동작을 지속하기 위해 즉시 "c"를 눌러야 합니다.

+ +

Core 파일 디버깅

+ +
+

Warning: Core 파일은 프로세스의 전체 메모리 내용을 포함하고 있습니다. 이 파일은 여러분이 Firefox OS에 입력한 개인 정보를 포함하고 있을 수 있습니다. 그러므로 core 파일은 주의깊게 공유되어야 합니다.

+
+ +

기본적으로 Firefox OS는 프로세스가 crash 되었을 때 core 파일을 dump 하지 않습니다. Debug 빌드 버전에서 다음 명령으로 enable 해주어야 합니다:

+ +
$ adb shell setprop persist.debug.coredump all
+$ adb reboot
+
+ +

변경사항을 적용하기 위해서는 리부팅이 필요하며, B2G가 일단 초기화를 시작했으면 crash 발생 시 모든 프로세스가 core dump를 하게 됩니다. 이전 커널(<3.0, hamachi 등)을 사용하는 플랫폼이거나, Gonk 외 B2G의 특정 프로세스(즉 b2g, plugin-container)로부터의 core dump를 원한다면, 다음 명령으로 enable 할 수도 있습니다:

+ +
$ adb shell setprop persist.debug.coredump b2g
+$ adb reboot
+
+ +

Core 파일은 /data/core에 저장됩니다. b2g에 의해 생성된 core 파일은 다음과 같이 열 수 있습니다:

+ +
$ adb pull /data/core .
+$ ./run-gdb.sh core b2g.1286.1412337385.core
+
+ +

Content process의 core 파일은 다음과 같이 열 수 있습니다:

+ +
$ adb pull /data/core .
+$ ./run-gdb.sh core plugin-container Camera.1329.1412617644.core
+
+ +

지원

+ +

기능의 기대 수준

+ +

다음 디버깅 기능들은 적어도 확실히 동작합니다. 만약 동작하지 않는다면 간단한 설정 변경으로 동작할 것입니다:

+ + + +

다음 디버깅 기능은 지원하지 않습니다. 사용하지 마시기 바랍니다.

+ + + +

문제 해결

+ +

위에 언급된 것처럼 GDB가 동작하지 않을 때 해볼 수 있는 몇 가지가 있습니다.

+ +

B2G clone이 최신인지 확인

+ +

B2G clone을 업데이트 하려면 아래 두 개의 명령을 실행해야 한다는 것을 항상 명심하시기 바랍니다:

+ +
git pull
+./repo sync
+ +

위에서 git pull을 잊는 경우가 이전 run-gdb.sh로 남아있거나 최신 개선사항의 잇점을 얻지 못하는 전형적인 요인입니다.

+ +

올바른 프로세스를 attach 하고 있는지 확인

+ +

잘못된 프로세스를 attach 하는 것(예를 들면 B2G 프로세스 대 Browser 프로세스)은 여러분의 breakpoint가 왜 동작하지 않고 있는지를 설명해 줄겁니다.

+ +

Symbol이 올바르게 로드 되었는지 확인

+ +
    +
  1. Symbol이 올바르게 로드 되었는지 확인하려면 gdb에서 info shared를 사용해 보세요: + +
    (gdb) info shared
    +From        To          Syms Read   Shared Object Library
    +0xb0001000  0xb0006928  Yes         out/target/product/otoro/symbols/system/bin/linker
    +0x40051100  0x4007ed74  Yes         /hack/b2g/B2G/out/target/product/otoro/symbols/system/lib/libc.so
    +0x401ab934  0x401aba2c  Yes         /hack/b2g/B2G/out/target/product/otoro/symbols/system/lib/libstdc++.so
    +...
    +
  2. +
  3. Syms Read 컬럼이 모두 Yes이어야 합니다. 어떤 안드로이드 폰에서는 몇몇 시스템 라이브러리와 드라이버가 Yes (*)로 나타날 수 있습니다; 그건 괜찮습니다. No가 보이면 안됩니다.
  4. +
  5. 만약 No가 보인다면, 그게 첫 번째 문제이고 다른 걸 보기전에 그 문제부터 해결해야 합니다.
  6. +
  7. run-gdb.sh 명령을 친 후 바로 나타나는 터미널의 출력에 에러 메시지가 있는지 찾아보시기 바랍니다.
  8. +
  9. 또한 GDB 명령이 올바른지 터미널 출력을 확인해 보시기 바랍니다. 특히 명령줄의 마지막 인자는 b2g 실행파일의 경로가 되어야 합니다. 아래 올바른 예제가 있습니다: +
    prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/arm-linux-androideabi-gdb -x /tmp/b2g.gdbinit.bjacob /hack/b2g/B2G/objdir-gecko/dist/bin/b2g
    +
  10. +
  11. 다음 GDB 변수들을 확인해 보시기 바랍니다: solib-search-pathsolib-absolute-prefix: +
    (gdb) show solib-search-path
    +The search path for loading non-absolute shared library symbol files is /hack/b2g/B2G/objdir-gecko/dist/bin:out/target/product/otoro/symbols/system/lib:out/target/product/otoro/symbols/system/lib/hw:out/target/product/otoro/symbols/system/lib/egl:out/target/product/otoro/symbols/system/bin:out/target/product/otoro/system/lib:out/target/product/otoro/system/lib/egl:out/target/product/otoro/system/lib/hw:out/target/product/otoro/system/vendor/lib:out/target/product/otoro/system/vendor/lib/hw:out/target/product/otoro/system/vendor/lib/egl.
    +(gdb) show solib-absolute-prefix
    +The current system root is "out/target/product/otoro/symbols".
    +
  12. +
+ +
+

Note: 만일 도움이 더 필요하시면 #b2g IRC 채널로 오시기 바랍니다. 버그를 찾은 것 같다면 B2G issue tracker로 알려주시기 바랍니다.

+
+ +

 

diff --git a/files/ko/archive/b2g_os/debugging/index.html b/files/ko/archive/b2g_os/debugging/index.html new file mode 100644 index 0000000000..12a896d185 --- /dev/null +++ b/files/ko/archive/b2g_os/debugging/index.html @@ -0,0 +1,84 @@ +--- +title: Debugging on Firefox OS +slug: Archive/B2G_OS/Debugging +tags: + - B2G + - Debugging + - Firefox OS + - NeedsTranslation + - QA + - Testing + - TopicStub +translation_of: Archive/B2G_OS/Debugging +--- +
+

There are two main types of debugging you'll want to with Firefox OS: debugging apps, and debugging other aspects of the system. This section of the site provides articles covering the different tools at your disposal to debug your Firefox OS code.

+
+

Debugging apps

+

When debugging your web apps, the best tool at your disposal is Mozilla's powerful App Manager, which allows you to run your apps directly on a real device or simulator, update any changes instantly, and debug them directly on the device using Mozilla's excellent developer tools. This should be your first choice, especially for app/Gaia debugging.

+
+
+ Using WebIDE
+
+ The WebIDE is the replacement for the App Manager. Like the App Manager, it enables you to run and debug Firefox OS apps using the Firefox OS Simulator or a real Firefox OS device. However, it also provides an editing environment for you to create and develop apps.
+
+ Using the App Manager
+
+ The App Manager is a new tool available in Firefox for Desktop, which provides a number of useful tools to help you test, deploy and debug HTML5 web apps on Firefox OS phones and the Firefox OS Simulator, directly from your browser.
+
+ Debugging out of memory errors on Firefox OS
+
+ This article describes how B2G's multiprocess architecture affects what the phone does when we run out of memory, and how to understand and debug OOM crashes.
+
+

Debugging Gaia/B2G

+

If you want to debug code from the Gaia apps suite or B2G itself, the following tools will be of use to you.

+
+
+ Debugging using the desktop B2G client
+
+ You can use the dedicated B2G desktop application (and associated tools) to debug multiple aspects of B2G and Gaia.
+
+ Firefox OS crash reporting
+
+ This page details how to handle crash reporting on Firefox OS, including retrieving crash reports, and forcing crashes.
+
+ Debugging B2G using gdb
+
+ The popular gdb debugger can be used to debug Firefox OS and web apps running on a device, or on an emulator. This guide will show you how it's done.
+
+ Debugging B2G using Valgrind
+
+ Valgrind gives developers access to information about memory allocations, threads, and other information important to performance. This guide shows how to run Valgrind either on desktop B2G or select phone hardware.
+
+ Getting NSPR logs in B2G
+
+ You can use NSPR logs to record HTTP and other networking.
+
+ Debugging OpenGL
+
+ How to debug OpenGL code on Firefox OS.
+
+

General setup and information

+

The following articles provide information on individual aspects of setup for Firefox OS development. The chances are that you won't need these, especially if you are just debugging apps using the App Manager. But we have made them available here in case you do.

+
+
+ Developer settings for Firefox OS
+
+ There are a number of settings options available for developers on Firefox OS. This guide explains what they do and how to take advantage of them.
+
+ Installing and using ADB
+
+ Many aspects of Firefox OS development require installation of adb, the Android Debug Bridge. This article explains how to do that, and shares some common useful ADB commands.
+
+ On-device console logging
+
+ How to log to console on a Firefox OS device, and how to access the resulting logs for review on your computer.
+
+ Connecting a Firefox OS device to the desktop
+
+ This short guide explains how to set up your Firefox OS device and your desktop so that the desktop can communicate with the device over USB.
+
+ Setting up to debug Firefox OS code
+
+ Before you can begin using most of the tools integrated into Firefox for debugging code running under Firefox OS, you need to do a little configuration work. This article explains what you need to do.
+
diff --git a/files/ko/archive/b2g_os/dual_boot_of_b2g_and_android_on_sgs2/index.html b/files/ko/archive/b2g_os/dual_boot_of_b2g_and_android_on_sgs2/index.html new file mode 100644 index 0000000000..fa0e0b7ed5 --- /dev/null +++ b/files/ko/archive/b2g_os/dual_boot_of_b2g_and_android_on_sgs2/index.html @@ -0,0 +1,79 @@ +--- +title: SGS2에서 B2G와 Android로 듀얼 부팅 +slug: Archive/B2G_OS/Dual_boot_of_B2G_and_Android_on_SGS2 +tags: + - 듀얼 부팅 +translation_of: Archive/B2G_OS/Building +--- +

+

+

Warning: 이 문서에서 설명하는 내용은 공식적으로 지원하는 구성은 아닙니다. 본인의 결정 하에 사용하세요.

+

+

삼성 Galaxy S2를 가지고 있고, Android를 주로 사용하는 OS로 유지하면서 가끔 B2G를 테스트 하고 싶은 상황이라면, B2G를 (폰에 이미 존재하는)분리된 파티션에 설치하고 기기를 켤 때 어느 파티션에서 부팅할지 선택할 수 있습니다.

+
+ 참고: 폰은 반드시 Android 4 (Ice Cream Sandwich) 가 설치되어 있어야 합니다. 그렇지 않다면 아래의 내용은 제대로 동작하지 않을 겁니다.
+

선결 조건

+

Android와 B2G로 듀얼 부팅을 하려면 다음의 사항들이 만족되어 있어야 합니다:

+ +

최초 환경 설정

+

듀얼 부팅을 하기 위해선 여러가지 조작을 해야 합니다.
+ 다음 환경 설정은 처음에 한번만 하면 됩니다.

+

heimdall을 루트 권한 없이 사용하려면, android.rules라는 이름(.rules 앞의 내용은 맘대로 정해도 됩니다)의 파일을 만들고 /etc/udev/rules.d 디렉토리에 위치시켜야 합니다. 파일은 다음과 같은 내용을 가져야 합니다:

+
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
+

이 규칙을 활성화 시키기 위해서, udev를 재시작 해야 합니다:

+
sudo service udev restart
+

이제 폰을 PC와 다시 연결 합니다. 위의 규칙은 또한 adb가 SGS2를 루트 권한 없이 접근 가능하게 할 겁니다.

+

Siyah 커널 다운로드 하기

+

듀얼 부팅을 위해선 Siyah 커널이 필수적입니다. tar 파일을 받아서 압축을 푸셨다면, zImage 라는 이름의 파일을 얻었을 겁니다. 이걸 폰에 다운로드 하기 위해선 다음의 단계를 따라가면 됩니다:

+
    +
  1. 폰의 전원을 끕니다
  2. +
  3. 다운로드 모드로 리부팅(볼륨 다운, 홈, 파워 버튼을 동시에 눌러 전원을 켜고, 나중에 누르라는 메세지가 뜨면, 볼륨 업 버튼을 누릅니다) 합니다
  4. +
  5. 다음 명령어를 이용해 heimdall로 커널을 다운로드 합니다(폰은 PC에 연결되어 있어야 합니다):
    +
    heimdall flash --kernel /path/to/zImage
    +
  6. +
+

커널 다운로드가 완료되면 폰이 재부팅 됩니다

+

B2G 롬 환경 준비하기

+

Siyah 커널을 설치하셨다면, Siyah 커널을 이용해 B2G 이미지를 두번째 파티션에 설치하기 위한 환경을 준비해야 합니다:

+
    +
  1. 폰의 전원을 끕니다
  2. +
  3. 리커버리 모드로 리부팅(볼륨 업, 홈, 파워 버튼을 동시에 눌러 폰의 전원을 켭니다) 합니다
  4. +
  5. CWMT 터치 인터페이스에서, dual-boot 옵션으로 이동 -> Wipe 2ndROM data/cache 메뉴 선택 -> Yes - Wipe 메뉴를 선택합니다. 이 명령은 시간을 좀 필요로 할 겁니다
  6. +
+

명령이 성공적으로 끝나면, Go Back 메뉴를 선택하고 폰을 리부팅 하기 위해 reboot system now 메뉴를 선택합니다. 이제 SD 카드 안에 cache.img와 data.img라는 파일이 포함된 .secondrom 이라는 이름의 디렉토리가 있음을 확인할 수 있습니다.

+

B2G 업데이트

+

새로운 버전의 B2G를 빌드 할 때마다 다음의 동작이 필요합니다.

+

명령줄에 입력하는 명령을 간편하게 하기 위해, 필요한 모든 파일을 하나의 폴더에 복사해 두는 것을 추천합니다. 복사해 둬야 할 파일들은 다음과 같습니다:

+ +

파일들을 모두 하나의 디렉토리에 모았으면, 다음 명령들을 따라합니다:

+
    +
  1. userdata.img 파일로부터 data.img를 추출합니다. 다음의 명령으로 이를 행할 수 있습니다: +
    simg2img userdata.img data.img
    +
  2. +
  3. data.img 파일을 폰의 .secondrom 폴더로 이동시킵니다. 폰의 file storage mode 를 활성화 시키고 PC와 폰을 연결해서 할수도 있고, USB 디버그 기능이 활성화 되어 있다면, 다음과 같이 adb를 이용할 수도 있습니다: +
    adb push /path/to/data.img /sdcard/.secondrom/data.img
    +
  4. +
  5. 폰의 전원을 끕니다
  6. +
  7. 다운로드 모드로 리부팅(볼륨 다운, 홈, 파워 버튼을 동시에 눌러 전원을 켜고, 요청받으면 볼륨 업 버튼을 누릅니다) 합니다
  8. +
  9. heimdall을 써서 B2G 펌웨어를 두번째 파티션에 다운로드합니다: +
    heimdall flash --hidden system.img
    +
  10. +
+

다운로드가 끝나면, 폰이 리부팅 될꺼고, 부팅 시에 부트로더가 기다리는 동안 홈 버튼을 누름으로써 두번째 롬(B2G)로 부팅할 수 있습니다. 문제 없이 설치가 잘 되었다면, B2G로 부팅한 직후 까만 화면을 보게 될 것입니다. 이제 Gaia를 설치해야 합니다.

+
+ 참고: B2G를 어떻게 테스트 하고 싶은가에 따라서는, 기존의 것에서 새로운 data.img 파일로의 교체는 기존의 모든 설정, 설치된 어플리케이션들, 그리고 B2G를 사용하면서 행한 모든 것을 날려야 함을 의미하므로, B2G를 업데이트 할 때마다 data.img 파일을 갱신하고 싶지는 않을 수 있을 겁니다.
+

부팅

+

매번 B2G로 부팅할 때마다 다음의 동작을 해줘야 합니다.

+

안타깝게도, Gaia를 system.img B2G image에 간단히 넣는 방법은 없고, 폰을 끌 때마다 Gaia는 사라지므로, 매번 B2G로 부팅할 때마다 Gaia를 다시 설치해 줘야 합니다. Gaia를 설치하기 위해서는, 폰을 B2G로 부팅하고(폰은 검은 화면을 보이고 있을 겁니다) PC와 연결한 후에 다음과 같은 명령을 입력합니다:

+
cd B2G/gaia
+GAIA_DOMAIN=foo.org make install-gaia
+

Gaia의 다운로드가 끝나면, 폰은 B2G 인터페이스가 나타날 겁니다.

diff --git a/files/ko/archive/b2g_os/firefox_os_apps/index.html b/files/ko/archive/b2g_os/firefox_os_apps/index.html new file mode 100644 index 0000000000..370236dd14 --- /dev/null +++ b/files/ko/archive/b2g_os/firefox_os_apps/index.html @@ -0,0 +1,85 @@ +--- +title: Firefox OS apps +slug: Archive/B2G_OS/Firefox_OS_apps +tags: + - Apps + - Building + - Components + - Firefox OS + - Installing + - NeedsTranslation + - TopicStub + - device APIs +translation_of: Archive/B2G_OS/Firefox_OS_apps +--- +

This section of the Firefox OS docs covers the specific techniques required — and available tools — for building Firefox OS apps. You'll find a number of details below, from Firefox OS building blocks/web components, to device APIs and App installation.

+ +

Building Firefox OS apps

+ +
+
Building apps for Firefox OS
+
Firefox OS/Firefox platform app specifics, including App installation and management APIs, manifest files, packaged and hosted apps, handling API permissions.
+
Localization
+
This set of articles provides information for developers wishing to provide localized versions of their apps.
+
Performance
+
This page lists performance-related topics specific to Firefox OS.
+
Firefox Accounts on Firefox OS
+
This article provides an overview of using Firefox Accounts in Firefox OS.
+
Reference apps
+
This page lists a number of sample apps we've put together for you to download, install, play with and learn from. Have fun!
+
Screencast series: App Basics for Firefox OS
+
In this collection of short videos, developers from Mozilla and Telenor explain in a few steps how you can get started with building applications for Firefox OS.
+
+ +

Building blocks

+ +
+
Building Blocks
+
The Firefox OS Building Blocks are reusable UI components (also called 'common controls') that reflect OS-wide design patterns. Building Blocks are used to create the interfaces of all Gaia default apps. You are free to make use of these components in your own Firefox OS apps, or general Web apps.
+
+ +

Styleguides

+ +
+
Firefox OS Visual styleguide
+
Our style guide for Firefox OS visual design, covering colours, typeface, backgrounds, app icons, and the design of specific UI elements.
+
Firefox OS Copy styleguide
+
This guide outlines the rules we follow for writing Firefox OS app copy, but can be used as a general guide to writing good copy for any app interfaces.
+
Firefox OS in Arabic
+
A guide to the specific UX design implementation Firefox OS has in place for dealing with Arabic (and other RTL languages.)
+
+ +

Assets

+ +
+
Firefox OS design asset library
+
In this section you'll find design assets, artwork, graphic templates, fonts and other materials that will be helpful as you design Firefox OS/Gaia apps.
+
Firefox OS icon font
+
Firefox OS has its own icon font set available: this article explains how to use it in your own apps.
+
Firefox OS transitions
+
A reference to some of the transitions used in Firefox OS to move between different states in apps, including animated GIFs demonstrating the animations used, plus code samples to show the CSS animation code needed to implement these animations.
+
+ +

References

+ +
+
Firefox OS device APIs
+
This article provides a list of pages covering those APIs, as well as the app manifest permissions for each one.
+
Firefox OS app tools
+
This page provides a list of useful tools, libraries, examples, etc. that are useful for Firefox OS app developers, whether you want a code template to copy, or need help with adding a specific feature to your Firefox OS app.
+
+ +

Other app topics

+ +
+
Porting Chrome apps to Firefox OS Apps
+
This article discusses the differences between Chrome apps and Firefox OS Apps, and how you can convert between the two.
+
App development FAQ
+
This FAQ is a compilation of answers to common app development questions.
+
+ +

See also

+ + diff --git a/files/ko/archive/b2g_os/firefox_os_apps/localization/index.html b/files/ko/archive/b2g_os/firefox_os_apps/localization/index.html new file mode 100644 index 0000000000..f6e97ebe92 --- /dev/null +++ b/files/ko/archive/b2g_os/firefox_os_apps/localization/index.html @@ -0,0 +1,92 @@ +--- +title: App localization +slug: Archive/B2G_OS/Firefox_OS_apps/Localization +translation_of: Archive/B2G_OS/Firefox_OS_apps/Localization +--- +

+ +
+

이 글 모음은 앱의 지역화 버전을 만들고 싶어하는 개발자들을 위해정보를 제공하기 위하여 작성하였습니다.

+
+ +

지침서

+ +
+
Getting started with app localization(앱 지역화를 시작하기)
+
이 지침서는 앱 지역화를 자세한 가이드를 제공합니다.
+
Connecting developers and translators with Transifex
+
This article explores the use of Transifex for managing translation work, both for app developers and localizers.
+
+ +

Reference

+ +
+
L10n.js reference
+
This article provides a reference for the l10n.js library, and its associated date helper, l10n_date.js.
+
Internationalization helpers: IntlHelper and mozIntl
+
This article looks at how Firefox OS handles localization of dates, times, numbers and collators from version 2.5 onwards, using the Internationalization API and Gaia's built in helpers, IntlHelper and mozIntl.
+
App localization code best practices
+
Localization best practices and advanced techniques for experienced Gaia/app developers.
+
Developing Bidi Apps
+
Best coding practices and guidelines for developing bi-directional (left-to-right and right-to-left, RTL) apps.
+
+ +

Tools

+ +
+
Translation tester
+
This app is for testing translations for Firefox OS apps and provides a blueprint for adding translation support to your own apps.
+
diff --git a/files/ko/archive/b2g_os/firefox_os_build_prerequisites/index.html b/files/ko/archive/b2g_os/firefox_os_build_prerequisites/index.html new file mode 100644 index 0000000000..25a7f50191 --- /dev/null +++ b/files/ko/archive/b2g_os/firefox_os_build_prerequisites/index.html @@ -0,0 +1,267 @@ +--- +title: Firefox OS build prerequisites +slug: Archive/B2G_OS/Firefox_OS_build_prerequisites +translation_of: Archive/B2G_OS/B2G_OS_build_prerequisites +--- +

 

+
+ 중요: 번역은 제가 필요한 부분 및 확인 가능한 부분만 진행 하였으며 변역된 날자는(2013/02/25)이며 문서 변경이 잦아 오늘 이후는 원문과 번역이 다를 수 있습니다. 참고하세요. 미 번역/변경된 부분은 추가로 다른 분이 해 주실 것으로 믿습니다.
+
+

Firefox OF 빌드 코드를 받기 전에, 빌드 환경을 먼저 구축 하셔야 합니다. 현재까지는 리눅스 64비트 버젼 및 맥 OS X에서만 빌드 하실 수 있습니다.

+
+
+
Note: Firefox OS를  올리기 위한 스마트폰을 빌드 시작전에 컴퓨터에 연결하지 마십시오, 언제 연결할지 알려 줄 것입니다.
+
+

지원되는 단말기 및 에뮬레이터

+

몇몇의 단말기가 지원되기도 하지만, 어떤 단말기에서는 다양하게 변경이 가능합니다. 지금까지는 특별한 목적(특징)으로 분류되어 있습니다. 그리고 어떤 기기는 다른 기기들보다 지원이 더 잘되기도 합니다.

+

분류1

+

분류1 에 속하는 기기는 개발의 주요 대상이 되는 기기며 전반적으로 기능의 첫 번째 구현 대상 혹은 최신 버그들이 처음으로 수정되는 대상 기기입니다.

+
+
+ 오토로
+
+ 오토로는 중저가 스마트폰의 플랫폼 개발 혹은 테스트용으로 사용됩니다. 많은 핵심 Firefox OS개발에 사용되는 기기입니다
+
+ 에뮬레이터 (ARM and x86)
+
+ 에뮬레이터는 ARM코어와 X86(PC용)코어 두가지가 있습니다.
+
+ Koen
+
+ Keon은 Geeksphone의 초기의 개발자 폰중에 하나 입니다. Koen은 Geeksphone에서 빌드 방법을 제공합니다.
+
+ 데스크탑
+
+ 데스크탑용 Firefox OF도 있습니다; 이는 XULRunner application에서 Gecko를 실행 하는 것이며, Gaia user experience를 Gecko에서 사용 가능합니다.
+
+
+
+ Flame
+
+ Flame은 Mozilla의 새로운 표준 Firefox OS의 기준 폰입니다. ZTE Open C를 위한 빌드를 할 때 Flame의 설정을 사용해야 합니다. Flame과 Open C는 안드로이드 젤리빈이 기반 시스템 입니다.
+
+

당연히, 데스크탑 클라이언트를 빌드 할 수 있으며 단말기 없이도 에뮬레이터를 사용할 수 있습니다..

+

분류 2

+

분류 2의 단말기들은 기본기능 개발을 위해(특히 어플리케이션 개발자들) 사용 됩니다. 그렇기 때문에 분류 1다음으로 최신 코드들이 반영됩니다.

+
+
+ Samsung Nexus S
+
+ 넥서스 S로 잘알려진 모델로 상세 모델로는 GT-I9020A, GT-I9023이기도 합니다. 그외 넥서스 S모델들도 사용 가능합니다.
+
+ Samsung Nexus S 4G
+
+ 모델명 SPH-D720가 분류 2에 포함 됩니다.
+
+

분류 3

+

Firefox OS가 아래와 같은 단말기 들로 빌드 될 수도 있지만, 코어 개발 및 기본 기능들이 실제로 잘 반영되지 않아 정상적으로 동작 하지 않을 수도 있습니다. 분류 1, 2보다 안정성이 떨어지므로 참고하시기 바랍니다.

+
+
+ Samsung Galaxy S2
+
+ 모델 명 i9100; 다른 모델은 호환되지 않을 수 있습니다. (NFC칩만 추가된 i9100P모델인 경우에는 동작 할 수 있습니다.)
+
+ Samsung Galaxy Nexus
+
+ 최근에는 지원되지 않는 모델입니다.
+
+ Nexus 4
+
+ IRC에 일부 사용자들이 성공적으로 테스트를 했습니다. Android 4.4를 처음으로 실행 하면 Android 4.3을 재 Flash를 요구 할 수 도 있고 그렇지 않을 수 도 있습니다.( 안드로이드 이미지는 구글로 부터 이용할 수 있다.)
+
+ Nexus 5
+
+ IRC에 일부 사용자들이 성공적으로 테스트를 했습니다. 
+
+ Tara
+
+ Tara is another testing device. Manifest of Tara is in master branch only. The script of getting Tara code is "BRANCH=master ./config.sh tara".
+
+ Unagi
+
+ 우나기는 중저가 스마트폰의 플랫폼 개발 혹은 테스트용으로 사용됩니다. 많은 핵심 Firefox OS개발에 사용되는 기기입니다.
+
+ 판다보드
+
+ 판다보드는 모바일용 플랫폼으로 사용되는 OMAP 4 시스템용 보드 개발용으로 사용됩니다.
+
+  
+
+  
+
+  
+
+
+ 중요: 단말기는 최소한 안드로이드 4 (즉 아이스크림 샌드위치)가 지원되어야 합니다. 위에 언급된 단말기중 안드로이드 4보다 낮은 버젼이라면 업데이트 하시기 바랍니다.
+
+

분류 2와 분류 3 단말은 홈 버튼이 없다

+

분류 1의 모든 단말은 하드웨어 홈 버튼이 있어서 사용자가 홈 스크린으로 돌아갈 수 있습니다. 최근 대부분의 ICS 안드로이드 단말은 네비게이션을 위해서 화면상에 소프트웨어 홈 버튼을 사용합니다. 카메라 앱 같이 몇몇 앱에서는 하드웨어 홈버튼 없이 앱을 빠져나올 수 없습니다. 이것은 FireFox OS가 매일매일 사용하는데 부적절할 수 있게 합니다.

+
+

 

+

리눅스 요구사항

+

리눅스에서의 빌드 환경은 아래와 같습니다:

+ +

위의 사항은 단순히 최소사양이며, 가끔은 리소스가 없어서 빌드 실패가 되기도 합니다.

+

다른 리눅스 배포판에서도 빌드가 될수도 있으나, 우분투 12.04 배포판에서는 대부분의 개발자들이 빌드에 성공 했으므로 이를 추천 합니다. 아래 배포판들은 다음과 같은 이유로 빌드 되지 않을 수 있습니다.: 32 비트 디스트로 와 최신 디스트로( 우분투 12.10, 페도라 17/18, 아크 리눅스의 gcc 4.7으로 인해 오류 발생 가능성 있음).

+

그외 아래와 같은 툴들이 설치 되어 있어야 합니다:

+ +

64 비트에서의 설치 예시:

+

우분투 12.04 / 리눅스 민트 13 / 데비안 6

+
$ sudo apt-get install autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib git ia32-libs lib32ncurses5-dev lib32z1-dev libgl1-mesa-dev libx11-dev make zip
+

64비트 우분투에서 빌드할때는, 32비트 버전의 libX11.solibGL.so를 심볼릭 링크로 추가 하셔야 합니다.

+
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
+$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
+

우분투 12.10

+
$ 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
+

위의 단계 외 추가로, 빌드 하기 전에 GCC 4.6를 기본 호스트 컴파일러로 설정 하여야 합니다. 소스를 가저 온 후에는 "여기" 참고 하세요.

+

최신 우분투 12.10을 설치 한후, "unmet dependenceis for ia32-libs"에러가 발생 할 것입니다. 아래와 같이 수행 하여 수정 하시기 바랍니다.

+
sudo dpkg --add-architecture i386
+sudo apt-get update
+sudo apt-get install ia32-libs
+

Fedora 16:

+
$ 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
+

Fedora 17/18:

+
$ 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
+

위와 같이 프로젝트는 컴파일 하려면 GCC 4.4가 필요합니다. 여기서 미리 컴파일된 버전을 구할 수 있으니 아래 명령을 따라 다운로드후 /opt에 설치하세요:

+
$ wget http://people.mozilla.org/~gsvelto/gcc-4.4.7-bin.tar.xz
+$ sudo tar -x -a -C /opt -f gcc-4.4.7-bin.tar.xz
+
+

이 컴파일러를 항상 호스트의 기본 컴파일러로 지정한 후에 빌드 작업을 해야합니다. 소스를 얻은 후에  here를 따라 확인해 주세요.

+

Arch Linux (not functional yet):

+
$ sudo pacman -S --needed alsa-lib autoconf2.13 bison ccache curl firefox flex gcc-multilib git gperf libnotify libxt libx11 mesa multilib-devel wireless_tools yasm lib32-mesa lib32-ncurses lib32-readline lib32-zlib
+

기본적으로 Arch 리눅스는 Python3을 사용하는데 이것을 이전 Python2로 사용해야 합니다:

+
$ cd /usr/bin
+
+$ sudo ln -fs python2 python
+

Mac OS X를 위한 요구사항

+

Mac OS X에서 Firefox OS를 빌드하기 위해서 Xcode 명령라인 도구들을 설치해야 합니다.

+

Apple's developer downloads page 에서 OS X의 특정 버전에 적절한 명령라인 도구를 바로 다운로드 해서 사용할 수 있습니다.

+

 

+

그러나 Xcode 전체를 사용하고자 하면 Mac App Store에서 설치할 수 있습니다.

+

XCode 4.3.1 이상 최신버전에서 명령라인 도구 설치하기

+

Xcode 4.3.1(OS X 10.7 "Lion")과 최신 4.4.1+(Mac OS X 10.8 "Mountain Lion")은 명령라인 도구를 포함하고 있지 않습니다. Xcode의 Preferences 메뉴로 가서 Downloads 패널로 갑니다. 이곳에서 'Command Line Tools'를 설치합니다. 설치를 위해서 최소 20 GB 공간의 여유가 있어야 합니다.

+

Screenshot of Xcode Downloads Command Line Tools

+
+ Note: Firefox OS 에뮬레이터는 Core 2 Duo 프러세스 혹은 그 이상을 요구합니다; 즉 Mac OS X 10.7 "Lion"에 호환되야 합니다. 그러나 이전 Mac OS에서도 Firefox OS를 빌드할 수는 있습니다.
+

Firefox OS Mac Bootstrap

+

터미널을 열고 아래 명령을 실행합니다:

+
curl -fsSL https://raw.github.com/mozilla-b2g/B2G/master/scripts/bootstrap-mac.sh | bash
+

It 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. The script will check for and install the following items:

+ +
+

Xcode

+

If you have already upgraded to Xcode 4.4+ and get the message that Xcode is outdated, check the Xcode path with:

+
xcode-select -print-path
+ If it still points to /Developer you can update the path with: +
sudo xcode-select -switch /Applications/Xcode.app
+ Next to that be sure that you have the Mac OS X 10.6 SDK available at: +
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
+

If it cannot be found there you will need to extract and copy it from the Xcode 4.3 DMG file which is available at the Apple Developer portal. You can use the utility Pacifist to extract the 10.6 SDK. Be sure to add a symlink to it to the /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ directory. (We can drop the 10.6 SDK requirement after bug 784227 has been fixed, and our version of platform_build has been updated.)

+

Mountain Lion

+
+

If you are building on OS X 10.8 "Mountain Lion" (Xcode 4.4.1 or later) and encounter the following error:

+
external/qemu/android/skin/trackball.c:130:25: error: 'M_PI' undeclared (first use in this function)
+ Edit the file: B2G/external/qemu/Makefile.android and add in line 78:
+
MY_CFLAGS += -DM_PI=3.14159265358979323846264338327950288   #/* B2G_fix: not finding M_PI constant */
+
+
+ If you are on Mountain Lion and you receive an error during the installation of the dependencies via homebrew, such as:
+
+
+
+
clang: error: unable to execute command: Segmentation fault: 11
+ ... try reinstalling the dependency manually adding the --use-gcc flag, for example: +
brew install mpfr --use-gcc
+
+

Samsung Galaxy S2

+

If you plan to build for the Samsung Galaxy S2, you will also need to install heimdall. See Installing heimdall for details. This is not done for you by the bootstrap script!

+
+ Note: If you have installed the Samsung Kies 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 will not work 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 ~/Library/Application Support/.FUS, and leaves a reference to a utility there in your user startup items list. You will want to remove these manually.
+
+ Note: Mac OS X uses a case insensitive filesystem by default, which will prevent you from building Firefox OS down the road (EDITOR'S NOTE: I have never had a problem with this).  You should create a case sensitive sparse disk image work from within that directory.  To buld the case sensitive disk image:
+
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/firefoxos.dmg
+

Mount the drive with:

+
open ~/firefoxos.dmg
+

Change into the mouted drive with:

+
cd /Volumes/untitled/
+

Fix libmpc dependency if broken

+

gcc 4.6 was built with libmpc 0.9; if you then use homebrew to update packages, libmpc gets updated to version 1.0, but homebrew doesn't rebuild gcc 4.6 after the library version changes. So you need to create a symlink to make things work again, like this:

+
cd /usr/local/lib/
+ln -s libmpc.3.dylib libmpc.2.dylib
+

Optional: Install HAX

+

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 download and install it. It's not required, but it can improve emulation performance and stability.

+

adb 설치

+

B2G를 단말기에 설치 하기 전에 기존에 단말기에 설치된 안드로이드를 꺼내 저장 해 두시기 바랍니다. 이 를 위해서는 adb(Android Debug Bridge)를 설치 하셔야 합니다.

+

adb를 설치 하기 위해서는 Android SDK starter package를 데스크 탑에 설치된 OS에 맞는 것을 설치 하셔야 합니다.(ADT Bundle만 설치 하셔도 됩니다). 설치 후, 패키지 메니저를 실행 하여 "Android SDK Platform-tools"를 설치 하세요.

+

adb는 $SDK_HOME/platform-tools에 설치 될 것입니다. 설치 후에는 PATH에 아래 경로를 추가 하세요.

+
PATH=$SDK_HOME/platform-tools:$PATH
+

~/.bashrc파일에 $SDK_HOME가 있으면 그 경로를 자신이 설치한 Android sdk의 경로로 대체 하세요.없을시는 환경 설정을 추가 하세요. 그리고 아래와 같이 실행 하시면 단말기의 Android 전체 system폴더의 내용을 원하는 backup target dir로 가져옵니다:

+
adb pull /system <backup target dir>/system
+
+

이는 나중에 B2G를 제거 하고 Android로 복원할 수 있습니다. 단말기에 따라 /data폴더와 /vendor폴더도 복사 해야 하는 경우도 있습니다.

+
adb pull /data <backup target dir>/data
+adb pull /vendor <backup target dir>/vendor
+
+

"권한 없음(insufficient permission)"메시지와 함께 복사가 되지 않는 경우, adb server를 제 실행 해 보거나, adb tool에 루트권한(root permissions)이 주어졌는지 확인 하세요. (eg. under CyanogenMod, change 'Settings > System > Developer Options > Root Access' to 'Apps and ADB' or 'ADB only').

+

Install heimdall

+

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 not needed for any other device. For other devices, we build and use the fastboot utility instead.

+
+ Note: Again, it's important to note that this is only required for installing Firefox OS on the Samsung Galaxy S2.
+

There are two ways to install heimdall:

+ +

ccache 설정 변경

+

기본 ccache 크기는 1GB로 되어 있습니다. B2G 빌드시 이는 부족한 크기이므로 아래와 같이 크기를 변경 해야 합니다.

+
$ ccache --max-size 3GB
+

udev rule에 개발 단말기 환경 추가

+

"lsusb"를 실행하면 현재 연결된 단말기의 USB vendor ID를 보실 수 있습니다.대부분의 구글 단말기는 "18d1"이며, 삼성은 "04e8", ZTE는 "19d2"이므로 /etc/udev/rules.d/51-android.rules파일(해당 파일이 없으면 생성하세요)에 아래 "xxxx"부분에 해당 단말기의 id로 변경하여 추가 하세요.

+
SUBSYSTEM=="usb", ATTR{idVendor}=="XXXX", MODE="0666", GROUP="plugdev"
+

ZTE단말기를 예로 들면, 51-android.rules파일에 아래와 같이 추가하세요.

+
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", GROUP="plugdev"
+

위와 같이 추가 한 후에는 저장, 종료 후에 "읽기 모드"를 아래와 같이 변경해 주세요.

+
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
+
+

위와 같이 추가 한 후에는 adb명령을 수행 하면 아래와 같이 단말기를 adb에서 인식 할 수 있게 됩니다.

+
$adb devices
+List of devices attached
+123456          device
+
+ 위와 같이 단말기가 나타나지 않는다면, 해당 파일이름이 맞는지, 연결이 잘되었는지, 확인 한 후 컴퓨터를 재시작 하고 위의 명령을 수행 해 보세요.
+

단말기를 개발자 모드로 바꾸기

+

단말기를 USB에 연결하기 전에 아래와 같은 메뉴에서 단말기를 개발자 모드로 변경 하세요. 개발자 모드를 바꾸고 나면 디버깅과 단말기로 다운로드를 하실 수 있습니다. 설정(Settings) -> 단말기 정보(Device information) -> 모드 정보(Mode Information) -> 개발자(Developer) -> 개발자 모드(enable) Developer mode

+

다음 단계로

+

이제 Firefox OS코드를 가져올 단계로 넘어 가겠습니다.

diff --git a/files/ko/archive/b2g_os/firefox_os_faq/index.html b/files/ko/archive/b2g_os/firefox_os_faq/index.html new file mode 100644 index 0000000000..adf78f75aa --- /dev/null +++ b/files/ko/archive/b2g_os/firefox_os_faq/index.html @@ -0,0 +1,39 @@ +--- +title: Firefox OS FAQ +slug: Archive/B2G_OS/Firefox_OS_FAQ +translation_of: Archive/B2G_OS/Introduction +--- +
+
+ 개발자용 테스트폰 구매는 어떻게 하나요?
+
+ Geeksphone 웹 사이트로 부터 바로 구매할 수 있습니다.
+
+ 개발자용 테스트폰이 없이도 개발 가능한가요?
+
+ 물론입니다. Firefox Marketplace를 안드로이드폰에서도 테스트해 보실 수 있으며, PC 데스크톱에서 Firefox OS simulator를 이용하실 수 있습니다.
+
+ 최종 출시폰과 비교하면 어떤가요?
+
+ 일반 소비자 시장에 맞추어 몇몇 파트너들과 함게 개발중인데 좀 더 시간이 지난 후에 공개할 수 있을 것 같습니다. 
+
+ Firefox OS를 저의 폰에 설치해 볼 수 있습니까?
+
+ 다음 문서를 참고 하십시오. https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Building_and_installing_Firefox_OS
+
+ 제가 만든 앱을 어떻게 Firefox OS에서 테스트할 수 있나요?
+
+ 안드로이드폰의 Marketplace나 Firefox OS simulator를 이용하시면 됩니다.
+
+ Firefox OS란 무엇인가요?
+
+ 새로운 개념의 개방형 모바일 웹 운영 체제로서 웹 표준에 의해 만들어지며 Web API를 통해 HTML5 기술을 사용하여 직접 휴대폰 기능을 제어할 수 있고, 네이티브 수준의 앱 기능을 제공할 수 있습니다. 
+
+  Web API의 목록 및 표준화 정도는?
+
+ 많은 WebAPI가 Firefox OS의 초기 구현에 사용되었으며 아래 목록에서 살펴 보실 수 있습니다.   https://wiki.mozilla.org/WebAPI#APIs. =>표준화 진행 상태.
+
+ Web API는 크로스플랫폼으로 표준화가 되나요?
+
+ 그렇습니다. API는 여러 벤더들과 함께 제작하여 다양한 플랫폼을 지원하게 되며 Web App이 직접 스마트폰을 제어할 수 있도록 크로스플랫폼을 지원할 수 있는 표준 방법을 제공할 것입니다. 
+
diff --git a/files/ko/archive/b2g_os/index.html b/files/ko/archive/b2g_os/index.html new file mode 100644 index 0000000000..230fd0ce6c --- /dev/null +++ b/files/ko/archive/b2g_os/index.html @@ -0,0 +1,181 @@ +--- +title: B2G OS +slug: Archive/B2G_OS +tags: + - B2G + - B2G OS + - B2G OS 시작하기 + - Basic + - Beginner + - Firefox OS + - FirefoxOS 시작하기 + - Gaia + - Gonk + - Overview + - Starting FirefoxOS + - web based os from mozilla + - web os gecko + - 기본 + - 모질라 재단이 만든 웹 기반 OS + - 초보자 +translation_of: Archive/B2G_OS +--- +

 

+ +
B2G OS는 오픈 웹을 위한 완전하고 독립적인 운영체제입니다. B2G OS는 Mozilla 커뮤니티가 개발하는 오픈소스 프로젝트이며, Firefox OS 상품의 기반이 되고 있습니다. 2017년부터 더이상 유지보수되지 않습니다.
+ +

B2G는 스마트폰, 태블릿, 스마트 TV, 그 외 커넥티드 디바이스를 위한 오픈소스 운영체제이며, 커뮤니티에 의해 관리되고 있습니다. 이 프로젝트는 2011년에 시작됐습니다. B2G는 리눅스 커널과 Gecko 렌더링 엔진을 바탕으로 하고 있습니다. 사용자 인터페이스 전체가 웹 기술(HTML, CSS, JavsScript)로 만들어져있으며, 이 사용자 인터페이스를 통해 웹 애플리케이션을 실행하고 이용할 수 있습니다. Mozilla가 상용 Firefox OS 스마트폰 개발을 종료하면서 B2G의 스마트폰 부분은 Mozilla의 자발적 커뮤니티가 개발하게 되었습니다. 이와 함께 B2G OS로 브랜드를 바꾸게 되었습니다.

+ +

+ +

페이지 목록

+ +
+
B2G OS 테스트
+
이 페이지는 B2G OS를 테스트하는 데 필요한 정보를 제공합니다. 서로 다른 테스트의 진행, 자동화, 결과 보고 및 추적에 대한 내용이 포함됩니다.
+
B2G OS 부가기능
+
부가기능을 개발하기 위해서는 문서의 내용을 따라 진행해야 합니다.
+
B2G OS APIs
+
B2G OS API의 목록입니다.
+
B2G OS 아키텍처
+
이 글은 B2G OS 플랫폼의 아키텍처에 대한 고수준 개요 글입니다. 주요 특징을 설명하고 각 구성요소가 기초 수준에서 어떻게 상호작용하는 지 설명합니다.
+
B2G OS build prerequisites
+
단순히 Gaia의 빌드를 시도하고 있는 것뿐이라도, B2G OS를 빌드하기 위해 코드를 얻기 전 빌드 시스템을 제대로 설정해야 합니다. — 이 페이지는 그 방법을 설명합니다. 현재 빌드를 지원하는 OS는 64비트 리눅스 및 macOS입니다.
+
B2G OS 단말기 가이드
+
이 글은 B2G OS를 구동하는 단말기에 대한 개발자 정보를 제공합니다. 개발자 단말기 및 소비자용 단말기 모두 포함되어 있습니다.
+
B2G OS의 빌드와 설치
+
이 페이지에 나열된 글은 B2G OS를 에뮬레이터나 호환 기기에서 빌드하고 설치하는 방법, 혹은 Gaia 사용자 인터페이스를 Firefox 브라우저에서 빌드하고 설치하는 방법을 안내할 것입니다.
+
B2G OS 빌드하기
+
빌드 시스템을 설정하고, 코드의 초기 pull 작업 및 설정 작업을 진행하면, Boot to Gecko를 빌드할 수 있게 됩니다. 이 설명서는 어떻게 B2G OS를 빌드하는 지 설명합니다.
+
Building the B2G OS Simulator
+
Just like Firefox Nightlies, the B2G OS simulator desktop client (identified by b2g-) is automatically built every day from the latest source code. The latest build is available from the Mozilla FTP server. Be sure to pick the latest version and the right archive for your operating system. This lets you bypass having to build it yourself. In addition, you don't have to download Gaia on your own either.
+
Choosing how to run Gaia or B2G
+
Depending on your specific needs, you have an assortment of options to consider when experimenting with Firefox OS or the Gaia user interface. You can choose among the following options; each has its advantages and disadvantages to consider, and some are more flexible than others.
+
Crash Reporting Guide for Firefox OS Partners
+
Mozilla has a world-class system for collecting, analyzing, and fixing crashes and other stability issues such as hangs. Firefox OS partners need to work with Mozilla to correctly enable crash reporting and upload symbols.
+
Customization with the .userconfig file
+
The .userconfig file isn't checked into source code control, so your changes won't be overwritten when you update your source tree. It needs to be created in the root of the B2G tree; that is, in the same directory as flash.sh, build.sh, and so forth. You should add this before you run your config and build steps.
+
Debugging on Firefox OS
+
There are two main types of debugging you'll want to with Firefox OS: debugging apps, and debugging other aspects of the system.
+
Developer Mode
+
The current Firefox OS permissions model precludes modification and installation of certified/internal apps, which makes some device APIs completely unavailable to Marketplace and web apps. Developer Mode (DM) allows the user to indicate that they would like to relax the permissions model and expose all device APIs to content, as well as setting a group of related preferences. This article provides a high-level overview.
+
Developing Firefox OS
+
This section provides useful documentation covering different ways in which Firefox OS (codename Boot2Gecko, or B2G) can be modified/customized during the build process, and how you can help to develop the low level platform areas such as Gecko and Gonk.
+
Firefox OS apps
+
This section of the Firefox OS docs covers the specific techniques required — and available tools — for building Firefox OS apps. You'll find a number of details below, from Firefox OS building blocks/web components, to device APIs and App installation.
+
Firefox OS board guide
+
This section contains developer information relevant to specific phones that run Firefox OS — both developer and consumer devices.
+
Firefox OS developer release notes
+
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.
+
Firefox OS security
+
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.
+
Firefox OS Simulator
+
The Firefox OS Simulator is a version of the higher layers of Firefox OS that simulates a Firefox OS device, but runs on the desktop. This means that in many cases, you don't need a real device to test and debug your app. It runs in a window the same size as a Firefox OS device, includes the Firefox OS user interface and built-in apps, and simulates many of the Firefox OS device APIs.
+
Firefox OS usage tips
+
Explains all of the developer features on the phone and what they do (Settings > Device information > More information > Developer)
+
Gaia
+
Gaia is B2G OS's user interface and suite of default apps: it includes the lock screen, home screen, dialer, and other applications. Essentially, Gaia is a set of complex web apps that runs on top of the B2G OS platform. This set of articles covers all you need to know to contribute to the Gaia project.
+
Installing B2G OS on a mobile device
+
Once you've built Boot to Gecko for a supported mobile device, you can install it. This article will guide you through the process.
+
Introduction to Firefox OS
+
This set of documentation is aimed mainly at web developers and platform developers who want to learn how Firefox OS works, how to contribute to the project, and how to build their own custom versions of the software and install it on devices. For those who want to create and distribute their own web apps, the App Center and Marketplace Zone are good places to go.
+
Mulet
+
Following this guide you're going to run Gaia inside of a special build of Firefox called Firefox Mulet. This gives you the advantages of having a rapid development cycle, as well as standard web development tools and debuggers available to work with. First of all, you need to have the Gaia repo cloned on your machine and build your own profile. Then, you have to install mulet and run it, passing your Gaia profile as the profile to use.
+
Open web apps quickstart
+
Quickstart information on coding Open Web Apps.
+
Pandaboard
+
This is a guide to setting up Firefox OS on a PandaBoard. The PandaBoard is a low-cost OMAP 4 based development board for developing mobile operating systems.
+
PasscodeHelper Internals
+
PasscodeHelper is a Gaia helper library for modifying and checking the Firefox OS lockscreen passcode (i.e., pin) from within Gaia, performing functions such as checking whether an entered passcode is correct, and changing the code. This article documents how PasscodeHelper works.
+
Porting B2G OS
+
This page lists the available resources for porting B2GOS.
+
Preparing for your first B2G build
+
Depending on your internet connection, the configuration steps may take several hours to download everything you need to build B2G OS. Waiting is not as fun as doing, so after you have read through this page and have kicked off the configure script, consider using the time to set up and try out the B2G OS simulator, begin familiarizing yourself with Documentation for app developers including Designing and Building an App, or familiarize yourself with the information on upcoming steps.
+
Resources
+
Resources for App hackers, as generated from our workshops
+
Running tests on Firefox OS: A guide for developers
+
If you are a Gecko developer, then you should review the Firefox OS-specific documentation for the test automation you are already familar with: mochitest, reftest, and xpcshell.
+
The B2G OS platform
+
The B2G OS platform consists of many components. While you don't need to understand its architecture in order to build applications that run on B2G OS, if you're working on developing or porting the platform — or are simply curious — the following documentation may be of interest to you.
+
Troubleshooting B2G OS
+
This article provides tips for resolving common problems you may have while using B2G OS.
+
Using the App Manager
+
The App Manager is a tool for Firefox Desktop which provides a number of useful tools to help developers test, deploy and debug HTML5 web apps on Firefox OS phones & Simulator, directly from Firefox browser. This page documents how to use the App Manager.
+
Using the B2G emulators
+
This article provides a brief guide to some key things you should know when using the boot to Gecko emulators. This doesn't appear to be a complete user manual; instead, it simply tells you a few useful things that you might not learn on your own.
+
Web applications
+
This page is intended to be a first, non thorough, attempt to collect web apps.
+
Web Bluetooth API (Firefox OS)
+
The Web Bluetooth API lets an open web app discover, pair with, and connect to Bluetooth devices. As it is a completely experimental and non-standard API, the Bluetooth API is currently available for certified applications only. However, there is some traction to have such an API available for regular Web content; this will be discussed as part of the W3C's System Applications Working Group.
+
Web Telephony API
+
Web Telephony is an API that makes it possible for web content to handle voice phone calls using JavaScript.
+
+ +
+

오래된 페이지 항목

+ +
+
+

주목: 더 많은 사람들을 참여시키기 위해 공헌 요청앱 채택 요청 문서가 있습니다. 공유해주세요!

+
+ +

여러분의 도움이 필요한 곳

+ + +
+ +
+

참여하기

+ + +
+ +
+

지원 디바이스

+ +

B2G OS가 구동되는 지원 스마트폰 정보:

+ + + +

더 자세한 사항은 여기에서.
+ B2G installer를 이용하면 쉽게 설치할 수 있습니다.
+ 여러분의 디바이스가 목록에 없나요? 데스크탑에서 Mulet 를 써보세요.

+
+
+ +
+

주목: 오래된 몇몇 페이지는 MDN Archive로 이동되었습니다. 예전 문서는 아카이브에서 확인해주세요. 아카이브에서 되돌려져야할 문서가 있으면 알려주세요.

+
diff --git a/files/ko/archive/b2g_os/installing_on_a_mobile_device/index.html b/files/ko/archive/b2g_os/installing_on_a_mobile_device/index.html new file mode 100644 index 0000000000..3269212b44 --- /dev/null +++ b/files/ko/archive/b2g_os/installing_on_a_mobile_device/index.html @@ -0,0 +1,61 @@ +--- +title: 단말기로 Firefox OS 다운로드 하기 +slug: Archive/B2G_OS/Installing_on_a_mobile_device +translation_of: Archive/B2G_OS/Installing_on_a_mobile_device +--- +

+
+ 중요: 번역은 제가 필요한 부분 및 확인 가능한 부분만 진행 하였으며 변역된 날자는(2013/02/26)이며 문서 변경이 잦아 오늘 이후는 원문과 번역이 다를 수 있습니다. 참고하세요. 미 번역/변경된 부분은 추가로 다른 분이 해 주실 것으로 믿습니다.
+

일단 Boot to Gecko의 빌드가 완료 되고 나면 단말기로 인스톨 할수 있게 됩니다.여기서는 이와 같은 과정에 대해 설명 하도록 하겠습니다.

+
+ Note: 처음 단말기로 Firefox OS를 다운로드 해 넣을 경우 반드시 해당 단말기의 OS가 안드로이드 4 (아이스크림 샌드위치)이어야 합니다. 그렇지 않을 경우 제대로 다운로드가 되지 않을 것입니다. 그러나 한번 B2G를 다운로드 하고 나면 그 다음 부터는 단순하게 맨위 업데이트 부터 진행 하시면 됩니다.
+

폰으로 다운로드 하기

+

폰으로 다운로드 하는 방법은 단순하게 단말기를 연결 한 후 아래와 같이 수행 합니다.

+
./flash.sh
+
+

이게 다입니다. 막 빌드 완료한 당신의 B2G 이미지가 당신의 폰으로 들어갔습니다.

+

udev rule에 단말기 환경 설정

+

리눅스에서 아래와 같은 메시지가 나타난다면,

+
< waiting for device >
+

아마도 udev rule에 단말기 정보 추가 하는 것을 잊어 버린 것이 아닌지 확인 해보세요. "lsusb"를 실행해 보면 단말기의 USB vendor ID를 확인 할 수 있으니 아래와 같이 추가하세요. 대부분의 구글단말기 ID는 18d1입니다. 구글 ID로 추가 하는 아래 예시를 참고하세요.

+
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
+
+ 주의 1: 리눅스에서 'libusb error "-3"'가 발생한다면 루팅 권한이 필요하다는 의미 입니다.  '>sudo ./flash.sh'를 입력 해 보세요.
+
+ 주의 2: 만약 타겟 단말기가 우나기라면, udev rule에 단말기 vendor ID와 구글 ID 두가지를 다 추가 하세요.
+

삼성 Galaxy S2 단말기인 경우 특별한 주의사항들

+

만약 타겟 단말기가 Galaxy S2이고 heimdall 1.3.2 버젼 (가장 최근 버젼임. 버젼 확인은 hiemdall version 명령어 사용) 을 사용한다면, "Heimdall flashing failed" 메시지 이후에 "FACTORYFS upload failed!" 메시지를 포함한 추가적인 정보가 출력되는 것을 보실수도 있습니다. 이 메시지는 uploading이 성공한 경우이니, 해당 경고 메시지는 무시하셔도 됩니다.

+

이 비정상적인 행동을 제거하기 위해서는 heimdall의 1.3.1의 release된 source copy를 얻은 후에 ("git checkout fbbed42c1e5719cc7a4dceeba098981f19f37c06" 명령어 사용), README file의 정의에 따라 컴파일을 하십시요. 컴파일 이후에 install을 하시면 그 에러 메시지는 사라질 것입니다. 하지만, 이 방법은 강력하게 요구되어지는 않습니다.

+

Heimdall 도구의 모든 version에서 100MB 보다 큰 system.img 화일을 update를 할 수는 없습니다. 따라서 굽기 전에 다음 명령어를 실행하여 build된 system.img 화일의 크기를 확인해야 합니다. 만약 크기가 너무 크다면 IRC 내에서 문의하시기 바랍니다. 크기가 큰 경우에는 두 단계로 update를 분리할 수 있는 방법들이 있습니다.

+
ls -l ./out/target/product/galaxys2/system.img
+
+

Samsung Galaxy S2의 추가 작업

+

Galaxy S2로 작업 할 경우, 다음과 같은 추가 작업이 필요합니다. Galaxy S2는 flash.sh script를 통해 Gaia는 다운로드가 되지 않습니다. 따라서 아래와 같이 추가 작업을 실행 해야 합니다.

+
./flash.sh gaia
+
+

특정 영역 다운로드 하기

+

Samsung Galaxy S2를 제외한 다른 모든 단말기에서 특정 영역을 다운로드 하려면 아래와 같이 하세요.

+
./flash.sh system
+./flash.sh boot
+./flash.sh user
+
+

특정 모듈 다운로드 하기

+

아래와 같이 특정 모듈이름으로 B2G의 특정 모듈만 다운로드도 가능합니다.

+
./flash.sh gaia
+./flash.sh gecko
+
+

특정 어플리케이션만 업데이트 하려면 환경 설정 변수 BUILD_APP_NAME 를 통해서 가능합니다.

+
BUILD_APP_NAME=calendar ./flash.sh gaia
+

다음 단계

+

이 단계에서, 당신의 타켓은 Boot to Gecko!를 실행시킬 수 있을 것입니다. 이제 실험하고, 코드를 작성하고, 테스트 하고 디버깅을 하실 시간입니다.

+
+ Note: 도움이 되는 사용 팁 : 만약 타켓이 잠겨있어서 타겟의 잠금을 해제할 필요가 있을 때는 default 숫자는 0000 입니다.
+

문제 해결방법

+

B2G를 설치한 후에 타겟이 정상적으로 동작하지 않는 경우에 대비하여 몇 가지 tip을 알려 드립니다.

+

UI가 시작되지 않는다면

+

만약 당신의 타겟이 update되고, UI가 정상적으로 실행되지 않는다면, 오래된 configuration을 초기화 할 수 있습니다. 다음은 그 방법입니다.

+
cd gaia
+make reset-gaia
+
+

./flash.sh 실행 후에 "image is too large" 에러 메시지가 출력되는 경우

+

이 메시지는 이미지를 flash에 writing하기 전에 당신의 타겟이 rooting될 필요가 있음을 뜻할 수 있습니다. b2g는 root partition 영역에 data를 writing 할 필요가 있으므로 당신의 타겟은 b2g image를 정상적으로 설치하기 위해서 rooting 되어져야 합니다.

diff --git a/files/ko/archive/b2g_os/introduction/index.html b/files/ko/archive/b2g_os/introduction/index.html new file mode 100644 index 0000000000..17dc0720e9 --- /dev/null +++ b/files/ko/archive/b2g_os/introduction/index.html @@ -0,0 +1,83 @@ +--- +title: Firefox OS 소개 +slug: Archive/B2G_OS/Introduction +translation_of: Archive/B2G_OS/Introduction +--- +

Firefox OS ( "Boot to Gecko" 혹은 "B2G" 라는 코드네임)는 Linux와 Mozilla의 Gecko 기술을 기반으로 한 Mozilla의 오픈 소스 모바일 운영체제입니다. 기본적인 생각은 스마트폰 위에서 동작하는 사용자가 접근 가능한 모든 소프트웨어는 웹 기반 앱이며, 진화한 HTML5 기술을 사용하고 JavaScript가 기기 API를 이용해 스마트폰의 하드웨어에 직접 접근 합니다.

+

웹 개발자가 제일 이해해야 할 중요한 것은 표현되는 모든 기능 및 앱을 설치 및 실행에 있어 모든 사용자 인터페이스는 웹 기반이라는 것입니다. 사용자 인터페이스에 어떠한 수정을 넣거나 어떠한 애플리케이션을 만드는 모든 일, 특히 모바일 기기의 하드웨어나 서비스에 접근하는 것도 Firefox OS 로 동작하는 웹 페이지입니다.

+

Firefox OS의 빌드나 설치 방법에 대해서는 빌드 및 설치 가이드로 배울 수 있습니다

+

하드웨어 사양

+

Firefox OS는 최신 ARM기반 모바일 기기에서 동작 되도록 포팅 될 것입니다 . 이번 절에서는 Firefox OS가 동작하는 최소/추천 하드웨어 사양에 대해 기술합니다.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
구성품최소사양추천 사양
CPUARMv6Cortex A5 class or better
+ ARMv7a with NEON
GPUAdreno 200 class or better
ConnectivityWiFi
+ 3G
SensorsAccelerometer
+ Proximity
+ Ambient light
+ A-GPS
+

각 단말기들은 통일된 색상 프로파일(그래픽 디바이스 드라이버에서 구현되어 제공된)을 제공 해야 하고, 헤드폰은 일시정지/정지해재 및 정지/재생을 지원해야 합니다. 이와 같은기능은 최근 스마트폰에서는 기본적으로 제공되는 기능입니다.

+

사용법 힌트

+

이 섹션에서는 실제로 Firefox OS를 사용할 때의 힌트를 몇개인가 제공합니다. 이것은 우리가 진짜 사용법의 문서를 작성할 때까지의 플레이스홀더 같은 것입니다.

+

스마트폰의 잠금 해제

+

빌드된 Firefox OS의 시작시에 기기의 잠금을 해제하는 비밀번호가 필요한데, 기본 코드는 0000 입니다. 락 스크린의 개발과 테스트를 실시하고 있는 동안은 일부 빌드에서 필요할 수 있습니다.

+

스크린 캡쳐

+

스크린샷의 캡쳐는 매우 간단해서 전원과 home 버튼을 동시에 누릅니다. 스크린샷의 이미지은 기기상의 /sdcard/screenshots 안에 있습니다.

+

만약, 여러 가지 이유로 동작하지 않을 때는 Firefox OS 빌드 시스템을 설치 한 Linux나 Mac OS X 컴퓨터상의 터미널에서 실행하는 것도 가능합니다.

+
    +
  1. ffmpeg를 반드시 설치 해 주십시오. +
      +
    1. Mac 에서는 MacPorts를 사용할 때는 sudo port install ffmpeg를 실행해 주십시오.homebrew를 사용할 때는 brew install ffmpeg 입니다.
    2. +
    3. Linux (Ubuntu/Debian)에서는 sudo apt-get install ffmpeg를 실행해 주십시오.
    4. +
    +
  2. +
  3. 스마트폰과 컴퓨터는 USB 케이블을 사용해 접속합니다.
  4. +
  5. 스마트폰을, screen shot를 찍고 싶은 상황으로 합니다.
  6. +
  7. cdB2G/gaia 디렉토리로 이동합니다.
  8. +
  9. make screenshot
  10. +
  11. screenshot.png 라는 이름으로, screen shot가 찍히고 있을 것입니다.
  12. +
+

버튼과 컨트롤

+

일반적인 Firefox OS는 물리적인 버튼 몇개를 기본적 필요로 합니다.

+
+
+ 홈버튼
+
+ 이 버튼은 보통 화면의 가운데 아래에 위치합니다. 이 버튼을 선택하면 앱 런처로 갈수 있습니다. 이 버튼을 길게 누르고 있으면 카드 스위칭 뷰를 보여줍니다; 이때 나타나는 앱들을 위로 끌어 올리면 해당 앱은 종료됩니다.
+
+ 볼륨 조정 버튼
+
+ 왼쪽편에 볼륨 버튼이 있습니다; 이 버튼 윗쪽부분은 볼륨을 증가하고, 아래쪽은 볼륨을 낮추게 됩니다.
+
+ 전원 버튼
+
+ 전원 버튼은 단말기의 왼쪽 위에 위치 합니다.
+
diff --git a/files/ko/archive/b2g_os/pandaboard/index.html b/files/ko/archive/b2g_os/pandaboard/index.html new file mode 100644 index 0000000000..af65fd2a0e --- /dev/null +++ b/files/ko/archive/b2g_os/pandaboard/index.html @@ -0,0 +1,36 @@ +--- +title: Pandaboard +slug: Archive/B2G_OS/Pandaboard +translation_of: Archive/B2G_OS/Pandaboard +--- +

이 문서는 PandaBoard에 Firefox OS 올리기 위한 가이드 입니다. PandaBoard는 모바일 운영 체제를 개발하기위한 저가의 OMAP 4 기반의 개발 보드입니다.

+

이 가이드는 SD card가 최소 4 GB의 사용 가능 용량이 있다고 가정합니다.

+

Format the SD card

+

OMAPpedia 가이드를 참조하여 SD card를 Format하세요.

+

USB communication

+

usb를 인식하기 위하여 다음 단계를 따르세요. B2G를 위해 file의 mode 부분을 "0666"으로 사용하는 것이 안전합니다.

+

Verify that the pandaboard is accessible by plugging it in to your computer using USB, and running:

+
lsusb
+

If you see something from Texas Instruments, then you found your pandaboard! If not, I found luck by unplugging all the wires, and only connecting the pandaboard to USB.

+

Building and flashing

+

After configuring for the pandaboard, we now pull in Negatus. This is an agent that runs on the device and can help automate/debug it. Negatus will build itself automatically after you run ./build.sh, but you need to install libnspr(apt-get install libnspr4-dev). After building the image, then tricky part is flashing it onto your pandaboard.

+

Try to follow instructions here, up to and including 'Initial setup, part 3'. You can skip 'Initial setup, part 1' which has been done during the build step. After completing 'Initial setup, part 3' return here.

+

Now you're free to run the ./flash.sh command, and hopefully all will be well. If the flash.sh script tries to erase the userdata partition, remove that line. It's a known issue listed in the instructions.

+

After flashing is complete you may need to manually reboot the machine by unplugging the usb and power cords and plugging them back in (power cord should be plugged in first).

+

Here are the work arounds for known issues:

+

"waiting for OMAP4XXX..." when trying to use usbboot

+

If you see this message, then unplug all cables from the pandaboard. Only plug in the pandaboard via USB. Do not connect power. Try now, and run usbboot as sudo.

+

Fastboot errors while flashing

+

If you're having trouble running commands in fastboot, I found success after running them with sudo (ie: sudo <fastboot command...>)

+

Also, if you have trouble getting your pandaboard into fastboot mode (ie: no devices listed if you do a fastboot devices call), then you can:

+
    +
  1. Unplug all the things from the pandaboard
  2. +
  3. Hold down the GPIO button
  4. +
  5. Plug in the power while still holding the button
  6. +
  7. Watch the solid status light, and once the light starts to flash, let go of the GPIO button
  8. +
+

This will put the pandaboard into fastboot mode.

+

Can't connect to adb

+

If you see the device in lsusb, but not in adb/fastboot devices and the lights are off, then remove the power source and plug it back in. If the lights are on, you may need to wait a while (30seconds max) for it to be registered on adb.

+

Sometimes, flashing will claim to be successful, but it isn't. Reflash the pandaboard (ie: run ./flash.sh) and try again. I recommend plugging in power first, and then plugging in the usb cable

+

If you get on adb devices "??????????? no permision", even as root, check the section "Configuring USB Access" on this site and correct or add the right udev rules. Don't forget to restart the udev service after the changes.

diff --git a/files/ko/archive/b2g_os/phone_guide/index.html b/files/ko/archive/b2g_os/phone_guide/index.html new file mode 100644 index 0000000000..4ac9688347 --- /dev/null +++ b/files/ko/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 +--- +

B2G개발용 단말기를 가지고 있거나, B2G가 설치된 단말기를 가지고 있을경우, 이를 사용하기 위한 기본적인 설명은 다음 링크를 참고 하세요: Firefox OS로 동작하는 단말기에 대한 기본적인 안내서. Mozilla에서는 아직 이에 대해 개선작업을 진행 중이며, 곧 좀더 간결한 설명을 MDN사이트를 통해 제공 할 것입니다. Firefox OS를 빌드하고 단말기에 넣고 싶다면, 다음 링크를 참고 하세요; 'Firefox OS를 빌드하여 단말기에 올리기'.

diff --git a/files/ko/archive/b2g_os/platform/architecture/index.html b/files/ko/archive/b2g_os/platform/architecture/index.html new file mode 100644 index 0000000000..0f34ac448b --- /dev/null +++ b/files/ko/archive/b2g_os/platform/architecture/index.html @@ -0,0 +1,532 @@ +--- +title: Firefox OS architecture +slug: Archive/B2G_OS/Platform/Architecture +translation_of: Archive/B2G_OS/Architecture +--- +

 

+ +
+

초안
+ 이 문서는 작성중입니다.

+
+ +

 

+ +

이 (게시)글은 Firefox OS platform의 구조(architecture)에 대한 고차원적인 개요이며, 주요 개념을 소개하고 구성요소들이 기본레벨에서 어떻게 상호동작 하는지를 설명합니다. 기술적인 레벨에서 어떻게 동작하는지의 복잡한 사항을 알려주지는 않습니다; 각각의 See also 섹션으로부터 참조된 글들을 보시기 바랍니다.

+ +
+

Note: Firefox OS는 이직 정식배포 전의 상품임을 유념해 주십시오. 여기에 설명된 구조(architecture)는 반드시 최종이라 할 수 없으며 변경될 수 있습니다.

+
+ +

Firefox OS 용어

+ +

이 문서를 이해하기 전에 알 필요가 있는 몇 가지 용어가 있습니다.

+ +
+
B2G
+
Boot to Gecko의 약어.
+
Boot to Gecko
+
전체적인 Firefox OS 프로젝트에 대한 코드명입니다. 프로젝트가 공식명칭을 갖기 오래 전 부터 사용되었기 때문에, Firefox OS를 나타내는 용어로 이 용어가 사용되는 것을 볼 수 있습니다.
+
Gaia
+
Firefox OS platform의 사용자 인터페이스. Firefox OS가 구동된 후에 화면에 표시되는 것들은 Gaia 층에서 생성된 것 입니다. Gaia는 최신의 스마트폰에서 기대할 수 있는 잠금 화면, 홈 화면, 그리고 모든 표준화된 어플리케이션들을 구현하고 있습니다. Gaia는 전적으로 HTML, CSS와 JavaScript로 구현되었습니다. 내부의 OS와의 유일한 인터페이스는 개방된 Web API들을 통해 이루어 집니다. 이는 Gecko 층(layer)에 구현되어 있습니다. 제 3자가 개발한 어플리케이션들은 Gaia 층에 나란히 설치될 수 있습니다.
+
Gecko
+
Firefox OS 어플리케이션 런타임; 즉, 공개된 표준의 3가지 펙터(HTML, CSS, JavaScript)에 대한 모든 지원을 제공합니다. Gecko가 지원하는 모든 운영체제상에서 관련 API들이 제대로 동작하는 것을 보장합니다. 이는 Gecko가 다른 여러가지 중에서도, 네트워킹 스택, 그래픽 스펙, 배치(layout) 엔진, JavaScript 버추얼 머신과 포팅 레이어들을 포함하고 있다는 것을 의미합니다.
+
Gonk
+
Gonk는 Firefox OS 플랫폼의 더 낮은 레벨의 운영체제로, (안드로이드 오픈 소스 프로젝트, Android Open Source Project (AOSP)를 기반으로 하는)리눅스 커널과 유저공간의 하드웨어 추상 계층(Userspace Hardware adstraction layer:HAL)로 구성되어 있습니다. 커널과 여러개의 라이브러리들은 일반적인 오픈 소스 프로젝트들(리눅스, libusb, bluz 등)입니다. HAL의 또 다른 부분들은 안드로이드 프로젝트(GPS, camera 등)과도 공유됩니다. Gonk는 아주 간단한 리눅스라 할 수 있습니다. Gecko는 Gonk에 포팅됩니다; 마치, Gecko가 Mac OS X, Windows와 Android에 포팅되듯이 Gecko는 Gonk에 포팅됩니다. Firefox OS 프로젝트는 Gonk에 대한 전반적인 통제를 가지고, 다른 운영체제에 대한 노출되지 않는 Gecko에 대한 인터페이스들을 노출시킬 수 있습니다. 예를 들어, Gecko는 전반적인 텔레포니 스택과 Gonk상의 디스플레이 프레임 버퍼에 대한 직접적인 접근이 가능하지만, 다른 운영체제로의 이러한 접근은 가능하지 않습니다.
+
 
+
Firefox OS Architecture
+
+ +

부트스트래핑 프로세스

+ +

맨 처음, Firefox OS를 구동하면, 첫 번째 부트로더부터 실행 하기 시작 합니다. 여기서부터, 일반적인 방법으로 주 운영체제를 불러오는 과정을 진행 합니다. 점진적으로 높은 레벨의 부트로더들을 연속으로 두어서 다음 로더를 연속적으로 부트스트래핑 합니다. 이 단계의 마지막에서, Linux Kernel로 실행이 넘어갑니다.

+ +

부팅 프로세스에 대해 별 의미 없는 몇 가지 사항이 있습니다.

+ + + +

리눅스 커널

+ +

Gonk가 사용하는 리눅스 커널(들)은 리누스 토발즈와 세계의 해커들이 함께 개발하고 있는 업스트림의 리눅스로부터 만들어졌으며, 거의 똑같습니다. 다만 안드로이드 오픈 소스 프로젝트 로부터 만들어지고 아직 업스트림에 들어가지 않은 변경사항들을 가지고 있습니다. 또한, vendor들이 가끔 커널을 수정하며, 이 경우 그들은 그들 자체적 스케쥴로 업스트림에 변경 사항을 올립니다. 그렇지만 일반적으로 말하면 Gonk가 사용하는 리눅스 커널은 오리지날 리눅스와 거의 같다고 이야기 할 수 있습니다.

+ +

리눅스 구동 시작 과정 은 인터넷 상에 잘 문서화 되어 있으므로, 이 글에서는 그것까지 다루지는 않겠습니다. 구동 시작 과정의 마지막에, 대부분의 UNIX류 운영체제가 그러하듯이 userspace의 init 프로세스가 시작됩니다. 이 시점에서 마운트된 "disk"는 RAM disk 뿐입니다. 이 RAM disk는 Firefox OS 빌드 과정에서 만들어 졌으며, init나 시작 과정 스크립트들이나 로드할 수 있는 커널 모듈들과 같은 중요한 유틸리티들을 가지고 있습니다.

+ +

일단 init 프로세스가 시작되면, 리눅스 커널은 userspace 공간으로부터의 시스템 콜, 인터럽트, 하드웨어 기기로부터의 비슷한 요청들을 처리합니다. 많은 하드웨어 기능이 userspace에 sysfs를 통해 노출됩니다. 예를 들어, 다음 코드 조각은 Gecko에서 배터리 상태를 읽기 위해 사용됩니다:

+ +
FILE *capacityFile = fopen("/sys/class/power_supply/battery/capacity", "r");
+double capacity = dom::battery::kDefaultLevel * 100;
+if (capacityFile) {
+  fscanf(capacityFile, "%lf", &capacity);
+  fclose(capacityFile);
+}
+ +

init 프로세스

+ +

Gonk의 init 프로세스는 필요한 파일 시스템들을 마운트 하고 시스템 서비스들을 시작하는 일을 처리합니다. 이 일들의 처리 후에는 프로세스 매니저로 역할하게 됩니다. 이것은 다른 UNIX류 운영체제들에서의 init와 매우 비슷합니다. 먼저 다양한 서비스들을 시작시키기 위해서 필요한 명령들을 가지고 있는 스크립트들(init*.rc 파일들)을 수행합니다. Firefox OS의 init.rc 는 오리지날 안드로이드의 init.rc 에서 Firefox OS를 시작하는데 필요한 것들을 좀 추가한 형태이며, 기기에 따라 조금씩 다를 수 있습니다.

+ +

init 프로세스가 하는 가장 중요한 작업 중 하나는 b2g 프로세스를 시작시키는 것입니다; 이게 Firefox OS 운영체제의 중심입니다.

+ +

b2g를 시작시키는 init.rc의 코드는 다음과 같은 식입니다:

+ +
service b2g /system/bin/b2g.sh
+    class main
+    onrestart restart media
+ +

안드로이드의 init.rc에서 b2g 프로세스를 시작시키기 위한 코드가 추가된 init.b2g.rc 파일을 보는 것도 좋을 겁니다.

+ +
+

Note: 정확히 init.rc 가 안드로이드 버전과 얼마나 다른가는 실제 기기마다 다릅니다; 어떤 기기의 경우는 단지 init.b2g.rc 가 추가되어 있을 뿐이고, 어떤 기기는 그보다 더 많은 변경이 있을 수 있습니다.

+
+ +

사용자 영역(userspace) 프로세스 구조

+ +

Firefox OS의 많은 구성 요소들이 어떻게 서로 상호 동작하는지 상위 레벨에서 살펴보겠습니다. 이 그림은 Firefox OS의 주요 사용자 프로세스들을 보여줍니다.

+ +

Userspace diagram

+ +
+

Note: Firefox OS는 활발히 개발되고 있기 때문에, 이 그림은 변경 될 수 있습니다. 또한 본 그림이 포함하는 내용 중 일부가 올바르지 않을 수도 있습니다.

+
+ +

b2g 프로세스는 가장 중요한 시스템 프로세스입니다. b2g 프로세스는 높은 권한으로 실행되기 때문에 대부분의 하드웨어 기기에 접근할 수 있습니다. b2g는 modem과의 통신이 가능하며, display framebuffer에 접근할 수 있습니다. 그리고 GPS, camera 및 다른 하드웨어와 통신이 가능합니다. b2g는 내부적으로 Gecko layer (libxul.so으로 구현됨)를 실행합니다. 어떻게 Gecko layer가 동작하며, b2g와 통신하는지 알고 싶다면 Gecko를 참고하세요.

+ +

b2g

+ +

b2g 프로세스는 낮은 권한을 가진 다수의 content process 들을 생성할 수 있습니다. 이 프로세스에 web application과 web content이 적재되며, main Gecko server와 메시지-패싱 시스템인 IPDL을 이용하여 통신합니다.

+ +

rild

+ +

rild 프로세스는 모뎀 프로세서와의 인터페이스 입니다. rildRadio Interface Layer (RIL)를 구현한 daemon입니다. 이 코드는 하드웨어 vendor가 해당 vendor의 모뎀 하드웨어와 통신하기 위해 구현한 것입니다. rild은 client code를 unix-domain socket에 연결해 줍니다. rild은 다음 init 스크립트를 통해 시작됩니다.

+ +
service ril-daemon /system/bin/rild
+    socket rild stream 660 root radio
+ +

rilproxy

+ +

Firefox OS에서 rild client는 rilproxy 프로세스입니다. rilproxy 프로세스는 rildb2g사이에서 dumb forwarding proxy처럼 동작합니다. 이 proxy는 implementation detail이 필요한 상태 입니다. rilproxy 코드는 GitHub에서 확인할 수 있습니다.

+ +

mediaserver

+ +

mediaserver process 는 오디오와 비디오 재생을 제어합니다. Gecko는 원격 절차 호출(Remote Procedure Call, RPC) 메커니즘을 통해 이와 통신합니다. 미디어들 중 Gecko가 재생할 수 있는 것들(OGG Vorbis audio, OGG Theora video, and WebM video)은 Gecko에 의해서 해독(decode)되며 직접 mediaserver 프로세스로 전달됩니다. 이외의 다른 미디어 파일들은 다른 외부 코덱과 하드웨어 인코더에 접근할 수 있는 libstagefright에 의해 해독됩니다.

+ +
+

Note: mediaserver 프로세는 Firefox OS의 "임시" 구성요소입니다. 이 프로세스는 초기 개발 업무를 위해서 사용되었으며, 최종적으로는 사용하지 않을 예정입니다. 하지만 최소한 Firefox OS 2.0까지는 사용 할 것입니다.

+
+ +

netd

+ +

netd 프로세스는 네트워크 인터페이스의 설정 조정(configure)에 사용합니다.

+ +

wpa_supplicant

+ +

wpa_supplicant 프로세스는 WiFi 액세스 포인트와의 연결을 처리하는 표준 UNIX 스타일 데몬입니다.

+ +

dbus-daemon

+ +

dbus-daemon은 FirefoxOS가 블루투스 통신을 위해 사용하는 메시지 버스 시스템인 D-Bus를 동작시킵니다.

+ +

Gecko

+ +

앞서 언급했듯이, Gecko는 사용자가 Firefox OS에서 볼 수 있는 모든 것을 구현할때 사용하는 웹 표준들(HTML, CSS, JavaScript)의 구현입니다.

+ +

입력 이벤트 처리 (Processing input events)

+ +

대부분의 Gecko 동작은 사용자의 동작에 의해 발생합니다. 이런 사용자의 동작들을 입력 이벤트라고 부릅니다. 이런 입력 이벤트로는 버튼을 누른다던지, 터치 스크린을 가진 기기를 터치 한다던지 하는 동작들을 예로 들 수 있습니다. 이런 이벤트들은 Gecko의 주요 진입점인 nsIAppShellGonk 구현부를 통해서 Gecko로 들어오게 됩니다. 즉, 입력 장치 드라이버는 이벤트를 사용자 인터페이스로 보내기 위해 Gecko의 하위 시스템을 대신하는 nsAppShell 객체의 메소드들을 호출합니다.

+ +

예를 들면:

+ +
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->NotifyNativeEvent();
+}
+ +

이 이벤트들은 표준 리눅스 input_event 시스템으로부터 전달되는 것입니다. Firefox OS는 이벤트 필터링 기능을 제공하는light abstraction layer를 그 이벤트 위에 사용합니다. widget/gonk/libui/EventHub.cpp 코드를 보면 EventHub::getEvents()메소트 안에서 입력 이벤트를 생성하는 것을 확인할 수 있습니다.

+ +

Gecko가 위 이벤트들을 수신하면, 이벤트들은 아래의 nsAppShell에 의해 DOM으로 보내지게 됩니다.

+ +
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);
+}
+
+ +

그 이후에, 그 이벤트들은 Gecko에 의해 사용되거나 DOM events로서 이후 처리를 위해 웹 어플리케이션들로 전달됩니다.

+ +

 

+ +

그래픽 (Graphics)

+ +

가장 저차원 레벨에서 봤을 때, Gecko는 하드웨어 프레임 버퍼들을 감싸는(wrap) GL 컨텍스트에 접근하기 위해서 OpenGL ES 2.0을 사용합니다. 이러한 동작은 Gonk의 nsWindow의 다음과 비슷한 코드로 구현합니다.

+ +
gNativeWindow = new android::FramebufferNativeWindow();
+sGLContext = GLContextProvider::CreateForWindow(this);
+ +

FramebufferNativeWindow 클래스는 Android의 것을 그대로 차용하였습니다(FramebufferNativeWindow.cpp를 참고). 이 클래스는 프레임 버퍼 기기의 버퍼들과 메모리를 매핑하기 위해 그래픽스 드라이버에 접근하는데, 이 때 gralloc API를 사용합니다.

+ +

Gecko는 Layers 시스템을 이용하여 그려진 내용을 화면에 합성합니다. 이를 위한 과정은 다음과 같이 요약할 수 있습니다:

+ +
    +
  1. Gecko는 각각의 독립된 영역들을 메모리 버퍼에 그립니다. 때때로 이 버퍼들은 시스템 메모리에 있을 수 있습니다. 또 다른 경우에 이것들은 Gecko의 주소 공간에 맵핑된 텍스처(texture)들 일 수도 있습니다. 다시 말하자면, Gecko가 비디오 메모리에 직접 영역을 그린다는 것을 의미합니다. 이 동작은 일반적으로 BasicThebesLayer::PaintThebes()에 의해서 이루어 집니다.
  2. +
  3. Gecko는 OpenGL 명령들을 이용하여 모든 texture들을 화면에 합성합니다. 이 합성 과정은 ThebesLayerOGL::RenderTo()에서 일어나게 됩니다.
  4. +
+ +

Gecko가 웹 컨텐츠 렌더링을 어떻게 처리하는지에 대한 자세한 내용은 이 문서의 범위 밖의 내용입니다.

+ +

하드웨어 추상화 계층 (Hardware Abstraction Layer, HAL)

+ +

Gecko의 하드웨어 추상화 계층(Hardware Abstraction Layer, HAL)은 Gecko의 이식 계층(porting layer) 중 하나 입니다. 이것은 Gecko의 상위 계층에 접근이 쉬운 C++ API를 이용하여, 다양한 플랫폼에 대한 시스템 인터페이스로의 저수준 접근을 처리합니다. 이 API들은 Gecko HAL 내부에 플랫폼 단위(per-platform basis)로 구현되어 있습니다. 이 하드웨어 추상화 계층은 Gecko 내부의 JavaScript 코드를 통해 직접 접근할 수 없습니다.

+ +

HAL의 동작

+ +

Vibration를 예로 들어 살펴보겠습니다. 이 API를 위한 Gecko의 HAL은 hal/Hal.h에 정의되어 있습니다. 본질적으로 (명확성을 위해서 간략하게 표현하면), 이러한 함수가 있습니다.

+ +
void Vibrate(const nsTArray<uint32> &pattern);
+ +

이 함수는 Gecko code에 의해 명시된 패턴대로 기기의 진동을 켜기 위해 호출되며, 이에 대응되는 함수는 울리고 있는 진동을 끄기 위해 존재합니다. 이 함수의 Gonk 구현은 hal/conk/GonkHal.cpp에 있습니다:

+ +
void Vibrate(const nsTArray<uint32_t> &pattern) {
+  EnsureVibratorThreadInitialized();
+  sVibratorRunnable->Vibrate(pattern);
+}
+
+ +

이 코드는 기기에 진동의 시작을 위한 요청을 다른 쓰레드(VibratorRunnable::Run()에 구현되어 있습니다)에 전송합니다. 해당 쓰레드의 메인 루프는 다음과 같습니다:

+ +
while (!mShuttingDown) {
+  if (mIndex < mPattern.Length()) {
+    uint32_t duration = mPattern[mIndex];
+    if (mIndex % 2 == 0) {
+      vibrator_on(duration);
+    }
+    mIndex++;
+    mMonitor.Wait(PR_MillisecondsToInterval(duration));
+  }
+  else {
+    mMonitor.Wait();
+  }
+}
+
+ +

vibrator_on() 은 진동기 모터를 켜는 Gonk HAL API 입니다. 내부적으로, 이 메소드는 sysfs를 이용하여 커널 객체에 값을 씀으로써 커널 드라이버에 메시지를 전송하게 됩니다.

+ +

대체 HAL API 구현 (Fallback HAL API implementations)

+ +

Gecko의 HAL API 들은 모든 플랫폼을 지원합니다. Gecko가 진동 모터에 대한 인터페이스를 지원하지 않는 플랫폼(예를 들면 데스크탑 컴퓨터)을 위해 빌드 될 경우, HAL API의 대체 구현(fallback implementation)이 사용됩니다. 진동을 위한 대체 구현은 hal/fallback/FallbackVibration.cpp에서 찾을 수 있습니다.

+ +
void Vibrate(const nsTArray<uint32_t> &pattern) {
+}
+ +

Sandbox 구현 (Sandbox implementations)

+ +

대부분의 web content들이 낮은 권한의 컨텐트 프로세스에서 동작하기 때문에, 이 프로세스들은 진동 모터를 켜고 끄는 것(예를 들면)과 같은 권한을 가지고 있지 않다고 할 수 있습니다. 게다가, 잠재적인 경쟁 상태(race condition)를 처리할 수 있도록, 중앙 처리 위치(a central location을 의역하였습니다)가 필요합니다. Gecko의 HAL에서는 이러한 동작이 "sandbox"를 통해 이루어 집니다. 이 sandbox는 컨텐트 프로세스의 요청들을 대신 처리하고 그 요청들을 "Gecko server" 프로세스로 전송합니다. 이러한 대리 요청들은 IPDL을 이용하여 전송됩니다.

+ +

진동을 위해서는 hal/sandbox/SandboxHal.cpp에 있는 Vibrate() 함수에 의해 처리됩니다:

+ +
void Vibrate(const nsTArray<uint32_t>& pattern, const WindowIdentifier &id) {
+  AutoInfallibleTArray<uint32_t, 8> p(pattern);
+
+  WindowIdentifier newID(id);
+  newID.AppendProcessID();
+  Hal()->SendVibrate(p, newID.AsArray(), GetTabChildFrom(newID.GetWindow()));
+}
+ +

이 함수는 hal/sandbox/PHal.ipdl에 서술 된 PHal 인터페이스에 의해 정의되는 메시지를 전송합니다. 이 메소드는 대략 다음과 같이 서술되어 있습니다:

+ +
Vibrate(uint32_t[] pattern);
+ +

이 메시지의 수신단은 hal/sandbox/SandboxHal.cpp에 있는 HalParent::RecvVibrate() 메소드이며 이와 같습니다:

+ +
virtual bool RecvVibrate(const InfallibleTArray<unsigned int>& pattern,
+            const InfallibleTArray<uint64_t> &id,
+            PBrowserParent *browserParent) MOZ_OVERRIDE {
+
+  hal::Vibrate(pattern, newID);
+  return true;
+}
+ +

이것은 현재 주제와 관련이 없는 세부사항을 제거한 상태입니다. 하지만 이를 통해 컨텐트 프로세스에서 발생한 메시지가 Gecko부터 Gonk, Vibrate()의 Gonk HAL 구현부, 그리고 최종적으로 그래픽 드라이버까지 전달되는 과정을 보여줍니다.

+ +

DOM APIs

+ +

DOM 인터페이스는 웹 컨텐트가 Gecko와 통신하는 방법입니다. 만약 더 자세한 내용에 대해 관심이 있다면, 여기를 참고하세요. DOM 인터페이스는 IDL로 정의됩니다. IDL은 자바스크립트와 C++ 사이의 외래 함수 인터페이스(Foreign Function Interface, FFI)와 객체 모델(Object Model, OM)로 구성됩니다.

+ +

vibrartion API는 IDL 인터페이스(nsIDOMNavigator.idl)를 통해 web content에서 접근할 수 있습니다:

+ +
[implicit_jscontext] void mozVibrate(in jsval aPattern);
+ +

jsval 인자는 mozVibrate()(아직 확정되지 않은 vibration 명세를 Mozilla가 구현한 것)가 자바스크립트 값을 입력으로 받아들일 수 있다는 것을 나타냅니다. IDL 컴파일러(xpidl)는 이후에 Navigator 클래스(Navigator.cpp)에서 구현될 C++인터페이스를 만듭니다.

+ +
NS_IMETHODIMP Navigator::MozVibrate(const jsval& aPattern, JSContext* cx) {
+  // ...
+  hal::Vibrate(pattern);
+  return NS_OK;
+}
+ +

원래는 위에서 보시는 것보다 훨씬 더 많은 코드가 있지만, 현재 이 문서의 목적을 벗어나는 부분입니다. 중요한 점은 hal::Vibrate()를 호출하게 되면 control이 DOM으로부터 Gecko HAL로 이동하게 된다는 것입니다. 거기서부터 이전 섹션에서 이야기한 HAL 구현부에 진입하며, 그래픽 드라이버 방향으로 작업이 진행되게 됩니다. 최상위 레벨에서 보면, DOM 구현부는 자신이 어떤 플랫폼(Gecko, Windows, Mac OS X 등)에서 동작하는지 상관하지 않습니다. 또한 DOM은 자신이 컨텐트 프로세스에서 동작하든 Gecko 서버 프로세스에서 동작하는지 고려하지도 않습니다. 위와 같이 상세한 부분들은 시스템의 하위 계층이 관장하게 됩니다.

+ +

vibration API는 예로 쓰기에 좋은 아주 단순한 API입니다. 이에 비해, SMS API는 컨텐트 프로세스들을 서버에 연결할 때 자신이 가진 "remoting" 계층을 이용하는 좀 더 복잡한 API라고 할 수 있습니다.

+ +

Radio Interface Layer (RIL)

+ +

RIL에 대해서는 사용자 영역(userspace) 프로세스 구조 섹션에서 간단하게 설명하였습니다. 이 섹션에서는 RIL을 구성하는 여러 부분들이 어떻게 상호작용하는지 좀 더 자세하게 살펴 보겠습니다.

+ +

RIL과 관련있는 주요 요소(component)들은 다음과 같습니다:

+ +
+
rild
+
모뎀 펌웨어와 통신하는 데몬입니다.
+
rilproxy
+
The daemon that proxies messages between rild and Gecko (which is implemented in the b2g process). This overcomes the permission problem that arises when trying to talk to rild directly, since rild can only be communicated with from within the radio group.
+
b2g
+
This process, also known as the chrome process, implements Gecko. The portions of it that relate to the Radio Interface Layer are dom/system/gonk/ril_worker.js (which implements a worker thread that talks to rild through rilproxy and implements the radio state machine; and the nsIRadioInterfaceLayer interface, which is the main thread's XPCOM service that acts primarily as a message exchange between the ril_worker.js thread and various other Gecko components, including the Gecko content process.
+
Gecko's content process
+
Within Gecko's content process, the nsIRILContentHelper interface provides an XPCOM service that lets code implementing parts of the DOM, such as the Telephony and SMS APIs talk to the radio interface, which is in the chrome process.
+
+ +

Example: Communicating from rild to the DOM

+ +

Let's take a look at an example of how the lower level parts of the system communicate with DOM code. When the modem receives an incoming call, it notifies rild using a proprietary mechanism. rild then prepares a message for its client according to the "open" protocol, which is described in ril.h. In the case of an incoming call, a RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED message is generated and sent by rild to rilproxy.

+ +

rilproxy, implemented in rilproxy.c, receives this message in its main loop, which polls its connection to rild using code like this:

+ +
ret = read(rilproxy_rw, data, 1024);
+
+if(ret > 0) {
+  writeToSocket(rild_rw, data, ret);
+}
+ +

Once the message is received from rild, it's then forwarded along to Gecko on the socket that connects rilproxy to Gecko. Gecko receives the forwarded message on its IPC thread:

+ +
int ret = read(fd, mIncoming->Data, 1024);
+// ... handle errors ...
+mIncoming->mSize = ret;
+sConsumer->MessageReceived(mIncoming.forget());
+
+ +

The consumer of these messages is SystemWorkerManager, which repackages the messages and dispatches them to the ril_worker.js thread that implements the RIL state machine; this is done in the RILReceiver::MessageReceived() method:

+ +
virtual void MessageReceived(RilRawData *aMessage) {
+  nsRefPtr<DispatchRILEvent> dre(new DispatchRILEvent(aMessage));
+  mDispatcher->PostTask(dre);
+}
+ +

The task posted to that thread in turn calls the onRILMessage() function, which is implemented in JavaScript. This is done using the JavaScript API function JS_CallFunctionName():

+ +
return JS_CallFunctionName(aCx, obj, "onRILMessage", NS_ARRAY_LENGTH(argv),
+                           argv, argv);
+ +

onRILMessage() is implemented in dom/system/gonk/ril_worker.js, which processes the message bytes and chops them into parcels. Each complete parcel is then dispatched to individual handler methods as appropriate:

+ +
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);
+  }
+}
+
+ +

This code works by getting the request type from the object, making sure it's defined as a function in the JavaScript code, then calling the method. Since ril_worker.js implements each request type in a method given the same name as the request type, this is very simple.

+ +

In our example, RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED, the following handler is called:

+ +
RIL[UNSOLICITED_RESPONSE_CALL_STATE_CHANGED] = function UNSOLICITED_RESPONSE_CALL_STATE_CHANGED() {
+  this.getCurrentCalls();
+};
+ +

As you see in the code above, when notification is received that the call state has changed, the state machine simply fetches the current call state by calling the getCurrentCall() method:

+ +
getCurrentCalls: function getCurrentCalls() {
+  Buf.simpleRequest(REQUEST_GET_CURRENT_CALLS);
+}
+ +

This sends a request back to rild to request the state of all currently active calls. The request flows back along a similar path the RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED message followed, but in the opposite direction (that is, from ril_worker.js to SystemWorkerManager to Ril.cpp, then rilproxy and finally to the rild socket). rild then responds in kind, back along the same path, eventually arriving in ril_worker.js's handler for the REQUEST_GET_CURRENT_CALLS message. And thus bidirectional communication occurs.

+ +

The call state is then processed and compared to the previous state; if there's a change of state, ril_worker.js notifies the nsIRadioInterfaceLayer service on the main thread:

+ +
_handleChangedCallState: function _handleChangedCallState(changedCall) {
+  let message = {type: "callStateChange",
+                 call: changedCall};
+  this.sendDOMMessage(message);
+}
+ +

nsIRadioInterfaceLayer is implemented in dom/system/gonk/RadioInterfaceLayer.js; the message is received by its onmessage() method:

+ +
 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;
+   ...
+
+ +

All this really does is dispatch the message to the content process using the Parent Process Message Manager (PPMM):

+ +
handleCallStateChange: function handleCallStateChange(call) {
+  [some internal state updating]
+  ppmm.sendAsyncMessage("RIL:CallStateChanged", call);
+}
+ +

In the content process, the message is received by receiveMessage() method in the nsIRILContentHelper service, from the Child Process Message Manager (CPMM):

+ +
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;
+ +

This, in turn, calls the nsIRILTelephonyCallback.callStateChanged() methods on every registered telephony callback object. Every web application that accesses the window.navigator.mozTelephony API has registered one such callback object that dispatches events to the JavaScript code in the web application, either as a state change of an existing call object or a new incoming call event.

+ +
NS_IMETHODIMP Telephony::CallStateChanged(PRUint32 aCallIndex, PRUint16 aCallState,
+                                          const nsAString& aNumber, bool aIsActive) {
+  [...]
+
+  if (modifiedCall) {
+    // Change state.
+    modifiedCall->ChangeState(aCallState);
+
+    // See if this should replace our current active call.
+    if (aIsActive) {
+      mActiveCall = modifiedCall;
+    }
+
+    return NS_OK;
+  }
+
+  nsRefPtr<TelephonyCall> call =
+          TelephonyCall::Create(this, aNumber, aCallState, aCallIndex);
+  nsRefPtr<CallEvent> event = CallEvent::Create(call);
+  nsresult rv = event->Dispatch(ToIDOMEventTarget(), NS_LITERAL_STRING("incoming"));
+  NS_ENSURE_SUCCESS(rv, rv);
+  return NS_OK;
+}
+ +

Applications can receive these events and update their user interface and so forth:

+ +
handleEvent: function fm_handleEvent(evt) {
+  switch (evt.call.state) {
+    case 'connected':
+      this.connected();
+      break;
+    case 'disconnected':
+      this.disconnected();
+      break;
+    default:
+      break;
+  }
+}
+ +

Take a look at the implementation of handleEvent() in the Dialer application as an extended example.

+ +

3G data

+ +

There is a RIL message that initiates a "data call" to the cellular service; this enables data transfer mode in the modem. This data call ends up creating and activating a Point-to-Point Protocol (PPP) interface device in the Linux kernel that can be configured using the usual interfaces.

+ +
+

Note: This section needs to be written.

+
+ + + +

This section lists DOM APIs that are related to RIL communications.

+ + + +

WiFi

+ +

The WiFi backend for Firefox OS simply uses wpa_supplicant to do most of the work. That means that the backend's primary job is to simply manage the supplicant, and to do some auxiliary tasks such as loading the WiFi driver and enabling or disabling the network interface. In essence, this means that the backend is a state machine, with the states following the state of the supplicant.

+ +
+

Note: Much of the interesting stuff that happens in WiFi depends deeply on possible state changes in the wpa_supplicant process.

+
+ +

The implementation of the WiFi component is broken up into two files:

+ +
+
dom/wifi/DOMWifiManager.js
+
Implements the API that's exposed to web content, as defined in nsIWifi.idl.
+
dom/wifi/WifiWorker.js
+
Implements the state machine and the code that drives the supplicant.
+
+ +

These two files communicate with one another using the message manager. The backend listens for messages requesting certain actions, such as "associate", and responds with a message when the requested action has been completed.

+ +

The DOM side listens for the response methods as well as several event messages that indicate state changes and information updates.

+ +
+

Note: Any synchromous DOM APIs are implemented by caching data on that side of the pipe. Synchronous messages are avoided whenever possible.

+
+ +

WifiWorker.js

+ +

This file implements the main logic behind the WiFi interface. It runs in the chrome process (in multi-process builds) and is instantiated by the SystemWorkerManager. The file is generally broken into two sections: a giant anonymous function and WifiWorker (and its prototype). The anonymous function ends up being the WifiManager by providing a local API, including notifications for events such as connection to the supplicant and scan results being available. In general, it contains little logic and lets its sole consumer control its actions while it simply responds with the requested information and controls the details of the connection with the supplicant.

+ +

The WifiWorker object sits between the WifiManager and the DOM. It reacts to events and forwards them to the DOM; in turn, it receives requests from the DOM and performs the appropriate actions on the supplicant. It also maintains state information about the supplicant and what it needs to do next.

+ +

DOMWifiManager.js

+ +

This implements the DOM API, transmitting messages back and forth between callers and the actual WiFi worker. There's very little logic involved.

+ +
+

Note: In order to avoid synchronous messages to the chrome process, the WiFi Manager does need to cache the state based on the received event.

+
+ +

There's a single synchronous message, which is sent at the time the DOM API is instantiated, in order to get the current state of the supplicant.

+ +

DHCP

+ +

DHCP and DNS are handled by dhcpcd, the standard Linux DHCP client. However, it's not able to react when the network connection is lost. Because of this, Firefox OS kills and restarts dhcpcd each time it connects to a given wireless network.

+ +

dhcpcd is also responsible for setting the default route; we call into the network manager to tell the kernel about DNS servers.

+ +

Network Manager

+ +

The Network Manager configures network interfaces opened by the 3G data and WiFi components.

+ +
+

Note: This needs to be written.

+
+ +

 

diff --git a/files/ko/archive/b2g_os/platform/gonk/index.html b/files/ko/archive/b2g_os/platform/gonk/index.html new file mode 100644 index 0000000000..6482db30f1 --- /dev/null +++ b/files/ko/archive/b2g_os/platform/gonk/index.html @@ -0,0 +1,103 @@ +--- +title: Gonk +slug: Archive/B2G_OS/Platform/Gonk +translation_of: Archive/B2G_OS/Platform/Gonk +--- +
+

Gonk는 Firefox OS 플랫폼의 하위 레벨 운영체제이며, 안드로이드 오픈 소스 프로젝트(Android Open Source Project, AOSP) 기반의 리눅스 커널과 사용자영역 하드웨어 추상 계층(userspace hardware abstraction layer, HAL)으로 이루어져 있습니다. 이 문서는 Gonk가 무엇으로 구성되어 있는지 설명하는 것을 목적으로 합니다. 전체적인 Firefox OS의 구조와 그 구조에 Gonk가 어떻게 맞추어져 있는지에 대한 내용은 Firefox OS architecture를 참고하시기 바랍니다.

+
+ +

Gonk 개요

+ +

Gonk는 Firefox OS에서 Gecko와 하드웨어 사이의 인터페이스를 제공하는 커널 레벨의 컴포넌트입니다. Gonk는 하드웨어를 제어하고, 하드웨어의 기능을 Gecko에 구현된 Web API로 노출시킵니다. Gonk는 모바일 기기를 제어하는 동작 뒤에서 하드웨어 수준의 요청을 통해 온갖 복잡하고 세밀한 작업을 하는 "블랙박스"로 볼 수 있습니다.

+ +

Gonk는 안드로이드로부터 가져온 (GPS와 카메라 같은) 컴포넌트들을 포함하고 있는 간단한 리눅스 배포판입니다. 그리고 Firefox OS 구조의 모든 계층과 통합하기 위해 libusb, bluez 등의 일반적인 오픈 소스 프로젝트들을 포함하도록 모질라에 의해 확장되었습니다. 이러한 설계는 Firefox OS 스마트폰의 배포를 위해 OEM이 안드로이드의 소프트웨어 컴포넌트들(디바이스 드라이버, 펌웨어, 서비스-레벨 데몬 등)을 포팅하는 것을 더 쉽게 만들어 줍니다.

+ +

Gonk는 디바이스 포팅 계층(device porting layer)입니다: 즉 하드웨어와 Gecko 사이의 어댑터입니다. Gonk는 Gecko의 포팅 계층들과 짝을 이루는 Gecko 포트로 생각할 수 있는 비교적 간단한 리눅스 배포판입니다. - 그래서 Gonk는 Gecko의 포팅 대상이 됩니다. OS X, Windows, Android에 대한 Gecko의 포트가 있는 것처럼.

+ +
+

Note: 모바일 기기들은 다양한 칩셋과 하드웨어 사양을 갖기 때문에 여러 가지의 Gonk 배포판을 가질 수 있습니다.

+
+ +

Firefox OS 프로젝트는 Gonk를 통해 완전한 제어가 가능하기 때문에 다른 OS에서는 노출될 수 없는 인터페이스를 Gecko에 노출시킬 수 있습니다. 예를 들어 Gecko가 Gonk 상에서 전화(telephony)와 디스플레이 프레임 버퍼(display frame buffer)에 직접적인 접근을 할 수 있습니다.

+ +

Gonk 구조

+ +

각 모바일 폰은 기기를 동작시키는데 필요한 시스템 라이브러리, 디바이스 드라이버, 펌웨어에 기반한 Gonk 컴포넌트들의 특별한 조합을 가집니다. 이러한 컴포넌트들은 OEM이 칩셋 제조사와 ODM과의 협력을 통해 결정합니다. 다음 그림은 Gonk 구현의 한 예를 보여줍니다:

+ +

+ +

이 예는 (Gonk 구현에서 가능한 여러 구성요소들의 부분집합인) 다음의 주요 구성요소들을 보여줍니다:

+ + + +

Gonk는 또한 Firefox OS의 Gecko 계층인 b2g 프로세스를 시작하고 관리하고 종료합니다. b2g 프로세스는 Gonk안에서 서비스-레벨 데몬들의 클라이언트로 동작합니다. 서비스-레벨 데몬들은 하드웨어와 직접 동작하며 폰에 있는 하드웨어 기능을 Gecko에 노출시킵니다. Gecko는 이러한 데몬들과 프로세스간 통신(interprocess communication)을 통해 대화합니다. 이 컴포넌트들은 요청에 대한 명령과 프로토콜을 서로 주고받고, 서비스를 제공합니다.

+ +
+

Note: Gonk 구조에 대한 보다 상세한 설명은 Firefox OS architecture guide를 참고하시기 바랍니다.

+
+ +

Gonk 포팅하기

+ +

Firefox OS가 안드로이드 커널 기반이기 때문에, 기존의 디바이스 드라이버, 펌웨어, 서비스 데몬들과 기타 컴포넌트들은 최소한의 작업으로 Firefox OS와 동작하도록 포팅될 수 있습니다. 만일 커스텀 컴포넌트(예, 커스텀 RIL 또는 새로운 데몬)가 필요하거나 ODM의 레퍼런스 디자인에 수정이 생겼다면 추가적인 통합과 테스팅 작업이 필요할 수는 있습니다.

+ +

b2g에서 클라이언트는 프로세스간 통신(inter-process communication, IPC)을 통해 서비스-레벨 데몬들과 통신합니다. 클라이언트는 서비스 레벨 데몬에 소켓 연결을 시작하고, 그 연결 상에서 (서버의 요청 프로토콜을 사용하여) 요청을 제출하며, 응답을 받고, 연결을 종료합니다. OEM은 클라이언트와 서버 사이의 이러한 프로세스간 통신의 디자인과 구현을 담당합니다.

+ +
+

Note: 포팅 작업에 대한 보다 상세한 정보는 Porting Firefox OS를 참고하시기 바랍니다.

+
+ +

모질라가 OEM 및 폰 제조사와 Gonk 포팅 작업을 하는 방식

+ +

모든 Gonk 구현은 모질라, OEM 및 관련 제조사(ODM, 칩셋 제조사)들 사이의 협력의 결과입니다.

+ +

모질라는 소스 저장소(source repositories)를 제공하고 해당하는 Firefox OS 배포판의 Gonk를 위한 파일들을 지원합니다. 소스 저장소는 (조금 수정된) 기본적인 리눅스 커널과 Gecko 에 대한 연결(hooks into Gecko)을 포함하고 있습니다.

+ +

OEM은 해당 디바이스 모델에 대한 Firefox OS 시스템 이미지의 빌드, 컴파일, 테스팅, 인증 및 배포를 담당합니다. 시스템 이미지의 Gonk 부분에 대해 OEM은 Web API 호출과 폰 하드웨어 기능들 사이의 일관적인 통합을 확보하기 위한 대부분의 작업을 담당합니다. 요구되는 작업의 형태와 범위는 폰에 사용되는 특정 칩셋과 기타 하드웨어 컴포넌트들에 많이 의존하게 됩니다.

+ +

디바이스 컴포넌트 (Device components)

+ +

OEM은 칩셋 제조사 및 ODM과 함께 모바일 디바이스를 구동하기 위해 필요한 모든 디바이스 컴포넌트들을 제공하기 위해 협력합니다. 예를 들어, Wi-Fi 컴포넌트 제조사는 칩셋과 함께 관련 소프트웨어를 제공합니다. 컴포넌트들은 다음을 포함합니다:

+ + + +

Gonk와 Gecko의 통합

+ +

OEM은 모바일 기기의 하드웨어 기능들이 Gecko에 구현된 Web API에 올바르고 온전하게 노출되도록 보장해야 합니다. 이것은 다음을 포함합니다.

+ + + +

Gonk 소스코드

+ +

Github의 메인 B2G 저장소는 Gonk의 저장소로 여겨질 수 있도록 다양한 기기들에 대해 공식적으로 지원되는 Gonk 포트(ports)를 포함하고 있습니다. 지원 기기들에 대한 목록은 B2G/config.sh에 있습니다.

+ +

Gonk에 정의된 b2g 프로세스는 mozilla-b2g/gonk-misc에서 찾을 수 있습니다. b2g 소스코드에 대한 수정은 여기서 이루어집니다.

+ +
+

Note: Gecko 소스안에 Gecko의 Gonk 포트를 포함하는 b2g/ 폴더가 있습니다: 이 폴더는 리눅스 커널, HAL, 기타 OEM 라이브러리들로 구성됩니다.

+
+ +

매일 수행되는 Gonk 작업의 대부분은 시스템을 다른 보드에 포팅하고, 다양한 기기에서 Gecko가 잘 동작하는지 확인하는 것을 포함합니다.

+ +
+
+ +

 

diff --git a/files/ko/archive/b2g_os/platform/index.html b/files/ko/archive/b2g_os/platform/index.html new file mode 100644 index 0000000000..ae5425436e --- /dev/null +++ b/files/ko/archive/b2g_os/platform/index.html @@ -0,0 +1,99 @@ +--- +title: The Firefox OS platform +slug: Archive/B2G_OS/Platform +tags: + - B2G + - Firefox OS + - NeedsTranslation + - TopicStub +translation_of: Archive/B2G_OS/Platform +--- +

The Firefox OS platform consists of many components. While you don't need to understand its architecture in order to build applications that run on Firefox OS, if you're working on developing or porting the platform—or are simply curious—the following documentation may be of interest to you.

+ + + + + + + +
+

Documentation about the Firefox OS platform

+
+
+ Introduction to Firefox OS
+
+ Introductory information about what Firefox OS is and how it works.
+
+ Building and installing Firefox OS
+
+ A guide to building Firefox OS and installing it on your compatible device. This guide also covers building the Firefox OS emulator, for running Firefox OS on a computer.
+
+ Gaia
+
+ Documentation about Gaia, the user interface application for Firefox OS devices; this is a Web application running atop the Firefox OS software stack.
+
+ Gonk
+
+ Documentation about Gonk, the operating system layer underneath Gaia. This consists of a Linux kernel and a hardware abstraction layer to which Gecko communicates.
+
+ Gecko
+
+ 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.
+
+ Feature support chart
+
+ A chart of which features are available in which types of Firefox OS builds.
+
+ Firefox OS architecture overview
+
+ An overview of how Firefox OS is structured internally; this is primarily of interest to platform developers and people doing porting work.
+
+ Firefox OS apps architecture
+
+ An overview of the application model on Firefox OS.
+
+ Testing Firefox OS
+
+ A guide to testing Firefox OS, including information about creating automated tests.
+
+ Porting Firefox OS
+
+ Information about how to port Firefox OS to new devices.
+
+ Customization with the .userconfig file
+
+ How to customize the build and execution of Firefox OS by changing the .userconfig file.
+
+

View All...

+
+

Getting help from the community

+

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!

+ +
    +
  • Ask your question on Mozilla's Boot to Gecko IRC channel: #b2g
  • +
+

Don't forget about the netiquette...

+
+ + +

Resources

+ +
+

 

diff --git a/files/ko/archive/b2g_os/porting/index.html b/files/ko/archive/b2g_os/porting/index.html new file mode 100644 index 0000000000..e850181405 --- /dev/null +++ b/files/ko/archive/b2g_os/porting/index.html @@ -0,0 +1,121 @@ +--- +title: Boot to Gecko를 Porting하는 방법 +slug: Archive/B2G_OS/Porting +translation_of: Archive/B2G_OS/Porting_B2G_OS/basics +--- +

Boot to Gecko (Firefox OS)는 Android로부터 파생된 커널을 사용하고, 그 위애 Gecko 기반의 UI가 올라갑니다. 이 페이지는 새로운 타겟에 운영 체제를 어떻게 porting하는지에 대한 기본적인 guide를 제공합니다.

+

이 guide는 이미 Android가 수행되는 새로운 타겟에 porting하는 것을 가정하고 있습니다. 만약 Android 이외에 또 다른 타겟에 porting하려고 하면, 또 다른 업무들이 추가되어야 합니다.

+

Set up your build system

+

The first step is to configure your build system; you can follow the guide in Firefox OS build prerequisites.

+

Create a local backup of the original Android system

+

Next, you should back up your Android device before you start nuking it with your test builds of B2G. In addition, some of these bits will be needed by the build and install process.

+
mkdir my_device_backup
+cd my_device_backup
+adb pull /system system
+

Clone the B2G repositories

+

The first step is to clone the B2G repository as well as the repository with the manifests.

+
git clone https://github.com/mozilla-b2g/B2G.git
+git clone https://github.com/mozilla-b2g/b2g-manifest.git
+

Add a new device to config.sh

+

The next step is to add a new device to config.sh in the B2G repository;  you can use the existing ones as a template. This basically involves providing the instructions for fetching the correct files to do the build.

+

Create a manifest for the new device

+

Now you need to add a manifest file for the new device. Refer to one of the existing manifests for a template. You can use the hamachi manifest a reference. Once done, you should add and commit your new manifest to your local b2g-manifest repository:

+
git add my-new-device.xml
+git commit
+
+

Next, you will want the config.sh file to use your local b2g-manifest repository instead of the official one. To achieve this, change the values of the GITREPO and BRANCH variables in the config.sh file to the location of your local repository and desired branch, for example:

+
GITREPO=${GITREPO:-"file:///home/yourname/b2g-manifest"}
+BRANCH=${BRANCH:-master}
+

Create a configuration tree for the new device

+

Create a new configuration tree for the new device. This should be at device/<manufacturer>/<device_id>. This tree should include, at least:

+ +

The content here may differ a great deal from one device to another. In particular, BoardConfig.mk and extract-files.sh may differ significantly. This part requires a lot of hacking, testing, and debugging to figure out which binary blobs should be extracted. To get a better idea what is supposed to be contained there, take a look at the configuration for the hamachi device. Remember to correctly reference your own configuration tree from the manifest you created for your new device.

+
+

Note: If you can find an existing reference on CyanogenMod for your device, this information will speed up the porting process. the XDA Forum is another good place to discuss and check for resources.

+
+

Rebuilt boot.img

+

Once you have all that done, you need to rebuild the boot image. This isn't usually needed for the kernel itself, but to pick up the changes to init.rc.

+

Changes to init.rc

+

The init.rc you use is not the one provided by B2G; instead, you need to pull it from the device.

+

The main things you'll need to modify are:

+

Import init.b2g.rc

+

Add the following lines to import init.b2g.rc:

+
on early-init
+    start ueventd
+    import /init.b2g.rc
+

Fix permissions

+

Correct the permissions on the files /system/b2g/b2g, /system/b2g/updater, /system/b2g/plugin-container; this should be done after the lines that mount the filesystem read/write:

+
chmod 0755 /system/b2g/b2g
+chmod 0755 /system/b2g/updater
+chmod 0755 /system/b2g/plugin-container
+

You might want to start by modifying the init.rc from the new device instead of using the init.rc provided by the build system; if so, you need to remember to set TARGET_PROVIDES_INIT_RC in BoardConfig.mk.

+

Prebuilt kernel vs. building the kernel from source

+

You can use a prebuilt kernel, or you may build the kernel from source. To build the kernel from source, add AndroidKernel.mk and the kernel config to the device configuration tree.

+

The maguro on the old build system is an example that builds the kernel from source.

+

Extracting and modifying an existing boot image

+

It is possible to recover the boot image of a phone by dumping the contents of the /dev/mtd/mtd1 or /dev/mtd/mtd2 devices, the resulting image file can then be easily recovered:

+
adb shell 'cat /dev/mtd/mtd1 > /sdcard/boot.img'
+adb pull /sdcard/boot.img
+
+

Once the boot image file has been obtained it can be unpacked via a helper tool such as unmkbootimg. The tool will extract both the kernel image (zImage) and the ramdisk (initramfs.cpio.gz) as well as printing out a command to rebuild the image with the same parameters of the original one, for example:

+
$ unmkbootimg boot.img
+Kernel size 3872576
+Kernel address 0x208000
+Ramdisk size 265102
+Ramdisk address 0x1500000
+Secondary size 0
+Secondary address 0x1100000
+Kernel tags address 0x200100
+Flash page size 2048
+Board name is ""
+Command line "androidboot.hardware=aphone"
+Extracting kernel to file zImage ...
+Extracting root filesystem to file initramfs.cpio.gz ...
+All done.
+---------------
+To recompile this image, use:
+  mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x200000 --cmdline 'androidboot.hardware=aphone' -o new_boot.img
+---------------
+
+

To modify the ramdisk file create an output directory and extract it there:

+
mkdir initramfs_dir
+cd initramfs_dir
+gunzip -c ../initramfs.cpio.gz | cpio -i
+
+

Make all the required changes (such as modifying init.rc) and repack the ramdisk using mkbootfs, be sure to use the version that has been built with the B2G host tools:

+
/path/to/your/B2G/out/host/linux-x86/bin/mkbootfs . | gzip > ../newinitramfs.cpio.gz
+
+

Finally go back to the top-level directory and re-pack the boot image using the mkbootimg, also make sure you're using the version built with the other B2G host tools:

+
/path/to/your/B2G/out/host/linux-x86/bin/mkbootimg --kernel zImage --ramdisk newinitramfs.cpio.gz --base 0x200000 --cmdline 'androidboot.hardware=aphone' -o newboot.img
+
+

If you now copy the new boot image under out/target/product/$DEVICE/boot.img (where $DEVICE is your device name) it will be automatically flashed when invoking flash.sh. Alternatively you can flash it by hand with the following commands:

+
adb reboot bootloader
+fastboot flash boot newboot.img
+fastboot reboot
+
+

Add the new device to flash.sh

+

Add the new device to flash.sh; the specifics of how to do this will depend on what tools need to be used to flash the new device.

+

Configure, build, and flash the new device

+

Now you can try building for and flashing to your new device:

+
ANDROIDFS_DIR=my_device_backup ./config.sh <device_id> '../b2g-manifest/default.xml'
+./build.sh
+./flash.sh
+

Test and debug

+

We need some details added here; indeed, this entire article could use some help.

+

FAQ

+

Forthcoming

+

See also

+ diff --git a/files/ko/archive/b2g_os/preparing_for_your_first_b2g_build/index.html b/files/ko/archive/b2g_os/preparing_for_your_first_b2g_build/index.html new file mode 100644 index 0000000000..30286822a1 --- /dev/null +++ b/files/ko/archive/b2g_os/preparing_for_your_first_b2g_build/index.html @@ -0,0 +1,148 @@ +--- +title: 처음 B2G 빌드를 위한 준비 +slug: Archive/B2G_OS/Preparing_for_your_first_B2G_build +translation_of: Archive/B2G_OS/Preparing_for_your_first_B2G_build +--- +

+ +
중요: 번역은 제가 필요한 부분 및 확인 가능한 부분만 진행 하였으며 변역된 날자는(2013/02/25)이며 문서 변경이 잦아 오늘 이후는 원문과 번역이 다를 수 있습니다. 참고하세요. 미 번역/변경된 부분은 추가로 다른 분이 해 주실 것으로 믿습니다.
+ +

여기서는 B2G 빌드를 하기 전에 수행 해야 하는 repository를 가져오고 빌드 환경을 설정에 대해 알아 봅니다.

+ +

B2G repository 가져 오기

+ +

첫번째로, 빌드를 처음으로 시작하기에 앞서, B2G repository를 가져 와야 합니다. 이 단계가 모든 것을 다 가져 오는 것은 아니고, B2G build system을 가져 오고 빌드에 필요한 각종 툴들을 가져 옵니다. 대부분의 B2G code는 아직 main Mozilla Mercurial repository에 존재 합니다.

+ +

Repository를 가져 오기 위해 "git"을 사용합니다.

+ +
git clone git://github.com/mozilla-b2g/B2G.git
+ +

몇분간의 git작업 진행 후 새로 생긴 "B2G"폴더로 이동하세요.

+ +
cd B2G
+
+ +

작업중이던 B2G tree를 새로 구성한 빌드 환경으로 복사하기(작업 중일 경우만 진행, 그외는 다음 단계로)

+ +

If you've gotten a new computer (lucky you!), you'll find your life will be much easier if you simply migrate your entire B2G tree from one computer to another.

+ +

To do that, mount your old computer's drive onto your new computer, then do this:

+ +
rsync -a source/ dest/
+
+ +

Where source is the full path (including the trailing slash) of the source tree, and dest is where you want to put it (the trailing slash is also important!).

+ +
+

Note: If you copy the files from a computer with another platform ensure to run './build.sh clean' before you start the build process. If you don't do this you might encounter compilation issues.

+
+ +

If you do this, you can skip all of the rest of this article and move right on to building.

+ +

단말기용 B2G 환경 설정

+ +
중요: 단말기는 안드로이드 4 (즉 아이스크림 샌드위치(ICS)) 가 설치 되어 있어야 합니다. 단말기에 구동중인 안드로이드 버전을 확인하시고, 그렇지 않으면 대부분 이단계 부터 실패를 할 것입니다. 또한 USB에 연결된 단말기로 다운로드를 할 경우 만약 USB허브로 연결 되어 있을 경우는 문제를 발생할 수 있으므로, 허브가 아닌 직접 PC에 연결된 USB와 연결 하시기 바랍니다.
+ +

Core B2G build system을 다 받고 나면, 설치하고자 하는 단말기에 맞는 환경을 설정 해야 합니다. 지원되는 단말기의 종류를 보려면 아래와 같이 실행 하세요.

+ +
./config.sh
+
+ +

리스트는 아래와 같이 보일 것입니다.

+ +
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
+> 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)
+ +

만약 해당 단말기가 리스트에 없다면, 바로 모든 과정을 중단하고 B2G 포팅 도움을 요청하거나 누군가 해당 단말기용 작업을 완료 하기를 기다리세요. Mozilla에서는 당신의 도움을 환영합니다!

+ +
Note: 특정 버전의 Gecko와 상관 없이 빌드를 하고자 한다면, 진행 하기 전에Building against a custom Gecko 를 참고 하세요.
+ +

모바일 단말기 환경 설정

+ +

우선, 환경설정시 단말기와 통신을 하게 되므로, 설정 하고자 하는 단말기를 연결하세요.

+ +

원하는 단말기의 종류가 위에 나와 있다면, 아래와 같이 config.sh + 단말기 이름을 입력 하세요. Samsung Google Nexus S를 예로 들면 아래와 같습니다.

+ +
./config.sh nexus-s
+
+ +

설정 시작하고 바로 아마도 색상 환경 설정을 입력 해야 할 것입니다. 색상 선택이 완료되면 환경 설정은 계속 진행 됩니다. 지금부터는 Boot to Gecko빌드에 필요한 모든 코드를 복하게될 것이며, 이는 상당한 시간이 소요 될 것이니 잠깐 쉬는 시간을 가지도록 하세요.(2시간 이상 소요 예상됨)

+ +

If your phone no longer has Android on and your B2G tree doesn't have the binary blobs in it, and you wisely made a backup of the /system partition like an earlier page told you to, you can use it like this:

+ +
ANDROIDFS_DIR=<absolute path to parent dir of system dir> ./config.sh <target>
+
+ +

에뮬레이터 빌드 환경 설정

+ +

ARM 에뮬레이터는 "emulator", x86 에뮬레이터는 "emulator-x86"로 아래와 같이 수행 하시면 에뮬레이터용 환경 설정도 가능합니다. x86 에뮬레이터가 ARM용 에뮬레이터보다 수행 속도는 빠르지만 실제 단말기와 다르게 동작 할 수도 있습니다.

+ +

아래는 ARM용 에뮬레이터 환경 설정입니다.

+ +
./config.sh emulator
+
+ +
+

주의: ./config.sh수행은 시간이 많이 걸리므로 Ctrl-C로 중단이 가능하며 이후 다시 진행도 가능합니다. 만약 일부 진행이 문제가 있어 보인다면 './repo sync'를 실행 하시면 문제가 수정될지 모릅니다.

+
+ +

Building against a custom Gecko

+ +

There may be times that you want or need to build Boot to Gecko based on a different version of Gecko than the one that's used by default (as specified in the manifest). You can do so by editing the file .userconfig before you pull the repository (before the config.sh step above). For example, if you want to build against mozilla-central:

+ +
GECKO_PATH=/path/to/mozilla-central
+GECKO_OBJDIR=/path/to/mozilla-central/objdir-gonk
+
+ +
+

Note: if building against a custom Gecko in Mac OS X, the mozilla-central directory must be in a case sensitive file system.

+
+ +

See Customization with the .userconfig file for additional customizations you can do.

+ +

다음은, 빌드 시작 하기.

diff --git a/files/ko/archive/b2g_os/quickstart/index.html b/files/ko/archive/b2g_os/quickstart/index.html new file mode 100644 index 0000000000..ebe1f7c220 --- /dev/null +++ b/files/ko/archive/b2g_os/quickstart/index.html @@ -0,0 +1,49 @@ +--- +title: Build +slug: Archive/B2G_OS/Quickstart +tags: + - NeedsTranslation + - TopicStub +translation_of: Archive/B2G_OS/Quickstart +--- +
+

Quickstart information on coding open web apps.

+
+
+
+ Introduction to open web apps
+
+ 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.
+
+ Your first app
+
+ This article takes you through the basic steps and additional knowledge on top of regular web development required to create installable open web apps.
+
+ Introduction to Firefox OS
+
+ An introduction to Firefox OS, Mozilla's new open web app-based mobile platform.
+
+ Introduction to manifests
+
+ An FAQ designed to answer any questions you may have about manifests, hosting apps, origins, and other such topics.
+
+ App development for web developers
+
+ If you're a web developer, how do open web apps differ from what you're used to? This article explains all.
+
+ App development for mobile developers
+
+ 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.
+
+ Developing app functionality
+
+ This page talks about the kinds of different functionality that you might want to build into your apps, with links to further information.
+
+ Payments
+
+ How do you build functionality to make people pay for installing your open web apps? Here is the lowdown.
+
+ App tools
+
+ Last for this section, we provide some links to more information on the tools available to help you develop great open web apps.
+
diff --git a/files/ko/archive/b2g_os/quickstart/intro_to_firefox_os/index.html b/files/ko/archive/b2g_os/quickstart/intro_to_firefox_os/index.html new file mode 100644 index 0000000000..437b48c562 --- /dev/null +++ b/files/ko/archive/b2g_os/quickstart/intro_to_firefox_os/index.html @@ -0,0 +1,14 @@ +--- +title: Firefox OS에 대하여. +slug: Archive/B2G_OS/Quickstart/Intro_to_Firefox_OS +translation_of: Archive/B2G_OS/Quickstart/Intro_to_Firefox_OS +--- +
+

Firefox OS 는 모질라의 Boot to Gecko (B2G) 프로젝트에 의해 개발된 새로운 모바일 운영체제 입니다. 리눅스 커널을 사용하고 Gecko-based runtime 엔진을 통해 구동됩니다. 이로서 사용자들은 JavaScriptHTML, 그리고 다른 오픈소스 웹 어플리케이션 API를 사용하여 만든 앱들을 사용할 수 있게 되었습니다.

+
+

Firefox OS ("Boot to Gecko" 또는 "B2G"라는 코드명으로도 불립니다) 는 모질라의 오픈소스 모바일 운영체제입니다. 리눅스 커널에 기반했으며, HTML, CSS, JavaScript, 그리고 오픈소스 웹 어플리케이션 API를 구동하는 Gecko-based runtime 엔진으로 구동됩니다. Firefox OS는 또한 독점 기술로부터 자유로운 모바일 운영체제이기도 합니다. 즉, 앱 개발자들에게 그들이 원하는 끝내주는 것들을 만들게 해 주는 기회를 제공하는 강력한 플랫폼이기도 합니다. 게다가, 이것은 최종적으로 사용자에게 행복을 줄 수 있을 만큼 유연하고 포용력 있는 운영체제이기도 합니다.

+

+

Firefox OS는 Gaia라는 기본 설치 앱과 함께 제공됩니다. Gaia는 핸드폰의 기본적인 기능들인 설정, 통화, SMS, 사진촬영 및 편집, 그리고 그 외의 것들을 관리합니다.

+

웹 개발자들에게 이해시켜야 할 가장 중요한 부분은, '모든 사용자 인터페이스(UI)가 웹을 기반한 어플리케이션이라는 것입니다. 다른 웹 기반 어플리케이션을 구동하고, 화면에 표시하는 것이 가능한 웹 어플리케이션이라는 것이죠. 당신이 사용자 인터페이스에 적용하는 모든 수정과, 당신이 Firefox OS에서 구동시키기 위해 만드는 모든 앱들은, 모바일 기기와 서비스에 대한 향상된 접근에도 불구하고. 웹페이지입니다.

+

Firefox OS는 현재 엄청난 개발단계중에 있습니다. 우리는 당신에게 Gaia와 앱 개발을 더 쉽게 만들어주기 위해 끊임없이 노력중입니다.

+

Firefox OS에 대한 더 많은 정보를 원하신다면 Firefox OS content zone으로 와 주십시오.

diff --git a/files/ko/archive/b2g_os/quickstart/intro_to_open_web_apps/index.html b/files/ko/archive/b2g_os/quickstart/intro_to_open_web_apps/index.html new file mode 100644 index 0000000000..50f550e7c3 --- /dev/null +++ b/files/ko/archive/b2g_os/quickstart/intro_to_open_web_apps/index.html @@ -0,0 +1,53 @@ +--- +title: 개방형 웹 앱 소개 +slug: Archive/B2G_OS/Quickstart/Intro_to_open_web_apps +translation_of: Archive/B2G_OS/Quickstart/Intro_to_open_web_apps +--- +

Multi devices

+
+

이 글은 개발자, 프로젝트 매니저, 또는 앱 개발과 배포에 관련이 있는 사람 등 개방형 웹 앱을 배우고자 하는 모든이들에게 좋은 출발점이 되고자 합니다. 이 글에서는 개방형 웹 앱에 대해 대략적인 개요를 가볍게 설명하고 개방형 웹 앱의 철학에 대해 소개합니다.

+
+

개방형 웹 앱은 기본적으로 일반적인 웹 사이트나 웹 페이지와 다르지 않습니다. 개방형 웹 앱은 HTML, CSS, JavaScript 등 개방된 표준 웹 기술을 사용하고 웹 브라우저를 통해 접근할 수 있습니다. 가장 큰 차이는 디바이스에 설치될 수 있는지, 오프라인일 때 작동할 수 있는지, 그리고 카메라, 주소록과 같은 디바이스 기능과 인터렉션할 수 있는 더 발전된 API 에 접근할 수 있는지 등 그 기능들에 있습니다. 또한 개방형 웹 앱은 공개된 기술을 최대한 이용해 만들어집니다. 플랫폼들 사이에 아직 구현되지 않은 기술들이 있을 수 있기 때문에 피쳐 디텍션(feature detection)과 여러 플랫폼에서 작동하는 코드, 그리고 우아한 성능저하(graceful degradation)를 통해 웹 브라우저와 디바이스 모두를 지원하는 노력이 필요합니다.

+

개방형 웹 앱의 장점

+

개방형 웹 앱의 장점에 대해 조금 더 자세히 알아봅시다:

+ +

아래 동영상도 개방형 웹 앱의 일반적인 장점과 Firefox OS 플랫폼에서의 개발에 대해 다루고 있습니다.

+

+

웹이 바로 플랫폼 입니다.

+

개방형 웹 앱은 그 자체로서 Firefox OS 와 같은 플랫폼에 설치된 상태로 존재합니다. 브라우저의 즐겨찾기가 아니라 정당한 시스템의 한 부분으로 존재합니다. 개방형 웹 앱의 미래는 무척 밝습니다. 개방형 웹 앱은 우리가 잡아야하는 기회이지만 놓치게 된다면 웹은 다시 한번 쪼개지게 될 것입니다. 이런 관점에서 보면 개방형 웹 앱(줄여서 OWA)이 표준화되어 “웹”의 일부가 되는 것을 지향하고 있다는 것이 명확해집니다. 만약 성공한다면 OWA 는 향후 모든 브라우저, 운영체제, 디바이스에서 작동하게 될 것입니다.

+

Mozilla 에서 우리는 개방된 웹이 전적으로 지원하는 앱 플랫폼을 만들기 위해 열심히 노력하고 있습니다. “Mozilla 플랫폼” 이라던지 “Firefox 플랫폼”이 되는 것을 원하는 것이 아닙니다. 웹이 바로 플랫폼 입니다. 우리는 공개 API 들을 만들고, 어떻게 포터블 앱이 벤더에 종속적이지 않고도 존재할 수 있는지 보여주는 구현물을 만듭니다. Facebook 이나 Google Chrome 등 다른 그룹들도 웹 앱을 만들고 있습니다. Facebook 앱은 Facebook 서비스에 장착할 수 있도록 하는 고리를 뜻하고, Chrome 앱은 Chrome OS 디바이스와 Google 서버를 위해 설계되었습니다. Chrome 앱은 개방형 웹 앱과 굉장히 비슷합니다. 우리는 Google Chrome 팀과 앱 표준의 발전을 위해 지속적으로 협력합니다. 또한 우리는 매우 많은 비전을 공유합니다. 모든 웹 기반 앱 플랫폼들은 통합 가능성이 매우 크므로 우리는 우리가 올바른 개방형 웹 앱 API 를 만들 수 있게 도와줄 모든 벤더들을 환영합니다.

+

비록 현재로서는 개방형 웹 앱은 Mozilla Firefox 기반의 엔진(“Web 런타임”)에서만 구동되지만, 이것이 절대적인 것은 아닙니다. 개방형 웹 앱 프로젝트의 많은 부분들은 아직도 작업 중이고 한번에 모든 브라우저에서 모든 것을 구현하는 것은 불가능합니다. 개방형 웹 앱의 많은 부분은 이미 표준화 되었지만 다른 많은 부분은 아직 유동적입니다. 우리는 개방형 웹 앱이 모든 주요 브라우저에서 사용가능한 표준이 되는 것을 지향하고 바랍니다.

+

따라서 개방형 웹 앱에 대해 다룬 MDN 페이지를 읽을 때에는, 지금으로선 많은 정보들이 Firefox 에 특화된 정보일지라도, 미래에는 모든 브라우저에서 동작하는 개방형 웹 앱의 개발 정보가 될 수 있음을 명심하시기 바랍니다.

+

웹 표준

+

OWA 기술은 단일 기술로 이루어진 것이 아닙니다. OWA 기술은 많은 기술들의 집단들을 포괄하고 있으며 그 중 일부는 초기 기술들입니다. 지금으로서는 OWA 의 일부가 표준화되어 있습니다(HTML5, CSS, JavaScript, IndexedDb 등등). 그 외 부분들은 아직 표준화되지 않았기 때문에 Mozilla 의 구현은 Firefox 전용 구현이거나 다른 Mozilla 기술에서만 동작하는 구현일 수 있습니다. 모두에게 공유하고 권한을 주자는 Mozilla 의 사명처럼 이 상황은 일시적인 것 입니다. 따라서 우리는 OWA 문서들에 아직 표준화 되지 않은 OWA 기술들을 명확히 알 수 있게 하려고 합니다.

+

Mozilla 에서 사용하고 있지 않은 OWA 관련 제안들과 잠재적인 표준들도 있을 수 있습니다.

+

향후 표준이 되는 기술

+

여기에는 현재 다른 웹 플랫폼에서 아직 표준화되지 않아 Firefox 에서만 동작하는 기술들의 모음입니다:

+ +

Marketplace

+

한번 구매하면 모든 곳에서 사용할 수 있습니다.

+

Mozilla 는 개발 초기부터 사용자가 한번 구입하면 사용자가 가진 모든 HTML5 지원 디바이스에서 실행할 수 있는 앱 시스템을 개발해왔습니다. Mozilla 는 곧 최초의 Firefox OS 폰을 발매 할 예정이고 이 폰에서 구매한 앱들은 다른  디바이스에서도 실행할 수 있게 됩니다. Firefox Marketplace 를 통해 앱을 구매하면 앱 시스템이 디바이스에 영수증을 설치합니다. 영수증은 JSON Web Token 으로 Marketplace 의 공개키와 영수증을 검증하는 서비스 URL 으로 연결하는 메타데이터가 담겨있습니다. 앱이 실행되면서 이 영수증을 검증할 수는 있지만 디바이스 내의 이 영수증이 Firefox Marketplace 에 묶이는 것은 아닙니다. 이 영수증은 구매 증명서가 암호화된 것 뿐입니다. 이 영수증 규격을 따르면 누구나 개방형 웹 앱을 판매할 수 있습니다. 여러분이 앱을 구매하는 것은 곧 개방형 웹 앱 시스템을 지원하는 어느 디바이스에서든지 사용할 수 있게됨을 의미합니다.

+

Mozilla는 개방형 웹 앱을 모든 HTML5 지원 디바이스에서 구동시킬 수 있게 하는 인프라를 구축하고 있습니다. Android용 Firefox에서는 앱을 설치하고 실행할 수 있습니다. (nightly 빌드에서 지금 확인할 수 있습니다). 설치한 앱의 아이콘은 일반 Android 앱과 마찬가지로 홈 화면에 추가됩니다. 이미 Windows, Mac, or Linux 데스크탑 홤경에서 Firefox 를 사용해 웹앱을 설치하고 실행할 수 있습니다. (현재 nightly 빌드에서 작동하고 있습니다). 지금은 몇몇 Firefox 버전에서만 지원하고 있지만, 나중에는 모든 주요 브라우저들이 일련의 표준으로서 개방형 웹 앱 시스템을 지원하도록 만들고자 합니다. Mozilla 는 초기부터 HTML5를 지원하는 모든 주요 브라우저에서 이런 생각을 구현하는 방법에 대해 고려해왔습니다. 이와 관련해 Firefox 외의 브라우저에서 앱 플랫폼을 지원하는 방법을 구상한 이 자바스크립트 shim 을 참고하시기 바랍니다.

+

향후 개방형 웹 시스템에는 설치된 앱을 여러 디바이스로 동기화하는 기능이 추가될 것입니다. 영수증은 디바이스끼리 이동시킬 수 있으므로 원한다면 직접 동기화할 수도 있습니다. 단정할 수는 없지만 개방형 웹 앱은 기존의 웹사이트들과 다르지 않기 때문에 무료로 제공되는 개방형 웹 앱은 어느 브라우저에서나 실행할 수 있을 것입니다. 그러나 일부 플랫폼에서만 구현된 새로운 모바일 전용 웹 API를 사용했을 수도 있습니다.

+

아래 동영상에서 개방형 마켓플레이스의 장점과 개방된  웹이 앱 검색과 가까워지는 과정에 대해 간단히 살펴볼 수 있습니다.

+

+

WebPayment API

+

앱 상거래

+

iOS와 Android 등의 모바일 앱 플랫폼이 성공한 배경 중 하나는 이들이 모바일 결제를 통해 아주 쉽게 새로운 비즈니스 모델들을 창출할 수 있게 했기 때문입니다. 이런 비즈니스 모델들은 아직 발전단계임에도 이미 모바일에서의 상거래가 데스크탑 웹에서보다 더 자연스럽습니다. 특히 어쨌든 이미 휴대폰에서 접근중이라면 휴대전화 요금에 포함시켜 과금하는 것이 매우 편리합니다. 개방형 웹 앱 생태계는 Firefox OS 출시와 함께 WebPayment API를 통해 유료 앱 결제와 앱 내 결제를 지원할 것입니다. 상거래를 지원하는 것은 앱 플랫폼의 성장에 필수적입니다. 제시된 결제 API를 사용할지는 완전한 선택사항입니다. Mozilla 는 모든 앱의 독자적인 앱 내 결제를 허용할 것입니다.

+

더 보기

+ diff --git a/files/ko/archive/b2g_os/security/index.html b/files/ko/archive/b2g_os/security/index.html new file mode 100644 index 0000000000..3441a62463 --- /dev/null +++ b/files/ko/archive/b2g_os/security/index.html @@ -0,0 +1,58 @@ +--- +title: 보안 +slug: Archive/B2G_OS/Security +translation_of: Archive/B2G_OS/Security +--- +

이 문서는 Firefox OS의 보안과 관련된 내용입니다. 이 내용은 어플리케이션 보안 뿐만 아닌 전반적인 보안에 대한 내용과 설치 과정이 어떻게 안전하게 유지되는지를 포함하고 있습니다.

+ + + + + + + +
+

Firefox OS  보안 관련 문서들

+
+
+ Firefox OS 보안 모델
+
+ Firefox OS의 보안 모델에 관한 개요
+
+ Application security in Firefox OS
+
+ An overview of how applications are made secure on Firefox OS.
+
+ Securely installing and updating applications
+
+ How Firefox OS securely installs and updates applications.
+
+ Software permissions in Firefox OS
+
+ A guide to what types of software have permission to perform various tasks on Firefox OS.
+
+

View All...

+
+

커뮤니티로부터 도움 받기

+

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!

+ +
    +
  • Ask your question on Mozilla's Boot to Gecko IRC channel: #b2g
  • +
+

Don't forget about the netiquette...

+
+ + +
+

 

diff --git "a/files/ko/archive/b2g_os/security/\353\263\264\354\225\210_\353\252\250\353\215\270/index.html" "b/files/ko/archive/b2g_os/security/\353\263\264\354\225\210_\353\252\250\353\215\270/index.html" new file mode 100644 index 0000000000..75b129cd6f --- /dev/null +++ "b/files/ko/archive/b2g_os/security/\353\263\264\354\225\210_\353\252\250\353\215\270/index.html" @@ -0,0 +1,253 @@ +--- +title: Firefox OS 보안 모델 +slug: Archive/B2G_OS/Security/보안_모델 +tags: + - B2G + - Firefox OS + - IPC + - IPDL + - Korean + - 가이드 + - 모바일 + - 보안 +translation_of: Archive/B2G_OS/Security/Security_model +--- +

이 문서는 모바일 기기의 폴렛폼, 앱이나 데이터들을 지켜주는 Firefox OS 보안 프레임워크의 개요입니다. Mozilla는 Firefox OS에 여러가지 보안 문제들에 관한 최선의 보호를 제공해주는 매우 자세한, 일체화된, 다중 레이어의 보안 모델을 적용하였습니다.

+

폴렛폼 보안

+

Firefox OS 폴렛폼은 모든 단계에서 취약점들을 완화시켜주도록 디자인된 다중 레이어 보안 모델을 사용합니다. Front-line 대응조치들은 위협으로부터 세밀한 보호를 제공하는 심층 방어 전략과 같이 합쳐집니다.

+

보안 아키텍처

+

Firefox OS는 웹 기반 어플리케이션들과 그 아래 존재하는 하드웨어를 연결시켜 줍니다. Firefox OS는 아래 나와있는 여러 단계들로 구성된 일체화된 기술적 스택입니다.

+

+

Mobile device는 FirefoxOS를 돌리고 있는 모바일 기기를 뜻합니다. Gonk는 리눅스 커널, 시스템 라이브러리들, 펌웨어 그리고 디바이스 드라이버들로 이루어저 있습니다. Gecko는 앱 실행을 위한 프레임워크를 제공하며 모바일 기기들이 사용하는 Web API들을 내재하고 있는 어플케이션 런타임 레이어입니다. Gaia는 사용자들의 경험을 제공하는 웹 앱들의 모임체입니다(앱들은 HTML5, CSS, JavaScript, images, media 등등으로 이루워저 있습니다).

+

Gecko is the gatekeeper that enforces security policies designed to protect the mobile device from misuse. The Gecko layer acts as the intermediary between web apps (at the Gaia layer) and the phone. Gonk delivers features of the underlying mobile phone hardware directly to the Gecko layer. Web apps access mobile phone functionality only through the Web APIs, and only if Gecko allows the access request – there is no direct access, no “back door” into the phone. Gecko enforces permissions and prevents access to unauthorized requests.

+

안전한 시스템 개발

+

Firefox OS comes installed on the smart phone. The original system image is created by a known, trusted source – usually the device OEM – that is responsible for assembling, building, testing, and digitally signing the distribution package.

+

Security measures are used throughout the technology stack. File system privileges are enforced by Linux's access control lists (ACLs). System apps are installed on a volume that is read-only (except during updates, when it is temporarily read-write). Only areas containing user content may be read-write. Various components within the device hardware have built-in protections that are implemented by default as standard industry practice. Chipset manufacturers, for example, employ hardening techniques to reduce vulnerabilities. The core platform (Gecko and Gonk) is hardened to strengthen its defense against potential threats, and hardening features of the compiler are used where applicable. For further details see Runtime security.

+

안전한 시스템 업데이트

+

Subsequent upgrades and patches to the Firefox OS platform are deployed using a secure Mozilla process that ensures the ongoing integrity of the system image on the mobile phone. The update is created by a known, trusted source – usually the device OEM – that is responsible for assembling, building, testing, and digitally signing the update package.

+

System updates can involve all or a portion of the Firefox OS stack. If changes to Gonk are included in the update, then FOTA (Firmware Over the Air) is the install process used. FOTA updates can also include any other part of the Firefox OS stack, including device management (FOTA, firmware / drivers), settings management (Firefox OS settings), security updates, Gaia, Gecko, and other patches.

+

Updates that do not involve Gonk can be done using the Mozilla System Update Utility. Firefox OS uses the same update framework, processes, and Mozilla ARchive (MAR) format (used for update packages) as the Firefox Desktop product. For more information, see https://wiki.mozilla.org/Software_Update.

+

A built-in update service – which may be provided by the OEM – on the mobile phone periodically checks for system updates. Once a system package becomes available and is detected by the update service, the user is prompted to confirm installation. Before updates are installed on the mobile device, the device storage is checked for sufficient space to apply the update, and the distribution is verified for:

+ +

The following security measures are used during the update process:

+ +

Rigorous checks are in place to ensure that the update is applied properly to the mobile phone.

+

앱 보안

+

Firefox OS uses a defense-in-depth security strategy to protect the mobile phone from intrusive or malicious applications. This strategy employs a variety of mechanisms, including implicit permission levels based on an app trust model, sandboxed execution at run time, API-only access to the underlying mobile phone hardware, a robust permissions model, and secure installation and update processes. For technical details, refer to: Application security.

+

In Firefox OS, all applications are web apps – programs written using HTML5, JavaScript, CSS, media, and other open Web technologies (pages running within the browser are not referred to as Web apps in this context). Because there are no binary ("native") applications installed by the user, all system access is mediated strictly through the Web APIs. Even access to the file system is only through Web APIs and a back-end SQLite database – there is no direct access from apps to files stored on the SD card.

+

Firefox OS limits and enforces the scope of resources that can be accessed or used by an app, while also supporting a wide range of apps with varying permission levels. Mozilla implemented tight controls over what type of applications can access which APIs. For example, only certified apps (shipped with the phone) can have access to the Telephony API. The Dialer app has privileges to access the Telephony API in order to make phone calls, but not all certified apps can access this API. This prevents a scenario, for example, in which an arbitrary third-party app gets installed, dials a pay-per-use phone number (900 and 910), and racks up a large cell phone bill. However, other OEM apps might be selectively given access to the Telephony API. For example, an Operator might provide a systems management application that allows a customer to manage their account, including the ability to phone the Operator’s billing or support office directly.

+

신뢰되는 앱과 안되는 앱들

+

Firefox OS는 앱들을 다음과 같은 종류들로 나눕니다.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
종류 +

신뢰 레벨

+
설명
인증됨(Certified)매우 신뢰 +

System apps that have been approved by the Operator or OEM (due to risk of device corruption or risk to critical functionality). System apps and services only; not intended for third-party applications.
+ This designation is reserved for just a small number of critical applications. Examples: SMS, Bluetooth, camera, system clock, telephony, and the default dialer (to ensure that emergency services are always accessible).

+
+

권한 받음(Privileged)

+
신뢰 +

Third-party apps that have been reviewed, approved, and digitally signed by an authorized Marketplace.

+
+

웹 (나머지 전부)

+
+

신뢰 안됨

+
+

Regular web content. Includes both installed apps (stored the mobile phone) and hosted apps (stored remotely, with only an app manifest stored on the mobile phone). The manifest for hosted apps can be obtained through a Marketplace.

+
+

An application’s trust level determines, in part, its ability to access mobile phone functionality.

+ +

Some operations, such as network access, are assumed to be an implicit permission for all apps. In general, the more sensitive the operation (for example, dialing a phone number or accessing the Contacts list), the higher the app trust level required to execute it.

+

권한 최소화 원칙

+

For web apps, the Firefox OS security framework follows the principle of least permissions: start with the absolute minimum permissions, then selectively grant additional privileges only when required and reasonable. By default, an app starts with very low permissions, which is comparable to untrusted web content. If the app makes Web API calls that require additional permissions, it must enumerate these additional permissions in its manifest (described later in this document). Gecko will consider granting Web API access to an application only if the applicable privileges are explicitly requested in its manifest. Gecko will grant the requested permission only if the type of the Web App (certified, trusted, or web) is sufficiently qualified for access.

+

권한 받은(Privileged) 앱들의 Marketplace 리뷰 과정

+

In order for an app to become privileged, the app provider must submit it for consideration to an authorized Marketplace. The Marketplace subjects the app to a rigorous code review process: verifying its authenticity and integrity, ensuring that requested permissions are used for the purposes stated (in the permission rationale), verifying that the use of implicit permissions is appropriate, and validating that any interfaces between privileged app content and unprivileged external content have the appropriate mitigations to prevent elevation of privilege attacks. The Marketplace has the responsibility to ensure that the web app will not behave maliciously with the permissions that it is granted.

+

After an app passes this review, it is approved for use, its app manifest is digitally signed by the Marketplace, and it is made available for mobile users to download. The signature ensures that, if the web store were somehow hacked, the hacker could not get away with installing arbitrary content or malicious code on users’ phones. Due to this vetting process, Firefox OS gives privileged apps obtained from a Marketplace a higher degree of trust than everyday (untrusted) web content.

+

패키지화된 앱들과 웹에 호스팅된 앱들

+

Apps for Firefox OS can be either packaged (stored on the mobile phone) or hosted (stored on a remote web server, with just a manifest stored on the mobile phone). There are some differences in the way in which security is managed for each. Nonetheless, packaged and hosted apps are both subject to application sandboxing, which is described later in this document.

+

패키지화된 앱들(Packaged Apps)

+

A packaged app consists of a ZIP file containing application resources (HTML5, CSS, JavaScript, images, media), as well as a manifest that provides an explicit list of assets and their corresponding hashes. Certified and privileged apps must be packaged apps because the app manifest needs to be digitally signed. When a user obtains a packaged app, the ZIP file is downloaded onto the mobile phone, and the manifest is read from a known location inside the ZIP file. During the install process, app assets are verified and remain stored locally in the package. All explicit permissions are requested at runtime, showing the user the app's data usage intentions, and persisted by default.

+

To refer to app resources in a packaged app, the URL begins with app: using the following format:

+

app://identifier/path_within_zipfile/file.html

+

where app:// represents the mount point for the ZIP file, and identifier is a UUID that is generated when the app is installed on the mobile phone. This mechanism ensures that resources referred to with an app: URL are contained in the ZIP file. The path within an app: is relative, so relative links to resources in the ZIP file are allowed.

+

While packaged apps are primarily intended to be used for Certified or Privileged apps, regular web apps can also be packaged. However, they do not gain any increase in trust or permissions access simply because they are packaged.

+

웹에 호스트된 앱들(Hosted Apps)

+

Hosted apps are located on a web server and loaded via HTTP. Only the app manifest is stored on the mobile phone. Everything else is stored remotely. Certain APIs are available only to privileged and certified apps, which requires the app to be packaged due to signing requirements. Therefore, a hosted app will not have access to any of the Web API operations that require privileged or certified app status.

+

From a security point of view, hosted apps work very much like normal websites. A hosted app is loaded by invoking a hard-coded, fully-qualified URL that points to the startup page in the root directory of the app on that web server. Once a hosted app is loaded, the mobile phone links to pages using the same URLs that are used when browsing the web site.

+

앱 Manifest(App Manifest)

+

An Open Web App manifest contains information that a Web browser needs in order to interact with an app. A manifest is a JSON file with (at a minimum) a name and description for the app. For further details, refer to FAQs about app manifests.

+

Manifest 예제

+

다음의 예제는 간단한 설정이 되어있는 앱 Manifest(App Manifest)를 보여줍니다.

+
{
+  "name": "My App",
+  "description": "My elevator pitch goes here",
+  "launch_path": "/",
+  "icons": {
+    "128": "/img/icon-128.png"
+  },
+  "developer": {
+    "name": "Your name or organization",
+    "url": "http://your-homepage-here.org"
+  },
+  "default_locale": "en"
+}
+

App Manifest에서의 보안 설정

+

아래 보안 항목들처럼 App Manifest는 여러가지 다른 항목을 포함할수 있습니다:

+ + + + + + + + + + + + + + + + + + + + + + + + + +
+

항목

+
+

설명

+
+

permissions

+
+

Permissions required by the app. An app must list every Web API it intends to use that requires user permission. Most permissions make sense for privileged apps or certified apps, but not for hosted apps. Properties per API:

+
    +
  • description - A string specifying the intent behind requesting use of this API. Required.
  • +
  • access - A string specifying the type of access required for the permission. Implicit permissions are granted at install time. Required for only a few APIs. Accepted values: read, readwrite, readcreate, and createonly.
  • +
+
+

installs_allowed_from

+
+

Origin of the app. Array of origins (scheme+unique hostname) that are allowed to trigger installation of this app. Allows app providers to restrict installs from only an authorized Marketplace (such as https://marketplace.firefox.com/).

+
+

csp

+
+

Content Security Policy (CSP). Applied to all pages loaded in the app. Used to harden the app against bugs that would allow an attacker to inject code into the app. If unspecified, privileged and certified apps have system-defined defaults. Syntax:
+ https://developer.mozilla.org/en-US/docs/Apps/Manifest#csp

+

Note that this directive can only increase the CSP applied. You cannot use it, for example, to reduce the CSP applied to a privileged App.

+
+

type

+
+

애플리케이션의 종류 (web, privileged, or certified).

+
+

Firefox OS requires that the manifest be served with a specific mime-type ("application/x-web-app-manifest+json") and from the same fully-qualified host name (origin) from which the app is served. This restriction is relaxed when the manifest app (and thus the app manifest) is same-origin with the page that requested the app to be installed. This mechanism is used to ensure that it's not possible to trick a website into hosting an application manifest.

+

샌드박스화된 실행

+

이 항목은 샌드박스화된 응용프로그램과 실행에 관해서 설명합니다.

+

응용프로그램 샌드박스

+

The Firefox OS security framework uses sandboxing as a defense-in-depth strategy to mitigate risks and protect the mobile phone, platform, and data. Sandboxing is a way of putting boundaries and restrictions around an app during run-time execution. Each app runs in its own worker space and it has access only to the Web APIs and the data it is permitted to access, as well as the resources associated with that worker space (IndexedDB databases, cookies, offline storage, and so on). For details, see https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Security/Security_model.

+

The following figure provides an overview of this security model.

+

+

By isolating each app, its impact is contained within its own worker space. It cannot interfere with anything (such as other apps or their data) outside of that worker space.

+

실행 샌드박스

+

B2G (Gecko) runs in a highly-privileged system process that has access to hardware features in the mobile phone. At runtime, each app runs inside an execution environment that is a child process of the B2G system process. Each child process has a restricted set of OS privileges – for example, a child process cannot directly read or write arbitrary files on the file system. Privileged access is provided through Web APIs, which are mediated by the parent B2G process. The parent ensures that, when a child process requests a privileged API, it has the necessary permission to perform this action.

+

Apps communicate only with the B2G core process, not with other processes or apps. Apps do not run independently of B2G, nor can apps open each other. The only “communication” between apps is indirect (for example, when a listener process detects an event generated by some other process), and is mediated through the B2G process.

+

하드웨어 접근을 Web API만으로 통할수 있게 제약

+

Web apps have only one entry point to access mobile phone functionality: the Firefox OS Web APIs, which are implemented in Gecko. Gecko provides the sole gateway to the mobile device and underlying services. The only way to access device hardware functionality is to make a Web API call. There is no “native” API and there are no other routes (no “back doors”) to bypass this mechanism and interact directly with the hardware or penetrate into low-level software layer.

+

보안 인프라

+

The following figure shows the components of this security framework:

+

+ +

관리(Management)와 시행(Enforcement)를 위한 퍼미션

+

Firefox OS security is designed to verify and enforce the permissions granted to web apps.
+ The system grants a particular permission to an app only if the content requests it, and only if it has the appropriate permissions requested in the app’s manifest. Some permissions require further authorization from the user, who is prompted to grant permission (as in the case of an app requesting access to the user’s current location). This app-centric framework provides more granular control over permissions than traditional role-centric approaches (in which individual roles are each assigned a set of permissions).

+

A given Web API has a set of actions and listeners. Each Web API has a required level of permission. Every time a Web API is called, Gecko checks permission requirements (role lookup) based on:

+ +

If the request does not meet the permission criteria, then Gecko rejects the request. For example, untrusted apps cannot execute any Web APIs that are reserved for trusted apps.

+

유저에게 권한에 대해서 물어보기

+

In addition to permissions that are implicitly associated with the web apps, certain operations require explicit permission from the user before they can be executed. For these operations, web apps are required to specify, in their manifest, their justification for requiring this permission. This data usage intention informs users about what the web app intends to do with this data if permission is granted, as well as any risk involved. This allows users to make informed decisions and maintain control over their data.

+

보안 앱 업데이트 과정

+

+

For app upgrades and patches to a privileged app, app providers submit the updated package to an authorized Marketplace, where it is reviewed and, if approved, signed and made available to users. On Firefox OS devices, an App Update Utility periodically checks for app updates. If an update is available, then the user is asked whether they want to install it. Before a update is installed on the mobile device, the package is verified for:

+ +

Rigorous checks are in place to ensure that the update is applied properly to the mobile phone.
+ The complete update package must be downloaded in a specific and secure location before the update process begins. Installation does not overwrite any user data.

+

기기 보안(하드웨어)

+

Security mechanisms for the mobile device hardware are typically handled by the OEM. For example, an OEM might offer SIM (Subscriber Identity Module) card locks, along with PUK (PIN Unlock Key) codes to unlock SIM cards that have become locked following incorrect PIN entries. Contact the OEM for details. Firefox OS does allow users to configure passcodes and timeout screens, which are described in the next section.

+

데이터 보안

+

Users can store personal data on their phone that they want to keep private, including contacts, financial information (bank & credit card details), passwords, calendars, and so on. Firefox OS is designed to protect against malicious apps that could steal, exploit, or destroy sensitive data.

+

비밀번호와 자동으로 꺼지는 화면

+

Firefox OS allows users to set a passcode to their mobile phone so only those who supply the passcode can use the phone. Firefox OS also provides a timeout screen that is displayed after a configurable period of phone inactivity, requiring passcode authentication before resuming use of the phone.

+

샌드박스화된 데이터

+

As described earlier, apps are sandboxed at runtime. This prevents apps from accessing data that belongs to other apps unless that data is explicitly shared, and the app has sufficient permissions to access it.

+

시리얼화된 데이터

+

Web apps do not have direct read and write access to the file system. Instead, all access to storage occurs only through Web APIs. Web APIs read from, and write to, storage via an intermediary SQLite database. There is no direct I/O access. Each app has its own data store, which is serialized to disk by the database.

+

데이터 파기

+

When a user uninstalls an app, all of the data (cookies, localStorage, Indexeddb, and so on) associated with that application is deleted.

+

프라이버시

+

Mozilla is committed to protecting user privacy and user data according to its privacy principles (https://www.mozilla.org/privacy/), which stem from the Mozilla Manifesto (https://www.mozilla.org/about/manifesto.html). The Mozilla Firefox Privacy Policy describes how Mozilla collects and uses information about users of the Mozilla Firefox web browser, including what Firefox sends to websites, what Mozilla does to secure data, Mozilla data practices, and so on. For more information, see:

+ +

Firefox OS는 이런 원칙들을 어디에 자신의 개인 정보가 갈지 결정하는 유저들에게 제어권을 줌으로서 적용합니다. Firefox OS는 다음과 같은 기능들을 제공합니다:

+ diff --git a/files/ko/archive/b2g_os/simulator/index.html b/files/ko/archive/b2g_os/simulator/index.html new file mode 100644 index 0000000000..0250696f04 --- /dev/null +++ b/files/ko/archive/b2g_os/simulator/index.html @@ -0,0 +1,280 @@ +--- +title: Firefox OS 시뮬레이터 +slug: Archive/B2G_OS/Simulator +translation_of: Archive/B2G_OS/Simulator +--- +
+

Firefox OS 시뮬레이터는 아직 개발 초기 단계입니다. 저희가 원하는만큼의 안정성과 완성도 없습니다.

+

버그를 발견하셨다면 GitHub에 보고 해주세요. 만약에 물어보실게 있으시다면 개발자 도구 메일링 리스트 irc.mozilla.org의 #devtools에서 질문해 주세요.

+

도움 받기 항목의 Verbose logging을 활성화 하는 방법과 최신 빌드를 받는 법을 읽어 주세요.

+
+

Firefox OS 시뮬레이터 부가 기능을 이용해 데스크톱 환경에서 Firefox OS 응용 프로그램을 테스트하고 디버깅 할 수 있습니다. 시뮬레이터에서는 실제 장치 사용하는 것보다도 Code-Test-Debug 주기가 빨라집니다. 또한 당연히 시뮬레이터를 사용하기 위해 실제 디바이스가 필요 없습니다.

+

근본적으로, 시뮬레이터 부가 기능 구성하는 것은 다음과 같습니다 :

+ +

아래 스크린 시뮬레이터를 사용한 디버깅 세션을 보여줍니다.

+

Dashboard는 오른쪽 상단의 Firefox 탭 안에서 돌아가고 있습니다. 여기에 "Where am I?"라는 이름의 패키지 애플리케이션 추가했습니다. 상좌단의 앱은 시뮬레이터를 돌리고 있습니다. 또한 아래쪽의 패널에서 보시다시피 디버깅 도구와 연결하고 있습니다. 콘솔 창에 앱에 대한 메시지가 표시되는 것을보실 수 있습니다.

+

+

이 가이드는 다음과 같은 주제를 다룹니다:

+ +
+ 실제 Web 응용 프로그램을 디버깅하는데  Simulator를 사용하는 방법을 보여주는 실질적인 자세한 설명은 Simulator Walkthrough 페이지를 참조하십시오.
+

시뮬레이터 설치하기

+

시뮬레이터 는 Firefox 부가 기능 에서 배포 하고 있습니다 . 설치 방법은 다음과 같습니다 :
+  

+
    +
  1. Firefox에서 addons.mozilla.org 에서 시뮬레이터 페이지 를 방문 하십시오.
  2. +
  3. "Firefox 에 추가" 를 클릭 하십시오.
  4. +
  5.  기능을 다운로드 한뒤 확인 메시지가 표시 되면 " 지금 설치 " 를 클릭 하십시오.
  6. +
+


+ 부가 기능의 크기가 큰 관계로 설치 중에 Firefox가 몇 초 동안 정지되거나 "경고 : 응답하지 않는 스크립트" 라는 제목의 대화 상자가 표시 될 수 있습니다. 대화 상자가 표시 되면 설치가 완료 될 때까지 기다리기 위하여 " 처리 를 계속 " 을 클릭 하십시오. 이 문제는 Firefox 27부터 발생하지 않습니다.
+
+ 시뮬레이터 부가 기능 의 설치 가 완료되면 Firefox는 정기적으로 새로운 버전을 확인 하여 최신 상태 를 유지 합니다.
+
+ 시뮬레이터를 설치 하면 대시보드가 자동으로 열리지 만 "Firefox" 메뉴 (OS X 및 Linux에서는 "도구" 메뉴 ) 의 "웹 개발 도구" 에서 " Firefox OS 시뮬레이터 " 를 선택하여 언제든지 대시보드를 열 수 있습니다 :

+


+ 아래 보여지는 대시보드는 애플리케이션 시뮬레이터에 추가하고 실행하는 데 사용하는 도구입니다:

+

앱을 추가하고, 제거하고, 새로고침하기

+

앱 추가하기

+

패키지 형 응용 프로그램을 시뮬레이터 에 추가 하려면 대시보드를 열고 " Add Directory " 를 클릭합니다. 그리고 앱의 매니페스트 파일을 선택 하십시오.
+
+ 호스트 형 응용 프로그램을 추가 하려면 " URL for page or manifest.webapp "라고 표시 되는 텍스트 상자에 URL 을 입력 하고 " Add URL " 을 클릭 하십시오. URL이 매니페스트를 가리키는 경우 해당 매니페스트가 사용 됩니다. 그렇지 않은 경우 는 Dashboard 가 해당 URL 위한 매니페스트를 생성 합니다 : 따라서, URL을 입력 하는 것만으로 모든 Web 사이트를 앱 으로 추가 할 수 있습니다 .
+
+ 앱 을 추가 하면 대시보드가 매니페스트 파일 에 대해 일련 의 테스트 를 수행하여 일반적인 문제를 확인 합니다. 어떤 테스트 를 실시할지 에 대한 자세한 내용 은 매니페스트 검증 섹션을 참조하십시오.
+
+ 매니페스트 유효성 검사 응용 프로그램 오류가 발견 되지 않으면 대시보드는 자동으로 시뮬레이터에서 응용 프로그램을 실행 합니다.

+

앱 관리하기

+

추가하면 매니저에서 설치된 응용 프로그램 목록에 표시됩니다 :
+
+ 항목은 앱에 대한 다음과 같은 정보를 보여줍니다:

+ +

또 다음과 같은 네개의 명령을 제공합니다.

+ +
+

시뮬레이터 창에서 애플리케이션 업데이트 : 애플리케이션 실행하는 경우 메뉴 에서 작업 또는 할당 된 바로 가기 키로 시뮬레이터 창에서 직접 응용 프로그램 업데이트 다시로드 할 수 있습니다.

+
+

매니페스트 검증

+

매니페스트를 제출하면 매니저는 매니페스트 여러개의 검증 테스트를 실행 합니다. 검증 테스트는 세 가지 범주 에 대해 문제를 보고합니다 :
+  

+ +

이것은 앱 의 항목에 발생한 문제의 간략적인 정보를 제공합니다 : 요약된 항목을 클릭 하면 세부 정보가 표시 됩니다.

+

매니페스트 에러

+

대시보드 는 다음과 같은 상황을 오류로 보고 합니다. 이 문제를 해결 하지 않으면 해당 응용 프로그램은 시뮬레이터에서 실행되지 않을 것입니다:

+ +

다음은 매니페스트 필수 필드 "name"이 없는 매니페스트를 추가하려고 할 때의 예시입니다.
+

+

매니페스트 경고

+

대시보드는 다음과 같은 매니페스트 이슈들의 대한 경고를 보고할 것입니다:

+ +

시뮬레이터 한정 경고들

+

마지막으로, 매니저는 앱이 사용하는 Firefox OS 기능중 시뮬레이터에서 완벽하게 지원되지 않는 기능들에 관해서 경고를 할 것입니다:

+ +

시뮬레이터 돌리기

+

시뮬레이터를 실행시키는 방법엔 다음과 같은 두가지 방법이 있습니다:

+ +

어떤 방법을 쓰던지와 상관 없이 시뮬레이터가 작동하기 시작되면, "Stopped"라고 써 있던 버튼이 초록색으로 된 "Running"라고 써 있는 버튼이 됩니다. 시뮬레이터를 정지하실려면 이 버튼을 한번 더 클릭해 주세요.
+  

+

시뮬레이터는 320x480 픽셀의 시뮬레이션된 화면과 하단에 툴바와 상단에 메뉴바를 가지는 분리된 새로운 창으로 나타납니다:

+

+

터치 이벤트를 시뮬레이션 하기 위해서는 마우스 버튼 클릭을 유지하면서 드래그 해 주세요. 홈스크린에서 오른쪽으로부터 왼쪽으로 클릭하시고 드래그 하시는걸 통해서 여러분은 여러분이 추가한 앱들과 내장된 앱들을 보실수 있습니다:

+

+

시뮬레이터 툴바

+

하단 툴바에는 왼쪽에서부터 오른쪽으로 홈 버튼, 스크린 회전 버튼, 그리고 Geolocation 버튼이 있습니다.

+ +

+

시뮬레이터 메뉴바

+

상단 메뉴바에서는 여러분은 개발을 더 효율적으로 만들수 있게 해주는 여러 명령들을 쓰실수 있습니다.

+

+ +

"App Refresh"를 실행하는 키보드 단축키는 앱을 웹 페이지처럼 반복적으로 개발하는걸 가능하게 합니다:

+ +
+

"앱을 새로 고침하고 데이터를 제거하기" 숨겨진 지름길: 가끔씩 시뮬레이터가 앱을 위해서 저장한 데이터를 초기화 시키는게 도움이 될 때도 있습니다, 그래서 시뮬레이터는 이와 관련된 숨겨진 단축키를 가지고 있습니다. Shift - Ctrl/Cmd - R를 이용하면 시뮬레이터는 다음과 같은 여러 데이터를 초기화한뒤 앱을 새로 고침할 것입니다:

+ +
+

개발자 도구들과 연결하기

+

여러분의 앱의 디버깅에 도움을 주기 위해 여러가지 개발자 도구들을 시뮬레이터 연결하실수 있습니다. 지금부로는 오직 JavaScript Debugger, Web Console, Style Editor, Profiler 그리고 Network Monitor만 연결할수 있지만, 저희는 더 많은 developer tools을 연결할수 있도록 노력중입니다.

+
+

이 중에 몇몇 툴은 파이어폭스의 베타, Aurora 혹은 Nightly builds 버전에서만 이용하실수 있습니다.

+
+

개발자 도구들을 시뮬레이터와 연결하실려면, "Connect" 버튼을 클릭해 주세요:

+

+

대시보드는 대시보드 하단에 개발자 도구 창을 열고 앱과 연결합니다:

+

+

웹 콘솔

+

앱은 console object(콘솔 객체)를 이용해 log를 남길수 있습니다. 웹 콘솔은 다음과 같은 앱이 작성한 메세지를 표시합니다: 네트워크 요구, CSS 그리고 J S 경고/오류, 보안 오류들. (Learn more about the Web Console.)

+

디버거

+

문제를 더 빨리 발견하고 해결하기 위해 디버거를 사용하면 여러분은 손쉽게 연결된 앱의 자바스크립트의 단계별 실행 , 분기점 관리, 식 보기 등을 할수가 있습니다. (Learn more about the Debugger.)

+

스타일 편집기

+

스타일 편집기를 연결하면 에서 참조하는 CSS 파일의 열람이나 편집이 가능합니다. 변경 한 부분은 업데이트 필요없이 실시간으로 반영됩니다. (Learn more about the Style Editor.)

+

프로파일러

+

에 연결된 프로파일러 도구를 사용하여 JavaScript 코드에서 시간이 너무 많이 소요하는 구간을 찾을수 있습니다. 프로파일러는 JavaScript 최근 호출 스택을 샘플하고 컴파일 상태를 주기적으로 샘플링합니다. (Learn more about the Profiler.)

+

네트워크 모니터

+

새로운 네트워크 모니터 덕분에, 앱이 시작한 모든 네트워크 요청 상태 헤더, 콘텐츠 타이밍 사용자 친화적인 인터페이스를 통해 분석 할 수 있습니다.(Learn more about the Network Monitor.)

+

영수증

+

만약에 여러분이 유료 앱을 개발중이시라면 여러분은 여러분의 앱의 유효한 (cryptographically signed) 영수증(valid receipt)을 가진 영수증 인증 코드 (receipt validation code, 코드는 유저가 이미 앱을 구매했거나 환불을 요구했음을 보여주고 유저에게 앱의 기능을 제한하거나 허락함을 알립니다)를 테스트 하셔야 합니다.

+

시뮬레이터의 대시보드의 항목에있는 "Receipts"메뉴를 이용해 각 앱을 "Valid, "Invalid", "Refunded" 테스트 영수증함께 설치할수 있습니다. 테스트하려는 영수증 종류 선택하면 대시보드가 Marketplace 영수증 서비스에서 종류 테스트 영수증을 가져오고 시뮬레이터에서 테스트 영수증과 함께 응용 프로그램을 다시 설치합니다 :

+

+

기기로의 전송

+

만약에 여러분이 별도의 Firefox OS 기기들이 있으시다면, 여러분을 그 기기들을 시뮬레이터에 연결할수 있고, 추가하신 앱들을 대시보드에서 기기들로 바로 전송할수 있습니다.

+

기기에 연결하기

+

기기를 연결하시려면 connecting a Firefox OS device to the desktop에 있는 가이드를 따르십시오.시뮬레이터가 ADB를 미리 포함하고 있기 때문에 따로 설치를 하실 필요가 없다는걸 염두해 두세요.

+

앱을 디바이스로 전송하기

+

일단 데스크탑과 기기를 준비하시고 기기를 데스크탑에 USB로 연결하셨다면, 대시보드에서 디바이스가 연결되었음을 알리는 "Device connected"가 뜨는걸 보실수 있습니다. 그리고 "Push"라고 되어 있는 새로운 명령 버튼이 나타납니다:

+

+

 "Push"버튼을 클릭하시면 선택하신 앱은 자동적으로 Firefox OS 기기에 전송되었을 것입니다.

+
+

수동적 방법:

+ +
+

Firefox OS 기기 연결 확인

+

어느 기기에서 재부팅 할때나 첫번째 "Push"(전송) 요구는 디바이스에서 확인되어야 합니다:

+

+

Linux에서 문제해결

+

udev rules를 생성하신뒤에 기기에 연결이 안 된다면 이 bug를 참조하세요.

+

시뮬레이터의 제약

+

Firefox OS 시뮬레이터가 완벽한 시뮬레이션을 제공하지 않음을 염두해 두세요.

+

하드웨어 제약

+

스크린 사이즈를 제외하고도, Firefox OS 시뮬레이터는 Firefox OS 기기들의 CPU 속도나 메모리같은 하드웨어 제약을 시뮬레이트하지 않습니다.

+

오디오/비디오 코덱

+

다음과 같은 코덱들은 하드웨어 가속에 의존하므로 아직 지원되지 않습니다:

+ +

이것은 위에 리스트 되어있는 코덱을 사용하는 앱이나 유튜브같은 웹사이트들은 작동하는것이 불가능하다는걸 의미합니다.

+

지원되지 않는 API들

+

데스크탑 하드웨어의 제약 때문에, 몇가지의 API들은 시뮬레이터에서 작동을 하지 않습니다. 저희는 geolocation과 같은 몇몇 API들을 위한 시뮬레이션을 넣었습니다. 하지만, 지금으로서는 다음 리스트에 있는 API들은 작동하지 않습니다. 다음과 같은 API를 사용하면 에러가 뜨거나 맞지 않은 결과를 가져다 줄 것입니다:

+ +

도움 받기

+

Firefox OS 시뮬레이터는 아직 개발 초기 단계입니다. 저희가 원하는만큼의 안정성과 완성도 없습니다.

+

버그를 발견하셨다면 GitHub에 보고 해주세요. 만약에 물어보실게 있으시다면 개발자 도구 메일링 리스트 irc.mozilla.org의 #devtools에서 질문해 주세요.

+

verbose logging을 활성화하는 방법

+

설정하기 위해 about:config를 사용해 주세요. extensions.r2d2b2g@mozilla.org.sdk.console.logLevel를 정수값 0으로 설정해 주세요, 그리고 부가 기능을 비활성화하고 재활성화를 해주세요. 시뮬레이터 구동에 관련한 추가적 메세지들은 에러 콘솔에서 나타날 것입니다(혹은 최신 버전의 Firefox의 브라우저 콘솔에서)

+

어떻게 시뮬레이터의 가장 최신 프리뷰 빌드를 받을수 있을까요?

+

이 문서의 한 섹션이 설명하는 대로, 여러분은 최신 Firefox OS 빌드 추가기능을 addons.mozilla.org에서 받을수 있습니다.

+

가끔 여러분은 아직 공식적으로 릴리즈 되지 않는 기능들을 사용할수도 있을텐데요. 그렇다면, 여러분들은 최신 프리뷰 빌드들을 다음과 같은 URL들에서 받으실수 있습니다.

+ +

프리뷰 빌드들은 릴리즈된 빌드들보다 덜 안정적이고 테스트 되어야 함을 염두해 두세요.

+ +
    +
  1. Toolbox +
      +
    1. Page Inspector
    2. +
    3. Web Console
    4. +
    5. Style Editor
    6. +
    7. Debugger
    8. +
    9. Profiler
    10. +
    11. Network Monitor
    12. +
    13. Shader Editor
    14. +
    +
  2. +
  3. Mobile +
      +
    1. Remote Debugging
    2. +
    3. Firefox OS 시뮬레이터
    4. +
    5. Responsive Design View
    6. +
    +
  4. +
  5. Standalone tools +
      +
    1. Scratchpad
    2. +
    3. Browser Console
    4. +
    5. Developer Toolbar
    6. +
    7. 3D View
    8. +
    9. Paint Flashing Tool
    10. +
    11. Browser Toolbox
    12. +
    +
  6. +
+

 

+

 

diff --git "a/files/ko/archive/b2g_os/\354\204\261\353\212\245/index.html" "b/files/ko/archive/b2g_os/\354\204\261\353\212\245/index.html" new file mode 100644 index 0000000000..dd7ccb98ee --- /dev/null +++ "b/files/ko/archive/b2g_os/\354\204\261\353\212\245/index.html" @@ -0,0 +1,146 @@ +--- +title: 성능 +slug: Archive/B2G_OS/성능 +translation_of: Web/Performance/Fundamentals +--- +

성능 광범위한 주제입니다. 문서는 Firefox OS 어떻게 설계 및 최적화되어 있는지의 관해 대략적인 개요 설명합니다. 그리고 개발자가 자신 코드 성능을 향상시키는 데 사용할 수있는 도구와 프로세스를 소개합니다.

+

성능이란 무엇인가요?

+

성능은 전적으로 사용자에 의해 인식됩니다. 사용자가 터치, 이동, 대화를 통해 시스템 입력 정보를 제공할때 대가로 사용자 시각적, 촉각 , 청각 적 피드백 방식에 의해 출력 정보를 받습니다. 성능은 입력에 대한 응답 출력 품질입니다.

+

유저 인식 성능(이 다음부터는 UPP라 부릅니다) 대신 다른 목적으로 최적화된 코드는 여러가지 타겟을 동등하게 최적화된 코드와 비교해서 떨어질수밖에 없습니다. 사용자는 프로세싱 성능이 떨어져도 응답성이 좋고 부드러운 응용 프로그램들을 선호합니다. 예를 들자면, 사용자들은 응답성이 좋으면서 부드럽지만 초당 1,000개의 데이터베이스 트렌젝션 처리를 하는 앱을 응답성이 좋지 않고 부드럽지 않지만 초당 100,000,000개의 데이터베이스 트렌젝션 처리를 하는 앱보다 선호할 것입니다.

+

당연히 데이터베이스 초당 트렌젝션 수같은 성능을 빠르게 처리하는게 의미가 없다는게 아닙니다; 그런건 당연히 의미가 있죠. 저희가 말하려는건 이런 것에 주를 두지 말고, UPP를 개선하는데 주를 둬야 한다는 것입니다.

+

성능에 관한 주요 지표 여러 가지가 있습니다. 첫번째로 "응답성 (responsiveness)"입니다. 응답성은 단순히 사용자 입력에 대한 시스템 출력(복수가 될 수도 있습니다)의 반환 속도입니다. 예를 들어 사용자가 스크린 누를 사용자들은 픽셀에 어떤 변화가 일어난다고 생각합니다. 이 경우에는 ""제스처에서 픽셀 변경 될 때까지 걸린 시간이 응답성의 지표가 됩니다.

+

응답성은 자주 여러 단계의 피드백을  필요로합니다. 응용 프로그램 시작 특히 중요한 사례 중 하나이며, 이에 대해서는 나중에 자세히 설명합니다.

+

응답성은 간단히 아무도 무시되는걸 원하지 않는다는 단순한 이유 때문에 중요합니다. 사용자가 입력을 한 후에 시스템이 반응하기까지의 시간은 유저가 무시되는 시간입니다. 무시되는 것은 짜증과 화를 유발합니다.

+

다음으로 중요한 지표 "프레임 레이트"입니다. 프레임 레이트란 시스템 사용자에게 표시하는 픽셀 변경하는 속도입니다. 이것은 흔한 컨셉이고 모두가 좋아합니다. 예를 들어 모든 사람은  초당 60 프레임 레이트를 보여주는 게임은 이유를 설명 할 수 없어도 초당 10 프레임 레이트를 보여주는 게임보다 더 선호할 것입니다.

+

프레임 레이트는 "서비스의 질"의 지표로서 중요합니다. 컴퓨터의 디스플레이는 전자를 움직여서 현실을 모사하여 사용자들의 눈을 속이도록 디자인되어 있습니다. 예를 들자면, 문서 리더 디스플레이는 실제 종이의 선명한 텍스트 반사되는 빛 같은 패턴으로 사용자 망막 닿는 빛을 생성하도록 설계된 디스플레이 픽셀 만들어 텍스트 표시합니다.

+

현실에서는 동작은 "연속적입니다" (저희 두뇌가 알려주는 바에 따르면요); it's not jerky and discrete, but rather "updates" smoothly. (Strobe lights are fun because they turn that upside down, starving our brains of inputs to create the illusion of discrete reality.) On a computer display, a higher framerate simply allows the display to imitate reality more faithfully.

+

(흥미로운 점은 인간은 보통 60Hz 이상의 프레임 레이트를 구분하지 못한다는 것입니다. 그렇기 때문에 대부분의 현대의 전자식 디스플레이들은 60Hz로 디자인 되어 있습니다. 예를 들자면 TV 스크린은 벌새에게는 비자연스럽고 끊기는 것처럼 보일 것입니다.)

+

Memory usage is another key metric. Unlike responsiveness and framerate, users don't directly perceive memory usage. However, memory usage is a close approximation to "user state". An ideal system would maintain 100% of user state at all times: all applications in the system would run simultaneously, and all applications would retain the state created by the user the last time the user interacted with the application. (Application state is stored in computer memory, which is why the approximation is close.)

+

An important corollary of this is contrary to popular belief: a well-designed system should not be optimized to maximize the amount of free memory. Memory is a resource, and free memory is a unused resource. Rather, a well-designed system should be optimized to use as much memory as possible in service of maintaining user state, while meeting other UPP goals.

+

Optimizing a system to use memory doesn't mean it should waste memory. Using more memory than is required to maintain some particular user state is wasting a resource that could be used to retain some other user state.

+

In reality, no system can maintain all user state. Intelligently allocating memory to user state is an important concern that's discussed in more detail below.

+

The final metric discussed here is power usage. Like memory usage, users don't directly perceive power usage. Users perceive power usage indirectly by their devices being able to maintain all other UPP goals for a longer duration. In service of meeting UPP goals, the system must use only the minimum amount of power required.

+

The remainder of this document will discuss performance in terms of these metrics.

+

폴랫폼 성능

+

이 부분은 Firefox OS가 응용 프로그램 아래서 보통 어떻게 성능을 향상시키기 위해 공헌하는지에 대한 간략적 요약입니다. 앱 개발자나 유저의 입장에서 "이 폴랫폼이 저를 위해서 뭘 해줄수 있나요?" 라는 질문에 대한 대답입니다.

+

This section assumes the reader is familiar with the basic conceptual design of Firefox OS.

+

Firefox OS is optimized for applications built with web technologies, HTML/CSS/JavaScript and so on. Except for a handful of basic system services, all the code that runs in Firefox OS is web applications and the Gecko engine. Even the operating system window manager is written in HTML/CSS/JS.

+

Because the core operating system is built with the same web technologies that applications are built with, the performance of those technologies is critical. There's no "escape hatch". This greatly benefits developers because all the optimizations that enable a performant OS window manager, for example, are available to third-party applications as well. There's no "magic performance sauce" available only to preinstalled code.

+

The web platform provides many tools, some better suited for particular jobs than others. All application logic is written in JavaScript. For displaying graphics, developers can choose between the high-level declarative languages of HTML/CSS, or use low-level imperative interfaces offered by the canvas element.

+

HTML과 CSS는 생산성을 크게 증가시킵니다, pixel-level control over rendering or a few frames per second. Text and images are reflowed automatically, the system theme is applied to UI elements by default, and "built-in" support is provided for some use cases developers may not think about initially, like different-resolution displays or right-to-left languages.

+

The canvas element offers a pixel buffer directly to developers to draw on. This gives pixel-level control over rendering and precise control of framerate to developers. But it comes at the expense of extra work needed to deal with multiple resolutions and orientations, right-to-left languages, and so forth. Developers draw to canvases using either a familiar 2D drawing API, or WebGL, a "close to the metal" binding that mostly follows OpenGL ES 2.0.

+

(Somewhere "in between" HTML/CSS and canvas is SVG, which is beyond the scope of this document.)

+

The Gecko JavaScript engine supports just-in-time (JIT) compilation. This enables application logic to perform comparably to other virtual machines, such as Java virtual machines, and in some cases close to "native code".

+

The graphics pipeline in Gecko underlying HTML/CSS and canvas is optimized in several ways. The HTML/CSS layout and graphics code in Gecko minimizes invalidation and repainting for common cases likes scrolling; developers get this support "for free". Pixel buffers painted by both Gecko "automatically" and applications to canvas "manually" minimize copies when being drawn to the display framebuffer. This is done by avoiding intermediate surfaces where they would create overhead (such as per-application "back buffers" in many other operating systems), and by using special memory for graphics buffers that can be directly accessed by the compositor hardware. Complex scenes are rendered using the device's GPU for maximum performance. To improve power usage, simple scenes are rendered using special dedicated composition hardware, while the GPU idles or turns off.

+

Fully static content is the exception rather than the rule for rich applications. Rich applications use dynamic content with animations, transitions, and other effects. Transitions and animations are particularly important to applications. Developers can use CSS to declare even complicated transitions and animations with a simple, high-level syntax. In turn, Gecko's graphics pipeline is highly optimized to render common animations efficiently. Common-case animations are "offloaded" to the system compositor, which can render them both performantly and power efficiently.

+

The runtime performance of applications is important, but just as important is their startup performance. Firefox OS improves startup experience in several ways.

+

Gecko is optimized to load a wide variety of content efficiently: the entire Web! Many years of improvements targeting this content, like parallel HTML parsing, intelligent scheduling of reflows and image decoding, clever layout algorithms, etc, translate just as well to improving web applications on Firefox OS. The content is written using the same technologies.

+

Each web application has its own instance of the Gecko rendering engine. Starting up this large, complicated engine is not free, and because of that, Firefox OS keeps around a preallocated copy of the engine in memory. When an app starts up, it takes over this preallocated copy and can immediately begin loading its application resources.

+

Applications "start" most quickly when they're already running. To this end, Firefox OS tries to keep as many applications running in the background as possible, while not regressing the user experience in foreground applications. This is implemented by intelligently prioritizing applications, and discarding background applications according to their priorities when memory is low. For example, it's more disruptive to a user if their currently-playing music player is discarded in the background, while their background calculator application keeps running. So, the music player is prioritized above the calculator automatically by Firefox OS and the calculator is discarded first when memory is low.

+

Firefox OS prevents applications that are running in the background from impacting the user experience of foreground applications through two mechanisms. First, timers created by background apps are "throttled" to run at a low frequency. Second, background applications are given a low CPU priority, so that foreground applications can get CPU time when they need it.

+

In addition to the above, Firefox OS includes several features designed to improve power usage that are common to mobile operating systems. The Firefox OS kernel will eagerly suspend the device for minimal power usage when the device is idle. Relatedly, ICs like the GPU, cellular radio, and Wifi radio are powered down when not being actively used. Firefox OS also takes advantage of hardware support for media decoding.

+

응용 프로그램 성능

+

This section is intended for developers asking the question: "how can I make my app fast"?

+

시작 시간 성능

+

Application startup is punctuated by three user-perceived events, generally speaking. The first is the application "first paint": the point at which sufficient application resources have been loaded to paint an initial frame. Second is when the application becomes interactive; for example, users are able to tap a button and the application responds. The final event is "full load", for example when all the user's albums have been listed in a music player.

+

The key to fast startup is to keep two things in mind: UPP is all that matters, and there's a "critical path" to each user-perceived event above. The critical path is exactly and only the code that must run to produce the event.

+

For example, to paint an application's first frame that comprises visually some HTML and CSS to style that HTML, (i) the HTML must be parsed; (ii) the DOM for that HTML must be constructed; (iii) resources like images in that part of the DOM have to be loaded and decoded; (iv) the CSS styles must be applied to that DOM; (v) the styled document has to be reflowed. Nowhere in that list is "load the JS file needed for an uncommon menu"; "fetch and decode the image for the High Scores list"; etc. Those work items are not on the critical path to painting the first frame.

+

It seems obvious, but to reach a user-perceived startup event more quickly, the main "trick" is to just not run code that's off the critical path. Alternatively, shorten the critical path by simplifying the scene.

+

The web platform is highly dynamic. JavaScript is a dynamically-typed language, and the web platform allows loading code, HTML, CSS, images, and other resources dynamically. These features can be used to defer work at startup that's off the critical path, by loading the unnecessary content "lazily" some time after startup.

+

Another problem that can delay startup is idle time, caused by waiting on responses to requests like database loads. To avoid this problem, applications can "front load" the work by issuing requests as early as possible in startup. Then when the data is needed later, it's hopefully already been fetched and the application doesn't need to wait.

+

Relatedly, it's important to separate network requests for dynamic data from static content that can be cached locally. Locally-cached resources can be loaded much more quickly than they can be fetched over high-latency and lower-bandwidth mobile networks. Network requests should never be on the critical path to early application startup. Caching resources locally is also the only way applications can be used when "offline". Firefox OS allows applications to cache resources by either being "packaged" in a compressed ZIP file or "hosted" through HTML5 appcache. How to choose between these options for a particular type of application is beyond the scope of this document, but in general application packages provide optimal load performance; appcache is slower.

+

A few other hints are listed below:

+ +

프레임레이트

+

The first important consideration for achieving high framerate is to select the right tool for the job. Mostly static content that's scrolled and infrequently animated is usually best implemented with HTML/CSS. Highly dynamic content like games that need tight control over rendering, and don't need theming, is often best implemented with canvas.

+

For content drawn using canvas, it's up to the developer to hit framerate targets: they have direct control over what's drawn.

+

For HTML/CSS content, the path to high framerate is to use the right primitives. Firefox OS is highly optimized to scroll arbitrary content; this is usually not a concern. But often trading some generality and quality for speed, such as using a static rendering instead of a CSS radial gradient, can push scrolling framerate over a target. CSS media queries allow these compromises to be restricted only to devices that need them.

+

Many applications use transitions or animations through "pages", or "panels". For example, the user taps a "Settings" button to transition into an application configuration screen, or a settings menu "pops up". Firefox OS is highly optimized to transition and animate scenes that

+ +

Transitions and animations that adhere to these guidelines can be offloaded to the system compositor and run maximally efficiently.

+

To help diagnose low framerates, see the section below.

+

메모리와 전원 사용량

+

Improving memory and power usage is a similar problem to speeding up startup: don't do unnecessary work; use efficient data structures; lazily load uncommonly-used UI resources; ensure resources like images are optimized well.

+

Modern CPUs can enter a lower-power mode when mostly idle. Applications that constantly fire timers or keep unnecessary animations running prevent CPUs from entering low-power mode. Power-efficient applications don't do that.

+

When applications are sent to the background, a visibilitychange event is fired on their documents. This event is a developer's friend; applications should listen for it. As mentioned above, Firefox OS tries to keep as many applications running simultaneously as it can, but does have to discard applications sometimes. Applications that drop as many loaded resources as possible when sent to the background will use less memory and be less likely to be discarded. This in turn means they will "start up" faster (by virtue of already being running) and have better UPP.

+

Similarly, applications should prepare for the case when they + + are + discarded. To improve user-perceived memory usage, that is to say, making the user feel that more of their state is being preserved, applications should save the state needed to return the current view if discarded. If the user is editing an entry, for example, the state of the edit should be saved when entering the background.

+

성능을 측정하고 문제를 분석하기

+

성능을 측정하고 문제를 분석하기 전에, 이걸 기억하세요:

+
+
+  
+
+ 절대. 기기. 위에서. 테스트. 하세요.
+
+  
+
+

A great strength of the web platform is that the same code written for "desktop" web browsers runs on Firefox OS on mobile devices. Developers should use this to improve productivity: develop on "desktops", in comfortable and productive environments, as much as possible.

+

But when it comes time to test performance, mobile devices must be used. Modern desktops can be more than 100x more powerful than mobile hardware. The lower-end the mobile hardware tested on, the better.

+

With that caveat, the sections below describe tools and processes for measuring and diagnosing performance issues.

+

성능을 측정하기

+

Firefox OS comes built-in with some convenient and easy-to-use tools that, when used properly, can be used to quickly measure performance. The first tool is the "framerate monitor". This can be enabled in the Firefox OS Settings application.

+

The framerate monitor continuously reports two numbers. The values reported are an average of recent results within a sliding window, meant to be "instantaneous" but fairly accurate. As such, both numbers are "guesses". The left number is the "composition rate": the estimated number of times per second Firefox OS is drawing frames to the hardware framebuffer. This is an estimate of the user-perceived framerate, and only an estimate. For example, the counter may report 60 compositions per second even if the screen is not changing. In that case the user-perceived framerate would be 0. However, when used with this caveat in mind and corroborated with other measurements, the monitor can be a useful and simple tool.

+

Screenshot of fps counter

+

The rightmost number is the "layer transaction rate", the estimated number of times per second processes are repainting and notifying the compositor. This number is mostly useful for Gecko platform engineers, but it should be less than or equal to the composition rate number on the left.

+

Firefox OS also has a tool that can help measure startup time, specifically the "first paint" time described above. This "time-to-load" tool can be enabled using the Settings application. The value shown by the tool is the elapsed time between when the most recent application was launched, and an estimate of the first time that application painted its UI. This number only approximates the real "first paint" time, and in particular underestimates it. However, lowering this number almost always correlates to improvements in real startup time, so it can be useful to quickly measure optimization ideas.

+

Screenshot of enabling ttl

+

For accurately measuring both startup times and responsiveness, a high-speed camera is indispensable. "High-speed" means that the camera can record 120 frames per second or above. The higher the capture rate, the more accurate the measurements that can be made. This may sound like exotic technology, but consumer models can be purchased for a few hundred US dollars.

+

Link to example video of high-speed capture that I can't upload

+

The measuring process with these cameras is simple: record the action to be studied, and then play back the capture and count the number of frames that elapse between the input (say, a tap gesture) and the desired output (pixels changing in some way). Divide the number of counted frames by the capture rate, and the resulting number is the measured duration.

+

Mozilla built an automated tool called Eideticker which operates on the same principle as described above. The difference is that Eideticker uses synthetic user input events and HDMI capture to measure durations. The code is available and can be used with any device with an HDMI output.

+

Measuring power can be more difficult. It's possible to jury-rig measurement apparatus with a soldering iron, but a good approximation of power usage can be gathered by observing CPU load. Simple command-line tools like |top| allow monitoring CPU usage continuously.

+

In general, when measuring performance, don't be proud! "Primitive technology" like a stopwatch or logging, when used effectively, can provide eminently usable data.

+

성능 문제를 분석하기

+

If performance measurements show an application is below its targets, how can the underlying problem be diagnosed?

+

The first step of any performance work is to create a reproducible workload and reproducible measurement steps. Then gather baseline measurements, before any code changes are made. It seems obvious, but this is required to determine whether code changes actually improve performance! The measurement process selected isn't too important; what's important is that the process be (i) reproducible; (ii) realistic, in that it measures what users will perceive as closely as possible; (iii) precise as possible; (iv) accurate as possible. Even stopwatch timings can fit this spec.

+

Firefox OS includes two built-in tools for quickly diagnosing some performance issues. The first is a render mode called "paint flashing". In this mode, every time a region of the screen is painted by Gecko, Gecko blits a random translucent color over the painted region. Ideally, only parts of the screen that visually change between frames will "flash" with a new color. But sometimes more area than is needed is repainted, causing large areas to "flash". This symptom may indicate that application code is forcing too much of its scene to update. It may also indicate bugs in Gecko itself.

+

Enable paint flashing

+

Paint flashing after scrolling down from previous image

+

The second tool is called "animation logging", and can also be enabled in Settings. This tool tries to help developers understand why animations are not offloaded to the compositor to be run efficiently as possible. It reports "bugs" like trying to animate elements that are too large, or trying to animate CSS properties that can't be offloaded.

+

Enable animation logging

+

Start of animation not offloaded

+
I/Gecko   ( 5644): Performance warning: Async animation disabled because frame size (1280, 410) is bigger than the viewport (360, 518) [div with id 'views']
+
+

End of animation not offloaded

+
+

A common pitfall is to animate left/top/right/bottom properties instead of using CSS transforms to achieve the same effect. For a variety of reasons, the semantics of transforms make them easier to offload, but left/top/right/bottom are much more difficult. Animation logging will report this.

+
+

These tools can help quickly assess a performance problem, but they often show only what developers should be "looking for": hints at deeper problems. When more information is required, the Gecko Profiler can be used. A full description of the profiler is beyond the scope of this document; see [here]. Briefly, the profiler shows mixed JavaScript/C++ "samples" of what all Firefox OS processes are doing over a rolling time interval. Developers can use these profiles to see what their code and Gecko itself are doing. Warnings are built into the profiler UI for many common pitfalls like excessive garbage collection (caused by creating too many JS objects), and forcing "synchronous reflows". Sync reflows are bad because Gecko is optimized to do expensive work like reflows in big batches, when needed. Forced reflows throw off this "schedule", and can cause more work to be done than necessary.

+

Similarly, advanced users may wish to use a whole-system profiler like the linux |perf| tool. This is mostly useful for platform engineers, though.

+

As with measuring performance, don't be proud about tools used to diagnose it! A few well-placed Date.now() calls with logging can often provide a quick and accurate answer.

+

Finally, the only way to keep improving performance is to not regress it. The only way to not regress performance is to test it, preferably with automated tests. A full discussion of that topic is beyond the scope of this document, though.

+

파리 Firefox OS 성능 & 최적화 워크샵, 3월 4 - 8일, 2013

+

To illustrate these concepts here are some videos and slides from the Paris Workshop dedicated to performances and optimizations.

+

파트 1: Technical basics and more (Gabriele & Thomas)

+ +

파트 2: Performances in a UX point of view (Josh)

+

파트 3: Performances measurement & automation (Julien & Anthony)

diff --git "a/files/ko/archive/b2g_os/\354\225\261_\352\264\200\353\246\254\354\236\220_\354\202\254\354\232\251\355\225\230\352\270\260/index.html" "b/files/ko/archive/b2g_os/\354\225\261_\352\264\200\353\246\254\354\236\220_\354\202\254\354\232\251\355\225\230\352\270\260/index.html" new file mode 100644 index 0000000000..392a32866e --- /dev/null +++ "b/files/ko/archive/b2g_os/\354\225\261_\352\264\200\353\246\254\354\236\220_\354\202\254\354\232\251\355\225\230\352\270\260/index.html" @@ -0,0 +1,247 @@ +--- +title: 앱 관리자 사용하기 +slug: Archive/B2G_OS/앱_관리자_사용하기 +translation_of: Archive/B2G_OS/Using_the_App_Manager +--- +
+

앱 관리자는 Firefox 데스크톱에서 제공하는 새로운 도구로, Firefox OS phone과 Firefox OS 시뮬레이터에서 HTML5 웹앱을 테스트, 배치, 디버그할 수 있도록 돕는 여러 도구들을 브라우저에서 직접 제공합니다.

+
+ +

+ +

앱 관리자는 다음과 같이 구성되어 있습니다:

+ + + +

빠른 설정:

+ +

이 섹션에서는 가능한한 빠르게 준비하는 법을 다룹니다. 보다 자세한 내용은 장치 및 시스템 설정 섹션으로 넘어가십시오. 그리고 문제가 있을 경우 Troubleshooting 섹션을 읽어보세요.

+ +
    +
  1. Firefox 데스크톱 26 이상을 설치했는지 확인하세요.
  2. +
  3. 앱 관리자를 엽니다. (URL바에 about:app-manager을 입력합니다)
  4. +
  5. 실제 장치가 없는 경우: +
      +
    1. Firefox OS 시뮬레이터를 설치합니다.
    2. +
    3. 앱 관리자의 아래쪽 툴바에서 시뮬레이터 시작을 클릭하고 뒤이어 표시되는 설치된 시뮬레이터의 이름을 클릭합니다.
    4. +
    +
  6. +
  7. 실제 장치가 있는 경우: +
      +
    1. 장치가 Firefox OS 1.2 이상을 구동중인지 확인하세요.
    2. +
    3. Windows의 경우, 폰 제조사에서 제공하는 드라이버의 설치를 확인하세요. 
    4. +
    5. 장치의 설정에서 화면 잠금을 비활성화하고 (Settings > Screen Lock) 원격 디버깅을 활성화합니다(Settings > Device information > More information > Developer).
    6. +
    7. Firefox Desktop에 ADB Helper 추가기능을 설치합니다.
    8. +
    9. USB케이블로 장치와 컴퓨터를 연결하세요.
    10. +
    11. 앱 관리자 하단에 장치의 이름이 나타나면 클릭합니다.
    12. +
    +
  8. +
  9. 하단 바에 "xxx에 연결됨"이 표시됩니다.
  10. +
  11. 앱 패널을 클릭해 앱을 추가합니다(패키지 또는 hosted).
  12. +
  13. The Refresh button validates your app and installs it on the Simulator/Device
  14. +
  15. The Debug button connects the developer tools to the running app
  16. +
  17. 문제가 발생한다면 Troubleshooting섹션을 참조하세요.
  18. +
+ +

장치 및 시스템 설정

+ +

앱 관리자를 사용할 때 가장 처음 해야할 일은 여러분의 시스템과 폰이 제대로 설정되었는지 확인하는 것입니다. 이 섹션에서 필요한 단계들을 알아보겠습니다.

+ +

Firefox 1.2 이상 필요

+ +

장치가 Firefox OS 1.2/Boot2Gecko 1.2 또는 그 이상을 구동중인지 확인하세요. 장치의 Firefox OS 버전을 확인하려면 Settings > Device Information > Software로 이동하십시오.

+ +

If you don't have a high enough version installed, depending on what phone you have you will need to either install an available nightly build of Firefox 1.2+, or configure and build it yourself from source.

+ +

Builds available:

+ +

Geeksphone Keon/Peak builds (to find out more about using these, read Updating and Tweaking your Firefox OS Developer Preview phone/Geeksphone)

+ +

More to follow

+ +

To build your own Firefox OS 1.2+ distribution, follow the instructions located at Building and installing Firefox OS, starting with Firefox OS build prerequisites.

+ +

원격 디버깅(Remote debugging)

+ +

Next, you need to enable remote debugging in Firefox OS. To do so, go to Settings > Device information > More information > Developer and check the Remote Debugging checkbox.

+ +

ADB or ADB helper

+ +

The process uses the Android Debug Bridge (ADB) to handle the device-computer connection and communication. There are two options for running ADB:

+ +

Let Firefox handle ADB (recommended). Install the ADB Helper add-on, which makes the process easier. With this installed, there's no need to install the ADB, and no need to type the adb forward command: everything is handled by the add-on.

+ +

ADB Helper 확장기능 다운로드

+ +

Use ADB manually. You need to have it installed on your computer - download and install adb (see the Get the Android SDK) as part of the Android SDK package. You'll need to enable port forwarding by entering the following command into your terminal:Note that you'll need to do this every time the phone is restarted or unplugged then re-plugged.

+ +
+

Note: ADB Helper 확장기능을 설치했다면 이 명령을 실행할 필요가 없습니다.

+
+ +

Connecting your device to the App Manager

+ +

With all your configuration done, it's now time to plug your device into your computer and start the App Manager:

+ +
    +
  1. Plug the device into your computer via USB.
  2. +
  3. Disable Screen lock on your device by going to Settings > Screen Lock and unchecking the Lock Screen checkbox. This is a good idea because when the screen gets locked, the phone connection gets lost, meaning it is no longer available for debugging.
  4. +
  5. Start the App Manager — In Firefox Desktop select the Tools > Web Developer > App Manager menu option, or type about:app-manager in the URL bar.
  6. +
  7. At the bottom of the App Manager tab, you will see a connection status bar (see screenshot below). You should be able to connect your device by clicking the "Connect to localhost:6000" button.
  8. +
  9. If this works successfully, a prompt should appear on your device: "An incoming request to permit remote debugging connection was detected. Allow connection?". Tap the OK button (You may also have to press the power button on the phone so you can see the prompt.) The connection status bar should update to say "Connected to B2G", with a Disconnect button available to press if you want to cancel the connection.
  10. +
+ +

+ +
+

Note that the other controls in the connection status bar allow you to connect a simulator to the App Manager, which we cover in the next section, below, and change the port that the connection happens on. If you change the port, you'll also need to enable port forwarding for this port as well, as instructed in the Enable port forwarding section, above.

+
+ +

Firefox OS 시뮬레이터 추가기능 사용하기

+ +

If you haven't got a real device available to use with App Manager, you can still try it out using a Firefox OS Simulator Add-on. To start off, install the appropriate simulator for your operating system:

+ +

시뮬레이터 설치하기

+ +
+

앞으로 더 많은 것들이 등장하겠지만, 지금은 Firefox OS 1.2 시뮬레이터만 이용할 수 있습니다.

+
+ +

Once you've installed the simulator, you need to go to the connection status bar at the bottom of the App Manager tab, and click the "Start simulator" button. Three buttons will appear:

+ + + +

앱 패널

+ +

Now everything is working, let's review the functionality available inside the App Manager, starting with the Apps panel. From here, you can import an existing app to push onto your device and debug:

+ + + +

Information about your app should appear on the right hand side of the window, as seen below:

+ +

+ +

Manifest 편집기

+ +

From Firefox 28 onwards, the Apps Panel includes an editor for the app manifest:

+ +

+ +

Debugging

+ +

Clicking on "Update" will update (install) the app on the device. Clicking on "debug" will connect a toolbox to the app, allowing you to debug its code directly:

+ +

+ +
+

Note: You'll enjoy playing around with the toolbox — try altering the DOM, CSS etc. and you'll see the updates reflected on the device in realtime. Such updates will be saved on the installed app code; you'll see them next time you open the app on the device.

+
+ +

Before Firefox 28, the tools are launched in a separate window. From Firefox 28 onwards, the tools are launched in a separate tab in the App Manager itself, alongside the Apps and Device tabs. The tab is given your app's icon so it's easy to find:

+ +

+ +

Errors

+ +

If an app was not added successfully — for example if the URL was incorrect, or you selected a packaged app folder — an entry will be added to the page for this app, but this will include error information.

+ +

+ +

You can also delete an app from this view, by hovering over the App name/description on the left of the window, and pressing the "X" button that appears in each case. This however doesn't remove the app from the device. To do that you need to manually remove the app using the device itself.

+ +

Device panel

+ +

The Device tab displays information about the connected device. From the "Installed Apps" window, apps on the device can be started and debugged.

+ +

+ +
+

Note: Certified Apps are not listed by default. See how to debug certified apps.

+
+ +

The "Permissions" window shows the required priviledges for different Web APIs on the current device:

+ +

+ +

Finally, you can take a screenshot of the current device display by clicking the "Screenshot" button. The screenshot appears in a new tab on Firefox, and from there you can save or discard it as you wish.

+ +

Debugging Certified Apps

+ +

Currently only devices running a development build of Firefox OS 1.2 are capable of debugging certified apps. If you have a development build, you can enable certified app debugging by changing the pref devtools.debugger.forbid-certified-apps to false in your profile. To do this, follow the steps below:

+ +
    +
  1. +

    On your computer, enter the following command in Terminal/console to enter your device's filesystem via the shell:

    + +
    adb shell
    + +

    Your prompt should change to root@android.

    +
  2. +
  3. +

    Next, stop B2G running using the following command:

    + +
    stop b2g
    +
  4. +
  5. +

    Navigate to the following directory:

    + +
    cd /data/b2g/mozilla/*.default/
    +
  6. +
  7. +

    Here, update the prefs.js file with the following line:

    + +
    echo 'user_pref("devtools.debugger.forbid-certified-apps", false);' >> prefs.js
    +
  8. +
  9. +

    After you've finished editing and saving the file, start B2G again using the following command:

    + +
    start b2g
    +
  10. +
  11. +

    Exit the android filesystem using the exit command; this will return you to your normal terminal prompt.

    +
  12. +
  13. +

    Next, reconnect to the App Manager and you should see certified apps appear for debugging.

    +
  14. +
+ +
+

Note: If you want to add this preference to your Gaia build you can run make DEVICE_DEBUG=1 reset-gaia.

+
+ +

Troubleshooting

+ +

장치가 인식되지 않을 경우:

+ + + +

Can't connect your device to the App Manager or start the simulator? Let us know or file a bug.

-- cgit v1.2.3-54-g00ecf