Update: I’ve realized that I actually compiled and installed FirefoxOS v1.3 instead of 1.1, so this instructions will actually cause you to install v1.3.

for me v1.3 is working fine but if you need to install v1.1 just be sure to configure the right branch

If you read my previous post about the ZTE Overview, you know I was planning to upgrade my phone to version 1.1 after finding instructions on MDN I thought its going to be easy, but apparently its not as straight forward as one might think.

this guide is basically going to organize the information from the mozilla.dev group thread – Updating ZTE Open to 1.1 and the MDN ZTE Open page



Please note that I take no responsibility if you brick your device following this instructions.

To compile FirefoxOS you’ll need about 30 Giga of free space on your hard drive, downloading and compiling every thing took me about 5 hours on a new desktop with fast Internet connection so you might want to do the download and compilation at night…

Tho its probably possible to upgrade your phone without an SD card some of the following steps require one.

I’m only going to write how to do the compile from Ubuntu 13.04 and up, if your using other OS (and even previous version on Ubuntu please check the reference links to see how to set your environment)

OK before starting to do anything you should fetch the boot 2 gecko source files, we don’t need them just now but since this might take several hours depending on your Internet connection its better to do it sooner than later ( the repo is about 8 Giga).

Lets make a folder to all our FirefoxOS stuff-

$ mkdir firefoxOS $ cd firefoxOS 1 2 $ mkdir firefoxOS $ cd firefoxOS

if you don’t have git install it –

$ sudo apt-get install git 1 $ sudo apt - get install git

and lets download the base repository and configure to to our ZTE phone (inari device)

$ git clone git://github.com/mozilla-b2g/B2G.git $ cd B2G $ ./config.sh inari 1 2 3 $ git clone git : // github .com / mozilla - b2g / B2G .git $ cd B2G $ . / config .sh inari



$ BRANCH=v1-train ./config.sh inari 1 $ BRANCH = v1 - train . / config .sh inari if you want a specific version like 1.1 and not the latest, change the last line to

the last command can take several hours so lets open a new shell and keep setting up our environment.

from now on I’ll refer the B2G folder as [B2G-src].

You should make sure your phone is at least version FFOS_V1.0.0B02 to be able to fastboot into it –

check on your device in – Settings > Device Information > Software

if it’s not you can update your phone with from ZTE ->

US/Hong Kong phones

UK phones

download the zip file and read the pdf with instructions inside.

lets go back for setting our build environment

if your using ubuntu 13.04 ->

$ 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 ia32-libs lib32ncurses5-dev lib32z1-dev zlib1g:amd64 zlib1g-dev:amd64 zlib1g:i386 zlib1g-dev:i386 libgl1-mesa-dev libx11-dev make zip $ echo 'export CC=gcc-4.6' >> [B2G-src]/.userconfig $ echo 'export CXX=g++-4.6' >> [B2G-src]/.userconfig $ ccache --max-size 3GB 1 2 3 4 $ 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 ia32 - libs lib32ncurses5 - dev lib32z1 - dev zlib1g : amd64 zlib1g - dev : amd64 zlib1g : i386 zlib1g - dev : i386 libgl1 - mesa - dev libx11 - dev make zip $ echo 'export CC=gcc-4.6' > > [ B2G - src ] / .userconfig $ echo 'export CXX=g++-4.6' > > [ B2G - src ] / .userconfig $ ccache -- max - size 3GB

if your using different OS see Mozilla guide – Firefox OS build prerequisites

install adb –

$ sudo apt-get install android-tools-adb 1 $ sudo apt - get install android - tools - adb

add the following lines to your udev rules –

/etc/udev/rules.d/android.rules

SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev" 1 2 SUBSYSTEM == "usb" , ATTR { idVendor } == "19d2" , MODE = "0666" , GROUP = "plugdev" SUBSYSTEM == "usb" , ATTR { idVendor } == "18d1" , MODE = "0666" , GROUP = "plugdev"

lets make sure the rules readable to all users and restart udev

$ sudo chmod a+r /etc/udev/rules.d $ sudo service udev restart 1 2 $ sudo chmod a + r / etc / udev / rules .d $ sudo service udev restart

enable remote debugging on your device –

Settings -> Device information -> More Information -> Developer -> Remote debugging

and connect the phone with USB to the computer

you should now see your device

$ adb devices List of devices attached roamer2 device 1 2 3 $ adb devices List of devices attached roamer2 device

and you should be able to open a shell on it.

if it fails you might need to restart adbd as root on your system

$ adb kill-server $ sudo adb start-server 1 2 $ adb kill - server $ sudo adb start - server

* Root your device and back your system

this step is optional but since my device didn’t boot after my first attempt I would advice you to follow it.

first use this great guide that will explain how to root your phone and install of clockwork recovery on it.

once its rooted reboot into clockwork recovery (volume up + power button) and use the backup and restore option to fully backup your phone.

if you’ll need, you can later restore your phone directly from the SD card but keep a copy of this files on your computer just in case.

now if you finished downloading the repos you can build your OS

go to the [B2G-src] folder and run the build script.

$ ./build.sh 1 $ . / build .sh

it would probably take an hour or two to compile the source so just be sure your not getting any errors and go do something else.

unfortunately once compilation is done we still cannot flash the device because we need a new boot.img and the compilation process doesn’t create one. frankly at this point I didn’t even tried to see how to compile my own boot image and just graved the file from Eduardo González blog, if you decide to compile your own image let me know how you did it 🙂

once you have the image file copy it to [B2G-src]/out/target/product/inari/boot.img

you are now ready to flash your device

$ ./flash.sh 1 $ . / flash .sh

if every thing went OK after flashing your phone will boot into firefoxOS 1.1

I must say this is a really bad experience for a phone which suppose to be Open.

I had much more easy time changing ROMs on my Samsung S II. the ZTE phone is not only awful mobile phone from a user perspective (I used it for two days now and except making calls its completely useless) its also offers a very bad first experience to any one trying to hack the on it.

ZTE should not advertise this phone as Open.

I guess Mozilla really wanted to get vendors to start shipping this phone but they should require vendors to follow specific guidelines and make sure they keep the OS open and accessible to users and developers

Update: You can download my v1.3 builds. Of course I take no responsibility if they mess up or brick your device