repack: move sbin to /system ramdisk and update repacking
for android-10

This will support updating the ramdisk to a different
compression format and co-exist with magisk.

We are also cleaning up and removing non android-10
api makefile actions.

We are also moving twrp repacking to its own class. We
check the new ramdisk format and if it's different
we have magisk compress using the new ramdisk format.

Change-Id: I770030aae7797e75817178b2f0fccd9f39dc23af
diff --git a/crypto/ext4crypt/Android.mk b/crypto/ext4crypt/Android.mk
index 955bd3b..8b1372b 100755
--- a/crypto/ext4crypt/Android.mk
+++ b/crypto/ext4crypt/Android.mk
@@ -75,10 +75,9 @@
 LOCAL_MODULE := twrpfbe
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
-LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
+LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/
 LOCAL_SRC_FILES := main.cpp
 LOCAL_SHARED_LIBRARIES := libe4crypt
-#LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64
 
 include $(BUILD_EXECUTABLE)
 
@@ -86,10 +85,10 @@
 LOCAL_MODULE := e4policyget
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
-LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
+LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/
 LOCAL_SRC_FILES := e4policyget.cpp
 LOCAL_SHARED_LIBRARIES := libe4crypt
-LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64
+LOCAL_LDFLAGS += -Wl,-dynamic-linker,/system/bin/linker64
 
 include $(BUILD_EXECUTABLE)
 
@@ -97,7 +96,7 @@
 LOCAL_MODULE := keystore_auth
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
-LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
+LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/
 LOCAL_SRC_FILES := keystore_auth.cpp
 LOCAL_SHARED_LIBRARIES := libc libkeystore_binder libutils libbinder liblog
 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0)
@@ -105,7 +104,7 @@
     LOCAL_CFLAGS += -DUSE_SECURITY_NAMESPACE
     LOCAL_SHARED_LIBRARIES += libkeystore_aidl
 endif
-LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64
+LOCAL_LDFLAGS += -Wl,-dynamic-linker,/system/bin/linker64
 
 include $(BUILD_EXECUTABLE)