Fastboot flashing of Jolla C2

Fastboot flashing of a Jolla C2

1. Download the latest Sailfish OS release for C2

The C2 release images are currently kept in this repository. Download the C2 zip file from there. Just before Christmas (2024), it is the file Sailfish_OS-Jolla-5.0.0.43-s19mps-1.0.0.30.zip.

Unzip the C2 zip file to your Linux computer. The following files should appear:

2. Update the bootloader

If you have already updated your C2 to OS version 5.0.0.43, skip to Chapter 3. The bootloader is up to date.


The bootloader must be updated to make the fastboot flashing possible.

Copy the lk.bin from the C2 zip file to your C2 device (MTP/USB) and check that md5sum matches

[defaultuser@JollaC2 ~]$ md5sum lk.bin 
20c0b9996de86994cebf55b9eaf74d15  lk.bin

Working as root on the C2 phone, copy the lk.bin to /boot/ and run the flash-bootloader script

[defaultuser@JollaC2 ~]$ devel-su 
Password: 
[root@JollaC2 defaultuser]# cp lk.bin /boot/lk.bin
[root@JollaC2 defaultuser]# /var/lib/platform-updates/flash-bootloader.sh 

Turn the phone off.

3. Install Sailfish OS with fastboot

NOTE: Flashing will delete all of your data on the phone. Copy valuable data to a safe storage outside of the phone.

When the phone is off press the Power key until you feel the vibrator play shortly. Release the Power key. Press and hold the Volume Down key.

The phone should vibrate again and the tiny “fastboot mode” text should appear at the top left corner of the screen while the C2 and Sailfish OS logos appear in the middle.

Connect the C2 phone with a USB cable to your Linux computer. Open a terminal on the computer to the folder where you unzipped the C2 zip file.

Give the following commands in the terminal:

sudo fastboot flash boot_a hybris-boot.img
sudo fastboot flash boot_b hybris-boot.img
sudo fastboot flash vendor_boot_a vendor_boot.img
sudo fastboot flash vendor_boot_b vendor_boot.img
sudo fastboot flash dtbo_a dtbo.img
sudo fastboot flash dtbo_b dtbo.img
sudo fastboot flash userdata sailfish.img001
sudo fastboot flash super fimage.img001

The last two commands may take up to 3-4 minutes in total.

Summary

Flashing output

$ sudo fastboot flash boot_a hybris-boot.img
[sudo] password for <username>: 
Sending 'boot_a' (46560 KB)                        OKAY [  1.572s]
Writing 'boot_a'                                   OKAY [  0.280s]
Finished. Total time: 1.906s

$ sudo fastboot flash boot_b hybris-boot.img
Sending 'boot_b' (46560 KB)                        OKAY [  1.552s]
Writing 'boot_b'                                   OKAY [  0.253s]
Finished. Total time: 1.853s

$ sudo fastboot flash vendor_boot_a vendor_boot.img
Sending 'vendor_boot_a' (102400 KB)                OKAY [  3.471s]
Writing 'vendor_boot_a'                            OKAY [  0.603s]
Finished. Total time: 4.196s

$ sudo fastboot flash vendor_boot_b vendor_boot.img
Sending 'vendor_boot_b' (102400 KB)                OKAY [  3.266s]
Writing 'vendor_boot_b'                            OKAY [  0.564s]
Finished. Total time: 3.888s

$ sudo fastboot flash dtbo_a dtbo.img
Sending 'dtbo_a' (8192 KB)                         OKAY [  0.296s]
Writing 'dtbo_a'                                   OKAY [  0.151s]
Finished. Total time: 0.472s

$ sudo fastboot flash dtbo_b dtbo.img
Sending 'dtbo_b' (8192 KB)                         OKAY [  0.300s]
Writing 'dtbo_b'                                   OKAY [  0.142s]
Finished. Total time: 0.455s

$ sudo fastboot flash userdata sailfish.img001
Sending sparse 'userdata' 1/22 (131032 KB)         OKAY [  4.788s]
Writing 'userdata'                                 OKAY [  0.018s]
Sending sparse 'userdata' 2/22 (128199 KB)         OKAY [  5.456s]
Writing 'userdata'                                 OKAY [  0.011s]
Sending sparse 'userdata' 3/22 (120957 KB)         OKAY [  4.042s]
Writing 'userdata'                                 OKAY [  0.001s]
Sending sparse 'userdata' 4/22 (130851 KB)         OKAY [  4.680s]
Writing 'userdata'                                 OKAY [  0.006s]
Sending sparse 'userdata' 5/22 (129105 KB)         OKAY [  4.539s]
Writing 'userdata'                                 OKAY [  0.004s]
Sending sparse 'userdata' 6/22 (131070 KB)         OKAY [  5.102s]
Writing 'userdata'                                 OKAY [  0.004s]
Sending sparse 'userdata' 7/22 (131068 KB)         OKAY [  4.891s]
Writing 'userdata'                                 OKAY [  0.001s]
Sending sparse 'userdata' 8/22 (131068 KB)         OKAY [  4.675s]
Writing 'userdata'                                 OKAY [  0.001s]
Sending sparse 'userdata' 9/22 (117133 KB)         OKAY [  4.201s]
Writing 'userdata'                                 OKAY [  0.001s]
Sending sparse 'userdata' 10/22 (121840 KB)        OKAY [  4.411s]
Writing 'userdata'                                 OKAY [  0.008s]
Sending sparse 'userdata' 11/22 (130882 KB)        OKAY [  4.937s]
Writing 'userdata'                                 OKAY [  0.005s]
Sending sparse 'userdata' 12/22 (130980 KB)        OKAY [  5.138s]
Writing 'userdata'                                 OKAY [  0.008s]
Sending sparse 'userdata' 13/22 (131069 KB)        OKAY [  5.009s]
Writing 'userdata'                                 OKAY [  0.005s]
Sending sparse 'userdata' 14/22 (127027 KB)        OKAY [  4.614s]
Writing 'userdata'                                 OKAY [  0.006s]
Sending sparse 'userdata' 15/22 (131068 KB)        OKAY [  4.583s]
Writing 'userdata'                                 OKAY [  0.013s]
Sending sparse 'userdata' 16/22 (127993 KB)        OKAY [  4.449s]
Writing 'userdata'                                 OKAY [  0.006s]
Sending sparse 'userdata' 17/22 (117585 KB)        OKAY [  4.388s]
Writing 'userdata'                                 OKAY [  0.003s]
Sending sparse 'userdata' 18/22 (121588 KB)        OKAY [  4.508s]
Writing 'userdata'                                 OKAY [  0.001s]
Sending sparse 'userdata' 19/22 (129141 KB)        OKAY [  4.808s]
Writing 'userdata'                                 OKAY [  0.010s]
Sending sparse 'userdata' 20/22 (131021 KB)        OKAY [  4.648s]
Writing 'userdata'                                 OKAY [  0.001s]
Sending sparse 'userdata' 21/22 (130974 KB)        OKAY [  4.843s]
Writing 'userdata'                                 OKAY [  0.014s]
Sending sparse 'userdata' 22/22 (79404 KB)         OKAY [  2.785s]
Writing 'userdata'                                 OKAY [  0.013s]
Finished. Total time: 102.144s

$ sudo fastboot flash super fimage.img001
Sending sparse 'super' 1/11 (131068 KB)            OKAY [  5.018s]
Writing 'super'                                    OKAY [  0.008s]
Sending sparse 'super' 2/11 (131068 KB)            OKAY [  4.990s]
Writing 'super'                                    OKAY [  0.000s]
Sending sparse 'super' 3/11 (131068 KB)            OKAY [  4.852s]
Writing 'super'                                    OKAY [  0.004s]
Sending sparse 'super' 4/11 (131068 KB)            OKAY [  4.700s]
Writing 'super'                                    OKAY [  0.004s]
Sending sparse 'super' 5/11 (131068 KB)            OKAY [  4.859s]
Writing 'super'                                    OKAY [  0.004s]
Sending sparse 'super' 6/11 (131068 KB)            OKAY [  4.626s]
Writing 'super'                                    OKAY [  0.000s]
Sending sparse 'super' 7/11 (131068 KB)            OKAY [  4.908s]
Writing 'super'                                    OKAY [  0.005s]
Sending sparse 'super' 8/11 (131068 KB)            OKAY [  4.827s]
Writing 'super'                                    OKAY [  0.000s]
Sending sparse 'super' 9/11 (131068 KB)            OKAY [  4.959s]
Writing 'super'                                    OKAY [  0.006s]
Sending sparse 'super' 10/11 (131068 KB)           OKAY [  4.761s]
Writing 'super'                                    OKAY [  0.000s]
Sending sparse 'super' 11/11 (109792 KB)           OKAY [  3.978s]
Writing 'super'                                    OKAY [  0.006s]
Finished. Total time: 52.539s

Once done, give the command

fastboot reboot

and detach the USB cable.

The phone should boot up to Sailfish OS. It has the enlarged root partition size (10 GB) now.

35 Likes

What has to be done to increase the space on /root while flashing?

4 Likes

Just run the flashing commands.

9 Likes

Just flashed mine. First had to figure out how to get windows to recognize fastbooting phone.device manager showed yellow triangle and I had to download fastboot driver. Then i just copied those lines when i was in correct folder and now root partition is bigger.

I haven´t rooted any phones in 10 years and dont own coding skills but got the job done.

10 Likes

Does C2 has some kind of an activation lock? Say, what will happen if a user forgets password and then reflashes the device?

Should there be some drivers installed?

I have this problem on windows 10. I did what instruction said and still:
image

My Jolla C2 says it is in fastboot mode on left top corner but in windows it appears like this:
image

What should I do?

Yes i had to download and install fastboot driver for windows.

1 Like

Can U link to exact drivers you used?

Yes it was that one. [GitHub - fawazahmed0/Latest-adb-fastboot-installer-for-windows: A Simple Android Driver installer tool for windows (Always installs the latest version)]

1 Like

Flashed mine with a Linux computer and everything went fine - thank you for the instructions!

2 Likes

@jovirkku, this is a great step forward!

But AFAICS there is no recovery.img provided yet: Is Jolla going to provide one for their C2 phone in the future?

3 Likes

Flashed my C2 with my Linux computer, just to get the enlarged root partition size (10 GB).
Everything worked just fine.

2 Likes

This might be a stupid question, but I’m fairly new to Sailfish OS. Do I specifically require a Linux PC or is this flashing procedure also possible with a Mac computer via the Terminal? I have a MacBook Pro with M3 Max Chip and the latest operating system macOS Sequoia 15.2.

1 Like

Guessing that you would need Homebrew and Android Platform Tools installed?
https://www.igeeksblog.com/how-to-install-homebrew-on-mac/

1 Like

Thank you so much aspergerguy, with your help I was able to flash my Jolla C2 on my Mac :blush: I can’t thank you enough :smiling_face_with_three_hearts:

I have installed Homebrew as per your link and then entered the following into the Terminal followed by the return key to install Android Platform Tools:

brew install --cask android-platform-tools

Once the installation of Android Platform Tools has been completed, I have closed the active Terminal window. I have then downloaded the C2 release image as per the repository link in step 1 of this thread.
Then, I have navigated to the unzipped folder in the Finder (it was in my downloads folder). While holding down the CTRL key, I have left-clicked the folder, then selected “New Terminal at Folder” from the menu. This has opened a new Terminal window with that folder.
I then connected my Jolla C2 with a USB-C cable to my Mac and followed the instructions outlined in step 3 of this guide to prepare the phone (rebooting and getting into the fastboot mode).

Finally, I have simply copied and pasted one by one the commands from step 3 of the guide in this thread each followed by hitting the return key. When prompted to enter the password, enter the Mac user password and hit return.

After the reboot command, the Jolla C2 rebooted and was reset accordingly. Everything worked as expected =) Thanks also to jovirkku for the guide :slight_smile:

5 Likes

@Marvmarv89
Thanks for confirmation as I had been trying to avoid moving on from Intel Macs since flashing a variety of Nokia/Sailfish devices over the last 10 years.

1 Like

I can only recommend doing the switch to the Apple silicon based Macs, I have been using them since the M1 chip and I have not run into any issues. And the M3 Max chip in my MacBook Pro is so powerful that I can even play games like Baldur’s Gate 3 on highest settings. Sorry for getting a bit off-topic. :sweat_smile:

Anyway I am glad I could confirm that flashing the C2 with an ARM based Mac is indeed possible :innocent: and thanks again for the help provided.

2 Likes

Probably not. But as i know SailfishOS has some packages for device management. Only when the device is registered in this device management app - than it can be remotely locked, deleted etc…

Btw. I am also from Kyiv. But long time ago…

1 Like

Thanks, everything worked for me on Fedora 41. Except the reboot command, but that’s not important luckily.