1d6fbcc389
When requested, kick off a thread that will migrate storage contents between two locations. This is performed in several steps that also interact with the framework: 1. Take old and new volumes offline during migration 2. Wipe new location clean (10% of progress) 3. Copy files from old to new (60% of progress) 4. Inform framework that move was successful so it can persist 5. Wipe old location clean (15% of progress) Derives a hacky progress estimate by using a rough proxy of free disk space changes while a cp/rm is taking place. Add new internal path for direct access to volumes to bypass any FUSE emulation overhead, and send it to framework. Remove mutex around various exec calls since setexeccon() is already per-thread. Bug: 19993667 Change-Id: Ibcb4f6fe0126d05b2365f316f53e71dc3e79a2b8
112 lines
2.5 KiB
Makefile
112 lines
2.5 KiB
Makefile
LOCAL_PATH:= $(call my-dir)
|
|
|
|
common_src_files := \
|
|
VolumeManager.cpp \
|
|
CommandListener.cpp \
|
|
VoldCommand.cpp \
|
|
NetlinkManager.cpp \
|
|
NetlinkHandler.cpp \
|
|
Process.cpp \
|
|
Ext4.cpp \
|
|
Fat.cpp \
|
|
Loop.cpp \
|
|
Devmapper.cpp \
|
|
ResponseCode.cpp \
|
|
CheckBattery.cpp \
|
|
VoldUtil.c \
|
|
fstrim.c \
|
|
cryptfs.c \
|
|
Disk.cpp \
|
|
VolumeBase.cpp \
|
|
PublicVolume.cpp \
|
|
PrivateVolume.cpp \
|
|
EmulatedVolume.cpp \
|
|
Utils.cpp \
|
|
MoveTask.cpp \
|
|
|
|
common_c_includes := \
|
|
system/extras/ext4_utils \
|
|
system/extras/f2fs_utils \
|
|
external/scrypt/lib/crypto \
|
|
frameworks/native/include \
|
|
system/security/keystore \
|
|
hardware/libhardware/include/hardware \
|
|
system/security/softkeymaster/include/keymaster
|
|
|
|
common_shared_libraries := \
|
|
libsysutils \
|
|
libbinder \
|
|
libcutils \
|
|
liblog \
|
|
libdiskconfig \
|
|
libhardware_legacy \
|
|
liblogwrap \
|
|
libext4_utils \
|
|
libf2fs_sparseblock \
|
|
libcrypto \
|
|
libselinux \
|
|
libutils \
|
|
libhardware \
|
|
libsoftkeymaster \
|
|
libbase \
|
|
|
|
common_static_libraries := \
|
|
libfs_mgr \
|
|
libsquashfs_utils \
|
|
libscrypt_static \
|
|
libmincrypt \
|
|
libbatteryservice
|
|
|
|
vold_conlyflags := -std=c11
|
|
vold_cflags := -Werror -Wall -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
|
LOCAL_MODULE := libvold
|
|
LOCAL_CLANG := true
|
|
LOCAL_SRC_FILES := $(common_src_files)
|
|
LOCAL_C_INCLUDES := $(common_c_includes)
|
|
LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
|
|
LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
|
|
LOCAL_MODULE_TAGS := eng tests
|
|
LOCAL_CFLAGS := $(vold_cflags)
|
|
LOCAL_CONLYFLAGS := $(vold_conlyflags)
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
|
LOCAL_MODULE:= vold
|
|
LOCAL_CLANG := true
|
|
LOCAL_SRC_FILES := \
|
|
main.cpp \
|
|
$(common_src_files)
|
|
|
|
LOCAL_C_INCLUDES := $(common_c_includes)
|
|
LOCAL_CFLAGS := $(vold_cflags)
|
|
LOCAL_CONLYFLAGS := $(vold_conlyflags)
|
|
|
|
ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
|
|
LOCAL_C_INCLUDES += $(TARGET_CRYPTFS_HW_PATH)
|
|
common_shared_libraries += libcryptfs_hw
|
|
LOCAL_CFLAGS += -DCONFIG_HW_DISK_ENCRYPTION
|
|
endif
|
|
|
|
LOCAL_SHARED_LIBRARIES := $(common_shared_libraries)
|
|
LOCAL_STATIC_LIBRARIES := $(common_static_libraries)
|
|
|
|
include $(BUILD_EXECUTABLE)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
|
LOCAL_CLANG := true
|
|
LOCAL_SRC_FILES:= vdc.c
|
|
LOCAL_MODULE:= vdc
|
|
LOCAL_SHARED_LIBRARIES := libcutils
|
|
LOCAL_CFLAGS := $(vold_cflags)
|
|
LOCAL_CONLYFLAGS := $(vold_conlyflags)
|
|
|
|
include $(BUILD_EXECUTABLE)
|