diff --git a/app/src/main/java/com/topjohnwu/magisk/core/tasks/MagiskInstaller.kt b/app/src/main/java/com/topjohnwu/magisk/core/tasks/MagiskInstaller.kt index e8f8a7cd3..7cf897ad7 100644 --- a/app/src/main/java/com/topjohnwu/magisk/core/tasks/MagiskInstaller.kt +++ b/app/src/main/java/com/topjohnwu/magisk/core/tasks/MagiskInstaller.kt @@ -189,7 +189,7 @@ abstract class MagiskInstallImpl protected constructor( console.add("-- Extracting: $name") val extract = File(installDir, name) - decompressedStream().writeTo(extract) + extract.outputStream().use { decompressedStream().copyTo(it) } } else if (entry.name.contains("vbmeta.img")) { val rawData = decompressedStream().readBytes() // Valid vbmeta.img should be at least 256 bytes