diff --git a/mkbootimg/Android.bp b/mkbootimg/Android.bp index 576a677e7..c3cf74651 100644 --- a/mkbootimg/Android.bp +++ b/mkbootimg/Android.bp @@ -31,3 +31,34 @@ cc_library { header_libs: ["libmkbootimg_abi_headers"], export_header_lib_headers: ["libmkbootimg_abi_headers"], } + +python_defaults { + name: "mkbootimg_defaults", + + version: { + py2: { + enabled: true, + embedded_launcher: true, + }, + py3: { + enabled: false, + embedded_launcher: false, + }, + }, +} + +python_binary_host { + name: "mkbootimg", + defaults: ["mkbootimg_defaults"], + srcs: [ + "mkbootimg.py", + ], +} + +python_binary_host { + name: "unpack_bootimg", + defaults: ["mkbootimg_defaults"], + srcs: [ + "unpack_bootimg.py", + ], +} diff --git a/mkbootimg/Android.mk b/mkbootimg/Android.mk deleted file mode 100644 index 92e1e27d2..000000000 --- a/mkbootimg/Android.mk +++ /dev/null @@ -1,20 +0,0 @@ - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := mkbootimg -LOCAL_MODULE_CLASS := EXECUTABLES -LOCAL_IS_HOST_MODULE := true - -LOCAL_MODULE := mkbootimg - -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_SRC_FILES := unpack_bootimg -LOCAL_MODULE_CLASS := EXECUTABLES -LOCAL_IS_HOST_MODULE := true - -LOCAL_MODULE := unpack_bootimg - -include $(BUILD_PREBUILT) diff --git a/mkbootimg/mkbootimg b/mkbootimg/mkbootimg.py old mode 100755 new mode 100644 similarity index 100% rename from mkbootimg/mkbootimg rename to mkbootimg/mkbootimg.py diff --git a/mkbootimg/unpack_bootimg b/mkbootimg/unpack_bootimg.py old mode 100755 new mode 100644 similarity index 100% rename from mkbootimg/unpack_bootimg rename to mkbootimg/unpack_bootimg.py