nemo: Rebrand to nemo
This commit is contained in:
@@ -2,7 +2,7 @@ soong_namespace {
|
||||
imports: [
|
||||
"hardware/google/interfaces",
|
||||
"hardware/google/pixel",
|
||||
"vendor/realme/RM6785-common",
|
||||
"vendor/realme/nemo",
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#
|
||||
# Copyright (C) 2021-2022 The LineageOS Project
|
||||
# Copyright (C) 2021-2025 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifneq ($(filter RMX2001L1 RMX2151L1,$(TARGET_DEVICE)),)
|
||||
ifeq ($(TARGET_DEVICE),nemo)
|
||||
subdir_makefiles=$(call first-makefiles-under,$(LOCAL_PATH))
|
||||
$(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk)))
|
||||
|
||||
|
||||
9
AndroidProducts.mk
Normal file
9
AndroidProducts.mk
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# Copyright (C) 2023 The PixelOS Project
|
||||
# Copyright (C) 2025 The crDroid Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
PRODUCT_MAKEFILES := \
|
||||
$(LOCAL_DIR)/lineage_nemo.mk
|
||||
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Copyright (C) 2021-2023 The LineageOS Project
|
||||
# Copyright (C) 2021-2025 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
COMMON_PATH := device/realme/RM6785-common
|
||||
DEVICE_PATH := device/realme/nemo
|
||||
|
||||
# Platform
|
||||
TARGET_BOARD_PLATFORM := mt6785
|
||||
@@ -31,6 +31,9 @@ BOARD_AVB_RECOVERY_ALGORITHM := SHA256_RSA4096
|
||||
BOARD_AVB_RECOVERY_ROLLBACK_INDEX := 1
|
||||
BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION := 1
|
||||
|
||||
# Assert
|
||||
TARGET_OTA_ASSERT_DEVICE := RMX2001,RMX2001L1,RMX2003L1,RMX2005L1,RMX2002L1,RM6785,nemo
|
||||
|
||||
# Bootloader
|
||||
TARGET_BOOTLOADER_BOARD_NAME := oppo6785
|
||||
TARGET_NO_BOOTLOADER := true
|
||||
@@ -40,8 +43,8 @@ TARGET_SCREEN_DENSITY := 420
|
||||
|
||||
# Kernel
|
||||
BOARD_KERNEL_CMDLINE := bootopt=64S3,32N2,64N2
|
||||
TARGET_KERNEL_SOURCE := kernel/realme/mt6785
|
||||
TARGET_KERNEL_CONFIG := RM6785_defconfig
|
||||
TARGET_KERNEL_SOURCE := kernel/realme/nemo
|
||||
TARGET_KERNEL_CONFIG := nemo_defconfig
|
||||
TARGET_KERNEL_ADDITIONAL_FLAGS := HOSTCFLAGS="-fuse-ld=lld -Wno-unused-command-line-argument"
|
||||
BOARD_KERNEL_IMAGE_NAME := Image.gz
|
||||
BOARD_INCLUDE_DTB_IN_BOOTIMG := true
|
||||
@@ -61,8 +64,8 @@ BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
|
||||
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += \
|
||||
hardware/mediatek/vintf/mediatek_framework_compatibility_matrix.xml \
|
||||
vendor/lineage/config/device_framework_matrix.xml \
|
||||
$(COMMON_PATH)/device_framework_matrix.xml
|
||||
DEVICE_MANIFEST_FILE += $(COMMON_PATH)/manifest.xml
|
||||
$(DEVICE_PATH)/device_framework_matrix.xml
|
||||
DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/manifest.xml
|
||||
|
||||
# Metadata
|
||||
BOARD_USES_METADATA_PARTITION := true
|
||||
@@ -72,6 +75,7 @@ BOARD_FLASH_BLOCK_SIZE := 131072
|
||||
BOARD_BOOTIMAGE_PARTITION_SIZE := 33554432
|
||||
BOARD_CACHEIMAGE_PARTITION_SIZE := 452984832
|
||||
BOARD_DTBOIMG_PARTITION_SIZE := 8388608
|
||||
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
|
||||
|
||||
TARGET_RO_FILE_SYSTEM_TYPE ?= ext4
|
||||
BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := $(TARGET_RO_FILE_SYSTEM_TYPE)
|
||||
@@ -93,27 +97,27 @@ BOARD_MAIN_SIZE := 6975127552 # ( BOARD_SUPER_PARTITION_SIZE - 4MB )
|
||||
BOARD_MAIN_PARTITION_LIST := system product vendor odm system_ext
|
||||
|
||||
# Properties
|
||||
TARGET_PRODUCT_PROP += $(COMMON_PATH)/product.prop
|
||||
TARGET_SYSTEM_PROP += $(COMMON_PATH)/system.prop
|
||||
TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.prop
|
||||
TARGET_PRODUCT_PROP += $(DEVICE_PATH)/product.prop
|
||||
TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop
|
||||
TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
|
||||
|
||||
# Recovery
|
||||
TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/rootdir/etc/fstab.mt6785
|
||||
TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.mt6785
|
||||
TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
|
||||
TARGET_USERIMAGES_USE_EXT4 := true
|
||||
TARGET_USERIMAGES_USE_F2FS := true
|
||||
|
||||
# Releasetools
|
||||
TARGET_RELEASETOOLS_EXTENSIONS := $(COMMON_PATH)
|
||||
TARGET_RELEASETOOLS_EXTENSIONS := $(DEVICE_PATH)
|
||||
|
||||
# RIL
|
||||
ENABLE_VENDOR_RIL_SERVICE := true
|
||||
|
||||
# SELinux
|
||||
include device/mediatek/sepolicy_vndr/SEPolicy.mk
|
||||
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/private
|
||||
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/public
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor
|
||||
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/private
|
||||
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/public
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
|
||||
|
||||
# SPL
|
||||
VENDOR_SECURITY_PATCH := 2022-05-05
|
||||
@@ -4,9 +4,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cc_binary {
|
||||
name: "android.hardware.light-service.RM6785",
|
||||
init_rc: ["android.hardware.light-service.RM6785.rc"],
|
||||
vintf_fragments: ["android.hardware.light-service.RM6785.xml"],
|
||||
name: "android.hardware.light-service.nemo",
|
||||
init_rc: ["android.hardware.light-service.nemo.rc"],
|
||||
vintf_fragments: ["android.hardware.light-service.nemo.xml"],
|
||||
relative_install_path: "hw",
|
||||
srcs: [
|
||||
"main.cpp",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
service vendor.light-hal-2-0.RM6785 /vendor/bin/hw/android.hardware.light-service.RM6785
|
||||
service vendor.light-hal-2-0.nemo /vendor/bin/hw/android.hardware.light-service.nemo
|
||||
class hal
|
||||
user system
|
||||
group system
|
||||
@@ -4,9 +4,9 @@
|
||||
//
|
||||
|
||||
cc_binary {
|
||||
name: "vendor.lineage.touch-service.RM6785",
|
||||
init_rc: ["vendor.lineage.touch-service.RM6785.rc"],
|
||||
vintf_fragments: ["vendor.lineage.touch-service.RM6785.xml"],
|
||||
name: "vendor.lineage.touch-service.nemo",
|
||||
init_rc: ["vendor.lineage.touch-service.nemo.rc"],
|
||||
vintf_fragments: ["vendor.lineage.touch-service.nemo.xml"],
|
||||
relative_install_path: "hw",
|
||||
srcs: [
|
||||
"TouchscreenGesture.cpp",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_TAG "vendor.lineage.touch-service.RM6785"
|
||||
#define LOG_TAG "vendor.lineage.touch-service.nemo"
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <android/binder_manager.h>
|
||||
|
||||
@@ -24,7 +24,7 @@ on boot
|
||||
chown system system /proc/touchpanel/up_arrow_enable
|
||||
chown system system /proc/touchpanel/up_swipe_enable
|
||||
|
||||
service vendor.touch-hal /vendor/bin/hw/vendor.lineage.touch-service.RM6785
|
||||
service vendor.touch-hal /vendor/bin/hw/vendor.lineage.touch-service.nemo
|
||||
class hal
|
||||
user system
|
||||
group system
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
|
||||
# Call proprietary blob setup
|
||||
$(call inherit-product, vendor/realme/RM6785-common/RM6785-common-vendor.mk)
|
||||
$(call inherit-product, vendor/realme/nemo/nemo-vendor.mk)
|
||||
|
||||
# Shipping API
|
||||
PRODUCT_SHIPPING_API_LEVEL := 29
|
||||
@@ -64,7 +64,7 @@ PRODUCT_PACKAGES += \
|
||||
|
||||
# Fingerprint
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.biometrics.fingerprint@2.1-service.RM6785
|
||||
android.hardware.biometrics.fingerprint@2.1-service.nemo
|
||||
|
||||
# FM Radio
|
||||
PRODUCT_PACKAGES += \
|
||||
@@ -96,14 +96,14 @@ PRODUCT_PACKAGES += \
|
||||
init.mt6785.usb.rc \
|
||||
init.project.rc \
|
||||
init.sensor_1_0.rc \
|
||||
init.RM6785.rc \
|
||||
init.nemo.rc \
|
||||
ueventd.mtk.rc \
|
||||
ueventd.RM6785.rc
|
||||
ueventd.nemo.rc
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
init_RM6785_vendor
|
||||
init_nemo_vendor
|
||||
|
||||
$(call soong_config_set,libinit,vendor_init_lib,//$(LOCAL_PATH):libinit_RM6785)
|
||||
$(call soong_config_set,libinit,vendor_init_lib,//$(LOCAL_PATH):libinit_nemo)
|
||||
|
||||
# Kernel
|
||||
PRODUCT_SET_DEBUGFS_RESTRICTIONS := true
|
||||
@@ -119,7 +119,7 @@ PRODUCT_PACKAGES += \
|
||||
|
||||
# Lights
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.light-service.RM6785
|
||||
android.hardware.light-service.nemo
|
||||
|
||||
# Lineage Health
|
||||
PRODUCT_PACKAGES += \
|
||||
@@ -159,7 +159,7 @@ DEVICE_PACKAGE_OVERLAYS += \
|
||||
PRODUCT_PACKAGES += \
|
||||
FrameworksOverlayRMX2151 \
|
||||
FrameworksOverlayRMX2161 \
|
||||
SettingsOverlayRM6785 \
|
||||
SettingsOverlayNemo \
|
||||
SettingsProviderOverlay6 \
|
||||
SettingsProviderOverlay6i \
|
||||
SettingsProviderOverlay6s \
|
||||
@@ -285,7 +285,7 @@ PRODUCT_COPY_FILES += \
|
||||
|
||||
# Touch
|
||||
PRODUCT_PACKAGES += \
|
||||
vendor.lineage.touch-service.RM6785
|
||||
vendor.lineage.touch-service.nemo
|
||||
|
||||
# Update
|
||||
AB_OTA_UPDATER := false
|
||||
@@ -306,8 +306,8 @@ PRODUCT_PACKAGES += \
|
||||
|
||||
# Wi-Fi
|
||||
PRODUCT_PACKAGES += \
|
||||
TetheringConfigOverlayRM6785 \
|
||||
WifiOverlayRM6785 \
|
||||
TetheringConfigOverlayNemo \
|
||||
WifiOverlayNemo \
|
||||
libwifi-hal-wrapper \
|
||||
hostapd \
|
||||
wpa_supplicant \
|
||||
24
evolution.dependencies
Normal file
24
evolution.dependencies
Normal file
@@ -0,0 +1,24 @@
|
||||
[
|
||||
{
|
||||
"repository" : "vendor_realme_nemo",
|
||||
"branch" : "bka",
|
||||
"target_path" : "vendor/realme/nemo"
|
||||
},
|
||||
{
|
||||
"remote" : "github-non-los",
|
||||
"repository" : "crdroidandroid/android_hardware_mediatek",
|
||||
"branch" : "15.0",
|
||||
"target_path" : "hardware/mediatek"
|
||||
},
|
||||
{
|
||||
"repository" : "kernel_realme_nemo",
|
||||
"branch" : "bka",
|
||||
"target_path" : "kernel/realme/nemo"
|
||||
},
|
||||
{
|
||||
"remote" : "github-non-los",
|
||||
"repository" : "crdroidandroid/android_device_mediatek_sepolicy_vndr",
|
||||
"branch" : "16.0",
|
||||
"target_path" : "device/mediatek/sepolicy_vndr"
|
||||
}
|
||||
]
|
||||
222
extract-files.sh
222
extract-files.sh
@@ -1,18 +1,22 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2016 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2023 The LineageOS Project
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
||||
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
DEVICE=nemo
|
||||
VENDOR=realme
|
||||
|
||||
# Load extract_utils and do some sanity checks
|
||||
MY_DIR="${BASH_SOURCE%/*}"
|
||||
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
||||
|
||||
ANDROID_ROOT="${MY_DIR}"/../../..
|
||||
ANDROID_ROOT="${MY_DIR}/../../.."
|
||||
|
||||
export TARGET_ENABLE_CHECKELF=true
|
||||
|
||||
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
||||
if [ ! -f "${HELPER}" ]; then
|
||||
@@ -21,110 +25,21 @@ if [ ! -f "${HELPER}" ]; then
|
||||
fi
|
||||
source "${HELPER}"
|
||||
|
||||
function blob_fixup {
|
||||
case "$1" in
|
||||
product/etc/permissions/com.android.hotwordenrollment.common.util.xml)
|
||||
sed -i 's/my_product/product/' "$2"
|
||||
;;
|
||||
system_ext/lib64/libsource.so)
|
||||
grep -q libui_shim.so "$2" || "$PATCHELF" --add-needed libui_shim.so "$2"
|
||||
;;
|
||||
system_ext/lib64/libimsma.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
"${PATCHELF}" --replace-needed "libsink.so" "libsink-mtk.so" "${2}"
|
||||
;;
|
||||
vendor/bin/hw/android.hardware.neuralnetworks@1.3-service-mtk-neuron)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "libbase_shim.so" "${2}" || "${PATCHELF}" --add-needed "libbase_shim.so" "${2}"
|
||||
;;
|
||||
vendor/bin/hw/mtkfusionrild)
|
||||
[ "$2" = "" ] && return 0
|
||||
"${PATCHELF}" --add-needed "libutils-v32.so" "${2}"
|
||||
;;
|
||||
vendor/etc/init/android.hardware.bluetooth@1.0-service-mediatek.rc)
|
||||
sed -i '/vts/Q' "$2"
|
||||
;;
|
||||
vendor/lib64/libmtkcam_featurepolicy.so)
|
||||
# evaluateCaptureConfiguration()
|
||||
sed -i "s/\x34\xE8\x87\x40\xB9/\x34\x28\x02\x80\x52/" "$2"
|
||||
;;
|
||||
vendor/lib64/libutils-v30.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "libprocessgroup_shim.so" "${2}" || "${PATCHELF}" --add-needed "libprocessgroup_shim.so" "${2}"
|
||||
;;
|
||||
vendor/lib64/hw/dfps.mt6785.so |\
|
||||
vendor/lib64/hw/vendor.mediatek.hardware.pq@2.6-impl.so)
|
||||
"$PATCHELF" --replace-needed "libutils.so" "libutils-v32.so" "$2"
|
||||
;;
|
||||
vendor/lib/hw/audio.primary.mt6785.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
"${PATCHELF}" --add-needed "libshim_audio.so" "${2}"
|
||||
"$PATCHELF" --replace-needed "libalsautils.so" "libalsautils-v30.so" "$2"
|
||||
;;
|
||||
vendor/lib/hw/audio.usb.mt6785.so)
|
||||
"$PATCHELF" --replace-needed "libalsautils.so" "libalsautils-v30.so" "$2"
|
||||
;;
|
||||
vendor/lib/libmnl.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "libcutils.so" "${2}" || "${PATCHELF}" --add-needed "libcutils.so" "${2}"
|
||||
;;
|
||||
vendor/lib64/hw/android.hardware.camera.provider@2.6-impl-mediatek.so)
|
||||
grep -q "libcamera_metadata_shim.so" "${2}" || "${PATCHELF}" --add-needed "libcamera_metadata_shim.so" "${2}"
|
||||
;;
|
||||
vendor/lib64/lib3a.flash.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "liblog.so" "${2}" || "${PATCHELF_0_17_2}" --add-needed "liblog.so" "${2}"
|
||||
;;
|
||||
vendor/lib64/libcam.halsensor.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "libshim_utils.so" "$2" || "$PATCHELF" --add-needed "libshim_utils.so" "$2"
|
||||
;;
|
||||
vendor/lib64/libmtkcam_stdutils.so)
|
||||
"$PATCHELF" --replace-needed "libutils.so" "libutils-v30.so" "$2"
|
||||
;;
|
||||
vendor/lib/libMtkOmxCore.so)
|
||||
sed -i "s/mtk.vendor.omx.core.log/ro.vendor.mtk.omx.log\x00\x00/" "$2"
|
||||
;;
|
||||
vendor/lib/libMtkOmxVdecEx.so)
|
||||
"$PATCHELF" --replace-needed "libui.so" "libui-v32.so" "$2"
|
||||
sed -i "s/ro.mtk_crossmount_support/ro.vendor.mtk_crossmount\x00/" "$2"
|
||||
sed -i "s/ro.mtk_deinterlace_support/ro.vendor.mtk_deinterlace\x00/" "$2"
|
||||
;;
|
||||
vendor/lib/libaudio_param_parser-vnd.so)
|
||||
sed -i "s/\x00audio.tuning.def_path/\x00ro.vendor.tuning_path/" "$2"
|
||||
sed -i "s/\x20audio.tuning.def_path/\x20ro.vendor.tuning_path/" "$2"
|
||||
;;
|
||||
vendor/bin/mnld|\
|
||||
vendor/lib*/libaalservice.so|\
|
||||
vendor/lib64/libcam.utils.sensorprovider.so)
|
||||
grep -q "android.hardware.sensors@1.0-convert-shared.so" "$2" || "$PATCHELF" --add-needed "android.hardware.sensors@1.0-convert-shared.so" "$2"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Default to sanitizing the vendor folder before extraction
|
||||
CLEAN_VENDOR=true
|
||||
|
||||
ONLY_COMMON=
|
||||
ONLY_FIRMWARE=
|
||||
ONLY_TARGET=
|
||||
KANG=
|
||||
ONLY_FIRMWARE=
|
||||
SECTION=
|
||||
|
||||
while [ "${#}" -gt 0 ]; do
|
||||
case "${1}" in
|
||||
--only-common )
|
||||
ONLY_COMMON=true
|
||||
-n | --no-cleanup )
|
||||
CLEAN_VENDOR=false
|
||||
;;
|
||||
--only-firmware )
|
||||
ONLY_FIRMWARE=true
|
||||
;;
|
||||
--only-target )
|
||||
ONLY_TARGET=true
|
||||
;;
|
||||
-n | --no-cleanup )
|
||||
CLEAN_VENDOR=false
|
||||
;;
|
||||
-k | --kang )
|
||||
KANG="--kang"
|
||||
;;
|
||||
@@ -143,27 +58,112 @@ if [ -z "${SRC}" ]; then
|
||||
SRC="adb"
|
||||
fi
|
||||
|
||||
if [ -z "${ONLY_TARGET}" ]; then
|
||||
# Initialize the helper for common device
|
||||
setup_vendor "${DEVICE_COMMON}" "${VENDOR_COMMON:-$VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}"
|
||||
function blob_fixup() {
|
||||
case "${1}" in
|
||||
product/etc/permissions/com.android.hotwordenrollment.common.util.xml)
|
||||
sed -i 's/my_product/product/' "$2"
|
||||
;;
|
||||
vendor/lib/hw/audio.primary.mt6785.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
"${PATCHELF}" --add-needed "libshim_audio.so" "${2}"
|
||||
"${PATCHELF}" --replace-needed "libalsautils.so" "libalsautils-v30.so" "${2}"
|
||||
;;
|
||||
vendor/lib/hw/audio.usb.mt6785.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
"${PATCHELF}" --replace-needed "libalsautils.so" "libalsautils-v30.so" "${2}"
|
||||
;;
|
||||
vendor/lib64/hw/android.hardware.camera.provider@2.6-impl-mediatek.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "libcamera_metadata_shim.so" "${2}" || "${PATCHELF}" --add-needed "libcamera_metadata_shim.so" "${2}"
|
||||
;;
|
||||
vendor/etc/init/android.hardware.bluetooth@1.0-service-mediatek.rc)
|
||||
[ "$2" = "" ] && return 0
|
||||
sed -i '/vts/Q' "$2"
|
||||
;;
|
||||
vendor/lib64/libmtkcam_stdutils.so \
|
||||
|vendor/lib64/hw/dfps.mt6785.so \
|
||||
|vendor/lib64/hw/vendor.mediatek.hardware.pq@2.6-impl.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
"${PATCHELF}" --replace-needed "libutils.so" "libutils-v30.so" "${2}"
|
||||
;;
|
||||
vendor/lib/libMtkOmxCore.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
sed -i "s/mtk.vendor.omx.core.log/ro.vendor.mtk.omx.log\x00\x00/" "$2"
|
||||
;;
|
||||
vendor/lib/libMtkOmxVdecEx.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
"${PATCHELF}" --replace-needed "libui.so" "libui-v32.so" "$2"
|
||||
sed -i "s/ro.mtk_crossmount_support/ro.vendor.mtk_crossmount\x00/" "$2"
|
||||
sed -i "s/ro.mtk_deinterlace_support/ro.vendor.mtk_deinterlace\x00/" "$2"
|
||||
;;
|
||||
vendor/lib/libaudio_param_parser-vnd.so)
|
||||
sed -i "s/\x00audio.tuning.def_path/\x00ro.vendor.tuning_path/" "$2"
|
||||
sed -i "s/\x20audio.tuning.def_path/\x20ro.vendor.tuning_path/" "$2"
|
||||
;;
|
||||
vendor/lib64/libmtkcam_featurepolicy.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
# evaluateCaptureConfiguration()
|
||||
sed -i "s/\x34\xE8\x87\x40\xB9/\x34\x28\x02\x80\x52/" "$2"
|
||||
;;
|
||||
vendor/bin/mnld \
|
||||
|vendor/lib*/libaalservice.so \
|
||||
|vendor/lib*/libcam.utils.sensorprovider.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "android.hardware.sensors@1.0-convert-shared.so" "$2" || "$PATCHELF" --add-needed "android.hardware.sensors@1.0-convert-shared.so" "$2"
|
||||
;;
|
||||
system_ext/lib64/libsource.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q libui_shim.so "$2" || "$PATCHELF" --add-needed libui_shim.so "$2"
|
||||
;;
|
||||
vendor/lib64/lib3a.flash.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "liblog.so" "${2}" || "${PATCHELF_0_17_2}" --add-needed "liblog.so" "${2}"
|
||||
;;
|
||||
vendor/lib64/libcam.halsensor.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "libshim_utils.so" "$2" || "$PATCHELF" --add-needed "libshim_utils.so" "$2"
|
||||
;;
|
||||
vendor/lib/libmnl.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "libcutils.so" "${2}" || "${PATCHELF}" --add-needed "libcutils.so" "${2}"
|
||||
;;
|
||||
vendor/bin/hw/android.hardware.neuralnetworks@1.3-service-mtk-neuron)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "libbase_shim.so" "${2}" || "${PATCHELF}" --add-needed "libbase_shim.so" "${2}"
|
||||
;;
|
||||
vendor/lib64/libutils-v30.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "libprocessgroup_shim.so" "${2}" || "${PATCHELF}" --add-needed "libprocessgroup_shim.so" "${2}"
|
||||
;;
|
||||
system_ext/lib64/libimsma.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
"${PATCHELF}" --replace-needed "libsink.so" "libsink-mtk.so" "${2}"
|
||||
;;
|
||||
vendor/bin/hw/mtkfusionrild)
|
||||
[ "$2" = "" ] && return 0
|
||||
"${PATCHELF}" --add-needed "libutils-v32.so" "${2}"
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "${ONLY_FIRMWARE}" ]; then
|
||||
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
|
||||
fi
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" ]; then
|
||||
# Reinitialize the helper for device
|
||||
source "${MY_DIR}/../../${VENDOR}/${DEVICE}/extract-files.sh"
|
||||
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
|
||||
function blob_fixup_dry() {
|
||||
blob_fixup "$1" ""
|
||||
}
|
||||
|
||||
if [ -z "${ONLY_FIRMWARE}" ]; then
|
||||
extract "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
|
||||
fi
|
||||
# Initialize the helper
|
||||
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
|
||||
|
||||
if [ -z "${ONLY_FIRMWARE}" ]; then
|
||||
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
|
||||
fi
|
||||
|
||||
if [ -z "${SECTION}" ]; then
|
||||
extract_firmware "${MY_DIR}/proprietary-firmware.txt" "${SRC}"
|
||||
fi
|
||||
|
||||
"${MY_DIR}/setup-makefiles.sh"
|
||||
"${MY_DIR}/setup-makefiles.sh"
|
||||
@@ -1,8 +1,8 @@
|
||||
cc_binary {
|
||||
name: "android.hardware.biometrics.fingerprint@2.1-service.RM6785",
|
||||
name: "android.hardware.biometrics.fingerprint@2.1-service.nemo",
|
||||
defaults: ["hidl_defaults"],
|
||||
init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.RM6785.rc"],
|
||||
vintf_fragments: ["android.hardware.biometrics.fingerprint@2.1-service.RM6785.xml"],
|
||||
init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.nemo.rc"],
|
||||
vintf_fragments: ["android.hardware.biometrics.fingerprint@2.1-service.nemo.xml"],
|
||||
relative_install_path: "hw",
|
||||
srcs: [
|
||||
"BiometricsFingerprint.cpp",
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.RM6785"
|
||||
#define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.1-service.RM6785"
|
||||
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.nemo"
|
||||
#define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.1-service.nemo"
|
||||
|
||||
#include <hardware/hardware.h>
|
||||
#include <hardware/fingerprint.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
service vendor.fps_hal.mt6785 /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.RM6785
|
||||
service vendor.fps_hal.mt6785 /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.nemo
|
||||
# "class hal" causes a race condition on some devices due to files created
|
||||
# in /data. As a workaround, postpone startup until later in boot once
|
||||
# /data is mounted.
|
||||
@@ -4,7 +4,7 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.RM6785"
|
||||
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.nemo"
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <hidl/HidlTransportSupport.h>
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cc_library_static {
|
||||
name: "libinit_RM6785",
|
||||
name: "libinit_nemo",
|
||||
recovery_available: true,
|
||||
whole_static_libs: ["libbase"],
|
||||
header_libs: [
|
||||
"libbase_headers",
|
||||
],
|
||||
srcs: ["init_RM6785.cpp"],
|
||||
srcs: ["init_nemo.cpp"],
|
||||
include_dirs: [
|
||||
"system/core/init"
|
||||
]
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "init_RM6785_vendor",
|
||||
init_rc: ["init_RM6785_vendor.rc"],
|
||||
srcs: ["init_RM6785_vendor.cpp"],
|
||||
name: "init_nemo_vendor",
|
||||
init_rc: ["init_nemo_vendor.rc"],
|
||||
srcs: ["init_nemo_vendor.cpp"],
|
||||
shared_libs: ["libbase"],
|
||||
vendor: true,
|
||||
}
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
on init
|
||||
exec - root root -- /vendor/bin/init_RM6785_vendor
|
||||
2
init/init_nemo_vendor.rc
Normal file
2
init/init_nemo_vendor.rc
Normal file
@@ -0,0 +1,2 @@
|
||||
on init
|
||||
exec - root root -- /vendor/bin/init_nemo_vendor
|
||||
@@ -1,4 +1,4 @@
|
||||
hidl_package_root {
|
||||
name: "vendor.oplus.hardware",
|
||||
path: "device/realme/RM6785-common/interfaces",
|
||||
path: "device/realme/nemo/interfaces",
|
||||
}
|
||||
|
||||
32
lineage_nemo.mk
Normal file
32
lineage_nemo.mk
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# Copyright (C) 2023-2025 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
# Inherit from those products. Most specific first.
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/non_ab_device.mk)
|
||||
|
||||
# Inherit from device makefile
|
||||
$(call inherit-product, device/realme/nemo/device.mk)
|
||||
|
||||
# Inherit some common LineageOS stuff.
|
||||
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
|
||||
|
||||
# Device identifier. This must come after all inclusions.
|
||||
PRODUCT_NAME := lineage_nemo
|
||||
PRODUCT_BRAND := realme
|
||||
PRODUCT_MODEL := RMX2001L1
|
||||
PRODUCT_DEVICE := nemo
|
||||
PRODUCT_MANUFACTURER := realme
|
||||
|
||||
# Evolution specific flags
|
||||
TARGET_BUILD_APERTURE_CAMERA := false
|
||||
WITH_GMS := true
|
||||
|
||||
PRODUCT_BUILD_PROP_OVERRIDES += \
|
||||
BuildFingerprint=realme/RMX2001/RMX2001L1:10/QP1A.190711.020/1594211000:user/release-keys
|
||||
|
||||
PRODUCT_GMS_CLIENTID_BASE := android-oppo
|
||||
@@ -0,0 +1,6 @@
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- ROM maintainer name -->
|
||||
<string name="build_maintainer_summary">αиѕн</string>
|
||||
<string name="build_maintainer_donate_url" translatable="false">https://buymeacoffee.com/evilansh</string>
|
||||
|
||||
</resources>
|
||||
@@ -67,8 +67,8 @@ prebuilt_etc {
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "init.RM6785.rc",
|
||||
src: "etc/init.RM6785.rc",
|
||||
name: "init.nemo.rc",
|
||||
src: "etc/init.nemo.rc",
|
||||
relative_install_path: "init",
|
||||
vendor: true,
|
||||
}
|
||||
@@ -81,8 +81,8 @@ prebuilt_etc {
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "ueventd.RM6785.rc",
|
||||
src: "etc/ueventd.RM6785.rc",
|
||||
name: "ueventd.nemo.rc",
|
||||
src: "etc/ueventd.nemo.rc",
|
||||
filename: "ueventd.rc",
|
||||
device_specific: true,
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
runtime_resource_overlay {
|
||||
name: "SettingsOverlayRM6785",
|
||||
name: "SettingsOverlayNemo",
|
||||
vendor: true
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
-->
|
||||
<!-- Pixel specific wifi overlays -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.android.settings.RM6785">
|
||||
package="com.android.settings.nemo">
|
||||
<overlay
|
||||
android:targetPackage="com.android.settings"
|
||||
android:isStatic="true"
|
||||
@@ -1,4 +1,4 @@
|
||||
runtime_resource_overlay {
|
||||
name: "TetheringConfigOverlayRM6785",
|
||||
name: "TetheringConfigOverlayNemo",
|
||||
vendor: true
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.android.networkstack.tethering.RM6785">
|
||||
package="com.android.networkstack.tethering.nemo">
|
||||
|
||||
<overlay
|
||||
android:targetPackage="com.android.networkstack.tethering"
|
||||
@@ -1,4 +1,4 @@
|
||||
runtime_resource_overlay {
|
||||
name: "WifiOverlayRM6785",
|
||||
name: "WifiOverlayNemo",
|
||||
vendor: true
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
-->
|
||||
<!-- Pixel specific wifi overlays -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.android.wifi.resources.RM6785">
|
||||
package="com.android.wifi.resources.nemo">
|
||||
<overlay
|
||||
android:targetPackage="com.android.wifi.resources"
|
||||
android:targetName="WifiCustomization"
|
||||
8
sepolicy/vendor/file_contexts
vendored
8
sepolicy/vendor/file_contexts
vendored
@@ -1,8 +1,8 @@
|
||||
# HALs
|
||||
/(vendor|odm)/bin/hw/vendor\.oplus\.hardware\.biometrics\.fingerprint@[0-9]\.[0-9]-service u:object_r:hal_fingerprint_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@[0-9]\.[0-9]-service\.RM6785 u:object_r:hal_fingerprint_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.light-service.RM6785 u:object_r:hal_light_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch-service\.RM6785 u:object_r:hal_lineage_touch_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@[0-9]\.[0-9]-service\.nemo u:object_r:hal_fingerprint_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.light-service.nemo u:object_r:hal_light_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch-service\.nemo u:object_r:hal_lineage_touch_default_exec:s0
|
||||
|
||||
# Devices
|
||||
/dev/pn553 u:object_r:nfc_device:s0
|
||||
@@ -18,4 +18,4 @@
|
||||
/data/vendor/fingerprint/gf_data(/.*)? u:object_r:fingerprint_vendor_data_file:s0
|
||||
|
||||
# Init services
|
||||
/(vendor|system/vendor)/bin/init_RM6785_vendor u:object_r:init_RM6785_exec:s0
|
||||
/(vendor|system/vendor)/bin/init_nemo_vendor u:object_r:init_nemo_exec:s0
|
||||
|
||||
9
sepolicy/vendor/init_RM6785.te
vendored
9
sepolicy/vendor/init_RM6785.te
vendored
@@ -1,9 +0,0 @@
|
||||
type init_RM6785, domain;
|
||||
type init_RM6785_exec, vendor_file_type, exec_type, file_type;
|
||||
|
||||
init_daemon_domain(init_RM6785)
|
||||
|
||||
set_prop(init_RM6785, vendor_device_prop)
|
||||
|
||||
allow init_RM6785 proc_nfc_chipset:file r_file_perms;
|
||||
allow init_RM6785 proc_oppo_operator:file r_file_perms;
|
||||
9
sepolicy/vendor/init_nemo.te
vendored
Normal file
9
sepolicy/vendor/init_nemo.te
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
type init_nemo, domain;
|
||||
type init_nemo_exec, vendor_file_type, exec_type, file_type;
|
||||
|
||||
init_daemon_domain(init_nemo)
|
||||
|
||||
set_prop(init_nemo, vendor_device_prop)
|
||||
|
||||
allow init_nemo proc_nfc_chipset:file r_file_perms;
|
||||
allow init_nemo proc_oppo_operator:file r_file_perms;
|
||||
@@ -1,19 +1,23 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2016 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2023 The LineageOS Project
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
||||
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
DEVICE=nemo
|
||||
VENDOR=realme
|
||||
|
||||
# Load extract_utils and do some sanity checks
|
||||
MY_DIR="${BASH_SOURCE%/*}"
|
||||
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
||||
|
||||
ANDROID_ROOT="${MY_DIR}/../../.."
|
||||
|
||||
export TARGET_ENABLE_CHECKELF=true
|
||||
|
||||
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
||||
if [ ! -f "${HELPER}" ]; then
|
||||
echo "Unable to find helper script at ${HELPER}"
|
||||
@@ -22,10 +26,10 @@ fi
|
||||
source "${HELPER}"
|
||||
|
||||
function vendor_imports() {
|
||||
cat <<EOF >>"$1"
|
||||
"device/realme/RM6785-common",
|
||||
cat <<EOF >>"$1"
|
||||
"device/realme/nemo",
|
||||
"hardware/mediatek",
|
||||
"hardware/mediatek/libmtkperf_client",
|
||||
"hardware/mediatek/libmtkperf_client"
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -33,6 +37,7 @@ function lib_to_package_fixup_vendor_variants() {
|
||||
if [ "$2" != "vendor" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
vendor.mediatek.hardware.videotelephony@1.0)
|
||||
echo "${1}_vendor"
|
||||
@@ -45,37 +50,23 @@ function lib_to_package_fixup_vendor_variants() {
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function lib_to_package_fixup() {
|
||||
lib_to_package_fixup_clang_rt_ubsan_standalone "$1" ||
|
||||
lib_to_package_fixup_proto_3_9_1 "$1" ||
|
||||
lib_to_package_fixup_vendor_variants "$@"
|
||||
}
|
||||
|
||||
# Initialize the helper for common
|
||||
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true
|
||||
# Initialize the helper
|
||||
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}"
|
||||
|
||||
# Copyright headers and common guards
|
||||
write_headers "RMX2001L1 RMX2151L1"
|
||||
# Warning headers and guards
|
||||
write_headers
|
||||
|
||||
# The standard common blobs
|
||||
write_makefiles "${MY_DIR}/proprietary-files.txt" true
|
||||
|
||||
# Append the calls to firmware images
|
||||
append_firmware_calls_to_makefiles "${MY_DIR}/proprietary-firmware.txt"
|
||||
|
||||
# Finish
|
||||
write_footers
|
||||
|
||||
if [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then
|
||||
# Reinitialize the helper for device
|
||||
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false
|
||||
|
||||
# Warning headers and guards
|
||||
write_headers
|
||||
|
||||
# The standard device blobs
|
||||
write_makefiles "${MY_DIR}/../${DEVICE}/proprietary-files.txt" true
|
||||
|
||||
# Finish
|
||||
write_footers
|
||||
fi
|
||||
write_footers
|
||||
@@ -19,7 +19,7 @@
|
||||
from hashlib import sha1
|
||||
import sys
|
||||
|
||||
device='RM6785-common'
|
||||
device='nemo'
|
||||
vendor='realme'
|
||||
|
||||
lines = [ line for line in open('proprietary-files.txt', 'r') ]
|
||||
|
||||
Reference in New Issue
Block a user