Sure.
I tried the code on:
A Samsung S21 with Android 13.
Result:
View attachment 148405
With the code you found and converted by Erel I have the following result:
108 GB Total e 16 GB Free ( difference 3 GB )
A Samsung S7 Android 8.
Result:
View attachment 148406
With the code you found and converted by Erel I have the following result:
25 GB Total e 2.1 GB Free ( difference 3 GB )
So, the Free space is right for all device. The GB Total no, but i think
space occupied by system files