Building for Fairphone

This is an archived page. It's not actively maintained.


Hi Fairphoner!
This site will let you build and install
all neccassary stuf to run B2GOS on a Fairphone!


It contains:

Build instructions for OSX
Build instructions for Ubuntu 14.4
Build instructions for Ubuntu 16.4
How to flash a device without having to fetch the code!

Build on OSX

Due to a wrong or different md5 checksum calculation you won't be able to build on OSX. But you can go for a Virtual Linux!

Build on Ubuntu 14.4.

I made a speedup of the process by chaining commands.

-> open terminal (ctrl, alt & T)

Type these commands separately:

sudo dpkg --add-architecture i386
sudo dpkg --add-architecture amd64
sudo apt-get install git
git config --global " *youremail@url.tld* "
git config --global " *yourusername* "
git config --global color.ui False
sudo apt-get install --no-install-recommends autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib git lib32ncurses5-dev lib32z1-dev libgconf2-dev zlib1g:amd64 zlib1g-dev:amd64 zlib1g:i386 zlib1g-dev:i386 libgl1-mesa-dev libx11-dev make zip lzop libxml2-utils openjdk-7-jdk nodejs unzip python mercurial && ccache -M 50G && echo $PWD && echo "commanding: git clone git://" && git clone git:// && cd B2G && echo $PWD && echo "commanding: ./ fairphone2" && ./ fairphone2 && echo $PWD && echo "commanding: cd .. " && cd .. && echo $PWD && echo "commanding: curl -O" && curl -O && echo "commanding: unzip -d ~/ -home dir- " && unzip -d ~/ && echo $PWD && echo "commanding: curl -O" && curl -O && echo "commanding: tar -zxvf node-v4.4.7.tar.gz" && tar -zxvf node-v4.4.7.tar.gz && echo "commanding: cd node-v4.4.7" && cd node-v4.4.7 && echo "commanding: ./configure" && ./configure && echo "commanding: make install" && sudo make install && echo $PWD && echo "commanding: back to B2G folder!" && cd ~/B2G

check or make .userconfig in the B2G folder and do not forget to update the BOLD text with your system username:

echo "*** entering .userconfig ***"
export B2G_DIR=${B2G_DIR:-$(cd $(dirname $0); pwd)}
echo "B2G_DIR=${B2G_DIR}"
echo "*** exit .userconfig ***"

If you whant to make a Version to flash your phone:


If you whant to make a Version to flash your phone and update the community build:

./ blobfree

If you run in to errors and need a log of your build:

./ showcommands 2>&1 | tee build.log

everytime you run a new build clean your directories with this commands:

sudo rm -rf out && rm -rf objdir-gecko && rm -rf gaia/profile* && ccache -C


B2G-Installer for Fairphone

You don't like to build your own B2GOS? You can flash your device with the b2g-installer and a Community build!