安卓型号A26 Android版本4.0.4基带版本MTK6515内核修复基带工具 apk版本2.6.35.7 硬件版本 ss 10 GB v1.1玩植物大战僵尸2

安卓源码--修改存储大小 - 博客频道 - CSDN.NET
Github: lianghuiyong
lianghuiyong
分类:安卓源码
一、文件管理器apk
FileInfoAdapter.java
1、添加导包
import android.os.SystemProperties
import com.mediatek.common.storage.IStorageManagerEx
import com.mediatek.common.MediatekClassFactory
//change start
public String getSizeString(String sizeNum, float fsizeMult) {
String sizeStr = ""
int index = sizeNum.indexOf("G")
if (Float.parseFloat(sizeNum.substring(0, index)) & 32) {
float fsize = Float.parseFloat(sizeNum.substring(0, index)) / fsizeMult
if (String.valueOf(fsize).length() & 5) {
sizeStr = String.valueOf(fsize).substring(0, 5)
return sizeNum.replace(sizeNum.substring(0, index), sizeStr)
return sizeNum
//change end
private void setSizeText(TextView textView, FileInfo fileInfo) {
if (fileInfo.isDirectory()) {
if (MountPointManager.getInstance().isMountPoint(fileInfo.getFileAbsolutePath())) {
StringBuilder sb = new StringBuilder()
//change start
long freeSpace
String freeSpaceString
long totalSpace
String totalSpaces
float fsizeMult = Float.parseFloat(SystemProperties.get("ro.file.sizemult", "5.48"))
String status = fileInfo.getFileAbsolutePath()
IStorageManagerEx sm = MediatekClassFactory.createInstance(IStorageManagerEx.class)
boolean sdExist = sm.getSdSwapState()
//boolean sdExist = false
//sdExist = (Boolean)MediatekClassFactory.createInstance(IStorageManagerEx.class,
IStorageManagerEx.GET_SWAP_STATE)
if (sdExist) {
if (status.equals("/storage/sdcard1")) {
freeSpace = (long)(fileInfo.getFile().getTotalSpace() * fsizeMult-(fileInfo.getFile().getTotalSpace()-fileInfo.getFile().getFreeSpace()))
freeSpaceString = FileUtils.sizeToString(freeSpace)
totalSpace = (long)(fileInfo.getFile().getTotalSpace() * fsizeMult)
totalSpaces = FileUtils.sizeToString(totalSpace)
freeSpaceString = getSizeString(freeSpaceString, fsizeMult)
totalSpaces = getSizeString(totalSpaces, fsizeMult)
freeSpace = fileInfo.getFile().getFreeSpace()
freeSpaceString = FileUtils.sizeToString(freeSpace)
totalSpace = fileInfo.getFile().getTotalSpace()
totalSpaces = FileUtils.sizeToString(totalSpace)
if (status.equals("/storage/sdcard0")) {
freeSpace = (long)(fileInfo.getFile().getTotalSpace() * fsizeMult-(fileInfo.getFile().getTotalSpace()-fileInfo.getFile().getFreeSpace()))
freeSpaceString = FileUtils.sizeToString(freeSpace)
totalSpace = (long)(fileInfo.getFile().getTotalSpace() * fsizeMult)
totalSpaces = FileUtils.sizeToString(totalSpace)
freeSpaceString = getSizeString(freeSpaceString, fsizeMult)
totalSpaces = getSizeString(totalSpaces, fsizeMult)
freeSpace = fileInfo.getFile().getFreeSpace()
freeSpaceString = FileUtils.sizeToString(freeSpace)
totalSpace = fileInfo.getFile().getTotalSpace()
totalSpaces = FileUtils.sizeToString(totalSpace)
//change end
LogUtils.d(TAG, "setSizeText, file name = " + fileInfo.getFileName()
+ ",file path = " + fileInfo.getFileAbsolutePath())
LogUtils.d(TAG, "setSizeText, freeSpace = " + freeSpace + ",totalSpace = "
+ totalSpace)
sb.append(mResources.getString(R.string.free_space)).append(" ")
sb.append(freeSpaceString).append(" \n")
sb.append(mResources.getString(R.string.total_space)).append(" ")
sb.append(totalSpaces).append(" ")
textView.setText(sb.toString())
textView.setVisibility(View.VISIBLE)
// it is a directory
textView.setVisibility(View.GONE)
StringBuilder sb = new StringBuilder()
sb.append(mResources.getString(R.string.size)).append(" ")
sb.append(fileInfo.getFileSizeStr())
textView.setText(sb.toString())
textView.setVisibility(View.VISIBLE)
二、Setings.apk
StorageMeasurement.java
private void measureApproximateStorage(IMediaContainerService imcs) {
* M: MTK add reserve data feature on sd share load, so on the sd share load
* when calculating the internal storage
total size and avail size, use the
* external storage path(such as /sdcard/emulated/0) instead of it.
Intent intent = new Intent();
mStorageVolume = intent.getParcelableExtra(StorageVolume.EXTRA_STORAGE_VOLUME);
boolean sdExist = false;
IStorageManagerEx sm = MediatekClassFactory.createInstance(IStorageManagerEx.class);
if (FeatureOption.MTK_2SDCARD_SWAP && (mStorageVolume == null)) {
sdExist = sm.getSdSwapState();
if(mVolume != null) {
path = mVolume.getPath();
if(FeatureOption.MTK_SHARED_SDCARD) {
path = Environment.getLegacyExternalStorageDirectory().getPath();
path = Environment.getDataDirectory().getPath();
final long[] stats = imcs.getFileSystemStats(path);
if(mVolume!=null && sdExist == true && mVolume.getPath().toString().equals ("/storage/sdcard1")&&!((SystemProperties.get("ro.sdcard.size")).equals("0")))
Log.w(TAG, "ro.sdcard.size="+SystemProperties.get("ro.sdcard.size"));
mTotalSize = sdcard_size*1048576;
mAvailSize = sdcard_size*1048576-stats[0]+stats[1];
else if(mVolume!=null && sdExist == false && mVolume.getPath().toString().equals ("/storage/sdcard0")&&!((SystemProperties.get("ro.sdcard.size")).equals("0")))
mTotalSize = sdcard_size*1048576;
mAvailSize = sdcard_size*1048576-stats[0]+stats[1];
else if(path.toString().equals (Environment.getDataDirectory().getPath().toString())&&!((SystemProperties.get("ro.phone.size")).equals("0")))
Log.w(TAG, "ro.phone.size="+SystemProperties.get("ro.phone.size"));
mTotalSize = phone_size*1048576;
mAvailSize = phone_size*1048576-stats[0]+stats[1];
else if(!(FeatureOption.MTK_SHARED_SDCARD) && sdExist == true && path.toString().equals ("/storage/sdcard1"))
long eight_G = L;
mTotalSize = eight_G*4-L+L;
mAvailSize = mTotalSize-(stats[0]-stats[1]);
else if(!(FeatureOption.MTK_SHARED_SDCARD) && sdExist == false && path.toString().equals ("/storage/sdcard0"))
long eight_G = L;
mTotalSize = eight_G*4-L+L;
mAvailSize = mTotalSize-(stats[0]-stats[1]);
else if(FeatureOption.MTK_SHARED_SDCARD && sdExist == false && path.toString().equals ("/storage/sdcard0")&&!((SystemProperties.get("ro.phone.size")).equals("0")))
Log.w("lhy", "ro.phone.size="+SystemProperties.get("ro.phone.size"));
mTotalSize = phone_size*1048576;
mAvailSize = phone_size*1048576-stats[0]+stats[1];
Log.w(TAG, "2 stats[0]="+stats[0]);
mTotalSize = stats[0];
mAvailSize = stats[1];
} catch (Exception e) {
Log.w(TAG, "Problem in container service", e);
sendInternalApproximateUpdate();
三、alps\frameworks\base\core\java\android\os\StatFs.java文件
public class StatFs {
private StructStatVfs mS
* Construct a new StatFs for looking at the stats of the filesystem at
* {@code path}. Upon construction, the stat of the file system will be
* performed, and the values retrieved available from the methods on this
* path path in the desired file system to stat.
public StatFs(String path) {
mStat = doStat(path);
@Deprecated
public int getBlockCount() {
if (status.equals("/data")) {
return (int) (mStat.f_blocks * 4.5);
if (mStat.f_blocks & 1428256)
return (int) (890*1024);
return (int) mStat.f_
@Deprecated
public int getAvailableBlocks() {
if (status.equals("/data")) {
return (int) (mStat.f_bavail * 3.5);
if (mStat.f_bavail & 1428256)
return (int) (890*1024-(mStat.f_blocks-mStat.f_bavail)+48*1024);
return (int) mStat.f_
muyang_ren
排名:第15900名
(30)(27)(4)(7)(28)(3)(17)(9)下载作业帮***包
扫二维码下载作业帮
1.75亿学生的选择
我的手机为什么玩不了我的世界型号是K100 Android版本4.0.4 CPU信息MTK6589四核 基带版本MAUI.11AND.W11.50.AP.V52. 内核版本2.6.35.7root@bird-desktop#1Wed May 22 20;27;24 CST 2013 版本号12K27GB.A1.V3.
谦慕M涌愁l
你的安卓不支持CPU浮点运算,而MCPE要求必须支持,你可以进360优化大师的跑分看看,如果你的CPU浮点得分很低那就是不支持了,解决方法要么放弃要么换手机
?????????????????????????????????
为您推荐:
扫描下载二维码

参考资料

 

随机推荐