Build Sailfish OS firmware your own

Hello Sailfish OS community! I have compiled files and scripts with simple instructions here:

You can build your own fastboot flashable firmware for Jolla, Inoi and other devices using official jolla repositories using your own credentials.

Best wishes


Nice to see you @coderus - hope you are well and thriving in your job!


This looks cool but… what is it?
I know this is for devs but I can’t resist to be curious.
(I apologize for being only able to read --human-readable things)

Is this for those who have special hardware, maybe?

1 Like

Remember when you downloaded the archive from Jolla’s website and then flashed your phone? With this project you’ll be able to produce your own image.

I think you can use this project for various purposes. For instance, you want a newer version of a specific project or as you said for a specific hardware.


main goal is to build flashable firmware for jolla devices, e.g. jolla1, jollac, inoi r7, jolla tablet, etc.


Oh really? Wow!
We tried to achieve this for long on N900 without success IIRC (at least for --human-readable people).
So, once the installation is ok, with apps and settings, we can make a flashable image with it? This is so class!

Hmm, only for these devices or specially, but not only?

yes only officially supported devices. it takes device configuration file - ks, and jolla repositories to download packages from repositories and pack it to flashable images.

1 Like

Ok, got it. Thank you much for explaining.

@coderus many thanks for this instruction and build tool :smiley:.
Can you give any additional information where i can get the values for ‘… -e DEVICE=l500d -e DEVICE_VENDOR=qualcomm …’ and what .ks file to use e.g. for the tablet or GeminiPDA?
I did not find this information on this devices it self :thinking:.
EDIT: For the GeminiPDA i got an image on the Jolla shop, but not for the table (or the Jolla Phone) :smirk:.

check header of file, it gives you default examples for execution.
also you can get it from your repositories pattern - look at ssu lr output.

1 Like

Very nice!
I wanted to build a tablet image since it is such a PITA to upgrade from scratch, but ran into problems.
So simplifying, i used the command from, with my username and password from the credentials-store section of ssu.ini.

The failure i’m getting is as follows:

  File "/usr/bin/mic", line 219, in <module>
  File "/usr/lib/python3.8/site-packages/mic/utils/", line 257, in main
    return self.cmd(args)
  File "/usr/lib/python3.8/site-packages/mic/utils/", line 280, in cmd
    retval = self.onecmd(argv)
  File "/usr/lib/python3.8/site-packages/mic/utils/", line 412, in onecmd
    return self._dispatch_cmd(handler, argv)
  File "/usr/lib/python3.8/site-packages/mic/utils/", line 1084, in _dispatch_cmd
    return handler(argv)
  File "/usr/bin/mic", line 88, in do_create
  File "/usr/lib/python3.8/site-packages/mic/", line 266, in main
    return self.cmd(args)
  File "/usr/lib/python3.8/site-packages/mic/utils/", line 280, in cmd
    retval = self.onecmd(argv)
  File "/usr/lib/python3.8/site-packages/mic/utils/", line 412, in onecmd
    return self._dispatch_cmd(handler, argv)
  File "/usr/lib/python3.8/site-packages/mic/utils/", line 1100, in _dispatch_cmd
    return handler(argv[0], opts, *args)
  File "/usr/lib/mic/plugins/imager/", line 68, in do_create
  File "/usr/lib/python3.8/site-packages/mic/imager/", line 1303, in check_depend_tools
  File "/usr/lib/python3.8/site-packages/mic/utils/", line 60, in find_binary_path
    raise CreatorError("Command '%s' is not available." % binary)
mic.utils.errors.CreatorError: <creator>Command 'modprobe' is not available.

I’m not very familiar with docker… but the common ways to get a shell and poke around in the container is failing with this one.

Have you tried just installing modprobe and making it available in your PATH? Or is that error in the container?

I just assumed it is from inside the container, since it would have no business messing with my host system. And for completeness, the command is available on the host.

1 Like

hello, you running it not in my container, isn’t it?

Not sure i understand… i assumed the commands were to be run from host, and “docker run …” does the magic.

attah@obsidian repos/sfos-builder $ docker build -t sfos-builder .
attah@obsidian repos/sfos-builder $ docker run --privileged --rm -it -v $PWD:/share -w /share -e RELEASE= -e USERNAME=attah -e PASSWORD=$SuperSecretPassword -e ARCH=armv7hl -e DEVICE=l500d -e DEVICE_VENDOR=qualcomm sfos-builder l500d-eu-lvm.ks

Then it very much looks like mic inside then container is complaining about missing modprobe.

Hmm, seems i got a bit further now… added this to the Dockerfile:

test -f /usr/sbin/modprobe || zypper -n in kmod

(not sure that is where modprobe is expected to end up though)

Now it’s complaining about missing feature-sailfish-eas. Hmmm.

Edit: that might be because of credentials from unlicensed phone… trying another.
Edit2: Crap… unauthorized, does it need to be from an architecture-matching device? Or identical to the target?

Credentials from a matching device did the trick!
But i seem to be missing output files… i only got 6 for the tablet, and not any sailfish.img* files.
Looking back at the output, grep seems to have been missing and dd failed… but despite that the job claimed to be successful.

Edit: and “‘gnu-grep’ is already installed.” but maybe not as /bin/grep which something seems to want?
Edit2: test -f /bin/grep || ln -s /usr/bin/grep /bin/grep in Dockerfile fixed that… now it is missing /usr/bin/img2simg_jolla
I don’t think that is from droid-tools-imager and can’t figure out what package to add…

it’s installed into /usr/local/bin, check if it’s inside path

Path is as follows: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin (at least when the Dockerfile executes)
And indeed /usr/local/bin/img2simg_jolla exists.
But for some reason it is expected in /usr/bin/


Edit: Success! I’ll send you my diff in an issue when i’ve made dinner.

ah okay probably my fault, i’ll inspect ks files

1 Like