aboutsummaryrefslogtreecommitdiff
path: root/files/pt-pt/archive/b2g_os/phone_guide/flame/index.html
blob: 5f874186caa6c6726c46a7c5a9f51809ff878263 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
---
title: Flame
slug: Archive/B2G_OS/Phone_guide/Flame
translation_of: Archive/B2G_OS/Phone_guide/Flame
---
<p><img alt="A picture of the Flame device, showing the Firefox OS homescreen containing several app icons." src="https://mdn.mozillademos.org/files/8373/flame-dev-hud.png" style="float: left; margin-bottom: 20px; margin-right: 50px; width: 25%;"></p>

<h2 id="Available_to_order" style="text-indent: 100%; white-space: nowrap; overflow: hidden; margin: 0; height: 0;">Available to order</h2>

<p><span class="seoSummary">The Flame developer reference phone is a milestone in Firefox OS device releases. The Flame hardware offers a representative set of specs — including FWVGA display and dual-core processor — to help developers build great content and experiences. A single hardware platform is also good for testers, making it easier to test and address specific software issues without having to worry about device model-specific bugs, etc.</span></p>

<p style="">If you have your phone in hand and want to start playing with it, developing and distributing apps, or contributing to the Firefox platform, the following links will get you where you need to go:</p>

<ul>
 <li><a href="/en-US/Firefox_OS">Firefox OS zone</a>: For creating your own Firefox OS builds and contributing to the B2G and Gaia projects.</li>
 <li><a href="/en-US/Apps">App Center zone</a>: For building open web apps compatible with Firefox OS.</li>
 <li><a href="/en-US/Marketplace">Marketplace zone</a>: For information on publishing and distributing apps.</li>
 <li><a href="https://marketplace.firefox.com/">Firefox Marketplace</a>: The best place to find and publish new Firefox OS apps.</li>
</ul>

<p style="">If you’d like to find out more about updating the operating system, recovering it, pushing apps to it, or phone specs, you’ll find the information you need below.</p>

<h2 id="Purchasing_a_device">Purchasing a device</h2>

<p>Our device manufacturer partner has made the device <a href="http://www.everbuying.com/product549652.html">available to order</a> on everbuying.com, for US$170 including global shipping (device cost is $145, shipping is $25 and custom fees may still apply, depending on the destination country). The device is bootloader- and carrier-unlocked, and it utilizes a quad-band GSM+UMTS radio so that it can work with a wide variety of operators/carriers.</p>

<div class="note">
<p><strong>Note</strong>: Another option for getting hold of a Flame is to participate in our <a href="https://hacks.mozilla.org/2014/05/build-your-next-app-with-a-flame/">Flames for Apps scheme</a>, aimed at experienced HTML5 app developers wishing to port their highly-rated apps onto Firefox OS.</p>
</div>

<h2 id="Important_steps_to_follow_first">Important steps to follow first</h2>

<p>There are a couple of steps you should make sure you follow for your particular operating system, before you start trying to update your device, for example by updating your Flame's version of Firefox OS, or pushing apps to your phone (both are covered below.)</p>

<h3 id="All_operating_systems">All operating systems</h3>

<p>You need to install ADB and Fastboot on your computer — these are applications that allow you to interact with your phone from your computer when the two are connected via the phone's USB charger cable. They are needed for Flashing your phone to a new version of Firefox OS, recovering from an unresponsive state, pushing apps to your phone, etc.</p>

<div class="note">
<p><strong>Note</strong>: If you are on Ubuntu you can install ADB and Fastboot simply by using <code>sudo apt-get install android-tools-adb android-tools-fastboot</code> on the command line.</p>
</div>

<p>ADB and Fastboot are available in the <a class="external external-icon" href="http://developer.android.com/sdk/index.html" title="Android Developer Tookit">Android Developer Toolkit</a>:</p>

<ol>
 <li>Go to this link</li>
 <li>Press the <em>Download Eclipse ADT</em> button</li>
 <li>Agree to the license conditions</li>
 <li>Choose between the 32-bit and 64-bit version (32-bit will do if you are not sure)</li>
 <li>Click the final <em>Download Eclipse ADT with the Android SDK...</em> button.</li>
 <li>Once the download is complete, unzip the zip file's contents onto your computer's desktop</li>
 <li>The folder name is a bit complicated; rename it to just <em>adt</em></li>
</ol>

<p>ADB is a tool that you run from the command line. If you open your terminal/command prompt, go to adt/sdk/platform-tools and run the <code>adb</code> command, you should see a load of information thrown back at you about what you can do with ADB. Running <code>adb devices</code> should return the line <code>List of devices attached</code>, and nothing else, because you haven't got any devices attached yet.</p>

<p>But at this point, you need to set the PATH variable to point to the ADB tool, so you can run it from anywhere, not just when you are in the exact directory that ADB is in. To do this:</p>

<ul>
 <li>On Windows 8 (Windows 7 will be very similar, but with slightly different menu options):</li>
 <li>right click on the Windows button in the bottom left and select Control Panel &gt; System and Security &gt; System &gt; Advanced System settings &gt; Environment Variables.</li>
 <li>In the <em>System variables</em> list, find the one called Path, select it, then click <em>Edit...</em></li>
 <li>In the <em>Variable value</em> text field of the resulting dialog box, make sure you are at the end of the big string of characters in the box, then type a semi colon (;), followed by the location of the adb tool on your system, which should be <em>C:\Users\[YOUR USER NAME]\Desktop\adt\sdk\platform-tools</em>.</li>
 <li>So if your user name is jamessmith, you would enter ;<em>C:\Users\jamessmith\Desktop\adt\sdk\platform-tools</em>.</li>
 <li>Press ok on all the dialog boxes you got up in this section.</li>
 <li>Close your command prompt, open a new one, and test it by typing <code>adb devices</code>. If it comes up with <code>List of devices attached</code>, you are successful!</li>
</ul>

<p>On Mac/Linux:</p>

<ul>
 <li>In Finder app, go to your home folder (the one with the house icon)</li>
 <li>If you can't already see hidden files (for example, system files with dots (.) at the beginning), go to Terminal, enter the command <code>defaults write com.apple.finder AppleShowAllFiles YES</code>, then restart Finder</li>
 <li>Open your .bash_profile or .bashrc file in a plain text editor like Text Wrangler or Sublime Text (it needs to be a plain text editor.)</li>
 <li>Inside the file, add a new line PATH=/Users/chrismills/Desktop/adt/sdk/platform-tools:$PATH</li>
 <li>Save and close the file.</li>
 <li>Restart your terminal, and test it by typing <code>adb devices</code>. If it comes up with <code>List of devices attached</code>, you are successful!</li>
</ul>

<h3 id="Linux_and_Mac">Linux and Mac</h3>

<p>No additional steps should be required if you are using a Linux or Mac system, although depending on your Linux distro, you might need to <a href="https://developer.mozilla.org/en-US/Firefox_OS/Firefox_OS_build_prerequisites#For_Linux.3A_configure_the_udev_rule_for_your_phone">add a udev rule</a> for your phone.</p>

<p>The udev rule for the Flame should look something like the following:</p>

<pre>SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9025", GROUP="users", MODE="0666"</pre>

<p>Make sure to <code>--reload-rules</code>, then unplug and replug and your device before continuing.</p>

<h3 id="Windows">Windows</h3>

<p>To access the Flame device with the <a href="/en-US/Firefox_OS/Using_the_App_Manager">App Manager</a>/<a href="/en-US/Firefox_OS/Debugging/Installing_ADB">ADB</a>, a USB driver is required. Follow the steps outlined in the below sections to install it.</p>

<h4 id="Downloading_the_driver">Downloading the driver</h4>

<p><a href="http://cds.w5v8t3u9.hwcdn.net/Alcatel_USB_Driver_Q_4.0.0_2013_11_11_noinstall.zip">Download the Windows driver from this location</a>. Once downloaded, extract the contents of the ZIP file to a suitable place on your hard drive.</p>

<div class="note">
<p><strong>Note</strong>: The Android Debug Bridge (<a href="/en-US/Firefox_OS/Debugging/Installing_ADB">ADB</a>) must be installed first.</p>
</div>

<h4 id="Installing_the_USB_Driver">Installing the USB Driver</h4>

<p>At this point, connect your Flame device to your computer using a USB cable.</p>

<p>To install the driver, open the <code>Alcatel_USB_Driver_Q_4.0.0_2013_11_11_noinstall</code> directory within the extracted ZIP file and double click on the <code>DriverInstaller.exe</code> executable. You may receive a warning at this point that the executable is from an unknown publisher. If so, select the <em>Yes</em> button and the executable will be launched.</p>

<p><img alt="Simple dialog box showing a picture of a phone along with install and uninstall buttons." src="https://mdn.mozillademos.org/files/8079/driver-install.png" style="display: block; height: 523px; margin: 0px auto; width: 358px;"></p>

<p>Click on the <em>Install</em> button to install the driver.</p>

<p>After the driver installs, you can check that it is working by opening a command line window and typing <code>adb devices</code>. This should list the connected device with an output something like:</p>

<pre>List of devices attached
3561d02a          device</pre>

<p>If your device is not showing up here, check in the Windows Device Manager. Your Flame may be showing up as "ACER ADB Interface". You can confirm this by unplugging the device and seeing if it disappears from the device manager. Uninstall the driver software by right-clicking on "ACER ADB Interface" and clicking uninstall.  Be sure to check the box in the dialog to delete the driver software.  Now re-run the installer above. It is advisable to set the screen timeout on your Flame to something high (<em>Settings</em> &gt; <em>Display</em> &gt; <em>Screen timeout</em>) as Windows sometimes appears to reinstall the default drivers when the screen turns off.</p>

<h2 id="Updating_your_Flame's_software">Updating your Flame's software</h2>

<p>We will have two main "channels" of Firefox OS software version releases for the Flame phone:</p>

<ul>
 <li>The first channel is our release channel. Flames ship with this channel and will receive over-the-air updates for future major versions, that is, Flames will update from 1.3 to 1.4, 2.0 to 2.1, etc.</li>
 <li>The second channel is our nightly channel. Flames can be flashed to this channel, and after the initial flashing will get over the air updates on a daily or nearly daily basis.</li>
</ul>

<p>While our partners are working out a final storage solution for the software builds, you can get recovery files and tools at the following storage locations:</p>

<ul>
 <li><a href="http://cds.w5v8t3u9.hwcdn.net/v123.zip">Base image v123.zip</a>: An archive containing the Flame's base image of Firefox OS 1.3.  To install this, simply unzip the file, and run the script (./flash.sh).</li>
</ul>

<p>To install the base image on your device:</p>

<ol>
 <li>Make sure remote debugging is enabled on your Flame, using the <em>Remote debugging/Debugging via USB</em> option in the device's <a href="/en-US/Firefox_OS/Debugging/Developer_settings">Developer settings</a> (the option is different, depending on whether you have Firefox 1.3 and under, or Firefox 1.4+ installed).</li>
 <li>Connect your Flame to your computer via a USB cable if it isn't already. Verify that the computer is connected to the device by running the <code>adb devices</code> command in a terminal.</li>
 <li>Download and Extract the <code>.zip</code> file referenced above. Unzip it onto your Desktop.</li>
 <li>Go into the directory you extracted the software into and run it:
  <ul>
   <li>On Windows, enter the directory in your command prompt, then run the <code>flash.bat</code> script using <code>flash.bat</code>.</li>
   <li>On Linux / OSX, enter the directory in your terminal, then run the <code>flash.sh</code> script using <code>sudo ./flash.sh</code> (if you don't run it using <code>sudo</code>, the flash script may fail to see your device, and it won't work).</li>
  </ul>
 </li>
</ol>

<div class="note">
<p><strong>Note</strong>: You are also welcome to build your own builds to install on the Flame: see <a href="/en-US/Firefox_OS/Building_and_installing_Firefox_OS">Building and installing Firefox OS</a>.</p>
</div>

<h3 id="Updating_your_Flame_to_a_nightly_build">Updating your Flame to a nightly build</h3>

<div class="note">
<p><strong>Note</strong>: For this current build, Nightly development builds of Firefox OS do not support A-GPS, which may lead to slow performance of GPS functionality. We plan to resolve this in an updated future Nightly channel.</p>
</div>

<ol>
 <li>Before updating your phone to a Nightly build you should flash the latest base image to make sure the underlying systems are up to date. Download a base image and use it to update your device's software, as explained above.</li>
 <li>Because the above step installs a fresh operating system on your device, you'll need to enable remote debugging on your Flame again, using the <em>Remote debugging </em>option in the device's <a href="/en-US/Firefox_OS/Debugging/Developer_settings">Developer settings</a>.</li>
 <li>Next, choose a Nightly build to install (found on <a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/">http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/</a>.) You'll want one of the following:
  <ul style="margin-left: 40px;">
   <li>Production builds (including locales)
    <ul>
     <li><a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central-flame/">Latest master builds</a> (currently 2.1)</li>
     <li><a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-b2g32_v2_0-flame/">Latest v2.0</a></li>
     <li><a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-b2g30_v1_4-flame/">Latest v1.4</a></li>
    </ul>
   </li>
   <li>Engineering builds (with test apps and only pseudo-locales)
    <ul>
     <li><a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central-flame-eng/">Latest master builds</a> (currently 2.1)</li>
     <li><a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-b2g32_v2_0-flame-eng/">Latest v2.0</a></li>
     <li><a href="http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-b2g30_v1_4-flame-eng/">Latest v1.4</a></li>
    </ul>
   </li>
  </ul>
 </li>
 <li>Pick a version and download both the <code>b2g-XX.XX.en-US.android-arm.tar.gz</code> and <code>gaia.zip</code> files. Save them inside a directory on your Desktop called something like <code>fxos</code>.</li>
 <li>Download the <a href="https://github.com/Mozilla-TWQA/B2G-flash-tool/blob/master/shallow_flash.sh">shallow flash script</a> and save it in the same directory as the above two files: follow the link, press the <em>Raw</em> button, then use your browser's save functionality to save the page directly as <code>shallow_flash.sh</code>.</li>
 <li>In your Terminal, <code>cd</code> into the directory you saved the files in and Flash the builds to your phone using the following command:
  <h4 id="Mac">Mac</h4>

  <pre class="brush: bash">./shallow_flash.sh -g gaia.zip -G b2g-XX.XX.en-US.android-arm.tar.gz</pre>

  <h4 id="Linux">Linux</h4>

  <pre class="brush: bash">./shallow_flash.sh -ggaia.zip -Gb2g-XX.XX.en-US.android-arm.tar.gz
</pre>

  <h4 id="Windows_(Note_instruction_still_being_worked_out_may_not_work_yet)">Windows (Note: instruction still being worked out, may not work yet)</h4>

  <pre class="brush: bash">shallow_flash.sh -g gaia.zip -G b2g-XX.XX.en-US.android-arm.tar.gz
</pre>
 </li>
</ol>

<div class="note">
<p><strong>Note</strong>: If you get a "permission denied" error when running the above command, your shell script probably doesn't have the right permissions. Running <code>chmod +x shallow_flash.sh</code> on it should solve this problem.</p>
</div>

<div class="note">
<p><strong>Note</strong>: A "shallow flash" updates <a href="/en-US/docs/Mozilla/Gecko">Gecko</a> and <a href="/en-US/Firefox_OS/Platform/Gaia">Gaia</a> plus data directories, as opposed to a full flash, which updates Gecko/Gaia, but also the underlying <a href="/en-US/Firefox_OS/Platform/Gonk">Gonk</a> layer and associated binaries particular to that device type. This is why it is a good idea to update to the official base image first, as suggested above, then shallow flash over the top of that, once you've got the Gonk/binary layer right.</p>
</div>

<div class="warning">
<p id="Shallow_flash_flashes_more_than_just_Gecko_and_Gaia_so_all_the_data_on_the_device_is_lost!"><strong>Important</strong>: When running a shallow or full flash, your phone data will be overwritten: you should therefore back up your data before updating!</p>
</div>

<p>Once the install procedure finishes the phone should reboot into the updated build and display the first time user workflow.</p>

<h4 id="Font_fix">Font fix</h4>

<p>After updating Gecko and Gaia to nightly with the v123 base image, there will be a mismatch between the fonts that Gecko and Gaia expects and what the base image provides. To fix this, download our <a href="https://people.mozilla.org/~mwu/fira-font-update.zip">font update package</a>, extract it, navigate into the directory created by extracting, and run the supplied <code>flash.sh</code> script.</p>

<div class="note">
<p><strong>Note</strong>: Another option is to use the <a href="https://github.com/Mozilla-TWQA/B2G-flash-tool/blob/master/update_system_fonts.sh"><code>update_system_fonts.sh</code></a> script, which will download and flash the system fonts automatically.</p>
</div>

<h3 id="Fastboot_mode">Fastboot mode</h3>

<p>If flashing a new build to your phone fails to work, your phone may become unresponsive, leading to the phone rebooting in recovery mode. The recovery mode provides few options (<em>Reboot</em>, <em>Update from adb</em>, <em>Wipe data</em>, <em>Wipe cache</em>, and <em>Update from sdcard</em>). Unfortunately, selecting <em>Update from adb</em> triggers a sideload mode in which you cannot use the other adb commands. The <code>adb sideload</code> command would work but the various flash scripts rely on other adb commands.</p>

<p>From sideload mode, you can force fastboot mode as follows:</p>

<ol>
 <li>Power off the phone (which may involve removing the battery in extreme cases...)</li>
 <li>Plug in the USB cable.</li>
 <li>Power the phone up again by pressing the Volume Down and Power buttons together.</li>
</ol>

<p>The phone should only display the very first static logo and stay there, without displaying the boot animation. It seems stuck but is not really: it is in fastboot mode and is waiting for a USB connection. At this point, a USB-connected, computer with adb installed should see the phone listed when the <code>fastboot devices</code> command is run. Note that regular adb would not see the device — only fastboot sees it. In this mode, you can use the flash script to install v123 as explained above. As the script does use both adb and fastboot commands, you may see some initial error and warnings from adb, but the device should be flashed properly at the end of the procedure.</p>

<h3 id="Emergency_download_mode">Emergency download mode</h3>

<p>If flashing a new build to your phone fails to work, your phone becomes unresponsive, and the phone cannot enter fastboot mode, you can use emergency mode for recovery. A USB cable and the <a href="http://cds.w5v8t3u9.hwcdn.net/Flame%20Rescue%20Tool.zip">Emergency Download Tool</a> are required to enter emergency download mode. Install this tool and follow the instructions.</p>

<h3 id="Recovery_mode">Recovery mode</h3>

<p>You can enter recovery mode to clear your phone data or manually update the firmware. There are two ways to enter this mode:</p>

<ul>
 <li>If <a href="/en-US/Firefox_OS/Debugging/Installing_ADB">ADB</a> tools are available, make sure Remote debugging is turned on in the phone's <a href="/en-US/Firefox_OS/Debugging/Developer_settings#Remote_debugging">Developer settings</a>, connect your phone to your computer via USB and enter <code>adb reboot recovery</code> on the command line.</li>
 <li>If your phone is powered off, press the Volume Up + Power buttons together.</li>
</ul>

<p>When in recovery mode, press the Volume up/down keys to move the selection highlight, and the Power key to select. Make sure you have your phone data (Contacts, SMS, etc.) backed up before clearing data, and your upgrade packages downloaded before updating.</p>

<h2 id="Pushing_apps_to_your_Flame">Pushing apps to your Flame</h2>

<p>The App Manager tool makes it easy to push apps to your phone, for testing, etc. Full instructions are available in the article <a href="/en-US/Firefox_OS/Using_the_App_Manager">Using the App Manager</a>.</p>

<div class="note">
<p><strong>Note</strong>: If you are running Firefox Nightly, you can instead make use of our next generation <a href="/en-US/docs/Tools/WebIDE">WebIDE</a> tool, which performs the same functions as the App Manager, plus more.</p>
</div>

<h2 id="RAM_adjustment">RAM adjustment</h2>

<p>You can adjust the available RAM capacity to see how apps perform on Firefox OS phones with lower memory footprints.</p>

<p>This is accomplished by entering fastboot mode (install fastboot first, which is available on the same SDK page as <a href="/en-US/Firefox_OS/Debugging/Installing_ADB">ADB</a>) and typing:</p>

<pre class="brush: bash">adb reboot bootloader
fastboot oem mem [0|256-1024]</pre>

<p>“0” is the memory automatically detected and “256-1024” is the number of megabytes. For example, if you want to adjust device RAM capacity to 512M, enter <code>fastboot oem mem 512</code>.</p>

<p>You'll need to then reboot your device for the settings to take effect. This can be done using:</p>

<pre class="brush: bash">fastboot reboot</pre>

<p>The current memory size can be returned by entering fastboot mode and typing:</p>

<pre class="brush: bash">fastboot getvar mem
</pre>

<h2 id="Network_and_Device_specs">Network and Device specs</h2>

<p><strong>Network</strong>:</p>

<ul>
 <li>802.11b/g/n wireless internet</li>
 <li>GSM 850/900/1800/1900MHz</li>
 <li>UMTS 850/900/1900/2100MHz</li>
</ul>

<p><strong>Hardware</strong>: You can find more of the hardware features listed on our <a href="/en-US/Firefox_OS/Developer_phone_guide/Phone_specs">Phone and device specs page</a>.</p>

<p>Additional features include:</p>

<ul>
 <li>NFC</li>
 <li>Bluetooth 3.0</li>
 <li>Accelerometer</li>
 <li>FM radio</li>
 <li>Proximity Sensor</li>
 <li>GPS W / A-GPS support</li>
 <li>Ambient Light Sensor</li>
</ul>

<h2 id="See_also">See also</h2>

<ul>
 <li><a href="https://hacks.mozilla.org/2014/08/videos-getting-started-with-your-flame-device/">Getting started with your Flame</a>: How-to videos by Chris Heilmann</li>
</ul>