class AdbFileOperations {

  public ListenableFuture<List<String>> listPackages() {
    return myExecutor.executeAsync(() -> {
      String command = getCommand(null, "pm list packages").build();
      AdbShellCommandResult commandResult = AdbShellCommandsUtil.executeCommand(myDevice, command);
      commandResult.throwIfError();

      return commandResult.getOutput().stream()
        .map(AdbFileOperations::processPackageListLine)
        .filter(x -> !StringUtil.isEmpty(x))
        .collect(Collectors.toList());
    });
  }

  public  AdbFileOperations(@NotNull IDevice device, @NotNull AdbDeviceCapabilities deviceCapabilities, @NotNull Executor taskExecutor);

}