Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ff11cdcfa | ||
|
|
aab73c7543 | ||
|
|
e34556363b | ||
|
|
d41260fced | ||
|
|
37aeb9af26 | ||
|
|
b826d8ca7a | ||
|
|
3e856c0771 | ||
|
|
2e2794b278 | ||
|
|
5262fbb3ee | ||
|
|
e51316b08b | ||
|
|
1ad1a69548 | ||
|
|
a137c9ec2c | ||
|
|
ffd0987cb4 | ||
|
|
273ebe63d6 | ||
|
|
6e516e717c | ||
|
|
00386110c7 | ||
|
|
6e3d20c97e | ||
|
|
812df794e6 | ||
|
|
af1812e67b | ||
|
|
532d994fa7 | ||
|
|
871b013922 | ||
|
|
ebca763bb0 | ||
|
|
35fa0c30aa | ||
|
|
84f7be379b | ||
|
|
b21ab93a3d |
32
.github/workflows/sync.yml
vendored
Normal file
32
.github/workflows/sync.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Sync to Evolution-X-Devices
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- evo
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
if: github.repository == 'Haydn-Lab/device_xiaomi_haydn'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout source repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure Git identity
|
||||
run: |
|
||||
git config --global user.name "${{ secrets.GIT_USER_NAME }}"
|
||||
git config --global user.email "${{ secrets.GIT_USER_EMAIL }}"
|
||||
|
||||
- name: Force Push to Target Repository
|
||||
run: |
|
||||
|
||||
git config --unset-all http.https://github.com/.extraheader
|
||||
|
||||
git remote add target https://x-access-token:${{ secrets.TARGET_REPO_TOKEN }}@github.com/Evolution-X-Devices/device_xiaomi_haydn.git
|
||||
|
||||
git push target evo:bka --force
|
||||
@@ -18,6 +18,9 @@ TARGET_BOOTLOADER_BOARD_NAME := haydn
|
||||
# HIDL
|
||||
DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/hidl/manifest.xml
|
||||
|
||||
# Init
|
||||
TARGET_RECOVERY_DEVICE_MODULES := libinit_haydn
|
||||
|
||||
# Kernel
|
||||
TARGET_KERNEL_CONFIG += vendor/haydn_QGKI.config
|
||||
|
||||
@@ -36,10 +39,6 @@ BOARD_DTBOIMG_PARTITION_SIZE := 25165824
|
||||
# Properties
|
||||
TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
|
||||
|
||||
# Vibrator
|
||||
TARGET_QTI_VIBRATOR_EFFECT_LIB := libqtivibratoreffect.xiaomi
|
||||
TARGET_QTI_VIBRATOR_USE_EFFECT_STREAM := true
|
||||
|
||||
# Include proprietary files
|
||||
include vendor/xiaomi/haydn/BoardConfigVendor.mk
|
||||
|
||||
|
||||
13
device.mk
13
device.mk
@@ -4,6 +4,8 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
COMMON_PATH := device/xiaomi/sm8350-common
|
||||
|
||||
# Inherit from sm8350-common
|
||||
$(call inherit-product, device/xiaomi/sm8350-common/common.mk)
|
||||
|
||||
@@ -21,6 +23,8 @@ PRODUCT_COPY_FILES += \
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/rootdir/etc/init.haydn.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.haydn.rc
|
||||
|
||||
$(call soong_config_set,libinit,vendor_init_lib,//$(LOCAL_PATH):libinit_haydn)
|
||||
|
||||
# Overlays
|
||||
DEVICE_PACKAGE_OVERLAYS += \
|
||||
$(LOCAL_PATH)/overlay \
|
||||
@@ -41,14 +45,21 @@ PRODUCT_PACKAGES += \
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.surface_flinger.use_content_detection_for_refresh_rate=false
|
||||
|
||||
# Power
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(COMMON_PATH)/configs/powerhint_lahaina.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json
|
||||
|
||||
# Soong namespaces
|
||||
PRODUCT_SOONG_NAMESPACES += \
|
||||
$(LOCAL_PATH)
|
||||
|
||||
# Vibrator
|
||||
$(call soong_config_set,qti_vibrator,effect_lib,libqtivibratoreffect.xiaomi)
|
||||
$(call soong_config_set,qti_vibrator,use_effect_stream,true)
|
||||
|
||||
# Call the proprietary setup
|
||||
$(call inherit-product, vendor/xiaomi/haydn/haydn-vendor.mk)
|
||||
|
||||
# Call the Leica Camera setup
|
||||
$(call inherit-product-if-exists, vendor/xiaomi/haydn-miuicamera/products/miuicamera.mk)
|
||||
$(call soong_config_set,camera,override_format_from_reserved,true)
|
||||
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
"remote" : "github-non-los",
|
||||
"repository" : "Haydn-Lab/device_xiaomi_sm8350-common",
|
||||
"target_path": "device/xiaomi/sm8350-common",
|
||||
"branch" : "15"
|
||||
"branch" : "16"
|
||||
},
|
||||
{
|
||||
"remote" : "github-non-los",
|
||||
"repository" : "Haydn-Lab/vendor_xiaomi_sm8350-common",
|
||||
"target_path": "vendor/xiaomi/sm8350-common",
|
||||
"branch" : "15"
|
||||
"branch" : "16"
|
||||
},
|
||||
{
|
||||
"repository" : "vendor_xiaomi_haydn",
|
||||
"target_path": "vendor/xiaomi/haydn",
|
||||
"branch" : "vic"
|
||||
"branch" : "bka"
|
||||
},
|
||||
{
|
||||
"repository" : "hardware_xiaomi",
|
||||
@@ -24,7 +24,13 @@
|
||||
"remote" : "github-non-los",
|
||||
"repository" : "Haydn-Lab/hardware_dolby",
|
||||
"target_path": "hardware/dolby",
|
||||
"branch" : "15"
|
||||
"branch" : "16"
|
||||
},
|
||||
{
|
||||
"remote" : "github-non-los",
|
||||
"repository" : "LineageOS/android_hardware_sony_timekeep",
|
||||
"target_path": "hardware/sony/timekeep",
|
||||
"branch" : "lineage-22.2"
|
||||
},
|
||||
{
|
||||
"remote" : "gitlab",
|
||||
@@ -39,8 +45,9 @@
|
||||
"branch" : "fourteen"
|
||||
},
|
||||
{
|
||||
"repository" : "kernel_xiaomi_haydn",
|
||||
"remote" : "github-non-los",
|
||||
"repository" : "Haydn-Lab/kernel_xiaomi_haydn",
|
||||
"target_path": "kernel/xiaomi/sm8350",
|
||||
"branch" : "vic"
|
||||
"branch" : "lineage-22.2-NO-KSU"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -32,10 +32,15 @@ lib_fixups: lib_fixups_user_type = {
|
||||
blob_fixups: blob_fixups_user_type = {
|
||||
'vendor/etc/camera/pureShot_parameter.xml': blob_fixup()
|
||||
.regex_replace(r'=(\d+)>', r'="\1">'),
|
||||
('vendor/lib/hw/audio.primary.lahaina.so', 'vendor/lib/libaudioroute_ext.so'): blob_fixup()
|
||||
.replace_needed('libaudioroute.so', 'libaudioroute-v34.so'),
|
||||
'vendor/lib64/hw/camera.qcom.so': blob_fixup()
|
||||
.binary_regex_replace(b'\x73\x74\x5F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x6C\x69\x63', b'\x63\x61\x6D\x65\x72\x61\x5F\x63\x6E\x66\x2E\x74\x78\x74'),
|
||||
.binary_regex_replace(b'\x73\x74\x5F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x6C\x69\x63', b'\x63\x61\x6D\x65\x72\x61\x5F\x63\x6E\x66\x2E\x74\x78\x74')
|
||||
.add_needed('libprocessgroup_shim.so'),
|
||||
'vendor/lib64/hw/camera.xiaomi.so': blob_fixup()
|
||||
.sig_replace('52 07 00 94', '1F 20 03 D5'),
|
||||
'vendor/lib64/hw/com.qti.chi.override.so': blob_fixup()
|
||||
.add_needed('libprocessgroup_shim.so'),
|
||||
'vendor/lib64/vendor.xiaomi.hardware.cameraperf@1.0-impl.so': blob_fixup()
|
||||
.sig_replace('21 00 80 52 7c 00 00 94', '21 00 80 52 1F 20 03 D5'),
|
||||
('vendor/lib64/libalAILDC.so', 'vendor/lib64/libalLDC.so', 'vendor/lib64/libalhLDC.so'): blob_fixup()
|
||||
@@ -53,12 +58,6 @@ blob_fixups: blob_fixups_user_type = {
|
||||
.clear_symbol_version('remote_handle64_invoke')
|
||||
.clear_symbol_version('remote_handle64_open')
|
||||
.clear_symbol_version('remote_register_buf_attr'),
|
||||
(
|
||||
'vendor/lib64/hw/camera.qcom.so',Add commentMore actions
|
||||
'vendor/lib64/hw/com.qti.chi.override.so',
|
||||
'vendor/lib64/libcamxcommonutils.so',
|
||||
'vendor/lib64/libmialgoengine.so',
|
||||
): blob_fixup().add_needed('libprocessgroup_shim.so'),
|
||||
}
|
||||
|
||||
module = ExtractUtilsModule(
|
||||
|
||||
25
init/Android.bp
Normal file
25
init/Android.bp
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// Copyright (C) 2020 The LineageOS Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
cc_library_static {
|
||||
name: "libinit_haydn",
|
||||
srcs: ["init_haydn.cpp"],
|
||||
recovery_available: true,
|
||||
include_dirs: [
|
||||
"system/core/init",
|
||||
],
|
||||
shared_libs: ["libbase"],
|
||||
}
|
||||
109
init/init_haydn.cpp
Normal file
109
init/init_haydn.cpp
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
Copyright (C) 2020 The LineageOS Project.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
* Neither the name of The Linux Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <android-base/properties.h>
|
||||
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
|
||||
#include <sys/_system_properties.h>
|
||||
|
||||
using android::base::GetProperty;
|
||||
|
||||
std::vector<std::string> ro_props_default_source_order = {
|
||||
"",
|
||||
"odm.",
|
||||
"product.",
|
||||
"system.",
|
||||
"system_ext.",
|
||||
"vendor.",
|
||||
"vendor_dlkm.",
|
||||
};
|
||||
|
||||
void property_override(char const prop[], char const value[], bool add = true)
|
||||
{
|
||||
prop_info *pi;
|
||||
|
||||
pi = (prop_info *) __system_property_find(prop);
|
||||
if (pi)
|
||||
__system_property_update(pi, value, strlen(value));
|
||||
else if (add)
|
||||
__system_property_add(prop, strlen(prop), value, strlen(value));
|
||||
}
|
||||
|
||||
void set_ro_build_prop(const std::string &prop, const std::string &value) {
|
||||
for (const auto &source : ro_props_default_source_order) {
|
||||
auto prop_name = "ro." + source + "build." + prop;
|
||||
if (source == "")
|
||||
property_override(prop_name.c_str(), value.c_str());
|
||||
else
|
||||
property_override(prop_name.c_str(), value.c_str(), false);
|
||||
}
|
||||
};
|
||||
|
||||
void set_ro_product_prop(const std::string &prop, const std::string &value) {
|
||||
for (const auto &source : ro_props_default_source_order) {
|
||||
auto prop_name = "ro.product." + source + prop;
|
||||
property_override(prop_name.c_str(), value.c_str(), false);
|
||||
}
|
||||
};
|
||||
|
||||
void vendor_load_properties() {
|
||||
std::string region = GetProperty("ro.boot.hwc", "GL"); // Default to Global if missing
|
||||
|
||||
std::string model;
|
||||
std::string device;
|
||||
std::string mod_device;
|
||||
|
||||
if (region == "CN") {
|
||||
// CN variant IMX686 main sensor
|
||||
model = "M2012K11C";
|
||||
device = "haydn";
|
||||
mod_device = "haydn_cn";
|
||||
property_override("persist.vendor.camera.main_sensor", "imx686");
|
||||
} else if (region == "IN") {
|
||||
// India variant HM2 108MP
|
||||
model = "M2012K11I";
|
||||
device = "haydnin";
|
||||
mod_device = "haydn_in_global";
|
||||
property_override("persist.vendor.camera.main_sensor", "hm2");
|
||||
} else {
|
||||
// Global variant HM2 108MP
|
||||
model = "M2012K11G";
|
||||
device = "haydn";
|
||||
mod_device = "haydn_global";
|
||||
property_override("persist.vendor.camera.main_sensor", "hm2");
|
||||
}
|
||||
|
||||
set_ro_product_prop("device", device);
|
||||
set_ro_product_prop("model", model);
|
||||
|
||||
if (!mod_device.empty()) {
|
||||
property_override("ro.product.mod_device", mod_device.c_str());
|
||||
}
|
||||
}
|
||||
@@ -17,15 +17,16 @@ PRODUCT_MODEL := M2012K11G
|
||||
PRODUCT_NAME := lineage_haydn
|
||||
|
||||
WITH_GMS := true
|
||||
TARGET_DISABLE_EPPE := false
|
||||
TARGET_DISABLE_EPPE := true
|
||||
TARGET_BOOT_ANIMATION_RES := 1080
|
||||
TARGET_ENABLE_BLUR := true
|
||||
EVO_BUILD_TYPE := Official
|
||||
TARGET_SUPPORTS_QUICK_TAP := true
|
||||
BYPASS_CHARGE_SUPPORTED := true
|
||||
|
||||
PRODUCT_BUILD_PROP_OVERRIDES += \
|
||||
BuildDesc="haydn_global-user 14 UKQ1.231207.002 V816.0.12.0.UKKCNXM release-keys" \
|
||||
BuildFingerprint=Xiaomi/haydn_global/haydn:14/UKQ1.231207.002/V816.0.12.0.UKKCNXM:user/release-keys \
|
||||
BuildDesc="haydn_global-user 14 UKQ1.231207.002 V816.0.18.0.UKKMIXM release-keys" \
|
||||
BuildFingerprint=Xiaomi/haydn_global/haydn:14/UKQ1.231207.002/V816.0.18.0.UKKMIXM:user/release-keys \
|
||||
DeviceProduct=haydn \
|
||||
SystemName=haydn_global
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# All unpinned blobs below are extracted from haydn V816.0.12.0.UKKCNXM
|
||||
# All unpinned blobs below are extracted from haydn V816.0.18.0.UKKMIXM
|
||||
|
||||
# ACDB
|
||||
vendor/etc/acdbdata/Forte/Forte_Bluetooth_cal.acdb
|
||||
@@ -179,6 +179,7 @@ vendor/lib64/hw/com.qti.chi.override.so
|
||||
vendor/lib64/libAF.so
|
||||
vendor/lib64/libBlinkStub.so
|
||||
vendor/lib64/libFlickerDet.so
|
||||
vendor/lib64/libQnnHtpStub.so
|
||||
vendor/lib64/libI420colorconvert.so
|
||||
vendor/lib64/libSNPE.so
|
||||
vendor/lib64/lib_sr_models.so
|
||||
@@ -221,9 +222,6 @@ vendor/lib64/libcamxstatscore.so
|
||||
vendor/lib64/libcamxswispiqmodule.so
|
||||
vendor/lib64/libcamxswprocessalgo.so
|
||||
vendor/lib64/libcamxtintlessalgo.so
|
||||
vendor/lib64/libcapiv2svacnn.so
|
||||
vendor/lib64/libcapiv2svarnn.so
|
||||
vendor/lib64/libcapiv2vop.so
|
||||
vendor/lib64/libchilog.so
|
||||
vendor/lib64/libcom.qti.chinodeutils.so
|
||||
vendor/lib64/libcom.xiaomi.debug.so
|
||||
@@ -642,14 +640,6 @@ vendor/lib64/sensors.mius.proximity.so
|
||||
vendor/lib64/sensors.ssc.so
|
||||
vendor/lib64/sensors.touch.detect.so
|
||||
|
||||
# Sensors (citsensor)
|
||||
vendor/bin/hw/vendor.xiaomi.hardware.citsensorservice@1.1-service
|
||||
vendor/etc/init/vendor.xiaomi.hardware.citsensorservice@1.1-service.rc
|
||||
vendor/etc/vintf/manifest/vendor.xiaomi.hardware.citsensorservice@1.1-service.xml
|
||||
vendor/lib64/hw/vendor.xiaomi.hardware.citsensorservice@1.1-impl.so
|
||||
vendor/lib64/vendor.xiaomi.hardware.citsensorservice@1.0.so
|
||||
vendor/lib64/vendor.xiaomi.hardware.citsensorservice@1.1.so
|
||||
|
||||
# Sensors configs
|
||||
vendor/etc/sensors/config/ak991x_dri_0.json
|
||||
vendor/etc/sensors/config/bmp285_0.json
|
||||
|
||||
2
vendorsetup.sh
Normal file
2
vendorsetup.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
rm -rf hardware/xiaomi/dolby
|
||||
rm -rf hardware/xiaomi/DSP*
|
||||
Reference in New Issue
Block a user