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

Commit a867f0e1 authored by Steve Kondik's avatar Steve Kondik
Browse files

recovery: Don't link with minivold

 * There are issues with conflicting symbols in OpenSSL that cause some
   nasty problems. Let's just build minivold as a standalone binary so
   we avoid anything like this in the future as well.

Change-Id: I691a403bb377171989cba4ff74a515050862be40
parent efa6d29d
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ LOCAL_STATIC_LIBRARIES :=

LOCAL_CFLAGS += -DUSE_EXT4 -DMINIVOLD
LOCAL_C_INCLUDES += system/extras/ext4_utils system/core/fs_mgr/include external/fsck_msdos
LOCAL_C_INCLUDES += system/vold system/core/include system/core/libcutils
LOCAL_C_INCLUDES += system/vold

LOCAL_STATIC_LIBRARIES += libext4_utils_static libz libsparse_static

@@ -92,25 +92,19 @@ else
  LOCAL_SRC_FILES += $(BOARD_CUSTOM_RECOVERY_KEYMAPPING)
endif

LOCAL_STATIC_LIBRARIES += libvoldclient libsdcard libminipigz libfsck_msdos
LOCAL_STATIC_LIBRARIES += libmake_ext4fs libext4_utils_static libz libsparse_static
LOCAL_STATIC_LIBRARIES += libminivold libvoldclient
LOCAL_STATIC_LIBRARIES += libsysutils libdiskconfig libext2_blkid libext2_uuid liblogwrap libpower
LOCAL_STATIC_LIBRARIES += libsdcard libminipigz

LOCAL_STATIC_LIBRARIES += libcrypto_static
LOCAL_STATIC_LIBRARIES += libminzip libunz libmincrypt

LOCAL_STATIC_LIBRARIES += libminizip libminadbd libedify libbusybox libmkyaffs2image libunyaffs liberase_image libdump_image libflash_image
LOCAL_LDFLAGS += -Wl,--no-fatal-warnings

LOCAL_STATIC_LIBRARIES += libfs_mgr libdedupe libcrecovery libflashutils libmtdutils libmmcutils libbmlutils
LOCAL_STATIC_LIBRARIES += libfs_mgr libdedupe libcrypto_static libcrecovery libflashutils libmtdutils libmmcutils libbmlutils

ifeq ($(BOARD_USES_BML_OVER_MTD),true)
LOCAL_STATIC_LIBRARIES += libbml_over_mtd
endif

LOCAL_STATIC_LIBRARIES += libfsck_msdos

LOCAL_STATIC_LIBRARIES += libminui libpixelflinger_static libpng libcutils liblog
LOCAL_STATIC_LIBRARIES += libstdc++ libc

@@ -118,7 +112,7 @@ LOCAL_STATIC_LIBRARIES += libselinux

include $(BUILD_EXECUTABLE)

RECOVERY_LINKS := bu make_ext4fs edify busybox flash_image dump_image mkyaffs2image unyaffs erase_image nandroid reboot volume setprop getprop start stop dedupe minizip setup_adbd fsck_msdos newfs_msdos minivold vdc sdcard pigz
RECOVERY_LINKS := bu make_ext4fs edify busybox flash_image dump_image mkyaffs2image unyaffs erase_image nandroid reboot volume setprop getprop start stop dedupe minizip setup_adbd fsck_msdos newfs_msdos vdc sdcard pigz

# nc is provided by external/netcat
RECOVERY_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(RECOVERY_LINKS))
+1 −1
Original line number Diff line number Diff line
@@ -829,7 +829,7 @@ static int handle_volume_state_changed(char* label, char* path, int state) {
        state == State_Idle ||
        state == State_Formatting ||
        state == State_Shared)
    ui_print("%s: %s\n", path, stateToStr(state));
    ui_print("%s: %s\n", path, volume_state_to_string(state));
    return 0;
}

+0 −2
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ extern int setprop_main(int argc, char **argv);
extern int getprop_main(int argc, char **argv);
extern int fsck_msdos_main(int argc, char **argv);
extern int newfs_msdos_main(int argc, char **argv);
extern int vold_main(int argc, char **argv);
extern int vdc_main(int argc, char **argv);
extern int pigz_main(int argc, char **argv);
extern int sdcard_main(int argc, char **argv);
@@ -69,7 +68,6 @@ static const struct recovery_cmd recovery_cmds[] = {
    { "getprop",        getprop_main },
    { "fsck_msdos",     fsck_msdos_main },
    { "newfs_msdos",    newfs_msdos_main },
    { "minivold",       vold_main },
    { "vdc",            vdc_main },
    { "pigz",           pigz_main },
    { "sdcard",         sdcard_main },
+26 −0
Original line number Diff line number Diff line
@@ -106,3 +106,29 @@ int vold_format_volume(const char* path, int wait) {
    const char* cmd[3] = { "volume", "format", path };
    return vold_command(3, cmd, wait);
}

const char* volume_state_to_string(int state) {
    if (state == State_Init)
        return "Initializing";
    else if (state == State_NoMedia)
        return "No-Media";
    else if (state == State_Idle)
        return "Idle-Unmounted";
    else if (state == State_Pending)
        return "Pending";
    else if (state == State_Mounted)
        return "Mounted";
    else if (state == State_Unmounting)
        return "Unmounting";
    else if (state == State_Checking)
        return "Checking";
    else if (state == State_Formatting)
        return "Formatting";
    else if (state == State_Shared)
        return "Shared-Unmounted";
    else if (state == State_SharedMnt)
        return "Shared-Mounted";
    else
        return "Unknown-Error";
}
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ struct vold_callbacks {
void vold_client_start(struct vold_callbacks* callbacks, int automount);
void vold_set_automount(int enabled);
int vold_command(int len, const char** command, int wait);
const char* volume_state_to_string(int state);

#endif