├── .clang-format ├── Android.bp ├── AndroidProducts.mk ├── BoardConfig.mk ├── board-info.txt ├── camera ├── Android.bp ├── libwatermark_shim.c └── megvii_shim.cpp ├── configs ├── audio │ ├── audio_effects.xml │ ├── audio_io_policy.conf │ ├── audio_platform_info.xml │ ├── audio_policy_configuration.xml │ ├── audio_policy_configuration_a2dp_offload_disabled.xml │ ├── dax-default.xml │ ├── mixer_paths_overlay_static.xml │ └── mixer_paths_tavil.xml ├── config.fs ├── gps │ ├── apdr.conf │ ├── flp.conf │ ├── gps.conf │ ├── izat.conf │ ├── lowi.conf │ ├── sap.conf │ └── xtwifi.conf ├── media │ ├── media_codecs.xml │ ├── media_codecs_c2.xml │ ├── media_codecs_performance_c2.xml │ ├── media_profiles.xml │ ├── media_profiles_vendor.xml │ └── system_properties.xml ├── msm_irqbalance.conf ├── nfc │ ├── libnfc-nci.conf │ ├── libnfc-nxp.conf │ └── libnfc-nxp_RF.conf ├── powerhint.json ├── public.libraries.txt ├── qdcm_calib_data_samsung_ea8076_fhd_cmd_dsi_panel.xml ├── qdcm_calib_data_visionox_r66456_fhd_cmd_dsi_panel.xml ├── qti_whitelist.xml ├── sec_config ├── sensors │ └── hals.conf └── wifi │ ├── WCNSS_qcom_cfg.ini │ ├── p2p_supplicant_overlay.conf │ └── wpa_supplicant_overlay.conf ├── device.mk ├── extract-files.sh ├── keylayout ├── Android.bp ├── gpio-keys.kl └── sm8150-tavil-snd-card_Button_Jack.kl ├── libinit ├── Android.bp ├── include │ ├── libinit_dalvik_heap.h │ ├── libinit_utils.h │ └── libinit_variant.h ├── init_xiaomi_raphael.cpp ├── libinit_dalvik_heap.cpp ├── libinit_utils.cpp └── libinit_variant.cpp ├── lineage_raphael.mk ├── livedisplay ├── Android.bp ├── AntiFlicker.cpp ├── AntiFlicker.h ├── SunlightEnhancement.cpp ├── SunlightEnhancement.h ├── service.cpp ├── vendor.lineage.livedisplay@2.1-service.raphael.rc └── vendor.lineage.livedisplay@2.1-service.raphael.xml ├── odm.prop ├── overlay ├── hardware │ └── xiaomi │ │ └── dolby │ │ └── res │ │ └── values │ │ ├── arrays.xml │ │ └── strings.xml └── packages │ └── apps │ └── CarrierConfig │ └── res │ └── xml │ └── vendor.xml ├── parts ├── Android.bp ├── AndroidManifest.xml ├── proguard.flags ├── res │ ├── drawable │ │ ├── ic_hbm_tile.xml │ │ └── ic_settings_popup.xml │ ├── layout │ │ ├── haptic.xml │ │ └── preference_slider.xml │ ├── values │ │ ├── arrays.xml │ │ ├── integers.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── xml │ │ ├── haptic_settings.xml │ │ └── popup_settings.xml └── src │ └── org │ └── lineageos │ └── settings │ ├── BootCompletedReceiver.java │ ├── display │ └── HBMTileService.java │ ├── haptic │ ├── HapticLevelActivity.java │ ├── HapticLevelFragment.java │ └── HapticUtils.java │ ├── popupcamera │ ├── Constants.java │ ├── PopupCameraPreferences.java │ ├── PopupCameraService.java │ ├── PopupCameraSettingsActivity.java │ ├── PopupCameraSettingsFragment.java │ └── PopupCameraUtils.java │ ├── utils │ └── FileUtils.java │ └── widget │ └── SeekBarPreference.java ├── permissions ├── hotword-hiddenapi-package-whitelist.xml ├── privapp-permissions-hotword.xml └── product_privapp-permissions-qti.xml ├── product.prop ├── proprietary-files.txt ├── releasetools.py ├── rootdir ├── Android.mk └── etc │ ├── Android.bp │ ├── fstab.qcom │ ├── fstab.recovery │ ├── init.qcom.post_boot.sh │ ├── init.qcom.power.rc │ ├── init.qcom.rc │ ├── init.qcom.sh │ ├── init.qcom.usb.rc │ ├── init.qcom.usb.sh │ ├── init.qti.dcvs.sh │ ├── init.raphael.rc │ ├── init.raphael.wlan.rc │ ├── init.raphael_boolx.rc │ ├── init.recovery.qcom.rc │ ├── init.target.rc │ └── ueventd.qcom.rc ├── rro_overlays ├── ApertureOverlay │ ├── Android.bp │ ├── AndroidManifest.xml │ └── app │ │ └── src │ │ └── main │ │ └── res │ │ └── values │ │ └── config.xml ├── DialerResXiaomi │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ └── values │ │ └── config.xml ├── FrameworksResRaphael │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ ├── values │ │ ├── config.xml │ │ └── dimens.xml │ │ └── xml │ │ └── power_profile.xml ├── LineageSDKOverlay │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ └── values │ │ └── config.xml ├── NfcResOverlayRaphael │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ └── values │ │ └── config.xml ├── SettingsLibRaphael │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ └── values │ │ └── config.xml ├── SettingsProviderOverlayRaphael │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ └── values │ │ └── defaults.xml ├── SettingsResRaphael │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ └── values │ │ ├── arrays.xml │ │ ├── config.xml │ │ └── dimens.xml ├── SystemUIResRaphael │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ ├── drawable-nodpi │ │ └── udfps_icon_pressed.webp │ │ ├── drawable │ │ └── rounded.xml │ │ └── values │ │ ├── config.xml │ │ └── dimens.xml ├── TelephonyResCommon │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ ├── values │ │ └── config.xml │ │ └── xml │ │ └── telephony_injection.xml ├── TetheringConfigOverlay │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ └── values │ │ └── config.xml └── WifiOverlay │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ └── values │ └── config.xml ├── seccomp ├── codec2.vendor.base.policy ├── codec2.vendor.ext.policy └── mediacodec.policy ├── sensors ├── .clang-format ├── double_tap │ ├── Android.bp │ └── double_tap_hal.cpp ├── single_tap │ ├── Android.bp │ └── single_tap_hal.cpp └── udfps │ ├── Android.bp │ └── udfps_hal.cpp ├── sepolicy ├── private │ ├── app.te │ ├── cameraserver.te │ ├── dontaudit.te │ ├── file_contexts │ ├── isolated_app.te │ ├── platform_app.te │ ├── property_contexts │ └── system_suspend.te ├── public │ ├── domain.te │ └── property.te ├── sepolicy.mk └── vendor │ ├── adsprpcd.te │ ├── app.te │ ├── appdomain.te │ ├── attributes │ ├── batterysecret.te │ ├── cdsprpcd.te │ ├── cnd.te │ ├── crash_dump.te │ ├── device.te │ ├── file.te │ ├── file_contexts │ ├── genfs_contexts │ ├── hal_audio_default.te │ ├── hal_bluetooth_default.te │ ├── hal_camera.te │ ├── hal_camera_default.te │ ├── hal_dms.te │ ├── hal_dms_default.te │ ├── hal_fingerprint_default.te │ ├── hal_health_default.te │ ├── hal_lineage_health.te │ ├── hal_lineage_health_default.te │ ├── hal_lineage_livedisplay_qti.te │ ├── hal_mlipay_default.te │ ├── hal_motor_default.te │ ├── hal_neuralnetworks_default.te │ ├── hal_nfc_default.te │ ├── hal_perf_default.te │ ├── hal_power_default.te │ ├── hal_sensors_default.te │ ├── hal_thermal_default.te │ ├── hal_tui_comm_qti.te │ ├── hvdcp.te │ ├── hwservice.te │ ├── hwservice_contexts │ ├── init.te │ ├── kernel.te │ ├── mediacodec.te │ ├── mediaserver.te │ ├── mi_thermald.te │ ├── nfc.te │ ├── platform_app.te │ ├── priv_app.te │ ├── property.te │ ├── property_contexts │ ├── qti_init_shell.te │ ├── radio.te │ ├── remosaic_daemon.te │ ├── rild.te │ ├── seapp_contexts │ ├── secure_ui_service_app.te │ ├── sensors.te │ ├── service.te │ ├── service_contexts │ ├── system_app.te │ ├── system_server.te │ ├── tee.te │ ├── ueventd.te │ ├── uncrypt.te │ ├── vendor_hal_perf_default.te │ ├── vendor_init.te │ ├── vendor_qti_init_shell.te │ ├── vendor_ssgtzd.te │ ├── vndservice.te │ ├── vndservice_contexts │ ├── vppservice.te │ ├── wcnss_service.te │ ├── xiaomiparts.te │ └── zygote.te ├── setup-makefiles.sh ├── sort-proprietary-files.sh ├── system.prop ├── system_ext.prop ├── udfps ├── Android.bp └── UdfpsHandler.cpp ├── update-sha1sums.py ├── vendor.prop └── vintf ├── compatibility_matrix.xml ├── framework_compatibility_matrix.xml ├── framework_manifest.xml ├── manifest-qva.xml ├── manifest.xml └── manifest_nfc.xml /.clang-format: -------------------------------------------------------------------------------- 1 | ../../../build/soong/scripts/system-clang-format -------------------------------------------------------------------------------- /Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2021-2024 The LineageOS Project 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | 6 | install_symlink { 7 | name: "firmware_WCNSS_qcom_cfg.ini_symlink", 8 | vendor: true, 9 | installed_location: "firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini", 10 | symlink_target: "/vendor/etc/wifi/WCNSS_qcom_cfg.ini", 11 | } 12 | 13 | install_symlink { 14 | name: "firmware_wlan_mac.bin_symlink", 15 | vendor: true, 16 | installed_location: "firmware/wlan/qca_cld/wlan_mac.bin", 17 | symlink_target: "/mnt/vendor/persist/wlan_mac.bin", 18 | } 19 | -------------------------------------------------------------------------------- /AndroidProducts.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2020 LineageOS 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | PRODUCT_MAKEFILES := \ 16 | $(LOCAL_DIR)/lineage_raphael.mk 17 | 18 | COMMON_LUNCH_CHOICES := \ 19 | lineage_raphael-user \ 20 | lineage_raphael-userdebug \ 21 | lineage_raphael-eng 22 | -------------------------------------------------------------------------------- /board-info.txt: -------------------------------------------------------------------------------- 1 | require board=davinci || davinciin 2 | -------------------------------------------------------------------------------- /camera/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2020 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_library_shared { 17 | name: "libshim_megvii", 18 | 19 | proprietary: true, 20 | srcs: ["megvii_shim.cpp"], 21 | } 22 | 23 | cc_library_shared { 24 | name: "libwatermark_shim", 25 | srcs: ["libwatermark_shim.c"], 26 | vendor: true, 27 | } 28 | -------------------------------------------------------------------------------- /camera/libwatermark_shim.c: -------------------------------------------------------------------------------- 1 | void _ZN4piex19GetPreviewImageDataEPNS_15StreamInterfaceEPNS_16PreviewImageDataE() {} 2 | -------------------------------------------------------------------------------- /camera/megvii_shim.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | namespace android { 18 | extern "C" void mg_facepp() {} 19 | } // namespace android 20 | -------------------------------------------------------------------------------- /configs/config.fs: -------------------------------------------------------------------------------- 1 | [AID_VENDOR_QTI_DIAG] 2 | value:2901 3 | 4 | [AID_VENDOR_QDSS] 5 | value:2902 6 | 7 | [AID_VENDOR_RFS] 8 | value:2903 9 | 10 | [AID_VENDOR_RFS_SHARED] 11 | value:2904 12 | 13 | [AID_VENDOR_ADPL_ODL] 14 | value:2905 15 | 16 | [AID_VENDOR_QRTR] 17 | value:2906 18 | 19 | [AID_VENDOR_THERMAL] 20 | value:2907 21 | 22 | [AID_VENDOR_FASTRPC] 23 | value:2908 24 | 25 | [AID_VENDOR_QTR] 26 | value:2909 27 | 28 | [vendor/bin/wcnss_filter] 29 | mode: 0755 30 | user: AID_BLUETOOTH 31 | group: AID_BLUETOOTH 32 | caps: BLOCK_SUSPEND 33 | 34 | [vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti] 35 | mode: 0755 36 | user: AID_BLUETOOTH 37 | group: AID_BLUETOOTH 38 | caps: BLOCK_SUSPEND NET_ADMIN 39 | 40 | [vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti-lazy] 41 | mode: 0755 42 | user: AID_BLUETOOTH 43 | group: AID_BLUETOOTH 44 | caps: BLOCK_SUSPEND NET_ADMIN 45 | 46 | [system/vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti-lazy] 47 | mode: 0755 48 | user: AID_SYSTEM 49 | group: AID_SYSTEM 50 | caps: BLOCK_SUSPEND NET_ADMIN 51 | 52 | [system/bin/cnss-daemon] 53 | mode: 0755 54 | user: AID_BLUETOOTH 55 | group: AID_BLUETOOTH 56 | caps: NET_BIND_SERVICE 57 | 58 | [vendor/bin/pm-service] 59 | mode: 0755 60 | user: AID_SYSTEM 61 | group: AID_SYSTEM 62 | caps: NET_BIND_SERVICE SYS_BOOT 63 | 64 | [system/bin/pm-service] 65 | mode: 0755 66 | user: AID_SYSTEM 67 | group: AID_SYSTEM 68 | caps: NET_BIND_SERVICE SYS_BOOT 69 | 70 | [vendor/bin/pd-mapper] 71 | mode: 0755 72 | user: AID_SYSTEM 73 | group: AID_SYSTEM 74 | caps: NET_BIND_SERVICE 75 | 76 | [system/bin/pd-mapper] 77 | mode: 0755 78 | user: AID_SYSTEM 79 | group: AID_SYSTEM 80 | caps: NET_BIND_SERVICE 81 | 82 | [vendor/bin/imsdatadaemon] 83 | mode: 0755 84 | user: AID_SYSTEM 85 | group: AID_SYSTEM 86 | caps: NET_BIND_SERVICE 87 | 88 | [vendor/bin/ims_rtp_daemon] 89 | mode: 0755 90 | user: AID_SYSTEM 91 | group: AID_RADIO 92 | caps: NET_BIND_SERVICE 93 | 94 | [vendor/bin/imsrcsd] 95 | mode: 0755 96 | user: AID_RADIO 97 | group: AID_RADIO 98 | caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM 99 | 100 | [vendor/bin/imsdaemon] 101 | mode: 0755 102 | user: AID_RADIO 103 | group: AID_RADIO 104 | caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM 105 | 106 | [vendor/bin/cnd] 107 | mode: 0755 108 | user: AID_SYSTEM 109 | group: AID_SYSTEM 110 | caps: NET_BIND_SERVICE BLOCK_SUSPEND NET_ADMIN 111 | 112 | [vendor/bin/slim_daemon] 113 | mode: 0755 114 | user: AID_GPS 115 | group: AID_GPS 116 | caps: NET_BIND_SERVICE 117 | 118 | [vendor/bin/loc_launcher] 119 | mode: 0755 120 | user: AID_GPS 121 | group: AID_GPS 122 | caps: SETUID SETGID 123 | 124 | [vendor/bin/xtwifi-client] 125 | mode: 0755 126 | user: AID_GPS 127 | group: AID_GPS 128 | caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM 129 | 130 | [vendor/bin/sensors.qti] 131 | mode: 0755 132 | user: AID_SYSTEM 133 | group: AID_SYSTEM 134 | caps: NET_BIND_SERVICE 135 | 136 | [vendor/firmware_mnt/image/*] 137 | mode: 0771 138 | user: AID_SYSTEM 139 | group: AID_SYSTEM 140 | caps: 0 141 | 142 | [persist/] 143 | mode: 0771 144 | user: AID_SYSTEM 145 | group: AID_SYSTEM 146 | caps: 0 147 | 148 | [dsp/] 149 | mode: 0771 150 | user: AID_MEDIA 151 | group: AID_MEDIA 152 | caps: 0 153 | -------------------------------------------------------------------------------- /configs/gps/flp.conf: -------------------------------------------------------------------------------- 1 | ################################### 2 | ##### FLP settings ##### 3 | ################################### 4 | 5 | ################################### 6 | # FLP BATCH SIZE 7 | ################################### 8 | # The number of batched locations 9 | # requested to modem. The desired number 10 | # defined below may not be satisfied, as 11 | # the modem can only return the number 12 | # of batched locations that can be allocated, 13 | # which is limited by memory. The default 14 | # batch size defined as 20 as below. 15 | BATCH_SIZE=20 16 | 17 | ################################### 18 | # FLP OUTDOOR TRIP BATCH SIZE 19 | ################################### 20 | # The number of batched locations 21 | # requested to modem for outdoor 22 | # trip batching. The desired number 23 | # defined below may not be satisfied, as 24 | # the modem can only return the number 25 | # of batched locations that can be allocated, 26 | # which is limited by memory. The default 27 | # trip batch size defined as 600 as below. 28 | OUTDOOR_TRIP_BATCH_SIZE=600 29 | 30 | ################################### 31 | # FLP BATCHING SESSION TIMEOUT 32 | ################################### 33 | # Duration with which batch session timeout 34 | # happens in milliseconds. If not specified 35 | # or set to zero, batching session timeout 36 | # defaults to 20 seconds by the modem. 37 | # BATCH_SESSION_TIMEOUT=20000 38 | 39 | ################################### 40 | # FLP BATCHING ACCURACY 41 | ################################### 42 | # Set to one of the defined values below 43 | # to define the accuracy of batching. 44 | # If not specified, accuracy defaults 45 | # to LOW. 46 | # FLP BATCHING ACCURACY values: 47 | # Low accuracy = 0 48 | # Medium accuracy = 1 49 | # High accuracy = 2 50 | ACCURACY=1 51 | 52 | #################################### 53 | # By default if network fixes are not sensor assisted 54 | # these fixes must be dropped. This parameter adds an exception 55 | # for targets where there is no PDR and we still want to 56 | # report out network fixes 57 | # 0: MUST NOT ALLOW NETWORK FIXES 58 | # 1: ALLOW NETWORK FIXES 59 | #################################### 60 | ALLOW_NETWORK_FIXES = 0 61 | -------------------------------------------------------------------------------- /configs/gps/lowi.conf: -------------------------------------------------------------------------------- 1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 2 | # 3 | # LOWI Config file - default 4 | # 5 | # GENERAL DESCRIPTION 6 | # This file contains the config params for LOWI 7 | # 8 | # Copyright (c) 2019 Qualcomm Technologies, Inc. 9 | # All Rights Reserved. 10 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 11 | # 12 | # 2012-2013 Qualcomm Atheros, Inc. 13 | # All Rights Reserved. 14 | # Qualcomm Atheros Confidential and Proprietary. 15 | # 16 | # Export of this technology or software is regulated by the U.S. Government. 17 | # Diversion contrary to U.S. law prohibited. 18 | #=============================================================================*/ 19 | 20 | # X86 ONLY - UBUNTU: 21 | # Copy this file in the same directory where the executable is 22 | 23 | # Log level 24 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100 25 | LOWI_LOG_LEVEL = 3 26 | LOWI_USE_LOWI_LP = 0 27 | 28 | -------------------------------------------------------------------------------- /configs/gps/xtwifi.conf: -------------------------------------------------------------------------------- 1 | #GTP AP Project client core config file 2 | # 3 | #GENERAL DESCRIPTION 4 | #This is used by client core 5 | # 6 | #Copyright (c) 2012-2014 Qualcomm Atheros, Inc. 7 | #All Rights Reserved. 8 | #Qualcomm Atheros Confidential and Proprietary. 9 | # 10 | #Copyright (c) 2017 Qualcomm Technologies, Inc. 11 | #All Rights Reserved. 12 | #Confidential and Proprietary - Qualcomm Technologies, Inc. 13 | 14 | ############################################################################## 15 | # non-IOT devices configuration items # 16 | # For non-IOT devices, configure below configuration items # 17 | # according to the app note: 80-NK218-1 and remove the configuration items # 18 | # in section of "IOT devices configuration items". # 19 | ############################################################################## 20 | 21 | # ASN URI v2 to be used by some GTP AP modules that 22 | # need to run with ASN URI v2 protocol. 23 | XT_SERVER_ROOT_URL = https://gtp1.izatcloud.net:443/uds/v2 24 | 25 | # ASN URI v3 to be used by GTP AP modules that 26 | # can support ASN URI v3 protocol. 27 | XT_SERVER_ROOT_URL_V3 = https://gtp1.izatcloud.net:443/uds/v3 28 | 29 | # size, in bytes, of the cache on device 30 | SIZE_BYTE_TOTAL_CACHE = 5000000 31 | 32 | ############################################################################## 33 | # IOT devices configuration items # 34 | # For IOT devices, configure below configuration items # 35 | # according to the app note and remove the configuration items in section of # 36 | # "non-IOT devices configuration items". # 37 | ############################################################################## 38 | 39 | # ASN URI v3 to be used by GTP AP modules that 40 | # can support ASN URI v3 protocol. 41 | # XT_SERVER_ROOT_URL_V3 = https://gtpma1.izatcloud.net:443/uds/v3 42 | 43 | # 3: Wi-Fi APDB injection via Izat SDK. GTP server is not accessed 44 | # for any GTP requests, instead notification is sent to Izat SDK. 45 | # WiFi crowdsourcing module is disabled. 46 | # 4: Wi-Fi APDB injection via Izat SDK. GTP server is not accessed 47 | # for any GTP requests, instead notification is sent to Izat SDK. 48 | # WiFi crowdsourcing module is active, also accessed via Izat SDK. 49 | # GTP_AP_MODE = 4 50 | 51 | # 1: MP cell features relies on GTP AP for either download or upload 52 | # 0: MP cell features does not rely on GTP AP 53 | # GTP_AP_NEEDED_BY_MP_CELL = 1 54 | 55 | ############################################################################## 56 | # Configuration items applicable to all devices # 57 | ############################################################################## 58 | 59 | # Log verbosity control for most of the GTP WiFi system, including native and 60 | # Java componenets 61 | # OFF = 0, ERROR = 1, WARNING = 2, INFO = 3, DEBUG = 4, VERBOSE = 5, ALL = 100 62 | DEBUG_GLOBAL_LOG_LEVEL = 2 63 | 64 | # this is used at the server side to distinguish uploads from different maker/model 65 | # default "Qualcomm" 66 | OEM_ID_IN_REQUEST_TO_SERVER = "Qualcomm" 67 | 68 | # this is used at the server side to distinguish uploads from different maker/model 69 | # default "UNKNOWN" 70 | MODEL_ID_IN_REQUEST_TO_SERVER = "UNKNOWN" 71 | 72 | ############################################################################## 73 | # Qualcomm Network Location Provider config # 74 | ############################################################################## 75 | 76 | # Accuracy Threshold for NLP position. Position exceeds thsi threshold will be filtered out. 77 | # Default is 25000 meters. 78 | LARGE_ACCURACY_THRESHOLD_TO_FILTER_NLP_POSITION = 25000 79 | -------------------------------------------------------------------------------- /configs/media/media_codecs.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /configs/media/system_properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /configs/msm_irqbalance.conf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # 28 | # 29 | 30 | PRIO=1,1,1,1,0,0,0,0 31 | #arch_timer, arm-pmu, arch_mem_timer, msm_drm, kgsl-3d0 32 | IGNORED_IRQ=19,21,38,115,332 33 | -------------------------------------------------------------------------------- /configs/public.libraries.txt: -------------------------------------------------------------------------------- 1 | libadsprpc.so 2 | libcdsprpc.so 3 | libsdsprpc.so 4 | libfastcvopt.so 5 | liblistensoundmodel2.so 6 | libOpenCL.so 7 | libnpu.so 8 | libmpbase.so 64 9 | libmialgoengine.so 64 10 | libVDClearShot.so 11 | libHalSuperSensorServer.so 12 | libSuperSensor.so 13 | libSuperSensorCPU.so 14 | libarcsoft_beautyshot.so 64 15 | libarcsoft_dualcam_refocus.so 64 16 | libarcsoft_dualcam_refocus_rear_t.so 64 17 | libarcsoft_dualcam_refocus_rear_w.so 64 18 | libarcsoft_dualcam_refocus_front.so 64 19 | libarcsoft_portrait_lighting.so 64 20 | libarcsoft_portrait_lighting_c.so 64 21 | libarcsoft_high_dynamic_range.so 64 22 | libarcsoft_low_light_hdr.so 64 23 | libmibokeh_855.so 64 24 | libarcsoft_distortion_correction.so 64 25 | libarcsoft_bodyslim.so 64 26 | libalCFR.so 27 | libcvp.so 28 | libcvp_stub.so 29 | libcvp_common.so 30 | libhta_hexagon_runtime.so 31 | unnhal-acc-hta.so 32 | libalhLDC.so 33 | libalAILDC.so 34 | -------------------------------------------------------------------------------- /configs/sensors/hals.conf: -------------------------------------------------------------------------------- 1 | sensors.ssc.so 2 | sensors.raphael_udfps.so 3 | sensors.raphael_double_tap.so 4 | sensors.raphael_single_tap.so 5 | -------------------------------------------------------------------------------- /configs/wifi/p2p_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_no_group_iface=1 3 | persistent_reconnect=1 4 | bss_max_count=400 5 | -------------------------------------------------------------------------------- /configs/wifi/wpa_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_disabled=1 3 | tdls_external_control=1 4 | wowlan_triggers=magic_pkt 5 | bss_max_count=400 6 | interworking=1 7 | config_methods=virtual_display virtual_push_button keypad 8 | driver_param="use_p2p_group_interface=1 no_rrm=1" 9 | hs20=1 10 | auto_interworking=0 11 | -------------------------------------------------------------------------------- /extract-files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # SPDX-FileCopyrightText: 2016 The CyanogenMod Project 4 | # SPDX-FileCopyrightText: 2017-2024 The LineageOS Project 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | 8 | set -e 9 | 10 | DEVICE=raphael 11 | VENDOR=xiaomi 12 | 13 | # Load extract_utils and do some sanity checks 14 | MY_DIR="${BASH_SOURCE%/*}" 15 | if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi 16 | 17 | ANDROID_ROOT="${MY_DIR}/../../.." 18 | 19 | export TARGET_ENABLE_CHECKELF=true 20 | 21 | HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh" 22 | if [ ! -f "${HELPER}" ]; then 23 | echo "Unable to find helper script at ${HELPER}" 24 | exit 1 25 | fi 26 | source "${HELPER}" 27 | 28 | # Default to sanitizing the vendor folder before extraction 29 | CLEAN_VENDOR=true 30 | 31 | KANG= 32 | SECTION= 33 | 34 | while [ "${#}" -gt 0 ]; do 35 | case "${1}" in 36 | -n | --no-cleanup ) 37 | CLEAN_VENDOR=false 38 | ;; 39 | -k | --kang ) 40 | KANG="--kang" 41 | ;; 42 | -s | --section ) 43 | SECTION="${2}"; shift 44 | CLEAN_VENDOR=false 45 | ;; 46 | * ) 47 | SRC="${1}" 48 | ;; 49 | esac 50 | shift 51 | done 52 | 53 | if [ -z "${SRC}" ]; then 54 | SRC="adb" 55 | fi 56 | 57 | function blob_fixup() { 58 | case "${1}" in 59 | vendor/lib64/camera/components/com.qti.node.watermark.so) 60 | [ "$2" = "" ] && return 0 61 | grep -q "libpiex_shim.so" "${2}" || "${PATCHELF}" --add-needed "libpiex_shim.so" "${2}" 62 | ;; 63 | vendor/lib64/libdlbdsservice.so | vendor/lib/libstagefright_soft_ac4dec.so | vendor/lib/libstagefright_soft_ddpdec.so) 64 | [ "$2" = "" ] && return 0 65 | "${PATCHELF}" --replace-needed "libstagefright_foundation.so" "libstagefright_foundation-v33.so" "${2}" 66 | ;; 67 | vendor/lib64/mediadrm/libwvdrmengine.so|vendor/lib64/libwvhidl.so) 68 | [ "$2" = "" ] && return 0 69 | grep -q "libcrypto-v33.so" "${2}" || "${PATCHELF}" --replace-needed "libcrypto.so" "libcrypto-v33.so" "$2" 70 | ;; 71 | *) 72 | return 1 73 | ;; 74 | esac 75 | 76 | return 0 77 | } 78 | 79 | function blob_fixup_dry() { 80 | blob_fixup "$1" "" 81 | } 82 | 83 | # Initialize the helper 84 | setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}" 85 | 86 | extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" 87 | 88 | "${MY_DIR}/setup-makefiles.sh" 89 | -------------------------------------------------------------------------------- /keylayout/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2024 The LineageOS Project 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | prebuilt_usr_keylayout { 8 | name: "sm8150-tavil-snd-card_Button_Jack.kl", 9 | src: "sm8150-tavil-snd-card_Button_Jack.kl", 10 | vendor: true, 11 | } 12 | 13 | prebuilt_usr_keylayout { 14 | name: "gpio-keys.kl", 15 | src: "gpio-keys.kl", 16 | vendor: true, 17 | } 18 | -------------------------------------------------------------------------------- /keylayout/gpio-keys.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | 27 | key 115 VOLUME_UP 28 | key 114 VOLUME_DOWN 29 | key 102 HOME 30 | key 528 FOCUS 31 | key 766 CAMERA 32 | key 689 AI 33 | -------------------------------------------------------------------------------- /keylayout/sm8150-tavil-snd-card_Button_Jack.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | key 226 HEADSETHOOK 29 | key 257 VOLUME_UP 30 | key 258 VOLUME_DOWN 31 | key 115 VOLUME_UP 32 | key 114 VOLUME_DOWN 33 | -------------------------------------------------------------------------------- /libinit/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2021 The LineageOS Project 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | cc_library_static { 8 | name: "libinit_xiaomi_raphael", 9 | srcs: [ 10 | "libinit_dalvik_heap.cpp", 11 | "libinit_variant.cpp", 12 | "libinit_utils.cpp", 13 | ], 14 | whole_static_libs: ["libbase"], 15 | export_include_dirs: ["include"], 16 | recovery_available: true, 17 | } 18 | 19 | cc_library_static { 20 | name: "init_xiaomi_raphael", 21 | srcs: ["init_xiaomi_raphael.cpp"], 22 | whole_static_libs: ["libinit_xiaomi_raphael"], 23 | include_dirs: ["system/core/init"], 24 | recovery_available: true, 25 | } 26 | -------------------------------------------------------------------------------- /libinit/include/libinit_dalvik_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #ifndef LIBINIT_DALVIK_HEAP_H 8 | #define LIBINIT_DALVIK_HEAP_H 9 | 10 | #include 11 | 12 | typedef struct dalvik_heap_info { 13 | std::string heapstartsize; 14 | std::string heapgrowthlimit; 15 | std::string heapsize; 16 | std::string heapminfree; 17 | std::string heapmaxfree; 18 | std::string heaptargetutilization; 19 | } dalvik_heap_info_t; 20 | 21 | void set_dalvik_heap(void); 22 | 23 | #endif // LIBINIT_DALVIK_HEAP_H 24 | -------------------------------------------------------------------------------- /libinit/include/libinit_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #ifndef LIBINIT_UTILS_H 8 | #define LIBINIT_UTILS_H 9 | 10 | #include 11 | 12 | void property_override(std::string prop, std::string value, bool add = true); 13 | 14 | void set_ro_build_prop(const std::string &prop, const std::string &value, bool product = false); 15 | 16 | const std::string fingerprint_to_description(const std::string &fingerprint); 17 | 18 | #endif // LIBINIT_UTILS_H 19 | -------------------------------------------------------------------------------- /libinit/include/libinit_variant.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #ifndef LIBINIT_VARIANT_H 8 | #define LIBINIT_VARIANT_H 9 | 10 | #include 11 | #include 12 | 13 | typedef struct variant_info { 14 | std::string hwc_value; 15 | std::string sku_value; 16 | 17 | std::string brand; 18 | std::string device; 19 | std::string marketname; 20 | std::string model; 21 | std::string build_fingerprint; 22 | 23 | bool nfc; 24 | } variant_info_t; 25 | 26 | void search_variant(const std::vector variants); 27 | 28 | void set_variant_props(const variant_info_t variant); 29 | 30 | #endif // LIBINIT_VARIANT_H 31 | -------------------------------------------------------------------------------- /libinit/init_xiaomi_raphael.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021-2022 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | #include "vendor_init.h" 11 | 12 | #define FINGERPRINT "Xiaomi/raphael/raphael:11/RKQ1.200826.002/V12.5.2.0.RFKMIXM:user/release-keys" 13 | 14 | static const variant_info_t raphael_global_info = { 15 | .hwc_value = "GLOBAL", 16 | .sku_value = "", 17 | 18 | .brand = "Xiaomi", 19 | .device = "raphael", 20 | .marketname = "", 21 | .model = "Mi 9T Pro", 22 | .build_fingerprint = FINGERPRINT, 23 | 24 | .nfc = true, 25 | }; 26 | 27 | static const variant_info_t raphaelin_info = { 28 | .hwc_value = "INDIA", 29 | .sku_value = "", 30 | 31 | .brand = "Xiaomi", 32 | .device = "raphaelin", 33 | .marketname = "", 34 | .model = "Redmi K20 Pro", 35 | .build_fingerprint = FINGERPRINT, 36 | 37 | .nfc = false, 38 | }; 39 | 40 | static const variant_info_t raphael_info = { 41 | .hwc_value = "", 42 | .sku_value = "", 43 | 44 | .brand = "Xiaomi", 45 | .device = "raphael", 46 | .marketname = "", 47 | .model = "Redmi K20 Pro", 48 | .build_fingerprint = FINGERPRINT, 49 | 50 | .nfc = true, 51 | }; 52 | 53 | static const std::vector variants = { 54 | raphael_global_info, 55 | raphaelin_info, 56 | raphael_info, 57 | }; 58 | 59 | void vendor_load_properties() { 60 | set_dalvik_heap(); 61 | search_variant(variants); 62 | } 63 | -------------------------------------------------------------------------------- /libinit/libinit_dalvik_heap.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | #define HEAPSTARTSIZE_PROP "dalvik.vm.heapstartsize" 13 | #define HEAPGROWTHLIMIT_PROP "dalvik.vm.heapgrowthlimit" 14 | #define HEAPSIZE_PROP "dalvik.vm.heapsize" 15 | #define HEAPMINFREE_PROP "dalvik.vm.heapminfree" 16 | #define HEAPMAXFREE_PROP "dalvik.vm.heapmaxfree" 17 | #define HEAPTARGETUTILIZATION_PROP "dalvik.vm.heaptargetutilization" 18 | 19 | #define GB(b) (b * 1024ull * 1024 * 1024) 20 | 21 | static const dalvik_heap_info_t dalvik_heap_info_12288 = { 22 | .heapstartsize = "24m", 23 | .heapgrowthlimit = "512m", 24 | .heapsize = "512m", 25 | .heapminfree = "1m", 26 | .heapmaxfree = "12m", 27 | .heaptargetutilization = "0.75", 28 | }; 29 | 30 | static const dalvik_heap_info_t dalvik_heap_info_8192 = { 31 | .heapstartsize = "24m", 32 | .heapgrowthlimit = "512m", 33 | .heapsize = "512m", 34 | .heapminfree = "1m", 35 | .heapmaxfree = "12m", 36 | .heaptargetutilization = "0.75", 37 | }; 38 | 39 | static const dalvik_heap_info_t dalvik_heap_info_6144 = { 40 | .heapstartsize = "16m", 41 | .heapgrowthlimit = "384m", 42 | .heapsize = "512m", 43 | .heapminfree = "512k", 44 | .heapmaxfree = "8m", 45 | .heaptargetutilization = "0.75", 46 | }; 47 | 48 | void set_dalvik_heap() { 49 | struct sysinfo sys; 50 | const dalvik_heap_info_t *dhi; 51 | 52 | sysinfo(&sys); 53 | 54 | if (sys.totalram > GB(11)) 55 | dhi = &dalvik_heap_info_12288; 56 | else if (sys.totalram > GB(7)) 57 | dhi = &dalvik_heap_info_8192; 58 | else 59 | dhi = &dalvik_heap_info_6144; 60 | 61 | property_override(HEAPSTARTSIZE_PROP, dhi->heapstartsize); 62 | property_override(HEAPGROWTHLIMIT_PROP, dhi->heapgrowthlimit); 63 | property_override(HEAPSIZE_PROP, dhi->heapsize); 64 | property_override(HEAPTARGETUTILIZATION_PROP, dhi->heaptargetutilization); 65 | property_override(HEAPMINFREE_PROP, dhi->heapminfree); 66 | property_override(HEAPMAXFREE_PROP, dhi->heapmaxfree); 67 | } 68 | -------------------------------------------------------------------------------- /libinit/libinit_utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | void property_override(std::string prop, std::string value, bool add) { 14 | auto pi = (prop_info *) __system_property_find(prop.c_str()); 15 | if (pi != nullptr) { 16 | __system_property_update(pi, value.c_str(), value.length()); 17 | } else if (add) { 18 | __system_property_add(prop.c_str(), prop.length(), value.c_str(), value.length()); 19 | } 20 | } 21 | 22 | std::vector ro_props_default_source_order = { 23 | "odm.", 24 | "product.", 25 | "system.", 26 | "system_ext.", 27 | "vendor.", 28 | "", 29 | }; 30 | 31 | void set_ro_build_prop(const std::string &prop, const std::string &value, bool product) { 32 | std::string prop_name; 33 | 34 | for (const auto &source : ro_props_default_source_order) { 35 | if (product) 36 | prop_name = "ro.product." + source + prop; 37 | else 38 | prop_name = "ro." + source + "build." + prop; 39 | 40 | property_override(prop_name, value, true); 41 | } 42 | } 43 | 44 | #define FIND_AND_REMOVE(s, delimiter, variable_name) \ 45 | std::string variable_name = s.substr(0, s.find(delimiter)); \ 46 | s.erase(0, s.find(delimiter) + delimiter.length()); 47 | 48 | const std::string fingerprint_to_description(const std::string &fingerprint) { 49 | const std::string delimiter = "/"; 50 | const std::string delimiter2 = ":"; 51 | 52 | std::string build_fingerprint_copy = fingerprint; 53 | 54 | FIND_AND_REMOVE(build_fingerprint_copy, delimiter, brand) 55 | FIND_AND_REMOVE(build_fingerprint_copy, delimiter, product) 56 | FIND_AND_REMOVE(build_fingerprint_copy, delimiter2, device) 57 | FIND_AND_REMOVE(build_fingerprint_copy, delimiter, platform_version) 58 | FIND_AND_REMOVE(build_fingerprint_copy, delimiter, build_id) 59 | FIND_AND_REMOVE(build_fingerprint_copy, delimiter2, build_number) 60 | FIND_AND_REMOVE(build_fingerprint_copy, delimiter, build_variant) 61 | std::string build_version_tags = build_fingerprint_copy; 62 | 63 | const std::string description = product + "-" + build_variant + " " + platform_version + 64 | " " + build_id + " " + build_number + " " + build_version_tags; 65 | 66 | return description; 67 | } 68 | -------------------------------------------------------------------------------- /libinit/libinit_variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | using android::base::GetProperty; 14 | 15 | #define HWC_PROP "ro.boot.hwc" 16 | #define SKU_PROP "ro.boot.product.hardware.sku" 17 | 18 | void search_variant(const std::vector variants) { 19 | std::string hwc_value = GetProperty(HWC_PROP, ""); 20 | std::string sku_value = GetProperty(SKU_PROP, ""); 21 | 22 | for (const auto& variant : variants) { 23 | if ((variant.hwc_value == "" || variant.hwc_value == hwc_value) && 24 | (variant.sku_value == "" || variant.sku_value == sku_value)) { 25 | set_variant_props(variant); 26 | break; 27 | } 28 | } 29 | } 30 | 31 | void set_variant_props(const variant_info_t variant) { 32 | set_ro_build_prop("brand", variant.brand, true); 33 | set_ro_build_prop("device", variant.device, true); 34 | set_ro_build_prop("marketname", variant.marketname, true); 35 | set_ro_build_prop("model", variant.model, true); 36 | 37 | if (access("/system/bin/recovery", F_OK) != 0) { 38 | set_ro_build_prop("fingerprint", variant.build_fingerprint); 39 | property_override("ro.bootimage.build.fingerprint", variant.build_fingerprint); 40 | 41 | property_override("ro.build.description", fingerprint_to_description(variant.build_fingerprint)); 42 | } 43 | 44 | if (variant.nfc) 45 | property_override(SKU_PROP, "nfc"); 46 | property_override("ro.boot.hardware.sku", "nfc"); 47 | } 48 | -------------------------------------------------------------------------------- /lineage_raphael.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2020 LineageOS 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Inherit from those products. Most specific first. 16 | $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) 17 | $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) 18 | $(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_p.mk) 19 | 20 | # Inherit from raphael device 21 | $(call inherit-product, device/xiaomi/raphael/device.mk) 22 | 23 | # Inherit some common Lineage stuff. 24 | $(call inherit-product, vendor/lineage/config/common_full_phone.mk) 25 | 26 | # Boot animation 27 | TARGET_SCREEN_HEIGHT := 2340 28 | TARGET_SCREEN_WIDTH := 1080 29 | 30 | # Device identifier. This must come after all inclusions. 31 | PRODUCT_NAME := lineage_raphael 32 | PRODUCT_DEVICE := raphael 33 | PRODUCT_BRAND := Xiaomi 34 | PRODUCT_MODEL := MI 9T Pro 35 | PRODUCT_MANUFACTURER := Xiaomi 36 | PRODUCT_CHARACTERISTICS := nosdcard 37 | 38 | PRODUCT_GMS_CLIENTID_BASE := android-xiaomi 39 | 40 | PRODUCT_BUILD_PROP_OVERRIDES += \ 41 | BuildDesc="raphael-user 11 RKQ1.200826.002 V12.5.2.0.RFKMIXM release-keys" \ 42 | BuildFingerprint=Xiaomi/raphael/raphael:11/RKQ1.200826.002/V12.5.2.0.RFKMIXM:user/release-keys 43 | -------------------------------------------------------------------------------- /livedisplay/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2020 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_binary { 17 | name: "vendor.lineage.livedisplay@2.1-service.raphael", 18 | defaults: ["hidl_defaults"], 19 | vintf_fragments: ["vendor.lineage.livedisplay@2.1-service.raphael.xml"], 20 | init_rc: ["vendor.lineage.livedisplay@2.1-service.raphael.rc"], 21 | relative_install_path: "hw", 22 | srcs: [ 23 | ":vendor.lineage.livedisplay@2.0-sdm-utils", 24 | "AntiFlicker.cpp", 25 | "SunlightEnhancement.cpp", 26 | "service.cpp", 27 | ], 28 | vendor: true, 29 | shared_libs: [ 30 | "libbase", 31 | "libbinder", 32 | "libhidlbase", 33 | "libutils", 34 | "vendor.lineage.livedisplay@2.0", 35 | "vendor.lineage.livedisplay@2.1", 36 | ], 37 | header_libs: [ 38 | "vendor.lineage.livedisplay@2.0-sdm-headers", 39 | ], 40 | } 41 | -------------------------------------------------------------------------------- /livedisplay/AntiFlicker.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "AntiFlickerService" 18 | 19 | #include "AntiFlicker.h" 20 | #include 21 | #include 22 | 23 | namespace vendor { 24 | namespace lineage { 25 | namespace livedisplay { 26 | namespace V2_1 { 27 | namespace implementation { 28 | 29 | static constexpr const char* kDcDimmingPath = 30 | "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/dc_dim"; 31 | 32 | Return AntiFlicker::isEnabled() { 33 | std::ifstream file(kDcDimmingPath); 34 | int result = -1; 35 | file >> result; 36 | LOG(DEBUG) << "Got result " << result << " fail " << file.fail(); 37 | return !file.fail() && result > 0; 38 | } 39 | 40 | Return AntiFlicker::setEnabled(bool enabled) { 41 | std::ofstream file(kDcDimmingPath); 42 | file << (enabled ? "1" : "0"); 43 | LOG(DEBUG) << "setEnabled fail " << file.fail(); 44 | return !file.fail(); 45 | } 46 | 47 | } // namespace implementation 48 | } // namespace V2_1 49 | } // namespace livedisplay 50 | } // namespace lineage 51 | } // namespace vendor 52 | -------------------------------------------------------------------------------- /livedisplay/AntiFlicker.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_1_ANTIFLICKER_H 18 | #define VENDOR_LINEAGE_LIVEDISPLAY_V2_1_ANTIFLICKER_H 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace vendor { 25 | namespace lineage { 26 | namespace livedisplay { 27 | namespace V2_1 { 28 | namespace implementation { 29 | 30 | using ::android::hardware::Return; 31 | using ::android::hardware::Void; 32 | using ::android::sp; 33 | 34 | class AntiFlicker : public IAntiFlicker { 35 | public: 36 | // Methods from ::vendor::lineage::livedisplay::V2_1::IAntiFlicker follow. 37 | Return isEnabled() override; 38 | Return setEnabled(bool enabled) override; 39 | }; 40 | 41 | } // namespace implementation 42 | } // namespace V2_1 43 | } // namespace livedisplay 44 | } // namespace lineage 45 | } // namespace vendor 46 | 47 | #endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_1_ANTIFLICKER_H 48 | -------------------------------------------------------------------------------- /livedisplay/SunlightEnhancement.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019-2020 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "SunlightEnhancementService" 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | #include "SunlightEnhancement.h" 24 | 25 | namespace vendor { 26 | namespace lineage { 27 | namespace livedisplay { 28 | namespace V2_1 { 29 | namespace implementation { 30 | 31 | static constexpr const char* kHbmStatusPath = 32 | "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/hbm"; 33 | 34 | Return SunlightEnhancement::isEnabled() { 35 | std::string buf; 36 | if (!android::base::ReadFileToString(kHbmStatusPath, &buf)) { 37 | LOG(ERROR) << "Failed to read " << kHbmStatusPath; 38 | return false; 39 | } 40 | return std::stoi(android::base::Trim(buf)) == 1; 41 | } 42 | 43 | Return SunlightEnhancement::setEnabled(bool enabled) { 44 | if (!android::base::WriteStringToFile((enabled ? "1" : "0"), kHbmStatusPath)) { 45 | LOG(ERROR) << "Failed to write " << kHbmStatusPath; 46 | return false; 47 | } 48 | return true; 49 | } 50 | 51 | } // namespace implementation 52 | } // namespace V2_1 53 | } // namespace livedisplay 54 | } // namespace lineage 55 | } // namespace vendor 56 | -------------------------------------------------------------------------------- /livedisplay/SunlightEnhancement.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019-2020 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H 18 | #define VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace vendor { 25 | namespace lineage { 26 | namespace livedisplay { 27 | namespace V2_1 { 28 | namespace implementation { 29 | 30 | using ::android::sp; 31 | using ::android::hardware::Return; 32 | using ::android::hardware::Void; 33 | 34 | class SunlightEnhancement : public ISunlightEnhancement { 35 | public: 36 | // Methods from ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement follow. 37 | Return isEnabled() override; 38 | Return setEnabled(bool enabled) override; 39 | }; 40 | 41 | } // namespace implementation 42 | } // namespace V2_1 43 | } // namespace livedisplay 44 | } // namespace lineage 45 | } // namespace vendor 46 | 47 | #endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H 48 | -------------------------------------------------------------------------------- /livedisplay/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019-2020 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "vendor.lineage.livedisplay@2.1-service.raphael" 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | #include "AntiFlicker.h" 24 | #include "SunlightEnhancement.h" 25 | #include "livedisplay/sdm/SDMController.h" 26 | 27 | using android::OK; 28 | using android::sp; 29 | using android::status_t; 30 | 31 | using ::vendor::lineage::livedisplay::V2_0::sdm::SDMController; 32 | using ::vendor::lineage::livedisplay::V2_1::IAntiFlicker; 33 | using ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement; 34 | using ::vendor::lineage::livedisplay::V2_1::implementation::AntiFlicker; 35 | using ::vendor::lineage::livedisplay::V2_1::implementation::SunlightEnhancement; 36 | 37 | int main() { 38 | status_t status = OK; 39 | std::shared_ptr controller = std::make_shared(); 40 | sp af = new AntiFlicker(); 41 | sp se = new SunlightEnhancement(); 42 | android::hardware::configureRpcThreadpool(1, true /*callerWillJoin*/); 43 | 44 | // AntiFlicker service 45 | status = af->registerAsService(); 46 | if (status != OK) { 47 | LOG(ERROR) << "Could not register service for LiveDisplay HAL AntiFlicker Iface (" 48 | << status << ")"; 49 | return 1; 50 | } 51 | 52 | // SunlightEnhancement service 53 | status = se->registerAsService(); 54 | if (status != OK) { 55 | LOG(ERROR) << "Could not register service for LiveDisplay HAL SunlightEnhancement Iface (" 56 | << status << ")"; 57 | return 1; 58 | } 59 | 60 | LOG(INFO) << "LiveDisplay HAL service is ready."; 61 | 62 | android::hardware::joinRpcThreadpool(); 63 | 64 | LOG(ERROR) << "LiveDisplay HAL service failed to join thread pool."; 65 | return 1; 66 | } 67 | -------------------------------------------------------------------------------- /livedisplay/vendor.lineage.livedisplay@2.1-service.raphael.rc: -------------------------------------------------------------------------------- 1 | on boot 2 | chown system system /sys/devices/platform/soc/soc:qcom,dsi-display-primary/hbm 3 | chown system system /sys/devices/platform/soc/soc:qcom,dsi-display-primary/dc_dim 4 | chmod 0660 /sys/devices/platform/soc/soc:qcom,dsi-display-primary/hbm 5 | chmod 0660 /sys/devices/platform/soc/soc:qcom,dsi-display-primary/dc_dim 6 | 7 | service vendor.livedisplay-hal-2-1 /vendor/bin/hw/vendor.lineage.livedisplay@2.1-service.raphael 8 | class hal 9 | user system 10 | group system 11 | -------------------------------------------------------------------------------- /livedisplay/vendor.lineage.livedisplay@2.1-service.raphael.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | vendor.lineage.livedisplay 4 | hwbinder 5 | @2.0::IPictureAdjustment/default 6 | @2.1::IAntiFlicker/default 7 | @2.1::ISunlightEnhancement/default 8 | 9 | 10 | -------------------------------------------------------------------------------- /odm.prop: -------------------------------------------------------------------------------- 1 | # Audio 2 | ro.vendor.qti.va_odm.support=1 3 | vendor.audio.feature.a2dp_offload.enable=true 4 | vendor.audio.feature.afe_proxy.enable=true 5 | vendor.audio.feature.anc_headset.enable=true 6 | vendor.audio.feature.audiozoom.enable=false 7 | vendor.audio.feature.battery_listener.enable=true 8 | vendor.audio.feature.compr_cap.enable=false 9 | vendor.audio.feature.compr_voip.enable=false 10 | vendor.audio.feature.compress_in.enable=false 11 | vendor.audio.feature.compress_meta_data.enable=true 12 | vendor.audio.feature.concurrent_capture.enable=false 13 | vendor.audio.feature.custom_stereo.enable=true 14 | vendor.audio.feature.deepbuffer_as_primary.enable=false 15 | vendor.audio.feature.display_port.enable=true 16 | vendor.audio.feature.dsm_feedback.enable=false 17 | vendor.audio.feature.dynamic_ecns.enable=false 18 | vendor.audio.feature.ext_hw_plugin.enable=true 19 | vendor.audio.feature.external_dsp.enable=false 20 | vendor.audio.feature.external_speaker.enable=false 21 | vendor.audio.feature.external_speaker_tfa.enable=false 22 | vendor.audio.feature.fluence.enable=true 23 | vendor.audio.feature.fm.enable=true 24 | vendor.audio.feature.hdmi_edid.enable=true 25 | vendor.audio.feature.hdmi_passthrough.enable=true 26 | vendor.audio.feature.hfp.enable=true 27 | vendor.audio.feature.hifi_audio.enable=false 28 | vendor.audio.feature.hwdep_cal.enable=false 29 | vendor.audio.feature.incall_music.enable=true 30 | vendor.audio.feature.keep_alive.enable=true 31 | vendor.audio.feature.kpi_optimize.enable=true 32 | vendor.audio.feature.maxx_audio.enable=false 33 | vendor.audio.feature.multi_voice_session.enable=true 34 | vendor.audio.feature.ras.enable=true 35 | vendor.audio.feature.record_play_concurency.enable=false 36 | vendor.audio.feature.snd_mon.enable=true 37 | vendor.audio.feature.spkr_prot.enable=true 38 | vendor.audio.feature.src_trkn.enable=true 39 | vendor.audio.feature.ssrec.enable=true 40 | vendor.audio.feature.usb_offload.enable=true 41 | vendor.audio.feature.usb_offload_burst_mode.enable=true 42 | vendor.audio.feature.usb_offload_sidetone_volume.enable=false 43 | vendor.audio.feature.vbat.enable=true 44 | vendor.audio.feature.wsa.enable=false 45 | -------------------------------------------------------------------------------- /overlay/hardware/xiaomi/dolby/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | @string/dolby_profile_dynamic 11 | @string/dolby_profile_video 12 | @string/dolby_profile_music 13 | @string/dolby_profile_game 14 | @string/dolby_profile_voice 15 | 16 | 17 | 18 | 0 19 | 1 20 | 2 21 | 8 22 | 9 23 | 24 | 25 | -------------------------------------------------------------------------------- /overlay/hardware/xiaomi/dolby/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | Dynamic 10 | Movie/Video 11 | Music 12 | Game 13 | Voice 14 | 15 | -------------------------------------------------------------------------------- /parts/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2017-2021 The LineageOS Project 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | android_app { 8 | name: "XiaomiParts", 9 | defaults: [ 10 | "SettingsLibDefaults", 11 | ], 12 | 13 | srcs: ["src/**/*.java"], 14 | 15 | certificate: "platform", 16 | platform_apis: true, 17 | system_ext_specific: true, 18 | privileged: true, 19 | 20 | static_libs: [ 21 | "androidx.core_core", 22 | "androidx.preference_preference", 23 | "org.lineageos.settings.resources", 24 | "vendor.xiaomi.hardware.motor-V1.0-java", 25 | ], 26 | 27 | optimize: { 28 | proguard_flags_files: [ 29 | "proguard.flags", 30 | ], 31 | }, 32 | } 33 | -------------------------------------------------------------------------------- /parts/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class org.lineageos.settings.popupcamera.* { 2 | *; 3 | } 4 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_hbm_tile.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_settings_popup.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /parts/res/layout/haptic.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 24 | -------------------------------------------------------------------------------- /parts/res/layout/preference_slider.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 25 | 26 | 31 | 32 | 38 | 39 | 40 | 41 | 51 | 52 | 63 | 64 | 65 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /parts/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | @string/disabled 21 | @string/pick_up_gesture_summary 22 | @string/pick_up_wake_gesture_summary 23 | 24 | 25 | 26 | 0 27 | 1 28 | 2 29 | 30 | 31 | 32 | 33 | popup_muqin_up.ogg 34 | popup_muqin_down.ogg 35 | popup_yingyan_up.ogg 36 | popup_yingyan_down.ogg 37 | popup_mofa_up.ogg 38 | popup_mofa_down.ogg 39 | popup_jijia_up.ogg 40 | popup_jijia_down.ogg 41 | popup_chilun_up.ogg 42 | popup_chilun_down.ogg 43 | popup_cangmen_up.ogg 44 | popup_cangmen_down.ogg 45 | 46 | 47 | 48 | @string/action_none 49 | @string/popup_title_muqin 50 | @string/popup_title_yingyan 51 | @string/popup_title_mofa 52 | @string/popup_title_jijia 53 | @string/popup_title_chilun 54 | @string/popup_title_cangmen 55 | 56 | 57 | 58 | -1 59 | 0 60 | 2 61 | 4 62 | 6 63 | 8 64 | 10 65 | 66 | 67 | -------------------------------------------------------------------------------- /parts/res/values/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 80 22 | 100 23 | 24 | -------------------------------------------------------------------------------- /parts/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | Popup camera 20 | Camera LED 21 | Show LED light when the front camera appears and retracts 22 | Popup camera sound effects 23 | Xylophone 24 | Condor 25 | Magic 26 | Mecha 27 | Gearwheel 28 | Cabin door 29 | Calibration 30 | Calibrate the popup camera motor 31 | Motor calibration 32 | Unnecessary use of calibration may cause permanent damage. It is recommended to calibrate the popup camera motor only in case of it not moving properly or it being in incorrect position! 33 | 34 | 35 | Warning 36 | Couldn\'t close front camera. Try calibrating the motor. 37 | Couldn\'t open front camera. Try calibrating the motor. 38 | Front camera cannot be used during calibration. 39 | Calibrate 40 | Couldn\'t calibrate 41 | Calibrated successfully. You can open the front camera now. 42 | 43 | 44 | Do you want to raise the front facing camera? 45 | No 46 | Yes 47 | Front camera raise dialog 48 | Always ask before opening 49 | Only ask when the screen is off 50 | 51 | 52 | Haptic feedback 53 | Setting-up haptic level too high may cause permanent hardware damage, use at your own risk 54 | Customize vibration intensity 55 | Level 56 | Amount of vibration intensity 57 | Feature not supported 58 | 59 | 60 | High Brightness Mode 61 | 62 | -------------------------------------------------------------------------------- /parts/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 |