├── sepolicy
├── vendor
│ ├── rild.te
│ ├── hvdcp.te
│ ├── sensors.te
│ ├── vndservice.te
│ ├── hal_bluetooth_default.te
│ ├── property.te
│ ├── vndservice_contexts
│ ├── hwservice.te
│ ├── vppservice.te
│ ├── hal_audio_default.te
│ ├── hal_nfc_default.te
│ ├── device.te
│ ├── tee.te
│ ├── kernel.te
│ ├── init.te
│ ├── hal_neuralnetworks_default.te
│ ├── file.te
│ ├── app.te
│ ├── remosaic_daemon.te
│ ├── hal_camera_default.te
│ ├── batterysecret.te
│ ├── hwservice_contexts
│ ├── hal_thermal_default.te
│ ├── hal_power_default.te
│ ├── hal_mlipay_default.te
│ ├── hal_motor_default.te
│ ├── property_contexts
│ ├── init-thermal-symlinks.sh.te
│ ├── hal_fingerprint_default.te
│ ├── file_contexts
│ └── genfs_contexts
├── private
│ ├── system_app.te
│ ├── seapp_contexts
│ ├── dontaudit.te
│ ├── property_contexts
│ └── xiaomiparts_app.te
└── public
│ ├── attributes
│ ├── property.te
│ └── xiaomiparts_app.te
├── libshim
├── libwatermark_shim.c
└── Android.bp
├── wifi
├── p2p_supplicant_overlay.conf
└── wpa_supplicant_overlay.conf
├── seccomp
├── codec2.vendor.ext.policy
├── mediacodec.policy
├── qti-systemd.policy
└── codec2.vendor.base.policy
├── rro_overlays
└── WifiResCommon
│ ├── Android.bp
│ ├── res
│ └── values
│ │ ├── integers.xml
│ │ ├── strings.xml
│ │ └── bools.xml
│ └── AndroidManifest.xml
├── parts
├── proguard.flags
├── res
│ ├── drawable
│ │ ├── ic_popup_sound.xml
│ │ ├── ic_popup_light.xml
│ │ ├── ic_settings_popup.xml
│ │ ├── ic_thermal_dialer.xml
│ │ ├── ic_thermal_camera.xml
│ │ ├── ic_thermal_benchmark.xml
│ │ ├── ic_thermal_browser.xml
│ │ ├── ic_thermal_gaming.xml
│ │ ├── ic_thermal_default.xml
│ │ └── ic_thermal_streaming.xml
│ ├── xml
│ │ ├── popup_settings.xml
│ │ ├── dirac_settings.xml
│ │ └── doze_settings.xml
│ └── values
│ │ └── styles.xml
├── Android.bp
├── src
│ └── org
│ │ └── lineageos
│ │ └── settings
│ │ ├── popupcamera
│ │ ├── PopupCameraUtils.java
│ │ ├── PopupCameraSettingsActivity.java
│ │ ├── PopupCameraSettingsFragment.java
│ │ ├── PopupCameraPreferences.java
│ │ └── Constants.java
│ │ ├── dirac
│ │ ├── DiracActivity.java
│ │ ├── DiracUtils.java
│ │ ├── DiracSound.java
│ │ └── DiracSettingsFragment.java
│ │ ├── doze
│ │ ├── DozeSettingsActivity.java
│ │ ├── PickupSensor.java
│ │ ├── DozeService.java
│ │ └── ProximitySensor.java
│ │ └── BootCompletedReceiver.java
└── AndroidManifest.xml
├── overlay-arrow
├── frameworks
│ └── base
│ │ └── packages
│ │ └── SystemUI
│ │ └── res
│ │ ├── drawable-nodpi
│ │ └── udfps_icon_pressed.png
│ │ └── values
│ │ └── config.xml
└── packages
│ └── apps
│ ├── Dialer
│ └── java
│ │ └── com
│ │ └── android
│ │ └── dialer
│ │ └── callrecord
│ │ └── res
│ │ └── values
│ │ └── config.xml
│ └── Settings
│ └── res
│ └── values
│ └── config.xml
├── overlay-lineage
└── frameworks
│ └── base
│ └── packages
│ └── SystemUI
│ └── res
│ ├── drawable-nodpi
│ └── udfps_icon_pressed.png
│ └── values
│ └── config.xml
├── interfaces
├── Android.bp
├── updates-makefiles.sh
├── xiaomi
│ └── hardware
│ │ ├── fingerprintextension
│ │ └── 1.0
│ │ │ ├── Android.bp
│ │ │ └── IXiaomiFingerprint.hal
│ │ └── motor
│ │ └── 1.0
│ │ ├── Android.bp
│ │ ├── types.hal
│ │ ├── IMotorCallback.hal
│ │ └── IMotor.hal
└── goodix
│ └── hardware
│ └── biometrics
│ └── fingerprint
│ └── 2.1
│ ├── Android.bp
│ ├── IGoodixFingerprintDaemonCallback.hal
│ └── IGoodixFingerprintDaemon.hal
├── Android.bp
├── libhidl
└── Android.bp
├── power-libperfmgr
├── android.hardware.power-service.xiaomi.xml
├── Android.bp
├── android.hardware.power-service.xiaomi-libperfmgr.rc
├── PowerExt.h
├── InteractionHandler.h
├── Power.h
├── PowerExt.cpp
├── service.cpp
└── PowerSessionManager.h
├── AndroidProducts.mk
├── light
├── android.hardware.light@2.0-service.xiaomi_raphael.rc
├── Android.bp
├── service.cpp
└── Light.h
├── libqti-perfd-client
├── Android.bp
└── client.cpp
├── arrow.dependencies
├── init
├── Android.bp
└── init_raphael.cpp
├── thermal
├── android.hardware.thermal@2.0-service.xiaomi.xml
├── android.hardware.thermal@2.0-service.xiaomi.rc
├── Android.bp
├── utils
│ ├── thermal_files.h
│ └── thermal_files.cpp
├── service.cpp
├── etc
│ └── thermal-engine-msmnile-normal_mode.conf
└── Thermal.h
├── manifest_nfc.xml
├── setup-makefiles.sh
├── configs
├── public.libraries.txt
├── component-overrides.xml
└── privapp-permissions-hotword.xml
├── gps
└── etc
│ ├── lowi.conf
│ ├── flp.conf
│ └── xtwifi.conf
├── fingerprint
├── UdfpsExtension.cpp
├── Android.bp
├── service.cpp
└── android.hardware.biometrics.fingerprint@2.3-service.xiaomi_raphael.rc
├── system.prop
├── overlay
├── packages
│ ├── apps
│ │ └── Settings
│ │ │ └── res
│ │ │ └── values
│ │ │ └── config.xml
│ └── services
│ │ └── Telephony
│ │ └── res
│ │ └── values
│ │ └── config.xml
└── frameworks
│ └── base
│ ├── packages
│ └── SystemUI
│ │ └── res
│ │ ├── drawable
│ │ └── rounded.xml
│ │ └── values
│ │ ├── dimens.xml
│ │ └── config.xml
│ └── core
│ └── res
│ └── res
│ └── values
│ └── dimens.xml
├── arrow_raphael.mk
├── bluetooth
└── include
│ └── bdroid_buildcfg.h
├── releasetools.py
├── system_ext.prop
├── extract-files.sh
├── README.md
├── odm.prop
├── rootdir
├── etc
│ ├── init.recovery.qcom.rc
│ └── init.xiaomi.rc
└── Android.mk
├── audio
└── mixer_paths_overlay_dynamic.xml
├── media
└── system_properties.xml
└── compatibility_matrix.xml
/sepolicy/vendor/rild.te:
--------------------------------------------------------------------------------
1 | set_prop(rild, deviceid_prop)
2 |
--------------------------------------------------------------------------------
/sepolicy/private/system_app.te:
--------------------------------------------------------------------------------
1 | hal_client_domain(system_app, hal_mlipay)
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hvdcp.te:
--------------------------------------------------------------------------------
1 | allow vendor_hvdcp kmsg_device:chr_file rw_file_perms;
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/sensors.te:
--------------------------------------------------------------------------------
1 | r_dir_file(vendor_sensors, vendor_sysfs_graphics)
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vndservice.te:
--------------------------------------------------------------------------------
1 | type remosaic_daemon_service, vndservice_manager_type;
2 |
--------------------------------------------------------------------------------
/sepolicy/public/attributes:
--------------------------------------------------------------------------------
1 | hal_attribute_lineage(mlipay)
2 | hal_attribute_lineage(motor)
3 |
--------------------------------------------------------------------------------
/sepolicy/public/property.te:
--------------------------------------------------------------------------------
1 | vendor_public_prop(deviceid_prop)
2 | vendor_public_prop(vendor_fp_prop)
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_bluetooth_default.te:
--------------------------------------------------------------------------------
1 | r_dir_file(hal_bluetooth_default, vendor_wifi_vendor_data_file)
2 |
--------------------------------------------------------------------------------
/libshim/libwatermark_shim.c:
--------------------------------------------------------------------------------
1 | void _ZN4piex19GetPreviewImageDataEPNS_15StreamInterfaceEPNS_16PreviewImageDataE() {}
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/property.te:
--------------------------------------------------------------------------------
1 | vendor_internal_prop(vendor_power_prop)
2 | vendor_internal_prop(vendor_thermal_prop)
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vndservice_contexts:
--------------------------------------------------------------------------------
1 | android.IRemosaicDaemon u:object_r:remosaic_daemon_service:s0
2 |
--------------------------------------------------------------------------------
/sepolicy/public/xiaomiparts_app.te:
--------------------------------------------------------------------------------
1 | type xiaomiparts_app, domain;
2 |
3 | typeattribute xiaomiparts_app mlstrustedsubject;
4 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hwservice.te:
--------------------------------------------------------------------------------
1 | type hal_mlipay_hwservice, hwservice_manager_type;
2 | type hal_motor_hwservice, hwservice_manager_type;
3 |
--------------------------------------------------------------------------------
/sepolicy/private/seapp_contexts:
--------------------------------------------------------------------------------
1 | user=system seinfo=platform name=org.lineageos.settings domain=xiaomiparts_app type=system_app_data_file
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vppservice.te:
--------------------------------------------------------------------------------
1 | # Allow vppservice to read fastrpc_shell_3
2 | allow vendor_vppservice public_adsprpcd_file:file r_file_perms;
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_audio_default.te:
--------------------------------------------------------------------------------
1 | set_prop(hal_audio_default, vendor_audio_prop)
2 |
3 | allow hal_audio_default audio_socket:sock_file rw_file_perms;
4 |
--------------------------------------------------------------------------------
/sepolicy/private/dontaudit.te:
--------------------------------------------------------------------------------
1 | # b/148033913
2 | dontaudit fsck self:capability kill;
3 |
4 | # b/151195350
5 | dontaudit linkerconfig self:capability kill;
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_nfc_default.te:
--------------------------------------------------------------------------------
1 | allow hal_nfc_default vendor_nfc_vendor_data_file:dir create_dir_perms;
2 | allow hal_nfc_default vendor_nfc_vendor_data_file:file create_file_perms;
3 |
--------------------------------------------------------------------------------
/seccomp/codec2.vendor.ext.policy:
--------------------------------------------------------------------------------
1 | # device specific syscalls
2 | pselect6: 1
3 | eventfd2: 1
4 | sendto: 1
5 | recvfrom: 1
6 | _llseek: 1
7 | sysinfo: 1
8 | getcwd: 1
9 | getdents64: 1
10 |
--------------------------------------------------------------------------------
/rro_overlays/WifiResCommon/Android.bp:
--------------------------------------------------------------------------------
1 | runtime_resource_overlay {
2 | name: "WifiResCommon",
3 | theme: "WifiResCommon",
4 | sdk_version: "current",
5 | product_specific: true
6 | }
7 |
--------------------------------------------------------------------------------
/sepolicy/vendor/device.te:
--------------------------------------------------------------------------------
1 | type fingerprint_device, dev_type;
2 | type hall_device, dev_type;
3 | type motor_device, dev_type;
4 | type thermal_link_device, dev_type;
5 | type ultrasound_device, dev_type;
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/tee.te:
--------------------------------------------------------------------------------
1 | allow tee {
2 | fingerprint_data_file
3 | mnt_vendor_file
4 | }:dir rw_dir_perms;
5 |
6 | allow tee {
7 | fingerprint_data_file
8 | mnt_vendor_file
9 | }:file create_file_perms;
10 |
--------------------------------------------------------------------------------
/sepolicy/vendor/kernel.te:
--------------------------------------------------------------------------------
1 | # For diag over socket
2 | userdebug_or_eng(`
3 | allow kernel self:qipcrtr_socket create;
4 | ')
5 | # Ignore the socket if it fails to create
6 | dontaudit kernel self:qipcrtr_socket create;
7 |
--------------------------------------------------------------------------------
/parts/proguard.flags:
--------------------------------------------------------------------------------
1 | -keep class org.lineageos.settings.dirac.* {
2 | *;
3 | }
4 |
5 | -keep class org.lineageos.settings.doze.* {
6 | *;
7 | }
8 |
9 | -keep class org.lineageos.settings.popupcamera.* {
10 | *;
11 | }
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/init.te:
--------------------------------------------------------------------------------
1 | allow init adsprpcd_file:file mounton;
2 |
3 | allow vendor_init thermal_link_device:dir r_dir_perms;
4 | allow vendor_init thermal_link_device:lnk_file r_file_perms;
5 |
6 | set_prop(vendor_init, vendor_power_prop)
7 |
--------------------------------------------------------------------------------
/overlay-arrow/frameworks/base/packages/SystemUI/res/drawable-nodpi/udfps_icon_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ArrowOS-Devices/android_device_xiaomi_raphael/HEAD/overlay-arrow/frameworks/base/packages/SystemUI/res/drawable-nodpi/udfps_icon_pressed.png
--------------------------------------------------------------------------------
/overlay-lineage/frameworks/base/packages/SystemUI/res/drawable-nodpi/udfps_icon_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ArrowOS-Devices/android_device_xiaomi_raphael/HEAD/overlay-lineage/frameworks/base/packages/SystemUI/res/drawable-nodpi/udfps_icon_pressed.png
--------------------------------------------------------------------------------
/interfaces/Android.bp:
--------------------------------------------------------------------------------
1 | hidl_package_root {
2 | name: "vendor.goodix",
3 | path: "device/xiaomi/raphael/interfaces/goodix",
4 | }
5 |
6 | hidl_package_root {
7 | name: "vendor.xiaomi",
8 | path: "device/xiaomi/raphael/interfaces/xiaomi",
9 | }
10 |
--------------------------------------------------------------------------------
/libshim/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2021 The LineageOS Project
3 | //
4 | // SPDX-License-Identifier: Apache-2.0
5 | //
6 |
7 | cc_library_shared {
8 | name: "libwatermark_shim",
9 | srcs: ["libwatermark_shim.c"],
10 | vendor: true,
11 | }
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_neuralnetworks_default.te:
--------------------------------------------------------------------------------
1 | get_prop(vendor_hal_neuralnetworks_default, vendor_adsprpc_prop)
2 |
3 | # Allow vendor_hal_neuralnetworks_default to read fastrpc_shell_3
4 | allow vendor_hal_neuralnetworks_default public_adsprpcd_file:file r_file_perms;
5 |
--------------------------------------------------------------------------------
/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2021 The LineageOS Project
3 | //
4 | // SPDX-License-Identifier: Apache-2.0
5 | //
6 |
7 | soong_namespace {
8 | imports: [
9 | "hardware/google/interfaces",
10 | "hardware/google/pixel",
11 | ],
12 | }
13 |
--------------------------------------------------------------------------------
/libhidl/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2021 The LineageOS Project
3 | //
4 | // SPDX-License-Identifier: Apache-2.0
5 | //
6 |
7 | cc_library_shared {
8 | name: "android.hidl.base@1.0",
9 | system_ext_specific: true,
10 | vendor_available: true
11 | }
12 |
--------------------------------------------------------------------------------
/power-libperfmgr/android.hardware.power-service.xiaomi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | android.hardware.power
4 | 2
5 | IPower/default
6 |
7 |
8 |
--------------------------------------------------------------------------------
/rro_overlays/WifiResCommon/res/values/integers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 32
5 |
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/file.te:
--------------------------------------------------------------------------------
1 | # Files
2 | type audio_socket, file_type;
3 | type fingerprint_data_file, data_file_type, file_type;
4 | type persist_camera_file, vendor_persist_type, file_type;
5 | type public_adsprpcd_file, file_type;
6 |
7 | # Nodes
8 | type sysfs_fod, sysfs_type, fs_type;
9 |
--------------------------------------------------------------------------------
/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="no_rrm=1 use_p2p_group_interface=1"
9 |
--------------------------------------------------------------------------------
/AndroidProducts.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2021 The LineageOS Project
3 | #
4 | # SPDX-License-Identifier: Apache-2.0
5 | #
6 |
7 | PRODUCT_MAKEFILES := \
8 | $(LOCAL_DIR)/arrow_raphael.mk
9 |
10 | COMMON_LUNCH_CHOICES := \
11 | arrow_raphael-userdebug \
12 | arrow_raphael-eng
13 |
--------------------------------------------------------------------------------
/sepolicy/vendor/app.te:
--------------------------------------------------------------------------------
1 | get_prop({ appdomain -isolated_app }, vendor_fp_prop)
2 | get_prop({ appdomain -isolated_app }, vendor_tee_listener_prop)
3 |
4 | allow { appdomain -isolated_app } adsprpcd_file:dir r_dir_perms;
5 | allow { appdomain -isolated_app } public_adsprpcd_file:file r_file_perms;
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/remosaic_daemon.te:
--------------------------------------------------------------------------------
1 | type remosaic_daemon, domain;
2 |
3 | type remosaic_daemon_exec, exec_type, vendor_file_type, file_type;
4 | init_daemon_domain(remosaic_daemon)
5 |
6 | vndbinder_use(remosaic_daemon)
7 |
8 | allow remosaic_daemon remosaic_daemon_service:service_manager add;
9 |
--------------------------------------------------------------------------------
/interfaces/updates-makefiles.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source $ANDROID_BUILD_TOP/system/tools/hidl/update-makefiles-helper.sh
4 |
5 | do_makefiles_update \
6 | "vendor.goodix:device/xiaomi/raphael/interfaces/goodix"
7 |
8 | do_makefiles_update \
9 | "vendor.xiaomi:device/xiaomi/raphael/interfaces/xiaomi"
10 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_camera_default.te:
--------------------------------------------------------------------------------
1 | r_dir_file(hal_camera_default, mnt_vendor_file)
2 | r_dir_file(hal_camera_default, persist_camera_file)
3 | r_dir_file(hal_camera_default, vendor_sysfs_kgsl)
4 |
5 | # Allow hal_camera_default to read fastrpc_shell_3
6 | allow hal_camera_default public_adsprpcd_file:file r_file_perms;
7 |
--------------------------------------------------------------------------------
/light/android.hardware.light@2.0-service.xiaomi_raphael.rc:
--------------------------------------------------------------------------------
1 | service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.xiaomi_raphael
2 | interface android.hardware.light@2.0::ILight default
3 | class hal
4 | user system
5 | group system
6 | # shutting off lights while powering-off
7 | shutdown critical
8 |
--------------------------------------------------------------------------------
/libqti-perfd-client/Android.bp:
--------------------------------------------------------------------------------
1 | cc_library_shared {
2 | name: "libqti-perfd-client",
3 | proprietary: true,
4 | defaults: ["hidl_defaults"],
5 | srcs: [
6 | "client.cpp",
7 | ],
8 | cflags: [
9 | "-Werror",
10 | "-Wextra",
11 | "-Wall",
12 | ],
13 | shared_libs: [
14 | "libutils",
15 | "liblog",
16 | ],
17 | }
18 |
--------------------------------------------------------------------------------
/arrow.dependencies:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "repository": "android_kernel_xiaomi_raphael",
4 | "target_path": "kernel/xiaomi/raphael"
5 | },
6 | {
7 | "repository": "android_packages_apps_GCamGOPrebuilt",
8 | "target_path": "packages/apps/GCamGOPrebuilt"
9 | },
10 | {
11 | "repository": "android_vendor_xiaomi_raphael",
12 | "target_path": "vendor/xiaomi/raphael"
13 | }
14 | ]
15 |
--------------------------------------------------------------------------------
/init/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_raphael",
9 | srcs: ["init_raphael.cpp"],
10 | shared_libs: ["libbase"],
11 | recovery_available: true,
12 | include_dirs: [
13 | "system/core/init",
14 | "system/libbase/include"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/interfaces/xiaomi/hardware/fingerprintextension/1.0/Android.bp:
--------------------------------------------------------------------------------
1 | // This file is autogenerated by hidl-gen -Landroidbp.
2 |
3 | hidl_interface {
4 | name: "vendor.xiaomi.hardware.fingerprintextension@1.0",
5 | root: "vendor.xiaomi",
6 | system_ext_specific: true,
7 | srcs: [
8 | "IXiaomiFingerprint.hal",
9 | ],
10 | interfaces: [
11 | "android.hidl.base@1.0",
12 | ],
13 | gen_java: true,
14 | }
15 |
--------------------------------------------------------------------------------
/sepolicy/vendor/batterysecret.te:
--------------------------------------------------------------------------------
1 | type batterysecret, domain;
2 |
3 | type batterysecret_exec, exec_type, vendor_file_type, file_type;
4 | init_daemon_domain(batterysecret)
5 |
6 | r_dir_file(batterysecret, vendor_sysfs_usb_supply)
7 |
8 | allow batterysecret self:capability2 block_suspend;
9 | allow batterysecret self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
10 |
11 | allow batterysecret kmsg_device:chr_file rw_file_perms;
12 |
--------------------------------------------------------------------------------
/thermal/android.hardware.thermal@2.0-service.xiaomi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | android.hardware.thermal
4 | hwbinder
5 | 1.0
6 | 2.0
7 |
8 | IThermal
9 | default
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/interfaces/xiaomi/hardware/motor/1.0/Android.bp:
--------------------------------------------------------------------------------
1 | // This file is autogenerated by hidl-gen -Landroidbp.
2 |
3 | hidl_interface {
4 | name: "vendor.xiaomi.hardware.motor@1.0",
5 | root: "vendor.xiaomi",
6 | system_ext_specific: true,
7 | srcs: [
8 | "types.hal",
9 | "IMotor.hal",
10 | "IMotorCallback.hal",
11 | ],
12 | interfaces: [
13 | "android.hidl.base@1.0",
14 | ],
15 | gen_java: true,
16 | }
17 |
--------------------------------------------------------------------------------
/seccomp/mediacodec.policy:
--------------------------------------------------------------------------------
1 | # device specific syscalls
2 | # extension of services/mediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy
3 | pselect6: 1
4 | eventfd2: 1
5 | sendto: 1
6 | recvfrom: 1
7 | _llseek: 1
8 | sysinfo: 1
9 | getcwd: 1
10 | getdents64: 1
11 | ARM_cacheflush: 1
12 | inotify_init1: 1
13 | inotify_add_watch: 1
14 | inotify_rm_watch: 1
15 | uname: 1
16 | ueventd: 1
17 | timer_create: 1
18 | timer_settime: 1
19 | rt_sigtimedwait: 1
20 |
--------------------------------------------------------------------------------
/interfaces/goodix/hardware/biometrics/fingerprint/2.1/Android.bp:
--------------------------------------------------------------------------------
1 | // This file is autogenerated by hidl-gen -Landroidbp.
2 |
3 | hidl_interface {
4 | name: "vendor.goodix.hardware.biometrics.fingerprint@2.1",
5 | root: "vendor.goodix",
6 | system_ext_specific: true,
7 | srcs: [
8 | "IGoodixFingerprintDaemon.hal",
9 | "IGoodixFingerprintDaemonCallback.hal",
10 | ],
11 | interfaces: [
12 | "android.hidl.base@1.0",
13 | ],
14 | gen_java: true,
15 | }
16 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hwservice_contexts:
--------------------------------------------------------------------------------
1 | vendor.goodix.hardware.biometrics.fingerprint::IGoodixFingerprintDaemon u:object_r:hal_fingerprint_hwservice:s0
2 | vendor.xiaomi.hardware.fingerprintextension::IXiaomiFingerprint u:object_r:hal_fingerprint_hwservice:s0
3 | vendor.xiaomi.hardware.mlipay::IMlipayService u:object_r:hal_mlipay_hwservice:s0
4 | vendor.xiaomi.hardware.motor::IMotor u:object_r:hal_motor_hwservice:s0
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_thermal_default.te:
--------------------------------------------------------------------------------
1 | allow hal_thermal_default sysfs_thermal:dir r_dir_perms;
2 | allow hal_thermal_default sysfs_thermal:file rw_file_perms;
3 | allow hal_thermal_default sysfs_thermal:lnk_file r_file_perms;
4 | allow hal_thermal_default thermal_link_device:dir r_dir_perms;
5 | allow hal_thermal_default proc_stat:file r_file_perms;
6 |
7 | allow hal_thermal_default self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
8 |
9 | hal_client_domain(hal_thermal_default, hal_power);
10 |
11 | get_prop(hal_thermal_default, vendor_thermal_prop)
12 |
--------------------------------------------------------------------------------
/rro_overlays/WifiResCommon/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_power_default.te:
--------------------------------------------------------------------------------
1 | allow hal_power_default vendor_sysfs_kgsl:lnk_file rw_file_perms;
2 |
3 | allow hal_power_default {
4 | input_device
5 | vendor_latency_device
6 | }:chr_file rw_file_perms;
7 |
8 | allow hal_power_default {
9 | cgroup
10 | sysfs_devices_system_cpu
11 | sysfs_fs_f2fs
12 | vendor_sysfs_devfreq
13 | vendor_sysfs_kgsl
14 | vendor_sysfs_scsi_host
15 | }:file rw_file_perms;
16 |
17 | allow hal_power_default {
18 | cgroup
19 | input_device
20 | sysfs_fs_f2fs
21 | vendor_sysfs_devfreq
22 | }:dir r_dir_perms;
23 |
24 | set_prop(hal_power_default, vendor_power_prop)
25 |
--------------------------------------------------------------------------------
/parts/res/drawable/ic_popup_sound.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_mlipay_default.te:
--------------------------------------------------------------------------------
1 | type hal_mlipay_default, domain;
2 | hal_server_domain(hal_mlipay_default, hal_mlipay)
3 |
4 | type hal_mlipay_default_exec, exec_type, vendor_file_type, file_type;
5 | init_daemon_domain(hal_mlipay_default)
6 |
7 | hal_attribute_hwservice(hal_mlipay, hal_mlipay_hwservice)
8 |
9 | binder_call(hal_mlipay_client, hal_mlipay_server)
10 |
11 | allow hal_mlipay_default {
12 | tee_device
13 | ion_device
14 | }:chr_file rw_file_perms;
15 |
16 | r_dir_file(hal_mlipay_default, firmware_file)
17 |
18 | get_prop(hal_mlipay_default, vendor_fp_prop)
19 | set_prop(hal_mlipay_default, vendor_tee_listener_prop)
20 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_motor_default.te:
--------------------------------------------------------------------------------
1 | type hal_motor_default, domain;
2 | hal_server_domain(hal_motor_default, hal_motor)
3 |
4 | type hal_motor_default_exec, exec_type, vendor_file_type, file_type;
5 | init_daemon_domain(hal_motor_default)
6 |
7 | hal_attribute_hwservice(hal_motor, hal_motor_hwservice)
8 |
9 | binder_call(hal_motor_client, hal_motor_server)
10 |
11 | binder_call(hal_motor_default, xiaomiparts_app)
12 |
13 | r_dir_file(hal_motor_default, mnt_vendor_file)
14 | r_dir_file(hal_motor_default, vendor_persist_sensors_file)
15 |
16 | allow hal_motor_default {
17 | motor_device
18 | hall_device
19 | }:chr_file rw_file_perms;
20 |
--------------------------------------------------------------------------------
/sepolicy/private/property_contexts:
--------------------------------------------------------------------------------
1 | # Global
2 | ro.boot.hwc u:object_r:exported_default_prop:s0
3 | ro.build.flavor u:object_r:build_prop:s0
4 | ro.product.mod_device u:object_r:build_prop:s0
5 |
6 | # IMEI
7 | persist.radio.imei u:object_r:deviceid_prop:s0
8 | persist.radio.meid u:object_r:deviceid_prop:s0
9 | ro.ril.oem.imei u:object_r:deviceid_prop:s0
10 | ro.ril.oem.meid u:object_r:deviceid_prop:s0
11 |
12 | # MIUI
13 | ro.cust.test u:object_r:exported_system_prop:s0
14 | ro.miui. u:object_r:exported_system_prop:s0
15 |
--------------------------------------------------------------------------------
/manifest_nfc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | android.hardware.nfc
4 | hwbinder
5 | 1.2
6 |
7 | INfc
8 | default
9 |
10 |
11 |
12 | vendor.nxp.hardware.nfc
13 | hwbinder
14 | 2.0
15 |
16 | INqNfc
17 | default
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/thermal/android.hardware.thermal@2.0-service.xiaomi.rc:
--------------------------------------------------------------------------------
1 | on property:vendor.thermal.link_ready=1
2 | # queue the trigger to start thermal-hal and continue execute
3 | # per-device thermal setup "on property:vendor.thermal.link_ready=1"
4 | trigger enable-thermal-hal
5 |
6 | on enable-thermal-hal
7 | start vendor.thermal-hal-2-0
8 |
9 | service vendor.thermal-hal-2-0 /vendor/bin/hw/android.hardware.thermal@2.0-service.xiaomi
10 | interface android.hardware.thermal@1.0::IThermal default
11 | interface android.hardware.thermal@2.0::IThermal default
12 | class hal
13 | user system
14 | group system
15 | priority -20
16 | disabled
17 |
--------------------------------------------------------------------------------
/rro_overlays/WifiResCommon/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/parts/res/drawable/ic_popup_light.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/sepolicy/vendor/property_contexts:
--------------------------------------------------------------------------------
1 | # Camera
2 | camera. u:object_r:vendor_camera_prop:s0
3 | persist.camera. u:object_r:vendor_camera_prop:s0
4 | persist.vendor.camera u:object_r:vendor_camera_prop:s0
5 | vendor.camera. u:object_r:vendor_camera_prop:s0
6 |
7 | # Fingerprint
8 | gf.debug. u:object_r:vendor_fp_prop:s0
9 | persist.vendor.sys.fp. u:object_r:vendor_fp_prop:s0
10 |
11 | # Mlipay
12 | persist.vendor.sys.pay. u:object_r:vendor_tee_listener_prop:s0
13 |
14 | # Power
15 | vendor.powerhal. u:object_r:vendor_power_prop:s0
16 |
17 | # Thermal
18 | vendor.thermal. u:object_r:vendor_thermal_prop:s0
19 |
--------------------------------------------------------------------------------
/parts/res/drawable/ic_settings_popup.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/init-thermal-symlinks.sh.te:
--------------------------------------------------------------------------------
1 | type init-thermal-symlinks-sh, domain;
2 | type init-thermal-symlinks-sh_exec, exec_type, vendor_file_type, file_type;
3 |
4 | init_daemon_domain(init-thermal-symlinks-sh)
5 |
6 | allow init-thermal-symlinks-sh vendor_toolbox_exec:file rx_file_perms;
7 | allow init-thermal-symlinks-sh thermal_link_device:dir rw_dir_perms;
8 | allow init-thermal-symlinks-sh thermal_link_device:lnk_file create_file_perms;
9 | allow init-thermal-symlinks-sh sysfs_thermal:dir r_dir_perms;
10 | allow init-thermal-symlinks-sh sysfs_thermal:file r_file_perms;
11 | allow init-thermal-symlinks-sh sysfs_thermal:lnk_file r_file_perms;
12 | set_prop(init-thermal-symlinks-sh, vendor_thermal_prop)
13 |
--------------------------------------------------------------------------------
/parts/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2017-2020 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 | resource_dirs: ["res"],
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 | "vendor.xiaomi.hardware.motor-V1.0-java",
24 | "org.lineageos.settings.resources",
25 | ],
26 |
27 | optimize: {
28 | proguard_flags_files: ["proguard.flags"],
29 | },
30 | }
31 |
--------------------------------------------------------------------------------
/libqti-perfd-client/client.cpp:
--------------------------------------------------------------------------------
1 | #define LOG_TAG "libqti-perfd-client"
2 |
3 | #include
4 | #include
5 |
6 | extern "C" void perf_get_feedback() {}
7 | extern "C" void perf_hint() {}
8 | extern "C" int perf_lock_acq(int handle, int duration, int arg3[], int arg4) {
9 | ALOGI("perf_lock_acq: handle: %d, duration: %d, arg3[0]: %d, arg4: %d",
10 | handle, duration, arg3[0], arg4);
11 | if (handle > 0)
12 | return handle;
13 |
14 | return 233;
15 | }
16 | extern "C" void perf_lock_cmd() {}
17 | extern "C" int perf_lock_rel(int handle) {
18 | ALOGI("perf_lock_rel: handle: %d", handle);
19 | if (handle > 0)
20 | return handle;
21 |
22 | return 233;
23 | }
24 | extern "C" void perf_lock_use_profile() {}
25 |
--------------------------------------------------------------------------------
/power-libperfmgr/Android.bp:
--------------------------------------------------------------------------------
1 | cc_binary {
2 | name: "android.hardware.power-service.xiaomi-libperfmgr",
3 | relative_install_path: "hw",
4 | init_rc: ["android.hardware.power-service.xiaomi-libperfmgr.rc"],
5 | vintf_fragments: ["android.hardware.power-service.xiaomi.xml"],
6 | vendor: true,
7 | shared_libs: [
8 | "android.hardware.power-V2-ndk",
9 | "libbase",
10 | "libbinder_ndk",
11 | "libcutils",
12 | "liblog",
13 | "libperfmgr",
14 | "libprocessgroup",
15 | "libutils",
16 | "pixel-power-ext-V1-ndk",
17 | ],
18 | srcs: [
19 | "InteractionHandler.cpp",
20 | "Power.cpp",
21 | "PowerExt.cpp",
22 | "PowerHintSession.cpp",
23 | "PowerSessionManager.cpp",
24 | "service.cpp",
25 | ],
26 | }
27 |
--------------------------------------------------------------------------------
/interfaces/xiaomi/hardware/motor/1.0/types.hal:
--------------------------------------------------------------------------------
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 | package vendor.xiaomi.hardware.motor@1.0;
18 |
19 | struct MotorEvent {
20 | int32_t vaalue;
21 | int32_t cookie;
22 | };
23 |
--------------------------------------------------------------------------------
/interfaces/xiaomi/hardware/motor/1.0/IMotorCallback.hal:
--------------------------------------------------------------------------------
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 | package vendor.xiaomi.hardware.motor@1.0;
18 |
19 | interface IMotorCallback {
20 | oneway onNotify(MotorEvent event);
21 | };
22 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_fingerprint_default.te:
--------------------------------------------------------------------------------
1 | hal_client_domain(hal_fingerprint_default, vendor_hal_perf)
2 |
3 | binder_call(hal_fingerprint_default, vendor_hal_perf_default)
4 |
5 | allow hal_fingerprint_default self:netlink_socket create_socket_perms_no_ioctl;
6 |
7 | allow hal_fingerprint_default input_device:dir r_dir_perms;
8 |
9 | allow hal_fingerprint_default {
10 | fingerprint_device
11 | input_device
12 | tee_device
13 | }:chr_file rw_file_perms;
14 |
15 | set_prop(hal_fingerprint_default, vendor_fp_prop)
16 |
17 | # Allow hal_fingerprint_default to read fastrpc_shell_3
18 | allow hal_fingerprint_default public_adsprpcd_file:file r_file_perms;
19 |
20 | allow hal_fingerprint_default sysfs_fod:file rw_file_perms;
21 |
22 | allow hal_fingerprint_default vendor_sysfs_graphics:dir r_dir_perms;
23 | allow hal_fingerprint_default vendor_sysfs_graphics:file r_file_perms;
24 |
--------------------------------------------------------------------------------
/parts/res/xml/popup_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/setup-makefiles.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 2016 The CyanogenMod Project
4 | # Copyright (C) 2017-2021 The LineageOS Project
5 | #
6 | # SPDX-License-Identifier: Apache-2.0
7 | #
8 |
9 | set -e
10 |
11 | DEVICE=raphael
12 | VENDOR=xiaomi
13 |
14 | # Load extract_utils and do some sanity checks
15 | MY_DIR="${BASH_SOURCE%/*}"
16 | if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
17 |
18 | ANDROID_ROOT="${MY_DIR}/../../.."
19 |
20 | HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
21 | if [ ! -f "${HELPER}" ]; then
22 | echo "Unable to find helper script at ${HELPER}"
23 | exit 1
24 | fi
25 | source "${HELPER}"
26 |
27 | # Initialize the helper
28 | setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}"
29 |
30 | # Warning headers and guards
31 | write_headers
32 |
33 | write_makefiles "${MY_DIR}/proprietary-files.txt" true
34 |
35 | # Finish
36 | write_footers
37 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/interfaces/xiaomi/hardware/fingerprintextension/1.0/IXiaomiFingerprint.hal:
--------------------------------------------------------------------------------
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 | package vendor.xiaomi.hardware.fingerprintextension@1.0;
18 |
19 | interface IXiaomiFingerprint {
20 | extCmd(int32_t cmd, int32_t param) generates (int32_t result);
21 | };
22 |
--------------------------------------------------------------------------------
/configs/component-overrides.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/overlay-arrow/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | true
19 | 4
20 |
21 |
--------------------------------------------------------------------------------
/interfaces/goodix/hardware/biometrics/fingerprint/2.1/IGoodixFingerprintDaemonCallback.hal:
--------------------------------------------------------------------------------
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 | package vendor.goodix.hardware.biometrics.fingerprint@2.1;
18 |
19 | interface IGoodixFingerprintDaemonCallback {
20 | onDaemonMessage(int64_t devId, int32_t msgId, int32_t cmdId, vec msgData);
21 | };
22 |
--------------------------------------------------------------------------------
/sepolicy/private/xiaomiparts_app.te:
--------------------------------------------------------------------------------
1 | app_domain(xiaomiparts_app)
2 |
3 | hal_client_domain(xiaomiparts_app, hal_motor)
4 |
5 | binder_call(xiaomiparts_app, gpuservice)
6 | binder_call(xiaomiparts_app, hal_motor)
7 |
8 | allow xiaomiparts_app {
9 | activity_service
10 | activity_task_service
11 | audio_service
12 | audioserver_service
13 | autofill_service
14 | cameraserver_service
15 | gpu_service
16 | media_session_service
17 | mediaextractor_service
18 | mediametrics_service
19 | mediaserver_service
20 | sensorservice_service
21 | storagestats_service
22 | surfaceflinger_service
23 | tethering_service
24 | }:service_manager find;
25 |
26 | allow xiaomiparts_app system_app_data_file:dir create_dir_perms;
27 | allow xiaomiparts_app system_app_data_file:{ file lnk_file } create_file_perms;
28 |
29 | allow xiaomiparts_app sysfs_leds:dir r_dir_perms;
30 |
31 | allow xiaomiparts_app {
32 | cgroup
33 | sysfs_leds
34 | sysfs_thermal
35 | }:file rw_file_perms;
36 |
--------------------------------------------------------------------------------
/parts/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/gps/etc/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 |
--------------------------------------------------------------------------------
/overlay-arrow/packages/apps/Settings/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | org.lineageos.settings/org.lineageos.settings.doze.DozeSettingsActivity
19 |
20 |
--------------------------------------------------------------------------------
/configs/privapp-permissions-hotword.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/fingerprint/UdfpsExtension.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 | #include
18 | #include
19 | #include
20 |
21 | uint32_t getUdfpsZOrder(uint32_t z, bool touched) {
22 | if (touched) {
23 | z |= FOD_PRESSED_LAYER_ZORDER;
24 | }
25 |
26 | return z;
27 | }
28 |
29 | uint64_t getUdfpsUsageBits(uint64_t usageBits, bool) {
30 | return usageBits;
31 | }
32 |
--------------------------------------------------------------------------------
/overlay-lineage/frameworks/base/packages/SystemUI/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | #00ffffff
19 |
20 |
24 | 0
25 |
26 |
--------------------------------------------------------------------------------
/interfaces/goodix/hardware/biometrics/fingerprint/2.1/IGoodixFingerprintDaemon.hal:
--------------------------------------------------------------------------------
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 | package vendor.goodix.hardware.biometrics.fingerprint@2.1;
18 |
19 | import vendor.goodix.hardware.biometrics.fingerprint@2.1::IGoodixFingerprintDaemonCallback;
20 |
21 | interface IGoodixFingerprintDaemon {
22 | setNotify(IGoodixFingerprintDaemonCallback Callback);
23 | sendCommand(int32_t cmd, vec data) generates (int32_t resultCode, vec data);
24 | };
25 |
--------------------------------------------------------------------------------
/interfaces/xiaomi/hardware/motor/1.0/IMotor.hal:
--------------------------------------------------------------------------------
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 | package vendor.xiaomi.hardware.motor@1.0;
18 |
19 | import vendor.xiaomi.hardware.motor@1.0::IMotorCallback;
20 |
21 | interface IMotor {
22 | popupMotor(int32_t cookie);
23 | takebackMotor(int32_t cookie);
24 | setMotorCallback(IMotorCallback motorcallback);
25 | init();
26 | release();
27 | getMotorStatus() generates (int32_t result);
28 | calibration();
29 | takebackMotorShortly();
30 | };
31 |
--------------------------------------------------------------------------------
/parts/res/drawable/ic_thermal_dialer.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/system.prop:
--------------------------------------------------------------------------------
1 | # Camera
2 | persist.vendor.camera.privapp.list=com.android.camera
3 |
4 | # Display
5 | debug.sf.disable_backpressure=1
6 | debug.sf.enable_hwc_vds=1
7 |
8 | # FUSE passthrough
9 | persist.sys.fuse.passthrough.enable=true
10 |
11 | # GPS
12 | persist.vendor.overlay.izat.optin=rro
13 |
14 | # IMS
15 | persist.dbg.volte_avail_ovr=1
16 | persist.dbg.vt_avail_ovr=1
17 | persist.dbg.wfc_avail_ovr=1
18 | persist.vendor.ims.disableADBLogs=1
19 | persist.vendor.ims.disableIMSLogs=1
20 |
21 | # LMKD
22 | ro.config.low_ram=false
23 | ro.lmk.log_stats=true
24 |
25 | # RIL
26 | persist.radio.apm_sim_not_pwdn=1
27 | persist.vendor.radio.enable_temp_dds=true
28 | persist.vendor.radio.report_codec=1
29 | ril.subscription.types=NV,RUIM
30 | ro.telephony.default_network=22,22
31 |
32 | # Sensors
33 | persist.vendor.sensors.enable.mag_filter=true
34 |
35 | # SSR
36 | persist.vendor.ssr.enable_ramdumps=1
37 | persist.vendor.ssr.restart_level=ALL_ENABLE
38 |
39 | # Vendor
40 | ro.vendor.qti.va_aosp.support=1
41 |
42 | # ZRAM writeback
43 | ro.zram.mark_idle_delay_mins=60
44 | ro.zram.first_wb_delay_mins=180
45 | ro.zram.periodic_wb_delay_hours=24
46 |
--------------------------------------------------------------------------------
/overlay-arrow/frameworks/base/packages/SystemUI/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | #00ffffff
19 |
20 |
24 | 0
25 |
26 |
27 | 22
28 |
29 |
--------------------------------------------------------------------------------
/light/Android.bp:
--------------------------------------------------------------------------------
1 | // Copyright (C) 2019 The LineageOS Project
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 | cc_binary {
16 | relative_install_path: "hw",
17 | defaults: ["hidl_defaults"],
18 | name: "android.hardware.light@2.0-service.xiaomi_raphael",
19 | init_rc: ["android.hardware.light@2.0-service.xiaomi_raphael.rc"],
20 | srcs: ["service.cpp", "Light.cpp"],
21 | vendor: true,
22 | shared_libs: [
23 | "android.hardware.light@2.0",
24 | "libbase",
25 | "libhardware",
26 | "libhidlbase",
27 | "liblog",
28 | "libutils",
29 | ],
30 | }
31 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Settings/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
18 | true
19 |
20 |
--------------------------------------------------------------------------------
/arrow_raphael.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2021 The LineageOS Project
3 | #
4 | # SPDX-License-Identifier: Apache-2.0
5 | #
6 |
7 | # Inherit from those products. Most specific first.
8 | $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
9 | $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
10 | $(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_p.mk)
11 |
12 | # Inherit from raphael device
13 | $(call inherit-product, device/xiaomi/raphael/device.mk)
14 |
15 | # Inherit some common Arrow stuff.
16 | $(call inherit-product, vendor/arrow/config/common.mk)
17 |
18 | # Device identifier. This must come after all inclusions.
19 | PRODUCT_NAME := arrow_raphael
20 | PRODUCT_DEVICE := raphael
21 | PRODUCT_BRAND := Xiaomi
22 | PRODUCT_MODEL := Redmi K20 Pro
23 | PRODUCT_MANUFACTURER := Xiaomi
24 |
25 | TARGET_INCLUDE_PIXEL_CHARGER := true
26 | DEVICE_MAINTAINER := TH779, kubersharma001
27 |
28 | PRODUCT_CHARACTERISTICS := nosdcard
29 |
30 | PRODUCT_GMS_CLIENTID_BASE := android-xiaomi
31 |
32 | PRODUCT_BUILD_PROP_OVERRIDES += \
33 | PRIVATE_BUILD_DESC="walleye-user 8.1.0 OPM1.171019.011 4448085 release-keys"
34 |
35 | BUILD_FINGERPRINT := google/walleye/walleye:8.1.0/OPM1.171019.011/4448085:user/release-keys
36 |
--------------------------------------------------------------------------------
/bluetooth/include/bdroid_buildcfg.h:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Copyright (c) 2013, The Linux Foundation. All rights reserved.
4 | * Not a Contribution, Apache license notifications and license are retained
5 | * for attribution purposes only.
6 | *
7 | * Copyright (C) 2012 The Android Open Source Project
8 | *
9 | * Licensed under the Apache License, Version 2.0 (the "License");
10 | * you may not use this file except in compliance with the License.
11 | * You may obtain a copy of the License at
12 | *
13 | * http://www.apache.org/licenses/LICENSE-2.0
14 | *
15 | * Unless required by applicable law or agreed to in writing, software
16 | * distributed under the License is distributed on an "AS IS" BASIS,
17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | * See the License for the specific language governing permissions and
19 | * limitations under the License.
20 | */
21 |
22 | #ifndef _BDROID_BUILDCFG_H
23 | #define _BDROID_BUILDCFG_H
24 |
25 | // Disables read remote device feature
26 | #define MAX_ACL_CONNECTIONS 16
27 | #define MAX_L2CAP_CHANNELS 16
28 | #define BLE_VND_INCLUDED TRUE
29 | // Increasing SEPs to 12 from 6 to support SHO/MCast i.e. two streams per codec
30 | #define AVDT_NUM_SEPS 12
31 | #endif
32 |
--------------------------------------------------------------------------------
/parts/src/org/lineageos/settings/popupcamera/PopupCameraUtils.java:
--------------------------------------------------------------------------------
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 | package org.lineageos.settings.popupcamera;
18 |
19 | import android.content.Context;
20 | import android.content.Intent;
21 | import android.os.UserHandle;
22 |
23 | public class PopupCameraUtils {
24 |
25 | private static final String TAG = "PopupCameraUtils";
26 | private static final boolean DEBUG = false;
27 |
28 | public static void startService(Context context) {
29 | context.startServiceAsUser(new Intent(context, PopupCameraService.class),
30 | UserHandle.CURRENT);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/drawable/rounded.xml:
--------------------------------------------------------------------------------
1 |
11 |
16 |
17 |
20 |
21 |
--------------------------------------------------------------------------------
/thermal/Android.bp:
--------------------------------------------------------------------------------
1 | cc_binary {
2 | name: "android.hardware.thermal@2.0-service.xiaomi",
3 | defaults: [
4 | "hidl_defaults",
5 | ],
6 | vendor: true,
7 | relative_install_path: "hw",
8 | vintf_fragments: ["android.hardware.thermal@2.0-service.xiaomi.xml"],
9 | init_rc: [
10 | "android.hardware.thermal@2.0-service.xiaomi.rc",
11 | ],
12 | srcs: [
13 | "service.cpp",
14 | "Thermal.cpp",
15 | "thermal-helper.cpp",
16 | "utils/config_parser.cpp",
17 | "utils/thermal_files.cpp",
18 | "utils/thermal_watcher.cpp",
19 | "utils/power_files.cpp",
20 | ],
21 | shared_libs: [
22 | "libbase",
23 | "libcutils",
24 | "libhidlbase",
25 | "libjsoncpp",
26 | "libutils",
27 | "libnl",
28 | "libbinder_ndk",
29 | "android.hardware.thermal@1.0",
30 | "android.hardware.thermal@2.0",
31 | "android.hardware.power-V1-ndk",
32 | "pixel-power-ext-V1-ndk"
33 | ],
34 | cflags: [
35 | "-Wall",
36 | "-Werror",
37 | "-Wextra",
38 | "-Wunused",
39 | ],
40 | tidy: true,
41 | tidy_checks: [
42 | "android-*",
43 | "cert-*",
44 | "clang-analyzer-security*",
45 | ],
46 | tidy_flags: [
47 | "-warnings-as-errors=android-*,clang-analyzer-security*,cert-*"
48 | ],
49 | }
50 |
--------------------------------------------------------------------------------
/parts/res/drawable/ic_thermal_camera.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/parts/src/org/lineageos/settings/dirac/DiracActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 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 | package org.lineageos.settings.dirac;
18 |
19 | import android.os.Bundle;
20 |
21 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
22 | import com.android.settingslib.collapsingtoolbar.R;
23 |
24 | public class DiracActivity extends CollapsingToolbarBaseActivity {
25 |
26 | private static final String TAG_DIRAC = "dirac";
27 |
28 | @Override
29 | protected void onCreate(Bundle savedInstanceState) {
30 | super.onCreate(savedInstanceState);
31 |
32 | getFragmentManager().beginTransaction().replace(R.id.content_frame,
33 | new DiracSettingsFragment(), TAG_DIRAC).commit();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/releasetools.py:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009 The Android Open Source Project
2 | # Copyright (C) 2019 The MoKee Open Source 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 | import common
17 |
18 | def FullOTA_InstallEnd(info):
19 | OTA_InstallEnd(info)
20 | return
21 |
22 | def IncrementalOTA_InstallEnd(info):
23 | OTA_InstallEnd(info)
24 | return
25 |
26 | def AddImage(info, basename, dest):
27 | name = basename
28 | data = info.input_zip.read("IMAGES/" + basename)
29 | common.ZipWriteStr(info.output_zip, name, data)
30 | info.script.AppendExtra('package_extract_file("%s", "%s");' % (name, dest))
31 |
32 | def OTA_InstallEnd(info):
33 | info.script.Print("Patching firmware images...")
34 | AddImage(info, "vbmeta.img", "/dev/block/bootdevice/by-name/vbmeta")
35 | AddImage(info, "dtbo.img", "/dev/block/bootdevice/by-name/dtbo")
36 | return
37 |
--------------------------------------------------------------------------------
/parts/src/org/lineageos/settings/doze/DozeSettingsActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2016 The CyanogenMod Project
3 | * 2017 The LineageOS Project
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.lineageos.settings.doze;
19 |
20 | import android.os.Bundle;
21 |
22 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
23 | import com.android.settingslib.collapsingtoolbar.R;
24 |
25 | public class DozeSettingsActivity extends CollapsingToolbarBaseActivity {
26 |
27 | private static final String TAG_DOZE = "doze";
28 |
29 | @Override
30 | protected void onCreate(Bundle savedInstanceState) {
31 | super.onCreate(savedInstanceState);
32 |
33 | getFragmentManager().beginTransaction().replace(R.id.content_frame,
34 | new DozeSettingsFragment(), TAG_DOZE).commit();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/parts/src/org/lineageos/settings/popupcamera/PopupCameraSettingsActivity.java:
--------------------------------------------------------------------------------
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 | package org.lineageos.settings.popupcamera;
18 |
19 | import android.os.Bundle;
20 |
21 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
22 | import com.android.settingslib.collapsingtoolbar.R;
23 |
24 | public class PopupCameraSettingsActivity extends CollapsingToolbarBaseActivity {
25 |
26 | private static final String TAG_POPUPCAMERA = "popupcamera";
27 |
28 | @Override
29 | protected void onCreate(Bundle savedInstanceState) {
30 | super.onCreate(savedInstanceState);
31 |
32 | getFragmentManager().beginTransaction().replace(R.id.content_frame,
33 | new PopupCameraSettingsFragment(), TAG_POPUPCAMERA).commit();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/parts/res/drawable/ic_thermal_benchmark.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/power-libperfmgr/android.hardware.power-service.xiaomi-libperfmgr.rc:
--------------------------------------------------------------------------------
1 | service vendor.power-hal-aidl /vendor/bin/hw/android.hardware.power-service.xiaomi-libperfmgr
2 | class hal
3 | user root
4 | group system
5 | priority -20
6 |
7 | on late-fs
8 | start vendor.power-hal-aidl
9 |
10 | # restart powerHAL when framework died
11 | on property:init.svc.zygote=restarting && property:vendor.powerhal.state=*
12 | setprop vendor.powerhal.state ""
13 | setprop vendor.powerhal.audio ""
14 | setprop vendor.powerhal.rendering ""
15 | restart vendor.power-hal-aidl
16 |
17 | # restart powerHAL when audioHAL died
18 | on property:init.svc.vendor.audio-hal-2-0=restarting && property:vendor.powerhal.audio=AUDIO_STREAMING_LOW_LATENCY
19 | setprop vendor.powerhal.audio ""
20 | restart vendor.power-hal-aidl
21 |
22 | # Clean up after b/163539793 resolved
23 | on property:vendor.powerhal.dalvik.vm.dex2oat-threads=*
24 | setprop dalvik.vm.dex2oat-threads ${vendor.powerhal.dalvik.vm.dex2oat-threads}
25 | setprop dalvik.vm.restore-dex2oat-threads ${vendor.powerhal.dalvik.vm.dex2oat-threads}
26 |
27 | on property:vendor.powerhal.dalvik.vm.dex2oat-cpu-set=*
28 | setprop dalvik.vm.dex2oat-cpu-set ${vendor.powerhal.dalvik.vm.dex2oat-cpu-set}
29 | setprop dalvik.vm.restore-dex2oat-cpu-set ${vendor.powerhal.dalvik.vm.dex2oat-cpu-set}
30 |
31 | # initialize powerHAL when boot is completed
32 | on property:sys.boot_completed=1
33 | setprop vendor.powerhal.init 1
34 |
--------------------------------------------------------------------------------
/parts/src/org/lineageos/settings/popupcamera/PopupCameraSettingsFragment.java:
--------------------------------------------------------------------------------
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 | package org.lineageos.settings.popupcamera;
18 |
19 | import android.os.Bundle;
20 |
21 | import androidx.preference.Preference;
22 | import androidx.preference.Preference.OnPreferenceChangeListener;
23 | import androidx.preference.PreferenceFragment;
24 |
25 | import org.lineageos.settings.R;
26 |
27 | public class PopupCameraSettingsFragment extends PreferenceFragment implements
28 | OnPreferenceChangeListener {
29 |
30 | @Override
31 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
32 | addPreferencesFromResource(R.xml.popup_settings);
33 | }
34 |
35 | @Override
36 | public boolean onPreferenceChange(Preference preference, Object newValue) {
37 | return false;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/light/service.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 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 "android.hardware.light@2.0-service.xiaomi_raphael"
18 |
19 | #include
20 |
21 | #include "Light.h"
22 |
23 | using android::hardware::configureRpcThreadpool;
24 | using android::hardware::joinRpcThreadpool;
25 |
26 | using android::hardware::light::V2_0::ILight;
27 | using android::hardware::light::V2_0::implementation::Light;
28 |
29 | using android::OK;
30 | using android::sp;
31 | using android::status_t;
32 |
33 | int main() {
34 | sp service = new Light();
35 |
36 | configureRpcThreadpool(1, true);
37 |
38 | status_t status = service->registerAsService();
39 | if (status != OK) {
40 | ALOGE("Cannot register Light HAL service.");
41 | return 1;
42 | }
43 |
44 | ALOGI("Light HAL service ready.");
45 |
46 | joinRpcThreadpool();
47 |
48 | ALOGI("Light HAL service failed to join thread pool.");
49 | return 1;
50 | }
51 |
--------------------------------------------------------------------------------
/parts/src/org/lineageos/settings/BootCompletedReceiver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 The CyanogenMod Project
3 | * 2017-2020 The LineageOS Project
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.lineageos.settings;
19 |
20 | import android.content.BroadcastReceiver;
21 | import android.content.Context;
22 | import android.content.Intent;
23 | import android.util.Log;
24 |
25 | import org.lineageos.settings.dirac.DiracUtils;
26 | import org.lineageos.settings.doze.DozeUtils;
27 | import org.lineageos.settings.popupcamera.PopupCameraUtils;
28 |
29 | public class BootCompletedReceiver extends BroadcastReceiver {
30 |
31 | private static final boolean DEBUG = false;
32 | private static final String TAG = "XiaomiParts";
33 |
34 | @Override
35 | public void onReceive(final Context context, Intent intent) {
36 | if (DEBUG) Log.d(TAG, "Received boot completed intent");
37 | DiracUtils.initialize(context);
38 | DozeUtils.checkDozeService(context);
39 | PopupCameraUtils.startService(context);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/system_ext.prop:
--------------------------------------------------------------------------------
1 | # Audio
2 | audio.offload.buffer.size.kb=32
3 | audio.offload.gapless.enabled=true
4 | persist.audio.fluence.speaker=true
5 | persist.audio.fluence.voicecall=true
6 | persist.audio.fluence.voicerec=false
7 |
8 | # Bluetooth
9 | bluetooth.device.class_of_device=90,2,12
10 | bluetooth.profile.a2dp.source.enabled=true
11 | bluetooth.profile.asha.central.enabled=true
12 | bluetooth.profile.avrcp.target.enabled=true
13 | bluetooth.profile.bas.client.enabled=true
14 | bluetooth.profile.gatt.enabled=true
15 | bluetooth.profile.hfp.ag.enabled=true
16 | bluetooth.profile.hid.device.enabled=true
17 | bluetooth.profile.hid.host.enabled=true
18 | bluetooth.profile.map.server.enabled=true
19 | bluetooth.profile.opp.enabled=true
20 | bluetooth.profile.pan.nap.enabled=true
21 | bluetooth.profile.pan.panu.enabled=true
22 | bluetooth.profile.pbap.server.enabled=true
23 | bluetooth.profile.sap.server.enabled=true
24 |
25 | # Camera
26 | persist.camera.gyro.disable=0
27 | vendor.camera.aux.packagelist=org.lineageos.snap,org.codeaurora.snapcam
28 |
29 | # CNE
30 | persist.vendor.cne.feature=1
31 |
32 | # Display
33 | persist.demo.hdmirotationlock=false
34 |
35 | # Media
36 | media.settings.xml=/vendor/etc/media_profiles_vendor.xml
37 |
38 | # Netmgr
39 | persist.data.df.dev_name=rmnet_usb0
40 | persist.data.wda.enable=true
41 | persist.rmnet.data.enable=true
42 |
43 | # NFC
44 | ro.nfc.port=I2C
45 |
46 | # RIL
47 | persist.radio.dynamic_sar=false
48 | rild.libpath=/vendor/lib64/libril-qc-hal-qmi.so
49 |
50 | # Thermal
51 | vendor.thermal.config=thermal_info_config.json
52 |
53 | # Time
54 | persist.timed.enable=true
55 |
56 | # WiFi Display
57 | persist.debug.wfd.enable=1
58 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 | 10dp
21 |
22 |
23 | 10dp
24 |
25 |
26 | 950px
27 |
28 |
32 | 1900px
33 |
34 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 | 103px
21 |
22 |
23 | 19px
24 |
25 |
27 | 35dp
28 |
29 |
30 | 8dp
31 |
32 |
35 | @dimen/status_bar_height_default
36 |
37 |
--------------------------------------------------------------------------------
/extract-files.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 2016 The CyanogenMod Project
4 | # Copyright (C) 2017-2021 The LineageOS Project
5 | #
6 | # SPDX-License-Identifier: Apache-2.0
7 | #
8 |
9 | set -e
10 |
11 | DEVICE=raphael
12 | VENDOR=xiaomi
13 |
14 | # Load extract_utils and do some sanity checks
15 | MY_DIR="${BASH_SOURCE%/*}"
16 | if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
17 |
18 | ANDROID_ROOT="${MY_DIR}/../../.."
19 |
20 | HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
21 | if [ ! -f "${HELPER}" ]; then
22 | echo "Unable to find helper script at ${HELPER}"
23 | exit 1
24 | fi
25 | source "${HELPER}"
26 |
27 | # Default to sanitizing the vendor folder before extraction
28 | CLEAN_VENDOR=true
29 |
30 | SECTION=
31 | KANG=
32 |
33 | while [ "${#}" -gt 0 ]; do
34 | case "${1}" in
35 | -n | --no-cleanup )
36 | CLEAN_VENDOR=false
37 | ;;
38 | -k | --kang )
39 | KANG="--kang"
40 | ;;
41 | -s | --section )
42 | SECTION="${2}"; shift
43 | CLEAN_VENDOR=false
44 | ;;
45 | * )
46 | SRC="${1}"
47 | ;;
48 | esac
49 | shift
50 | done
51 |
52 | if [ -z "${SRC}" ]; then
53 | SRC="adb"
54 | fi
55 |
56 | function blob_fixup() {
57 | case "${1}" in
58 | vendor/lib64/camera/components/com.qti.node.watermark.so)
59 | "${PATCHELF}" --add-needed "libwatermark_shim.so" "${2}"
60 | ;;
61 | esac
62 | }
63 |
64 | # Initialize the helper
65 | setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}"
66 |
67 | extract "${MY_DIR}/proprietary-files.txt" "${SRC}" \
68 | "${KANG}" --section "${SECTION}"
69 |
70 | "${MY_DIR}/setup-makefiles.sh"
71 |
--------------------------------------------------------------------------------
/fingerprint/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2017-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: "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_raphael",
18 | relative_install_path: "hw",
19 | defaults: ["hidl_defaults"],
20 | init_rc: ["android.hardware.biometrics.fingerprint@2.3-service.xiaomi_raphael.rc"],
21 | srcs: ["service.cpp", "BiometricsFingerprint.cpp"],
22 | shared_libs: [
23 | "libbase",
24 | "libhardware",
25 | "libhidlbase",
26 | "liblog",
27 | "libutils",
28 | "libcutils",
29 | "android.hardware.biometrics.fingerprint@2.1",
30 | "android.hardware.biometrics.fingerprint@2.2",
31 | "android.hardware.biometrics.fingerprint@2.3",
32 | "vendor.goodix.hardware.biometrics.fingerprint@2.1",
33 | "vendor.xiaomi.hardware.fingerprintextension@1.0",
34 | ],
35 | proprietary: true,
36 | }
37 |
38 | cc_library_static {
39 | name: "libudfps_extension.xiaomi_raphael",
40 | srcs: ["UdfpsExtension.cpp"],
41 | include_dirs: [
42 | "frameworks/native/services/surfaceflinger/CompositionEngine/include"
43 | ],
44 | header_libs: [
45 | "generated_kernel_headers",
46 | ],
47 | }
48 |
--------------------------------------------------------------------------------
/overlay/packages/services/Telephony/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
21 |
22 |
23 | true
24 |
25 |
26 | org.codeaurora.ims
27 |
28 |
29 | org.codeaurora.ims
30 |
31 |
32 | com.google.android.gms
33 |
34 |
35 | false
36 |
37 |
--------------------------------------------------------------------------------
/parts/src/org/lineageos/settings/popupcamera/PopupCameraPreferences.java:
--------------------------------------------------------------------------------
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 | package org.lineageos.settings.popupcamera;
18 |
19 | import android.content.Context;
20 | import android.content.SharedPreferences;
21 | import android.preference.PreferenceManager;
22 |
23 | public class PopupCameraPreferences {
24 |
25 | private static final String TAG = "PopupCameraUtils";
26 | private static final boolean DEBUG = false;
27 | private static final String LED_EFFECT_KEY = "popup_led_effect";
28 | private static final boolean LED_EFFECT_DEFAULT_VALUE = true;
29 | private static final String SOUND_EFFECT_KEY = "popup_sound_effect";
30 | private static final String SOUND_EFFECT_DEFAULT_VALUE = "0";
31 | private SharedPreferences mSharedPrefs;
32 |
33 | public PopupCameraPreferences(Context context) {
34 | mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
35 | }
36 |
37 | public String getSoundEffect() {
38 | return mSharedPrefs.getString(SOUND_EFFECT_KEY, SOUND_EFFECT_DEFAULT_VALUE);
39 | }
40 |
41 | public boolean isLedAllowed() {
42 | return mSharedPrefs.getBoolean(LED_EFFECT_KEY, LED_EFFECT_DEFAULT_VALUE);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/power-libperfmgr/PowerExt.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 The Android Open Source 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 | #pragma once
18 |
19 | #include
20 | #include
21 | #include
22 |
23 | #include
24 | #include
25 |
26 | namespace aidl {
27 | namespace google {
28 | namespace hardware {
29 | namespace power {
30 | namespace impl {
31 | namespace pixel {
32 |
33 | using ::android::perfmgr::HintManager;
34 |
35 | class PowerExt : public ::aidl::google::hardware::power::extension::pixel::BnPowerExt {
36 | public:
37 | PowerExt(std::shared_ptr hm) : mHintManager(hm) {}
38 | ndk::ScopedAStatus setMode(const std::string &mode, bool enabled) override;
39 | ndk::ScopedAStatus isModeSupported(const std::string &mode, bool *_aidl_return) override;
40 | ndk::ScopedAStatus setBoost(const std::string &boost, int32_t durationMs) override;
41 | ndk::ScopedAStatus isBoostSupported(const std::string &boost, bool *_aidl_return) override;
42 |
43 | private:
44 | std::shared_ptr mHintManager;
45 | };
46 |
47 | } // namespace pixel
48 | } // namespace impl
49 | } // namespace power
50 | } // namespace hardware
51 | } // namespace google
52 | } // namespace aidl
53 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | The Redmi K20 Pro / Mi 9T Pro (codenamed _"raphael"_) is a flagship smartphone from Xiaomi announced in June 2019.
2 |
3 |
4 | ## Device specifications
5 |
6 | | Device | Redmi K20 Pro / Mi 9T Pro |
7 | | ----------------------: | :-------------------------------------------------------------- |
8 | | SoC | Qualcomm SM8150 Snapdragon 855 |
9 | | CPU | 1x2.84 GHz Kryo 485 & 3x2.42 GHz Kryo 485 & 4x1.78 GHz Kryo 485 |
10 | | GPU | Adreno 640 |
11 | | Memory | 6GB / 8GB |
12 | | Shipped Android version | Android 9, MIUI 10 |
13 | | Storage | 64GB / 128GB / 256GB |
14 | | Battery | Li-Po 4000 mAh, non-removable |
15 | | Dimensions | 156.7 x 74.3 x 8.8 mm |
16 | | Display | 1080 x 2340 pixels, 6.39 inches |
17 | | Rear camera 1 | 48 MP, Dual-LED flash, HDR, panorama |
18 | | Rear camera 2 | 8 MP |
19 | | Rear camera 3 | 13 MP |
20 | | Front camera | Motorized pop-up 20 MP, HDR |
21 |
22 |
23 | ## Device picture
24 |
25 | 
26 |
27 |
28 | ## Copyright
29 |
30 | ```
31 | #
32 | # Copyright (C) 2021 The LineageOS Project
33 | #
34 | # SPDX-License-Identifier: Apache-2.0
35 | #
36 |
--------------------------------------------------------------------------------
/parts/src/org/lineageos/settings/popupcamera/Constants.java:
--------------------------------------------------------------------------------
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 | package org.lineageos.settings.popupcamera;
18 |
19 | public class Constants {
20 | public static final int FREE_FALL_SENSOR_ID = 33171042;
21 |
22 | public static final int CAMERA_EVENT_DELAY_TIME = 100;
23 | public static final int MSG_CAMERA_CLOSED = 1001;
24 | public static final int MSG_CAMERA_OPEN = 1002;
25 |
26 | public static final int MOTOR_STATUS_POPUP_OK = 11;
27 | public static final int MOTOR_STATUS_POPUP_JAMMED = 12;
28 | public static final int MOTOR_STATUS_TAKEBACK_OK = 13;
29 | public static final int MOTOR_STATUS_TAKEBACK_JAMMED = 14;
30 | public static final int MOTOR_STATUS_PRESSED = 15;
31 | public static final int MOTOR_STATUS_CALIB_OK = 17;
32 | public static final int MOTOR_STATUS_CALIB_ERROR = 18;
33 | public static final int MOTOR_STATUS_REQUEST_CALIB = 19;
34 |
35 | public static final String CLOSE_CAMERA_STATE = "0";
36 | public static final String OPEN_CAMERA_STATE = "1";
37 |
38 | public static final String FRONT_CAMERA_ID = "1";
39 | public static final String BLUE_LED_PATH = "/sys/class/leds/blue/brightness";
40 | public static final String GREEN_LED_PATH = "/sys/class/leds/green/brightness";
41 | public static final String POPUP_SOUND_PATH = "/system/media/audio/ui/";
42 | }
43 |
--------------------------------------------------------------------------------
/parts/res/drawable/ic_thermal_browser.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/thermal/utils/thermal_files.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 The Android Open Source 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 | #pragma once
18 |
19 | #include
20 | #include
21 |
22 | namespace android {
23 | namespace hardware {
24 | namespace thermal {
25 | namespace V2_0 {
26 | namespace implementation {
27 |
28 | class ThermalFiles {
29 | public:
30 | ThermalFiles() = default;
31 | ~ThermalFiles() = default;
32 | ThermalFiles(const ThermalFiles &) = delete;
33 | void operator=(const ThermalFiles &) = delete;
34 |
35 | std::string getThermalFilePath(std::string_view thermal_name) const;
36 | // Returns true if add was successful, false otherwise.
37 | bool addThermalFile(std::string_view thermal_name, std::string_view path);
38 | // If thermal_name is not found in the thermal names to path map, this will set
39 | // data to empty and return false. If the thermal_name is found and its content
40 | // is read, this function will fill in data accordingly then return true.
41 | bool readThermalFile(std::string_view thermal_name, std::string *data) const;
42 | bool writeCdevFile(std::string_view thermal_name, std::string_view data);
43 | size_t getNumThermalFiles() const { return thermal_name_to_path_map_.size(); }
44 |
45 | private:
46 | std::unordered_map thermal_name_to_path_map_;
47 | };
48 |
49 | } // namespace implementation
50 | } // namespace V2_0
51 | } // namespace thermal
52 | } // namespace hardware
53 | } // namespace android
54 |
--------------------------------------------------------------------------------
/odm.prop:
--------------------------------------------------------------------------------
1 | # Audio
2 | vendor.audio.feature.a2dp_offload.enable=true
3 | vendor.audio.feature.afe_proxy.enable=true
4 | vendor.audio.feature.anc_headset.enable=true
5 | vendor.audio.feature.battery_listener.enable=true
6 | vendor.audio.feature.compr_cap.enable=false
7 | vendor.audio.feature.compress_in.enable=false
8 | vendor.audio.feature.compress_meta_data.enable=true
9 | vendor.audio.feature.compr_voip.enable=false
10 | vendor.audio.feature.concurrent_capture.enable=false
11 | vendor.audio.feature.custom_stereo.enable=true
12 | vendor.audio.feature.display_port.enable=true
13 | vendor.audio.feature.dsm_feedback.enable=false
14 | vendor.audio.feature.dynamic_ecns.enable=false
15 | vendor.audio.feature.ext_hw_plugin.enable=true
16 | vendor.audio.feature.external_dsp.enable=false
17 | vendor.audio.feature.external_speaker.enable=false
18 | vendor.audio.feature.external_speaker_tfa.enable=false
19 | vendor.audio.feature.fluence.enable=true
20 | vendor.audio.feature.fm.enable=true
21 | vendor.audio.feature.hdmi_edid.enable=true
22 | vendor.audio.feature.hdmi_passthrough.enable=true
23 | vendor.audio.feature.hfp.enable=true
24 | vendor.audio.feature.hifi_audio.enable=false
25 | vendor.audio.feature.hwdep_cal.enable=false
26 | vendor.audio.feature.incall_music.enable=true
27 | vendor.audio.feature.multi_voice_session.enable=true
28 | vendor.audio.feature.keep_alive.enable=true
29 | vendor.audio.feature.kpi_optimize.enable=true
30 | vendor.audio.feature.maxx_audio.enable=false
31 | vendor.audio.feature.ras.enable=true
32 | vendor.audio.feature.record_play_concurency.enable=false
33 | vendor.audio.feature.src_trkn.enable=true
34 | vendor.audio.feature.spkr_prot.enable=true
35 | vendor.audio.feature.ssrec.enable=true
36 | vendor.audio.feature.usb_offload.enable=true
37 | vendor.audio.feature.usb_offload_burst_mode.enable=true
38 | vendor.audio.feature.usb_offload_sidetone_volume.enable=false
39 | vendor.audio.feature.deepbuffer_as_primary.enable=false
40 | vendor.audio.feature.vbat.enable=true
41 | vendor.audio.feature.wsa.enable=false
42 | vendor.audio.feature.audiozoom.enable=false
43 | vendor.audio.feature.snd_mon.enable=true
44 |
45 | # ODM
46 | ro.vendor.qti.va_odm.support=1
47 |
--------------------------------------------------------------------------------
/gps/etc/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 |
--------------------------------------------------------------------------------
/rootdir/etc/init.recovery.qcom.rc:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2017-2018,2020 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 met:
5 | # * Redistributions of source code must retain the above copyright
6 | # notice, this list of conditions and the following disclaimer.
7 | # * Redistributions in binary form must reproduce the above copyright
8 | # notice, this list of conditions and the following disclaimer in the
9 | # documentation and/or other materials provided with the distribution.
10 | # * Neither the name of The Linux Foundation nor
11 | # the names of its contributors may be used to endorse or promote
12 | # products derived from this software without specific prior written
13 | # permission.
14 | #
15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
19 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | #
27 |
28 | on init
29 | write /sys/class/backlight/panel0-backlight/brightness 200
30 | setprop sys.usb.configfs 1
31 |
32 | on property:ro.boot.usbcontroller=*
33 | setprop sys.usb.controller ${ro.boot.usbcontroller}
34 | write /sys/class/udc/${ro.boot.usbcontroller}/device/../mode peripheral
35 |
36 | on fs
37 | wait /dev/block/platform/soc/${ro.boot.bootdevice}
38 | symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
39 |
--------------------------------------------------------------------------------
/seccomp/qti-systemd.policy:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2020 Qualcomm Technologies, Inc.
2 | # All Rights Reserved.
3 | # Confidential and Proprietary - Qualcomm Technologies, Inc
4 | #
5 | # Not a contribution.
6 | #
7 | # Copyright (C) 2018 The Android Open Source Project
8 | #
9 | # Licensed under the Apache License, Version 2.0 (the "License");
10 | # you may not use this file except in compliance with the License.
11 | # You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 |
21 | mmap: arg2 in ~PROT_EXEC || arg2 in ~PROT_WRITE
22 | munmap: 1
23 | mprotect: arg2 in ~PROT_EXEC || arg2 in ~PROT_WRITE
24 | #prctl: arg0 == 0x37 /* PR_??? */ || arg0 == PR_SET_VMA || arg0 == PR_GET_DUMPABLE || arg0 == PR_SET_SECCOMP || arg0 == PR_CAP_AMBIENT || arg0 == PR_GET_NO_NEW_PRIVS || arg0 == PR_SET_DUMPABLE || arg0 == PR_GET_NAME || arg0 == PR_SET_PTRACER
25 | prctl: 1
26 | openat: 1
27 | read: 1
28 | futex: 1
29 | close: 1
30 | fstat: 1
31 | readlinkat: 1
32 | newfstatat: 1
33 | mremap: 1
34 | fstatfs: 1
35 | pread64: 1
36 | rt_sigprocmask: 1
37 | rt_sigaction: 1
38 | faccessat: 1
39 | #ioctl: arg1 == _IOC(_IOC_NONE
40 | ioctl: 1
41 | clock_gettime: 1
42 | getrandom: 1
43 | nanosleep: 1
44 | fcntl: 1
45 | getuid: 1
46 | sigaltstack: 1
47 | socket: arg0 == AF_QIPCRTR || arg0 == AF_UNIX
48 | writev: 1
49 | execve: 1
50 | getpid: 1
51 | set_tid_address: 1
52 | sched_getscheduler: 1
53 | sigaltstack: 1
54 | sched_getaffinity: 1
55 | connect: 1
56 | pipe2: 1
57 | clone: 1
58 | ppoll: 1
59 | restart_syscall: 1
60 | exit: 1
61 | exit_group: 1
62 | rt_sigreturn: 1
63 | rt_tgsigqueueinfo: 1
64 | getppid: 1
65 | dup: 1
66 | capget: 1
67 | capset: 1
68 | setsid: 1
69 | setitimer: 1
70 | ptrace: 1
71 | recvmsg: 1
72 | exit: 1
73 | restart_syscall: 1
74 | gettid: 1
75 | write: 1
76 | dup3: 1
77 | getdents64: 1
78 | getsockname: 1
79 | recvfrom: 1
--------------------------------------------------------------------------------
/parts/res/xml/dirac_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
20 |
21 |
25 |
26 |
33 |
34 |
41 |
42 |
45 |
46 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/power-libperfmgr/InteractionHandler.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 The Android Open Source 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 | #pragma once
18 |
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 |
25 | #include
26 |
27 | namespace aidl {
28 | namespace google {
29 | namespace hardware {
30 | namespace power {
31 | namespace impl {
32 | namespace pixel {
33 |
34 | using ::android::perfmgr::HintManager;
35 |
36 | enum InteractionState {
37 | INTERACTION_STATE_UNINITIALIZED,
38 | INTERACTION_STATE_IDLE,
39 | INTERACTION_STATE_INTERACTION,
40 | INTERACTION_STATE_WAITING,
41 | };
42 |
43 | class InteractionHandler {
44 | public:
45 | InteractionHandler(std::shared_ptr const &hint_manager);
46 | ~InteractionHandler();
47 | bool Init();
48 | void Exit();
49 | void Acquire(int32_t duration);
50 |
51 | private:
52 | void Release();
53 | void WaitForIdle(int32_t wait_ms, int32_t timeout_ms);
54 | void AbortWaitLocked();
55 | void Routine();
56 |
57 | void PerfLock();
58 | void PerfRel();
59 |
60 | enum InteractionState mState;
61 | int mIdleFd;
62 | int mEventFd;
63 | int32_t mDurationMs;
64 | struct timespec mLastTimespec;
65 | std::unique_ptr mThread;
66 | std::mutex mLock;
67 | std::condition_variable mCond;
68 | std::shared_ptr mHintManager;
69 | };
70 |
71 | } // namespace pixel
72 | } // namespace impl
73 | } // namespace power
74 | } // namespace hardware
75 | } // namespace google
76 | } // namespace aidl
77 |
--------------------------------------------------------------------------------
/light/Light.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 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 ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
18 | #define ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
19 |
20 | #include
21 | #include
22 | #include
23 | #include