├── 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 |