i try to use this code, from How to find the amount of free storage (disk space) left on Android?
File pathOS = Environment.getRootDirectory();//Os Storage
StatFs statOS = new StatFs(pathOS.getAbsolutePath());
long total_OS_memory=0;long free_OS_memory=0;
total_OS_memory= (statOS.getBlockCountLong()*statOS.getBlockSizeLong());
but size of Operting system not same with hardware on mobile.
On my phone value is 3.4 G, but when i use my code result is 1.17.
And this is compare between my real phone with my code result.
Name |Phone|MyCode
Total Storage |8 |5.81
System |3.4 |1.17
Internal Storage|4.64 |4.64
How to get operating sistem size in android?