diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/SettingsPreferenceFragment.kt b/mobile/src/main/java/be/mygod/vpnhotspot/SettingsPreferenceFragment.kt index 2ac751a9..8e68f6cc 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/SettingsPreferenceFragment.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/SettingsPreferenceFragment.kt @@ -99,8 +99,12 @@ class SettingsPreferenceFragment : PreferenceFragmentCompat() { |logcat -d """.trimMargin()) try { - out.write(RootSession.use { it.execQuiet(commands.toString(), true).out.joinToString("\n") } - .toByteArray()) + RootSession.use { + for (line in it.execQuiet(commands.toString(), true).out) { + out.write(line.toByteArray()) + out.write(10) // line break + } + } } catch (e: Exception) { e.printStackTrace(writer) writer.flush()