What are the Device lock and Security code?

Jolla Care -

With the help of this article, you will learn how to set up a Security code to your device and what the device lock means.



1 About the Device lock

2 Turning Device lock on

2.1 Configuration Device lock

3 Functions that require the Security code to use them

4 How to disable the Device lock

5 Quick locking and unlocking

6 Permanently locked devices


1. About the Device lock

The Device lock has two main purposes:

  • It can be set to prevent using the touch display and thereby the whole device (i.e. it acts as a screen lock) 
  • It prevents using a number of sensitive device functions. The correct Security code must be typed first.

The most common setting is to have your device prompt for the Security code every time you try to navigate further from the Lock screen. The Security code is needed for other purposes, too, as explained in the chapter 3. It is also possible to use such a configuration that using the touch screen does not require the code (i.e. screen lock is OFF) but the sensitive functions (chapter 3) are protected.

There is no way to recover any data from a device that is locked up with a Security code. This is because the purpose of the code is to deny all access to data on the device, unless the correct code is entered. There are no extra secret codes or the like, opening back doors. Therefore, make sure you do not forget the Security code you set.

Device lock is off by default (it is off after the first startup of the device) and there is no default Security code in Sailfish OS.  If a Sailfish device is locked, somebody must have created a Security code in "Settings > Device lock" and thereby enabled the device lock.

The dialog for typing the Security code to unlock the touch screen can be replaced with fingerprint recognition. This requires that the device used supports this feature.

2. Turning Device lock on

The device lock is activated either during the Startup wizard, i.e. the first startup of the device (after installing/flashing Sailfish to the device) or later in the menu page Settings > Device lock. On this page, you will first need to touch the item "Use security code" to turn the switch light on in front of it.

The activation is done so that you type the Security code of your choice (at least 5 digits) once and then  again for a confirmation. There is no dedicated ON-switch. The device lock is active now, immediately.  You will need to type this code always when beginning to use the secured functions discussed later in this article. Please memorise your code!

Only if there is no switch light in front of the text "Use security code" then you know that no security code has been configured to this device.

 Secu1.jpg  Secu2.jpg  Secu4.jpg

Secu5.jpg  Secu6.jpg

The last picture above has the switch light on in front of the text "Use security code". Therefore, all the sensitive functions of chapter 3 are protected. Also the touch screen becomes automatically locked (unless the option "Not in use" is chosen).

2.1. Configuration of Device lock

The correct Security code must be typed in before changing any of the settings below.

a) Automatic locking

This item affects the touch display lock only (whereas the Security code is in effect for the functions of chapter 3 all the time, regardless of this setting). This time value defines how soon (or if not at all) the touch display lock goes on.

  • "No delay" means that the touch display is locked immediately after switching the display off (black screen); the Security code prompt will appear as soon as the display is turned on the next time
  • "10 minutes", for instance, makes the display lock go on 10 minutes after switching the display off, i.e. during the first 10 minutes the display can be turned on without typing the code
  • "Not in use" prevents the display getting locked at all.
    However, the Security code will be requested when attempting to perform certain actions (see chapter 3) with your phone. Making this selection does not remove the Security code from your device!

    Secu7.jpg  Secu8.png


b) Show notifications when device is locked

Notifications from various apps are shown on the display also when the Device lock is enabled.

c) Using fingerprint recognition

This menu item is missing from devices that do not have the detector.

This function requires the fingerprint detector on the device. Not all Sailfish OS devices have it.

Fingerprint recognition can be used to unlock the screen lock (instead of typing the security code). Sailfish OS 3.2.0 (and earlier) does not support fingerprint recognition in other contexts, i.e. one must type the security code when requested.

Adding a fingerprint

  • Type your security code
  • Start tapping your fingerprint on the detector until the fingerprint symbol becomes all white. Follow the on-screen instructions
  • It is possible to add several fingerprints (Fingerprint 1, Fingerprint 2, Fingerprint 3, etc.)

Finger1.png  Finger2.png  Finger3.png

Finger4.png  Finger5.png  Finger6b.png

Deleting a fingerprint

Tap-and-hold a "Fingerprint #n" item. Take 'Delete' from the pop-up menu.

d) Number of tries

One can decide how many times one can try different codes in the Security code dialog. Consider the best value in case your phone is in wrong hands; also consider the case where you cannot recall the code yourself. The options are:

  • 4 to 50 times
  • Unlimited

e) Change security code

By tapping this button one can replace the current Security code with a new one.

3. Functions that require the Security code to use them


As explained in the previous chapter, Security code prevents the use of the touch display (and thereby the use of the whole device). It is also used to protect the use of the following functions:

  • Make changes to the Device Lock settings (note: there is no specific button to accept the changed settings - another security code dialog appears for the confirmation, instead)
  • Allow installation of untrusted software
  • Allow connections over USB cable
  • Reset the phone to factory settings
  • Enable Developer Mode
  • Set the SSH password
  • Use the Recovery Mode
  • Sign in to a corporate MS Exchange account. Many service providers require that the Device Lock is in use to protect confidential information
  • Toggling certain items in Top Menu.

NOTE:  Even if you set your Automatic locking to "Not in use" for the screen lock, you will still be prompted to enter the security code for the actions described above.


4. How to disable the Device lock

Device lock can be turned off in three ways (of which the 1st is the intended one):

1) Switch off the light in front of the item "Use security code" by tapping it. This requires that you type in the correct Security code, first.

2) Reset the device into factory settings. This requires that you type in the correct Security code, first.

3) Install ("flash") Sailfish OS to the device, again, or have it installed.



5. Quick locking and unlocking

Please read this article about locking and unlocking the screen faster with the Power key.


6. Permanently locked devices

If your Jolla device is asking you for a security code you don't remember, or for a code you don't remember configuring with your device, only qualified Jolla service can unlock the phone. This is done on the cost of the phone owner, as this is not deemed as a Warranty repair. No data is salvageable from a device locked with a code.

If you are using an Xperia device then it is possible to unlock the device and eliminate the Security code by installing ("re-flashing") Sailfish OS to the device, again. This would, however, clear all data, apps and accounts from the device.

If you try to unlock the phone too many times with an incorrect code then the phone becomes permanently locked, it may be possible to unlock a permanently locked device using the Recovery Mode (help article for Jolla1 and for Jolla C).  The requirement is that the correct lock code is known.

Read chapters 1 and 2 in the Recovery Mode article and do as instructed in them. 

Jolla Phone (Jolla 1)

NOTE: This method does not unfortunately work anymore with Sailfish 3.

Take option "#4 Shell"  in the menu. Allow it continue by typing 'Y'. Type in your security code. Perform the following commands (copy/paste the commands from here to the Telnet terminal - note that the 2nd command is very long):

mount /dev/mmcblk0p28 /mnt
printf `date -u +%s`0 > /mnt/usr/share/lipstick/.devicelock.time

Jolla C or Aqua Fish

NOTE: This method does not unfortunately work anymore with Sailfish 3.

Take option "#3 Shell".  Allow it continue by typing 'Y'. Type in your security code. Type "Exit", then take option "#6 Exit".  This should have unlocked the device. If not, the commands below would do it.

mount /dev/mapper/sailfish-root /mnt
sed -i "/nemo\\\devicelock\\\maximum_attempts=/c\nemo\\\devicelock\\\maximum_attempts=-1" /mnt/usr/share/lipstick/devicelock/devicelock_settings.conf

All Jolla devices

Take this process to the end as follows:  Disconnect the USB cable from your Sailfish device and detach the battery. Then insert the battery and restart the device. Enter the security code when requested.


Have more questions? Submit a request
Powered by Zendesk