如何使用su权限运行命令

时间:2016-04-28 21:55:01

标签: android

我试图挂载我的系统读写但我在运行命令时仍然获得权限被拒绝 busybox mount -o remount,rw / system from terminal

2 个答案:

答案 0 :(得分:0)

要以超级用户身份运行命令,请在其前面添加su

E.g。 su screenrecordsu dumpsys

答案 1 :(得分:0)

使用[Route("at/{project:int?}/step/{step:int?}")] [Route("at/{project:int?}")] [Route("at")] public ActionResult Index(int? project, int? step) { var m = new ATViewModel(); if (project.HasValue) { m.Project = project.Value; if (step.HasValue) { m.Step = step.Value; } else { m.Step = 33; //fake lookup; } } else { m.Project = 7; //fake lookup; m.Step = 33; //fake lookup; } return View(m); } 或运行import com.precurse.frameworks.mwf.util.StringUtil; import org.hibernate.jpa.criteria.CriteriaBuilderImpl; import org.hibernate.jpa.criteria.ParameterRegistry; import org.hibernate.jpa.criteria.compile.RenderingContext; import org.hibernate.jpa.criteria.expression.UnaryOperatorExpression; import org.hibernate.jpa.criteria.predicate.AbstractSimplePredicate; import javax.persistence.criteria.CriteriaBuilder; import java.io.Serializable; public class CommentPredicate extends AbstractSimplePredicate implements UnaryOperatorExpression<Boolean>, Serializable { private AbstractSimplePredicate operandExpression; public CommentPredicate( CriteriaBuilder criteriaBuilder, final String _comment) { super((CriteriaBuilderImpl) criteriaBuilder); this.operandExpression = new AbstractSimplePredicate((CriteriaBuilderImpl) criteriaBuilder) { @Override public void registerParameters(ParameterRegistry registry) { // do nothing } @Override public String render(boolean isNegated, RenderingContext renderingContext) { return "'" + StringUtil.escapeForSql(_comment) + "'"; } }; } @Override public AbstractSimplePredicate getOperand() { return operandExpression; } @Override public void registerParameters(ParameterRegistry registry) { // nothing to do } @Override public String render(boolean isNegated, RenderingContext renderingContext) { final String operator = isNegated ? " is null" : " is not null"; return getOperand().render(renderingContext) + operator; } } 命令更改终端权限。

示例:

sudo something