mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-31 01:48:57 +00:00
Better handling of data encryption
This commit is contained in:
@@ -11,6 +11,7 @@ import com.topjohnwu.superuser.ShellUtils.fastCmd
|
||||
import com.topjohnwu.superuser.internal.UiThreadHandler
|
||||
import java.io.FileInputStream
|
||||
import java.io.IOException
|
||||
import java.util.*
|
||||
|
||||
val isRunningAsStub get() = Info.stub != null
|
||||
|
||||
@@ -27,13 +28,14 @@ object Info {
|
||||
var remote = UpdateInfo()
|
||||
|
||||
// Device state
|
||||
var crypto = ""
|
||||
@JvmStatic var isSAR = false
|
||||
@JvmStatic var isAB = false
|
||||
@JvmStatic val isFBE get() = crypto == "file"
|
||||
@JvmStatic val isFDE get() = crypto == "block"
|
||||
@JvmStatic var ramdisk = false
|
||||
@JvmStatic var hasGMS = true
|
||||
@JvmStatic var crypto = ""
|
||||
@JvmStatic var isPixel = false
|
||||
@JvmStatic val cryptoText get() = crypto.capitalize(Locale.US)
|
||||
|
||||
val isConnected by lazy {
|
||||
ObservableBoolean(false).also { field ->
|
||||
|
||||
@@ -24,7 +24,7 @@ class InstallViewModel(
|
||||
) : BaseViewModel(State.LOADED) {
|
||||
|
||||
val isRooted = Shell.rootAccess()
|
||||
val skipOptions = Info.ramdisk && Info.isFBE && Info.isSAR
|
||||
val skipOptions = Info.ramdisk && !Info.isFDE && Info.isSAR
|
||||
|
||||
@get:Bindable
|
||||
var step = if (skipOptions) 1 else 0
|
||||
|
||||
Reference in New Issue
Block a user