Adjust for sos-4.x

Change-Id: I7e73d4d5f04ab60d6718635c3d8a53b8d1179906
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
diff --git a/Android.mk b/Android.mk
index e8aadb2..68405a5 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2020 SHIFT GmbH
+# Copyright (C) 2020-2022 SHIFT GmbH
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -15,22 +15,25 @@
 #
 
 LOCAL_PATH := $(call my-dir)
+
 include $(CLEAR_VARS)
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_USE_AAPT2 := true
-
 LOCAL_PACKAGE_NAME := SHIFT-PartnerCustomization
+LOCAL_MODULE_OWNER := shift
+LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+LOCAL_SYSTEM_EXT_MODULE := true
+LOCAL_CERTIFICATE := platform
+LOCAL_SDK_VERSION := current
 
 # Override GMS sample integration packages
 LOCAL_OVERRIDES_PACKAGES := \
+    AndroidSGmsBetaOverlay \
     GmsSampleIntegration \
     GmsEEAType4cIntegration \
 
-LOCAL_AAPT_FLAGS := --auto-add-overlay
-
-LOCAL_SDK_VERSION := current
+# Override Lineage wallpapers
+LOCAL_OVERRIDES_PACKAGES += \
+    Backgrounds \
 
 include $(BUILD_PACKAGE)
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 5fb5e51..5c097d3 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,5 +1,5 @@
 <!--
-  Copyright (C) 2020 SHIFT GmbH
+  Copyright (C) 2020-2022 SHIFT GmbH
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -15,17 +15,18 @@
   -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
-    package="com.shiftos.partner.customization">
+    package="eco.shift.partner.customization">
 
     <application android:label="@string/app_name">
-
-        <receiver android:name=".LauncherCustomizationReceiver">
+        <receiver android:name=".LauncherCustomizationReceiver"
+                  android:exported="true">
             <intent-filter>
                 <action android:name="com.android.launcher3.action.PARTNER_CUSTOMIZATION" />
             </intent-filter>
         </receiver>
 
-        <receiver android:name=".SuwCustomizationReceiver">
+        <receiver android:name=".SuwCustomizationReceiver"
+                  android:exported="true">
             <intent-filter>
                 <action android:name="com.android.setupwizard.action.PARTNER_CUSTOMIZATION" />
             </intent-filter>
diff --git a/res/raw/portal_optional_actions.xml b/res/raw/portal_optional_actions.xml
new file mode 100644
index 0000000..b6c328e
--- /dev/null
+++ b/res/raw/portal_optional_actions.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<array
+    xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <action android:category="com.android.settings.suggested.category.EMAIL" />
+
+    <!-- Increase font-size, display size etc -->
+    <action android:category="com.android.settings.suggested.category.DISPLAY_SETTINGS" />
+
+    <!-- For things like change wallpaper -->
+    <action android:category="com.android.settings.suggested.category.PERSONALIZE"
+            android:isRepeatable="true" />
+
+    <action android:category="com.android.settings.suggested.category.PAI" />
+
+    <action android:category="com.android.settings.suggested.category.LOCK_SCREEN_REDACTION" />
+
+    <!-- Action to enroll more fingerprints, even if existing lock screen is set -->
+    <action android:category="com.android.settings.suggested.category.FINGERPRINT_ENROLL" />
+
+</array>
diff --git a/res/raw/suggested_actions.xml b/res/raw/suggested_actions.xml
index c30cc42..1aa0160 100644
--- a/res/raw/suggested_actions.xml
+++ b/res/raw/suggested_actions.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <array
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:suw="http://schemas.android.com/apk/res/com.google.android.setupwizard">
+    xmlns:suw="http://schemas.android.com/apk/res-auto">
 
     <action android:category="com.android.settings.suggested.category.EMAIL" />
 
diff --git a/res/raw/wizard_script.xml b/res/raw/wizard_script.xml
index 108fab2..75bf67a 100644
--- a/res/raw/wizard_script.xml
+++ b/res/raw/wizard_script.xml
@@ -32,6 +32,9 @@
         <result wizard:name="dpm_user_complete"
             wizard:resultCode="111"
             wizard:action="check_user_unlock_dpm_user_complete" />
+        <result wizard:name="dpm_profile_complete"
+            wizard:resultCode="112"
+            wizard:action="check_user_unlock_dpm_user_complete" />
         <result wizard:name="check_user_unlock_work_setup_interrupted_qr_scan"
             wizard:resultCode="114"
             wizard:action="check_user_unlock_work_setup_interrupted_qr_scan" />
@@ -144,57 +147,91 @@
 
     <!-- Network selection and packages update [REQUIRED, CUSTOMIZABLE] -->
     <WizardAction id="connect_and_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_connect_and_update_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_connect_and_update_flow">
         <result wizard:name="no_connection"
             wizard:resultCode="1"
             wizard:action="no_network_flow" />
     </WizardAction>
 
-
-    <!-- Zero touch provisioning (for enterprise) [RECOMMENDED] -->
+    <!-- Zero touch provisioning (for enterprise). This feature depends on Android Checkin and Early update. Place this action after Android Checkin and Early update, but before restore. [REQUIRED]. -->
     <WizardAction id="zero_touch"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_zero_touch_flow" >
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_zero_touch_flow" >
         <result wizard:name="dpm_user_complete"
             wizard:resultCode="111"
             wizard:action="post_dpm_user_flow" />
-        <result wizard:name="add_personal_account"
+        <!-- The restore flow would be set to cloud for COPE devices if the result code returned the adding personal account. -->
+        <result wizard:name="add_personal_account_after_work_profile"
             wizard:resultCode="120"
-            wizard:action="add_personal_account" />
+            wizard:action="add_personal_account_after_work_profile" />
+        <result wizard:name="financed_device_provisioning_complete"
+            wizard:resultCode="121"
+            wizard:action="setup_as_new_flow" />
+        <result wizard:name="work_profile_setup"
+            wizard:resultCode="122"
+            wizard:action="work_profile_setup" />
+        <result wizard:name="device_owner_setup"
+            wizard:resultCode="123"
+            wizard:action="post_dpm_user_flow" />
+        <!-- GmsCore will handle ZeroTouch. Go to setup_as_new flow, it will handle ZeroTouch and FRP -->
+        <result wizard:name="gmscore_zero_touch"
+            wizard:resultCode="116"
+            wizard:action="setup_as_new_flow"/>
     </WizardAction>
 
 
     <!-- Restore from an existing account or device [RECOMMENDED, CUSTOMIZABLE] -->
     <WizardAction id="unified_restore_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_unified_restore_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_unified_restore_flow">
         <result wizard:action="oem_post_setup" />
     </WizardAction>
 
+    <WizardAction id="work_profile_setup"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_post_dpm_provision_finalization_flow">
+        <result wizard:action="transition_to_personal_profile_setup" />
+    </WizardAction>
 
     <!-- Set up without a network connection [RECOMMENDED] -->
     <WizardAction id="no_network_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_no_network_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_no_network_flow">
         <result wizard:action="oem_post_setup" />
     </WizardAction>
 
+    <WizardAction id="transition_to_personal_profile_setup"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.TRANSITION_TO_PERSONAL_PROFILE_SETUP;end">
+        <result wizard:action="add_personal_account_after_work_profile" />
+    </WizardAction>
+
     <!-- Add personal account after work profile provisioning [REQUIRED] -->
-    <WizardAction id="add_personal_account"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_add_personal_account_flow" />
+    <WizardAction id="add_personal_account_after_work_profile"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_account_flow">
+        <result wizard:action="oem_post_setup" />
+    </WizardAction>
+
+    <!-- Setup as new [REQUIRED] -->
+    <WizardAction id="setup_as_new_flow" wizard:flow="SetupAsNewFlow"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_account_flow">
+        <result wizard:action="oem_post_setup" />
+    </WizardAction>
 
     <!-- Flow to run after a user-led device policy managed setup. [RECOMMENDED] -->
     <WizardAction id="post_dpm_user_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_post_dpm_user_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_post_dpm_user_flow">
         <result wizard:action="oem_post_setup" />
     </WizardAction>
 
     <!-- QR provision flow (for enterprise) [RECOMMENDED] -->
     <WizardAction id="qr_provision_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_qr_provision_flow" />
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_qr_provision_flow" />
 
 
     <!-- OEM completion [CUSTOMIZABLE] -->
     <WizardAction id="oem_post_setup"
         wizard:uri="intent:#Intent;action=com.android.setupwizard.OEM_POST_SETUP;end" />
 
+    <!-- Enterprise provisioning finalization flow. Required only in init setup flow. [REQUIRED] -->
+    <WizardAction id="enterprise_finalization_flow"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_post_dpm_provision_finalization_flow">
+    </WizardAction>
 
     <!-- Google kid account setup. Must be the last setup action. [REQUIRED] -->
     <WizardAction id="kid_post_setup"
@@ -206,3 +243,4 @@
         wizard:uri="intent:#Intent;action=com.android.setupwizard.EXIT;end" />
 
 </WizardScript>
+
diff --git a/res/raw/wizard_script_account_flow.xml b/res/raw/wizard_script_account_flow.xml
index a1fa45b..79550c1 100644
--- a/res/raw/wizard_script_account_flow.xml
+++ b/res/raw/wizard_script_account_flow.xml
@@ -4,201 +4,132 @@
     for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
     <intent> tag processed by Intent.parseIntent() does not.
 
+    The wizard action added wizard:ifLifecycle="default" will only be launched during initial setup.
+    It will be skipped during deferred setup. Conversely, if the action defined
+    wizard:ifLifecycle="deferred", it will only be launched during deferred setup.
+
     adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
 -->
 <WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
     wizard:version="2">
 
-    <!-- Restore apps from another device [RECOMMENDED] -->
-    <!-- Check to see if we already know which device is being restored onto this one -->
-    <WizardAction id="restore_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.CHECK_RESTORE_TOKEN;end">
-        <result wizard:name="token_not_found"
-            wizard:resultCode="101"
-            wizard:action="restore_picker" />
-        <result wizard:name="choose_what_to_restore"
-            wizard:resultCode="102"
-            wizard:action="choose_what_to_restore" />
-        <result wizard:action="restore_start" />
-    </WizardAction>
-
-    <!-- Choose what to restore. If restore token was not provided, also choose which backup set to restore from -->
-    <WizardAction id="choose_what_to_restore"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.CHOOSE_WHAT_TO_RESTORE;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="date_time_check" />
-        <result wizard:name="no_content"
-            wizard:resultCode="2"
-            wizard:action="date_time_check" />
-        <result wizard:action="restore_start" />
-    </WizardAction>
-
-    <!-- Select a device to serve as the source for restored apps and start restoring -->
-    <WizardAction id="restore_picker"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.RESTORE;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="date_time_check" />
-        <result wizard:name="no_content"
-            wizard:resultCode="2"
-            wizard:action="date_time_check" />
-    </WizardAction>
-
-    <WizardAction id="restore_start"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.START_RESTORE;end" />
-
-
     <!-- Start eSIM fallback setup flow when eSIM setup failed before [RECOMMENDED] -->
-    <WizardAction id="esim_setup_fallback"
+    <WizardAction id="esim_setup_fallback" wizard:ifFlow="SetupAsNewFlow"
         wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=2;end" />
 
-
-    <!-- Set date, time, and time zone from automated services (or manually, if needed) [RECOMMENDED, CUSTOMIZEABLE] -->
-    <WizardAction id="date_time_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.DATE_TIME_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="save_user_name" />
+    <!-- Get current resotre flow [RECOMMENDED] -->
+    <WizardAction id="get_current_restore_flow"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GET_RESTORE_FLOW;end">
+        <result wizard:name="load_account_intent_for_device_flow"
+            wizard:resultCode="105"
+            wizard:action="load_account_intent_for_device_flow" />
+        <result wizard:action="load_account_intent_for_account_flow" />
     </WizardAction>
 
-    <WizardAction id="date_time"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.DATE_TIME;end" />
+    <!-- Add an account for restore with device flow [REQUIRED] -->
+    <WizardAction id="load_account_intent_for_device_flow"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=true;end">
+        <result wizard:action="account_setup" />
+    </WizardAction>
 
+    <!-- Add an account [REQUIRED] -->
+    <WizardAction id="load_account_intent_for_account_flow"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end" />
 
-    <!-- Save the user name from the account to the OS profile [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="save_user_name"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SAVE_USER_NAME;end" />
-
-
-    <!-- Show service opt-ins, as well as terms of service [REQUIRED] -->
-    <WizardAction id="google_services"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
+    <WizardAction id="account_setup"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
+        <result wizard:name="skip"
+            wizard:resultCode="1"
+            wizard:action="no_account_flow" />
         <result wizard:name="unintentional_cancel"
             wizard:resultCode="102"
             wizard:action="rollback_auth_early_update" />
-        <result wizard:action="search_selector" />
+        <!-- Alternate flow if managed provisioning already set the user up (for enterprise) [RECOMMENDED] -->
+        <result wizard:name="dpm_user_complete"
+            wizard:resultCode="111"
+            wizard:action="post_dpm_user_flow" />
+        <result wizard:name="work_profile_setup"
+            wizard:resultCode="122"
+            wizard:action="work_profile_setup" />
+        <result wizard:name="device_owner_setup"
+            wizard:resultCode="123"
+            wizard:action="post_dpm_user_flow" />
+        <result wizard:action="gms_account_checkin" />
     </WizardAction>
 
     <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
     <WizardAction id="rollback_auth_early_update"
-        wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="google_services" />
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        <result wizard:action="get_current_restore_flow" />
     </WizardAction>
 
-    <!-- Show search selector screen [REQUIRED] -->
-    <WizardAction id="search_selector"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
-    </WizardAction>
-
-
-    <!-- Start eSIM setup flow with account [RECOMMENDED] -->
-    <WizardAction id="esim_setup"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=4;end" />
-
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="biometric"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="personalization_flow" />
-    </WizardAction>
-
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="lock_screen"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
-
-
-    <!-- Common set of customization steps [RECOMMENDED] -->
-    <WizardAction id="personalization_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_common_personalization_flow">
-        <result wizard:action="AFTER_PERSONALIZATION" />
-    </WizardAction>
-
-
-    <WizardAction id="AFTER_PERSONALIZATION" />
-
-
-    <!-- Wait for data restoration to finish [RECOMMENDED] -->
-    <WizardAction id="restore_progress"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.RESTORE_PROGRESS;end">
-        <result wizard:name="retry"
-            wizard:resultCode="2"
-            wizard:action="restore_reset" />
-        <result wizard:name="skipped"
-            wizard:resultCode="102"
-            wizard:action="restore_finish" />
-        <result wizard:action="work_profile_setup" />
-    </WizardAction>
-
-    <!-- If data restoration failed and user chose to retry, pick a new source device [RECOMMENDED] -->
-    <WizardAction id="restore_reset"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.REMOVE_RESTORE_TOKEN;end" />
-
-    <WizardAction id="restore_retry"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.RESTORE;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="final_hold" />
-        <result wizard:name="no_content"
-            wizard:resultCode="2"
-            wizard:action="final_hold" />
-    </WizardAction>
-
-    <WizardAction id="restore_retry_start"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.START_RESTORE;end">
-        <result wizard:action="restore_progress" />
-    </WizardAction>
-
-    <WizardAction id="restore_finish"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.RESTORE;B.handle_restore_errors=true;end" />
-
-
-    <!-- Offer users a chance to add work profile if they had one on previous device -->
     <WizardAction id="work_profile_setup"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.WORK_PROFILE_SETUP;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="final_hold" />
-        <result wizard:name="no_work_profile"
-            wizard:resultCode="104"
-            wizard:action="final_hold" />
-        <result wizard:name="add_work_profile"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
+        <result wizard:name="personal_accounts_added"
             wizard:resultCode="-1"
-            wizard:action="final_hold_before_work_setup" />
+            wizard:action="gms_account_checkin" />
+        <result wizard:action="work_profile_setup_post_dpm_provision" />
     </WizardAction>
 
-    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
-    <WizardAction id="final_hold"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" >
-        <result wizard:action="load_launcher_layout" />
+    <WizardAction id="work_profile_setup_post_dpm_provision"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_post_dpm_provision_finalization_flow">
+        <result wizard:action="transition_to_personal_profile_setup" />
     </WizardAction>
 
+    <WizardAction id="transition_to_personal_profile_setup"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.TRANSITION_TO_PERSONAL_PROFILE_SETUP;end">
+        <result wizard:action="load_account_intent_for_personal_account_setup" />
+    </WizardAction>
 
-    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
-    <WizardAction id="final_hold_before_work_setup"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;B.is_work_profile_setup=true;end" />
+    <!-- Add personal account after work profile provisioning [REQUIRED] -->
+    <WizardAction id="load_account_intent_for_personal_account_setup"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end">
+        <result wizard:action="add_personal_account" />
+    </WizardAction>
 
-    <WizardAction id="load_work_account_intent"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end" />
-
-    <WizardAction id="account_setup"
+    <!-- Add an account [REQUIRED] -->
+    <WizardAction id="add_personal_account"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;B.allowMultipleAccounts=true;end">
         <result wizard:name="unintentional_cancel"
             wizard:resultCode="102"
-            wizard:action="work_rollback_auth_early_update" />
-        <result wizard:action="load_launcher_layout" />
+            wizard:action="personal_profile_rollback_auth_early_update" />
+        <result wizard:action="gms_account_checkin" />
     </WizardAction>
 
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="work_rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="load_work_account_intent" />
+    <WizardAction id="personal_profile_rollback_auth_early_update"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        <result wizard:action="transition_to_personal_profile_setup" />
     </WizardAction>
 
-    <!-- Wait for launcher layout to load [RECOMMENDED] -->
-    <WizardAction id="load_launcher_layout"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_LAUNCHER_LAYOUT;end" />
+    <!-- Checkin with Gservices using account. [REQUIRED] -->
+    <WizardAction id="gms_account_checkin"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end">
+        <result wizard:name="skip"
+            wizard:resultCode="1"
+            wizard:action="no_account_flow" />
+    </WizardAction>
+
+
+    <!-- Set up with an account [REQUIRED] -->
+    <WizardAction id="account_flow"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_post_account_flow">
+        <result wizard:action="END_OF_SCRIPT" />
+    </WizardAction>
+
+
+    <!-- Set up without an account [REQUIRED] -->
+    <WizardAction id="no_account_flow"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_no_account_flow">
+        <result wizard:action="END_OF_SCRIPT" />
+    </WizardAction>
+
+    <!-- Flow to run after a user-led device policy managed setup. [RECOMMENDED] -->
+    <WizardAction id="post_dpm_user_flow" wizard:ifLifecycle="default"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_post_dpm_user_flow">
+        <result wizard:action="END_OF_SCRIPT" />
+    </WizardAction>
+
+    <!-- Labeled end of script (for branching) [RECOMMENDED, CUSTOMIZABLE] -->
+    <WizardAction id="END_OF_SCRIPT" />
 
 </WizardScript>
diff --git a/res/raw/wizard_script_add_personal_account_flow.xml b/res/raw/wizard_script_add_personal_account_flow.xml
deleted file mode 100644
index 25f9659..0000000
--- a/res/raw/wizard_script_add_personal_account_flow.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <WizardAction id="load_personal_account"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;end" />
-    <WizardAction id="add_personal_account"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;B.allowMultipleAccounts=true;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <result wizard:name="dpm_user_profile_complete"
-            wizard:resultCode="112"
-            wizard:action="personal_account_gms_account_checkin" />
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="load_personal_account" />
-    </WizardAction>
-
-    <!-- Checkin with Gservices using account. [RECOMMENDED] -->
-    <WizardAction id="personal_account_gms_account_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
-
-    <!-- Show Google services opt-ins and Terms of Service [RECOMMENDED] -->
-    <WizardAction id="personal_account_dpm_google_services"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update_for_google_services" />
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update_for_google_services"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="personal_account_dpm_google_services" />
-    </WizardAction>
-
-    <WizardAction id="END_OF_SCRIPT" />
-</WizardScript>
diff --git a/res/raw/wizard_script_new_device_account_flow.xml b/res/raw/wizard_script_common_flow.xml
similarity index 65%
rename from res/raw/wizard_script_new_device_account_flow.xml
rename to res/raw/wizard_script_common_flow.xml
index 830a1cc..e7d1fb4 100644
--- a/res/raw/wizard_script_new_device_account_flow.xml
+++ b/res/raw/wizard_script_common_flow.xml
@@ -4,28 +4,31 @@
     for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
     <intent> tag processed by Intent.parseIntent() does not.
 
+    The wizard action added wizard:ifLifecycle="default" will only be launched during initial setup.
+    It will be skipped during deferred setup. Conversely, if the action defined
+    wizard:ifLifecycle="deferred", it will only be launched during deferred setup.
+
     adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
 -->
 <WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
     wizard:version="2">
 
-    <!-- Set date, time, and time zone from automated services (or manually, if needed) [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="date_time_check"
+    <!-- Set date, time, and time zone from automated services (or manually, if needed) [RECOMMENDED, CUSTOMIZEABLE] -->
+    <WizardAction id="date_time_check" wizard:ifLifecycle="default"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.DATE_TIME_CHECK;end">
         <result wizard:name="skip"
             wizard:resultCode="1"
             wizard:action="save_user_name" />
     </WizardAction>
 
-    <WizardAction id="date_time"
+    <WizardAction id="date_time" wizard:ifLifecycle="default"
         wizard:uri="intent:#Intent;action=com.android.setupwizard.DATE_TIME;end" />
 
 
     <!-- Save the user name from the account to the OS profile [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="save_user_name"
+    <WizardAction id="save_user_name" wizard:ifLifecycle="default"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SAVE_USER_NAME;end" />
 
-
     <!-- Show service opt-ins, as well as terms of service [REQUIRED] -->
     <WizardAction id="google_services"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
@@ -37,51 +40,32 @@
 
     <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
     <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
         <result wizard:action="google_services" />
     </WizardAction>
 
     <!-- Show search selector screen [REQUIRED] -->
-    <WizardAction id="search_selector"
+    <WizardAction id="search_selector" wizard:ifFlow="WithConnectionFlow"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
     </WizardAction>
 
-
     <!-- Start eSIM setup flow with account [RECOMMENDED] -->
     <WizardAction id="esim_setup"
         wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=4;end" />
 
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
+    <!-- Set up biometric screen lock. The action must precede the payments action [RECOMMENDED, CUSTOMIZABLE] -->
     <WizardAction id="biometric"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="personalization_flow" />
+            <result wizard:name="skip"
+                wizard:resultCode="1"
+                wizard:action="END_OF_SCRIPT" />
     </WizardAction>
 
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
+    <!-- Set screen lock options. The action must precede the payments action [RECOMMENDED, CUSTOMIZABLE] -->
     <WizardAction id="lock_screen"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
 
-
-    <!-- Common set of customization steps [RECOMMENDED] -->
-    <WizardAction id="personalization_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_common_personalization_flow">
-        <result wizard:action="AFTER_PERSONALIZATION" />
-    </WizardAction>
-
-
-    <WizardAction id="AFTER_PERSONALIZATION" />
-
-
-    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
-    <WizardAction id="final_hold"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" />
-
-
-    <!-- Wait for launcher layout to load [RECOMMENDED] -->
-    <WizardAction id="load_launcher_layout"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_LAUNCHER_LAYOUT;end" />
+    <!-- Labeled end of script (for branching) [RECOMMENDED, CUSTOMIZABLE] -->
+    <WizardAction id="END_OF_SCRIPT" />
 
 </WizardScript>
diff --git a/res/raw/wizard_script_common_personalization_flow.xml b/res/raw/wizard_script_common_personalization_flow.xml
index b775f0a..98a8d5f 100644
--- a/res/raw/wizard_script_common_personalization_flow.xml
+++ b/res/raw/wizard_script_common_personalization_flow.xml
@@ -13,7 +13,8 @@
     <WizardAction id="opa"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.OPA_OPT_IN;B.valuePropSkippable=true;end" />
 
-    <!-- Set up payment method [RECOMMENDED] -->
+    <!-- Set up payment method. Ensure at least one of the wizard actions biometric or lock_screen
+         must precede the payments action [RECOMMENDED] -->
     <WizardAction id="payment"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.PAYMENTS;end" />
 
diff --git a/res/raw/wizard_script_connect_and_update_flow.xml b/res/raw/wizard_script_connect_and_update_flow.xml
index 74d7fe1..d39a372 100644
--- a/res/raw/wizard_script_connect_and_update_flow.xml
+++ b/res/raw/wizard_script_connect_and_update_flow.xml
@@ -49,7 +49,6 @@
         <result wizard:action="network_settings" />
     </WizardAction>
 
-
     <!-- Network selection, Users must be given the opportunity to set up an internet connection,
         using the given screens or a custom flow. -->
     <WizardAction id="network_settings"
@@ -62,7 +61,7 @@
             wizard:action="wifi_settings" />
         <result wizard:name="skip"
             wizard:resultCode="1" />
-        <result wizard:action="captive_portal" />
+        <result wizard:action="consolidate_captive_portal" />
     </WizardAction>
 
     <!-- Network selection with eSIM setup, Users must be given the opportunity to set up an
@@ -77,13 +76,7 @@
             wizard:action="wifi_settings" />
         <result wizard:name="skip"
             wizard:resultCode="1" />
-        <result wizard:action="captive_portal" />
-    </WizardAction>
-
-    <!-- Mobile data activation -->
-    <WizardAction id="activate_mobile_data"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ACTIVATE_MOBILE_DATA;end">
-        <result wizard:action="captive_portal" />
+        <result wizard:action="consolidate_captive_portal" />
     </WizardAction>
 
     <!-- Wi-Fi setup -->
@@ -94,47 +87,57 @@
             wizard:action="activate_mobile_data" />
         <result wizard:name="skip"
             wizard:resultCode="1" />
-        <result wizard:action="captive_portal" />
+        <result wizard:action="consolidate_captive_portal" />
     </WizardAction>
 
-
-    <!-- Resolve captive portal access, and wait for check-in [REQUIRED] -->
-    <WizardAction id="captive_portal"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.CAPTIVE_PORTAL;end">
-        <result wizard:action="gms_checkin" />
+    <!-- Mobile data activation -->
+    <WizardAction id="activate_mobile_data"
+        wizard:uri="intent:#Intent;action=com.android.setupwizard.ACTIVATE_MOBILE_DATA;end">
+        <result wizard:action="consolidate_captive_portal" />
     </WizardAction>
 
-    <WizardAction id="gms_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_CHECKIN;end">
+    <!--
+        Resolve captive portal access, and wait for check-in [REQUIRED]
+        What this action do is same with "com.google.android.setupwizard.CAPTIVE_PORTAL".
+        The intent action on only used when the captive portal in front of GMS check-in.
+        We separate this intent action in order to have better user experience.
+    -->
+    <WizardAction id="consolidate_captive_portal"
+        wizard:uri="intent:#Intent;action=com.android.setupwizard.CONSOLIDATE_CAPTIVE_PORTAL;end">
         <result wizard:name="timeout"
             wizard:resultCode="101"
-            wizard:action="network_timeout" />
-        <result wizard:action="esim_setup" />
+            wizard:action="network_unavailable" />
+        <result wizard:action="pre_checkin_and_update" />
     </WizardAction>
 
+    <!--
+        GMS check-in and update flow. [REQUIRED]
 
-    <!-- Network or check-in timeout [REQUIRED] -->
-    <WizardAction id="network_timeout"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.NETWORK_TIMEOUT;end" />
+        PRE_CHECKIN_AND_UPDATE is the action including GMS check-in, ota-check and early update.
+        The ota update priority is higher than early-update, once ota update available, we leave
+        the activity and go to ota update flow. After the ota flow the device will reboot and
+        go throw the PRE_CHECKIN_AND_UPDATE flow again.
 
-    <!-- eSIM setup flow [RECOMMENDED] -->
-    <WizardAction id="esim_setup"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=3;end">
-        <result wizard:action="ota_update_check" />
-    </WizardAction>
+        The early update is including in this action when ota update unavailable, by the reason
+        we skip POST_CHECK_AND_UPDATE by default. Only when the users skip OTA update, we continue
+        with action POST_CHECKIN_AND_UPDATE to finish to early update flow. It ensure the device
+        run will updated GMS.
 
-
-    <!-- Update system image check [REQUIRED] -->
-    <WizardAction id="ota_update_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.OTA_UPDATE_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="early_update" />
-        <result wizard:action="ota_update" />
+        DO NOT CHANGE flow between PRE_CHECKIN_AND_UPDATE and POST_CHECKIN_AND_UPDATE.
+    -->
+    <WizardAction id="pre_checkin_and_update"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.PRE_CHECKIN_AND_UPDATE;end">
+        <result wizard:name="timeout"
+            wizard:resultCode="101"
+            wizard:action="network_unavailable" />
+        <result wizard:name="ota_available"
+            wizard:resultCode="102"
+            wizard:action="ota_update" />
+        <result wizard:action="post_checkin_and_update" />
     </WizardAction>
 
     <!-- Update system image [REQUIRED] -->
-    <WizardAction id="ota_update"
+    <WizardAction id="ota_update" wizard:ifLifecycle="default"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.OTA_UPDATE;end">
         <result wizard:name="skip"
             wizard:resultCode="1"
@@ -142,29 +145,38 @@
         <result wizard:action="system_update" />
     </WizardAction>
 
+
     <!-- System update should cause a reboot, but if it returns unexpectedly, continue on to
         early update -->
-    <WizardAction id="system_update"
+    <WizardAction id="system_update" wizard:ifLifecycle="default"
         wizard:uri="intent:#Intent;action=android.settings.SYSTEM_UPDATE_SETTINGS;end">
         <result wizard:action="early_update" />
     </WizardAction>
 
-
-    <!-- Update other important packages [REQUIRED] -->
-    <WizardAction id="early_update"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.EARLY_UPDATE;end">
+    <!-- Call this action when system_update failed or skipped. [REQUIRED] -->
+    <WizardAction id="early_update" wizard:ifLifecycle="default"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.COMPAT_EARLY_UPDATE;end">
         <result wizard:name="timeout"
             wizard:resultCode="101"
-            wizard:action="early_update_network_timeout" />
+            wizard:action="network_unavailable" />
+        <result wizard:action="post_checkin_and_update" />
+    </WizardAction>
+
+    <!-- Gms check-in and update flow. all action between pre_checkin_and_update and
+          post_checkin_and_update are required and not allow to change. [REQUIRED] -->
+    <WizardAction id="post_checkin_and_update"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.POST_CHECKIN_AND_UPDATE;end">
+        <result wizard:action="esim_setup" />
+    </WizardAction>
+
+    <!-- eSIM setup flow [RECOMMENDED] -->
+    <WizardAction id="esim_setup"
+        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=3;end">
         <result wizard:action="network_check" />
     </WizardAction>
 
-    <!-- Network or early update timeout [REQUIRED] -->
-    <WizardAction id="early_update_network_timeout"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.NETWORK_TIMEOUT;end" />
-
     <!-- Check network availability and return RESULT_OK or RESULT_SKIP [REQUIRED] -->
-    <WizardAction id="network_check"
+    <WizardAction id="network_check" wizard:ifLifecycle="default"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.NETWORK_CHECK;end">
         <!-- "no_connection" means device doesn't have connection ability at this time, showing
             "Couldn't connect" offers users a path to reconnect to a different network. -->
@@ -174,7 +186,9 @@
         <!-- All other result codes exit to parent script -->
     </WizardAction>
 
-    <!-- Network unavailable [REQUIRED] -->
+    <!-- Network unavailable or check-in/early-update timeout [REQUIRED] -->
     <WizardAction id="network_unavailable"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.NETWORK_TIMEOUT;end" />
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.NETWORK_TIMEOUT;end">
+        <!-- All result codes go to NETWORK_SETTINGS -->
+    </WizardAction>
 </WizardScript>
diff --git a/res/raw/wizard_script_deferred.xml b/res/raw/wizard_script_deferred.xml
index f65af0d..84788a5 100644
--- a/res/raw/wizard_script_deferred.xml
+++ b/res/raw/wizard_script_deferred.xml
@@ -34,7 +34,7 @@
         <result wizard:name="skip"
             wizard:resultCode="1"
             wizard:action="sim_missing" />
-        <result wizard:action="sim_setup" />
+        <result wizard:action="carrier_setup" />
     </WizardAction>
 
 
@@ -46,294 +46,51 @@
             wizard:action="esim_intro" />
         <result wizard:name="esim_only"
             wizard:resultCode="102"
-            wizard:action="sim_setup" />
+            wizard:action="carrier_setup" />
         <result wizard:action="sim_ready" />
     </WizardAction>
 
     <WizardAction id="sim_ready"
         wizard:uri="intent:#Intent;action=com.android.setupwizard.SIM_READY;end" >
-        <result wizard:action="sim_setup" />
+        <result wizard:action="carrier_setup" />
     </WizardAction>
 
     <WizardAction id="esim_intro"
         wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_INTRO;end" />
 
+    <!-- Activate carrier services [RECOMMENDED] -->
+    <WizardAction id="carrier_setup"
+        wizard:uri="intent:#Intent;action=com.android.setupwizard.CARRIER_SETUP;end">
+        <result wizard:name="all_subscriptions_completed"
+            wizard:resultCode="98765"
+            wizard:action="sim_setup" />
+
+        <!-- Return to carrier_setup to check for other subscriptions for multi-SIM -->
+        <result wizard:action="carrier_setup" />
+    </WizardAction>
 
     <!-- On multi-SIM devices, choose which SIM to use for voice, data, and text [RECOMMENDED, CUSTOMIZABLE] -->
     <WizardAction id="sim_setup"
         wizard:uri="intent:#Intent;action=com.android.setupwizard.SIM_SETUP;end" />
 
-
-    <!-- Check whether there is provisioning profile activated or not. -->
-    <WizardAction id="prov_profile_checking"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.PROV_PROFILE_CHECKING;end">
-        <result wizard:name="prov_profile_flow"
-            wizard:resultCode="101"
-            wizard:action="captive_portal_prov" />
-        <result wizard:action="network_settings" />
-    </WizardAction>
-
-
-    <!-- Resolve captive portal access, and wait for check-in [REQUIRED] -->
-    <WizardAction id="captive_portal_prov"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.CAPTIVE_PORTAL;end">
-        <result wizard:action="gms_checkin_prov" />
-    </WizardAction>
-
-    <WizardAction id="gms_checkin_prov"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_CHECKIN;end">
-        <!-- The "timeout" usually happen on poor mobile network, so going to network_settings
-            let user setup WiFi connection and re-checkin later. -->
-        <result wizard:name="timeout"
-            wizard:resultCode="101"
-            wizard:action="network_settings" />
-        <result wizard:action="esim_setup_prov" />
-    </WizardAction>
-
-
-    <!-- eSIM setup flow [RECOMMENDED] -->
-    <WizardAction id="esim_setup_prov"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=3;end">
-        <result wizard:action="network_settings" />
-    </WizardAction>
-
-
-    <!-- Users must be given the opportunity to set up an internet connection, using the given
-         screens or a custom flow. -->
-    <!-- Network selection [REQUIRED, CUSTOMIZABLE] -->
-    <WizardAction id="network_settings"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.NETWORK_SETTINGS;B.shown_with_prov=false;end">
-        <result wizard:name="use_mobile"
-            wizard:resultCode="101"
-            wizard:action="activate_mobile_data" />
-        <result wizard:name="see_all_wifi"
-            wizard:resultCode="102"
-            wizard:action="wifi_settings" />
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_network_flow" />
-        <result wizard:action="captive_portal" />
-    </WizardAction>
-
-    <!-- Mobile data activation -->
-    <WizardAction id="activate_mobile_data"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ACTIVATE_MOBILE_DATA;end">
-        <result wizard:action="captive_portal" />
-    </WizardAction>
-
-    <!-- Wi-Fi setup -->
-    <WizardAction id="wifi_settings"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.WIFI_SETTINGS;end">
-        <result wizard:name="use_mobile"
-            wizard:resultCode="101"
-            wizard:action="activate_mobile_data" />
-        <result wizard:name="skip"
+    <!-- Network selection and packages update [REQUIRED, CUSTOMIZABLE] -->
+    <WizardAction id="connect_and_update"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_connect_and_update_flow">
+        <result wizard:name="no_connection"
             wizard:resultCode="1"
             wizard:action="no_network_flow" />
     </WizardAction>
 
-
-    <!-- Resolve captive portal access, and wait for check-in [REQUIRED] -->
-    <WizardAction id="captive_portal"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.CAPTIVE_PORTAL;end" />
-
-    <WizardAction id="gms_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_CHECKIN;end">
-        <result wizard:name="timeout"
-            wizard:resultCode="101"
-            wizard:action="network_timeout" />
-        <result wizard:action="esim_setup" />
-    </WizardAction>
-
-    <!-- Network or check-in timeout [REQUIRED] -->
-    <WizardAction id="network_timeout"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.NETWORK_TIMEOUT;end" />
-
-    <!-- eSIM setup flow [RECOMMENDED] -->
-    <WizardAction id="esim_setup"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=3;end">
-        <result wizard:action="early_update" />
-    </WizardAction>
-
-
-    <!-- Update other important packages [REQUIRED] -->
-    <WizardAction id="early_update"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.EARLY_UPDATE;end">
-        <result wizard:name="timeout"
-            wizard:resultCode="101"
-            wizard:action="early_update_network_timeout" />
-        <result wizard:action="usb_migration" />
-    </WizardAction>
-
-    <!-- Network or early update timeout [REQUIRED] -->
-    <WizardAction id="early_update_network_timeout"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.NETWORK_TIMEOUT;end" />
-
-
-    <!-- Ask user if they want to migrate using usb. If the transferring process has already begun
-          we will auto advance to usb_migration_after_add_account or
-          wifi_migration_after_add_account. Requires activation via Gservices flag [RECOMMENDED] -->
-    <WizardAction id="usb_migration"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.USB_MIGRATION;end">
-        <!-- "Skip" is returned when restore cannot happen, so skip over other restore options
-             as well -->
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="new_device_deferred_flow" />
-        <result wizard:name="usb_migration_with_account"
-            wizard:resultCode="101"
-            wizard:action="usb_migration_after_add_account" />
-        <result wizard:name="add_account_during_usb_transfer"
-            wizard:resultCode="103"
-            wizard:action="add_account_during_usb_transfer" />
-        <result wizard:name="set_up_as_new"
-            wizard:resultCode="104"
-            wizard:action="new_device_deferred_flow" />
-        <result wizard:name="d2d"
-            wizard:resultCode="105"
-            wizard:action="restore_with_device_flow" />
-        <result wizard:name="ios_restore"
-            wizard:resultCode="106"
-            wizard:action="restore_with_ios_flow" />
-        <result wizard:name="cloud_restore"
-            wizard:resultCode="107"
-            wizard:action="restore_with_account_flow" />
-        <result wizard:name="add_account_for_wifi_transfer"
-            wizard:resultCode="111"
-            wizard:action="add_account_for_wifi_transfer" />
-        <result wizard:name="transfer_number_only"
-            wizard:resultCode="112"
-            wizard:action="new_device_deferred_flow" />
-        <result wizard:action="restore_choice" />
-    </WizardAction>
-
-    <WizardAction id="add_account_during_usb_transfer"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end" />
-
-    <!-- Add an account for USB D2D if accounts cannot be transferred directly -->
-    <WizardAction id="account_setup_usb"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <result wizard:action="usb_migration_after_add_account" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="add_account_during_usb_transfer" />
-    </WizardAction>
-
-    <!-- Relaunch into usb migration flow -->
-    <WizardAction id="usb_migration_after_add_account"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.D2D_MIGRATION_AFTER_ACCOUNT;end">
-        <result wizard:action="d2d_restore_flow" />
-    </WizardAction>
-
-    <WizardAction id="add_account_for_wifi_transfer"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=true;B.isWifiD2d=true;end" />
-
-    <!-- Add an account for WiFi D2D -->
-    <WizardAction id="account_setup_wifi"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;B.isWifiD2d=true;end">
-        <result wizard:name="ok"
-            wizard:resultCode="-1"
-            wizard:action="restore_with_account_flow" />
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update_wifi" />
-        <result
-            wizard:name="oem_restore"
-            wizard:resultCode="103"
-            wizard:action="oem_restore_after_add_account" />
-        <result
-            wizard:name="wifi_d2d"
-            wizard:resultCode="104"
-            wizard:action="wifi_migration_after_add_account" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update_wifi"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="add_account_for_wifi_transfer" />
-    </WizardAction>
-
-    <!-- Launch/Relaunch into wifi migration flow -->
-    <WizardAction id="wifi_migration_after_add_account"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.D2D_MIGRATION_AFTER_ACCOUNT;B.startWifiD2d=true;end">
-        <result wizard:action="d2d_restore_flow" />
-    </WizardAction>
-
-
-    <!-- Choose device restoration flow [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="restore_choice"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.RESTORE_CHOICE;end">
-        <result wizard:name="d2d"
-            wizard:resultCode="101"
-            wizard:action="restore_with_device_flow" />
-        <result wizard:name="ios_restore"
-            wizard:resultCode="102"
-            wizard:action="restore_with_ios_flow" />
-        <result wizard:name="dont_copy"
-            wizard:resultCode="103"
-            wizard:action="new_device_deferred_flow" />
-        <result wizard:action="restore_with_account_flow" />
-    </WizardAction>
-
-
-    <!-- Set up without restoring from old device [RECOMMENDED] -->
-    <WizardAction id="new_device_deferred_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_new_device_flow">
-        <result wizard:action="kid_post_setup" />
-    </WizardAction>
-
-
-    <!-- Set up without an account [REQUIRED] -->
-    <WizardAction id="no_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_new_device_no_account_flow">
-        <result wizard:action="kid_post_setup" />
-    </WizardAction>
-
-
-    <!-- Set up using USB/WiFi D2D transfer [RECOMMENDED] -->
-    <WizardAction id="d2d_restore_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_restore_with_usb_flow">
-        <result wizard:action="kid_post_setup" />
-    </WizardAction>
-
-
-    <!-- Placeholder for OEM restore flow [CUSTOMIZABLE] -->
-    <WizardAction id="oem_restore_after_add_account" />
-
-
-    <!-- Restore user data and apps from servers [REQUIRED] -->
-    <WizardAction id="restore_with_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_restore_with_account_flow">
-        <result wizard:action="kid_post_setup" />
-    </WizardAction>
-
-
-    <!-- Restore user data and apps from another Android [RECOMMENDED] -->
-    <WizardAction id="restore_with_device_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_restore_with_device_flow">
-        <result wizard:action="kid_post_setup" />
-    </WizardAction>
-
-
-    <!-- Restore user data and apps from an iOS device [RECOMMENDED] -->
-    <WizardAction id="restore_with_ios_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_restore_with_ios_flow">
+    <!-- Restore from an existing account or device [RECOMMENDED, CUSTOMIZABLE] -->
+    <WizardAction id="unified_restore_flow"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_unified_restore_flow">
         <result wizard:action="kid_post_setup" />
     </WizardAction>
 
 
     <!-- Set up without a network connection [RECOMMENDED] -->
     <WizardAction id="no_network_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_no_network_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_no_network_flow">
         <result wizard:action="kid_post_setup" />
     </WizardAction>
 
diff --git a/res/raw/wizard_script_deferred_account_flow.xml b/res/raw/wizard_script_deferred_account_flow.xml
deleted file mode 100644
index 176c151..0000000
--- a/res/raw/wizard_script_deferred_account_flow.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Restore apps from another device [RECOMMENDED] -->
-    <!-- Check to see if we already know which device is being restored onto this one -->
-    <WizardAction id="restore_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.CHECK_RESTORE_TOKEN;end">
-        <result wizard:name="token_not_found"
-            wizard:resultCode="101"
-            wizard:action="restore_picker" />
-        <result wizard:name="choose_what_to_restore"
-            wizard:resultCode="102"
-            wizard:action="choose_what_to_restore" />
-        <result wizard:action="restore_start" />
-    </WizardAction>
-
-    <!-- Choose what to restore. If restore token was not provided, also choose which backup set to restore from -->
-    <WizardAction id="choose_what_to_restore"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.CHOOSE_WHAT_TO_RESTORE;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="END_RESTORE_START" />
-        <result wizard:name="no_content"
-            wizard:resultCode="2"
-            wizard:action="END_RESTORE_START" />
-        <result wizard:action="restore_start" />
-    </WizardAction>
-
-    <!-- Select a device to serve as the source for restored apps and start restoring -->
-    <WizardAction id="restore_picker"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.RESTORE;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="END_RESTORE_START" />
-        <result wizard:name="no_content"
-            wizard:resultCode="2"
-            wizard:action="END_RESTORE_START" />
-    </WizardAction>
-
-    <WizardAction id="restore_start"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.START_RESTORE;end" />
-
-    <!-- place holder for actions to jump after restore has started -->
-    <WizardAction id="END_RESTORE_START" />
-
-
-    <!-- eSIM fallback setup flow started when eSIM setup failed before [RECOMMENDED] -->
-    <WizardAction id="esim_setup_fallback"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=2;end" />
-
-
-    <!-- Show Google services opt-ins and Terms of Service [REQUIRED] -->
-    <WizardAction id="google_services"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <result wizard:action="search_selector" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="google_services" />
-    </WizardAction>
-
-    <!-- Show search selector screen [REQUIRED] -->
-    <WizardAction id="search_selector"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
-    </WizardAction>
-
-
-    <!-- eSIM setup flow [RECOMMENDED] -->
-    <WizardAction id="esim_setup"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=4;end" />
-
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="biometric"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="personalization_flow" />
-    </WizardAction>
-
-
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="lock_screen"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
-
-
-    <!-- Common set of customization steps [RECOMMENDED] -->
-    <WizardAction id="personalization_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_common_personalization_flow" />
-
-
-    <!-- Wait for data restoration to finish [RECOMMENDED] -->
-    <WizardAction id="restore_progress"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.RESTORE_PROGRESS;end">
-        <result wizard:name="retry"
-            wizard:resultCode="2"
-            wizard:action="restore_reset" />
-        <result wizard:name="skipped"
-            wizard:resultCode="102"
-            wizard:action="restore_finish" />
-        <result wizard:action="final_hold" />
-    </WizardAction>
-
-
-    <!-- If data restoration failed and user chose to retry, pick a new source device [RECOMMENDED] -->
-    <WizardAction id="restore_reset"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.REMOVE_RESTORE_TOKEN;end" />
-
-    <WizardAction id="restore_retry"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.RESTORE;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="final_hold" />
-        <result wizard:name="no_content"
-            wizard:resultCode="2"
-            wizard:action="final_hold" />
-    </WizardAction>
-
-    <WizardAction id="restore_retry_start"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.START_RESTORE;end">
-        <result wizard:action="restore_progress" />
-    </WizardAction>
-
-    <WizardAction id="restore_finish"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.RESTORE;B.handle_restore_errors=true;end" />
-
-    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
-    <WizardAction id="final_hold"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" />
-
-</WizardScript>
diff --git a/res/raw/wizard_script_deferred_ios_account_flow.xml b/res/raw/wizard_script_deferred_ios_account_flow.xml
deleted file mode 100644
index 2739459..0000000
--- a/res/raw/wizard_script_deferred_ios_account_flow.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    This flow is very similar to wizard_script_account_flow, but removes all the restoration from
-    account components and inserts a screen with instructions on how to migrate from iOs
-
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-     adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- eSIM fallback setup flow started when eSIM setup failed before [RECOMMENDED] -->
-    <WizardAction id="esim_setup_fallback"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=2;end" />
-
-
-    <!-- Show service opt-ins, as well as terms of service [REQUIRED] -->
-    <WizardAction id="google_services"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <result wizard:action="search_selector" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="google_services" />
-    </WizardAction>
-
-    <!-- Show search selector screen [REQUIRED] -->
-    <WizardAction id="search_selector"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
-    </WizardAction>
-
-    <!-- eSIM setup flow [RECOMMENDED] -->
-    <WizardAction id="esim_setup"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=4;end" />
-
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="biometric"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="personalization_flow" />
-    </WizardAction>
-
-
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="lock_screen"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
-
-
-    <!-- Common set of customization steps [RECOMMENDED] -->
-    <WizardAction id="personalization_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_common_personalization_flow" />
-
-
-    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
-    <WizardAction id="final_hold"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" />
-
-</WizardScript>
diff --git a/res/raw/wizard_script_deferred_new_device_account_flow.xml b/res/raw/wizard_script_deferred_new_device_account_flow.xml
deleted file mode 100644
index 0860155..0000000
--- a/res/raw/wizard_script_deferred_new_device_account_flow.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Show Google services opt-ins and Terms of Service [REQUIRED] -->
-    <WizardAction id="google_services"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <result wizard:action="search_selector" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="google_services" />
-    </WizardAction>
-
-    <!-- Show search selector screen [REQUIRED] -->
-    <WizardAction id="search_selector"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
-    </WizardAction>
-
-
-    <!-- eSIM setup flow [RECOMMENDED] -->
-    <WizardAction id="esim_setup"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=4;end" />
-
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="biometric"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="personalization_flow" />
-    </WizardAction>
-
-
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="lock_screen"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
-
-
-    <!-- Common set of customization steps [RECOMMENDED] -->
-    <WizardAction id="personalization_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_common_personalization_flow" />
-
-
-    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
-    <WizardAction id="final_hold"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" />
-
-</WizardScript>
diff --git a/res/raw/wizard_script_deferred_new_device_flow.xml b/res/raw/wizard_script_deferred_new_device_flow.xml
deleted file mode 100644
index 5a67852..0000000
--- a/res/raw/wizard_script_deferred_new_device_flow.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    Legend:
-        REQUIRED     Must be included in final scripting solution
-        RECOMMENDED  Associated with an optional feature; may have
-                     dependencies on other recommended actions
-        CUSTOMIZABLE Available for modification, within UX standards
-
-    Each top-level comment tag applies to one or more script instructions, until the next top-level
-    comment tag. A comment tag on a result code applies only to that result code.
-
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- eSIM fallback setup flow started when eSIM setup failed before [RECOMMENDED] -->
-    <WizardAction id="esim_setup_fallback"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=2;end" />
-
-
-    <!-- Add an account [REQUIRED] -->
-    <WizardAction id="load_account_intent"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end" />
-
-    <WizardAction id="account_setup"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <!-- Alternate flow if managed provisioning already set the user up (for enterprise) [RECOMMENDED] -->
-        <result wizard:name="dpm_user_complete"
-            wizard:resultCode="111"
-            wizard:action="END_OF_SCRIPT" />
-        <result wizard:action="gms_account_checkin" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="load_account_intent" />
-    </WizardAction>
-
-
-    <!-- Checkin with Gservices using account. If it fails, VPA will not be available. [REQUIRED] -->
-    <WizardAction id="gms_account_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
-
-
-    <!-- Branch to script for setting up with or without an account [REQUIRED] -->
-    <WizardAction id="mfm_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-    </WizardAction>
-
-
-    <!-- Set up with an account [REQUIRED] -->
-    <WizardAction id="account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_new_device_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Set up without an account [REQUIRED] -->
-    <WizardAction id="no_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_new_device_no_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-    <!-- Labeled end of script (for branching) [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="END_OF_SCRIPT" />
-
-</WizardScript>
diff --git a/res/raw/wizard_script_deferred_new_device_no_account_flow.xml b/res/raw/wizard_script_deferred_new_device_no_account_flow.xml
deleted file mode 100644
index a8f07d5..0000000
--- a/res/raw/wizard_script_deferred_new_device_no_account_flow.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-  <!-- Show search selector screen [REQUIRED] -->
-  <WizardAction id="search_selector"
-      wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
-  </WizardAction>
-
-  <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-  <WizardAction id="biometric"
-      wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="suggested_actions" />
-    </WizardAction>
-
-
-  <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-  <WizardAction id="lock_screen"
-      wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
-
-
-  <!-- Perform additional optional steps (while waiting for restoration to complete) [RECOMMENDED, CUSTOMIZABLE] -->
-  <WizardAction id="suggested_actions"
-      wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SUGGESTED_ACTIONS;end" />
-
-
-  <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
-  <WizardAction id="final_hold"
-      wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" />
-
-</WizardScript>
diff --git a/res/raw/wizard_script_deferred_no_account_flow.xml b/res/raw/wizard_script_deferred_no_account_flow.xml
deleted file mode 100644
index 61b51b2..0000000
--- a/res/raw/wizard_script_deferred_no_account_flow.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- eSIM fallback setup flow started when eSIM setup failed before [RECOMMENDED] -->
-    <WizardAction id="esim_setup_fallback"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=2;end" />
-
-    <!-- Show search selector screen [REQUIRED] -->
-    <WizardAction id="search_selector"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
-    </WizardAction>
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="biometric"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="suggested_actions" />
-    </WizardAction>
-
-
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="lock_screen"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
-
-
-    <!-- Perform additional optional steps (while waiting for restoration to complete) [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="suggested_actions"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SUGGESTED_ACTIONS;end" />
-
-
-    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
-    <WizardAction id="final_hold"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" />
-
-</WizardScript>
diff --git a/res/raw/wizard_script_deferred_no_network_flow.xml b/res/raw/wizard_script_deferred_no_network_flow.xml
deleted file mode 100644
index 8f60797..0000000
--- a/res/raw/wizard_script_deferred_no_network_flow.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="biometric"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="suggested_actions" />
-    </WizardAction>
-
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="lock_screen"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
-
-
-    <!-- Perform additional optional steps [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="suggested_actions"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SUGGESTED_ACTIONS;end" />
-
-</WizardScript>
diff --git a/res/raw/wizard_script_deferred_restore_with_account_flow.xml b/res/raw/wizard_script_deferred_restore_with_account_flow.xml
deleted file mode 100644
index b33fed8..0000000
--- a/res/raw/wizard_script_deferred_restore_with_account_flow.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Add an account [REQUIRED] -->
-    <WizardAction id="load_account_intent"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end" />
-
-    <WizardAction id="account_setup"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <!-- Alternate flow if managed provisioning already set the user up (for enterprise) [RECOMMENDED] -->
-        <result wizard:name="dpm_user_complete"
-            wizard:resultCode="111"
-            wizard:action="END_OF_SCRIPT" />
-        <result wizard:action="gms_account_checkin" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="load_account_intent" />
-    </WizardAction>
-
-
-    <!-- Checkin with Gservices using account. If it fails, VPA will not be available. [REQUIRED] -->
-    <WizardAction id="gms_account_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
-
-
-    <!-- Branch to script for setting up with or without an account [REQUIRED] -->
-    <WizardAction id="mfm_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-    </WizardAction>
-
-
-    <!-- Set up with an account [REQUIRED] -->
-    <WizardAction id="account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Set up without an account [REQUIRED] -->
-    <WizardAction id="no_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_no_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Labeled end of script (for branching) [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="END_OF_SCRIPT" />
-</WizardScript>
diff --git a/res/raw/wizard_script_deferred_restore_with_device_flow.xml b/res/raw/wizard_script_deferred_restore_with_device_flow.xml
deleted file mode 100644
index 9bfe40b..0000000
--- a/res/raw/wizard_script_deferred_restore_with_device_flow.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Add an account [REQUIRED] -->
-    <WizardAction id="load_account_intent"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=true;end" />
-
-    <WizardAction id="account_setup"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <!-- Alternate flow if managed provisioning already set the user up (for enterprise) [RECOMMENDED] -->
-        <result wizard:name="dpm_user_complete"
-            wizard:resultCode="111"
-            wizard:action="END_OF_SCRIPT" />
-        <result wizard:action="gms_account_checkin" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="load_account_intent" />
-    </WizardAction>
-
-
-    <!-- Checkin with Gservices using account. If it fails, VPA will not be available. [REQUIRED] -->
-    <WizardAction id="gms_account_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
-
-
-    <!-- Branch to script for setting up with or without an account [REQUIRED] -->
-    <WizardAction id="mfm_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-    </WizardAction>
-
-
-    <!-- Set up with an account [REQUIRED] -->
-    <WizardAction id="account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Set up without an account [REQUIRED] -->
-    <WizardAction id="no_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_no_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Labeled end of script (for branching) [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="END_OF_SCRIPT" />
-</WizardScript>
diff --git a/res/raw/wizard_script_deferred_restore_with_ios_flow.xml b/res/raw/wizard_script_deferred_restore_with_ios_flow.xml
deleted file mode 100644
index 7c6c5ae..0000000
--- a/res/raw/wizard_script_deferred_restore_with_ios_flow.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Show instructions for migrating from iOS [RECOMMENDED] -->
-    <WizardAction id="migrate_from_ios"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.IOS_SETUP;end" />
-
-
-    <!-- Add an account [REQUIRED] -->
-    <WizardAction id="load_account_intent"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end" />
-
-    <WizardAction id="account_setup"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <!-- Alternate flow if managed provisioning already set the user up (for enterprise) [RECOMMENDED] -->
-        <result wizard:name="dpm_user_complete"
-            wizard:resultCode="111"
-            wizard:action="END_OF_SCRIPT" />
-        <result wizard:action="gms_account_checkin" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="load_account_intent" />
-    </WizardAction>
-
-
-    <!-- Checkin with Gservices using account. If it fails, VPA will not be available. [REQUIRED] -->
-    <WizardAction id="gms_account_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
-
-
-    <!-- Branch to script for setting up with or without an account (Should always be add account for iOS flow) [REQUIRED] -->
-    <WizardAction id="mfm_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-    </WizardAction>
-
-
-    <!-- Set up with an account [REQUIRED] -->
-    <WizardAction id="ios_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_ios_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Set up without an account [REQUIRED] -->
-    <WizardAction id="no_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred_no_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Labeled end of script (for branching) [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="END_OF_SCRIPT" />
-</WizardScript>
diff --git a/res/raw/wizard_script_deferred_restore_with_usb_flow.xml b/res/raw/wizard_script_deferred_restore_with_usb_flow.xml
deleted file mode 100644
index 06445f9..0000000
--- a/res/raw/wizard_script_deferred_restore_with_usb_flow.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- eSIM fallback setup flow started when eSIM setup failed before [RECOMMENDED] -->
-    <WizardAction id="esim_setup_fallback"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=2;end" />
-
-    <!-- Check if user has added an account and, if so, start VPA [REQUIRED] -->
-    <WizardAction id="mfm_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end" />
-
-
-    <!-- Checkin with Gservices using account. [REQUIRED] -->
-    <WizardAction id="gms_account_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
-
-
-    <!-- Show Google services opt-ins and Terms of Service [REQUIRED] -->
-    <WizardAction id="google_services"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <result wizard:action="search_selector" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="google_services" />
-    </WizardAction>
-
-    <!-- Show search selector screen [REQUIRED] -->
-    <WizardAction id="search_selector"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
-    </WizardAction>
-
-    <!-- eSIM setup flow [RECOMMENDED] -->
-    <WizardAction id="esim_setup"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=4;end" />
-
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="biometric"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="personalization_flow" />
-    </WizardAction>
-
-
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="lock_screen"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
-
-
-    <!-- Common set of customization steps [RECOMMENDED] -->
-    <WizardAction id="personalization_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_common_personalization_flow" />
-
-
-    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
-    <WizardAction id="usb_migration_final_hold"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.USB_MIGRATION_FINAL_HOLD;end" />
-
-    <WizardAction id="final_hold"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" />
-
-</WizardScript>
diff --git a/res/raw/wizard_script_finish_cloud_restore_flow.xml b/res/raw/wizard_script_finish_cloud_restore_flow.xml
new file mode 100644
index 0000000..f60dad4
--- /dev/null
+++ b/res/raw/wizard_script_finish_cloud_restore_flow.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
+    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
+    <intent> tag processed by Intent.parseIntent() does not.
+
+    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
+-->
+<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
+    wizard:version="2">
+
+    <!-- Wait for data restoration to finish [RECOMMENDED] -->
+    <WizardAction id="restore_progress"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.RESTORE_PROGRESS;end">
+        <result wizard:name="retry"
+            wizard:resultCode="2"
+            wizard:action="restore_reset" />
+        <result wizard:name="skipped"
+            wizard:resultCode="102"
+            wizard:action="restore_finish" />
+        <result wizard:action="work_profile_setup" />
+    </WizardAction>
+
+    <!-- If data restoration failed and user chose to retry, pick a new source device [RECOMMENDED] -->
+    <WizardAction id="restore_reset"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.REMOVE_RESTORE_TOKEN;end" />
+
+    <WizardAction id="restore_retry"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.RESTORE;end">
+        <result wizard:name="skip"
+            wizard:resultCode="1"
+            wizard:action="final_hold" />
+        <result wizard:name="no_content"
+            wizard:resultCode="2"
+            wizard:action="final_hold" />
+    </WizardAction>
+
+    <WizardAction id="restore_retry_start"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.START_RESTORE;end">
+        <result wizard:action="restore_progress" />
+    </WizardAction>
+
+    <WizardAction id="restore_finish"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.RESTORE;B.handle_restore_errors=true;end" />
+
+
+    <!-- Offer users a chance to add work profile if they had one on previous device -->
+    <WizardAction id="work_profile_setup" wizard:ifLifecycle="default"
+        wizard:uri="intent:#Intent;action=com.android.setupwizard.WORK_PROFILE_SETUP;end">
+        <result wizard:name="skip"
+            wizard:resultCode="1"
+            wizard:action="final_hold" />
+        <result wizard:name="no_work_profile"
+            wizard:resultCode="104"
+            wizard:action="final_hold" />
+        <result wizard:name="add_work_profile"
+            wizard:resultCode="-1"
+            wizard:action="final_hold_before_work_setup" />
+    </WizardAction>
+
+    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
+    <WizardAction id="final_hold"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" >
+        <result wizard:action="load_launcher_layout" />
+    </WizardAction>
+
+
+    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
+    <WizardAction id="final_hold_before_work_setup"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;B.is_work_profile_setup=true;end" />
+
+    <WizardAction id="load_work_account_intent"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;B.is_work_profile_setup=true;end" />
+
+    <WizardAction id="account_setup"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;B.allowMultipleAccounts=true;end">
+        <result wizard:name="unintentional_cancel"
+            wizard:resultCode="102"
+            wizard:action="work_rollback_auth_early_update" />
+        <result wizard:action="load_launcher_layout" />
+    </WizardAction>
+
+    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
+    <WizardAction id="work_rollback_auth_early_update"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        <result wizard:action="load_work_account_intent" />
+    </WizardAction>
+
+    <!-- Wait for launcher layout to load [RECOMMENDED] -->
+    <WizardAction id="load_launcher_layout" wizard:ifLifecycle="default"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_LAUNCHER_LAYOUT;end" />
+
+</WizardScript>
diff --git a/res/raw/wizard_script_ios_account_flow.xml b/res/raw/wizard_script_ios_account_flow.xml
deleted file mode 100644
index 13585eb..0000000
--- a/res/raw/wizard_script_ios_account_flow.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    This flow is very similar to wizard_script_account_flow, but removes all the restoration from
-    account components and inserts a screen with instructions on how to migrate from iOs
-
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-     adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Start eSIM fallback setup flow when eSIM setup failed before [RECOMMENDED] -->
-    <WizardAction id="esim_setup_fallback"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=2;end" />
-
-
-    <!-- Set date, time, and time zone from automated services (or manually, if needed) [RECOMMENDED, CUSTOMIZEABLE] -->
-    <WizardAction id="date_time_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.DATE_TIME_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="save_user_name" />
-    </WizardAction>
-
-    <WizardAction id="date_time"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.DATE_TIME;end" />
-
-
-    <!-- Save the user name from the account to the OS profile [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="save_user_name"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SAVE_USER_NAME;end" />
-
-
-    <!-- Show service opt-ins, as well as terms of service [REQUIRED] -->
-    <WizardAction id="google_services"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <result wizard:action="search_selector" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="google_services" />
-    </WizardAction>
-
-    <!-- Show search selector screen [REQUIRED] -->
-    <WizardAction id="search_selector"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
-    </WizardAction>
-
-
-    <!-- Start eSIM setup flow with account [RECOMMENDED] -->
-    <WizardAction id="esim_setup"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=4;end" />
-
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="biometric"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="personalization_flow" />
-    </WizardAction>
-
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="lock_screen"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
-
-
-    <!-- Common set of customization steps [RECOMMENDED] -->
-    <WizardAction id="personalization_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_common_personalization_flow">
-        <result wizard:action="AFTER_PERSONALIZATION" />
-    </WizardAction>
-
-
-    <WizardAction id="AFTER_PERSONALIZATION" />
-
-
-    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
-    <WizardAction id="final_hold"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" />
-
-
-    <!-- Wait for launcher layout to load [RECOMMENDED] -->
-    <WizardAction id="load_launcher_layout"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_LAUNCHER_LAYOUT;end" />
-
-</WizardScript>
diff --git a/res/raw/wizard_script_new_device_no_account_flow.xml b/res/raw/wizard_script_new_device_no_account_flow.xml
deleted file mode 100644
index 93dae1a..0000000
--- a/res/raw/wizard_script_new_device_no_account_flow.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Set date, time, and time zone from automated services (or manually, if needed) [RECOMMENDED, CUSTOMIZEABLE] -->
-    <WizardAction id="date_time_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.DATE_TIME_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="save_user_name" />
-    </WizardAction>
-
-    <WizardAction id="date_time"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.DATE_TIME;end" />
-
-
-    <!-- Save the user name from the account to the OS profile [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="save_user_name"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SAVE_USER_NAME;end" />
-
-
-    <!-- Show service opt-ins, as well as terms of service [REQUIRED] -->
-    <WizardAction id="google_services"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <result wizard:action="search_selector" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="google_services" />
-    </WizardAction>
-
-    <!-- Show search selector screen [REQUIRED] -->
-    <WizardAction id="search_selector"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
-    </WizardAction>
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="biometric"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="select_pai" />
-    </WizardAction>
-
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="lock_screen"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
-
-
-    <!-- Screen to select Play Auto Installs. Shown because suggested_action is not shown in this flow [RECOMMENDED] -->
-    <WizardAction id="select_pai"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_PAI;end" />
-
-
-    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
-    <WizardAction id="final_hold"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" />
-
-
-    <!-- Wait for launcher layout to load [RECOMMENDED] -->
-    <WizardAction id="load_launcher_layout"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_LAUNCHER_LAYOUT;end" />
-
-</WizardScript>
diff --git a/res/raw/wizard_script_no_account_flow.xml b/res/raw/wizard_script_no_account_flow.xml
index a6e094a..5937a9e 100644
--- a/res/raw/wizard_script_no_account_flow.xml
+++ b/res/raw/wizard_script_no_account_flow.xml
@@ -4,6 +4,10 @@
     for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
     <intent> tag processed by Intent.parseIntent() does not.
 
+    The wizard action added wizard:ifLifecycle="default" will only be launched during initial setup.
+    It will be skipped during deferred setup. Conversely, if the action defined
+    wizard:ifLifecycle="deferred", it will only be launched during deferred setup.
+
     adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
 -->
 <WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
@@ -14,69 +18,28 @@
         wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=2;end" />
 
 
-    <!-- Set date, time, and time zone from automated services (or manually, if needed) [RECOMMENDED, CUSTOMIZEABLE] -->
-    <WizardAction id="date_time_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.DATE_TIME_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="save_user_name" />
-    </WizardAction>
-
-    <WizardAction id="date_time"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.DATE_TIME;end" />
-
-
-    <!-- Save the user name from the account to the OS profile [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="save_user_name"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SAVE_USER_NAME;end" />
-
-
-    <!-- Show service opt-ins, as well as terms of service [REQUIRED] -->
-    <WizardAction id="google_services"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <result wizard:action="search_selector" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="google_services" />
-    </WizardAction>
-
-    <!-- Show search selector screen [REQUIRED] -->
-    <WizardAction id="search_selector"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
-    </WizardAction>
-
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="biometric"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="select_pai" />
-    </WizardAction>
-
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="lock_screen"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
+    <!-- Common flow to set date and time, show service opt-ins, as well as terms of service [REQUIRED] -->
+    <WizardAction id="common_setup_flow" wizard:flow="WithConnectionFlow"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_common_flow" />
 
 
     <!-- Screen to select Play Auto Installs. Shown because suggested_action is not shown in this flow [RECOMMENDED] -->
-    <WizardAction id="select_pai"
+    <WizardAction id="select_pai" wizard:ifLifecycle="default"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_PAI;end" />
 
 
+      <!-- Perform additional optional steps (while waiting for restoration to complete) [RECOMMENDED, CUSTOMIZABLE] -->
+    <WizardAction id="suggested_actions" wizard:ifLifecycle="deferred"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SUGGESTED_ACTIONS;end" />
+
+
     <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
     <WizardAction id="final_hold"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" />
 
 
     <!-- Wait for launcher layout to load [RECOMMENDED] -->
-    <WizardAction id="load_launcher_layout"
+    <WizardAction id="load_launcher_layout" wizard:ifLifecycle="default"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_LAUNCHER_LAYOUT;end" />
 
 </WizardScript>
diff --git a/res/raw/wizard_script_no_network_flow.xml b/res/raw/wizard_script_no_network_flow.xml
index e8ec5ab..6d7f468 100644
--- a/res/raw/wizard_script_no_network_flow.xml
+++ b/res/raw/wizard_script_no_network_flow.xml
@@ -4,59 +4,27 @@
     for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
     <intent> tag processed by Intent.parseIntent() does not.
 
+    The wizard action added wizard:ifLifecycle="default" will only be launched during initial setup.
+    It will be skipped during deferred setup. Conversely, if the action defined
+    wizard:ifLifecycle="deferred", it will only be launched during deferred setup.
+
     adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
 -->
 <WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
     wizard:version="2">
 
-    <!-- Set date, time, and time zone, if not already set [RECOMMENDED, CUSTOMIZEABLE] -->
-    <WizardAction id="date_time_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.DATE_TIME_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="save_user_name" />
-    </WizardAction>
-
-    <WizardAction id="date_time"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.DATE_TIME;end" />
+    <!-- Common flow to set date and time, show service opt-ins, as well as terms of service [REQUIRED] -->
+    <WizardAction id="common_setup_flow" wizard:ifLifecycle="default"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_common_flow" />
 
 
-    <!-- Save the user name from the account to the OS profile [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="save_user_name"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SAVE_USER_NAME;end" />
-
-
-    <!-- Show service opt-ins, as well as terms of service [REQUIRED] -->
-    <WizardAction id="google_services"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <result wizard:action="biometric" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="google_services" />
-    </WizardAction>
-
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="biometric"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="load_launcher_layout" />
-    </WizardAction>
-
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="lock_screen"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
+    <!-- Perform additional optional steps [RECOMMENDED, CUSTOMIZABLE] -->
+    <WizardAction id="suggested_actions" wizard:ifLifecycle="deferred"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SUGGESTED_ACTIONS;end" />
 
 
     <!-- Wait for launcher layout to load [RECOMMENDED] -->
-    <WizardAction id="load_launcher_layout"
+    <WizardAction id="load_launcher_layout" wizard:ifLifecycle="default"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_LAUNCHER_LAYOUT;end" />
 
 </WizardScript>
diff --git a/res/raw/wizard_script_post_account_flow.xml b/res/raw/wizard_script_post_account_flow.xml
new file mode 100644
index 0000000..3380250
--- /dev/null
+++ b/res/raw/wizard_script_post_account_flow.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
+    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
+    <intent> tag processed by Intent.parseIntent() does not.
+
+    The wizard action added wizard:ifLifecycle="default" will only be launched during initial setup.
+    It will be skipped during deferred setup. Conversely, if the action defined
+    wizard:ifLifecycle="deferred", it will only be launched during deferred setup.
+
+    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
+-->
+<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
+    wizard:version="2">
+
+    <!-- Get current resotre flow to finish restore [RECOMMENDED] -->
+    <WizardAction id="get_current_restore_flow_to_start_restore"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GET_RESTORE_FLOW;end">
+        <result wizard:name="start_device_restore"
+            wizard:resultCode="105"
+            wizard:action="start_restore" />
+        <result wizard:name="start_cloud_restore"
+            wizard:resultCode="107"
+            wizard:action="start_restore" />
+        <result wizard:action="esim_setup_fallback" />
+    </WizardAction>
+
+
+    <!-- Start to restore apps from the cloud [RECOMMENDED] -->
+    <WizardAction id="start_restore"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_start_cloud_restore_flow">
+        <result wizard:name="skip"
+            wizard:resultCode="1"
+            wizard:action="common_setup_flow" />
+        <result wizard:name="no_content"
+            wizard:resultCode="2"
+            wizard:action="common_setup_flow" />
+    </WizardAction>
+
+
+    <!-- Start eSIM fallback setup flow when eSIM setup failed before [RECOMMENDED] -->
+    <WizardAction id="esim_setup_fallback"
+        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=2;end" />
+
+
+    <!-- Common flow to set date and time, show service opt-ins, as well as terms of service [REQUIRED] -->
+    <WizardAction id="common_setup_flow" wizard:flow="WithConnectionFlow"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_common_flow" />
+
+
+    <!-- Check if user has added an account then go to personalization flow [REQUIRED] -->
+    <WizardAction id="mfm_check"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
+        <result wizard:name="no_accounts_added"
+            wizard:resultCode="1"
+            wizard:action="select_pai" />
+    </WizardAction>
+
+
+    <!-- Common set of customization steps [RECOMMENDED] -->
+    <WizardAction id="personalization_flow"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_common_personalization_flow">
+        <result wizard:action="AFTER_PERSONALIZATION" />
+    </WizardAction>
+
+
+    <!-- Screen to select Play Auto Installs. If the user chooses to complete setup later, the whole personalization flow is skipped except for PAI selection here [RECOMMENDED] -->
+    <WizardAction id="select_pai" wizard:ifLifecycle="default"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_PAI;end" />
+
+
+    <WizardAction id="AFTER_PERSONALIZATION" wizard:ifLifecycle="default" />
+
+
+    <!-- Get current resotre flow to finish restore [RECOMMENDED] -->
+    <WizardAction id="get_current_restore_flow_to_finish"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GET_RESTORE_FLOW;end">
+        <result wizard:name="resotre_with_usb_flow"
+            wizard:resultCode="103"
+            wizard:action="usb_migration_final_hold" />
+        <result wizard:name="finish_device_restore"
+            wizard:resultCode="105"
+            wizard:action="finish_restore" />
+        <result wizard:name="finish_cloud_restore"
+            wizard:resultCode="107"
+            wizard:action="finish_restore" />
+        <result wizard:action="final_hold" />
+    </WizardAction>
+
+
+    <!-- Finish cloud restore process [RECOMMENDED] -->
+    <WizardAction id="finish_restore"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_finish_cloud_restore_flow">
+        <result wizard:action="END_OF_SCRIPT" />
+    </WizardAction>
+
+
+    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
+    <WizardAction id="usb_migration_final_hold"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.USB_MIGRATION_FINAL_HOLD;end">
+        <result wizard:name="setup_work_profile"
+            wizard:resultCode="110"
+            wizard:action="load_work_account_intent" />
+        <result wizard:action="final_hold" />
+    </WizardAction>
+
+
+    <!-- Add an account -->
+    <WizardAction id="load_work_account_intent" wizard:ifLifecycle="default"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;B.is_work_profile_setup=true;end" />
+
+
+    <WizardAction id="work_account_setup" wizard:ifLifecycle="default"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;B.allowMultipleAccounts=true;end">
+        <result wizard:name="unintentional_cancel"
+            wizard:resultCode="102"
+            wizard:action="work_rollback_auth_early_update" />
+        <result wizard:action="final_hold" />
+    </WizardAction>
+
+
+    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
+    <WizardAction id="work_rollback_auth_early_update"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        <result wizard:action="load_work_account_intent" />
+    </WizardAction>
+
+
+    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
+    <WizardAction id="final_hold"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" />
+
+
+    <!-- Wait for launcher layout to load [RECOMMENDED] -->
+    <WizardAction id="load_launcher_layout" wizard:ifLifecycle="default"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_LAUNCHER_LAYOUT;end" />
+
+
+    <WizardAction id="END_OF_SCRIPT" />
+
+</WizardScript>
diff --git a/res/raw/wizard_script_post_dpm_provision_finalization_flow.xml b/res/raw/wizard_script_post_dpm_provision_finalization_flow.xml
new file mode 100644
index 0000000..e3eba22
--- /dev/null
+++ b/res/raw/wizard_script_post_dpm_provision_finalization_flow.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
+    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
+    <intent> tag processed by Intent.parseIntent() does not.
+
+    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
+-->
+<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
+    wizard:version="2">
+
+    <!-- Preparation of enterprise_setup; must be added before enterprise_setup. [REQUIRED] -->
+    <WizardAction id="pre_enterprise_setup"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.PRE_ENTERPRISE_SETUP;end" >
+        <result wizard:name="skip"
+            wizard:resultCode="1"
+            wizard:action="POST_ENTERPRISE_SETUP" />
+    </WizardAction>
+
+    <!-- Finish the rest setup (e.g. setup with CloudDPC) of enterprise flow.
+         Point of no return; user cannot go back to previous suw page. [REQUIRED] -->
+    <WizardAction id="enterprise_setup"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ENTERPRISE_SETUP;end" />
+
+    <!-- Placeholder to skip actions [REQUIRED]-->
+    <WizardAction id="POST_ENTERPRISE_SETUP" />
+</WizardScript>
diff --git a/res/raw/wizard_script_post_dpm_user_flow.xml b/res/raw/wizard_script_post_dpm_user_flow.xml
index 3b008a5..2fcb77f 100644
--- a/res/raw/wizard_script_post_dpm_user_flow.xml
+++ b/res/raw/wizard_script_post_dpm_user_flow.xml
@@ -13,16 +13,6 @@
     <WizardAction id="dpm_gms_account_checkin"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
 
-    <!-- If no account has been added, show the Google Services screen. -->
-    <WizardAction id="account_added_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
-        <result wizard:name="no_accounts_added"
-            wizard:resultCode="1"
-            wizard:action="dpm_google_services" />
-        <result wizard:name="account_added"
-            wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
     <!-- Show Google services opt-ins and Terms of Service [RECOMMENDED] -->
     <WizardAction id="dpm_google_services"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
@@ -34,7 +24,7 @@
 
     <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
     <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
         <result wizard:action="dpm_google_services" />
     </WizardAction>
 
diff --git a/res/raw/wizard_script_post_managed_provisioning.xml b/res/raw/wizard_script_post_managed_provisioning.xml
index b608db1..fd3e03e 100644
--- a/res/raw/wizard_script_post_managed_provisioning.xml
+++ b/res/raw/wizard_script_post_managed_provisioning.xml
@@ -13,13 +13,16 @@
         wizard:uri="intent:#Intent;action=com.android.setupwizard.CHECK_USER_UNLOCK;end">
     </WizardAction>
 
+    <WizardAction id="gms_checkin"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_CHECKIN;end" />
+
     <!-- Factory Reset Protection (FRP) -->
     <WizardAction id="check_frp"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.CHECK_FRP;end">
         <result wizard:name="load_account_intent_frp_to_resolve_frp"
             wizard:resultCode="101"
             wizard:action="load_account_intent_frp" />
-        <result wizard:action="google_services" />
+        <result wizard:action="account_added_check" />
     </WizardAction>
 
     <!-- Resolve the FRP challenge -->
@@ -31,15 +34,25 @@
         <result wizard:name="unintentional_cancel"
             wizard:resultCode="102"
             wizard:action="rollback_auth_early_update" />
-        <result wizard:action="google_services" />
+        <result wizard:action="account_added_check" />
     </WizardAction>
 
     <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
     <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
         <result wizard:action="load_account_intent_frp" />
     </WizardAction>
 
+    <!-- If no account has been added, show the Google Services screen. -->
+    <WizardAction id="account_added_check"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
+        <result wizard:name="no_accounts_added"
+            wizard:resultCode="1"
+            wizard:action="google_services" />
+        <result wizard:name="account_added"
+            wizard:action="oem_post_setup" />
+    </WizardAction>
+
     <!-- Show Google services opt-ins and Terms of Service [REQUIRED] -->
     <WizardAction id="google_services"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end" />
@@ -49,6 +62,11 @@
         wizard:uri="intent:#Intent;action=com.android.setupwizard.OEM_POST_SETUP;end">
     </WizardAction>
 
+    <!-- Enterprise provisioning finalization flow. Required only in init setup flow. [REQUIRED] -->
+    <WizardAction id="enterprise_finalization_flow"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_post_dpm_provision_finalization_flow">
+    </WizardAction>
+
     <!-- Google kid account setup. Must be the last setup action. [REQUIRED] -->
     <WizardAction id="kid_post_setup"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.KID_POST_SETUP;end" />
diff --git a/res/raw/wizard_script_qr_provision_flow.xml b/res/raw/wizard_script_qr_provision_flow.xml
index 3f92a7f..43ce8fc 100644
--- a/res/raw/wizard_script_qr_provision_flow.xml
+++ b/res/raw/wizard_script_qr_provision_flow.xml
@@ -74,35 +74,55 @@
 
     <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
     <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
       <result wizard:action="load_account_intent_frp" />
     </WizardAction>
 
     <!-- Scan QR code for device owner provisioning -->
     <WizardAction id="qr_code_scan"
         wizard:uri="intent:#Intent;action=com.android.setupwizard.QR_CODE_SCAN;end">
-        <result wizard:name="work_profile_add_personal_account"
+        <!-- The restore flow would be set to cloud for COPE devices if the result code returned the adding personal account. -->
+        <result wizard:name="add_personal_account_after_work_profile"
             wizard:resultCode="120"
-            wizard:action="add_personal_account" />
-        <result wizard:action="qr_account_added_check" />
+            wizard:action="qr_gms_checkin_pre_add_account" />
+        <result wizard:name="work_profile_setup"
+            wizard:resultCode="122"
+            wizard:action="work_profile_setup" />
+        <result wizard:name="device_owner_setup"
+            wizard:resultCode="123"
+            wizard:action="device_owner_setup" />
+        <result wizard:action="qr_gms_checkin" />
     </WizardAction>
 
-    <WizardAction id="add_personal_account"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_add_personal_account_flow" />
-
-    <!-- If no account has been added, show the Google Services screen. -->
-    <WizardAction id="qr_account_added_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
-        <result wizard:name="no_accounts_added"
-            wizard:resultCode="1"
-            wizard:action="google_services" />
-        <result wizard:name="account_added"
-            wizard:action="END_OF_SCRIPT" />
+    <WizardAction id="work_profile_setup"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_post_dpm_provision_finalization_flow">
+        <result wizard:action="transition_to_personal_profile_setup" />
     </WizardAction>
 
-    <!-- Show Google services opt-ins and Terms of Service [REQUIRED] -->
-    <WizardAction id="google_services"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end" />
+    <WizardAction id="device_owner_setup"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_post_dpm_provision_finalization_flow">
+        <result wizard:action="qr_gms_checkin" />
+    </WizardAction>
+
+    <WizardAction id="transition_to_personal_profile_setup"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.TRANSITION_TO_PERSONAL_PROFILE_SETUP;end">
+        <result wizard:action="qr_gms_checkin_pre_add_account" />
+    </WizardAction>
+
+    <WizardAction id="qr_gms_checkin_pre_add_account"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_CHECKIN;end" />
+
+    <WizardAction id="add_personal_account_after_work_profile"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_account_flow">
+        <result wizard:action="END_OF_SCRIPT" />
+    </WizardAction>
+
+    <WizardAction id="qr_gms_checkin"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_CHECKIN;end" />
+
+    <!-- Flow to run after a user-led device policy managed setup. [RECOMMENDED] -->
+    <WizardAction id="post_dpm_user_flow"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_post_dpm_user_flow" />
 
     <WizardAction id="END_OF_SCRIPT" />
 </WizardScript>
diff --git a/res/raw/wizard_script_restore_flow.xml b/res/raw/wizard_script_restore_flow.xml
deleted file mode 100644
index 5975caf..0000000
--- a/res/raw/wizard_script_restore_flow.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Ask user if they want to migrate using usb. If the transferring process has already begun
-        we will auto advance to usb_migration_after_add_account. Requires activation via Gservices
-        flag [RECOMMENDED] -->
-    <WizardAction id="usb_migration"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.USB_MIGRATION;end">
-        <result wizard:name="result_usb_migration_with_account"
-            wizard:resultCode="101"
-            wizard:action="usb_migration_after_add_account" />
-        <result
-            wizard:resultCode="103"
-            wizard:action="load_add_account_intent" />
-        <result wizard:action="restore_choice" />
-    </WizardAction>
-
-    <WizardAction id="load_add_account_intent"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end" />
-
-    <WizardAction id="account_setup"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <result wizard:action="usb_migration_after_add_account" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="load_add_account_intent" />
-    </WizardAction>
-
-    <!-- Relaunch into usb migration flow -->
-    <WizardAction id="usb_migration_after_add_account"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.D2D_MIGRATION_AFTER_ACCOUNT;end">
-        <result wizard:action="restore_with_usb_flow" />
-    </WizardAction>
-
-
-    <!-- Choose device restoration flow [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="restore_choice"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.RESTORE_CHOICE;end">
-        <result wizard:name="d2d"
-            wizard:resultCode="101"
-            wizard:action="restore_with_device_flow" />
-        <result wizard:name="ios_restore"
-            wizard:resultCode="102"
-            wizard:action="restore_with_ios_flow" />
-        <result wizard:name="dont_copy"
-                wizard:resultCode="103"
-                wizard:action="setup_as_new_flow" />
-        <result wizard:action="restore_with_account_flow" />
-    </WizardAction>
-
-    <!-- Set up without restoring from old device [RECOMMENDED] -->
-    <WizardAction id="setup_as_new_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_setup_as_new_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Set up using USB transfer [RECOMMENDED] -->
-    <WizardAction id="restore_with_usb_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_restore_with_usb_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Restore user data and apps from servers [REQUIRED] -->
-    <WizardAction id="restore_with_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_restore_with_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Restore user data and apps from another Android [RECOMMENDED] -->
-    <WizardAction id="restore_with_device_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_restore_with_device_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Restore user data and apps from an iOS device [RECOMMENDED] -->
-    <WizardAction id="restore_with_ios_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_restore_with_ios_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Labeled end of script (for branching) [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="END_OF_SCRIPT" />
-</WizardScript>
diff --git a/res/raw/wizard_script_restore_with_account_flow.xml b/res/raw/wizard_script_restore_with_account_flow.xml
deleted file mode 100644
index 1fa506d..0000000
--- a/res/raw/wizard_script_restore_with_account_flow.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Add an account [REQUIRED] -->
-    <WizardAction id="load_account_intent"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end" />
-
-    <WizardAction id="account_setup"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <!-- Alternate flow if managed provisioning already set the user up (for enterprise) [RECOMMENDED] -->
-        <result wizard:name="dpm_user_complete"
-            wizard:resultCode="111"
-            wizard:action="post_dpm_user_flow" />
-        <result wizard:action="gms_account_checkin" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="load_account_intent" />
-    </WizardAction>
-
-    <!-- Checkin with Gservices using account. If it fails, VPA will not be available. [REQUIRED] -->
-    <WizardAction id="gms_account_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
-
-
-    <!-- Branch to script for setting up with or without an account [REQUIRED] -->
-    <WizardAction id="mfm_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-    </WizardAction>
-
-
-    <!-- Set up with an account [REQUIRED] -->
-    <WizardAction id="account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Set up without an account [REQUIRED] -->
-    <WizardAction id="no_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_no_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-    <!-- Flow to run after a user-led device policy managed setup. [RECOMMENDED] -->
-    <WizardAction id="post_dpm_user_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_post_dpm_user_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-    <!-- Labeled end of script (for branching) [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="END_OF_SCRIPT" />
-</WizardScript>
diff --git a/res/raw/wizard_script_restore_with_device_flow.xml b/res/raw/wizard_script_restore_with_device_flow.xml
deleted file mode 100644
index b031c01..0000000
--- a/res/raw/wizard_script_restore_with_device_flow.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Add an account [REQUIRED] -->
-    <WizardAction id="load_account_intent"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=true;end" />
-
-    <WizardAction id="account_setup"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <!-- Alternate flow if managed provisioning already set the user up (for enterprise) [RECOMMENDED] -->
-        <result wizard:name="dpm_user_complete"
-            wizard:resultCode="111"
-            wizard:action="post_dpm_user_flow" />
-        <result wizard:action="gms_account_checkin" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="load_account_intent" />
-    </WizardAction>
-
-
-    <!-- Checkin with Gservices using account. If it fails, VPA will not be available. [REQUIRED] -->
-    <WizardAction id="gms_account_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
-
-    <!-- Branch to script for setting up with or without an account [REQUIRED] -->
-    <WizardAction id="mfm_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-    </WizardAction>
-
-
-    <!-- Set up with an account [REQUIRED] -->
-    <WizardAction id="account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Set up without an account [REQUIRED] -->
-    <WizardAction id="no_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_no_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-    <!-- Flow to run after a user-led device policy managed setup. [RECOMMENDED] -->
-    <WizardAction id="post_dpm_user_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_post_dpm_user_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-    <!-- Labeled end of script (for branching) [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="END_OF_SCRIPT" />
-</WizardScript>
diff --git a/res/raw/wizard_script_restore_with_ios_flow.xml b/res/raw/wizard_script_restore_with_ios_flow.xml
deleted file mode 100644
index a08b949..0000000
--- a/res/raw/wizard_script_restore_with_ios_flow.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Show instructions for migrating from iOS [RECOMMENDED] -->
-    <WizardAction id="migrate_from_ios"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.IOS_SETUP;end" />
-
-    <!-- Add an account [REQUIRED] -->
-    <WizardAction id="load_account_intent"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end" />
-
-    <WizardAction id="account_setup"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <!-- Alternate flow if managed provisioning already set the user up (for enterprise) [RECOMMENDED] -->
-        <result wizard:name="dpm_user_complete"
-            wizard:resultCode="111"
-            wizard:action="post_dpm_user_flow" />
-        <result wizard:action="gms_account_checkin" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="load_account_intent" />
-    </WizardAction>
-
-    <!-- Checkin with Gservices using account. If it fails, VPA will not be available. [REQUIRED] -->
-    <WizardAction id="gms_account_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
-
-
-    <!-- Branch to script for setting up with or without an account (Should always be add account for iOS flow) [REQUIRED] -->
-    <WizardAction id="mfm_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-    </WizardAction>
-
-
-    <!-- Set up with an account [REQUIRED] -->
-    <WizardAction id="ios_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_ios_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Set up without an account [REQUIRED] -->
-    <WizardAction id="no_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_no_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-    <!-- Flow to run after a user-led device policy managed setup. [RECOMMENDED] -->
-    <WizardAction id="post_dpm_user_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_post_dpm_user_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-    <!-- Labeled end of script (for branching) [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="END_OF_SCRIPT" />
-</WizardScript>
diff --git a/res/raw/wizard_script_restore_with_usb_flow.xml b/res/raw/wizard_script_restore_with_usb_flow.xml
deleted file mode 100644
index 948429a..0000000
--- a/res/raw/wizard_script_restore_with_usb_flow.xml
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    This flow is very similar to wizard_script_account_flow, but removes all the restoration from
-    account components and inserts a screen with instructions on how to migrate from iOs
-
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-
-    <!-- Start eSIM fallback setup flow when eSIM setup failed before [RECOMMENDED] -->
-    <WizardAction id="esim_setup_fallback"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=2;end" />
-
-
-    <!-- Checkin with Gservices using account. [REQUIRED] -->
-    <WizardAction id="gms_account_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
-
-
-    <!-- Verify date, time, and time zone, or set manually, if needed [RECOMMENDED, CUSTOMIZEABLE] -->
-    <WizardAction id="date_time_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.DATE_TIME_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="save_user_name" />
-    </WizardAction>
-
-    <WizardAction id="date_time"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.DATE_TIME;end" />
-
-
-    <!-- Save the user name from the account to the OS profile [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="save_user_name"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SAVE_USER_NAME;end" />
-
-
-    <!-- Show service opt-ins, as well as terms of service [REQUIRED] -->
-    <WizardAction id="google_services"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <result wizard:action="search_selector" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="google_services" />
-    </WizardAction>
-
-    <!-- Show search selector screen [REQUIRED] -->
-    <WizardAction id="search_selector"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
-    </WizardAction>
-
-
-    <!-- Start eSIM setup flow with account [RECOMMENDED] -->
-    <WizardAction id="esim_setup"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=4;end" />
-
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="biometric"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="mfm_check" />
-    </WizardAction>
-
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="lock_screen"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
-
-    <!-- Check if user has added an account [REQUIRED] -->
-    <WizardAction id="mfm_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="select_pai" />
-    </WizardAction>
-
-    <!-- Common set of customization steps [RECOMMENDED] -->
-    <WizardAction id="personalization_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_common_personalization_flow">
-        <result wizard:action="AFTER_PERSONALIZATION" />
-    </WizardAction>
-
-
-    <!-- Screen to select Play Auto Installs. If the user chooses to complete setup later, the whole personalization flow is skipped except for PAI selection here [RECOMMENDED] -->
-    <WizardAction id="select_pai"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_PAI;end" />
-
-
-    <!-- Place holder to jump to for starting final hold -->
-    <WizardAction id="AFTER_PERSONALIZATION" />
-
-
-    <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
-    <WizardAction id="usb_migration_final_hold"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.USB_MIGRATION_FINAL_HOLD;end">
-        <result wizard:name="setup_work_profile"
-            wizard:resultCode="110"
-            wizard:action="load_work_account_intent" />
-        <result wizard:action="final_hold" />
-    </WizardAction>
-
-    <!-- Add an account -->
-    <WizardAction id="load_work_account_intent"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end" />
-
-    <WizardAction id="work_account_setup"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;B.allowMultipleAccounts=true;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="work_rollback_auth_early_update" />
-        <result wizard:action="final_hold" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="work_rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="load_work_account_intent" />
-    </WizardAction>
-
-    <WizardAction id="final_hold"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" />
-
-
-    <!-- Wait for launcher layout to load [RECOMMENDED] -->
-    <WizardAction id="load_launcher_layout"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_LAUNCHER_LAYOUT;end" />
-
-</WizardScript>
diff --git a/res/raw/wizard_script_setup_as_new_flow.xml b/res/raw/wizard_script_setup_as_new_flow.xml
deleted file mode 100644
index 7403c0e..0000000
--- a/res/raw/wizard_script_setup_as_new_flow.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Start eSIM fallback setup flow when eSIM setup failed before [RECOMMENDED] -->
-    <WizardAction id="esim_setup_fallback"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.ESIM_SETUP;i.setup_type=2;end" />
-
-    <!-- Add an account [REQUIRED] -->
-    <WizardAction id="load_account_intent"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end" />
-
-    <WizardAction id="account_setup"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <!-- Alternate flow if managed provisioning already set the user up (for enterprise) [RECOMMENDED] -->
-        <result wizard:name="dpm_user_complete"
-            wizard:resultCode="111"
-            wizard:action="post_dpm_user_flow" />
-        <result wizard:action="gms_account_checkin" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="load_account_intent" />
-    </WizardAction>
-
-
-    <!-- Checkin with Gservices using account. If it fails, VPA will not be available. [REQUIRED] -->
-    <WizardAction id="gms_account_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
-
-
-    <!-- Branch to script for setting up with or without an account [REQUIRED] -->
-    <WizardAction id="mfm_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="no_account_flow" />
-    </WizardAction>
-
-
-    <!-- Set up with an account [REQUIRED] -->
-    <WizardAction id="account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_new_device_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-
-    <!-- Set up without an account [REQUIRED] -->
-    <WizardAction id="no_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_new_device_no_account_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-    <!-- Flow to run after a user-led device policy managed setup. [RECOMMENDED] -->
-    <WizardAction id="post_dpm_user_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_post_dpm_user_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
-
-    <!-- Labeled end of script (for branching) [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="END_OF_SCRIPT" />
-
-</WizardScript>
diff --git a/res/raw/wizard_script_start_cloud_restore_flow.xml b/res/raw/wizard_script_start_cloud_restore_flow.xml
new file mode 100644
index 0000000..64c6a8a
--- /dev/null
+++ b/res/raw/wizard_script_start_cloud_restore_flow.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
+    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
+    <intent> tag processed by Intent.parseIntent() does not.
+
+    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
+-->
+<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
+    wizard:firstAction="restore_check">
+
+    <!-- Restore apps from the cloud [RECOMMENDED] -->
+    <!-- Check to see if we already know which device is being restored onto this one -->
+    <WizardAction id="restore_check"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.CHECK_RESTORE_TOKEN;end">
+        <result wizard:name="token_not_found"
+            wizard:resultCode="101"
+            wizard:action="restore_picker" />
+        <result wizard:name="choose_what_to_restore"
+            wizard:resultCode="102"
+            wizard:action="choose_what_to_restore" />
+        <result wizard:action="restore_start" />
+    </WizardAction>
+
+    <!-- Choose what to restore. If restore token was not provided, also choose which backup set to restore from -->
+    <WizardAction id="choose_what_to_restore"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.CHOOSE_WHAT_TO_RESTORE;end">
+        <result wizard:name="skip"
+            wizard:resultCode="1" />
+        <result wizard:name="no_content"
+            wizard:resultCode="2" />
+        <result wizard:action="restore_start" />
+    </WizardAction>
+
+    <!-- Select a device to serve as the source for restored apps and start restoring -->
+    <WizardAction id="restore_picker"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.RESTORE;end">
+        <result wizard:name="skip"
+            wizard:resultCode="1" />
+        <result wizard:name="no_content"
+            wizard:resultCode="2" />
+        <result wizard:action="restore_start" />
+    </WizardAction>
+
+    <WizardAction id="restore_start"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.START_RESTORE;end" />
+
+</WizardScript>
diff --git a/res/raw/wizard_script_unified_restore_flow.xml b/res/raw/wizard_script_unified_restore_flow.xml
index dd17461..cb7717f 100644
--- a/res/raw/wizard_script_unified_restore_flow.xml
+++ b/res/raw/wizard_script_unified_restore_flow.xml
@@ -30,16 +30,18 @@
             wizard:action="setup_as_new_flow" />
         <result wizard:name="d2d"
             wizard:resultCode="105"
-            wizard:action="restore_with_device_flow" />
+            wizard:action="restore_with_account_flow" />
         <result wizard:name="ios_restore"
             wizard:resultCode="106"
-            wizard:action="restore_with_ios_flow" />
+            wizard:action="migrate_from_ios" />
         <result wizard:name="cloud_restore"
             wizard:resultCode="107"
             wizard:action="restore_with_account_flow" />
+        <!-- Should not receive the result code of demo mode in deferred flow -->
         <result wizard:name="demo_mode_flow"
             wizard:resultCode="108"
             wizard:action="demo_mode_flow" />
+        <!-- Should not receive the result code of post dpm in deferred flow -->
         <result wizard:name="dpm_user_complete"
             wizard:resultCode="109"
             wizard:action="post_dpm_user_flow" />
@@ -49,11 +51,18 @@
         <result wizard:name="transfer_number_only"
             wizard:resultCode="112"
             wizard:action="setup_as_new_flow" />
-        <result wizard:action="restore_choice" />
+        <result wizard:name="add_account_for_ios_wifi_transfer"
+            wizard:resultCode="114"
+            wizard:action="add_account_for_ios_wifi_transfer" />
+        <result wizard:action="setup_as_new_flow" />
     </WizardAction>
 
-    <WizardAction id="demo_mode_flow"
-            wizard:uri="intent:#Intent;action=com.google.android.setupwizard.DEMO_MODE;end">
+    <WizardAction id="demo_mode_flow" wizard:ifLifecycle="default"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.DEMO_MODE;end">
+        <!-- For Android S and above admin-integrated flow -->
+        <result wizard:name="admin_integrated_flow"
+            wizard:resultCode="103"
+            wizard:action="END_OF_SCRIPT" />
         <result wizard:action="exit" />
     </WizardAction>
 
@@ -70,19 +79,23 @@
         <result wizard:name="dpm_user_complete"
             wizard:resultCode="111"
             wizard:action="post_dpm_user_flow" />
+        <!-- Alternate flow when managed provisioning has already set the user up and DPC setup hasn't run yet (for enterprise) [RECOMMENDED] -->
+        <result wizard:name="device_owner_set"
+            wizard:resultCode="123"
+            wizard:action="post_dpm_user_flow" />
         <result wizard:action="usb_migration_after_add_account" />
     </WizardAction>
 
     <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
     <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
         <result wizard:action="add_account_during_usb_transfer" />
     </WizardAction>
 
     <!-- Relaunch into usb migration flow -->
     <WizardAction id="usb_migration_after_add_account"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.D2D_MIGRATION_AFTER_ACCOUNT;end">
-        <result wizard:action="d2d_restore_flow" />
+        <result wizard:action="gms_account_checkin_for_d2d" />
     </WizardAction>
 
     <WizardAction id="add_account_for_wifi_transfer"
@@ -112,53 +125,80 @@
         <result wizard:name="dpm_user_complete"
             wizard:resultCode="111"
             wizard:action="post_dpm_user_flow" />
+        <!-- Alternate flow when managed provisioning has already set the user up and DPC setup hasn't run yet (for enterprise) [RECOMMENDED] -->
+        <result wizard:name="device_owner_set"
+            wizard:resultCode="123"
+            wizard:action="post_dpm_user_flow" />
+        <result wizard:action="wifi_migration_after_add_account" />
     </WizardAction>
 
     <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
     <WizardAction id="rollback_auth_early_update_wifi"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
         <result wizard:action="add_account_for_wifi_transfer" />
     </WizardAction>
 
     <!-- Launch/Relaunch into wifi migration flow -->
     <WizardAction id="wifi_migration_after_add_account"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.D2D_MIGRATION_AFTER_ACCOUNT;B.startWifiD2d=true;end">
-        <result wizard:action="d2d_restore_flow" />
+        <result wizard:action="gms_account_checkin_for_d2d" />
     </WizardAction>
 
+    <WizardAction id="add_account_for_ios_wifi_transfer"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.isIosWifiD2d=true;end" />
 
-    <!-- Choose device restoration flow [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="restore_choice"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.RESTORE_CHOICE;end">
-        <result wizard:name="d2d"
-            wizard:resultCode="101"
-            wizard:action="restore_with_device_flow" />
-        <result wizard:name="ios_restore"
+    <!-- Add an account for iOS WiFi D2D -->
+    <WizardAction id="account_setup_ios_wifi"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
+        <result wizard:name="unintentional_cancel"
             wizard:resultCode="102"
-            wizard:action="restore_with_ios_flow" />
-        <result wizard:name="dont_copy"
-            wizard:resultCode="103"
-            wizard:action="setup_as_new_flow" />
-        <result wizard:action="restore_with_account_flow" />
+            wizard:action="rollback_auth_early_update_ios_wifi" />
+        <!-- Alternate flow if managed provisioning already set the user up (for enterprise) [RECOMMENDED] -->
+        <result wizard:name="dpm_user_complete"
+            wizard:resultCode="111"
+            wizard:action="post_dpm_user_flow" />
+        <!-- Alternate flow when managed provisioning has already set the user up and DPC setup hasn't run yet (for enterprise) [RECOMMENDED] -->
+        <result wizard:name="device_owner_set"
+            wizard:resultCode="123"
+            wizard:action="post_dpm_user_flow" />
+        <result wizard:action="ios_wifi_migration_after_add_account" />
     </WizardAction>
 
+    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
+    <WizardAction id="rollback_auth_early_update_ios_wifi"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        <result wizard:action="add_account_for_ios_wifi_transfer" />
+    </WizardAction>
+
+    <!-- Launch/Relaunch into iOS wifi migration flow -->
+    <WizardAction id="ios_wifi_migration_after_add_account"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.D2D_MIGRATION_AFTER_ACCOUNT;B.startIosWifiD2d=true;end">
+        <result wizard:action="gms_account_checkin_for_d2d" />
+    </WizardAction>
+
+
     <!-- Set up without restoring from old device [RECOMMENDED] -->
-    <WizardAction id="setup_as_new_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_setup_as_new_flow">
+    <WizardAction id="setup_as_new_flow" wizard:flow="SetupAsNewFlow"
+          wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_account_flow">
         <result wizard:action="END_OF_SCRIPT" />
     </WizardAction>
 
 
     <!-- Set up without an account [REQUIRED] -->
     <WizardAction id="no_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_new_device_no_account_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_no_account_flow">
         <result wizard:action="END_OF_SCRIPT" />
     </WizardAction>
 
 
+    <!-- Checkin with Gservices using account before start USB/WiFi D2D transfer. [REQUIRED] -->
+    <WizardAction id="gms_account_checkin_for_d2d"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
+
+
     <!-- Set up using USB/WiFi D2D transfer [RECOMMENDED] -->
     <WizardAction id="d2d_restore_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_restore_with_usb_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_post_account_flow">
         <result wizard:action="END_OF_SCRIPT" />
     </WizardAction>
 
@@ -166,29 +206,27 @@
     <!-- Placeholder for OEM restore flow [CUSTOMIZABLE] -->
     <WizardAction id="oem_restore_after_add_account" />
 
-    <!-- Restore user data and apps from servers [REQUIRED] -->
+    <!-- Restore user data and apps from servers or another Android [REQUIRED] -->
     <WizardAction id="restore_with_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_restore_with_account_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_account_flow">
         <result wizard:action="END_OF_SCRIPT" />
     </WizardAction>
 
 
-    <!-- Restore user data and apps from another Android [RECOMMENDED] -->
-    <WizardAction id="restore_with_device_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_restore_with_device_flow">
-        <result wizard:action="END_OF_SCRIPT" />
-    </WizardAction>
+    <!-- Show instructions for migrating from iOS [RECOMMENDED] -->
+    <WizardAction id="migrate_from_ios"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.IOS_SETUP;end" />
 
 
     <!-- Restore user data and apps from an iOS device [RECOMMENDED] -->
     <WizardAction id="restore_with_ios_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_restore_with_ios_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_account_flow">
         <result wizard:action="END_OF_SCRIPT" />
     </WizardAction>
 
     <!-- Flow to run after a user-led device policy managed setup. [RECOMMENDED] -->
-    <WizardAction id="post_dpm_user_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_post_dpm_user_flow">
+    <WizardAction id="post_dpm_user_flow" wizard:ifLifecycle="default"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_post_dpm_user_flow">
         <result wizard:action="END_OF_SCRIPT" />
     </WizardAction>
 
diff --git a/res/raw/wizard_script_user.xml b/res/raw/wizard_script_user.xml
index a1d5d4b..8e54b8e 100644
--- a/res/raw/wizard_script_user.xml
+++ b/res/raw/wizard_script_user.xml
@@ -33,6 +33,11 @@
     </WizardAction>
 
 
+    <!-- Wait for Play Store updates that are already in flight to complete [RECOMMENDED] -->
+    <WizardAction id="complete_in_flight_updates"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.COMPLETE_IN_FLIGHT_UPDATES;end" />
+
+
     <!-- Network selection [REQUIRED, CUSTOMIZABLE] -->
     <WizardAction id="network_settings"
         wizard:uri="intent:#Intent;action=com.android.setupwizard.NETWORK_SETTINGS;end">
@@ -42,7 +47,7 @@
         <result wizard:name="skip"
             wizard:resultCode="1"
             wizard:action="no_account_flow" />
-        <result wizard:action="captive_portal" />
+        <result wizard:action="consolidate_captive_portal" />
     </WizardAction>
 
 
@@ -55,28 +60,36 @@
     </WizardAction>
 
 
-    <!-- Resolve captive portal access, and wait for check-in [REQUIRED] -->
-    <WizardAction id="captive_portal"
-        wizard:uri="intent:#Intent;action=com.android.setupwizard.CAPTIVE_PORTAL;end" />
+    <!--
+        Resolve captive portal access, and wait for check-in [REQUIRED]
+        What this action do is same with "com.google.android.setupwizard.CAPTIVE_PORTAL".
+        The intent action on only used when the captive portal in front of GMS check-in.
+        We separate this intent action in order to have better user experience.
+    -->
+    <WizardAction id="consolidate_captive_portal"
+        wizard:uri="intent:#Intent;action=com.android.setupwizard.CONSOLIDATE_CAPTIVE_PORTAL;end">
+        <result wizard:name="timeout"
+            wizard:resultCode="101"
+            wizard:action="network_unavailable" />
+    </WizardAction>
 
-    <WizardAction id="gms_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_CHECKIN;end">
+    <!-- Gms check-in and update flow. [REQUIRED] -->
+    <WizardAction id="pre_checkin_and_update"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.PRE_CHECKIN_AND_UPDATE;end">
         <result wizard:name="timeout"
             wizard:resultCode="101"
             wizard:action="network_timeout" />
-        <result wizard:action="early_update" />
+        <result wizard:action="post_checkin_and_update" />
     </WizardAction>
 
     <!-- Network or check-in timeout [REQUIRED] -->
     <WizardAction id="network_timeout"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.NETWORK_TIMEOUT;end" />
 
-    <!-- Update other important packages [REQUIRED] -->
-    <WizardAction id="early_update"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.EARLY_UPDATE;end">
-        <result wizard:name="timeout"
-            wizard:resultCode="101"
-            wizard:action="network_timeout" />
+    <!-- Gms check-in and update flow. all action between pre_checkin_and_update and
+          post_checkin_and_update are required and not allow to change. [REQUIRED] -->
+    <WizardAction id="post_checkin_and_update"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.POST_CHECKIN_AND_UPDATE;end">
         <result wizard:action="network_check" />
     </WizardAction>
 
@@ -116,19 +129,14 @@
 
     <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
     <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
         <result wizard:action="load_account_intent" />
     </WizardAction>
 
 
-    <!-- Checkin with Gservices using account. If it fails, VPA will not be available. [REQUIRED] -->
+    <!-- Checkin with Gservices using account. [REQUIRED] -->
     <WizardAction id="gms_account_checkin"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end" />
-
-
-    <!-- Branch to script for setting up with or without an account [REQUIRED] -->
-    <WizardAction id="mfm_check"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end">
         <result wizard:name="skip"
             wizard:resultCode="1"
             wizard:action="no_account_flow" />
@@ -136,15 +144,15 @@
 
 
     <!-- Set up with an account [REQUIRED] -->
-    <WizardAction id="account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_user_account_flow">
+    <WizardAction id="account_flow" wizard:flow="UserAccountFlow"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_user_account_flow">
         <result wizard:action="oem_post_setup" />
     </WizardAction>
 
 
     <!-- Set up without an account [REQUIRED] -->
     <WizardAction id="no_account_flow"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_user_no_account_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_user_account_flow">
         <result wizard:action="oem_post_setup" />
     </WizardAction>
 
diff --git a/res/raw/wizard_script_user_account_flow.xml b/res/raw/wizard_script_user_account_flow.xml
index 018a58c..77ae156 100644
--- a/res/raw/wizard_script_user_account_flow.xml
+++ b/res/raw/wizard_script_user_account_flow.xml
@@ -25,7 +25,7 @@
 
     <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
     <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
         <result wizard:action="google_services" />
     </WizardAction>
 
@@ -34,13 +34,12 @@
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
     </WizardAction>
 
-
     <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
     <WizardAction id="biometric"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="opa" />
+            <result wizard:name="skip"
+                wizard:resultCode="1"
+                wizard:action="opa" />
     </WizardAction>
 
     <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
@@ -49,7 +48,7 @@
 
     <!-- Set up Google Assistant (OPA). This step should come right after Google Services.
         Feature enabled via Gservices flag  [RECOMMENDED] -->
-    <WizardAction id="opa"
+    <WizardAction id="opa" wizard:ifFlow="UserAccountFlow"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.OPA_OPT_IN;end" />
 
 
@@ -59,7 +58,7 @@
 
 
     <!-- Wait for high-priority apks to be completed [RECOMMENDED] -->
-    <WizardAction id="final_hold"
+    <WizardAction id="final_hold" wizard:ifFlow="UserAccountFlow"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FINAL_HOLD;end" />
 
 
diff --git a/res/raw/wizard_script_user_no_account_flow.xml b/res/raw/wizard_script_user_no_account_flow.xml
deleted file mode 100644
index 96b31b6..0000000
--- a/res/raw/wizard_script_user_no_account_flow.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
-    for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
-    <intent> tag processed by Intent.parseIntent() does not.
-
-    adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
--->
-<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"
-    wizard:version="2">
-
-    <!-- Save the user name from the account to the OS profile [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="save_user_name"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SAVE_USER_NAME;end" />
-
-
-    <!-- Show service opt-ins, as well as terms of service [REQUIRED] -->
-    <WizardAction id="google_services"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GOOGLE_SERVICES;end">
-        <result wizard:name="unintentional_cancel"
-            wizard:resultCode="102"
-            wizard:action="rollback_auth_early_update" />
-        <result wizard:action="search_selector" />
-    </WizardAction>
-
-    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
-    <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
-        <result wizard:action="google_services" />
-    </WizardAction>
-
-    <!-- Show search selector screen [REQUIRED] -->
-    <WizardAction id="search_selector"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SELECT_SEARCH_ENGINE;end">
-    </WizardAction>
-
-
-    <!-- Set up biometric screen lock [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="biometric"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.BIOMETRIC;end">
-        <result wizard:name="skip"
-            wizard:resultCode="1"
-            wizard:action="suggested_actions" />
-    </WizardAction>
-
-    <!-- Set screen lock options [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="lock_screen"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOCK_SCREEN;end" />
-
-
-    <!-- Perform additional optional steps (while waiting for restoration to complete) [RECOMMENDED, CUSTOMIZABLE] -->
-    <WizardAction id="suggested_actions"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.SUGGESTED_ACTIONS;end" />
-
-
-    <!-- Wait for launcher layout to load [RECOMMENDED] -->
-    <WizardAction id="load_launcher_layout"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_LAUNCHER_LAYOUT;end" />
-
-</WizardScript>
diff --git a/res/raw/wizard_script_zero_touch_flow.xml b/res/raw/wizard_script_zero_touch_flow.xml
index 9f104a9..71e883c 100644
--- a/res/raw/wizard_script_zero_touch_flow.xml
+++ b/res/raw/wizard_script_zero_touch_flow.xml
@@ -11,21 +11,72 @@
 
     <WizardAction id="zero_touch_initial"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ZERO_TOUCH_SETUP;B.checkFrp=true;end">
+        <!-- OobConfig handled ZeroTouch, the device is provisioned in Device Owner mode. -->
         <result wizard:name="dpm_user_complete"
             wizard:resultCode="111" />
-        <result wizard:name="add_personal_account"
-            wizard:resultCode="120" />
+        <!-- OobConfig or ZT-GMS will handle ZeroTouch, but there is a FRP on the device, and it has to be resolved first. -->
         <result wizard:name="zero_touch_triggered"
             wizard:action="load_account_intent_frp"
             wizard:resultCode="113" />
+        <!-- ZT-GMS should handle ZeroTouch, go to setup_as_new flow. -->
+        <result wizard:name="gmscore_zero_touch"
+            wizard:resultCode="116" />
+        <!-- ZT-GMS should handle ZeroTouch, go to load_account_for_zt_gms. -->
+        <result wizard:name="zero_touch_gmscore_account_setup"
+            wizard:action="load_account_for_zt_gms"
+            wizard:resultCode="117" />
+        <!-- OobConfig handled ZeroTouch, the device is provisioned in Profile Owner mode. -->
+        <result wizard:name="add_personal_account_after_work_profile"
+            wizard:resultCode="120" />
+        <!-- OobConfig handled ZeroTouch, the device is provisioned as a Financed Device. -->
+        <result wizard:name="financed_device_provisioning_complete"
+            wizard:resultCode="121" />
+        <!-- OobConfig handled ZeroTouch, the device is provisioned in Profile Owner mode but hasn't launched the DPC yet -->
+        <result wizard:name="work_profile_setup"
+            wizard:resultCode="122" />
+        <!-- OobConfig handled ZeroTouch, the device is provisioned in Device Owner mode but hasn't launched the DPC yet -->
+        <result wizard:name="device_owner_setup"
+            wizard:resultCode="123" />
+        <!-- All other result codes exit to parent script -->
     </WizardAction>
 
+   <!-- Load account intent for ZT-GMS [REQUIRED] -->
+    <WizardAction id="load_account_for_zt_gms"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end">
+        <result wizard:action="account_setup_for_zt_gms" />
+    </WizardAction>
+
+    <!-- Start Account Setup for ZT-GMS [REQUIRED] -->
+    <WizardAction id="account_setup_for_zt_gms"
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;B.finishWhenDone=true;B.zeroTouch=true;end">
+        <result wizard:name="unintentional_cancel"
+            wizard:resultCode="102"
+            wizard:action="rollback_auth_early_update_for_zt_gms" />
+        <!-- Alternate flow if managed provisioning already set the user up (for enterprise) [RECOMMENDED] -->
+        <result wizard:name="dpm_user_complete"
+            wizard:resultCode="111" />
+        <result wizard:name="financed_device_provisioning_complete"
+            wizard:resultCode="121" />
+        <result wizard:name="work_profile_setup"
+            wizard:resultCode="122" />
+        <result wizard:name="device_owner_setup"
+            wizard:resultCode="123" />
+        <!-- All other result codes exit to parent script -->
+    </WizardAction>
+
+    <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
+    <WizardAction id="rollback_auth_early_update_for_zt_gms"
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        <result wizard:action="load_account_for_zt_gms" />
+    </WizardAction>
+
+    <!-- Load account intent for frp [REQUIRED] -->
     <WizardAction id="load_account_intent_frp"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;B.resolveFrpOnly=true;end">
         <result wizard:action="resolve_frp" />
     </WizardAction>
 
-    <!-- Resolve the FRP challenge -->
+    <!-- Resolve the FRP challenge [REQUIRED] -->
     <WizardAction id="resolve_frp"
         wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;B.finishWhenDone=true;end">
         <result wizard:name="unintentional_cancel"
@@ -36,10 +87,15 @@
 
     <!-- Script that includes steps to rollback auth early update [REQUIRED] -->
     <WizardAction id="rollback_auth_early_update"
-      wizard:script="android.resource://com.shiftos.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
+        wizard:script="android.resource://eco.shift.partner.customization/raw/wizard_script_rollback_auth_early_update_flow">
         <result wizard:action="load_account_intent_frp" />
     </WizardAction>
 
+    <!-- Now that FRP is resolved, let OobConfig or ZT-GMS handle ZeroTouch. [REQUIRED] -->
     <WizardAction id="zero_touch_post_frp"
-        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ZERO_TOUCH_SETUP;end" />
+        wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ZERO_TOUCH_SETUP;end">
+        <result wizard:name="zero_touch_gmscore_account_setup"
+            wizard:resultCode="117"
+            wizard:action="load_account_for_zt_gms" />
+    </WizardAction>
 </WizardScript>
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index 7f8d393..83e9e7b 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -15,7 +15,7 @@
      limitations under the License.
 -->
 <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <array name="partner_wallpapers" translatable="false">
+    <array name="wallpapers" translatable="false">
         <item>shift_explosion</item>
         <item>shift_lake</item>
         <item>shift_pattern</item>
diff --git a/res/values/config.xml b/res/values/config.xml
new file mode 100644
index 0000000..bc48d60
--- /dev/null
+++ b/res/values/config.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 Google Inc. All Rights Reserved. -->
+<resources>
+    <string name="wizard_script_uri" translatable="false">android.resource://eco.shift.partner.customization/raw/wizard_script</string>
+    <!-- URI for deferred setup wizard script, customizable by partners (do not translate) -->
+    <string name="wizard_script_deferred_uri" translatable="false">android.resource://eco.shift.partner.customization/raw/wizard_script_deferred</string>
+</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 3a11b8b..d4415fb 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1,5 +1,5 @@
 <!--
-  Copyright (C) 2020 SHIFT GmbH
+  Copyright (C) 2020-2022 SHIFT GmbH
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -15,10 +15,5 @@
   -->
 <resources>
     <string name="app_name">SHIFT Partner Customization</string>
-
     <string name="google_folder_title">Google</string>
-
-    <string name="wizard_script_uri" translatable="false">android.resource://com.shiftos.partner.customization/raw/wizard_script</string>
-    <!-- URI for deferred setup wizard script, customizable by partners (do not translate) -->
-    <string name="wizard_script_deferred_uri" translatable="false">android.resource://com.shiftos.partner.customization/raw/wizard_script_deferred</string>
 </resources>
diff --git a/res/xml/partner_default_layout.xml b/res/xml/partner_default_layout.xml
index e33104b..a92fc89 100644
--- a/res/xml/partner_default_layout.xml
+++ b/res/xml/partner_default_layout.xml
@@ -7,7 +7,9 @@
   <favorite container="-101" screen="0" x="0" y="0" packageName="com.android.dialer" className="com.android.dialer.main.impl.MainActivity"/>
   <favorite container="-101" screen="1" x="1" y="0" packageName="com.android.settings" className="com.android.settings.Settings"/>
   <favorite container="-101" screen="2" x="2" y="0" packageName="com.shiftos.eleven" className="org.lineageos.eleven.ui.activities.HomeActivity"/>
+  <favorite container="-101" screen="2" x="2" y="0" packageName="org.lineageos.eleven" className="org.lineageos.eleven.ui.activities.HomeActivity"/>
   <favorite container="-101" screen="3" x="3" y="0" packageName="com.android.gallery3d" className="com.android.gallery3d.app.GalleryActivity"/>
+  <favorite container="-101" screen="4" x="4" y="0" packageName="com.android.camera2" className="com.android.camera.CameraActivity"/>
   <favorite container="-101" screen="4" x="4" y="0" packageName="com.shift.shutter" className="com.shift.shutter.CameraActivity"/>
   <favorite container="-101" screen="4" x="4" y="0" packageName="org.codeaurora.snapcam" className="com.android.camera.CameraLauncher"/>
 
diff --git a/src/com/shiftos/partner/customization/LauncherCustomizationReceiver.java b/src/eco/shift/partner/customization/LauncherCustomizationReceiver.java
similarity index 87%
rename from src/com/shiftos/partner/customization/LauncherCustomizationReceiver.java
rename to src/eco/shift/partner/customization/LauncherCustomizationReceiver.java
index 26d225d..96b250a 100644
--- a/src/com/shiftos/partner/customization/LauncherCustomizationReceiver.java
+++ b/src/eco/shift/partner/customization/LauncherCustomizationReceiver.java
@@ -1,4 +1,4 @@
-package com.shiftos.partner.customization;
+package eco.shift.partner.customization;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
diff --git a/src/com/shiftos/partner/customization/SuwCustomizationReceiver.java b/src/eco/shift/partner/customization/SuwCustomizationReceiver.java
similarity index 87%
rename from src/com/shiftos/partner/customization/SuwCustomizationReceiver.java
rename to src/eco/shift/partner/customization/SuwCustomizationReceiver.java
index 46de519..f465f12 100644
--- a/src/com/shiftos/partner/customization/SuwCustomizationReceiver.java
+++ b/src/eco/shift/partner/customization/SuwCustomizationReceiver.java
@@ -1,4 +1,4 @@
-package com.shiftos.partner.customization;
+package eco.shift.partner.customization;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;