diff --git a/BoardConfig.mk b/BoardConfig.mk index 7ddaf9a..6d54ba2 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -18,6 +18,11 @@ ODM_MANIFEST_SKUS += \ ODM_MANIFEST_NFC_FILES := $(DEVICE_PATH)/manifest_nfc.xml +# Init +TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):init_xiaomi_miatoll +TARGET_RECOVERY_DEVICE_MODULES := init_xiaomi_miatoll + + # OTA assert TARGET_OTA_ASSERT_DEVICE := curtana,excalibur,gram,joyeuse,miatoll diff --git a/libinit/Android.bp b/libinit/Android.bp new file mode 100644 index 0000000..02d1568 --- /dev/null +++ b/libinit/Android.bp @@ -0,0 +1,13 @@ +// +// Copyright (C) 2021 The LineageOS Project +// +// SPDX-License-Identifier: Apache-2.0 +// + +cc_library_static { + name: "init_xiaomi_miatoll", + srcs: ["init_xiaomi_miatoll.cpp"], + whole_static_libs: ["//device/xiaomi/sm6250-common:libinit_xiaomi_atoll"], + include_dirs: ["system/core/init"], + recovery_available: true, +} diff --git a/libinit/init_xiaomi_miatoll.cpp b/libinit/init_xiaomi_miatoll.cpp new file mode 100644 index 0000000..382d464 --- /dev/null +++ b/libinit/init_xiaomi_miatoll.cpp @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2021 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +#include "vendor_init.h" + +static const variant_info_t curtanain_info = { + .hwc_value = "India", + + .brand = "Redmi", + .device = "curtana", + .model = "Redmi Note 9 Pro", + .build_description = "curtana_in-user 11 RKQ1.200826.002 V12.0.5.0.RJWINXM release-keys", + .build_fingerprint = "Redmi/curtana_in/curtana:11/RKQ1.200826.002/V12.0.5.0.RJWINXM:user/release-keys", + + .nfc = false, +}; + +static const variant_info_t curtana_info = { + .hwc_value = "", + + .brand = "Redmi", + .device = "curtana", + .model = "Redmi Note 9S", + .build_description = "curtana_global-user 11 RKQ1.200826.002 V12.0.4.0.RJWMIXM release-keys", + .build_fingerprint = "Redmi/curtana_global/curtana:11/RKQ1.200826.002/V12.0.4.0.RJWMIXM:user/release-keys", + + .nfc = false, +}; + +static const variant_info_t excalibur_info = { + .hwc_value = "", + + .brand = "Redmi", + .device = "excalibur", + .model = "Redmi Note 9 Pro Max", + .build_description = "excalibur_in-user 11 RKQ1.200826.002 V12.0.1.0.RJXINXM release-keys", + .build_fingerprint = "Redmi/excalibur_in/excalibur:11/RKQ1.200826.002/V12.0.1.0.RJXINXM:user/release-keys", + + .nfc = false, +}; + +static const variant_info_t gram_info = { + .hwc_value = "", + + .brand = "POCO", + .device = "gram", + .model = "POCO M2 Pro", + .build_description = "gram_in-user 11 RKQ1.200826.002 V12.0.1.0.RJPINXM release-keys", + .build_fingerprint = "POCO/gram_in/gram:11/RKQ1.200826.002/V12.0.1.0.RJPINXM:user/release-keys", + + .nfc = false, +}; + +static const variant_info_t joyeuse_info = { + .hwc_value = "", + + .brand = "Redmi", + .device = "joyeuse", + .model = "Redmi Note 9 Pro", + .build_description = "joyeuse_global-user 11 RKQ1.200826.002 V12.0.4.0.RJZMIXM release-keys", + .build_fingerprint = "Redmi/joyeuse_global/joyeuse:11/RKQ1.200826.002/V12.0.4.0.RJZMIXM:user/release-keys", + + .nfc = true, +}; + +static const std::vector variants = { + curtanain_info, + curtana_info, + excalibur_info, + gram_info, + joyeuse_info, +}; + +void vendor_load_properties() { + search_variant(variants); + set_dalvik_heap(); +}