[android] Shell script in android code

Runtime runtime = Runtime.getRuntime();
try
{
	Process p = runtime.exec("df");
	BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
	String line = null;
	while ((line = br.readLine()) != null)
	{
		Log.i("MainActivity.java | onCreate", "|" + line + "|");
	}
	br.close();
}catch (Exception e)
{
	e.printStackTrace();
}

 

|Filesystem               Size     Used     Free   Blksize|
|/dev                   487.3M   128.0K   487.2M   4096|
|/sys/fs/cgroup         487.3M    12.0K   487.3M   4096|
|/mnt/asec              487.3M     0.0K   487.3M   4096|
|/mnt/obb               487.3M     0.0K   487.3M   4096|
|/system                639.8M   609.8M    29.9M   4096|
|/cache                 436.0M     7.4M   428.6M   4096|
|/data                    5.9G   914.4M     5.0G   4096|
|/storage/emulated      487.3M     0.0K   487.3M   4096|
|/storage/emulated/0      5.9G   914.4M     5.0G   4096|
|/storage/emulated/legacy     5.9G   914.4M     5.0G   4096|