Ask / Submit

howto reinstall sailfish on jolla phone

asked 2018-10-16 22:39:53 +0300

thesix gravatar image

updated 2018-10-17 16:41:51 +0300

jiit gravatar image

Hi all,

seems we have a device with a broken btrfs.

 scrub status for 818cf2b9-8e57-49f1-a211-5663d03c1585
        scrub started at Thu Jan  1 00:11:49 1970 and finished after 53 seconds
        total bytes scrubbed: 3.11GiB with 16 errors
        error details: verify=16
        corrected errors: 0, uncorrectable errors: 16, unverified errors: 0

The problem became visible because the device rebooted every time a text message was sent, sometimes even while typing longer text messages. Jolla support closed the issue stating:

Thanks for the message and log file. It seems that the device is rebooting because of btrfs. Unfortunately we don't fix btrfs related issues. Re-flashing or factory reset might help in this case.

which in itself is ... well ... factory reset did not solve the problem btw, just made it worse since the phone is in the dreaded reboot loop now (due to btrfs I suppose) and hence useless.

Anyhow, anyone an idea on how to flash the device? Did not find anything helpful, despite the internet being huuuuuuge ;)

Thanks and cheers, t.

edit retag flag offensive close delete


Jolla Suppoort says I have to send the phone to Mobylife for repairs (reflashing actually) but did not give a clue on how to perform such a procedure.

thesix ( 2018-10-17 08:47:01 +0300 )edit

So this topic has been tackled more than four years ago already but still no solution. I get all the arguments presented in the thread an links to further comments. The only thing missing is a viable way how to get your phone working again when it just breaks like in my case.

thesix ( 2018-10-17 09:01:04 +0300 )edit

Anyone ever tried this procedure? I have a second, working phone.

thesix ( 2018-10-17 09:02:54 +0300 )edit

If you want to reflash, try this (last answer) But you need access to the recovery menu... But first you should try the option recovery btrfs from the recovery menu.

yajo ( 2018-10-17 11:07:38 +0300 )edit

I would also go over recovery menumenu, make full reformat of the storage and reset to factory state

ExPLIT ( 2018-10-17 13:32:42 +0300 )edit

4 Answers

Sort by » oldest newest most voted

answered 2018-10-17 15:03:07 +0300

DrYak gravatar image

I've basically done something similar when replacing the mother board of a busted jolla.

there is a guide to mostly do that.

  • first you need an image of a working Jolla 1
    • either just the factory, or a copy of another phone
    • or your own recover of the BTRFS partition - (did you keep a dump somewhere ?)
      • if you haven't attempted a factory recover, your files are in subvolumes @ and @home
      • if you have attempted a factory recover, your files are in subvolumes backup-@ and backup-@home
      • the factory recover files are in subvolumes factory-@ and factory-@home
      • use the journal output of btrfs scrub to get a list of broken files.
      • use btrfs restore -sxmS on your laptop to extract all salvageable files
      • use rpm go get a fresh copy of non-salvageavle files from original Jolla RPMs (rpm -qf tells you which rpm a file comes from)
    • or politely ask another Jolla 1 owner
    • (NOTE that Jolla can't provide recovery images themselves, due to copyrighted blobs by Qualcomm)
  • store the image on an SD card (format either ext4 or btrfs to be able to hold large file)
  • boot the jolla in to recovery telnet mode
  • using the shell option menu:

    • dump the new image using dd over the broken BTRFS partition (mmcblk0p28)
    • mount the over-written partition and make sure that the UUID in /etc/fstab matche those of your partition
    • if your new image and the last thing on your phone aren't the exact same ( <- that's your case ) :

      (this is a critical part that most of the guides like the above link skip)

      see /usr/bin/recovery-menu-flash on your recovery mode, and the scripts inside /var/lib/platform-updates/ and /usr/sbin/flash-partition on your sailfish image.

      the simplest is to do like the recovery-menu does it : setup a chroot :

      mount -t proc proc /tmp/@/proc

      mount -o bind /dev /mnt/@/dev

      mount -o bind /sys /mnt/@/sys

      chroot /mnt/@/

      and then run all the scripts in /var/lib/platform-updates/, they will dd images to all the android-style partitions all over.

edit flag offensive delete publish link more

answered 2018-10-19 10:16:59 +0300

thesix gravatar image

Hi all,

got the phone working again!

Basically I followed these instructions, including the modifications from comments (especially setting UUID on both subvolumes - factory-@ and @ - is important). Also to make the btrfs use the command from comments which disables the features that modern btrfs has:

mkfs.btrfs --label sailfish --nodesize 4096 --features ^extref,^raid56,^skinny-metadata,^no-holes jolla.img

I used the netcat method to transfer the image to the broken phone using its recovery mode shell.

on the phone:
netcat -l -p 1234 > /dev/mmcblk0p28

on my laptop:
cat /path/to/jolla.img | nc 1234

Once this was done (takes about 45 minutes) I exited the shell and chose factory reset from the recovery menu. After rebooting the phone was brand new :)

Thanks for all the comments and suggestions folks!

PS: now I'm installing the first upgrade. Guess it will take the rest of the day to bring the device to a current software state ;)

edit flag offensive delete publish link more

answered 2018-10-18 14:56:43 +0300

nas gravatar image

Hello @thesix

Even my answer is not on how to reinstall sailfish on jolla phone, my experience with btrfs recovery which I shared it here ( ) may help you if you can access shell from recovery menu.

I hope the best for your phone. And DO remember -> make ANY backup if you still can!

edit flag offensive delete publish link more

answered 2018-10-19 10:20:02 +0300

thesix gravatar image

One last thing: how would you feel if I provided the created image for download? I don't see myself bound to any nda and would gladly share the work for others don't have to go through the building process. Any comments welcome :)

edit flag offensive delete publish link more


That would be great. But I have to warn you: you have to be careful, that you don't have personal data on it. I guess you have a working Jolla-account on it. And you should be aware that Jolla is not allowed to share images for flashing in cause of license problems with Qualcomm. I am not shure how this can be a problem for you.

yajo ( 2018-10-19 10:39:51 +0300 )edit

AFAICS there is no personal data on it. I used the factory subvolumes (factory-@ and factory-@home) to create the image and upon reboot the phone asks for Jolla account information (which tells me it has none).

Actually it would be interesting if the license problem transfers to me ;) I will go back and read what I signed when I accepted the conditions to install/use sailfish.

PS: Meanwhile I'm installing which is like a journey back in time ... guess there is no way to speed up this process, right?

thesix ( 2018-10-19 10:49:16 +0300 )edit

@thesix very nice you fixed your problem ! I would suggest that you should make BACKUPS !!! and transfer them out of the phone memory !

nas ( 2018-10-19 13:10:08 +0300 )edit

Hey ! I'm also in the process of upgrading my Jolla 1 after a factory reset : It's pretty nice to see all the version history. Sailfish OS was great even in 2013, unlike most OS.

tourdetour ( 2018-10-21 20:26:40 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2018-10-16 22:39:53 +0300

Seen: 709 times

Last updated: Oct 19 '18