What kind of SD cards and formats are supported? Formatting and encrypting a card

Jolla Care -

This help article was renewed after publishing Sailfish 3.  OS version 3.0.0 brought improvements to formatting cards and the support for encrypting them. These new features do not work with earlier Sailfish OS versions. Please upgrade your device to the latest OS version.

 

1. Introduction

1.1. Compatible cards and formats

Sailfish OS supports microSD cards (SDHC cards) up to 32 GB of storage capacity in FAT32 and ext4 formats.

Sailfish OS can also handle SD cards with more storage capacity (64 GB, 128 GB, even more). These SDXC memory cards are typically sold in exFAT format which is not compatible with Sailfish OS. Therefore they must be formatted to ext4 before they can be used in Sailfish devices. Either the card is formatted on a computer before inserting it to a Sailfish device or else the user lets Sailfish to format it in menu page "Settings > Storage". Please bear in mind that formatting the card will wipe out all existing data from it.

Note that Windows and Mac computers are not able to show the contents of ext4 cards directly. However, if an ext4 card is inserted in a Sailfish device which is connected to a computer with USB using the media transfer mode (MTP), then the card and its contents is available for the file manager on the computer.

Inserting a card that is incompatible (e.g. in exFAT format) will lead to warning "The file system is incompatible. Formatting is needed" in in "Settings > Storage".

SD-unsupported.png

Some card brands or models may not be recognised by all Sailfish-driven devices.

This article is also valid for external storage device which can be connected with a special USB On-The-Go cable to your Sailfish device.

 

1.2. Terminology

The contents of an SD card can be protected by encrypting [1] it with Sailfish OS generation 3. The encryption method used by Sailfish OS is Linux Unified Key Setup (LUKS) [2].

An unencrypted card is automatically mounted [3] (opened for use) on the system when the device is turned on. After this, apps like Gallery can show the pictures and videos residing on the card. Camera app can be set to save pictures and video clips directly to the card.

An encrypted card must be unlocked by the user in "Settings > Storage" before it becomes available for the apps.

 

2. Formatting a card with Sailfish OS

Card operations are done in "Settings > Storage" menu. Tap and hold the memory card item - this makes the pop-up menu appear with appropriate commands in it.

There is currently no option for the user to choose which format to apply. Sailfish OS will format cards with 32 GB or less storage space to FAT32, and bigger cards to ext4.

Before proceeding to format a memory card, it must be first unmounted. This is done with command "Unmount" in the pop-up menu.

Limitations:

  •     You cannot use memory cards encrypted with Sailfish OS on your computer.
  •     You cannot use memory cards encrypted with a computer on Sailfish OS.

 

2.1. Formatting a memory card without encrypting it

The following sequence of 6 pictures shows how the formatting takes place. In this case we do not want to encrypt the card.  Note that you will need to unmount the card first (use command "Unmount" in the context menu of "Settings > Storage") after which the card appears as in the first picture below (alternatively, if the card has been formatted previously, there may be the nickname of the card in place of the ID code). Next, use the context menu again and select command "Format". The view of the 2nd picture below will appear.

 SD-card-noname-unmounted.jpg  SD-enter-card-name.jpg  SD-authorise.jpg

 SD-formatting-card.jpg  SD-card-formatted-unmounted.jpg  SD-card-ready.jpg

At the step shown in the 3rd picture you need to authenticate the process.  The actual formating is done in picture 4. As soon as you see the view of the 5th picture, tap and hold the memory card item and take "Mount" in the context menu - this makes the formatted card available for the apps and a view of the 6th picture appears. The card is now formatted and ready to be used.

2.2. Formatting and encrypting a memory card

The process of producing an encrypted and formatted card differs from mere formatting only in the 2nd picture below where one must define a password that will be needed when unlocking the encrypted card for use. In the 5th picture below the card has been formatted and encrypted. It needs be connected to the system with the "Mount" command of the pop-up menu, resulting in the view of the 6th picture. The card is ready to be used.

Encrypted cards can be formatted again only when they are in locked state. Formatting removes the encryption as the option to encrypt is intentionally not available in this case. After this the card is formatted but unencrypted.  You can then format it again with encryption, if needed.

It is not possible to encrypt a card without formatting it (i.e. without deleting the data).

 

 SD-card-noname-unmounted.jpg  SD-card-name-and-encr.jpg  SD-authorise.jpg

 SD-formatting-card.jpg  SD-unmounted-encrypted.png  SD-mounted-encrypted.png

 

2.3 Using an encrypted card

Every time you turn your Sailfish device on, you must unlock the encrypted memory card in "Settings > Storage" with command "Unlock" of the pop-up menu to make the card available for the applications (this command mounts the card automatically).  Without this the apps cannot "see" the card. For instance, Camera app cannot save pictures to the card, and Gallery app cannot present the pictures stored on the card.

As soon as the card is unlocked, it appears to the apps and the user in the same way as an unencrypted card. There is no difference in using an encrypted card compared to an unencrypted card from applications perspective.

The pictures below show the steps of unlocking an encrypted card:

SD-locked-unmounted-encrypted.png  SD-unlock.png  SD-authorise.png

SD-unlocked-mounted.png

 

Use the "Unmount" or "Lock" commands in the context menu of the card when you want to make the card and its content hidden from apps.

When a Sailfish device with an encrypted memory card in it is turned off, the card becomes locked up automatically.

 

3. Formatting an SD card to ext4 with Linux PC

It may not be possible to format all kinds of SD cards (especially those with high capacity) using Sailfish OS.  In such a case, formatting with a computer may help you out.

We recommend formatting the card to ext4 format using a Linux computer (or with PartitionGuru app, or similar, on Windows PC). Before doing this, please make sure that you know the device address of the card, so that you would not accidentally format a wrong card or disk.

 

Formatting with Linux:

The following commands should do it.  If your SD card is the only SD card on a Linux computer then it would probably appear as the device " /dev/mmcblk0p1 " which you can check with command

lsblk

It is good to run the "lsblk" command with and without the card inserted in the slot of the PC to ensure that you know how the card appears on the PC (by seeing the difference).

This is how to format an SD card to ext4:

umount /dev/mmcblk0p1
sudo mkfs.ext4 -L "
nickname" /dev/mmcblk0p1

 

4. Path to the SD card (Sailfish 3)

The path to the SD card (or the location of it) in Sailfish OS file system is as follows:

  • Symbolic link:
    /media/sdcard/<uuid>
  • Actual path:
    /run/media/nemo/<uuid> 

where <uuid> stand for a unique identifier of a card.

Both of the paths above can be used. Please update your File Browser app to the latest version from Jolla Store.

 

5. Moving data to/from the SD card

If you have a Windows or Linux PC, read this article.

If you have a Mac, read this article.

 

---------------------

[1] Encryption is the process of encoding a message or information in such a way that only authorized parties can access it and those who are not authorised cannot. 
Source: https://en.wikipedia.org/wiki/Encryption

[2] Linux Unified Key Setup (LUKS)
Source: https://en.wikipedia.org/wiki/Linux_Unified_Key_Setup

[3] Mounting is a process by which the operating system makes files and directories on a storage device  available for users and applications to access via the device file system.
Source: https://en.wikipedia.org/wiki/Mount_(computing)

 

 

Have more questions? Submit a request
Powered by Zendesk