Why FirefoxOS ?
(image from here)
The phone
(image from Wikipedia)
The Geeksphone Peak was released in April, 2013 as a Developer Preview phone... And I have one ^^.
Easy way
Geeksphone has all the drivers and updates you need.
You may also need some tricks from here.
For example, Linux users will need this in /etc/udev/rules.d/51-android.rules.
:
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
then,
chmod a+r /etc/udev/rules.d/51-android.rules
sudo service udev restart
Then, skip to the flashing part of this article.
Not-so-easy way
Actually, it was quite easy, but you will need one quality: patience !
Everything is very well detailled in the following links:
So... Why this article if it's so easy ?
Japanese keyboard
Yep... The big regret I had using Geekphone's versions was the lack of Japanese keyboard.
ใงใ... There is one ! Why so absent ?
Because it is heavy. As in really heavy. The dictionary file is something like 22mb.
With some help from this bug, I now have a japanese keyboard on FirefoxOS.
Building and installing
Here are some steps to enable this thing (everything can be found in the previous build & installing links).
Prerequisites
Let's enable i386 architecture (because we are all on 64 bits systems, right ?)
sudo dpkg --add-architecture i386
sudo apt-get update
Then, let's install some dependencies and compilers
sudo apt-get install --no-install-recommends autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib gcc-4.6 g++-4.6 g++-4.6-multilib git lib32ncurses5-dev lib32z1-dev zlib1g:amd64 zlib1g-dev:amd64 zlib1g:i386 zlib1g-dev:i386 libgl1-mesa-dev libx11-dev make zip libxml2-utils
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 1
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 2
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 1
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 2
sudo update-alternatives --set gcc "/usr/bin/gcc-4.6"
sudo update-alternatives --set g++ "/usr/bin/g++-4.6"
You will also need some android tools
sudo apt-get install android-tools-adb android-tools-fastboot
Tons of files !
You'll need 20go of space, and some time. Everything is automated, but you have to look at what happens in your terminal, because you may encounter THE MATRIX. Oh yeah.
git clone git://github.com/mozilla-b2g/B2G.git
cd B2G
./config.sh peak
Extra configuration
Now is the time to configure your japanese keyboard.
Let's go here: https://github.com/mozilla-b2g/gaia/tree/master/apps/keyboard/js/imes/jskanji
We will need an ipadic release from here, and do what's said in the README file
- Extract all .dic files to dict/ipadic/.
- Run
make
under thedict
directory to generate dict.json.
This will generate the dictionary file used by the keyboard. The keyboard is not enabled yet. I went to the next part without enabling at first... Baaaad idea !
This page explains how to enable the multilocale stuff.
I choose the lazy way by editing <B2G folder>/gaia/Makefile
, changing the GAIA_KEYBOARD_LAYOUTS
line:
GAIA_KEYBOARD_LAYOUTS?=en,fr,jp-kanji
That's it !
Building
The phone should be connected to the computer, and:
./build.sh
Flashing
(image from Wikipedia)
On the Geeksphone Peak, the bootloader was locked.
So... Remember the android tools we installed earlier ? adb and fastboot ? Let's play with them:
adb reboot bootloader
sudo fastboot oem unlock
You'll see chinese written stuff. Press volume up key to change the selected checkbox, then the power key to submit the change (thank you).
Back to flashing !
./flash.sh
More info on flashing only some part here.
And ?
That's all !
(image from here)
Well. Not so fast. We built and flashed the master branch, which may not be the most stable one. Please go here to learn how to build a specific branch.
You should definitely give FirefoxOS a try if you can. It's powered by the web, and everybody who can do some web can create an app. Ain't that amazing ?
You can also play with the simulator, which is a Firefox add-on.
Also, you can find tons of good stuff on the Mozilla Developer Network.