查看各个分区空间大小命令
SuperBox:/ $ df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 897520 496 897024 1% /dev
tmpfs 897520 0 897520 0% /mnt
/dev/block/system 1523568 985660 521524 66% /system
/dev/block/cache 507848 552 496812 1% /cache
/dev/block/data 4527828 96912 4414532 3% /data
/dev/fuse 4527828 96912 4414532 3% /storage/emulated
执行dumpsys devicestoragemonitor,主要是会显示磁盘的使用状况
SuperBox:/ $ dumpsys devicestoragemonitor
Current DeviceStorageMonitor state:
mFreeMem=4.21 GB mTotalMemory=4.32 GB
mFreeMemAfterLastCacheClear=4.21 GB
mLastReportedFreeMem=4.21 GB mLastReportedFreeMemTime=-10s234ms
mLowMemFlag=false mMemFullFlag=false
mIsBootImageOnDisk=true mClearSucceeded=false mClearingCache=false
mMemLowThreshold=442 MB mMemFullThreshold=1.00 MB
mMemCacheStartTrimThreshold=332 MB mMemCacheTrimToThreshold=663 MB
freeStorageAndNotify 方法来清除所有app缓存信息