Support PATCHVBMETAFLAG env variable

This commit is contained in:
vvb2060
2021-12-15 03:37:52 +08:00
committed by John Wu
parent b2cd24ed1b
commit fd7bf2bc3a
9 changed files with 39 additions and 7 deletions
@@ -1,6 +1,7 @@
package com.topjohnwu.magisk.ui.install
import android.net.Uri
import android.os.Build
import androidx.databinding.Bindable
import androidx.lifecycle.viewModelScope
import com.topjohnwu.magisk.BR
@@ -26,11 +27,11 @@ class InstallViewModel(
) : BaseViewModel() {
val isRooted = Shell.rootAccess()
val skipOptions = Info.isEmulator || (Info.ramdisk && !Info.isFDE && Info.isSAR)
val skipOptions = Info.ramdisk && !Info.isFDE && Info.isSAR && !(!Info.vbmeta && Build.VERSION.SDK_INT >= 30)
val noSecondSlot = !isRooted || Info.isPixel || Info.isVirtualAB || !Info.isAB || Info.isEmulator
@get:Bindable
var step = if (skipOptions) 1 else 0
var step = if (Info.isEmulator || skipOptions) 1 else 0
set(value) = set(value, field, { field = it }, BR.step)
var _method = -1