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.

21 Likes

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

2 Likes

Just run the flashing commands.

7 Likes