public bool modifyType(String src, String m) { mCmd.excuteCmdPull(Enums.AndroidPath.SYSTEM + Enums.UpdateFileName.BUILD_PROP); bool ret = mParse.modifyString(Enums.Path.BUILD, @"ro\.product\.model=" + src, "ro.product.model=" + m); if (ret == false) { return(false); } return(mCmd.excuteCmdUpdate(Enums.Path.BUILD, Enums.AndroidPath.SYSTEM + Enums.UpdateFileName.BUILD_PROP, Enums.LinuxPermission.RW_R_R)); }
private void buttonExBusybox_Click(object sender, EventArgs e) { bool adbState = mCmd.excuteCmdGetAdbState(); if (!adbState) { MessageBox.Show(Enums.Error.ADB, Enums.Title.ERROR); return; } bool state = mCmd.excuteCmdUpdate(PATH_SRC + Enums.ThirdAppFileName.BUSYBOX, Enums.AndroidPath.SYSTEM_BIN + Enums.ThirdAppFileName.BUSYBOX, Enums.LinuxPermission.RWX_RWX_RWX); if (state == false) { MessageBox.Show(Enums.Error.INSTALL, Enums.Title.ERROR); } }
private void updateSystem(Object obj) { CmdOption option = (CmdOption)obj; bool ret = true; option.calcSize(); if (mProgress != null) { mProgress.showProgress(option); } for (int i = 0; i < option.length; i++) { ret &= mCmd.excuteCmdUpdate(option.path[i], option.dst[i], option.permission[i]); option.state[i] = ret == true ? (int)Enums.WorkState.SUCC : (int)Enums.WorkState.ERROR; } mIntfResult.setResult(Enums.CmdType.UPDATE, ret); Thread.Sleep(1000); if (mProgress != null) { mProgress.dismissProgress(0); } }