Skip RO Update if an A/B Upgrade has been detected 70/268270/3
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Fri, 17 Dec 2021 15:24:59 +0000 (16:24 +0100)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Wed, 22 Dec 2021 12:53:14 +0000 (13:53 +0100)
Change-Id: Ie9f52fa4a207ab7dbf43a248ee87ac5505b94267

scripts/fota-init.sh

index b1de80fdcf002e347364d86ba565e54db30a965a..ec80554cd73e238d7e1440cd97764218899fdb3f 100755 (executable)
@@ -715,19 +715,20 @@ prepare_fakeroot() {
 get_partition_id
 prepare_fakeroot
 
-if [[ "${P_SLOT}" != "" ]]
-then
-       log "[Info] FOTA with A/B detected - jump to the ramdisk"
-       restore_all_partitions
-       jump_to_ramdisk
-fi
-
 if ! mount_partitions ; then
        umount_partitions
        log "[Error] Upgrade failed"
        do_reboot
 fi
 
+if [ "${P_SLOT}" != "" ]
+then
+       log "[Info] FOTA with A/B detected - skip RO update"
+
+       umount_partitions
+       exec /sbin/fus_rw-init
+fi
+
 # For debugging - It should be deleted on Release
 /sbin/agetty -l /bin/bash -n --keep-baud 115200,38400,9600 console linux &