With the help of this article you will learn to set up a security code (a.k.a. lock code) to your device. You will learn about functions that require entering a lock code (if set-up) to use them, and what to do in situations when your device reports it's "permanently locked".
1 About the device lock
If you're using the Device lock to prevent people from seeing personal information on your device, your Jolla won't allow you to use it until you unlock it with the security code specified by you.
The most common setting is to have your device ask for the code every time you try to navigate further from the Lock screen. The security code is needed for other purposes, too, like explained in the following chapters.
There is no way to recover data from a phone that is locked 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.
Device lock is off by default, and there is no default security code in Sailfish OS.
2 Turning device lock on
NOTE: Device lock will be enabled and active as soon as you have entered your new security code twice!
Go to menu Settings > System > Device lock. Pull down to set the lock on.
Only if you see the text "Device lock not in use" in this menu (see 3rd picture from left) you know that no lock code has been configured with your device.
- Decide your minimum 5 number long security code (unlock code) and type it two times. Be sure the memorize the code as only the service can unlock the phone without the code - and then all data gets wiped out from the phone while unlocking it.
From SailfishOS version "Vaarainmaa" onwards also letters are valid for the security code. In earlier versions only digits can be used.
- Next you need to define if you want the lock to go on immediately after switching the display off ("No delay"), after a selectable delay or never when the screen is switched off ("Not in use"):
- No delay: As soon as the display is switched off, the device will ask for the code when the display is switched on again.
- Not in use: The device will never ask for a lock code in connection to switching on the display, only when using certain other functions of your device.
To be clear, this setting only refers to locking the screen. If you choose "Not in use", this means that the code will be requested when attempting to perform certain actions (see next chapter) with your phone. Making this selection does not remove the lock code from your device.
- You can then decide how many times one can try different codes to open the lock. Consider the best value in case your phone is in wrong hands; also consider the case where you cannot recall the code yourself.
Below we've selected the option "Unlimited":
With this setting we're allowing the lock code to be attempted an infinite amount of times with no risk of permanently locking the device. The device will unlock as soon as the correct unlock code is entered.
- The picture below shows the default settings after creating the lock code:
With these settings the device will begin asking for the lock code should the device not be used for 10 minutes, and there is no limitation to how many tries we have to enter the correct code. The device will also ask for the lock code when attempting to use functions described in the following chapter.
3 Functions that require entering lock code to use them
As explained in the previous chapter, you can set a lock code to your Jolla that is only asked when certain functions are used:
- Make changes to the Device Lock settings (note: there is no specific button to accept the changed settings - another lock code dialog appears, 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.
Please note: 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.
You have to "Clear security code" in Settings > System > Device lock in order to never be asked the code again:
4 Permanently locked devices
If your device is asking you for a lock 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 however 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. 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. Do not continue to chapter 3. Take option "#4 Shell" in the menu and 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 sed -i "/nemo\\\devicelock\\\maximum_attempts=/c\nemo\\\devicelock\\\maximum_attempts=-1" /mnt/usr/share/lipstick/devicelock/devicelock_settings.conf
Disconnect Jolla device from the computer and the battery from Jolla. Insert the battery and restart Jolla. Enter the security code when requested.
4.1 Some quick functions
Please read this article about locking and unlocking the screen faster with the Power key.