I have seen the sm tool used a few places for example here.

The way I understand it, it is a storage management tool but I haven't been successful in finding any more info about it.

Where can I find more information on this tool?

  • 1
    See if you can understand the source code here: android.googlesource.com/platform/frameworks/base/+/master/cmds/…
    – Firelord
    Commented Nov 21, 2018 at 6:38
  • I'm not much familiar with code is there anything else available? Does Google/Android have info anywhere?
    – Sruly
    Commented Nov 21, 2018 at 11:34
  • 1
    @Firelord I started looking into the code link you gave. I'm looking to figure out how to use the command sm forget UUID I'm not sure what the UUID is. When I do sm forget all I do accomplish what I'm looking for but I'm not sure what other devices its forgetting in the process. The source shows that its import android.os.storage.IStorageManager but I can't seem to find the code for this IStorageManager anywhere.
    – Sruly
    Commented Mar 29, 2019 at 1:56
  • UUID is the identifier of a a storage device. go2linux.garron.me/linux/2010/09/uuid-linux-fstab-file-766
    – Firelord
    Commented Mar 29, 2019 at 7:28
  • 1
    @Firelord OK I took a look there but what I'm facing is that when I run blkid I get for my external SD card the same number that identifies the card under /storage. When I tried using this number in sm forget UUID it didn't work. From what I read from the link you provided it seems this isn't the actual UUID. How can I get the UUID? The options given on that link didn't help me. As I mentioned blkid gives me just the ID not the UUID and there is no /dev/disk/by-uuid/ for me to run ls -l on.
    – Sruly
    Commented Apr 1, 2019 at 15:48

1 Answer 1


The sm tool is not an Android tool, it's a linux shell command. Android devices have some shell commands located in /system/bin - the variety of these usually vary by version, OEM, and platform.

You can issue this adb command to see what tools are available:

adb shell ls system/bin

You can ask for help on each tool - for example, with sm:

$ adb shell sm -help
usage: sm list-disks [adoptable]
       sm list-volumes [public|private|emulated|all]
       sm has-adoptable
       sm get-primary-storage-uuid
       sm set-force-adoptable [true|false]
       sm set-virtual-disk [true|false]

       sm partition DISK [public|private|mixed] [ratio]
       sm mount VOLUME
       sm unmount VOLUME
       sm format VOLUME
       sm benchmark VOLUME
       sm fstrim

       sm forget [UUID|all]

       sm set-emulate-fbe [true|false]
  • 4
    Thanks for your answer. What I'm looking for is a little more info on the options for this command. I have already done the help but I'm still no clear on what all the options do, or how they work.
    – Sruly
    Commented Nov 21, 2018 at 0:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .