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

Commit e3f09a72 authored by Tao Bao's avatar Tao Bao
Browse files

otautil: Factor out the utils that're private to recovery.

A number of utility functions are intended for serving recovery's own
use. Exposing them via libotautil (which is a static lib) would pass the
dependencies onto libotautil's users (e.g. recovery image, updater, host
simulator, device-specific recovery UI/updater extensions etc). This CL
finds a new home for the utils that are private to recovery.

Test: mmma bootable/recovery
Change-Id: I575e97ad099b85fe1c1c8c7c9458a5a43d4e11e1
parent 36f72131
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ cc_defaults {
        "libinstall",
        "librecovery_fastboot",
        "libminui",
        "librecovery_utils",
        "libotautil",

        // external dependencies
@@ -148,7 +149,7 @@ cc_binary {
    ],

    static_libs: [
        "libotautil",
        "librecovery_utils",
    ],

    init_rc: [
@@ -174,7 +175,7 @@ cc_binary {
    ],

    static_libs: [
        "libotautil",
        "librecovery_utils",
    ],

    init_rc: [
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
#include <android-base/unique_fd.h>
#include <fs_mgr/roots.h>

#include "otautil/roots.h"
#include "recovery_utils/roots.h"

static constexpr const char* SYSTEM_E2FSCK_BIN = "/system/bin/e2fsck_static";
static constexpr const char* TMP_E2FSCK_BIN = "/tmp/e2fsck.bin";
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ cc_defaults {
    ],

    static_libs: [
        "librecovery_utils",
        "libotautil",

        // external dependencies
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@
#include "fuse_provider.h"
#include "fuse_sideload.h"
#include "install/install.h"
#include "otautil/roots.h"
#include "recovery_utils/roots.h"

static constexpr const char* SDCARD_ROOT = "/sdcard";
// How long (in seconds) we wait for the fuse-provided package file to
+2 −2
Original line number Diff line number Diff line
@@ -51,11 +51,11 @@
#include "install/wipe_data.h"
#include "otautil/error_code.h"
#include "otautil/paths.h"
#include "otautil/roots.h"
#include "otautil/sysutil.h"
#include "otautil/thermalutil.h"
#include "private/setup_commands.h"
#include "recovery_ui/ui.h"
#include "recovery_utils/roots.h"
#include "recovery_utils/thermalutil.h"

using namespace std::chrono_literals;

Loading