示例#1
0
  @Override
  protected ShellCommandResult doInBackground(Void... params) {

    String umountCommand = String.format("umount %s", mMountPoint);
    CommandCapture unmountCommand = new CommandCapture(0, umountCommand);
    ShellCommandResult result = null;

    try {
      RootTools.getShell(true).add(unmountCommand);
      unmountCommand.waitForFinish();
      Log.d(
          CLASS,
          String.format("umount [%d] %s", unmountCommand.exitCode(), unmountCommand.toString()));
      result = new ShellCommandResult(unmountCommand.exitCode(), unmountCommand.toString());
    } catch (Exception exception) {
      mError = exception;
      cancel(false);
    }

    return result;
  }