MTP FFS updates:

This update splits old MTP code and new MTP code from Google
into two trees, legacy and ffs. Depending on the SDK level,
the build system will select the correct version. The reason
for separating the versions out are due to older android trees
not supporting the updated MTP code from Google.

Most MTP code is from Google, with additions needed from
implementing the Java functions in C++ for TWRP and FFS.

We assume if you are in android-9.0 or above, your kernel
has support for FFS over MTP. Verify that your init.rc
is mounting the MTP FFS driver to the proper location.

Change-Id: I4b107b239bd9bc5699527f9c8c77d9079f264a7e
This commit is contained in:
bigbiff bigbiff
2019-03-20 14:28:21 -05:00
committed by Ethan Yonker
parent e9a49efe75
commit af32bb9c4f
114 changed files with 13199 additions and 1113 deletions
+17 -2
View File
@@ -210,9 +210,19 @@ ifeq ($(shell git -C $(LOCAL_PATH) diff --quiet; echo $$?),1)
endif
LOCAL_CFLAGS += -DTW_GIT_REVISION='"$(tw_git_revision)"'
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0)
ifeq ($(TW_EXCLUDE_MTP),)
LOCAL_SHARED_LIBRARIES += libtwrpmtp-ffs
endif
else
ifeq ($(TW_EXCLUDE_MTP),)
LOCAL_CFLAGS += -DTW_HAS_LEGACY_MTP
LOCAL_SHARED_LIBRARIES += libtwrpmtp-legacy
endif
endif
#TWRP Build Flags
ifeq ($(TW_EXCLUDE_MTP),)
LOCAL_SHARED_LIBRARIES += libtwrpmtp
LOCAL_CFLAGS += -DTW_HAS_MTP
endif
ifneq ($(TW_NO_SCREEN_TIMEOUT),)
@@ -783,6 +793,12 @@ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -le 25; echo $$?),0)
include $(commands_TWRP_local_path)/bootloader_message/Android.mk
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0)
include $(commands_TWRP_local_path)/mtp/ffs/Android.mk
else
include $(commands_TWRP_local_path)/mtp/legacy/Android.mk
endif
ifeq ($(wildcard system/core/uncrypt/Android.mk),)
#include $(commands_TWRP_local_path)/uncrypt/Android.mk
endif
@@ -818,7 +834,6 @@ include $(commands_TWRP_local_path)/injecttwrp/Android.mk \
$(commands_TWRP_local_path)/openaes/Android.mk \
$(commands_TWRP_local_path)/toolbox/Android.mk \
$(commands_TWRP_local_path)/twrpTarMain/Android.mk \
$(commands_TWRP_local_path)/mtp/Android.mk \
$(commands_TWRP_local_path)/minzip/Android.mk \
$(commands_TWRP_local_path)/dosfstools/Android.mk \
$(commands_TWRP_local_path)/etc/Android.mk \