@TargetApi(Build.VERSION_CODES.M) public static boolean enableChatty(boolean enabled) { try { Timber.d("Turn Chatty %s", (enabled ? "on" : "off")); String command = "logcat -P " + (enabled ? "\"~!\"" : "\"\""); Timber.d(command); Runtime.getRuntime().exec(command); return true; } catch (IOException e) { Timber.e(e, "Couldn't update chatty"); return false; } }