Esempio n. 1
0
 /// <summary>
 /// 设置ActiveAdmin
 /// </summary>
 /// <param name="cn">组件名</param>
 /// <param name="uid">UID,不填则将对全部用户起效</param>
 /// <param name="name">易读的别名(the human-readable organization name)</param>
 /// <exception cref="Exceptions.AdbShellCommandFailedException"></exception>
 public void SetProfileOwner(ComponentName cn, int?uid = null, string name = null)
 {
     SetProfileOwner(cn.ToString(), uid, name);
 }
Esempio n. 2
0
 /// <summary>
 /// 启动服务
 /// </summary>
 /// <param name="cn"></param>
 /// <param name="intent"></param>
 public void Start(ComponentName cn, Intent intent = null)
 {
     Executor.AdbShell(Device,
                       $"am startservice -n {cn.ToString()} {intent?.ToString()}")
     .ThrowIfShellExitCodeNotEqualsZero();
 }
Esempio n. 3
0
 /// <summary>
 /// 设置ActiveAdmin
 /// </summary>
 /// <param name="cn">组件名</param>
 /// <param name="uid">UID,不填则将对全部用户起效</param>
 /// <exception cref="Exceptions.AdbShellCommandFailedException"></exception>
 public void SetActiveAdmin(ComponentName cn, int?uid = null)
 {
     SetActiveAdmin(cn.ToString(), uid);
 }