How to get information about the occupied place of SD card?

I wrote the formula "$rm(fsused,"/sdcard/extsdcard")$MB" but got only "0 MB". Why? How to fix?

Up until Android 11, there was a way to do this using the command: $sh(ls -S -x /storage)

Since Android 11 this is no longer possible. But it could be, if the Kustom app requested full storage permissions. Right now it does not do that.

An alternative would be if Kustom offered a built-in global variable to get the path. There is a special API call in Android the returns the external SDcard path as opposed to the internal virtual SDcard.

Right now, the easiest thing to do is use an app, like ASUS FileManager, which reports the SD card path on the screen, and store it as a global variable. Incidentally, the SDcard path in Android 12 is /storage/ followed by the SD card ID, where the ID is usually 4 characters, a dash, and 4 more characters. e.g. "/storage/ABCD-1234"