This library will need to mirror AOSP for any changes to installing packages. The library has been separated out in order to make importing updates from AOSP into the TWRP project. twinstall.cpp has been removed from the recovery binary and added to this library. It has been refactored for libziparchive. Sideload has been reworked to use the newer methods from AOSP on flashing packages through adb sideload. We are also removing old libraries for adb and verifier. Lastly before flashing a zip or image, we want to unlock block devices for writing so that when an OTA is flashed to the inactive slot, the flash will succeed. Change-Id: I6d8702fc9031ffaf9f666b4ba375dc7d9362e473
74 lines
2.0 KiB
Makefile
Executable File
74 lines
2.0 KiB
Makefile
Executable File
LOCAL_PATH := $(call my-dir)
|
|
|
|
# Build libtwrpmtp library
|
|
|
|
include $(CLEAR_VARS)
|
|
LOCAL_MODULE := libtwrpmtp-ffs
|
|
LOCAL_MODULE_TAGS := optional
|
|
LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -DMTP_DEVICE -DMTP_HOST -fno-strict-aliasing \
|
|
-Wno-unused-variable -Wno-format -Wno-unused-parameter -Wno-unused-private-field \
|
|
-Wno-implicit-fallthrough
|
|
LOCAL_C_INCLUDES += $(LOCAL_PATH) bionic \
|
|
frameworks/base/include \
|
|
system/core/include \
|
|
bionic/libc/private/ \
|
|
bootable/recovery/twrplibusbhost/include \
|
|
bootable/recovery/twrpinstall/include
|
|
|
|
LOCAL_SHARED_LIBRARIES += libc++
|
|
LOCAL_STATIC_LIBRARIES += libtwrpinstall
|
|
|
|
LOCAL_SRC_FILES = \
|
|
MtpDataPacket.cpp \
|
|
MtpDebug.cpp \
|
|
MtpDevice.cpp \
|
|
MtpDevHandle.cpp \
|
|
MtpDeviceInfo.cpp \
|
|
MtpEventPacket.cpp \
|
|
MtpObjectInfo.cpp \
|
|
MtpPacket.cpp \
|
|
MtpProperty.cpp \
|
|
MtpRequestPacket.cpp \
|
|
MtpResponsePacket.cpp \
|
|
MtpServer.cpp \
|
|
MtpStorage.cpp \
|
|
MtpStorageInfo.cpp \
|
|
MtpStringBuffer.cpp \
|
|
MtpUtils.cpp \
|
|
mtp_MtpServer.cpp \
|
|
btree.cpp \
|
|
twrpMtp.cpp \
|
|
mtp_MtpDatabase.cpp \
|
|
node.cpp
|
|
|
|
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0)
|
|
LOCAL_CFLAGS += -D_FFS_DEVICE
|
|
LOCAL_SHARED_LIBRARIES += libasyncio
|
|
LOCAL_SRC_FILES += \
|
|
MtpDescriptors.cpp \
|
|
MtpFfsHandle.cpp \
|
|
MtpFfsCompatHandle.cpp \
|
|
PosixAsyncIO.cpp
|
|
endif
|
|
|
|
LOCAL_SHARED_LIBRARIES += libz \
|
|
libc \
|
|
libusbhost \
|
|
libstdc++ \
|
|
libdl \
|
|
libcutils \
|
|
libutils \
|
|
libselinux \
|
|
libbase
|
|
|
|
LOCAL_C_INCLUDES += bootable/recovery/twrplibusbhost/include
|
|
|
|
ifneq ($(TW_MTP_DEVICE),)
|
|
LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE)
|
|
endif
|
|
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0)
|
|
LOCAL_CFLAGS += -DHAS_USBHOST_TIMEOUT
|
|
endif
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|