public static String execCommand(String... cmd) throws IOException {
    return new ShellCommand(cmd).run();
  }
@Test
  public void execCommandFail() throws Exception {
    String testString = "false";
    mExceptionRule.expect(ShellUtils.ExitCodeException.class);
    // run a command that guarantees to fail
    String result = ShellUtils.execCommand("bash", "-c", " " + testString);
    assertEquals(testString + "\n", result);
  }