0

My Android S5 is running out of internal storage. Issuing du reveals:

root@kltetmo:/ # df 
Filesystem               Size     Used     Free   Blksize
/dev                   846.4M    56.0K   846.3M   4096
/sys/fs/cgroup         846.4M    12.0K   846.4M   4096
/mnt/asec              846.4M     0.0K   846.4M   4096
/mnt/obb               846.4M     0.0K   846.4M   4096
/system                  2.3G   775.8M     1.6G   4096
/data                   11.4G     9.5G     1.9G   4096
/cache                 491.8M     8.1M   483.7M   4096
/firmware               77.0M     6.9M    70.1M   16384
/firmware-modem         64.0M    52.5M    11.5M   16384
/efs                    13.8M     4.3M     9.5M   4096
/mnt/shell/emulated     11.4G     9.5G     1.9G   4096
/mnt/media_rw/sdcard1    28.8G    16.0G    12.7G   32768
/mnt/secure/asec        28.8G    16.0G    12.7G   32768
/storage/sdcard1        28.8G    16.0G    12.7G   32768

On my old S2, I regularly cleared huge log files out of the /data/log/ directory, but...

root@kltetmo:/ # ll /data/log
ls: /data/log: No such file or directory

Here are the available folders in /data:

root@kltetmo:/data # ll
drwx------    2 root     root          4096 Apr 14  2014 adb
drwxrwxr-x    2 system   system        4096 Nov  4 13:21 anr
drwxrwx--x   72 system   system        4096 Nov  9 15:39 app
drwx------    2 root     root          4096 Apr 14  2014 app-asec
drwxrwx--x    2 system   system        4096 Apr 14  2014 app-lib
drwxrwx--x    2 system   system        4096 Apr 14  2014 app-private
drwxrws---    2 media    audio         4096 Apr 14  2014 audio
drwx------    6 system   system        4096 Nov  9 15:39 backup
drwxrws---    2 bluetoot bluetoot      4096 Apr 14  2014 bluetooth
lrwxrwxrwx    1 root     root            45 Apr 14  2014 bugreports -> /data/data/com.android.shell/files/bugreports
srwxrwx---    1 camera   camera           0 Nov  9 14:23 cam_socket2
srwxrwx---    1 camera   camera           0 Nov  9 14:23 cam_socket3
drwxrwx--x    2 system   system        4096 Apr 14  2014 connectivity
drwxrwx--x    4 root     root          4096 Jan  1  2014 dalvik-cache
drwxrwx--x  169 system   system        8192 Nov  9 15:36 data
drwxr-x---    2 root     log           4096 Apr 14  2014 dontpanic
drwxrwx---    3 drm      drm           4096 Jan  1  2014 drm
drwxrwx--x    2 system   system        4096 Apr 14  2014 fota
drwxr-x--x    3 root     root          4096 Apr 14  2014 local
drwxrwx---    2 root     root          4096 Apr 14  2014 lost+found
drwxrwxr-x    6 1023     1023          4096 Jul 11  2015 media
drwxrwx---    3 1031     1031          4096 Jul 11  2015 mediadrm
drwxrwx--t   22 system   misc          4096 Apr 14  2014 misc
drwx------    3 1027     1027          4096 Jan  1  2014 nfc
drwx------    2 root     root          4096 Nov  9 14:23 property
drwxrwx--x    3 system   system        4096 Jul  6 03:45 resource-cache
drwx--x--x    2 system   system        4096 Apr 14  2014 security
drwxr-xr-x    2 system   system        4096 Apr 14  2014 shared
drwxrwxr-x   19 system   system        4096 Nov  9 15:45 system
drwx------    2 system   system        4096 Feb  2  2014 time
drwxrwx--x    7 system   system        4096 Mar 17  2016 tombstones
drwx--x--x    2 system   system        4096 Apr 14  2014 user

The largest file I could find in the /data directory is only 3.8M in size.

root@kltetmo:/data # find /data -type f | sort -nr | head -11                                                                             
/data/tombstones/tombstone_09
/data/tombstones/tombstone_08
/data/tombstones/tombstone_07
/data/tombstones/tombstone_06
/data/tombstones/tombstone_05
/data/tombstones/tombstone_04
/data/tombstones/tombstone_03
/data/tombstones/tombstone_02
/data/tombstones/tombstone_01
/data/tombstones/tombstone_00
/data/time/time_log.5

root@kltetmo:/data # ll -h /data/tombstones/tombstone_09                                                                                  
-rw-------    1 system   system      3.8M Jul 25 12:33 /data/tombstones/tombstone_09

Also,

root@kltetmo:/ # du -d 1 -h /data | sort -nr
1016.0K /data/resource-cache
580.0K  /data/time
108.0K  /data/backup
36.0K   /data/property
31.1M   /data/tombstones
20.0K   /data/mediadrm
16.0K   /data/nfc
12.0K   /data/drm
11.7M   /data/system
9.3G    /data
8.0K    /data/local
5.0G    /data/media
4.0K    /data/user
4.0K    /data/shared
4.0K    /data/security
4.0K    /data/lost+found
4.0K    /data/fota
4.0K    /data/dontpanic
4.0K    /data/connectivity
4.0K    /data/bluetooth
4.0K    /data/audio
4.0K    /data/app-private
4.0K    /data/app-lib
4.0K    /data/app-asec
4.0K    /data/adb
4.0K    /data/.ssh
2.3M    /data/anr
1.8M    /data/misc
1.6G    /data/data
1.3G    /data/dalvik-cache
1.3G    /data/app

Where is the bulk of the 9G worth of used space coming from?

4
  • Could you include the output of du -d 1 -h /data | sort -nr?
    – Grimoire
    Commented Nov 9, 2016 at 16:46
  • Added to question.
    – a coder
    Commented Nov 9, 2016 at 17:49
  • Now, as you can see, a huge part of the 9GB you mentioned lies in the /data/media directory. Your best way to handle this, would be to focus on that directory and use the same du -d 1 -h <PATH> | sort -nr to further inspect the culprit. Keep in mind that files in that directory may or may not be critical for the OS, so you should always investigate the file name before the deletion. Still, a size of 5GB for that directory is anomalous; mine is about 677MB, to say one.
    – Grimoire
    Commented Nov 9, 2016 at 18:11
  • That directory identifies the internal storage that's accessible to the user under the alias /storage/emulated/0, as well as the obb directory for the files of homonym extension, which consist of further app data.
    – Grimoire
    Commented Nov 9, 2016 at 18:18

0

You must log in to answer this question.