-
Notifications
You must be signed in to change notification settings - Fork 0
How to setup a working Mulet Gaia environment on Linux
This post is focused on linux systems, but you should be able to make instructions work on Mac OS too with little or no modification at all.
Note: a prepackaged version submitted by kskarthik is available, you can use it to get a fully working environment in seconds.
For the sake of simplicity, we'll adopt the following layout for our project:
B2GOS
├── gaia (optional)
├── mulet
└── profile
This profile will be used to make the whole OS run. To generate one, you'll need a copy of the gaia repository.
You can either:
-
Clone the git repository (it's really huge, so it will take some time):
git clone https://github.com/mozilla-b2g/gaia.git
-
Download an archive of the repository (it will be faster, since you won't have the git history, but it will require a huge download too):
wget https://github.com/mozilla-b2g/gaia/archive/master.zipunzip master.zipmv gaia-master gaia
-
Download an existing profile, like this one. This is the fastest solution, since you'll only need to download around 50-100Mo.
If you choose method 3, you can skip straight to the next part, because your profile is already generated.
Otherwise, you'll have to build it:
cd gaia
make
This will lead to the creation of a profile directory (under the gaia directory).
Move this directory upward, or create a symlink with, so it's straight under the B2GOS directory.
Mulet is a customized version of firefox designed to help testing B2G OS in desktop environment.
Once working, Mulet will open your B2G OS directly in a firefox tab, so you can interact with the phone, use the developer tools, etc.
I'll describe several ways to get Mulet up and running, however, regardless of the method, we'll always have to tell Mulet to use our previously generated gaia profile.
One of the benefits of this approach is that you won't have to install anything on your system (apart from docker, of course).
Please head over the corresponding repository for detailed instructions.
For some reason, it's really hard to find the correct mulet binary to use.
One that work for me was this one:
wget -O mulet.tar.bz2 https://queue.taskcluster.net/v1/task/Tg4Sld58RwmUbJnVPwBXvg/runs/0/artifacts/public%2Fbuild%2Ftarget.tar.bz2
tar -xjf mulet.tar.bz2
mv firefox mulet
Okay, you've got mulet installed, now, to run it, you just need this:
cd mulet
./firefox-bin --no-remote --profile ../profile --devtools
This should open a separate firefox window with developer tools enabled and a B2G OS phone :)