mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-30 13:36:12 +00:00
Update several scripts
- Update backup format as we might be patching multiple partitions - Update uninstaller to remove files in persist (sepolicy.rule) - Better handling for dtb/dtbo partition patching
This commit is contained in:
@@ -287,8 +287,10 @@ abstract class MagiskInstaller {
|
||||
protected fun flashBoot(): Boolean {
|
||||
if (!"direct_install $installDir $srcBoot".sh().isSuccess)
|
||||
return false
|
||||
if (!Info.keepVerity)
|
||||
"patch_dtbo_image".sh()
|
||||
arrayOf(
|
||||
"(KEEPVERITY=${Info.keepVerity} patch_dtb_partitions)",
|
||||
"run_migrations"
|
||||
).sh()
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ open class SplashActivity : Activity() {
|
||||
// Setup shortcuts
|
||||
Shortcuts.setup(this)
|
||||
|
||||
Shell.su("mm_patch_dtbo").submit {
|
||||
Shell.su("mm_patch_dtb").submit {
|
||||
if (it.isSuccess)
|
||||
Notifications.dtboPatched(this)
|
||||
}
|
||||
|
||||
@@ -29,11 +29,12 @@ class RootInit : Shell.Initializer() {
|
||||
job.add(context.rawResource(R.raw.nonroot_utils))
|
||||
}
|
||||
|
||||
job.add("mount_partitions",
|
||||
"get_flags",
|
||||
"run_migrations",
|
||||
"export BOOTMODE=true")
|
||||
.exec()
|
||||
job.add(
|
||||
"mount_partitions",
|
||||
"get_flags",
|
||||
"run_migrations",
|
||||
"export BOOTMODE=true"
|
||||
).exec()
|
||||
|
||||
Info.keepVerity = ShellUtils.fastCmd("echo \$KEEPVERITY").toBoolean()
|
||||
Info.keepEnc = ShellUtils.fastCmd("echo \$KEEPFORCEENCRYPT").toBoolean()
|
||||
|
||||
Reference in New Issue
Block a user