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

Commit b26e80f3 authored by David Anderson's avatar David Anderson Committed by Automerger Merge Worker
Browse files

Merge "fastbootd: Unmount /cache before flashing." into rvc-dev am: ab4a2621

Change-Id: Iec8d4cb56d7d99c258a13e9ea02644627c2ab358
parents 7c3fc84f ab4a2621
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -31,6 +31,7 @@
#include <cutils/android_reboot.h>
#include <cutils/android_reboot.h>
#include <ext4_utils/wipe.h>
#include <ext4_utils/wipe.h>
#include <fs_mgr.h>
#include <fs_mgr.h>
#include <fs_mgr/roots.h>
#include <libgsi/libgsi.h>
#include <libgsi/libgsi.h>
#include <liblp/builder.h>
#include <liblp/builder.h>
#include <liblp/liblp.h>
#include <liblp/liblp.h>
+13 −2
Original line number Original line Diff line number Diff line
@@ -16,18 +16,22 @@


#include "fastboot_device.h"
#include "fastboot_device.h"


#include <algorithm>

#include <android-base/logging.h>
#include <android-base/logging.h>
#include <android-base/strings.h>
#include <android-base/strings.h>
#include <android/hardware/boot/1.0/IBootControl.h>
#include <android/hardware/boot/1.0/IBootControl.h>
#include <android/hardware/fastboot/1.0/IFastboot.h>
#include <android/hardware/fastboot/1.0/IFastboot.h>
#include <fs_mgr.h>
#include <fs_mgr/roots.h>
#include <healthhalutils/HealthHalUtils.h>
#include <healthhalutils/HealthHalUtils.h>


#include <algorithm>

#include "constants.h"
#include "constants.h"
#include "flashing.h"
#include "flashing.h"
#include "usb_client.h"
#include "usb_client.h"


using android::fs_mgr::EnsurePathUnmounted;
using android::fs_mgr::Fstab;
using ::android::hardware::hidl_string;
using ::android::hardware::hidl_string;
using ::android::hardware::boot::V1_0::IBootControl;
using ::android::hardware::boot::V1_0::IBootControl;
using ::android::hardware::boot::V1_0::Slot;
using ::android::hardware::boot::V1_0::Slot;
@@ -64,6 +68,13 @@ FastbootDevice::FastbootDevice()
    if (boot_control_hal_) {
    if (boot_control_hal_) {
        boot1_1_ = android::hardware::boot::V1_1::IBootControl::castFrom(boot_control_hal_);
        boot1_1_ = android::hardware::boot::V1_1::IBootControl::castFrom(boot_control_hal_);
    }
    }

    // Make sure cache is unmounted, since recovery will have mounted it for
    // logging.
    Fstab fstab;
    if (ReadDefaultFstab(&fstab)) {
        EnsurePathUnmounted(&fstab, "/cache");
    }
}
}


FastbootDevice::~FastbootDevice() {
FastbootDevice::~FastbootDevice() {