We have moved to a new Sailfish OS Forum. Please start new discussions there.
15

How to free up space on the device?

asked 2014-02-04 13:17:06 +0300

Wizah gravatar image

updated 2014-02-04 14:23:47 +0300

steph gravatar image

My Jolla is complaining about free space all the time and I know my Spotify playlists take up a huge portion of that but that's not what I would like to remove if there's something else that could be removed.

I can't seem to get a good overview on what can be done about the situation. I have deleted videos, mp3's and gone through all the folders that can be seen using Windows Explorer because I can't access it using Linux Mint other than via SSH. Usually I use WinDirStat/KDirStat or a similar app to find out what could be deleted but that's not possible with MTP I guess. It's pretty cumbersome to try to find out what /data/data/com. folders can be removed too. 16GB has already been consumed and I haven't got that may offline playlists. I have about 4 pages with apps but most of them are just really simple and small ones.

Can something be transferred to MicroSD if I get one? I'm not sure if a factory reset is the answer either. It could be a workaround for a month or two.

"There's an app for that". No there isn't.

I know this is kind of related to the MTP and USB Storage questions.

edit retag flag offensive close delete

Comments

1

Several things can be transferred to the μSD card and will be indexed by tracker hence available for things like the Media player. However, currently the card won't be exported via MTP so if you want to read/modify them you'll need to do it either via a file manager/command-line on the device or pull the card out and do it on a computer. Android access to the card may also pose another problem if that's important for you. All of these things I believe are going to be fixed with feature updates in the future.

steph ( 2014-02-04 14:23:06 +0300 )edit

I hope the CuteSpotify playlists can also be moved to MicroSD. That would solve my problems for a while. The main issue I guess is that I can't figure out what to move anymore. I have deleted everything I have except for a couple of photos and the CuteSpotify offline playlists. The Android apps I use aren't that important but they are nice to have around. About 50% Sailfish and 50% Android apps.

Wizah ( 2014-02-04 16:31:46 +0300 )edit

I have now removed pretty much everything except my apps and now the it says I've used 12.3GB/13.7GB which means that my apps consume in average about 120MB each ;) My guess is that I've got around 10GB of junk somewhere and I don't have a clue what it is. Seems like the factory reset option is getting closer. I wouldn't care to move that junk to an MicroSD card.

Wizah ( 2014-02-04 23:25:06 +0300 )edit
1

I'd assume that some app is stuffing your storage with log files or temporary data and does not clean up properly... whenever I wonder about disk usage in unix systems, I use du --max-depth=1 to get summarized disk usage for the current directory. Usually it takes just a few steps deeper into the file system to find the culprit. In developer mode, use the terminal app or SSH access to investigate. Switch to root user to inspect disk usage outside /home/nemo.

tokaru ( 2014-02-05 12:14:48 +0300 )edit

5 Answers

Sort by » oldest newest most voted
8

answered 2014-04-23 18:55:31 +0300

mosen gravatar image

Just wanted to promote native sailfishapp "Space Inspector" by Jens Klingen available from warehouse as solution. It does a perfect job of showing foldersizes in a map just like baobab on desktop linuxes. Nice to find that broken 1,6gig asphalt8.apk that stuck during install :D

edit flag offensive delete publish link more

Comments

1

Thanks, this was extremely useful for me (and the UI is very much like a desktop one).

WhyNotHugo ( 2015-01-26 02:02:06 +0300 )edit
1

it's not in warehouse it's in jolla store fyi

daywalker ( 2015-09-21 11:31:55 +0300 )edit
1

Seems it has moved since the post! Thanks for the correction!

mosen ( 2015-09-21 11:50:38 +0300 )edit
1

answered 2014-02-04 16:52:29 +0300

holgern gravatar image

updated 2014-02-05 14:49:09 +0300

I wrote a small script which bind some directories from the sdcard to /sdcard/data in order to save some space. My sdcard is ext4 but this should not matter... On my SDDisk i have a directory with a point e.g. .spotify and my script maps this to /sdcard/data/Spotify_dir

Content of bind_dirs.sh:

#!/bin/bash
SDCARD=$XDG_RUNTIME_DIR/media/sdcard/
dir1=/data/sdcard/Android/data/com.spotify.mobile.android.ui/files/spotifycache/Storage
#cutespotfy:
#dir1 = /home/nemo/.local/share/harbour-cutespotify/Storage
if mount | grep "on ${dir1} type" > /dev/null
then
umount $dir1
fi
mount -o bind $SDCARD.spotify $dir1

Here is also a script for more than one directory: bind_dirs2.sh:

#!/bin/bash
SDCARD=$XDG_RUNTIME_DIR/media/sdcard/
dir1=/data/sdcard/Android/data/com.spotify.mobile.android.ui/files/spotifycache/Storage
sddir1=.spotify
dir2=/data/sdcard/something
sddir2=.data/something
dir3= /home/nemo/.local/share/harbour-cutespotify/Storage
sddir3=.cutespotify
dir_array=($dir1 $dir2 $dir3)
sddir_array=($sddir1 $sddir2 $sddir3)
for ((i=0; i<${#dir_array[@]}; i++))
do
if mount | grep "on ${dir_array[$i]} type" > /dev/null
then
umount ${dir_array[$i]}
fi
mount -o bind $SDCARD${sddir_array[$i]} ${dir_array[$i]}
done

This script must be run as root in a terminal. It checks if the dir is already mounted, so it doesnt matter if the script is called twice. In order to give android write access to .spotify you have to do the following

devel-su
cd /run/user/100000/media/sdcard
mkdir .spotify
chmod 777 .spotify
mv {spotify_dir}/* .spotify
sh bind_dirs.sh

Before mounting the directory $dir1 in /data/sdcard should be empty. It is the best to move all content to .spotify.

The script has to be run every time the device was restarted.

edit flag offensive delete publish link more

Comments

Hi holgern, I have already used a 'link' command for my real SDcard so that 'sdcard' shows in Windows Explorer when I connect my Jolla to my PC. I used these commands; [cd ~] [ln -s /run/user/100000/media/sdcard] Would I be able to use your method without any conflict to the change I've made? Regards, (sorry, I don't know how to add 'command' in a separate comment box.)

Spam Hunter ( 2014-02-04 19:00:07 +0300 )edit

I did the same. This is not a problem. The problem is that 'links' do not work for /data/sdcard. The 'mount -o bind' links the content from one directory to the other. By doing this, android apps can access the SDCARD.

holgern ( 2014-02-04 19:16:50 +0300 )edit

That looks like a nice script but I hope this isn't what Jolla recommends users to do ;) I'll try it some other time when I have found what's consuming all my storage space.

Wizah ( 2014-02-04 23:27:10 +0300 )edit

please use system variables in your scripts where applicable (microSD mountpoint for example is $XDG_RUNTIME_DIR/media/sdcard/) instead of hard links

chemist ( 2014-02-05 13:48:19 +0300 )edit
1

answered 2014-02-05 12:48:44 +0300

vbregier gravatar image

I can't access it using Linux Mint other than via SSH

I recommend the excellent baobab from your linux, then.

It can analyze the disk space of a distant folder via ssh (Analyzer -> Scan Remote Folder -> Service type: SSH), and displays disk usage of subdirectories in a nice graphical chart, so you can easily see what takes up most of the disk space. And you can navigate into the subdirectories to investigate further.

edit flag offensive delete publish link more
0

answered 2014-02-05 12:15:12 +0300

melg01 gravatar image

updated 2014-02-05 14:21:25 +0300

The workaround (not the perfect solution) for accessing your Micro SD card from any Windows PC through USB cable connection is described in the above comment from @Markkybox and in other questions at this website. Because I can't promote his comment to an answer, here again the steps:

  • Connect a USB cable between your Jolla and your Windows PC. Your Jolla shows now the message "USB cable connected" --> select "PC connection". Your Jolla shortly displays an informational message "Sync and connect in use" (and then "charging")
  • Open Jollas Terminal. You don't have to change to devel-su user.
  • In the Terminal type the following commands:
bash-3.2$ cd ~ 
bash-3.2$ ln -s /run/user/100000/media/sdcard
  • You can verify the created link with a simple ls -la command, and the contents with ls -la sdcard
  • Close the Terminal and transfer files through the Windows Explorer to Sailfish\Phone Memory\sdcard

It works great for me, I have all my Music on a 32 GB Micro SD card (FAT32 formatted from vendor) and the mediaplayer recognizes it. Sometimes there seems to be a glitch that prevents Jolla from seeing the sdcard though. Don't panic, try one of the solutions described in other Questions on this website, or reboot your phone or try removing and reinserting the sdcard (hopefully they will resolve this annoyance).

For more advanced use of the sdcard from other apps, try the answer from @holgern. Although I very much hope Jolla would implement a better and general solution for selecting different kinds of storage (internal, sdcard, network share, cloud) from any app.

edit flag offensive delete publish link more
0

answered 2014-04-23 23:53:56 +0300

Badevil gravatar image

Hi, I solved my "problem" with the space and usage of Spotify more or less like the other guys here but without scripted binds and so on.

Filesystem                   Size  Used Avail Use% Mounted on
rootfs                       14G  2.6G   11G  19% /
/dev/mmcblk1p1               60G  3.1G   55G   6% /media/sdcard/73f2d18a-2ce8-4811-b061-1e21a1dcf212

I just moved the "Storage" folder to my card and created a soft link (ln -s /media/sdcard/73f2d18a-2ce8-4811-b061-1e21a1dcf212/.Spotify/Storage Storage)

[nemo@Jolla harbour-cutespotify]$ ll
total 16
drwxr-xr-x 1 nemo nemo  32 Apr 15 09:22 CuteSpotify
lrwxrwxrwx 1 nemo nemo  67 Apr 15 09:25 Storage -> /media/sdcard/73f2d18a-2ce8-4811-b061-1e21a1dcf212/.Spotify/Storage
drwxr-xr-x 1 nemo nemo  34 Apr 15 09:22 Users
-rw-r--r-- 1 nemo nemo 504 Apr 23 20:53 offline.bnk
-rw-r--r-- 1 nemo nemo 219 Apr 23 20:57 settings
-rw-r--r-- 1 nemo nemo 760 Apr 23 20:53 user-cache.bnk
[nemo@Jolla harbour-cutespotify]$ pwd
/home/nemo/.local/share/harbour-cutespotify

It works for me without any issue and is also no problem after reboot or something like that and I do not need to bind it every time.

I did the same with Pictures, Videos and so on under home. On the card I created there folders hidden to avoid the double count of the tracker, in this case I do not see all pictures and videos twice. As long as Jolla does not change the mount point of the sdcard there is no issue and if they do, so just have to correct the link and it is working again (you also have to correct to script so...).

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
10 followers

Stats

Asked: 2014-02-04 13:17:06 +0300

Seen: 3,298 times

Last updated: Mar 09 '18