[Help] Jolla Phone

Hi everyone,

Please help me save my Jolla Phone. I updated it to the latest supported version of SailfishOS (I think it was v3.4), but then noticed that some apps wouldn’t install or update. I found that it was due to Jolla implementing a new compression method for the packages called zstd .

I started following these instructions for updating the RPM. I was missing rpm-libs-4.14.3+git28-2.armv7hl.rpm , but I decided to continue with the installation anyway. The instructions say to use rpm or zypper to install all the packages. Since I didn’t have zypper installed, I managed to install it using this command: pkcon install zypper.

After that, I started installing the packages in the following order:

  • zypper install ./rpm-sign-4.14.3+git28-2.armv7hl.rpm
  • zypper install ./rpm-devel-4.14.3+git28-2.armv7hl.rpm
  • zypper install ./rpm-build-4.14.3+git28-2.armv7hl.rpm
  • zypper install ./rpm-doc-4.14.3+git28-2.armv7hl.rpm
  • zypper install ./rpm-4.14.3+git28-2.armv7hl.rpm

The packages required some dependencies that I didn’t have, but I still decided to continue and ignore the warnings… When I got to the final package, the terminal showed that there was a conflict:

Detected 1 file conflict:

File /usr/bin/rpmspec
  from install of
     rpm-build-4.14.3+git28-2.armv7hl (Plain RPM files cache)
  conflicts with file from package
     rpm-4.14.1+git26-1.11.1.jolla.armv7hl (@System)

File conflicts happen when two packages attempt to install files with the same name but different contents. If you continue, conflicting files will be replaced losing the previous content.

I continued anyway, but then an error occurred:

Problem occurred during or after installation or removal of packages:
Failed to cache rpm database (127).

Since then, I haven’t been able to install any apps. I tried a factory reset, but now I can’t log in with my Jolla account, nor can I create a new one. I can’t seem to turn on Developer Mode either. I suppose whatever I did caused permanent damage.

So now comes the question: How can I fix this? Maybe somehow reflash the OS? The basic functions of the phone work fine on Sailfish OS v1.0.0.5, but I really hope we can fix this.

All help is appreciated. Thank you in advance!

I assume you cannot connect to Jolla (for account usage or creation, and “installing” developer-mode, which downloads the terminal app), because of outdated X.509-certificates for TLS / SSL (as in HTTPS).

  1. Do analyse, if this is the cause.
  2. If “yes”, try applying “olf (Olf0) (Olf0) / Guide - Fix certificate issues on SailfishOS · GitLab
    Detailed discussion at “[Guide] Fix certificate issues on SailfishOS”, but you need to read the whole thread!

I suppose whatever I did caused permanent damage.

I do not think so: Accidentally damaging the “onboard” factory image (used when performing a “factory reset”) is almost impossible.

4 Likes

that’s not good normally, in case of rpm a serious no-go

you’ll need at least (as one single command in the folder you’ll have all rpm-files):
zypper install openssl-libs-1.1.1kgit1-1.7.4.jolla_.armv7hl.rpm libzstd-1.5.0git1-1.1.10.jolla_.armv7hl.rpm rpm-4.14.3+git28-2.armv7hl.rpm

you will not need rpm-build unless you’re going to build rpm-packages on your Jolla1
you will not need rpm-sign unless you’re going to sign rpm-packages built with rpm-build
you will not need rpm-devel unless you’re going to build e.g. zypper yourself
you will not need rpm-doc (unless you want to read man-pages on your device) nor rpm-libs (I didn’t provide that because it only contains the message: This is an empty package)

maybe you could have fixed (too late, you did a fictory reset already) the situation by manually copying the contained libraries in openssl-libs and libzstd (open the rpm files in an archive-manager and extract the .so files) in your /usr/lib folder

2 Likes

But then why was I able to create a Jolla account on the first try with Sailfish OS v1.0.0.5? Now, all it does is display an error when I try to create a new account, saying it can’t check for username availability and to try again later. When I try to log in, it goes to the account creation loading page and then shows the error: “Oops, problem with account creation. Go back to try again, or skip now and add this account later.”

When I checked the Jolla Account Website, I noticed it remembered the IMEI number of the device. I thought this might have been “confusing” the system (similar to iCloud), so I permanently deleted that account. Now, I’m unable to use that email or create a new account with the same username.

Anyway, that’s not that important. All of this makes me think I might have messed something up with the login system and/or the RPM.

Check out the other reply for more info on the situation. I might end up reflashing the OS with an image if things don’t work out.

I’m able to input commands from the Recovery Mode>Shell. I ran the following commands:

mkdir -p /mnt/rootfs
mount /dev/mmcblk0p28 /mnt/rootfs
chroot /mnt/rootfs /bin/bash
rm -f /var/lib/rpm/__db.*
rpm --rebuilddb
bash-3.2# rpm -qa | grep -E 'rpm|zstd|openssl'
openssl-libs-1.0.1c-1.1.1.armv7hl
deltarpm-3.5-1.1.1.armv7hl
rpm-4.9.1.2-1.1.4.armv7hl
rpm-libs-4.9.1.2-1.1.4.armv7hl
bash-3.2# rpm -qa | grep rpm
deltarpm-3.5-1.1.1.armv7hl
rpm-4.9.1.2-1.1.4.armv7hl
rpm-libs-4.9.1.2-1.1.4.armv7hl

I also transferred the required packages to update the rpm in the Downloads folder (should be /home/nemo/Downloads), but I don’t have access to it (No such file or directory). I don’t have Zypper installed, so I can’t run that command. Would this work:
rpm -Uvh --force openssl-libs-1.1.1kgit1-1.7.4.jolla_.armv7hl.rpm libzstd-1.5.0git1-1.1.10.jolla_.armv7hl.rpm rpm-4.14.3+git28-2.armv7hl.rpm

When I try and register for Developer tools>Allow developer updates I get SSL handshake failed. Does that confirm the theory?

you cannot do that running Sailfish OS v1.0.0.5, you have to upgrade to 3.1.0

at least (I don’t know exactly if zypper and jolla-store from sfos3.1.0 will work with this new rpm version, with sfos3.4 I know it works), it brings glibc 2.28 required for rpm-4.14.3+git28-2.armv7hl.rpm
please avoid --force in commands unless you know exactly what you are doing…

1 Like

In that case, what should I do now? I need that update, but I can’t log in. Factory Reseting should have already reverted the changes I have done to the rpm, right? Check my previous reply for more info.

hm, hard to say:
to install openssl-libs-1.1.1kgit1-1.7.4.jolla_.armv7hl.rpm you’ll need at least SFOS1.1.7 (maybe you can install old glibc-2.19+glibc-common-2.19 from lpr repo glibc | OpenRepos.net — Community Repository System, if that works, you can install openssl-libs)
to install https://openrepos.net/sites/default/files/packages/7598/ca-certificates-2023.2.62_v7.0.401-1.6.1.jolla_.noarch.rpm you’ll need at least sfos2.2.1 (if i create a xz-compressed version)

1 Like

Simply clicking on the downloaded file (glibc-common-2.196.14.1-1.armv7hl.rpm) doesn’t do anything, so I suppose I have to install it in the terminal. The issue I’m facing right now is that I can’t access the Downloads folder while I’m in the Shell.

I read somewhere that clearing (rm *.0) the certs folder (/etc/pki/tls/certs) could help. Before that, I made a backup of the files inside (just in case). That didn’t make a difference, but maybe we can think of some way of transferring the required certificate/s manually? The newer versions of Sailfish OS had their own Certificate section in Settings just for that iirc.

you cannot update glibc-common-2.196.14.1-1.armv7hl.rpm without updating https://openrepos.net/sites/default/files/packages/7598/glibc-2.196.14.1-1.armv7hl.rpm as well, so yes you’ll need the terminal in root mode: rpm -Uv glibc-2.196.14.1-1.armv7hl.rpm glibc-common-2.196.14.1-1.armv7hl.rpm should do the trick, if not one has to make another plan… if it works, you could update openssl-libs and if I manage to upload p11-kit version of sfos2.2.1, you can install p11-kit and with that maybe newest ca-certificates (as I said I have to create a version that uses xz)

remember: If you finally could update SFOS, you’ll have to redo these steps because during the update, openssl and ca-certificates are downgraded again to the updated sfos versions (and jolla1 has to go through all Stop releases up to 3.4 … , ok you don’t have to update glibc in newer versions, and after 2.2.1 you’ll have p11-kit as well but ca-certs and openssl)

and don’t forget to btrfs-balancer balance after every update until it says it’s already balanced (so a couple of times each update)

1 Like

I uploaded some packages that might help…

https://openrepos.net/content/lpra7/ca-certificates-jollaphone

2 Likes

Thank you so much for your help. I’m still struggling with finding the Downloads folder (or to the very least a folder I can see both in Normal mode and as a root), but I’m sure your work will help other people too.

I was able to transfer them to an SD Card and access the package from there. I’m using a 2GB SD Card, formatted as FAT32. I did shorten the names of the packages a bit.

/ # mkdir -p /mnt/sdcard
/ # mount /dev/mmcblk1p1 /mnt/sdcard
/ # ls -lah /mnt/sdcard
drwxr-xr-x    3 0        0           4.0K Jan  1  1970 .
drwxr-xr-x    3 0        0              0 Aug 20 01:29 ..
drwxr-xr-x    2 0        0           4.0K Feb  8  2025 System Volume Information
-rwxr-xr-x    1 0        0           4.4M Feb  7  2024 glibc-common.rpm
-rwxr-xr-x    1 0        0           5.5M Feb  7  2025 glibc.rpm
-rwxr-xr-x    1 0        0           1.5M Feb  7  2025 openssl.armv7hl.rpm
/ # mkdir install_me
/ # cp /mnt/sdcard/*.rpm /install_me
/ # cd install_me/
/install_me # ls
glibc-common.rpm     glibc.rpm            openssl.armv7hl.rpm

I don’t seem able to update the packages, I can only install them.

/install_me # rpm -i glibc.rpm glibc-common.rpm
rpm: can't create symlink './lib/ld-linux-armhf.so.3' to 'ld-2.19.so': File exists

BUT if I only choose to install glibc-common.rpm, it seems to succseed.

Here’s a short recap of what happened:

  • managed to get root access in the Shell (Emergency Mode)
  • the way of transfering files to the phone is using an SD Card;
  • transfered DST-RootCA-X3 and ISRG-Root-X1.pem to /etc/pki/tls/certs/
  • installed a bunch of stuff using the rpm -i command:
    rpm -i ca-certificates-2018.2.26-1.3.1.jolla.noarch.rpm
    rpm -i ca-certificates-2020.2.41-1.4.1.jolla.noarch.rpm
    rpm -i ca-certificates-2023.2.62_v7.0.401-1.6.1.jolla_.noarch.rpm
    rpm -i libffi-3.2.1git1-1.10.7.armv7hl.rpm
    rpm -i p11-kit-0.23.12-1.2.2.jolla_.armv7hl.rpm
    rpm -i p11-kit-nss-ckbi-0.23.12-1.2.2.jolla_.armv7hl.rpm
    rpm -i p11-kit-trust-0.23.12-1.2.2.jolla_.armv7hl.rpm

Edit:
Never mind, I tried installing the packages with the rpm -Uv command as root and found that most required dependencies or other packages I didn’t have…

what are you trying to do?
recovery mode is not sailfishos
recovery mode is a minimalistic os that allows mounting some filesystems and move files and to play back a stored (it’s an exra part of root partition that is not touched - only by jolla) image of sailfishos to the root partition (aka factory reset)
you cannot install things in recovery mode
you can install things when booting your phone normally (then having a running sfos1.0.0.5) and then enabling expert-mode or s.th. like that that gives you fingerterm (the terminal app) and then enabling developer mode/ remote connection (setting a password) that gives you root access in fingerterm (devel-su command)

1 Like

Oh…, if that’s the case I have to find another way to get the terminal in Sailfish OS. I don’t know if this would make a difference, but as an experiment I transferred harbour-storeman-installer-1.0.0-1.noarch.rpm, installed it with the rpm -Uv command and it appeared in the app drawer. Unfortunately, it crashes.

Also, can you help me find these dependencies:
libtasn1.so.6 is needed by p11-kit-trust-0.23.12-1.2.2.jolla.armv7hl
libtasn1.so.6(LIBTASN1_0_3) is needed by p11-kit-trust-0.23.12-1.2.2.jolla.armv7hl

I added libtasn1, but be careful: most likely you will need the old one, too.
So if rpm -Uv libtasn1-4.13-1.8.8.armv7hl.rpm fails, you’ll have to switch to rpm -iv
because that’s what rpm -i does: install the rpm without looking at existing ones (it doesn’t uninstall the old one, but overrides same named files, so it works as intended when 2 packages - two different versions of the same - have different file names of the installed files - e.g. libtasn1.so.5 and libtasn1.so.6).
It creates a bit of a mess, so don’t do that regularly, only if it is needed…

1 Like
bash-3.2# rpm -Uv libtasn1-4.13-1.8.8.armv7hl.rpm
error: Failed dependencies:
        libtasn1.so.3 is needed by (installed) gnutls-2.12.18-1.1.1.armv7hl
        libtasn1.so.3(LIBTASN1_0_3) is needed by (installed) gnutls-2.12.18-1.1.1.armv7hl
bash-3.2# rpm -iv libtasn1-4.13-1.8.8.armv7hl.rpm
Preparing packages for installation...
libtasn1-4.13-1.8.8

Then I tried installing the p11-kit packages.

bash-3.2# rpm -Uv p11-kit-0.23.12-1.2.2.jolla_.armv7hl.rpm p11-kit-trust-0.23.12-1.2.2.jolla_.armv7hl.rpm p11-kit-nss-ckbi-0.23.12-1.2.2.jolla_.armv7hl.rpm
warning: p11-kit-0.23.12-1.2.2.jolla_.armv7hl.rpm: Header V3 DSA/SHA1 Signature, key ID f2633ee0: NOKEY
Preparing packages for installation...
        file /usr/lib/libnssckbi.so from install of p11-kit-nss-ckbi-0.23.12-1.2.2.jolla.armv7hl conflicts with file from package nss-3.14.3-1.1.2.armv7hl

I uploaded the SFOS1.0.0.5 version of fingerterm …

in this case maybe it is time for rpm option --replacefiles but be careful and let’s hope it works, maybe saving libnssckbi.so by creating a renamed copy of it…