├── system_ext.prop
├── sepolicy
├── vendor
│ ├── property.te
│ ├── domain.te
│ ├── bluetooth.te
│ ├── vendor_qtelephony.te
│ ├── wcnss_service.te
│ ├── hal_bluetooth_qti.te
│ ├── hal_audio_default.te
│ ├── hal_iop_default.te
│ ├── hal_perf_default.te
│ ├── init.te
│ ├── platform_app.te
│ ├── thermal-engine.te
│ ├── system_app.te
│ ├── hal_power_default.te
│ ├── hal_lineage_touch_default.te
│ ├── hal_ifaa.te
│ ├── property_contexts
│ ├── hal_param.te
│ ├── hwservice.te
│ ├── sensors.te
│ ├── vendor_init.te
│ ├── hal_cameraHIDL.te
│ ├── device.te
│ ├── tee.te
│ ├── attributes
│ ├── opf.te
│ ├── hal_lineage_livedisplay_qti.te
│ ├── hal_nfc_default.te
│ ├── rild.te
│ ├── file.te
│ ├── dashd.te
│ ├── wifi-mac-generator.te
│ ├── hal_param_default.te
│ ├── hal_ifaa_default.te
│ ├── hal_camera_default.te
│ ├── hal_cameraHIDL_default.te
│ ├── hwservice_contexts
│ ├── hal_fingerprint_device.te
│ ├── file_contexts
│ └── genfs_contexts
├── public
│ └── file.te
└── private
│ ├── seapp_contexts
│ └── pocketmode_app.te
├── odm.prop
├── pocketmode
├── proguard.flags
├── Android.mk
├── AndroidManifest.xml
└── src
│ └── org
│ └── lineageos
│ └── pocketmode
│ ├── BootCompletedReceiver.java
│ ├── PocketModeService.java
│ └── PocketSensor.java
├── Android.bp
├── configs
├── gps
│ ├── gps.conf
│ ├── lowi.conf
│ ├── flp.conf
│ ├── xtwifi.conf
│ ├── apdr.conf
│ └── sap.conf
├── public.libraries.txt
├── privapp-permissions-hotword.xml
├── media_codecs_vendor_audio.xml
├── component-overrides.xml
├── system_properties.xml
├── privapp-permissions-qti.xml
└── qti_whitelist.xml
├── wifi
├── p2p_supplicant_overlay.conf
└── wpa_supplicant_overlay.conf
├── rro_overlays
└── WifiOverlay
│ ├── Android.bp
│ ├── AndroidManifest.xml
│ └── res
│ └── values
│ └── config.xml
├── lineage.dependencies
├── product.prop
├── livedisplay
├── .clang-format
├── vendor.lineage.livedisplay@2.1-service.oneplus_sdm845.xml
├── vendor.lineage.livedisplay@2.1-service.oneplus_sdm845.rc
├── Android.bp
├── SunlightEnhancement.h
├── SunlightEnhancement.cpp
├── DisplayModes.h
├── service.cpp
└── DisplayModes.cpp
├── rootdir
├── etc
│ ├── init.recovery.qcom.rc
│ └── fstab.qcom
├── Android.mk
└── bin
│ ├── init.class_main.sh
│ └── init.qcom.class_core.sh
├── lights
├── android.hardware.light@2.0-service.oneplus_sdm845.xml
├── android.hardware.light@2.0-service.oneplus_sdm845.rc
├── Android.bp
├── service.cpp
├── Light.h
└── Light.cpp
├── seccomp
└── mediacodec.policy
├── overlay-lineage
├── packages
│ └── apps
│ │ ├── Aperture
│ │ └── app
│ │ │ └── src
│ │ │ └── main
│ │ │ └── res
│ │ │ └── values
│ │ │ └── config.xml
│ │ └── Dialer
│ │ └── java
│ │ └── com
│ │ └── android
│ │ └── dialer
│ │ └── callrecord
│ │ └── res
│ │ └── values
│ │ └── config.xml
├── hardware
│ └── oneplus
│ │ └── doze
│ │ └── res
│ │ └── values
│ │ └── config.xml
└── lineage-sdk
│ ├── packages
│ └── LineageSettingsProvider
│ │ └── res
│ │ └── values
│ │ └── defaults.xml
│ └── lineage
│ └── res
│ └── res
│ └── values
│ └── config.xml
├── idc
└── gf_input.idc
├── bootctrl
└── Android.bp
├── overlay
├── frameworks
│ └── base
│ │ └── packages
│ │ ├── SystemUI
│ │ └── res
│ │ │ ├── values-sw372dp
│ │ │ └── dimens.xml
│ │ │ └── values
│ │ │ └── config.xml
│ │ └── SettingsProvider
│ │ └── res
│ │ └── values
│ │ └── defaults.xml
└── packages
│ └── services
│ └── Telephony
│ └── res
│ ├── values
│ └── config.xml
│ └── xml
│ └── telephony_injection.xml
├── gpt-utils
├── sparse_crc32.h
├── Android.bp
└── sparse_crc32.cpp
├── system.prop
├── setup-makefiles.sh
├── audio
├── bluetooth_hearing_aid_audio_policy_configuration.xml
├── listen_platform_info.xml
├── graphite_ipc_platform_info.xml
├── audio_output_policy.conf
└── audio_tuning_mixer_tavil.txt
├── keylayout
└── gf_input.kl
├── touch
└── include
│ └── TouchscreenGestureConfig.h
├── extract-files.sh
├── compatibility_matrix.xml
├── config.fs
├── BoardConfigCommon.mk
├── vendor.prop
└── Android.mk
/system_ext.prop:
--------------------------------------------------------------------------------
1 | # DPM
2 | persist.vendor.dpm.feature=11
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/property.te:
--------------------------------------------------------------------------------
1 | vendor_public_prop(vendor_nfc_prop)
2 |
--------------------------------------------------------------------------------
/odm.prop:
--------------------------------------------------------------------------------
1 | # QC framework value-adds
2 | ro.vendor.qti.va_odm.support=1
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/domain.te:
--------------------------------------------------------------------------------
1 | allow domain opf_file:file r_file_perms;
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/bluetooth.te:
--------------------------------------------------------------------------------
1 | get_prop(bluetooth, vendor_bluetooth_prop)
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vendor_qtelephony.te:
--------------------------------------------------------------------------------
1 | set_prop(vendor_qtelephony, radio_prop)
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/wcnss_service.te:
--------------------------------------------------------------------------------
1 | r_dir_file(wcnss_service, sysfs_project_info)
2 |
--------------------------------------------------------------------------------
/pocketmode/proguard.flags:
--------------------------------------------------------------------------------
1 | -keep class org.lineageos.pocketmode.* {
2 | *;
3 | }
4 |
--------------------------------------------------------------------------------
/sepolicy/public/file.te:
--------------------------------------------------------------------------------
1 | # sysfs
2 | type sysfs_fpc_proximity, fs_type, sysfs_type;
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_bluetooth_qti.te:
--------------------------------------------------------------------------------
1 | r_dir_file(hal_bluetooth_qti, vendor_data_file)
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_audio_default.te:
--------------------------------------------------------------------------------
1 | get_prop(hal_audio_default, vendor_bluetooth_prop)
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_iop_default.te:
--------------------------------------------------------------------------------
1 | allow hal_iop_default proc_meminfo:file r_file_perms;
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_perf_default.te:
--------------------------------------------------------------------------------
1 | allow hal_perf_default proc_meminfo:file r_file_perms;
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/init.te:
--------------------------------------------------------------------------------
1 | allow init op1_file:dir mounton;
2 | allow init op2_file:dir mounton;
3 |
--------------------------------------------------------------------------------
/Android.bp:
--------------------------------------------------------------------------------
1 | soong_namespace {
2 | imports: ["hardware/oneplus", "hardware/qcom/bootctrl"],
3 | }
4 |
--------------------------------------------------------------------------------
/configs/gps/gps.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperiorOS-Devices/device_oneplus_sdm845-common/fourteen/configs/gps/gps.conf
--------------------------------------------------------------------------------
/sepolicy/vendor/platform_app.te:
--------------------------------------------------------------------------------
1 | hal_client_domain(platform_app, hal_ifaa)
2 |
3 | binder_call(platform_app, hal_ifaa_default)
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/thermal-engine.te:
--------------------------------------------------------------------------------
1 | allow thermal-engine sysfs:dir r_dir_perms;
2 |
3 | r_dir_file(thermal-engine, sysfs_devfreq)
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/private/seapp_contexts:
--------------------------------------------------------------------------------
1 | user=system seinfo=platform name=org.lineageos.pocketmode domain=pocketmode_app type=system_app_data_file
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/system_app.te:
--------------------------------------------------------------------------------
1 | typeattribute system_app system_writes_vendor_properties_violators;
2 |
3 | set_prop(system_app, vendor_nfc_prop)
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_power_default.te:
--------------------------------------------------------------------------------
1 | allow hal_power_default proc_touchpanel:dir search;
2 | allow hal_power_default proc_touchpanel:file rw_file_perms;
3 |
--------------------------------------------------------------------------------
/configs/public.libraries.txt:
--------------------------------------------------------------------------------
1 | libqti-perfd-client.so
2 | libadsprpc.so
3 | libcdsprpc.so
4 | libsdsprpc.so
5 | libfastcvopt.so
6 | liblistensoundmodel2.so
7 | libOpenCL.so
8 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_lineage_touch_default.te:
--------------------------------------------------------------------------------
1 | allow hal_lineage_touch_default proc_touchpanel:dir search;
2 | allow hal_lineage_touch_default proc_touchpanel:file rw_file_perms;
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_ifaa.te:
--------------------------------------------------------------------------------
1 | binder_call(hal_ifaa_client, hal_ifaa_server)
2 | binder_call(hal_ifaa_server, hal_ifaa_client)
3 |
4 | hal_attribute_hwservice(hal_ifaa, hal_ifaa_hwservice)
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/property_contexts:
--------------------------------------------------------------------------------
1 | # Bluetooth
2 | persist.vendor.bluetooth. u:object_r:vendor_bluetooth_prop:s0
3 |
4 | # NFC
5 | persist.vendor.nfc. u:object_r:vendor_nfc_prop:s0
6 |
--------------------------------------------------------------------------------
/rro_overlays/WifiOverlay/Android.bp:
--------------------------------------------------------------------------------
1 | runtime_resource_overlay {
2 | name: "WifiOverlay",
3 | theme: "WifiOverlay",
4 | sdk_version: "current",
5 | product_specific: true
6 | }
7 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_param.te:
--------------------------------------------------------------------------------
1 | binder_call(hal_param_client, hal_param_server)
2 | binder_call(hal_param_server, hal_param_client)
3 |
4 | hal_attribute_hwservice(hal_param, hal_param_hwservice)
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hwservice.te:
--------------------------------------------------------------------------------
1 | type hal_cameraHIDL_hwservice, hwservice_manager_type;
2 | type hal_ifaa_hwservice, hwservice_manager_type;
3 | type hal_param_hwservice, hwservice_manager_type;
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/sensors.te:
--------------------------------------------------------------------------------
1 | allow sensors sensors_vendor_data_file:dir create_dir_perms;
2 | allow sensors sensors_vendor_data_file:file create_file_perms;
3 |
4 | get_prop(sensors, sensors_prop)
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vendor_init.te:
--------------------------------------------------------------------------------
1 | allow vendor_init tmpfs:chr_file { read open };
2 | allow vendor_init tmpfs:dir { create_dir_perms mounton };
3 |
4 | allow vendor_init op2_file:file create_file_perms;
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_cameraHIDL.te:
--------------------------------------------------------------------------------
1 | binder_call(hal_cameraHIDL_client, hal_cameraHIDL_server)
2 | binder_call(hal_cameraHIDL_server, hal_cameraHIDL_client)
3 |
4 | hal_attribute_hwservice(hal_cameraHIDL, hal_cameraHIDL_hwservice)
5 |
--------------------------------------------------------------------------------
/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 | config_methods=virtual_display virtual_push_button keypad
7 | driver_param="no_rrm=1"
8 |
--------------------------------------------------------------------------------
/lineage.dependencies:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "repository": "android_hardware_oneplus",
4 | "target_path": "hardware/oneplus"
5 | },
6 | {
7 | "repository": "android_kernel_oneplus_sdm845",
8 | "target_path": "kernel/oneplus/sdm845"
9 | }
10 | ]
11 |
--------------------------------------------------------------------------------
/product.prop:
--------------------------------------------------------------------------------
1 | # Audio
2 | af.fast_track_multiplier=1
3 | audio.deep_buffer.media=true
4 | audio.offload.min.duration.secs=30
5 | audio.offload.video=true
6 | audio.sys.noisy.broadcast.delay=500
7 | audio.sys.offload.pstimeout.secs=3
8 | ro.af.client_heap_size_kbyte=7168
9 |
--------------------------------------------------------------------------------
/sepolicy/vendor/device.te:
--------------------------------------------------------------------------------
1 | type dash_device, dev_type;
2 | type fingerprintd_device, dev_type;
3 | type op1_block_device, dev_type;
4 | type op2_block_device, dev_type;
5 | type param_block_device, dev_type;
6 | type reserve1_block_device, dev_type;
7 | type reserve2_block_device, dev_type;
8 |
--------------------------------------------------------------------------------
/sepolicy/vendor/tee.te:
--------------------------------------------------------------------------------
1 | typeattribute tee data_between_core_and_vendor_violators;
2 |
3 | allow tee fingerprintd_data_file:dir create_dir_perms;
4 | allow tee fingerprintd_data_file:file create_file_perms;
5 |
6 | allow tee mnt_vendor_file:dir create_dir_perms;
7 | allow tee mnt_vendor_file:file create_file_perms;
8 |
--------------------------------------------------------------------------------
/livedisplay/.clang-format:
--------------------------------------------------------------------------------
1 | BasedOnStyle: Google
2 | AccessModifierOffset: -2
3 | AllowShortFunctionsOnASingleLine: Inline
4 | ColumnLimit: 100
5 | CommentPragmas: NOLINT:.*
6 | DerivePointerAlignment: false
7 | IndentWidth: 4
8 | PointerAlignment: Left
9 | TabWidth: 4
10 | UseTab: Never
11 | PenaltyExcessCharacter: 32
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/attributes:
--------------------------------------------------------------------------------
1 | # HALs
2 | attribute hal_cameraHIDL;
3 | attribute hal_cameraHIDL_client;
4 | attribute hal_cameraHIDL_server;
5 |
6 | attribute hal_ifaa;
7 | attribute hal_ifaa_client;
8 | attribute hal_ifaa_server;
9 |
10 | attribute hal_param;
11 | attribute hal_param_client;
12 | attribute hal_param_server;
13 |
--------------------------------------------------------------------------------
/rootdir/etc/init.recovery.qcom.rc:
--------------------------------------------------------------------------------
1 | on fs
2 | wait /dev/block/platform/soc/${ro.boot.bootdevice}
3 | symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
4 |
5 | on init
6 | setprop sys.usb.configfs 1
7 |
8 | on property:init.svc.fastbootd=running
9 | rm /dev/block/bootdevice/by-name/boot_aging
10 |
--------------------------------------------------------------------------------
/sepolicy/vendor/opf.te:
--------------------------------------------------------------------------------
1 | type opf, domain;
2 | type opf_exec, exec_type, vendor_file_type, file_type;
3 |
4 | init_daemon_domain(opf)
5 |
6 | type_transition opf device:file opf_file;
7 |
8 | allow opf device:dir create_dir_perms;
9 | allow opf device:file create_file_perms;
10 |
11 | allow opf opf_file:file create_file_perms;
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_lineage_livedisplay_qti.te:
--------------------------------------------------------------------------------
1 | allow hal_lineage_livedisplay_qti display_vendor_data_file:dir rw_dir_perms;
2 | allow hal_lineage_livedisplay_qti display_vendor_data_file:file create_file_perms;
3 |
4 | allow hal_lineage_livedisplay_qti sysfs_graphics:dir r_dir_perms;
5 | allow hal_lineage_livedisplay_qti sysfs_livedisplay_tuneable:file rw_file_perms;
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_nfc_default.te:
--------------------------------------------------------------------------------
1 | hal_client_domain(hal_nfc_default, hal_secure_element)
2 |
3 | allow hal_nfc_default hal_secure_element_hwservice:hwservice_manager find;
4 |
5 | allow hal_nfc_default nfc_vendor_data_file:dir create_dir_perms;
6 | allow hal_nfc_default nfc_vendor_data_file:file create_file_perms;
7 |
8 | get_prop(hal_nfc_default, vendor_nfc_prop)
9 |
--------------------------------------------------------------------------------
/sepolicy/private/pocketmode_app.te:
--------------------------------------------------------------------------------
1 | type pocketmode_app, domain;
2 |
3 | app_domain(pocketmode_app)
4 |
5 | allow pocketmode_app app_api_service:service_manager find;
6 |
7 | allow pocketmode_app system_app_data_file:dir create_dir_perms;
8 | allow pocketmode_app system_app_data_file:{ file lnk_file } create_file_perms;
9 |
10 | allow pocketmode_app sysfs_fpc_proximity:file { w_file_perms getattr };
11 |
--------------------------------------------------------------------------------
/lights/android.hardware.light@2.0-service.oneplus_sdm845.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | android.hardware.light
4 | hwbinder
5 | 2.0
6 |
7 | ILight
8 | default
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/rild.te:
--------------------------------------------------------------------------------
1 | hal_client_domain(rild, hal_param)
2 |
3 | allow rild vendor_data_file:dir rw_dir_perms;
4 | allow rild vendor_data_file:file create_file_perms;
5 |
6 | allow rild block_device:dir search;
7 |
8 | allow rild param_block_device:blk_file rw_file_perms;
9 |
10 | allow rild diag_device:chr_file rw_file_perms;
11 |
12 | allow rild proc:file w_file_perms;
13 | allow rild proc_net:file w_file_perms;
14 |
--------------------------------------------------------------------------------
/sepolicy/vendor/file.te:
--------------------------------------------------------------------------------
1 | # files
2 | type oem_file, file_type;
3 | type op1_file, file_type;
4 | type op2_file, file_type;
5 | type opf_file, file_type;
6 |
7 | # procfs
8 | type proc_touchpanel, fs_type, proc_type;
9 |
10 | # sysfs
11 | type sysfs_dash_charger, fs_type, proc_type, sysfs_type;
12 | type sysfs_fod, fs_type, sysfs_type;
13 | type sysfs_fpc, fs_type, sysfs_type;
14 | type sysfs_project_info, fs_type, sysfs_type;
15 |
--------------------------------------------------------------------------------
/pocketmode/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE_TAGS := optional
6 |
7 | LOCAL_SRC_FILES := $(call all-java-files-under, src)
8 |
9 | LOCAL_PACKAGE_NAME := OnePlusPocketMode
10 | LOCAL_CERTIFICATE := platform
11 | LOCAL_PRIVATE_PLATFORM_APIS := true
12 | LOCAL_PRIVILEGED_MODULE := true
13 |
14 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags
15 |
16 | include $(BUILD_PACKAGE)
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 |
--------------------------------------------------------------------------------
/sepolicy/vendor/dashd.te:
--------------------------------------------------------------------------------
1 | type dashd, domain;
2 | type dashd_exec, exec_type, vendor_file_type, file_type;
3 |
4 | init_daemon_domain(dashd)
5 |
6 | allow dashd sysfs_battery_supply:file w_file_perms;
7 |
8 | allow dashd proc_cmdline:file r_file_perms;
9 |
10 | allow dashd dash_device:chr_file rw_file_perms;
11 | allow dashd kmsg_device:chr_file rw_file_perms;
12 |
13 | r_dir_file(dashd, sysfs_battery_supply)
14 | r_dir_file(dashd, sysfs_dash_charger)
15 | r_dir_file(dashd, sysfs_usb_supply)
16 |
--------------------------------------------------------------------------------
/sepolicy/vendor/wifi-mac-generator.te:
--------------------------------------------------------------------------------
1 | type wifi-mac-generator, domain;
2 | type wifi-mac-generator_exec, exec_type, vendor_file_type, file_type;
3 |
4 | init_daemon_domain(wifi-mac-generator)
5 |
6 | allow wifi-mac-generator vendor_shell_exec:file rx_file_perms;
7 | allow wifi-mac-generator vendor_toolbox_exec:file rx_file_perms;
8 |
9 | r_dir_file(wifi-mac-generator, vendor_data_file)
10 |
11 | allow wifi-mac-generator mnt_vendor_file:dir search;
12 | allow wifi-mac-generator mnt_vendor_file:file w_file_perms;
13 |
--------------------------------------------------------------------------------
/overlay-lineage/packages/apps/Aperture/app/src/main/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | true
9 |
10 |
11 |
12 | - 3
13 |
14 |
15 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_param_default.te:
--------------------------------------------------------------------------------
1 | type hal_param_default, domain;
2 | hal_server_domain(hal_param_default, hal_param)
3 |
4 | type hal_param_default_exec, exec_type, vendor_file_type, file_type;
5 | init_daemon_domain(hal_param_default)
6 |
7 | allow hal_param_default self:qipcrtr_socket create_socket_perms_no_ioctl;
8 |
9 | allow hal_param_default block_device:dir search;
10 |
11 | allow hal_param_default param_block_device:blk_file rw_file_perms;
12 |
13 | r_dir_file(hal_param_default, sysfs_project_info)
14 |
15 | get_prop(hal_param_default, exported_default_prop)
16 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_ifaa_default.te:
--------------------------------------------------------------------------------
1 | type hal_ifaa_default, domain;
2 | hal_server_domain(hal_ifaa_default, hal_ifaa)
3 |
4 | type hal_ifaa_default_exec, exec_type, vendor_file_type, file_type;
5 | init_daemon_domain(hal_ifaa_default)
6 |
7 | add_hwservice(hal_ifaa_default, hal_ifaa_hwservice)
8 |
9 | hwbinder_use(hal_ifaa_default)
10 |
11 | binder_call(hal_ifaa_default, hal_perf_default)
12 |
13 | allow hal_ifaa_default hal_perf_hwservice:hwservice_manager find;
14 |
15 | allow hal_ifaa_default ion_device:chr_file r_file_perms;
16 | allow hal_ifaa_default tee_device:chr_file rw_file_perms;
17 |
18 | r_dir_file(hal_ifaa_default, firmware_file)
19 |
20 | get_prop(hal_ifaa_default, hwservicemanager_prop)
21 |
--------------------------------------------------------------------------------
/lights/android.hardware.light@2.0-service.oneplus_sdm845.rc:
--------------------------------------------------------------------------------
1 | on boot
2 | chown system system /sys/class/leds/red/start_idx
3 | chown system system /sys/class/leds/green/start_idx
4 | chown system system /sys/class/leds/blue/start_idx
5 | chown system system /sys/class/leds/red/lut_flags
6 | chown system system /sys/class/leds/green/lut_flags
7 | chown system system /sys/class/leds/blue/lut_flags
8 |
9 | service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.oneplus_sdm845
10 | interface android.hardware.light@2.0::ILight default
11 | class hal
12 | user system
13 | group system
14 | # shutting off lights while powering-off
15 | shutdown critical
16 |
--------------------------------------------------------------------------------
/livedisplay/vendor.lineage.livedisplay@2.1-service.oneplus_sdm845.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | vendor.lineage.livedisplay
4 | hwbinder
5 | 2.1
6 |
7 | IAntiFlicker
8 | default
9 |
10 |
11 | IDisplayModes
12 | default
13 |
14 |
15 | ISunlightEnhancement
16 | default
17 |
18 | @2.0::IPictureAdjustment/default
19 |
20 |
21 |
--------------------------------------------------------------------------------
/configs/privapp-permissions-hotword.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/idc/gf_input.idc:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2010 The Android Open Source 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 | #
16 | # Emulator keyboard configuration file #2.
17 | #
18 |
19 | keyboard.hasAssociatedDisplay = 1
20 | keyboard.orientationAware = 1
21 |
22 |
--------------------------------------------------------------------------------
/livedisplay/vendor.lineage.livedisplay@2.1-service.oneplus_sdm845.rc:
--------------------------------------------------------------------------------
1 | on init
2 | chmod 0660 /sys/class/drm/card0-DSI-1/dimlayer_bl_en
3 | chmod 0660 /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/main_display/display_mode
4 | chmod 0660 /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/main_display/hbm
5 | chown system graphics /sys/class/drm/card0-DSI-1/dimlayer_bl_en
6 | chown system system /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/main_display/display_mode
7 | chown system system /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/main_display/hbm
8 |
9 | on post-fs-data
10 | mkdir /data/misc/display 0770 system graphics
11 |
12 | service vendor.livedisplay-hal-2-1 /vendor/bin/hw/vendor.lineage.livedisplay@2.1-service.oneplus_sdm845
13 | class late_start
14 | user system
15 | group system
16 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_camera_default.te:
--------------------------------------------------------------------------------
1 | hal_client_domain(hal_camera_default, hal_cameraHIDL)
2 |
3 | allow hal_camera_default mnt_vendor_file:dir w_dir_perms;
4 | allow hal_camera_default mnt_vendor_file:file create_file_perms;
5 |
6 | allow hal_camera_default oem_file:dir w_dir_perms;
7 | allow hal_camera_default oem_file:file create_file_perms;
8 |
9 | allow hal_camera_default persist_file:dir w_dir_perms;
10 | allow hal_camera_default persist_file:file create_file_perms;
11 |
12 | allow hal_camera_default input_device:dir r_dir_perms;
13 | allow hal_camera_default input_device:chr_file r_file_perms;
14 |
15 | allow hal_camera_default xdsp_device:chr_file r_file_perms;
16 |
17 | allow hal_camera_default proc_meminfo:file r_file_perms;
18 |
19 | get_prop(hal_camera_default, ctl_default_prop)
20 | get_prop(hal_camera_default, vendor_mmi_prop)
21 |
--------------------------------------------------------------------------------
/bootctrl/Android.bp:
--------------------------------------------------------------------------------
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 | cc_library {
18 | name: "bootctrl.sdm845",
19 | defaults: ["bootctrl_hal_defaults"],
20 | static_libs: ["libgptutils.oneplus_sdm845"],
21 | }
22 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_cameraHIDL_default.te:
--------------------------------------------------------------------------------
1 | type hal_cameraHIDL_default, domain;
2 | hal_server_domain(hal_cameraHIDL_default, hal_cameraHIDL)
3 |
4 | type hal_cameraHIDL_default_exec, exec_type, vendor_file_type, file_type;
5 | init_daemon_domain(hal_cameraHIDL_default)
6 |
7 | add_hwservice(hal_cameraHIDL_default, hal_cameraHIDL_hwservice)
8 |
9 | hwbinder_use(hal_cameraHIDL_default)
10 |
11 | binder_call(hal_cameraHIDL_default, hal_perf_default)
12 |
13 | allow hal_cameraHIDL_default hal_perf_hwservice:hwservice_manager find;
14 |
15 | allow hal_cameraHIDL_default ion_device:chr_file r_file_perms;
16 | allow hal_cameraHIDL_default tee_device:chr_file rw_file_perms;
17 |
18 | allow hal_cameraHIDL_default vendor_camera_data_file:dir create_dir_perms;
19 |
20 | r_dir_file(hal_cameraHIDL_default, firmware_file)
21 |
22 | get_prop(hal_cameraHIDL_default, hwservicemanager_prop)
23 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/values-sw372dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 | 4dp
20 |
21 |
--------------------------------------------------------------------------------
/gpt-utils/sparse_crc32.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 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 | #ifndef _LIBSPARSE_SPARSE_CRC32_H_
18 | #define _LIBSPARSE_SPARSE_CRC32_H_
19 |
20 | #include
21 |
22 | uint32_t sparse_crc32(uint32_t crc, const void* buf, size_t size);
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | true
19 | 4
20 |
21 |
--------------------------------------------------------------------------------
/overlay-lineage/hardware/oneplus/doze/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | oneplus.sensor.pickup
20 | oneplus.sensor.pocket
21 |
22 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | true
23 |
24 |
25 |
--------------------------------------------------------------------------------
/configs/gps/lowi.conf:
--------------------------------------------------------------------------------
1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*
2 | #
3 | # LOWI Config file - default
4 | #
5 | # GENERAL DESCRIPTION
6 | # This file contains the config params for LOWI
7 | #
8 | # Copyright (c) 2019 Qualcomm Technologies, Inc.
9 | # All Rights Reserved.
10 | # Confidential and Proprietary - Qualcomm Technologies, Inc.
11 | #
12 | # 2012-2013 Qualcomm Atheros, Inc.
13 | # All Rights Reserved.
14 | # Qualcomm Atheros Confidential and Proprietary.
15 | #
16 | # Export of this technology or software is regulated by the U.S. Government.
17 | # Diversion contrary to U.S. law prohibited.
18 | #=============================================================================*/
19 |
20 | # X86 ONLY - UBUNTU:
21 | # Copy this file in the same directory where the executable is
22 |
23 | # Log level
24 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100
25 | LOWI_LOG_LEVEL = 4
26 | LOWI_USE_LOWI_LP = 0
27 |
28 |
--------------------------------------------------------------------------------
/configs/media_codecs_vendor_audio.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
22 |
23 |
24 | true
25 |
26 |
--------------------------------------------------------------------------------
/configs/component-overrides.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/overlay-lineage/lineage-sdk/packages/LineageSettingsProvider/res/values/defaults.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
23 | 2
24 |
25 |
--------------------------------------------------------------------------------
/pocketmode/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
15 |
16 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hwservice_contexts:
--------------------------------------------------------------------------------
1 | vendor.nxp.eventprocessor::INxpEseEvtProcessor u:object_r:hal_secure_element_hwservice:s0
2 | vendor.nxp.nxpese::INxpEse u:object_r:hal_secure_element_hwservice:s0
3 | vendor.nxp.nxpnfc::INxpNfc u:object_r:hal_nfc_hwservice:s0
4 | vendor.goodix.hardware.biometrics.fingerprint::IGoodixFingerprintDaemon u:object_r:hal_fingerprint_hwservice:s0
5 | vendor.oneplus.camera.CameraHIDL::IOnePlusCameraProvider u:object_r:hal_cameraHIDL_hwservice:s0
6 | vendor.oneplus.fingerprint.extension::IVendorFingerprintExtensions u:object_r:hal_fingerprint_hwservice:s0
7 | vendor.oneplus.hardware.camera::IOnePlusCameraProvider u:object_r:hal_cameraHIDL_hwservice:s0
8 | vendor.oneplus.hardware.CameraMDMHIDL::IOnePlusCameraMDM u:object_r:hal_cameraHIDL_hwservice:s0
9 | vendor.oneplus.hardware.ifaa::IOneplusIfaa u:object_r:hal_ifaa_hwservice:s0
10 | vendor.oneplus.hardware.param::IOneplusParam u:object_r:hal_param_hwservice:s0
11 |
--------------------------------------------------------------------------------
/gpt-utils/Android.bp:
--------------------------------------------------------------------------------
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 |
18 | cc_library {
19 | name: "libgptutils.oneplus_sdm845",
20 | vendor: true,
21 | recovery_available: true,
22 | shared_libs: [
23 | "libcutils",
24 | "liblog",
25 | "libz",
26 | ],
27 | cflags: [
28 | "-Wall",
29 | "-Werror",
30 | ],
31 | srcs: [
32 | "gpt-utils.cpp",
33 | ],
34 | owner: "qti",
35 | header_libs: [
36 | "generated_kernel_headers",
37 | ],
38 | export_include_dirs: ["."],
39 | }
40 |
--------------------------------------------------------------------------------
/system.prop:
--------------------------------------------------------------------------------
1 | # AB Update
2 | ro.build.ab_update=true
3 |
4 | # BPF
5 | ro.kernel.ebpf.supported=true
6 |
7 | # CNE
8 | persist.vendor.cne.feature=1
9 |
10 | # CoreSight STM
11 | persist.debug.coresight.config=stm-events
12 |
13 | # Dex2oat
14 | dalvik.vm.dex2oat64.enabled=true
15 |
16 | # Display
17 | debug.sf.enable_hwc_vds=1
18 | debug.sf.latch_unsignaled=1
19 |
20 | # fastbootd
21 | ro.fastbootd.available=true
22 |
23 | # GPS
24 | persist.vendor.overlay.izat.optin=rro
25 |
26 | # IMS
27 | persist.dbg.volte_avail_ovr=1
28 | persist.dbg.vt_avail_ovr=1
29 | persist.dbg.wfc_avail_ovr=1
30 |
31 | # Media
32 | media.settings.xml=/vendor/etc/media_profiles_vendor.xml
33 | ro.media.recorder-max-base-layer-fps=60
34 |
35 | # NFC
36 | ro.nfc.port=I2C
37 |
38 | # QC framework value-adds
39 | ro.vendor.qti.va_aosp.support=1
40 |
41 | # Radio
42 | persist.netmon.linger=5000
43 | persist.vendor.data.mode=concurrent
44 | ro.vendor.use_data_netmgrd=true
45 | telephony.lteOnCdmaDevice=1
46 |
47 | # RCS
48 | persist.rcs.supported=0
49 |
50 | # Sensors
51 | persist.vendor.sensors.enable.mag_filter=true
52 |
53 | # WiFi
54 | config.disable_rtt=true
55 |
56 | # WiFi Display
57 | persist.debug.wfd.enable=1
58 | persist.sys.wfd.virtual=0
59 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_fingerprint_device.te:
--------------------------------------------------------------------------------
1 | typeattribute hal_fingerprint_default data_between_core_and_vendor_violators;
2 |
3 | allow hal_fingerprint_default self:netlink_socket create_socket_perms_no_ioctl;
4 |
5 | binder_call(hal_fingerprint_default, hal_perf_default)
6 |
7 | allow hal_fingerprint_default hal_perf_hwservice:hwservice_manager find;
8 |
9 | allow hal_fingerprint_default fingerprintd_data_file:dir rw_dir_perms;
10 | allow hal_fingerprint_default fingerprintd_data_file:file create_file_perms;
11 |
12 | allow hal_fingerprint_default fingerprintd_device:chr_file rw_file_perms;
13 | allow hal_fingerprint_default tee_device:chr_file rw_file_perms;
14 | allow hal_fingerprint_default qdsp_device:chr_file rw_file_perms;
15 | allow hal_fingerprint_default xdsp_device:chr_file rw_file_perms;
16 |
17 | allow hal_fingerprint_default proc_touchpanel:dir search;
18 | allow hal_fingerprint_default proc_touchpanel:file rw_file_perms;
19 |
20 | allow hal_fingerprint_default sysfs_fod:file rw_file_perms;
21 |
22 | allow hal_fingerprint_default sysfs_fpc:dir r_dir_perms;
23 | allow hal_fingerprint_default sysfs_fpc:file rw_file_perms;
24 |
25 | get_prop(hal_fingerprint_default, adsprpc_prop)
26 | get_prop(hal_fingerprint_default, vendor_default_prop)
27 |
--------------------------------------------------------------------------------
/lights/Android.bp:
--------------------------------------------------------------------------------
1 | // Copyright (C) 2018,2020 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.oneplus_sdm845",
19 | init_rc: ["android.hardware.light@2.0-service.oneplus_sdm845.rc"],
20 | vintf_fragments: ["android.hardware.light@2.0-service.oneplus_sdm845.xml"],
21 | srcs: ["service.cpp", "Light.cpp"],
22 | vendor: true,
23 | shared_libs: [
24 | "android.hardware.light@2.0",
25 | "libbase",
26 | "libhardware",
27 | "libhidlbase",
28 | "liblog",
29 | "libutils",
30 | ],
31 | }
32 |
--------------------------------------------------------------------------------
/rro_overlays/WifiOverlay/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
21 |
22 |
27 |
28 |
--------------------------------------------------------------------------------
/pocketmode/src/org/lineageos/pocketmode/BootCompletedReceiver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 The CyanogenMod 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.pocketmode;
18 |
19 | import android.content.BroadcastReceiver;
20 | import android.content.Context;
21 | import android.content.Intent;
22 | import android.os.UserHandle;
23 | import android.util.Log;
24 |
25 | public class BootCompletedReceiver extends BroadcastReceiver {
26 | private static final String TAG = "OnePlusPocketMode";
27 |
28 | @Override
29 | public void onReceive(final Context context, Intent intent) {
30 | Log.d(TAG, "Starting");
31 | context.startServiceAsUser(new Intent(context, PocketModeService.class),
32 | UserHandle.CURRENT);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/setup-makefiles.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 2016 The CyanogenMod Project
4 | # Copyright (C) 2017-2023 The LineageOS Project
5 | #
6 | # SPDX-License-Identifier: Apache-2.0
7 | #
8 |
9 | set -e
10 |
11 | # Load extract_utils and do some sanity checks
12 | MY_DIR="${BASH_SOURCE%/*}"
13 | if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
14 |
15 | ANDROID_ROOT="${MY_DIR}/../../.."
16 |
17 | HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
18 | if [ ! -f "${HELPER}" ]; then
19 | echo "Unable to find helper script at ${HELPER}"
20 | exit 1
21 | fi
22 | source "${HELPER}"
23 |
24 | # Initialize the helper for common
25 | setup_vendor "${DEVICE_COMMON}" "${VENDOR_COMMON:-$VENDOR}" "${ANDROID_ROOT}" true
26 |
27 | # Warning headers and guards
28 | write_headers "enchilada fajita"
29 |
30 | # The standard common blobs
31 | write_makefiles "${MY_DIR}/proprietary-files.txt" true
32 |
33 | # Finish
34 | write_footers
35 |
36 | if [ -s "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" ]; then
37 | # Reinitialize the helper for device
38 | setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false
39 |
40 | # Warning headers and guards
41 | write_headers
42 |
43 | # The standard device blobs
44 | write_makefiles "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" true
45 |
46 | if [ -f "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" ]; then
47 | append_firmware_calls_to_makefiles "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt"
48 | fi
49 |
50 | # Finish
51 | write_footers
52 | fi
53 |
--------------------------------------------------------------------------------
/lights/service.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 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.oneplus_sdm845"
18 |
19 | #include
20 | #include
21 |
22 | #include "Light.h"
23 |
24 | using android::hardware::configureRpcThreadpool;
25 | using android::hardware::joinRpcThreadpool;
26 |
27 | using android::hardware::light::V2_0::ILight;
28 | using android::hardware::light::V2_0::implementation::Light;
29 |
30 | using android::OK;
31 | using android::status_t;
32 |
33 | int main() {
34 | android::sp service = new Light();
35 |
36 | configureRpcThreadpool(1, true);
37 |
38 | status_t status = service->registerAsService();
39 | if (status != OK) {
40 | LOG(ERROR) << "Cannot register Light HAL service.";
41 | return 1;
42 | }
43 |
44 | LOG(INFO) << "Light HAL service ready.";
45 |
46 | joinRpcThreadpool();
47 |
48 | LOG(ERROR) << "Light HAL service failed to join thread pool.";
49 | return 1;
50 | }
51 |
--------------------------------------------------------------------------------
/audio/bluetooth_hearing_aid_audio_policy_configuration.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/livedisplay/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2019 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | cc_binary {
17 | name: "vendor.lineage.livedisplay@2.1-service.oneplus_sdm845",
18 | defaults: ["hidl_defaults"],
19 | init_rc: ["vendor.lineage.livedisplay@2.1-service.oneplus_sdm845.rc"],
20 | vintf_fragments: ["vendor.lineage.livedisplay@2.1-service.oneplus_sdm845.xml"],
21 | relative_install_path: "hw",
22 | srcs: [
23 | ":vendor.lineage.livedisplay@2.0-sdm-pa",
24 | ":vendor.lineage.livedisplay@2.0-sdm-utils",
25 | ":vendor.lineage.livedisplay@2.1-oneplus-af",
26 | "DisplayModes.cpp",
27 | "SunlightEnhancement.cpp",
28 | "service.cpp",
29 | ],
30 | shared_libs: [
31 | "libbase",
32 | "libbinder",
33 | "libhidlbase",
34 | "libutils",
35 | "vendor.lineage.livedisplay@2.0",
36 | "vendor.lineage.livedisplay@2.1",
37 | ],
38 | header_libs: [
39 | "vendor.lineage.livedisplay@2.0-sdm-headers",
40 | "vendor.lineage.livedisplay@2.1-oneplus-headers",
41 | ],
42 | proprietary: true,
43 | }
44 |
--------------------------------------------------------------------------------
/livedisplay/SunlightEnhancement.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H
18 | #define VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H
19 |
20 | #include
21 | #include
22 | #include
23 |
24 | namespace vendor {
25 | namespace lineage {
26 | namespace livedisplay {
27 | namespace V2_1 {
28 | namespace implementation {
29 |
30 | using ::android::hardware::Return;
31 | using ::android::hardware::Void;
32 | using ::android::sp;
33 |
34 | class SunlightEnhancement : public ISunlightEnhancement {
35 | public:
36 | // Methods from ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement follow.
37 | Return isEnabled() override;
38 | Return setEnabled(bool enabled) override;
39 | };
40 |
41 | } // namespace implementation
42 | } // namespace V2_1
43 | } // namespace livedisplay
44 | } // namespace lineage
45 | } // namespace vendor
46 |
47 | #endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H
48 |
--------------------------------------------------------------------------------
/livedisplay/SunlightEnhancement.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #define LOG_TAG "SunlightEnhancementService"
18 |
19 | #include "SunlightEnhancement.h"
20 | #include
21 | #include
22 |
23 | namespace vendor {
24 | namespace lineage {
25 | namespace livedisplay {
26 | namespace V2_1 {
27 | namespace implementation {
28 |
29 | static constexpr const char* kHbmPath =
30 | "/sys/devices/platform/soc/ae00000.qcom,mdss_mdp/main_display/hbm";
31 |
32 | Return SunlightEnhancement::isEnabled() {
33 | std::ifstream file(kHbmPath);
34 | int result = -1;
35 | file >> result;
36 | LOG(DEBUG) << "Got result " << result << " fail " << file.fail();
37 | return !file.fail() && result > 0;
38 | }
39 |
40 | Return SunlightEnhancement::setEnabled(bool enabled) {
41 | std::ofstream file(kHbmPath);
42 | file << (enabled ? "3" : "0");
43 | LOG(DEBUG) << "setEnabled fail " << file.fail();
44 | return !file.fail();
45 | }
46 |
47 | } // namespace implementation
48 | } // namespace V2_1
49 | } // namespace livedisplay
50 | } // namespace lineage
51 | } // namespace vendor
52 |
--------------------------------------------------------------------------------
/overlay/packages/services/Telephony/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
21 |
22 |
24 |
25 |
26 | true
27 |
28 |
29 | true
30 |
31 |
32 | org.codeaurora.ims
33 |
34 |
35 | com.android.service.ims
36 |
37 |
--------------------------------------------------------------------------------
/keylayout/gf_input.kl:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2012, 2014 The Linux Foundation. All rights reserved.
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions are
5 | # met:
6 | # * Redistributions of source code must retain the above copyright
7 | # notice, this list of conditions and the following disclaimer.
8 | # * Redistributions in binary form must reproduce the above
9 | # copyright notice, this list of conditions and the following
10 | # disclaimer in the documentation and/or other materials provided
11 | # with the distribution.
12 | # * Neither the name of The Linux Foundation nor the names of its
13 | # contributors may be used to endorse or promote products derived
14 | # from this software without specific prior written permission.
15 | #
16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 |
28 | key 102 HOME
29 | key 116 POWER
30 | #key 60 F2
31 | #key 305 F3
32 | key 103 SYSTEM_NAVIGATION_UP
33 | key 105 SYSTEM_NAVIGATION_LEFT
34 | key 106 SYSTEM_NAVIGATION_RIGHT
35 | key 108 SYSTEM_NAVIGATION_DOWN
--------------------------------------------------------------------------------
/lights/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 | #ifndef ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
17 | #define ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
18 |
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 |
25 | namespace android {
26 | namespace hardware {
27 | namespace light {
28 | namespace V2_0 {
29 | namespace implementation {
30 |
31 | using ::android::hardware::Return;
32 | using ::android::hardware::Void;
33 | using ::android::hardware::hidl_vec;
34 | using ::android::hardware::light::V2_0::ILight;
35 | using ::android::hardware::light::V2_0::LightState;
36 | using ::android::hardware::light::V2_0::Status;
37 | using ::android::hardware::light::V2_0::Type;
38 |
39 | class Light : public ILight {
40 | public:
41 | Light();
42 |
43 | Return setLight(Type type, const LightState& state) override;
44 | Return getSupportedTypes(getSupportedTypes_cb _hidl_cb) override;
45 |
46 | private:
47 | void handleRgb(const LightState& state, size_t index);
48 |
49 | std::mutex mLock;
50 | std::unordered_map> mLights;
51 | std::array mLightStates;
52 | };
53 |
54 | } // namespace implementation
55 | } // namespace V2_0
56 | } // namespace light
57 | } // namespace hardware
58 | } // namespace android
59 |
60 | #endif // ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
61 |
--------------------------------------------------------------------------------
/configs/system_properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/livedisplay/DisplayModes.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2019 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_1_DISPLAYMODES_H
18 | #define VENDOR_LINEAGE_LIVEDISPLAY_V2_1_DISPLAYMODES_H
19 |
20 | #include
21 | #include
22 | #include
23 | #include