f6176009b1
Stages TWRP's GUI engine and standalone tooling as PawletOS-owned modules instead of a bootable/recovery fork, per the plugin-architecture finding in NOTES-ota-recovery-ab.md: stock recovery_main.cpp already dlopen()s librecovery_ui_ext.so and dlsym()s make_device() from it at runtime, so the UI layer doesn't require touching stock bootable/recovery at all. Confirmed via source grep that recovery.cpp/install.cpp have zero references into the partition manager/backup engine/GUI code and vice versa. recovery_ui/: TWRP's gui/, minuitwrp/, libpixelflinger/ (copied verbatim, GPL-3.0), plus a new device/ providing PawletTwrpUI (a ScreenRecoveryUI subclass) and make_device() — written from scratch against stock's RecoveryUI/ScreenRecoveryUI virtual-method contract, since TWRP's own fork never ships a make_device() (every real TWRP device provides its own, and no reference device tree was available to copy from). Top-level Android.bp defines librecovery_ui_pawlet_twrp, the module TARGET_RECOVERY_UI_LIB should point at. gui/Android.bp and minuitwrp/Android.bp had their include_dirs rewritten for the new paths. recovery_toolkit/: partition manager, backup engine (tar/digest/adbbu/apex), filesystem/format support (exfat/dosfstools/gpt/fuse/mtp/crypto), scripting (openrecoveryscript/orscmd/twrpinstall), shared helpers. Source only, no Android.bp yet for any of it. Known gap blocking recovery_ui from actually linking: gui/'s libguitwrp depends on libaosprecovery, built from recovery_toolkit/helpers/twrp.cpp via a Go Soong plugin (libaosprecovery_defaults.go) not yet ported. Neither repo has been build-tested — no local AOSP build environment available in this workspace. See each directory's README.md for a precise done/not-done breakdown.
75 lines
2.0 KiB
Makefile
75 lines
2.0 KiB
Makefile
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 \
|
|
liblog
|
|
|
|
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)
|