mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 07:57:39 +00:00
Retain PREINITDEVICE during A-only addon.d
This commit is contained in:
parent
a3f5918d25
commit
9b3896fd3d
@ -72,6 +72,12 @@ initialize() {
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
if ! $backuptool_ab; then
|
if ! $backuptool_ab; then
|
||||||
|
# Restore PREINITDEVICE from previous A-only partition
|
||||||
|
if [ -f config.orig ]; then
|
||||||
|
PREINITDEVICE=$(grep_prop PREINITDEVICE config.orig)
|
||||||
|
rm config.orig
|
||||||
|
fi
|
||||||
|
|
||||||
# Wait for post addon.d-v1 processes to finish
|
# Wait for post addon.d-v1 processes to finish
|
||||||
sleep 5
|
sleep 5
|
||||||
fi
|
fi
|
||||||
@ -128,7 +134,15 @@ case "$1" in
|
|||||||
# Stub
|
# Stub
|
||||||
;;
|
;;
|
||||||
pre-backup)
|
pre-backup)
|
||||||
# Stub
|
# Back up PREINITDEVICE from existing partition before OTA on A-only devices
|
||||||
|
if ! $backuptool_ab; then
|
||||||
|
initialize
|
||||||
|
RECOVERYMODE=false
|
||||||
|
find_boot_image
|
||||||
|
$MAGISKBIN/magiskboot unpack "$BOOTIMAGE"
|
||||||
|
$MAGISKBIN/magiskboot cpio ramdisk.cpio "extract .backup/.magisk config.orig"
|
||||||
|
$MAGISKBIN/magiskboot cleanup
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
post-backup)
|
post-backup)
|
||||||
# Stub
|
# Stub
|
||||||
|
Loading…
x
Reference in New Issue
Block a user