app: aboot: Always enable fastbootd commands
Even if we don't natively support dynamic partitions we want these
commands and variables to be available, in case the recovery supports
fastbootd.
Issue: FP3-A11#146
Test: fastboot reboot-fastboot
Change-Id: I6438b84a8b7f5198144f668e87d0666a633b4f5d
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index d50ca30..bea2b13 100755
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -4978,7 +4978,6 @@
return;
}
-#if DYNAMIC_PARTITION_SUPPORT
void cmd_reboot_fastboot(const char *arg, void *data, unsigned sz)
{
dprintf(INFO, "rebooting the device - userspace fastboot\n");
@@ -5011,6 +5010,7 @@
return;
}
+#if DYNAMIC_PARTITION_SUPPORT
#ifdef VIRTUAL_AB_OTA
void CmdUpdateSnapshot(const char *arg, void *data, unsigned sz)
{
@@ -5604,10 +5604,8 @@
{"oem off-mode-charge", cmd_oem_off_mode_charger},
{"oem select-display-panel", cmd_oem_select_display_panel},
{"set_active",cmd_set_active},
-#if DYNAMIC_PARTITION_SUPPORT
{"reboot-fastboot",cmd_reboot_fastboot},
{"reboot-recovery",cmd_reboot_recovery},
-#endif
#ifdef VIRTUAL_AB_OTA
{"snapshot-update", CmdUpdateSnapshot},
#endif
@@ -5705,8 +5703,7 @@
fastboot_publish("battery-voltage", (const char *) battery_voltage);
fastboot_publish("battery-soc-ok", (const char *) battery_soc_ok);
#endif
- if (target_dynamic_partition_supported())
- fastboot_publish("is-userspace", "no");
+ fastboot_publish("is-userspace", "no");
if (target_virtual_ab_supported()) {
SnapshotMergeStatus = GetSnapshotMergeStatus ();
diff --git a/app/aboot/recovery.c b/app/aboot/recovery.c
index fd6c281..9dfb865 100644
--- a/app/aboot/recovery.c
+++ b/app/aboot/recovery.c
@@ -267,8 +267,7 @@
return 0;
}
- if (target_dynamic_partition_supported() &&
- !strcmp(RECOVERY_BOOT_FASTBOOT_CMD, msg.command)) {
+ if (!strcmp(RECOVERY_BOOT_FASTBOOT_CMD, msg.command)) {
boot_into_recovery = 1; // Boot in userspace fastboot mode
return 0;
}
@@ -426,8 +425,7 @@
boot_into_recovery = 1;
}
- if (target_dynamic_partition_supported() &&
- !strcmp(msg->command, RECOVERY_BOOT_FASTBOOT_CMD)) {
+ if (!strcmp(msg->command, RECOVERY_BOOT_FASTBOOT_CMD)) {
boot_into_recovery = 1;
}