private void getLogcat(final Device device) {
        new Thread() {
            @Override
            public void run() {
                try {
                    final File ADB = adbController.getADB();
                    ProcessBuilder process = new ProcessBuilder();
                    List<String> args = new ArrayList<>();
                    args.add(ADB.getAbsolutePath());
                    args.add("-s");
                    args.add(device.getSerial());
                    args.add("logcat");
                    process.command(args);
                    process.redirectErrorStream(true);
                    Process pr = process.start();
                    BufferedReader reader = new BufferedReader(new InputStreamReader(pr.getInputStream()));
                    String line = null;
                    logcat_androidTextArea.setText("");
                    while (getLogcat && (line = reader.readLine()) != null) {
                        logcat_androidTextArea.append(line + "\n");
                    }
                } catch (IOException ex) {
                    logger.log(level.ERROR, "Error occurred while reading device's (" + device.getSerial() + ") logcat!\n\tError stack trace will be printed to console!");
                    JOptionPane.showMessageDialog(null, "ERROR: An error occurred while reading the device's (" + device.getSerial() + ") logcat.\n"
                            + "Please read the program's output and send the stack trace to the developer.", "Error Reading Logcat", JOptionPane.ERROR_MESSAGE);
                    ex.printStackTrace(System.err);
                    interrupt();
                }
                interrupt();
            }
        }.start();
    }