mirror of
https://github.com/PixelExperience-Devices/device_xiaomi_miatoll.git
synced 2025-04-29 02:37:19 +09:00
miatoll: Add libinit for variants handling
[dereference23: Adapt for miatoll] Signed-off-by: Alexander Winkowski <dereference23@outlook.com> Change-Id: Ia990f08d046192a42c0d951a2ce8d06b8794f6f0
This commit is contained in:
parent
0401c46d04
commit
6a9b01ab6a
@ -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
|
||||
|
||||
|
13
libinit/Android.bp
Normal file
13
libinit/Android.bp
Normal file
@ -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,
|
||||
}
|
83
libinit/init_xiaomi_miatoll.cpp
Normal file
83
libinit/init_xiaomi_miatoll.cpp
Normal file
@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright (C) 2021 The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <libinit_dalvik_heap.h>
|
||||
#include <libinit_variant.h>
|
||||
|
||||
#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<variant_info_t> variants = {
|
||||
curtanain_info,
|
||||
curtana_info,
|
||||
excalibur_info,
|
||||
gram_info,
|
||||
joyeuse_info,
|
||||
};
|
||||
|
||||
void vendor_load_properties() {
|
||||
search_variant(variants);
|
||||
set_dalvik_heap();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user