Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f1bf731 authored by Sumit Pundir's avatar Sumit Pundir
Browse files

recovery: remove checks for system wipe on SAR devices



* SAR devices apparently has a mount point set to "/" and is detected
the same which apparently breaks the comparison when formatting "/system".

* ensure_path_unmounted also breaks due to the mount point being set as
"/" and rootfs can never be unmounted.

Temporary workaround until a better solution is found.

Also, remove "Mount system" option for SAR devices so that no one
accidently mount it before a wipe and have troubles unmounting it.

Signed-off-by: default avatarSumit Pundir <pundir.sumit@e.email>
parent b821545d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -281,6 +281,10 @@ ifeq ($(AB_OTA_UPDATER),true)
    LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
endif

ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
    LOCAL_CFLAGS += -DBOARD_BUILD_SYSTEM_ROOT_IMAGE=1
endif

ifeq ($(BOARD_HAS_DOWNLOAD_MODE), true)
    LOCAL_CFLAGS += -DDOWNLOAD_MODE
endif
+4 −0
Original line number Diff line number Diff line
@@ -73,7 +73,9 @@ static const MenuItem ADVANCED_MENU_ITEMS[] = {
  MenuItem("Reboot to bootloader"),
#endif
  MenuItem("Reboot to recovery"),
#ifndef BOARD_BUILD_SYSTEM_ROOT_IMAGE
  MenuItem("Mount system"),
#endif
  MenuItem("View logs"),
#ifdef SHOW_TESTS
  MenuItem("Run graphics test"),
@@ -87,7 +89,9 @@ static const MenuItemVector advanced_menu_items_ =
static const Device::BuiltinAction ADVANCED_MENU_ACTIONS[] = {
  Device::REBOOT_BOOTLOADER,
  Device::REBOOT_RECOVERY,
#ifndef BOARD_BUILD_SYSTEM_ROOT_IMAGE
  Device::MOUNT_SYSTEM,
#endif
  Device::VIEW_RECOVERY_LOGS,
#ifdef SHOW_TESTS
  Device::RUN_GRAPHICS_TEST,
+9 −7
Original line number Diff line number Diff line
@@ -341,6 +341,7 @@ int format_volume(const char* volume, const char* directory) {
    LOG(ERROR) << "can't format_volume \"" << volume << "\"";
    return -1;
  }
  if (strcmp(v->mount_point, "/") != 0) {
    if (strcmp(v->mount_point, volume) != 0) {
      LOG(ERROR) << "can't give path \"" << volume << "\" to format_volume";
      return -1;
@@ -349,6 +350,7 @@ int format_volume(const char* volume, const char* directory) {
      LOG(ERROR) << "format_volume: Failed to unmount \"" << v->mount_point << "\"";
      return -1;
    }
  }
  if (strcmp(v->fs_type, "ext4") != 0 && strcmp(v->fs_type, "f2fs") != 0) {
    LOG(ERROR) << "format_volume: fs_type \"" << v->fs_type << "\" unsupported";
    return -1;