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?
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]
sm forget UUID
I'm not sure what theUUID
is. When I dosm 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 itsimport android.os.storage.IStorageManager
but I can't seem to find the code for thisIStorageManager
anywhere. – Sruly Mar 29 '19 at 01:56blkid
I get for my external SD card the same number that identifies the card under/storage
. When I tried using this number insm forget UUID
it didn't work. From what I read from the link you provided it seems this isn't the actualUUID
. How can I get theUUID
? The options given on that link didn't help me. As I mentionedblkid
gives me just the ID not theUUID
and there is no/dev/disk/by-uuid/
for me to runls -l
on. – Sruly Apr 01 '19 at 15:48