mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-23 18:15:30 +00:00
Add mount info to log file
This commit is contained in:
parent
e990ffd4a0
commit
2cbc048352
@ -21,6 +21,7 @@ import com.topjohnwu.magisk.view.TextItem
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.io.FileInputStream
|
||||
|
||||
class LogViewModel(
|
||||
private val repo: LogRepository
|
||||
@ -62,10 +63,12 @@ class LogViewModel(
|
||||
val logFile = MediaStoreUtils.getFile(filename, true)
|
||||
logFile.uri.outputStream().bufferedWriter().use { file ->
|
||||
file.write("---System Properties---\n\n")
|
||||
|
||||
ProcessBuilder("getprop").start()
|
||||
.inputStream.reader().use { it.copyTo(file) }
|
||||
|
||||
file.write("---System MountInfo---\n\n")
|
||||
FileInputStream("/proc/self/mountinfo").reader().use { it.copyTo(file) }
|
||||
|
||||
file.write("\n---Magisk Logs---\n")
|
||||
file.write("${Info.env.magiskVersionString} (${Info.env.magiskVersionCode})\n\n")
|
||||
file.write(consoleText)
|
||||
|
Loading…
Reference in New Issue
Block a user