├── 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 24 | 25 | namespace vendor { 26 | namespace lineage { 27 | namespace livedisplay { 28 | namespace V2_1 { 29 | namespace implementation { 30 | 31 | using ::android::hardware::Return; 32 | using ::android::hardware::Void; 33 | using ::android::sp; 34 | 35 | class DisplayModes : public IDisplayModes { 36 | public: 37 | DisplayModes(); 38 | 39 | // Methods from ::vendor::lineage::livedisplay::V2_1::IDisplayModes follow. 40 | Return getDisplayModes(getDisplayModes_cb resultCb) override; 41 | Return getCurrentDisplayMode(getCurrentDisplayMode_cb resultCb) override; 42 | Return getDefaultDisplayMode(getDefaultDisplayMode_cb ResultCb) override; 43 | Return setDisplayMode(int32_t modeID, bool makeDefault) override; 44 | 45 | private: 46 | struct ModeInfo { 47 | const char* name; 48 | const char* value; 49 | }; 50 | static const std::map kModeMap; 51 | int32_t mDefaultModeId; 52 | }; 53 | 54 | } // namespace implementation 55 | } // namespace V2_1 56 | } // namespace livedisplay 57 | } // namespace lineage 58 | } // namespace vendor 59 | 60 | #endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_1_DISPLAYMODES_H 61 | -------------------------------------------------------------------------------- /configs/gps/flp.conf: -------------------------------------------------------------------------------- 1 | ################################### 2 | ##### FLP settings ##### 3 | ################################### 4 | 5 | ################################### 6 | # FLP BATCH SIZE 7 | ################################### 8 | # The number of batched locations 9 | # requested to modem. The desired number 10 | # defined below may not be satisfied, as 11 | # the modem can only return the number 12 | # of batched locations that can be allocated, 13 | # which is limited by memory. The default 14 | # batch size defined as 20 as below. 15 | BATCH_SIZE=20 16 | 17 | ################################### 18 | # FLP OUTDOOR TRIP BATCH SIZE 19 | ################################### 20 | # The number of batched locations 21 | # requested to modem for outdoor 22 | # trip batching. The desired number 23 | # defined below may not be satisfied, as 24 | # the modem can only return the number 25 | # of batched locations that can be allocated, 26 | # which is limited by memory. The default 27 | # trip batch size defined as 600 as below. 28 | OUTDOOR_TRIP_BATCH_SIZE=600 29 | 30 | ################################### 31 | # FLP BATCHING SESSION TIMEOUT 32 | ################################### 33 | # Duration with which batch session timeout 34 | # happens in milliseconds. If not specified 35 | # or set to zero, batching session timeout 36 | # defaults to 20 seconds by the modem. 37 | # BATCH_SESSION_TIMEOUT=20000 38 | 39 | ################################### 40 | # FLP BATCHING ACCURACY 41 | ################################### 42 | # Set to one of the defined values below 43 | # to define the accuracy of batching. 44 | # If not specified, accuracy defaults 45 | # to LOW. 46 | # FLP BATCHING ACCURACY values: 47 | # Low accuracy = 0 48 | # Medium accuracy = 1 49 | # High accuracy = 2 50 | ACCURACY=1 51 | 52 | #################################### 53 | # By default if network fixes are not sensor assisted 54 | # these fixes must be dropped. This parameter adds an exception 55 | # for targets where there is no PDR and we still want to 56 | # report out network fixes 57 | # 0: MUST NOT ALLOW NETWORK FIXES 58 | # 1: ALLOW NETWORK FIXES 59 | #################################### 60 | ALLOW_NETWORK_FIXES = 0 61 | -------------------------------------------------------------------------------- /touch/include/TouchscreenGestureConfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef TOUCH_ONEPLUS_TOUCHSCREENGESTURECONFIG_H 18 | #define TOUCH_ONEPLUS_TOUCHSCREENGESTURECONFIG_H 19 | 20 | #include 21 | 22 | namespace vendor { 23 | namespace lineage { 24 | namespace touch { 25 | namespace V1_0 { 26 | namespace implementation { 27 | 28 | const std::map kGestureInfoMap = { 29 | {0, {251, "Two fingers down swipe", "/proc/touchpanel/double_swipe_enable"}}, 30 | {1, {252, "Up arrow", "/proc/touchpanel/up_arrow_enable"}}, 31 | {2, {254, "Right arrow", "/proc/touchpanel/right_arrow_enable"}}, 32 | {3, {255, "Down arrow", "/proc/touchpanel/down_arrow_enable"}}, 33 | {4, {253, "Left arrow", "/proc/touchpanel/left_arrow_enable"}}, 34 | {5, {66, "One finger up swipe", "/proc/touchpanel/up_swipe_enable"}}, 35 | {6, {65, "One finger right swipe", "/proc/touchpanel/right_swipe_enable"}}, 36 | {7, {64, "One finger down swipe", "/proc/touchpanel/down_swipe_enable"}}, 37 | {8, {63, "One finger left swipe", "/proc/touchpanel/left_swipe_enable"}}, 38 | {9, {247, "Letter M", "/proc/touchpanel/letter_m_enable"}}, 39 | {10, {250, "Letter O", "/proc/touchpanel/letter_o_enable"}}, 40 | {11, {248, "Letter S", "/proc/touchpanel/letter_s_enable"}}, 41 | {12, {246, "Letter W", "/proc/touchpanel/letter_w_enable"}}, 42 | {13, {67, "Single Tap", "/proc/touchpanel/single_tap_enable"}}, 43 | }; 44 | 45 | } // namespace implementation 46 | } // namespace V1_0 47 | } // namespace touch 48 | } // namespace lineage 49 | } // namespace vendor 50 | 51 | #endif // TOUCH_ONEPLUS_TOUCHSCREENGESTURECONFIG_H 52 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/xml/telephony_injection.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 27 | 29 | 30 | 33 | 34 | 35 | com.android.internal.telephony.ServiceStateTracker 36 | com.android.internal.telephony.SubscriptionController 37 | com.android.internal.telephony.SubscriptionInfoUpdater 38 | com.android.internal.telephony.GsmCdmaPhone 39 | com.android.internal.telephony.PhoneSwitcher 40 | com.android.internal.telephony.IccPhoneBookInterfaceManager 41 | com.android.internal.telephony.dataconnection.DcTracker 42 | com.android.internal.telephony.RIL 43 | com.android.internal.telephony.TelephonyComponentFactory 44 | com.android.internal.telephony.MultiSimSettingController 45 | 46 | 47 | -------------------------------------------------------------------------------- /pocketmode/src/org/lineageos/pocketmode/PocketModeService.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.app.Service; 20 | import android.content.BroadcastReceiver; 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.content.IntentFilter; 24 | import android.os.IBinder; 25 | import android.util.Log; 26 | 27 | public class PocketModeService extends Service { 28 | private static final String TAG = "PocketModeService"; 29 | private static final boolean DEBUG = false; 30 | 31 | private PocketSensor mPocketSensor; 32 | 33 | @Override 34 | public void onCreate() { 35 | if (DEBUG) Log.d(TAG, "Creating service"); 36 | mPocketSensor = new PocketSensor(this); 37 | 38 | IntentFilter screenStateFilter = new IntentFilter(); 39 | screenStateFilter.addAction(Intent.ACTION_SCREEN_ON); 40 | screenStateFilter.addAction(Intent.ACTION_SCREEN_OFF); 41 | registerReceiver(mScreenStateReceiver, screenStateFilter); 42 | } 43 | 44 | @Override 45 | public int onStartCommand(Intent intent, int flags, int startId) { 46 | if (DEBUG) Log.d(TAG, "Starting service"); 47 | return START_STICKY; 48 | } 49 | 50 | @Override 51 | public void onDestroy() { 52 | if (DEBUG) Log.d(TAG, "Destroying service"); 53 | this.unregisterReceiver(mScreenStateReceiver); 54 | mPocketSensor.disable(); 55 | super.onDestroy(); 56 | } 57 | 58 | @Override 59 | public IBinder onBind(Intent intent) { 60 | return null; 61 | } 62 | 63 | private BroadcastReceiver mScreenStateReceiver = new BroadcastReceiver() { 64 | @Override 65 | public void onReceive(Context context, Intent intent) { 66 | if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) { 67 | if (DEBUG) Log.d(TAG, "Display on"); 68 | mPocketSensor.disable(); 69 | } else if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) { 70 | if (DEBUG) Log.d(TAG, "Display off"); 71 | mPocketSensor.enable(); 72 | } 73 | } 74 | }; 75 | } 76 | -------------------------------------------------------------------------------- /extract-files.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 | # Default to sanitizing the vendor folder before extraction 25 | CLEAN_VENDOR=true 26 | 27 | ONLY_COMMON= 28 | ONLY_FIRMWARE= 29 | ONLY_TARGET= 30 | KANG= 31 | SECTION= 32 | 33 | while [ "${#}" -gt 0 ]; do 34 | case "${1}" in 35 | --only-common ) 36 | ONLY_COMMON=true 37 | ;; 38 | --only-firmware ) 39 | ONLY_FIRMWARE=true 40 | ;; 41 | --only-target ) 42 | ONLY_TARGET=true 43 | ;; 44 | -n | --no-cleanup ) 45 | CLEAN_VENDOR=false 46 | ;; 47 | -k | --kang ) 48 | KANG="--kang" 49 | ;; 50 | -s | --section ) 51 | SECTION="${2}"; shift 52 | CLEAN_VENDOR=false 53 | ;; 54 | * ) 55 | SRC="${1}" 56 | ;; 57 | esac 58 | shift 59 | done 60 | 61 | if [ -z "${SRC}" ]; then 62 | SRC="adb" 63 | fi 64 | 65 | function blob_fixup() { 66 | case "${1}" in 67 | system_ext/lib64/libwfdnative.so) 68 | sed -i "s/android.hidl.base@1.0.so/libhidlbase.so\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00/" "${2}" 69 | ;; 70 | esac 71 | } 72 | 73 | if [ -z "${ONLY_FIRMWARE}" ] && [ -z "${ONLY_TARGET}" ]; then 74 | # Initialize the helper for common device 75 | setup_vendor "${DEVICE_COMMON}" "${VENDOR_COMMON:-$VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}" 76 | 77 | extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" 78 | fi 79 | 80 | if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" ]; then 81 | # Reinitialize the helper for device 82 | source "${MY_DIR}/../../${VENDOR}/${DEVICE}/extract-files.sh" 83 | setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}" 84 | 85 | if [ -z "${ONLY_FIRMWARE}" ]; then 86 | extract "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" 87 | fi 88 | 89 | if [ -z "${SECTION}" ] && [ -f "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" ]; then 90 | extract_firmware "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" "${SRC}" 91 | fi 92 | fi 93 | 94 | "${MY_DIR}/setup-makefiles.sh" 95 | -------------------------------------------------------------------------------- /overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | true 22 | true 23 | 24 | 36 | 64 37 | 38 | 50 | 64 51 | 52 | 53 | true 54 | 55 | 57 | 58 | com.oneplus.camera 59 | com.oneplus.camera.service 60 | org.codeaurora.snapcam 61 | org.lineageos.aperture 62 | org.lineageos.aperture.dev 63 | 64 | 65 | -------------------------------------------------------------------------------- /livedisplay/service.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 "vendor.lineage.livedisplay@2.1-service.oneplus_sdm845" 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include "DisplayModes.h" 25 | #include "SunlightEnhancement.h" 26 | 27 | using ::vendor::lineage::livedisplay::V2_0::IPictureAdjustment; 28 | using ::vendor::lineage::livedisplay::V2_0::sdm::PictureAdjustment; 29 | using ::vendor::lineage::livedisplay::V2_0::sdm::SDMController; 30 | using ::vendor::lineage::livedisplay::V2_1::IAntiFlicker; 31 | using ::vendor::lineage::livedisplay::V2_1::IDisplayModes; 32 | using ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement; 33 | using ::vendor::lineage::livedisplay::V2_1::implementation::AntiFlicker; 34 | using ::vendor::lineage::livedisplay::V2_1::implementation::DisplayModes; 35 | using ::vendor::lineage::livedisplay::V2_1::implementation::SunlightEnhancement; 36 | 37 | int main() { 38 | std::shared_ptr controller = std::make_shared(); 39 | android::sp afService = new AntiFlicker(); 40 | android::sp modesService = new DisplayModes(); 41 | android::sp paService = new PictureAdjustment(controller); 42 | android::sp sreService = new SunlightEnhancement(); 43 | 44 | android::hardware::configureRpcThreadpool(2, true /*callerWillJoin*/); 45 | 46 | if (afService->registerAsService() != android::OK) { 47 | LOG(ERROR) << "Cannot register anti flicker HAL service."; 48 | return 1; 49 | } 50 | 51 | if (modesService->registerAsService() != android::OK) { 52 | LOG(ERROR) << "Cannot register display modes HAL service."; 53 | return 1; 54 | } 55 | 56 | if (paService->registerAsService() != android::OK) { 57 | LOG(ERROR) << "Cannot register picture adjustment HAL service."; 58 | return 1; 59 | } 60 | 61 | if (sreService->registerAsService() != android::OK) { 62 | LOG(ERROR) << "Cannot register sunlight enhancement HAL service."; 63 | return 1; 64 | } 65 | 66 | LOG(INFO) << "LiveDisplay HAL service ready."; 67 | 68 | android::hardware::joinRpcThreadpool(); 69 | 70 | LOG(ERROR) << "LiveDisplay HAL service failed to join thread pool."; 71 | return 1; 72 | } 73 | -------------------------------------------------------------------------------- /audio/listen_platform_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /audio/graphite_ipc_platform_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 34 | 35 | 36 | 38 | 39 | 40 | 42 | 43 | 44 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /pocketmode/src/org/lineageos/pocketmode/PocketSensor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * Copyright (c) 2018 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.pocketmode; 19 | 20 | import android.content.Context; 21 | import android.hardware.Sensor; 22 | import android.hardware.SensorEvent; 23 | import android.hardware.SensorEventListener; 24 | import android.hardware.SensorManager; 25 | import android.os.FileUtils; 26 | import android.text.TextUtils; 27 | import android.util.Log; 28 | 29 | import java.io.IOException; 30 | import java.util.concurrent.ExecutorService; 31 | import java.util.concurrent.Executors; 32 | 33 | public class PocketSensor implements SensorEventListener { 34 | private static final boolean DEBUG = false; 35 | private static final String TAG = "PocketSensor"; 36 | 37 | private static final String GOODIX_FILE = 38 | "/sys/devices/platform/soc/soc:goodix_fp/proximity_state"; 39 | 40 | private ExecutorService mExecutorService; 41 | private SensorManager mSensorManager; 42 | private Sensor mSensor; 43 | private Context mContext; 44 | 45 | public PocketSensor(Context context) { 46 | mContext = context; 47 | mSensorManager = mContext.getSystemService(SensorManager.class); 48 | mExecutorService = Executors.newSingleThreadExecutor(); 49 | 50 | for (Sensor sensor : mSensorManager.getSensorList(Sensor.TYPE_ALL)) { 51 | if (TextUtils.equals(sensor.getStringType(), "oneplus.sensor.pocket")) { 52 | mSensor = sensor; 53 | break; 54 | } 55 | } 56 | } 57 | 58 | @Override 59 | public void onSensorChanged(SensorEvent event) { 60 | setFPProximityState(event.values[0] == 1.0); 61 | } 62 | 63 | @Override 64 | public void onAccuracyChanged(Sensor sensor, int accuracy) { 65 | /* Empty */ 66 | } 67 | 68 | private void setFPProximityState(boolean isNear) { 69 | try { 70 | FileUtils.stringToFile(GOODIX_FILE, isNear ? "1" : "0"); 71 | } catch (IOException e) { 72 | Log.e(TAG, "Failed to write to " + GOODIX_FILE, e); 73 | } 74 | } 75 | 76 | void enable() { 77 | if (DEBUG) Log.d(TAG, "Enabling"); 78 | mExecutorService.submit(() -> { 79 | mSensorManager.registerListener(this, mSensor, SensorManager.SENSOR_DELAY_NORMAL); 80 | }); 81 | } 82 | 83 | void disable() { 84 | if (DEBUG) Log.d(TAG, "Disabling"); 85 | mExecutorService.submit(() -> { 86 | mSensorManager.unregisterListener(this, mSensor); 87 | // Ensure FP is left enabled 88 | setFPProximityState(/* isNear */ false); 89 | }); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /sepolicy/vendor/file_contexts: -------------------------------------------------------------------------------- 1 | # Binaries 2 | /(vendor|system/vendor)/bin/dashd u:object_r:dashd_exec:s0 3 | /(vendor|system/vendor)/bin/opf-service u:object_r:opf_exec:s0 4 | /(vendor|system/vendor)/bin/wifi-mac-generator u:object_r:wifi-mac-generator_exec:s0 5 | 6 | # Block devices 7 | /dev/block/platform/soc/1d84000\.ufshc/by-name/config u:object_r:frp_block_device:s0 8 | /dev/block/platform/soc/1d84000\.ufshc/by-name/engineering_cdt_[ab] u:object_r:custom_ab_block_device:s0 9 | /dev/block/platform/soc/1d84000\.ufshc/by-name/fw_4j1ed_[ab] u:object_r:custom_ab_block_device:s0 10 | /dev/block/platform/soc/1d84000\.ufshc/by-name/fw_4u1ea_[ab] u:object_r:custom_ab_block_device:s0 11 | /dev/block/platform/soc/1d84000\.ufshc/by-name/LOGO_[ab] u:object_r:custom_ab_block_device:s0 12 | /dev/block/platform/soc/1d84000\.ufshc/by-name/minidump u:object_r:rawdump_block_device:s0 13 | /dev/block/platform/soc/1d84000\.ufshc/by-name/oem_dycnvbk u:object_r:modem_efs_partition_device:s0 14 | /dev/block/platform/soc/1d84000\.ufshc/by-name/oem_stanvbk u:object_r:modem_efs_partition_device:s0 15 | /dev/block/platform/soc/1d84000\.ufshc/by-name/op1 u:object_r:op1_block_device:s0 16 | /dev/block/platform/soc/1d84000\.ufshc/by-name/op2 u:object_r:op2_block_device:s0 17 | /dev/block/platform/soc/1d84000\.ufshc/by-name/param u:object_r:param_block_device:s0 18 | /dev/block/platform/soc/1d84000\.ufshc/by-name/reserve1 u:object_r:reserve1_block_device:s0 19 | /dev/block/platform/soc/1d84000\.ufshc/by-name/reserve2 u:object_r:reserve2_block_device:s0 20 | /dev/block/platform/soc/1d84000\.ufshc/by-name/spunvm u:object_r:efs_boot_dev:s0 21 | 22 | # Devices 23 | /dev/dash u:object_r:dash_device:s0 24 | /dev/goodix_fp u:object_r:fingerprintd_device:s0 25 | /dev/opfeature u:object_r:opf_file:s0 26 | /dev/p73 u:object_r:nfc_device:s0 27 | /dev/pn553 u:object_r:nfc_device:s0 28 | 29 | # HALs 30 | /(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.3-service\.oneplus u:object_r:hal_fingerprint_default_exec:s0 31 | /(vendor|system/vendor)/bin/hw/android\.hardware\.light@2\.0-service\.oneplus_sdm845 u:object_r:hal_light_default_exec:s0 32 | /(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.1-service\.oneplus_sdm845 u:object_r:hal_lineage_livedisplay_qti_exec:s0 33 | /(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch@1\.0-service\.oneplus u:object_r:hal_lineage_touch_default_exec:s0 34 | /(vendor|system/vendor)/bin/hw/vendor\.oneplus\.hardware\.camera@1\.0-service u:object_r:hal_cameraHIDL_default_exec:s0 35 | /(vendor|system/vendor)/bin/hw/vendor\.oneplus\.hardware\.CameraMDMHIDL@1\.0-service u:object_r:hal_cameraHIDL_default_exec:s0 36 | /(vendor|system/vendor)/bin/hw/vendor\.oneplus\.hardware\.ifaa@2\.0-service u:object_r:hal_ifaa_default_exec:s0 37 | /(vendor|system/vendor)/bin/hw/vendor\.oneplus\.hardware\.param@1\.0-service u:object_r:hal_param_default_exec:s0 38 | 39 | # OP1, OP2 files 40 | /mnt/vendor/op1(/.*)? u:object_r:op1_file:s0 41 | /mnt/vendor/op2(/.*)? u:object_r:op2_file:s0 42 | 43 | # Sys files 44 | /sys/project_info(/.*)? u:object_r:sysfs_project_info:s0 45 | -------------------------------------------------------------------------------- /rootdir/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_MODULE := fstab.qcom 5 | LOCAL_MODULE_TAGS := optional 6 | LOCAL_MODULE_CLASS := ETC 7 | LOCAL_SRC_FILES := etc/fstab.qcom 8 | LOCAL_REQUIRED_MODULES := fstab.qcom_ramdisk 9 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC) 10 | include $(BUILD_PREBUILT) 11 | 12 | include $(CLEAR_VARS) 13 | LOCAL_MODULE := fstab.qcom_ramdisk 14 | LOCAL_MODULE_STEM := fstab.qcom 15 | LOCAL_MODULE_TAGS := optional 16 | LOCAL_MODULE_CLASS := ETC 17 | LOCAL_SRC_FILES := etc/fstab.qcom 18 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/first_stage_ramdisk 19 | include $(BUILD_PREBUILT) 20 | 21 | include $(CLEAR_VARS) 22 | LOCAL_MODULE := init.class_main.sh 23 | LOCAL_MODULE_TAGS := optional 24 | LOCAL_MODULE_CLASS := ETC 25 | LOCAL_SRC_FILES := bin/init.class_main.sh 26 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES) 27 | include $(BUILD_PREBUILT) 28 | 29 | include $(CLEAR_VARS) 30 | LOCAL_MODULE := init.oem.rc 31 | LOCAL_MODULE_TAGS := optional 32 | LOCAL_MODULE_CLASS := ETC 33 | LOCAL_SRC_FILES := etc/init.oem.rc 34 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw 35 | include $(BUILD_PREBUILT) 36 | 37 | include $(CLEAR_VARS) 38 | LOCAL_MODULE := init.qcom.class_core.sh 39 | LOCAL_MODULE_TAGS := optional 40 | LOCAL_MODULE_CLASS := ETC 41 | LOCAL_SRC_FILES := bin/init.qcom.class_core.sh 42 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES) 43 | include $(BUILD_PREBUILT) 44 | 45 | include $(CLEAR_VARS) 46 | LOCAL_MODULE := init.qcom.early_boot.sh 47 | LOCAL_MODULE_TAGS := optional 48 | LOCAL_MODULE_CLASS := ETC 49 | LOCAL_SRC_FILES := bin/init.qcom.early_boot.sh 50 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES) 51 | include $(BUILD_PREBUILT) 52 | 53 | include $(CLEAR_VARS) 54 | LOCAL_MODULE := init.qcom.post_boot.sh 55 | LOCAL_MODULE_TAGS := optional 56 | LOCAL_MODULE_CLASS := ETC 57 | LOCAL_SRC_FILES := bin/init.qcom.post_boot.sh 58 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES) 59 | include $(BUILD_PREBUILT) 60 | 61 | include $(CLEAR_VARS) 62 | LOCAL_MODULE := init.qcom.sh 63 | LOCAL_MODULE_TAGS := optional 64 | LOCAL_MODULE_CLASS := ETC 65 | LOCAL_SRC_FILES := bin/init.qcom.sh 66 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES) 67 | include $(BUILD_PREBUILT) 68 | 69 | include $(CLEAR_VARS) 70 | LOCAL_MODULE := init.qcom.rc 71 | LOCAL_MODULE_TAGS := optional 72 | LOCAL_MODULE_CLASS := ETC 73 | LOCAL_SRC_FILES := etc/init.qcom.rc 74 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw 75 | include $(BUILD_PREBUILT) 76 | 77 | include $(CLEAR_VARS) 78 | LOCAL_MODULE := init.recovery.qcom.rc 79 | LOCAL_MODULE_TAGS := optional 80 | LOCAL_MODULE_CLASS := ETC 81 | LOCAL_SRC_FILES := etc/init.recovery.qcom.rc 82 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 83 | include $(BUILD_PREBUILT) 84 | 85 | include $(CLEAR_VARS) 86 | LOCAL_MODULE := init.target.rc 87 | LOCAL_MODULE_TAGS := optional 88 | LOCAL_MODULE_CLASS := ETC 89 | LOCAL_SRC_FILES := etc/init.target.rc 90 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw 91 | include $(BUILD_PREBUILT) 92 | 93 | include $(CLEAR_VARS) 94 | LOCAL_MODULE := ueventd.qcom.rc 95 | LOCAL_MODULE_STEM := ueventd.rc 96 | LOCAL_MODULE_TAGS := optional 97 | LOCAL_MODULE_CLASS := ETC 98 | LOCAL_SRC_FILES := etc/ueventd.qcom.rc 99 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR) 100 | include $(BUILD_PREBUILT) 101 | -------------------------------------------------------------------------------- /audio/audio_output_policy.conf: -------------------------------------------------------------------------------- 1 | # List of profiles for the output device session where stream is routed. 2 | # A stream opened with the inputs attributes which match the "flags" and 3 | # "formats" as specified in the profile is routed to a device at 4 | # sample rate specified under "sampling_rates" and bit width under 5 | # "bit_width" and the topology extracted from the acdb data against 6 | # the "app_type". 7 | # 8 | # the flags and formats are specified using the strings corresponding to 9 | # enums in audio.h and audio_policy.h. They are concatenated with "|" 10 | # without space or "\n". 11 | # the flags and formats should match the ones in "audio_policy.conf" 12 | 13 | outputs { 14 | default { 15 | flags AUDIO_OUTPUT_FLAG_PRIMARY 16 | formats AUDIO_FORMAT_PCM_16_BIT 17 | sampling_rates 48000 18 | bit_width 16 19 | app_type 69937 20 | } 21 | proaudio { 22 | flags AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_RAW 23 | formats AUDIO_FORMAT_PCM_16_BIT 24 | sampling_rates 48000 25 | bit_width 16 26 | app_type 69943 27 | } 28 | voip_rx { 29 | flags AUDIO_OUTPUT_FLAG_VOIP_RX|AUDIO_OUTPUT_FLAG_DIRECT 30 | formats AUDIO_FORMAT_PCM_16_BIT 31 | sampling_rates 8000|16000|32000|48000 32 | bit_width 16 33 | app_type 69946 34 | } 35 | deep_buffer { 36 | flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER 37 | formats AUDIO_FORMAT_PCM_16_BIT 38 | sampling_rates 48000 39 | bit_width 16 40 | app_type 69936 41 | } 42 | direct_pcm_16 { 43 | flags AUDIO_OUTPUT_FLAG_DIRECT 44 | formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT 45 | sampling_rates 44100|48000|88200|96000|176400|192000 46 | bit_width 16 47 | app_type 69936 48 | } 49 | direct_pcm_24 { 50 | flags AUDIO_OUTPUT_FLAG_DIRECT 51 | formats AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT 52 | sampling_rates 44100|48000|88200|96000|176400|192000|352800|384000 53 | bit_width 24 54 | app_type 69940 55 | } 56 | direct_pcm_32 { 57 | flags AUDIO_OUTPUT_FLAG_DIRECT 58 | formats AUDIO_FORMAT_PCM_32_BIT 59 | sampling_rates 44100|48000|88200|96000|176400|192000|352800|384000 60 | bit_width 32 61 | app_type 69942 62 | } 63 | compress_passthrough { 64 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING|AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH 65 | formats AUDIO_FORMAT_DTS|AUDIO_FORMAT_DTS_HD|AUDIO_FORMAT_DSD 66 | sampling_rates 32000|44100|48000|88200|96000|176400|192000|352800 67 | bit_width 16 68 | app_type 69941 69 | } 70 | compress_offload_16 { 71 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING 72 | formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD|AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_WMA|AUDIO_FORMAT_WMA_PRO|AUDIO_FORMAT_VORBIS|AUDIO_FORMAT_AAC_ADTS_LC|AUDIO_FORMAT_AAC_ADTS_HE_V1|AUDIO_FORMAT_AAC_ADTS_HE_V2 73 | sampling_rates 44100|48000|88200|96000|176400|192000 74 | bit_width 16 75 | app_type 69936 76 | } 77 | compress_offload_24 { 78 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING 79 | formats AUDIO_FORMAT_PCM_24_BIT_OFFLOAD|AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_VORBIS|AUDIO_FORMAT_WMA|AUDIO_FORMAT_WMA_PRO 80 | sampling_rates 44100|48000|88200|96000|176400|192000 81 | bit_width 24 82 | app_type 69940 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /configs/gps/xtwifi.conf: -------------------------------------------------------------------------------- 1 | #GTP AP Project client core config file 2 | # 3 | #GENERAL DESCRIPTION 4 | #This is used by client core 5 | # 6 | #Copyright (c) 2012-2014 Qualcomm Atheros, Inc. 7 | #All Rights Reserved. 8 | #Qualcomm Atheros Confidential and Proprietary. 9 | # 10 | #Copyright (c) 2017 Qualcomm Technologies, Inc. 11 | #All Rights Reserved. 12 | #Confidential and Proprietary - Qualcomm Technologies, Inc. 13 | 14 | ############################################################################## 15 | # non-IOT devices configuration items # 16 | # For non-IOT devices, configure below configuration items # 17 | # according to the app note: 80-NK218-1 and remove the configuration items # 18 | # in section of "IOT devices configuration items". # 19 | ############################################################################## 20 | 21 | # ASN URI v2 to be used by some GTP AP modules that 22 | # need to run with ASN URI v2 protocol. 23 | XT_SERVER_ROOT_URL = https://gtp1.izatcloud.net:443/uds/v2 24 | 25 | # ASN URI v3 to be used by GTP AP modules that 26 | # can support ASN URI v3 protocol. 27 | XT_SERVER_ROOT_URL_V3 = https://gtp1.izatcloud.net:443/uds/v3 28 | 29 | # size, in bytes, of the cache on device 30 | SIZE_BYTE_TOTAL_CACHE = 5000000 31 | 32 | ############################################################################## 33 | # IOT devices configuration items # 34 | # For IOT devices, configure below configuration items # 35 | # according to the app note and remove the configuration items in section of # 36 | # "non-IOT devices configuration items". # 37 | ############################################################################## 38 | 39 | # ASN URI v3 to be used by GTP AP modules that 40 | # can support ASN URI v3 protocol. 41 | # XT_SERVER_ROOT_URL_V3 = https://gtpma1.izatcloud.net:443/uds/v3 42 | 43 | # 3: Wi-Fi APDB injection via Izat SDK. GTP server is not accessed 44 | # for any GTP requests, instead notification is sent to Izat SDK. 45 | # WiFi crowdsourcing module is disabled. 46 | # 4: Wi-Fi APDB injection via Izat SDK. GTP server is not accessed 47 | # for any GTP requests, instead notification is sent to Izat SDK. 48 | # WiFi crowdsourcing module is active, also accessed via Izat SDK. 49 | # GTP_AP_MODE = 4 50 | 51 | # 1: MP cell features relies on GTP AP for either download or upload 52 | # 0: MP cell features does not rely on GTP AP 53 | # GTP_AP_NEEDED_BY_MP_CELL = 1 54 | 55 | ############################################################################## 56 | # Configuration items applicable to all devices # 57 | ############################################################################## 58 | 59 | # Log verbosity control for most of the GTP WiFi system, including native and 60 | # Java componenets 61 | # OFF = 0, ERROR = 1, WARNING = 2, INFO = 3, DEBUG = 4, VERBOSE = 5, ALL = 100 62 | DEBUG_GLOBAL_LOG_LEVEL = 2 63 | 64 | # this is used at the server side to distinguish uploads from different maker/model 65 | # default "Qualcomm" 66 | OEM_ID_IN_REQUEST_TO_SERVER = "Qualcomm" 67 | 68 | # this is used at the server side to distinguish uploads from different maker/model 69 | # default "UNKNOWN" 70 | MODEL_ID_IN_REQUEST_TO_SERVER = "UNKNOWN" 71 | 72 | ############################################################################## 73 | # Qualcomm Network Location Provider config # 74 | ############################################################################## 75 | 76 | # Accuracy Threshold for NLP position. Position exceeds thsi threshold will be filtered out. 77 | # Default is 25000 meters. 78 | LARGE_ACCURACY_THRESHOLD_TO_FILTER_NLP_POSITION = 25000 79 | -------------------------------------------------------------------------------- /livedisplay/DisplayModes.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 "DisplayModesService" 18 | 19 | #include "DisplayModes.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* kModePath = 30 | "/sys/devices/platform/soc/ae00000.qcom,mdss_mdp/main_display/display_mode"; 31 | static constexpr const char* kDefaultPath = "/data/vendor/display/default_display_mode"; 32 | 33 | const std::map DisplayModes::kModeMap = { 34 | {0, {"Standard", "default"}}, 35 | {1, {"sRGB", "srgb"}}, 36 | {2, {"DCI P3", "dci-p3"}}, 37 | {3, {"Wide Color", "widecolor"}}, 38 | }; 39 | 40 | DisplayModes::DisplayModes() : mDefaultModeId(0) { 41 | std::ifstream defaultFile(kDefaultPath); 42 | std::string value; 43 | 44 | defaultFile >> value; 45 | LOG(DEBUG) << "Default file read result " << value << " fail " << defaultFile.fail(); 46 | if (defaultFile.fail()) { 47 | return; 48 | } 49 | 50 | for (const auto& entry : kModeMap) { 51 | if (value == entry.second.value) { 52 | mDefaultModeId = entry.first; 53 | break; 54 | } 55 | } 56 | 57 | setDisplayMode(mDefaultModeId, false); 58 | } 59 | 60 | // Methods from ::vendor::lineage::livedisplay::V2_1::IDisplayModes follow. 61 | Return DisplayModes::getDisplayModes(getDisplayModes_cb resultCb) { 62 | std::vector modes; 63 | for (const auto& entry : kModeMap) { 64 | modes.push_back({entry.first, entry.second.name}); 65 | } 66 | resultCb(modes); 67 | return Void(); 68 | } 69 | 70 | Return DisplayModes::getCurrentDisplayMode(getCurrentDisplayMode_cb resultCb) { 71 | int32_t currentModeId = mDefaultModeId; 72 | std::ifstream modeFile(kModePath); 73 | std::string value; 74 | 75 | modeFile >> value; 76 | if (!modeFile.fail()) { 77 | for (const auto& entry : kModeMap) { 78 | if (value == entry.second.value) { 79 | currentModeId = entry.first; 80 | break; 81 | } 82 | } 83 | } 84 | resultCb({currentModeId, kModeMap.at(currentModeId).name}); 85 | return Void(); 86 | } 87 | 88 | Return DisplayModes::getDefaultDisplayMode(getDefaultDisplayMode_cb resultCb) { 89 | resultCb({mDefaultModeId, kModeMap.at(mDefaultModeId).name}); 90 | return Void(); 91 | } 92 | 93 | Return DisplayModes::setDisplayMode(int32_t modeID, bool makeDefault) { 94 | const auto iter = kModeMap.find(modeID); 95 | if (iter == kModeMap.end()) { 96 | return false; 97 | } 98 | std::ofstream modeFile(kModePath); 99 | modeFile << iter->second.value; 100 | if (modeFile.fail()) { 101 | return false; 102 | } 103 | 104 | if (makeDefault) { 105 | std::ofstream defaultFile(kDefaultPath); 106 | defaultFile << iter->second.value; 107 | if (defaultFile.fail()) { 108 | return false; 109 | } 110 | mDefaultModeId = iter->first; 111 | } 112 | return true; 113 | } 114 | 115 | } // namespace implementation 116 | } // namespace V2_1 117 | } // namespace livedisplay 118 | } // namespace lineage 119 | } // namespace vendor 120 | -------------------------------------------------------------------------------- /rootdir/etc/fstab.qcom: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2018, 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 | # Android fstab file. 29 | # The filesystem that contains the filesystem checker binary (typically /system) cannot 30 | # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK 31 | 32 | #TODO: Add 'check' as fs_mgr_flags with data partition. 33 | # Currently we dont have e2fsck compiled. So fs check would failed. 34 | 35 | # 36 | /dev/block/by-name/system /system ext4 ro,barrier=1,discard wait,slotselect,avb,first_stage_mount 37 | /dev/block/by-name/vendor /vendor ext4 ro,barrier=1,discard wait,slotselect,avb,first_stage_mount 38 | /dev/block/bootdevice/by-name/op2 /mnt/vendor/op2 ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check 39 | /dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,check,fileencryption=ice,quota,reservedsize=512M 40 | /dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait,slotselect 41 | /dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait,slotselect 42 | /dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait 43 | /dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait,slotselect 44 | /devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto 45 | # Need to have this entry in here even though the mount point itself is no longer needed. 46 | # The update_engine code looks for this entry in order to determine the boot device address 47 | # and fails if it does not find it. 48 | /dev/block/bootdevice/by-name/misc /misc emmc defaults defaults 49 | /dev/block/zram0 none swap defaults zramsize=1073741824 50 | -------------------------------------------------------------------------------- /rro_overlays/WifiOverlay/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 22 | 23 | 24 | 28 | true 29 | 30 | 34 | true 35 | 36 | 37 | 32 38 | 39 | 40 | false 41 | 42 | 43 | true 44 | 45 | 46 | true 47 | 48 | 49 | true 50 | 51 | 52 | true 53 | 54 | 55 | true 56 | 57 | 58 | true 59 | 60 | 61 | true 62 | 63 | 64 | 1000 65 | 66 | 67 | true 68 | 69 | 70 | true 71 | 72 | -------------------------------------------------------------------------------- /compatibility_matrix.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.frameworks.schedulerservice 31 | 1.0 32 | 33 | ISchedulingPolicyService 34 | default 35 | 36 | 37 | 38 | android.frameworks.sensorservice 39 | 1.0 40 | 41 | ISensorManager 42 | default 43 | 44 | 45 | 46 | android.hidl.allocator 47 | 1.0 48 | 49 | IAllocator 50 | ashmem 51 | 52 | 53 | 54 | android.hidl.manager 55 | 1.0 56 | 57 | IServiceManager 58 | default 59 | 60 | 61 | 62 | android.hidl.memory 63 | 1.0 64 | 65 | IMapper 66 | ashmem 67 | 68 | 69 | 70 | android.hidl.token 71 | 1.0 72 | 73 | ITokenManager 74 | default 75 | 76 | 77 | 78 | android.system.wifi.keystore 79 | 1.0 80 | 81 | IKeystore 82 | default 83 | 84 | 85 | 86 | vendor.qti.hardware.qccsyshal 87 | 1.0 88 | 89 | IQccsyshal 90 | qccsyshal 91 | 92 | 93 | 94 | vendor.qti.hardware.sigma_miracast 95 | 1.0 96 | 97 | Isigma_miracast 98 | sigmahal 99 | 100 | 101 | 102 | vendor.qti.hardware.wifi.keystore 103 | 1.0 104 | 105 | IKeystoreExt 106 | default 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /audio/audio_tuning_mixer_tavil.txt: -------------------------------------------------------------------------------- 1 | #ANC_TEST_P_PATH_MIC_STEREO Capture 2 | acdb_dev_id:85 3 | !Capture 4 | Txdevice:0 5 | 6 | enable 7 | AIF1_CAP Mixer SLIM TX7:1 8 | AIF1_CAP Mixer SLIM TX8:1 9 | CDC_IF TX7 MUX:DEC7 10 | ADC MUX7:DMIC 11 | DMIC MUX7:DMIC4 12 | CDC_IF TX8 MUX:DEC8 13 | ADC MUX8:DMIC 14 | DMIC MUX8:DMIC0 15 | SLIM_0_TX Channels:Two 16 | MultiMedia1 Mixer SLIM_0_TX:1 17 | 18 | disable 19 | MultiMedia1 Mixer SLIM_0_TX:0 20 | AIF1_CAP Mixer SLIM TX7:0 21 | AIF1_CAP Mixer SLIM TX8:0 22 | CDC_IF TX7 MUX:ZERO 23 | CDC_IF TX8 MUX:ZERO 24 | DMIC MUX7:ZERO 25 | DMIC MUX8:ZERO 26 | 27 | #ANC_TEST_S_PATH_MIC_STEREO Capture 28 | acdb_dev_id:88 29 | !Capture 30 | Txdevice:0 31 | 32 | enable 33 | AIF1_CAP Mixer SLIM TX7:1 34 | AIF1_CAP Mixer SLIM TX8:1 35 | CDC_IF TX7 MUX:DEC7 36 | ADC MUX7:ANC_FB_TUNE1 37 | ADC MUX10:DMIC 38 | DMIC MUX10:DMIC0 39 | CDC_IF TX8 MUX:DEC8 40 | ADC MUX8:ANC_FB_TUNE2 41 | ADC MUX12:DMIC 42 | DMIC MUX12:DMIC0 43 | ANC0 FB MUX:ANC_IN_EAR_SPKR 44 | ANC OUT EAR SPKR Enable Switch:1 45 | SLIM_0_TX Channels:Two 46 | MultiMedia1 Mixer SLIM_0_TX:1 47 | 48 | disable 49 | MultiMedia1 Mixer SLIM_0_TX:0 50 | AIF1_CAP Mixer SLIM TX7:0 51 | AIF1_CAP Mixer SLIM TX8:0 52 | CDC_IF TX7 MUX:ZERO 53 | CDC_IF TX8 MUX:ZERO 54 | ADC MUX7:DMIC 55 | ADC MUX8:DMIC 56 | DMIC MUX10:ZERO 57 | DMIC MUX12:ZERO 58 | ANC0 FB MUX:ZERO 59 | ANC OUT EAR SPKR Enable Switch:0 60 | 61 | 62 | #ANC_TEST_E_PATH_MIC_STEREO Capture 63 | acdb_dev_id:91 64 | !Capture 65 | Txdevice:0 66 | 67 | enable 68 | AIF1_CAP Mixer SLIM TX7:1 69 | AIF1_CAP Mixer SLIM TX8:1 70 | CDC_IF TX7 MUX:DEC7 71 | ADC MUX7:ANC_FB_TUNE1 72 | ADC MUX10:DMIC 73 | DMIC MUX10:DMIC4 74 | CDC_IF TX8 MUX:DEC8 75 | ADC MUX8:ANC_FB_TUNE2 76 | ADC MUX12:DMIC 77 | DMIC MUX12:DMIC4 78 | ANC0 FB MUX:ANC_IN_EAR_SPKR 79 | ANC OUT EAR SPKR Enable Switch:1 80 | SLIM_0_TX Channels:Two 81 | MultiMedia1 Mixer SLIM_0_TX:1 82 | 83 | disable 84 | MultiMedia1 Mixer SLIM_0_TX:0 85 | AIF1_CAP Mixer SLIM TX7:0 86 | AIF1_CAP Mixer SLIM TX8:0 87 | CDC_IF TX7 MUX:ZERO 88 | CDC_IF TX8 MUX:ZERO 89 | ADC MUX7:DMIC 90 | ADC MUX8:DMIC 91 | DMIC MUX10:ZERO 92 | DMIC MUX12:ZERO 93 | ANC0 FB MUX:ZERO 94 | ANC OUT EAR SPKR Enable Switch:0 95 | 96 | 97 | #ANC_TEST_S_PATH_HANDSET_SPKR_ANC_MONO 98 | acdb_dev_id:86 99 | !Playback 100 | Rxdevice:0 101 | 102 | enable 103 | ANC Function:ON 104 | SLIM RX0 MUX:AIF1_PB 105 | SLIM_0_RX Channels:One 106 | RX INT7_1 MIX1 INP0:RX0 107 | SpkrLeft SWR DAC_Port Switch:1 108 | ANC Slot:7 109 | ANC OUT EAR SPKR Enable Switch:1 110 | ANC SPKR PA Enable Switch:1 111 | SpkrLeft WSA PA Gain:G_6_DB 112 | SLIMBUS_0_RX Audio Mixer MultiMedia1:1 113 | 114 | disable 115 | SLIMBUS_0_RX Audio Mixer MultiMedia1:0 116 | SpkrLeft WSA PA Gain:G_0_DB 117 | ANC SPKR PA Enable Switch:0 118 | ANC OUT EAR SPKR Enable Switch:0 119 | SpkrLeft SWR DAC_Port Switch:0 120 | ANC Slot:0 121 | SLIM RX0 MUX:ZERO 122 | RX INT7_1 MIX1 INP0:ZERO 123 | ANC Function:OFF 124 | 125 | #ANC_TEST_E_PATH_HANDSET_SPKR_ANC_MONO 126 | acdb_dev_id:89 127 | !Playback 128 | Rxdevice:0 129 | 130 | enable 131 | ANC Function:ON 132 | SLIM RX0 MUX:AIF1_PB 133 | SLIM_0_RX Channels:One 134 | RX INT7_1 MIX1 INP0:RX0 135 | SpkrLeft SWR DAC_Port Switch:1 136 | ANC Slot:8 137 | ANC OUT EAR SPKR Enable Switch:1 138 | ANC SPKR PA Enable Switch:1 139 | SpkrLeft WSA PA Gain:G_6_DB 140 | SLIMBUS_0_RX Audio Mixer MultiMedia1:1 141 | 142 | disable 143 | SLIMBUS_0_RX Audio Mixer MultiMedia1:0 144 | SpkrLeft WSA PA Gain:G_0_DB 145 | ANC SPKR PA Enable Switch:0 146 | ANC OUT EAR SPKR Enable Switch:0 147 | SpkrLeft SWR DAC_Port Switch:0 148 | ANC Slot:0 149 | SLIM RX0 MUX:ZERO 150 | RX INT7_1 MIX1 INP0:ZERO 151 | ANC Function:OFF 152 | 153 | #RAS_TEST_SPKR_PHONE_SPKR_STEREO 154 | acdb_dev_id:136 155 | !Playback 156 | Rxdevice:0 157 | 158 | enable 159 | SLIM RX0 MUX:AIF1_PB 160 | SLIM RX1 MUX:AIF1_PB 161 | CDC_IF RX0 MUX:SLIM RX0 162 | CDC_IF RX1 MUX:SLIM RX1 163 | SLIM_0_RX Channels:Two 164 | RX INT7_1 MIX1 INP0:RX0 165 | RX INT8_1 MIX1 INP0:RX1 166 | COMP7 Switch:1 167 | COMP8 Switch:1 168 | SpkrLeft COMP Switch:1 169 | SpkrRight COMP Switch:1 170 | SpkrLeft BOOST Switch:1 171 | SpkrRight BOOST Switch:1 172 | SpkrLeft VISENSE Switch:1 173 | SpkrRight VISENSE Switch:1 174 | SpkrLeft SWR DAC_Port Switch:1 175 | SpkrRight SWR DAC_Port Switch:1 176 | SLIMBUS_0_RX Audio Mixer MultiMedia1:1 177 | 178 | disable 179 | SLIM RX0 MUX:ZERO 180 | SLIM RX1 MUX:ZERO 181 | RX INT7_1 MIX1 INP0:ZERO 182 | RX INT8_1 MIX1 INP0:ZERO 183 | COMP7 Switch:0 184 | COMP8 Switch:0 185 | SpkrLeft COMP Switch:0 186 | SpkrRight COMP Switch:0 187 | SpkrLeft BOOST Switch:0 188 | SpkrRight BOOST Switch:0 189 | SpkrLeft VISENSE Switch:0 190 | SpkrRight VISENSE Switch:0 191 | SpkrLeft SWR DAC_Port Switch:0 192 | SpkrRight SWR DAC_Port Switch:0 193 | SLIMBUS_0_RX Audio Mixer MultiMedia1:0 194 | -------------------------------------------------------------------------------- /config.fs: -------------------------------------------------------------------------------- 1 | [AID_VENDOR_QTI_DIAG] 2 | value:2901 3 | 4 | [AID_VENDOR_QDSS] 5 | value:2902 6 | 7 | [AID_VENDOR_RFS] 8 | value:2903 9 | 10 | [AID_VENDOR_RFS_SHARED] 11 | value:2904 12 | 13 | [AID_VENDOR_ADPL_ODL] 14 | value:2905 15 | 16 | [AID_VENDOR_QRTR] 17 | value:2906 18 | 19 | [AID_VENDOR_THERMAL] 20 | value:2907 21 | 22 | [AID_VENDOR_FASTRPC] 23 | value:2908 24 | 25 | [AID_VENDOR_QTR] 26 | value:2909 27 | 28 | [bt_firmware/] 29 | mode: 0771 30 | user: AID_SYSTEM 31 | group: AID_SYSTEM 32 | caps: 0 33 | 34 | [dsp/] 35 | mode: 0771 36 | user: AID_MEDIA 37 | group: AID_MEDIA 38 | caps: 0 39 | 40 | [firmware/] 41 | mode: 0771 42 | user: AID_SYSTEM 43 | group: AID_SYSTEM 44 | caps: 0 45 | 46 | [firmware/image/*] 47 | mode: 0771 48 | user: AID_SYSTEM 49 | group: AID_SYSTEM 50 | caps: 0 51 | 52 | [persist/] 53 | mode: 0771 54 | user: AID_SYSTEM 55 | group: AID_SYSTEM 56 | caps: 0 57 | 58 | [system/bin/cnss-daemon] 59 | mode: 0755 60 | user: AID_BLUETOOTH 61 | group: AID_BLUETOOTH 62 | caps: NET_BIND_SERVICE 63 | 64 | [system/bin/pd-mapper] 65 | mode: 0755 66 | user: AID_SYSTEM 67 | group: AID_SYSTEM 68 | caps: NET_BIND_SERVICE 69 | 70 | [system/bin/pm-service] 71 | mode: 0755 72 | user: AID_SYSTEM 73 | group: AID_SYSTEM 74 | caps: NET_BIND_SERVICE 75 | 76 | [system/vendor/bin/cnd] 77 | mode: 0755 78 | user: AID_SYSTEM 79 | group: AID_SYSTEM 80 | caps: NET_BIND_SERVICE NET_ADMIN BLOCK_SUSPEND 81 | 82 | [system/vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti] 83 | mode: 0755 84 | user: AID_SYSTEM 85 | group: AID_SYSTEM 86 | caps: NET_ADMIN BLOCK_SUSPEND 87 | 88 | [system/vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti-lazy] 89 | mode: 0755 90 | user: AID_SYSTEM 91 | group: AID_SYSTEM 92 | caps: NET_ADMIN BLOCK_SUSPEND 93 | 94 | [system/vendor/bin/ims_rtp_daemon] 95 | mode: 0755 96 | user: AID_RADIO 97 | group: AID_RADIO 98 | caps: NET_BIND_SERVICE 99 | 100 | [system/vendor/bin/imsdatadaemon] 101 | mode: 0755 102 | user: AID_RADIO 103 | group: AID_RADIO 104 | caps: NET_BIND_SERVICE 105 | 106 | [system/vendor/bin/imsrcsd] 107 | mode: 0755 108 | user: AID_RADIO 109 | group: AID_RADIO 110 | caps: NET_BIND_SERVICE WAKE_ALARM BLOCK_SUSPEND 111 | 112 | [system/vendor/bin/loc_launcher] 113 | mode: 0755 114 | user: AID_GPS 115 | group: AID_GPS 116 | caps: SETGID SETUID 117 | 118 | [system/vendor/bin/pd-mapper] 119 | mode: 0755 120 | user: AID_SYSTEM 121 | group: AID_SYSTEM 122 | caps: NET_BIND_SERVICE 123 | 124 | [system/vendor/bin/pm-service] 125 | mode: 0755 126 | user: AID_SYSTEM 127 | group: AID_SYSTEM 128 | caps: NET_BIND_SERVICE 129 | 130 | [system/vendor/bin/slim_daemon] 131 | mode: 0755 132 | user: AID_GPS 133 | group: AID_GPS 134 | caps: NET_BIND_SERVICE 135 | 136 | [system/vendor/bin/wcnss_filter] 137 | mode: 0755 138 | user: AID_BLUETOOTH 139 | group: AID_BLUETOOTH 140 | caps: BLOCK_SUSPEND 141 | 142 | [vendor/bin/cnd] 143 | mode: 0755 144 | user: AID_SYSTEM 145 | group: AID_SYSTEM 146 | caps: NET_BIND_SERVICE NET_ADMIN BLOCK_SUSPEND 147 | 148 | [vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti] 149 | mode: 0755 150 | user: AID_BLUETOOTH 151 | group: AID_BLUETOOTH 152 | caps: NET_ADMIN BLOCK_SUSPEND 153 | 154 | [vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti-lazy] 155 | mode: 0755 156 | user: AID_BLUETOOTH 157 | group: AID_BLUETOOTH 158 | caps: NET_ADMIN BLOCK_SUSPEND 159 | 160 | [vendor/bin/ims_rtp_daemon] 161 | mode: 0755 162 | user: AID_RADIO 163 | group: AID_RADIO 164 | caps: NET_BIND_SERVICE 165 | 166 | [vendor/bin/imsdaemon] 167 | mode: 0755 168 | user: AID_RADIO 169 | group: AID_RADIO 170 | caps: NET_BIND_SERVICE WAKE_ALARM BLOCK_SUSPEND 171 | 172 | [vendor/bin/imsdatadaemon] 173 | mode: 0755 174 | user: AID_RADIO 175 | group: AID_RADIO 176 | caps: NET_BIND_SERVICE 177 | 178 | [vendor/bin/imsrcsd] 179 | mode: 0755 180 | user: AID_RADIO 181 | group: AID_RADIO 182 | caps: NET_BIND_SERVICE WAKE_ALARM BLOCK_SUSPEND 183 | 184 | [vendor/bin/loc_launcher] 185 | mode: 0755 186 | user: AID_GPS 187 | group: AID_GPS 188 | caps: SETGID SETUID 189 | 190 | [vendor/bin/pd-mapper] 191 | mode: 0755 192 | user: AID_SYSTEM 193 | group: AID_SYSTEM 194 | caps: NET_BIND_SERVICE 195 | 196 | [vendor/bin/pm-service] 197 | mode: 0755 198 | user: AID_SYSTEM 199 | group: AID_SYSTEM 200 | caps: NET_BIND_SERVICE 201 | 202 | [vendor/bin/sensors.qti] 203 | mode: 0755 204 | user: AID_SYSTEM 205 | group: AID_SYSTEM 206 | caps: NET_BIND_SERVICE 207 | 208 | [vendor/bin/slim_daemon] 209 | mode: 0755 210 | user: AID_GPS 211 | group: AID_GPS 212 | caps: NET_BIND_SERVICE 213 | 214 | [vendor/bin/wcnss_filter] 215 | mode: 0755 216 | user: AID_BLUETOOTH 217 | group: AID_BLUETOOTH 218 | caps: BLOCK_SUSPEND 219 | 220 | [vendor/bin/xtwifi-client] 221 | mode: 0755 222 | user: AID_GPS 223 | group: AID_GPS 224 | caps: NET_BIND_SERVICE WAKE_ALARM BLOCK_SUSPEND 225 | 226 | [vendor/firmware_mnt/image/*] 227 | mode: 0771 228 | user: AID_SYSTEM 229 | group: AID_SYSTEM 230 | caps: 0 231 | -------------------------------------------------------------------------------- /configs/privapp-permissions-qti.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /gpt-utils/sparse_crc32.cpp: -------------------------------------------------------------------------------- 1 | /*- 2 | * COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or 3 | * code or tables extracted from it, as desired without restriction. 4 | */ 5 | 6 | /* 7 | * First, the polynomial itself and its table of feedback terms. The 8 | * polynomial is 9 | * X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 10 | * 11 | * Note that we take it "backwards" and put the highest-order term in 12 | * the lowest-order bit. The X^32 term is "implied"; the LSB is the 13 | * X^31 term, etc. The X^0 term (usually shown as "+1") results in 14 | * the MSB being 1 15 | * 16 | * Note that the usual hardware shift register implementation, which 17 | * is what we're using (we're merely optimizing it by doing eight-bit 18 | * chunks at a time) shifts bits into the lowest-order term. In our 19 | * implementation, that means shifting towards the right. Why do we 20 | * do it this way? Because the calculated CRC must be transmitted in 21 | * order from highest-order term to lowest-order term. UARTs transmit 22 | * characters in order from LSB to MSB. By storing the CRC this way 23 | * we hand it to the UART in the order low-byte to high-byte; the UART 24 | * sends each low-bit to hight-bit; and the result is transmission bit 25 | * by bit from highest- to lowest-order term without requiring any bit 26 | * shuffling on our part. Reception works similarly 27 | * 28 | * The feedback terms table consists of 256, 32-bit entries. Notes 29 | * 30 | * The table can be generated at runtime if desired; code to do so 31 | * is shown later. It might not be obvious, but the feedback 32 | * terms simply represent the results of eight shift/xor opera 33 | * tions for all combinations of data and CRC register values 34 | * 35 | * The values must be right-shifted by eight bits by the "updcrc 36 | * logic; the shift must be unsigned (bring in zeroes). On some 37 | * hardware you could probably optimize the shift in assembler by 38 | * using byte-swap instructions 39 | * polynomial $edb88320 40 | * 41 | * 42 | * CRC32 code derived from work by Gary S. Brown. 43 | */ 44 | 45 | /* Code taken from FreeBSD 8 */ 46 | #include 47 | #include 48 | 49 | static uint32_t crc32_tab[] = { 50 | 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 51 | 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 52 | 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 53 | 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 54 | 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 55 | 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 56 | 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 57 | 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 58 | 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 59 | 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 60 | 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 61 | 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 62 | 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 63 | 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 64 | 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 65 | 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 66 | 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 67 | 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 68 | 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 69 | 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 70 | 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 71 | 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 72 | 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 73 | 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 74 | 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 75 | 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 76 | 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 77 | 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 78 | 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 79 | 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 80 | 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 81 | 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d}; 82 | 83 | /* 84 | * A function that calculates the CRC-32 based on the table above is 85 | * given below for documentation purposes. An equivalent implementation 86 | * of this function that's actually used in the kernel can be found 87 | * in sys/libkern.h, where it can be inlined. 88 | */ 89 | 90 | uint32_t sparse_crc32(uint32_t crc_in, const void* buf, size_t size) { 91 | const uint8_t* p = reinterpret_cast(buf); 92 | uint32_t crc; 93 | 94 | crc = crc_in ^ ~0U; 95 | while (size--) crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8); 96 | return crc ^ ~0U; 97 | } 98 | -------------------------------------------------------------------------------- /configs/gps/apdr.conf: -------------------------------------------------------------------------------- 1 | # AP DR SENSOR Configuration file 2 | # 3 | # SENSOR_SERVICE options are one of below 4 | # accel,gyro,vehicle_accel,vehicle_gyro,pedometer,vehicle_odometry,accel_temp, 5 | # gyro_temp,baro,mag_calib,mag_uncalib,amd,rmd. 6 | # 7 | # SENSOR_PROVIDER options is one of -- default,native,ssc,samlite. 8 | # 9 | # SENSOR_RATE = 1~100 (Hz) 10 | # 11 | # SENSOR_SAMPLES = 1~N 12 | # 13 | # SENSOR_STATISTIC_ENABLED 14 | # bit 0: Diag Print Enabled 15 | # bit 1: Adb Print Enabled 16 | # SENSOR_STATISTIC_PRINT_COUNT 17 | # Skip Number of Print 18 | # 19 | # QDR_DYNAMIC_LOADING = 1~3 20 | # Configure QDR library to be loaded 21 | # 1: QDR3 22 | # 2: QDR2-GYRO 23 | # 3: QDR2-DWT 24 | # 25 | # 26 | 27 | ###################################### 28 | # # 29 | # QDR3 Configuration # 30 | # # 31 | # For QDR3, # 32 | # comment default configuration above# 33 | # and # 34 | # uncomment below configuration # 35 | # settings. # 36 | # # 37 | ###################################### 38 | # 39 | SENSOR_SERVICE = accel 40 | SENSOR_PROVIDER = native 41 | SENSOR_RATE = 10 42 | SENSOR_SAMPLES = 10 43 | # 44 | SENSOR_SERVICE = vehicle_speed 45 | SENSOR_PROVIDER = native 46 | SENSOR_RATE = 100 47 | SENSOR_SAMPLES = 1 48 | # 49 | SENSOR_SERVICE = gyro 50 | SENSOR_PROVIDER = native 51 | SENSOR_RATE = 10 52 | SENSOR_SAMPLES = 10 53 | # 54 | SENSOR_SERVICE = vehicle_gear 55 | SENSOR_PROVIDER = native 56 | SENSOR_RATE = 100 57 | SENSOR_SAMPLES = 1 58 | # 59 | SENSOR_SERVICE = accel_temp 60 | SENSOR_PROVIDER = native 61 | SENSOR_RATE = 1 62 | SENSOR_SAMPLES = 1 63 | # 64 | # 65 | ##Configure QDR library to be loaded 1: QDR3 2: QDR2-GYRO 3: QDR2-DWS 66 | QDR_DYNAMIC_LOADING = 1 67 | ##Specify CAN sensor type: Valid Options: 14(ODO), 2(ODO_DWT), 3(ODO_DWS) 68 | QDR_CAN_TYPE = 14 69 | ##Reporting offset before PPS boundary 70 | QDR_REPORTING_OFFSET = 20 71 | # 72 | 73 | ##Vehicle Sensor Configuration (CAN data availability) 74 | ##QDR_VEH_SENSOR_CONFIG: 75 | ## 0: VEHICLE_SENSOR_PRESENT - Vehicle Sensor is available (DEFAULT) 76 | ## 1: VEHICLE_SENSOR_OPTIONAL - Vehicle Sensor may or may not be present. 77 | #QDR_VEH_SENSOR_CONFIG = 0 78 | 79 | ##Select Wheel set (E.g.: Front two wheels, Rear two wheels OR All four wheels) 80 | ##To be used for differential wheel tick OR speed service. 81 | ##This configuration is applicable when QDR_CAN_TYPE configured as 82 | ##ODO_DWS(3) or ODO_DWT(2). 83 | ##Value "0": Use Front two wheels 84 | ##Value "1": Use Rear two wheels 85 | ##Value "2": Use All four wheels 86 | #QG_DRIVE_WHEEL_FW_RW_AW = 2 87 | ##Max Wheel tick value above which wheel tick rolls over 88 | ##This configuration is applicable when QDR_CAN_TYPE configured as ODO_DWT(2) 89 | #QG_DWT_MAX_WHEEL_TICK_COUNT = 255.0 90 | ##Configure Wheel constant for DWT based below equation 91 | ##(2 * pi * WHEEL_RADIUS / Pulses Per revolution) 92 | ##This configuration is applicable when QDR_CAN_TYPE configured as ODO_DWT(2) 93 | #QG_DWT_WHEEL_CONSTANT = 0.044 94 | # 95 | 96 | ###################################### 97 | # # 98 | # QDR2-DWT Configuration # 99 | # # 100 | # For QDR2-DWT, # 101 | # comment default configuration above# 102 | # and # 103 | # uncomment below configuration # 104 | # settings. # 105 | # # 106 | ###################################### 107 | # 108 | #SENSOR_SERVICE = vehicle_speed 109 | #SENSOR_PROVIDER = native 110 | #SENSOR_RATE = 100 111 | #SENSOR_SAMPLES = 1 112 | #SENSOR_STATISTIC_ENABLED = 3 113 | #SENSOR_STATISTIC_PRINT_COUNT = 50 114 | # 115 | #SENSOR_SERVICE = vehicle_dws 116 | #SENSOR_PROVIDER = native 117 | #SENSOR_RATE = 100 118 | #SENSOR_SAMPLES = 1 119 | #SENSOR_STATISTIC_ENABLED = 3 120 | #SENSOR_STATISTIC_PRINT_COUNT = 50 121 | # 122 | #SENSOR_SERVICE = vehicle_gear 123 | #SENSOR_PROVIDER = native 124 | #SENSOR_RATE = 100 125 | #SENSOR_SAMPLES = 1 126 | #SENSOR_STATISTIC_ENABLED = 3 127 | #SENSOR_STATISTIC_PRINT_COUNT = 50 128 | # 129 | #GNSS_POS_STATISTIC_ENABLED = 3 130 | #GNSS_POS_STATISTIC_PRNTCNT = 10 131 | #GNSS_MSR_STATISTIC_ENABLED = 3 132 | #GNSS_MSR_STATISTIC_PRNTCNT = 10 133 | # 134 | ##Configure QDR library to be loaded 1: QDR3 2: QDR2-GYRO 3: QDR2-DWS 135 | #QDR_DYNAMIC_LOADING = 3 136 | ##Enable/disable sensor data flashback feature 137 | #QDR_FLASHBACK_ENABLED = 0 138 | ##Enable/disable sensor data batching feature 139 | #QDR_BATCHING_ENABLED = 0 140 | ##Reporting offset before PPS boundary 141 | #QDR_REPORTING_OFFSET = 20 142 | ##Sensor dispatch threshold declaration 143 | #QDR_SENSDISPATCH_MS = 30 144 | 145 | 146 | ###################################### 147 | # # 148 | # QDR2-GYRO Configuration # 149 | # # 150 | # For QDR2-GYRO, # 151 | # comment default configuration above# 152 | # and # 153 | # uncomment below configuration # 154 | # settings. # 155 | # # 156 | ###################################### 157 | # 158 | #SENSOR_SERVICE = vehicle_speed 159 | #SENSOR_PROVIDER = native 160 | #SENSOR_RATE = 100 161 | #SENSOR_SAMPLES = 1 162 | # 163 | #SENSOR_SERVICE = vehicle_gyro 164 | #SENSOR_PROVIDER = native 165 | #SENSOR_RATE = 100 166 | #SENSOR_SAMPLES = 1 167 | # 168 | #SENSOR_SERVICE = vehicle_gear 169 | #SENSOR_PROVIDER = native 170 | #SENSOR_RATE = 100 171 | #SENSOR_SAMPLES = 1 172 | # 173 | ##Configure QDR library to be loaded 1: QDR3 2: QDR2-GYRO 3: QDR2-DWS 174 | #QDR_DYNAMIC_LOADING = 2 175 | ##Enable/disable sensor data flashback feature 176 | #QDR_FLASHBACK_ENABLED = 0 177 | ##Enable/disable sensor data batching feature 178 | #QDR_BATCHING_ENABLED = 0 179 | ##Reporting offset before PPS boundary 180 | #QDR_REPORTING_OFFSET = 20 181 | ##Sensor dispatch threshold declaration 182 | #QDR_SENSDISPATCH_MS = 30 183 | # 184 | -------------------------------------------------------------------------------- /lights/Light.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014, 2017-2018 The Linux Foundation. All rights reserved. 3 | * Not a contribution 4 | * Copyright (C) 2008 The Android Open Source Project 5 | * Copyright (C) 2018 The LineageOS Project 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #define LOG_TAG "LightsService" 21 | 22 | #include "Light.h" 23 | #include 24 | #include 25 | #include 26 | 27 | namespace android { 28 | namespace hardware { 29 | namespace light { 30 | namespace V2_0 { 31 | namespace implementation { 32 | 33 | /* 34 | * Write value to path and close file. 35 | */ 36 | template 37 | static void set(const std::string& path, const T& value) { 38 | std::ofstream file(path); 39 | file << value; 40 | } 41 | 42 | Light::Light() { 43 | mLights.emplace(Type::ATTENTION, std::bind(&Light::handleRgb, this, std::placeholders::_1, 0)); 44 | mLights.emplace(Type::BATTERY, std::bind(&Light::handleRgb, this, std::placeholders::_1, 2)); 45 | mLights.emplace(Type::NOTIFICATIONS, std::bind(&Light::handleRgb, this, std::placeholders::_1, 1)); 46 | } 47 | 48 | void Light::handleRgb(const LightState& state, size_t index) { 49 | mLightStates.at(index) = state; 50 | 51 | LightState stateToUse = mLightStates.front(); 52 | for (const auto& lightState : mLightStates) { 53 | if (lightState.color & 0xffffff) { 54 | stateToUse = lightState; 55 | break; 56 | } 57 | } 58 | 59 | std::map colorValues; 60 | colorValues["red"] = (stateToUse.color >> 16) & 0xff; 61 | // lower green and blue brightness to adjust for the (lower) brightness of red 62 | colorValues["green"] = ((stateToUse.color >> 8) & 0xff) / 2; 63 | colorValues["blue"] = (stateToUse.color & 0xff) / 2; 64 | 65 | int onMs = stateToUse.flashMode == Flash::TIMED ? stateToUse.flashOnMs : 0; 66 | int offMs = stateToUse.flashMode == Flash::TIMED ? stateToUse.flashOffMs : 0; 67 | 68 | // LUT has 63 entries, we could theoretically use them as 3 (colors) * 21 (steps). 69 | // However, the last LUT entries don't seem to behave correctly for unknown 70 | // reasons, so we use 17 steps for a total of 51 LUT entries only. 71 | static constexpr int kRampSteps = 16; 72 | static constexpr int kRampMaxStepDurationMs = 15; 73 | 74 | auto makeLedPath = [](const std::string& led, const std::string& op) -> std::string { 75 | return "/sys/class/leds/" + led + "/" + op; 76 | }; 77 | auto getScaledDutyPercent = [](int brightness) -> std::string { 78 | std::string output; 79 | for (int i = 0; i <= kRampSteps; i++) { 80 | if (i != 0) { 81 | output += ","; 82 | } 83 | output += std::to_string(i * 512 * brightness / (255 * kRampSteps)); 84 | } 85 | return output; 86 | }; 87 | 88 | // Disable all blinking before starting 89 | for (const auto& entry : colorValues) { 90 | set(makeLedPath(entry.first, "blink"), 0); 91 | } 92 | 93 | if (onMs > 0 && offMs > 0) { 94 | int pauseLo, pauseHi, stepDuration, index = 0; 95 | if (kRampMaxStepDurationMs * kRampSteps > onMs) { 96 | stepDuration = onMs / kRampSteps; 97 | pauseHi = 0; 98 | pauseLo = offMs; 99 | } else { 100 | stepDuration = kRampMaxStepDurationMs; 101 | pauseHi = onMs - kRampSteps * stepDuration; 102 | pauseLo = offMs - kRampSteps * stepDuration; 103 | } 104 | 105 | for (const auto& entry : colorValues) { 106 | set(makeLedPath(entry.first, "lut_flags"), 95); 107 | set(makeLedPath(entry.first, "start_idx"), index); 108 | set(makeLedPath(entry.first, "duty_pcts"), getScaledDutyPercent(entry.second)); 109 | set(makeLedPath(entry.first, "pause_lo"), pauseLo); 110 | set(makeLedPath(entry.first, "pause_hi"), pauseHi); 111 | set(makeLedPath(entry.first, "ramp_step_ms"), stepDuration); 112 | index += kRampSteps + 1; 113 | } 114 | 115 | // Start blinking 116 | for (const auto& entry : colorValues) { 117 | set(makeLedPath(entry.first, "blink"), entry.second); 118 | } 119 | } else { 120 | for (const auto& entry : colorValues) { 121 | set(makeLedPath(entry.first, "brightness"), entry.second); 122 | } 123 | } 124 | 125 | LOG(DEBUG) << base::StringPrintf( 126 | "handleRgb: mode=%d, color=%08X, onMs=%d, offMs=%d", 127 | static_cast::type>(stateToUse.flashMode), stateToUse.color, 128 | onMs, offMs); 129 | } 130 | 131 | Return Light::setLight(Type type, const LightState& state) { 132 | auto it = mLights.find(type); 133 | 134 | if (it == mLights.end()) { 135 | return Status::LIGHT_NOT_SUPPORTED; 136 | } 137 | 138 | /* 139 | * Lock global mutex until light state is updated. 140 | */ 141 | std::lock_guard lock(mLock); 142 | 143 | it->second(state); 144 | 145 | return Status::SUCCESS; 146 | } 147 | 148 | Return Light::getSupportedTypes(getSupportedTypes_cb _hidl_cb) { 149 | std::vector types; 150 | 151 | for (auto const& light : mLights) { 152 | types.push_back(light.first); 153 | } 154 | 155 | _hidl_cb(types); 156 | 157 | return Void(); 158 | } 159 | 160 | } // namespace implementation 161 | } // namespace V2_0 162 | } // namespace light 163 | } // namespace hardware 164 | } // namespace android 165 | -------------------------------------------------------------------------------- /rootdir/bin/init.class_main.sh: -------------------------------------------------------------------------------- 1 | #! /vendor/bin/sh 2 | 3 | # Copyright (c) 2013-2014, 2019 The Linux Foundation. All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # * Neither the name of The Linux Foundation nor 13 | # the names of its contributors may be used to endorse or promote 14 | # products derived from this software without specific prior written 15 | # permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 21 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 27 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | 30 | # 31 | # start ril-daemon only for targets on which radio is present 32 | # 33 | baseband=`getprop ro.baseband` 34 | sgltecsfb=`getprop persist.vendor.radio.sglte_csfb` 35 | datamode=`getprop persist.vendor.data.mode` 36 | low_ram=`getprop ro.config.low_ram` 37 | qcrild_status=true 38 | 39 | case "$baseband" in 40 | "apq" | "sda" | "qcs" ) 41 | setprop ro.vendor.radio.noril yes 42 | stop vendor.ril-daemon 43 | stop vendor.qcrild 44 | esac 45 | 46 | case "$baseband" in 47 | "msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx" | "sm6") 48 | 49 | # For older modem packages launch ril-daemon. 50 | if [ -f /vendor/firmware_mnt/verinfo/ver_info.txt ]; then 51 | modem=`cat /vendor/firmware_mnt/verinfo/ver_info.txt | 52 | sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' | 53 | sed 's/.*MPSS.\(.*\)/\1/g' | cut -d \. -f 1` 54 | if [ "$modem" = "AT" ]; then 55 | version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt | 56 | sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' | 57 | sed 's/.*AT.\(.*\)/\1/g' | cut -d \- -f 1` 58 | if [ ! -z $version ]; then 59 | if [ "$version" \< "3.1" ]; then 60 | qcrild_status=false 61 | fi 62 | fi 63 | elif [ "$modem" = "TA" ]; then 64 | version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt | 65 | sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' | 66 | sed 's/.*TA.\(.*\)/\1/g' | cut -d \- -f 1` 67 | if [ ! -z $version ]; then 68 | if [ "$version" \< "3.0" ]; then 69 | qcrild_status=false 70 | fi 71 | fi 72 | elif [ "$modem" = "JO" ]; then 73 | version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt | 74 | sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' | 75 | sed 's/.*JO.\(.*\)/\1/g' | cut -d \- -f 1` 76 | if [ ! -z $version ]; then 77 | if [ "$version" \< "3.2" ]; then 78 | qcrild_status=false 79 | fi 80 | fi 81 | elif [ "$modem" = "TH" ]; then 82 | qcrild_status=false 83 | fi 84 | fi 85 | 86 | if [ "$qcrild_status" = "true" ]; then 87 | # Make sure both rild, qcrild are not running at same time. 88 | # This is possible with vanilla aosp system image. 89 | stop vendor.ril-daemon 90 | 91 | start vendor.qcrild 92 | else 93 | start vendor.ril-daemon 94 | fi 95 | 96 | case "$baseband" in 97 | "svlte2a" | "csfb") 98 | start qmiproxy 99 | ;; 100 | "sglte" | "sglte2" ) 101 | if [ "x$sgltecsfb" != "xtrue" ]; then 102 | start qmiproxy 103 | else 104 | setprop persist.vendor.radio.voice.modem.index 0 105 | fi 106 | ;; 107 | esac 108 | 109 | multisim=`getprop persist.radio.multisim.config` 110 | 111 | if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then 112 | if [ "$qcrild_status" = "true" ]; then 113 | start vendor.qcrild2 114 | else 115 | start vendor.ril-daemon2 116 | fi 117 | elif [ "$multisim" = "tsts" ]; then 118 | if [ "$qcrild_status" = "true" ]; then 119 | start vendor.qcrild2 120 | start vendor.qcrild3 121 | else 122 | start vendor.ril-daemon2 123 | start vendor.ril-daemon3 124 | fi 125 | fi 126 | 127 | case "$datamode" in 128 | "tethered") 129 | start vendor.dataqti 130 | if [ "$low_ram" != "true" ]; then 131 | start vendor.dataadpl 132 | fi 133 | ;; 134 | "concurrent") 135 | start vendor.dataqti 136 | if [ "$low_ram" != "true" ]; then 137 | start vendor.dataadpl 138 | fi 139 | ;; 140 | *) 141 | ;; 142 | esac 143 | esac 144 | 145 | # 146 | # Allow persistent faking of bms 147 | # User needs to set fake bms charge in persist.vendor.bms.fake_batt_capacity 148 | # 149 | fake_batt_capacity=`getprop persist.vendor.bms.fake_batt_capacity` 150 | case "$fake_batt_capacity" in 151 | "") ;; #Do nothing here 152 | * ) 153 | echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity 154 | ;; 155 | esac 156 | -------------------------------------------------------------------------------- /BoardConfigCommon.mk: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) 2018 The LineageOS Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | BUILD_BROKEN_DUP_RULES := true 18 | BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true 19 | 20 | BOARD_VENDOR := oneplus 21 | 22 | COMMON_PATH := device/oneplus/sdm845-common 23 | 24 | # Architecture 25 | TARGET_ARCH := arm64 26 | TARGET_ARCH_VARIANT := armv8-a 27 | TARGET_CPU_ABI := arm64-v8a 28 | TARGET_CPU_ABI2 := 29 | TARGET_CPU_VARIANT := generic 30 | TARGET_CPU_VARIANT_RUNTIME := kryo385 31 | 32 | TARGET_2ND_ARCH := arm 33 | TARGET_2ND_ARCH_VARIANT := armv8-a 34 | TARGET_2ND_CPU_ABI := armeabi-v7a 35 | TARGET_2ND_CPU_ABI2 := armeabi 36 | TARGET_2ND_CPU_VARIANT := generic 37 | TARGET_2ND_CPU_VARIANT_RUNTIME := kryo385 38 | 39 | # Bootloader 40 | TARGET_BOOTLOADER_BOARD_NAME := sdm845 41 | TARGET_NO_BOOTLOADER := true 42 | 43 | # Kernel 44 | BOARD_BOOT_HEADER_VERSION := 1 45 | BOARD_KERNEL_BASE := 0x00000000 46 | BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true androidboot.usbcontroller=a600000.dwc3 firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 47 | BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb 48 | BOARD_KERNEL_PAGESIZE := 4096 49 | BOARD_KERNEL_SEPARATED_DTBO := true 50 | BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) 51 | TARGET_KERNEL_ARCH := arm64 52 | TARGET_KERNEL_CONFIG := enchilada_defconfig vendor/debugfs.config 53 | TARGET_KERNEL_SOURCE := kernel/oneplus/sdm845 54 | 55 | # Platform 56 | BOARD_USES_QCOM_HARDWARE := true 57 | TARGET_BOARD_PLATFORM := sdm845 58 | 59 | # Properties 60 | TARGET_ODM_PROP += $(COMMON_PATH)/odm.prop 61 | TARGET_PRODUCT_PROP += $(COMMON_PATH)/product.prop 62 | TARGET_SYSTEM_EXT_PROP += $(COMMON_PATH)/system_ext.prop 63 | TARGET_SYSTEM_PROP += $(COMMON_PATH)/system.prop 64 | TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.prop 65 | 66 | # Treble 67 | BOARD_VNDK_VERSION := current 68 | 69 | # A/B 70 | AB_OTA_UPDATER := true 71 | 72 | AB_OTA_PARTITIONS += \ 73 | boot \ 74 | dtbo \ 75 | system \ 76 | vbmeta \ 77 | vendor 78 | 79 | # ANT+ 80 | BOARD_ANT_WIRELESS_DEVICE := "qualcomm-hidl" 81 | 82 | # Audio 83 | AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true 84 | AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true 85 | AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true 86 | AUDIO_FEATURE_ENABLED_SSR := true 87 | BOARD_SUPPORTS_SOUND_TRIGGER := true 88 | BOARD_USES_ALSA_AUDIO := true 89 | USE_CUSTOM_AUDIO_POLICY := 1 90 | 91 | # Display 92 | TARGET_SCREEN_DENSITY := 450 93 | TARGET_USES_FOD_ZPOS := true 94 | TARGET_USES_GRALLOC1 := true 95 | TARGET_USES_HWC2 := true 96 | TARGET_USES_ION := true 97 | 98 | # DRM 99 | TARGET_ENABLE_MEDIADRM_64 := true 100 | 101 | # Filesystem 102 | TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs 103 | 104 | # HIDL 105 | DEVICE_MATRIX_FILE := $(COMMON_PATH)/compatibility_matrix.xml 106 | DEVICE_MANIFEST_FILE := $(COMMON_PATH)/manifest.xml 107 | 108 | # Lineage Health 109 | TARGET_HEALTH_CHARGING_CONTROL_CHARGING_PATH := /sys/class/power_supply/battery/op_disable_charge 110 | TARGET_HEALTH_CHARGING_CONTROL_CHARGING_ENABLED := 0 111 | TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED := 1 112 | 113 | # Partitions 114 | BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 115 | BOARD_DTBOIMG_PARTITION_SIZE := 8388608 116 | BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2998927360 117 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 118112366592 118 | BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824 119 | BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 120 | BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64) 121 | TARGET_COPY_OUT_VENDOR := vendor 122 | 123 | # Power 124 | TARGET_TAP_TO_WAKE_NODE := "/proc/touchpanel/double_tap_enable" 125 | 126 | # Recovery 127 | BOARD_USES_RECOVERY_AS_BOOT := true 128 | TARGET_NO_RECOVERY := true 129 | TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/rootdir/etc/fstab.qcom 130 | TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888" 131 | TARGET_USERIMAGES_USE_EXT4 := true 132 | TARGET_USERIMAGES_USE_F2FS := true 133 | 134 | # RIL 135 | ENABLE_VENDOR_RIL_SERVICE := true 136 | 137 | # Security patch level 138 | VENDOR_SECURITY_PATCH := 2021-11-01 139 | 140 | # Sepolicy 141 | include device/qcom/sepolicy_vndr/SEPolicy.mk 142 | 143 | BOARD_VENDOR_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor 144 | PRODUCT_PUBLIC_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/public 145 | PRODUCT_PRIVATE_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/private 146 | 147 | # Touch 148 | SOONG_CONFIG_NAMESPACES += ONEPLUS_LINEAGE_TOUCH_HAL 149 | SOONG_CONFIG_ONEPLUS_LINEAGE_TOUCH_HAL := INCLUDE_DIR 150 | SOONG_CONFIG_ONEPLUS_LINEAGE_TOUCH_HAL_INCLUDE_DIR := $(COMMON_PATH)/touch/include 151 | 152 | # Trust 153 | TARGET_TRUST_USB_CONTROL_PATH := /sys/devices/platform/soc/a600000.ssusb/usb_data_enabled 154 | TARGET_TRUST_USB_CONTROL_ENABLE := 0 155 | TARGET_TRUST_USB_CONTROL_DISABLE := 1 156 | 157 | # Verified Boot 158 | BOARD_AVB_ENABLE := true 159 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --set_hashtree_disabled_flag 160 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 2 161 | 162 | # WiFi 163 | BOARD_WLAN_DEVICE := qcwcn 164 | BOARD_HOSTAPD_DRIVER := NL80211 165 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) 166 | BOARD_WPA_SUPPLICANT_DRIVER := NL80211 167 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) 168 | WIFI_DRIVER_DEFAULT := qca_cld3 169 | WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan" 170 | WIFI_DRIVER_STATE_OFF := "OFF" 171 | WIFI_DRIVER_STATE_ON := "ON" 172 | WIFI_HIDL_FEATURE_DUAL_INTERFACE := true 173 | WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true 174 | WPA_SUPPLICANT_VERSION := VER_0_8_X 175 | 176 | # Inherit from the proprietary version 177 | include vendor/oneplus/sdm845-common/BoardConfigVendor.mk 178 | -------------------------------------------------------------------------------- /sepolicy/vendor/genfs_contexts: -------------------------------------------------------------------------------- 1 | # procfs 2 | genfscon proc /dash_4300_4p45_exit u:object_r:sysfs_dash_charger:s0 3 | genfscon proc /dash_4320_4p45_exit u:object_r:sysfs_dash_charger:s0 4 | genfscon proc /dash_4510_4p45_exit u:object_r:sysfs_dash_charger:s0 5 | genfscon proc /dash_firmware_ok u:object_r:sysfs_dash_charger:s0 6 | genfscon proc /enhance_dash u:object_r:sysfs_dash_charger:s0 7 | genfscon proc /n76e_exit u:object_r:sysfs_dash_charger:s0 8 | genfscon proc /ship_mode u:object_r:sysfs_dash_charger:s0 9 | genfscon proc /swarp_chg_exist u:object_r:sysfs_dash_charger:s0 10 | genfscon proc /touchpanel u:object_r:proc_touchpanel:s0 11 | genfscon proc /warp_chg_exit u:object_r:sysfs_dash_charger:s0 12 | 13 | # sysfs 14 | genfscon sysfs /devices/platform/soc/a600000.ssusb/usb_data_enabled u:object_r:sysfs_usb_data_enabled:s0 15 | genfscon sysfs /devices/platform/soc/a90000.i2c/i2c-4/4-0020/tp_gesture_touch_hold u:object_r:sysfs_fod:s0 16 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/auth_status u:object_r:sysfs_fod:s0 17 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/dim_alpha u:object_r:sysfs_fod:s0 18 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/dimlayer_bl_en u:object_r:sysfs_livedisplay_tuneable:s0 19 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/notify_dim u:object_r:sysfs_fod:s0 20 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/notify_fppress u:object_r:sysfs_fod:s0 21 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/power_status u:object_r:sysfs_fod:s0 22 | genfscon sysfs /devices/platform/soc/soc:fpc_fpc1020 u:object_r:sysfs_fpc:s0 23 | genfscon sysfs /devices/platform/soc/soc:goodix_fp/proximity_state u:object_r:sysfs_fpc_proximity:s0 24 | genfscon sysfs /devices/platform/soc/soc:qcom,dsi-display@18/display_mode u:object_r:sysfs_livedisplay_tuneable:s0 25 | genfscon sysfs /devices/platform/soc/soc:qcom,dsi-display@18/hbm u:object_r:sysfs_livedisplay_tuneable:s0 26 | genfscon sysfs /devices/platform/soc/soc:qcom,dsi-display@21/display_mode u:object_r:sysfs_livedisplay_tuneable:s0 27 | genfscon sysfs /devices/platform/soc/soc:qcom,dsi-display@21/hbm u:object_r:sysfs_livedisplay_tuneable:s0 28 | genfscon sysfs /module/qpnp_smb5/parameters/call_on u:object_r:sysfs_dash_charger:s0 29 | 30 | # sysfs (ssr) 31 | genfscon sysfs /devices/platform/soc/aae0000.qcom,venus/subsys0/name u:object_r:sysfs_ssr:s0 32 | genfscon sysfs /devices/platform/soc/aae0000.qcom,venus/subsys0/restart_level u:object_r:sysfs_ssr_toggle:s0 33 | genfscon sysfs /devices/platform/soc/soc:qcom,ipa_fws/subsys1/name u:object_r:sysfs_ssr:s0 34 | genfscon sysfs /devices/platform/soc/soc:qcom,ipa_fws/subsys1/restart_level u:object_r:sysfs_ssr_toggle:s0 35 | genfscon sysfs /devices/platform/soc/soc:qcom,kgsl-hyp/subsys2/name u:object_r:sysfs_ssr:s0 36 | genfscon sysfs /devices/platform/soc/soc:qcom,kgsl-hyp/subsys2/restart_level u:object_r:sysfs_ssr_toggle:s0 37 | genfscon sysfs /devices/platform/soc/17300000.qcom,lpass/subsys3/name u:object_r:sysfs_ssr:s0 38 | genfscon sysfs /devices/platform/soc/17300000.qcom,lpass/subsys3/restart_level u:object_r:sysfs_ssr_toggle:s0 39 | genfscon sysfs /devices/platform/soc/5c00000.qcom,ssc/subsys4/name u:object_r:sysfs_ssr:s0 40 | genfscon sysfs /devices/platform/soc/5c00000.qcom,ssc/subsys4/restart_level u:object_r:sysfs_ssr_toggle:s0 41 | genfscon sysfs /devices/platform/soc/8300000.qcom,turing/subsys5/name u:object_r:sysfs_ssr:s0 42 | genfscon sysfs /devices/platform/soc/8300000.qcom,turing/subsys5/restart_level u:object_r:sysfs_ssr_toggle:s0 43 | genfscon sysfs /devices/platform/soc/4080000.qcom,mss/subsys6/name u:object_r:sysfs_ssr:s0 44 | genfscon sysfs /devices/platform/soc/4080000.qcom,mss/subsys6/restart_level u:object_r:sysfs_ssr_toggle:s0 45 | 46 | # sysfs (wakeup) 47 | genfscon sysfs /devices/platform/soc/171c0000.slim/tavil-slim-pgd/power/wakeup u:object_r:sysfs_wakeup:s0 48 | genfscon sysfs /devices/platform/soc/18800000.qcom,icnss/power/wakeup u:object_r:sysfs_wakeup:s0 49 | genfscon sysfs /devices/platform/soc/88c000.i2c/i2c-1/1-0028/power/wakeup u:object_r:sysfs_wakeup:s0 50 | genfscon sysfs /devices/platform/soc/88e0000.qcom,msm-eud/power/wakeup u:object_r:sysfs_wakeup:s0 51 | genfscon sysfs /devices/platform/soc/898000.qcom,qup_uart/tty/ttyHS0/power/wakeup u:object_r:sysfs_wakeup:s0 52 | genfscon sysfs /devices/platform/soc/a600000.ssusb/power/wakeup u:object_r:sysfs_wakeup:s0 53 | genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm8998@0:qcom,pm8998_rtc/power/wakeup u:object_r:sysfs_wakeup:s0 54 | genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm8998@0:qcom,power-on@800/power/wakeup u:object_r:sysfs_wakeup:s0 55 | genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-qnovo@1500/power/wakeup u:object_r:sysfs_wakeup:s0 56 | genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/power/wakeup u:object_r:sysfs_wakeup:s0 57 | genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qpnp,fg/power/wakeup u:object_r:sysfs_wakeup:s0 58 | genfscon sysfs /devices/platform/soc/soc:gpio_keys/power/wakeup u:object_r:sysfs_wakeup:s0 59 | genfscon sysfs /devices/platform/vendor/vendor:extcon_usb1/power/wakeup u:object_r:sysfs_wakeup:s0 60 | genfscon sysfs /devices/virtual/misc/msm_aac/power/wakeup u:object_r:sysfs_wakeup:s0 61 | genfscon sysfs /devices/virtual/misc/msm_alac/power/wakeup u:object_r:sysfs_wakeup:s0 62 | genfscon sysfs /devices/virtual/misc/msm_amrnb/power/wakeup u:object_r:sysfs_wakeup:s0 63 | genfscon sysfs /devices/virtual/misc/msm_amrwb/power/wakeup u:object_r:sysfs_wakeup:s0 64 | genfscon sysfs /devices/virtual/misc/msm_amrwbplus/power/wakeup u:object_r:sysfs_wakeup:s0 65 | genfscon sysfs /devices/virtual/misc/msm_ape/power/wakeup u:object_r:sysfs_wakeup:s0 66 | genfscon sysfs /devices/virtual/misc/msm_evrc/power/wakeup u:object_r:sysfs_wakeup:s0 67 | genfscon sysfs /devices/virtual/misc/msm_g711alaw/power/wakeup u:object_r:sysfs_wakeup:s0 68 | genfscon sysfs /devices/virtual/misc/msm_g711mlaw/power/wakeup u:object_r:sysfs_wakeup:s0 69 | genfscon sysfs /devices/virtual/misc/msm_mp3/power/wakeup u:object_r:sysfs_wakeup:s0 70 | genfscon sysfs /devices/virtual/misc/msm_multi_aac/power/wakeup u:object_r:sysfs_wakeup:s0 71 | genfscon sysfs /devices/virtual/misc/msm_qcelp/power/wakeup u:object_r:sysfs_wakeup:s0 72 | genfscon sysfs /devices/virtual/misc/msm_wma/power/wakeup u:object_r:sysfs_wakeup:s0 73 | genfscon sysfs /devices/virtual/misc/msm_wmapro/power/wakeup u:object_r:sysfs_wakeup:s0 74 | -------------------------------------------------------------------------------- /vendor.prop: -------------------------------------------------------------------------------- 1 | # Audio 2 | persist.vendor.audio.fluence.speaker=true 3 | persist.vendor.audio.fluence.voicecall=true 4 | persist.vendor.audio.fluence.voicecomm=true 5 | persist.vendor.audio.fluence.voicerec=true 6 | persist.vendor.audio.ha_proxy.enabled=true 7 | persist.vendor.audio.ras.enabled=false 8 | ro.audio.monitorRotation=true 9 | ro.config.media_vol_steps=25 10 | ro.config.vc_call_vol_steps=6 11 | ro.vendor.audio.sdk.fluencetype=fluence 12 | ro.vendor.audio.sdk.ssr=false 13 | vendor.audio.adm.buffering.ms=2 14 | vendor.audio.dolby.ds2.enabled=false 15 | vendor.audio.dolby.ds2.hardbypass=false 16 | vendor.audio.enable.dp.for.voice=false 17 | vendor.audio.feature.a2dp_offload.enable=true 18 | vendor.audio.feature.afe_proxy.enable=true 19 | vendor.audio.feature.anc_headset.enable=true 20 | vendor.audio.feature.battery_listener.enable=false 21 | vendor.audio.feature.compr_cap.enable=false 22 | vendor.audio.feature.compress_in.enable=false 23 | vendor.audio.feature.compress_meta_data.enable=true 24 | vendor.audio.feature.compr_voip.enable=false 25 | vendor.audio.feature.concurrent_capture.enable=false 26 | vendor.audio.feature.custom_stereo.enable=true 27 | vendor.audio.feature.display_port.enable=true 28 | vendor.audio.feature.dsm_feedback.enable=false 29 | vendor.audio.feature.dynamic_ecns.enable=false 30 | vendor.audio.feature.ext_hw_plugin.enable=false 31 | vendor.audio.feature.external_dsp.enable=false 32 | vendor.audio.feature.external_speaker.enable=false 33 | vendor.audio.feature.external_speaker_tfa.enable=false 34 | vendor.audio.feature.fluence.enable=true 35 | vendor.audio.feature.fm.enable=true 36 | vendor.audio.feature.hdmi_edid.enable=true 37 | vendor.audio.feature.hdmi_passthrough.enable=true 38 | vendor.audio.feature.hfp.enable=true 39 | vendor.audio.feature.hifi_audio.enable=false 40 | vendor.audio.feature.hwdep_cal.enable=false 41 | vendor.audio.feature.incall_music.enable=true 42 | vendor.audio.feature.multi_voice_session.enable=true 43 | vendor.audio.feature.keep_alive.enable=false 44 | vendor.audio.feature.kpi_optimize.enable=true 45 | vendor.audio.feature.maxx_audio.enable=false 46 | vendor.audio.feature.ras.enable=true 47 | vendor.audio.feature.record_play_concurency.enable=false 48 | vendor.audio.feature.src_trkn.enable=true 49 | vendor.audio.feature.spkr_prot.enable=true 50 | vendor.audio.feature.ssrec.enable=true 51 | vendor.audio.feature.usb_offload.enable=true 52 | vendor.audio.feature.usb_offload_burst_mode.enable=false 53 | vendor.audio.feature.usb_offload_sidetone_volume.enable=false 54 | vendor.audio.feature.deepbuffer_as_primary.enable=false 55 | vendor.audio.feature.vbat.enable=true 56 | vendor.audio.feature.wsa.enable=false 57 | vendor.audio.feature.audiozoom.enable=false 58 | vendor.audio.feature.snd_mon.enable=true 59 | vendor.audio.flac.sw.decoder.24bit=true 60 | vendor.audio.hal.boot.timeout.ms=20000 61 | vendor.audio.hal.output.suspend.supported=true 62 | vendor.audio.hw.aac.encoder=true 63 | vendor.audio.offload.buffer.size.kb=32 64 | vendor.audio.offload.gapless.enabled=true 65 | vendor.audio.offload.multiaac.enable=true 66 | vendor.audio.offload.multiple.enabled=false 67 | vendor.audio.offload.passthrough=false 68 | vendor.audio.offload.track.enable=true 69 | vendor.audio.parser.ip.buffer.size=262144 70 | vendor.audio.safx.pbe.enabled=true 71 | vendor.audio.tunnel.encode=false 72 | vendor.audio.use.sw.alac.decoder=true 73 | vendor.audio.use.sw.ape.decoder=true 74 | vendor.audio.volume.headset.gain.depcal=true 75 | vendor.audio_hal.in_period_size=144 76 | vendor.audio_hal.period_multiplier=3 77 | vendor.audio_hal.period_size=192 78 | vendor.voice.path.for.pcm.voip=true 79 | 80 | # Bluetooth 81 | bluetooth.device.class_of_device=90,2,12 82 | bluetooth.hardware.power.operating_voltage_mv=3300 83 | bluetooth.profile.a2dp.source.enabled?=true 84 | bluetooth.profile.asha.central.enabled?=true 85 | bluetooth.profile.avrcp.target.enabled?=true 86 | bluetooth.profile.bas.client.enabled?=true 87 | bluetooth.profile.gatt.enabled?=true 88 | bluetooth.profile.hfp.ag.enabled?=true 89 | bluetooth.profile.hid.device.enabled?=true 90 | bluetooth.profile.hid.host.enabled?=true 91 | bluetooth.profile.map.server.enabled?=true 92 | bluetooth.profile.opp.enabled?=true 93 | bluetooth.profile.pan.nap.enabled?=true 94 | bluetooth.profile.pan.panu.enabled?=true 95 | bluetooth.profile.pbap.server.enabled?=true 96 | bluetooth.profile.sap.server.enabled?=true 97 | persist.bluetooth.a2dp_offload.disabled=false 98 | persist.vendor.bt.aac_frm_ctl.enabled=true 99 | persist.vendor.qcom.bluetooth.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac 100 | persist.vendor.qcom.bluetooth.aac_frm_ctl.enabled=true 101 | persist.vendor.qcom.bluetooth.aac_vbr_ctl.enabled=false 102 | persist.vendor.qcom.bluetooth.enable.splita2dp=true 103 | persist.vendor.qcom.bluetooth.scram.enabled=true 104 | persist.vendor.qcom.bluetooth.soc=cherokee 105 | persist.vendor.qcom.bluetooth.twsp_state.enabled=false 106 | ro.bluetooth.a2dp_offload.supported=true 107 | 108 | # Camera 109 | persist.vendor.camera.privapp.list=com.oneplus.factorymode,com.oneplus.camera,com.oem.autotest,com.oneplus.healthcheck 110 | 111 | # Chipset 112 | ro.soc.manufacturer=Qualcomm 113 | ro.soc.model=SDM845 114 | 115 | # Display 116 | debug.sf.disable_client_composition_cache=1 117 | debug.sf.enable_transaction_tracing=false 118 | debug.sf.predict_hwc_composition_strategy=0 119 | persist.demo.hdmirotationlock=false 120 | persist.sys.sf.color_saturation=1.0 121 | persist.sys.sf.native_mode=0 122 | ro.hardware.egl=adreno 123 | ro.hardware.vulkan=adreno 124 | ro.opengles.version=196610 125 | ro.surface_flinger.enable_frame_rate_override=false 126 | ro.vendor.display.cabl=0 127 | vendor.display.enable_default_color_mode=0 128 | 129 | # DPM 130 | persist.vendor.dpmhalservice.enable=1 131 | 132 | # DRM 133 | drm.service.enabled=true 134 | 135 | # fastbootd 136 | ro.fastbootd.available=true 137 | 138 | # FRP 139 | ro.frp.pst=/dev/block/bootdevice/by-name/config 140 | 141 | # GPS 142 | persist.backup.ntpServer=0.pool.ntp.org 143 | 144 | # Keystore 145 | ro.hardware.keystore_desede=true 146 | 147 | # Media 148 | debug.stagefright.ccodec=1 149 | debug.stagefright.omx_default_rank=0 150 | 151 | # Netflix 152 | ro.netflix.bsp_rev=Q845-14477-1 153 | 154 | # NFC 155 | ro.camera.notify_nfc=1 156 | 157 | # OTG 158 | persist.sys.oem.otg_support=true 159 | 160 | # PASR 161 | vendor.pasr.activemode.enabled=true 162 | vendor.power.pasr.enabled=false 163 | 164 | # Perf 165 | ro.vendor.extension_library=libqti-perfd-client.so 166 | 167 | # Radio 168 | persist.radio.multisim.config=dsds 169 | persist.vendor.data.iwlan.enable=true 170 | persist.vendor.radio.enableadvancedscan=false 171 | persist.vendor.radio.apm_sim_not_pwdn=1 172 | persist.vendor.radio.mt_sms_ack=30 173 | persist.vendor.radio.sib16_support=1 174 | persist.vendor.radio.custom_ecc=1 175 | persist.vendor.radio.procedure_bytes=SKIP 176 | persist.vendor.radio.rat_on=combine 177 | ro.telephony.default_network=22,22 178 | 179 | # Sensors 180 | persist.vendor.sensors.firmware_property_read_support=false 181 | 182 | # USB 183 | vendor.usb.diag.func.name=diag 184 | vendor.usb.dpl.inst.name=dpl 185 | vendor.usb.qdss.inst.name=qdss 186 | vendor.usb.rmnet.func.name=gsi 187 | vendor.usb.rmnet.inst.name=rmnet 188 | vendor.usb.rndis.func.name=gsi 189 | vendor.usb.use_ffs_mtp=0 190 | vendor.usb.use_gadget_hal=0 191 | 192 | # Zygote 193 | zygote.critical_window.minute=10 194 | -------------------------------------------------------------------------------- /Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2018 The LineageOS Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | LOCAL_PATH := $(call my-dir) 18 | 19 | ifneq ($(filter enchilada fajita,$(TARGET_DEVICE)),) 20 | include $(call all-makefiles-under,$(LOCAL_PATH)) 21 | 22 | include $(CLEAR_VARS) 23 | 24 | # A/B builds require us to create the mount points at compile time. 25 | # Just creating it for all cases since it does not hurt. 26 | FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/firmware_mnt 27 | $(FIRMWARE_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE) 28 | @echo "Creating $(FIRMWARE_MOUNT_POINT)" 29 | @mkdir -p $(TARGET_OUT_VENDOR)/firmware_mnt 30 | 31 | BT_FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/bt_firmware 32 | $(BT_FIRMWARE_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE) 33 | @echo "Creating $(BT_FIRMWARE_MOUNT_POINT)" 34 | @mkdir -p $(TARGET_OUT_VENDOR)/bt_firmware 35 | 36 | DSP_MOUNT_POINT := $(TARGET_OUT_VENDOR)/dsp 37 | $(DSP_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE) 38 | @echo "Creating $(DSP_MOUNT_POINT)" 39 | @mkdir -p $(TARGET_OUT_VENDOR)/dsp 40 | 41 | ALL_DEFAULT_INSTALLED_MODULES += $(FIRMWARE_MOUNT_POINT) $(BT_FIRMWARE_MOUNT_POINT) $(DSP_MOUNT_POINT) 42 | 43 | RFS_MDM_ADSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/mdm/adsp/ 44 | $(RFS_MDM_ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 45 | @echo "Creating RFS MDM ADSP folder structure: $@" 46 | @rm -rf $@/* 47 | @mkdir -p $(dir $@)/readonly/vendor 48 | $(hide) ln -sf /data/vendor/tombstones/rfs/lpass $@/ramdumps 49 | $(hide) ln -sf /mnt/vendor/persist/rfs/mdm/adsp $@/readwrite 50 | $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared 51 | $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos 52 | $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware 53 | $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware 54 | 55 | RFS_MDM_CDSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/mdm/cdsp/ 56 | $(RFS_MDM_CDSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 57 | @echo "Creating RFS MDM CDSP folder structure: $@" 58 | @rm -rf $@/* 59 | @mkdir -p $(dir $@)/readonly/vendor 60 | $(hide) ln -sf /data/vendor/tombstones/rfs/cdsp $@/ramdumps 61 | $(hide) ln -sf /mnt/vendor/persist/rfs/mdm/cdsp $@/readwrite 62 | $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared 63 | $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos 64 | $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware 65 | $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware 66 | 67 | RFS_MDM_MPSS_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/mdm/mpss/ 68 | $(RFS_MDM_MPSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 69 | @echo "Creating RFS MDM MPSS folder structure: $@" 70 | @rm -rf $@/* 71 | @mkdir -p $(dir $@)/readonly/vendor 72 | $(hide) ln -sf /data/vendor/tombstones/rfs/modem $@/ramdumps 73 | $(hide) ln -sf /mnt/vendor/persist/rfs/mdm/mpss $@/readwrite 74 | $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared 75 | $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos 76 | $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware 77 | $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware 78 | 79 | RFS_MDM_SLPI_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/mdm/slpi/ 80 | $(RFS_MDM_SLPI_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 81 | @echo "Creating RFS MDM SLPI folder structure: $@" 82 | @rm -rf $@/* 83 | @mkdir -p $(dir $@)/readonly/vendor 84 | $(hide) ln -sf /data/vendor/tombstones/rfs/slpi $@/ramdumps 85 | $(hide) ln -sf /mnt/vendor/persist/rfs/mdm/slpi $@/readwrite 86 | $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared 87 | $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos 88 | $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware 89 | $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware 90 | 91 | RFS_MSM_ADSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/adsp/ 92 | $(RFS_MSM_ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 93 | @echo "Creating RFS MSM ADSP folder structure: $@" 94 | @rm -rf $@/* 95 | @mkdir -p $(dir $@)/readonly/vendor 96 | $(hide) ln -sf /data/vendor/tombstones/rfs/lpass $@/ramdumps 97 | $(hide) ln -sf /mnt/vendor/persist/rfs/msm/adsp $@/readwrite 98 | $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared 99 | $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos 100 | $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware 101 | $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware 102 | 103 | RFS_MSM_CDSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/cdsp/ 104 | $(RFS_MSM_CDSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 105 | @echo "Creating RFS MSM CDSP folder structure: $@" 106 | @rm -rf $@/* 107 | @mkdir -p $(dir $@)/readonly/vendor 108 | $(hide) ln -sf /data/vendor/tombstones/rfs/cdsp $@/ramdumps 109 | $(hide) ln -sf /mnt/vendor/persist/rfs/msm/cdsp $@/readwrite 110 | $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared 111 | $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos 112 | $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware 113 | $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware 114 | 115 | RFS_MSM_MPSS_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/mpss/ 116 | $(RFS_MSM_MPSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 117 | @echo "Creating RFS MSM MPSS folder structure: $@" 118 | @rm -rf $@/* 119 | @mkdir -p $(dir $@)/readonly/vendor 120 | $(hide) ln -sf /data/vendor/tombstones/rfs/modem $@/ramdumps 121 | $(hide) ln -sf /mnt/vendor/persist/rfs/msm/mpss $@/readwrite 122 | $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared 123 | $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos 124 | $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware 125 | $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware 126 | 127 | RFS_MSM_SLPI_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/slpi/ 128 | $(RFS_MSM_SLPI_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 129 | @echo "Creating RFS MSM SLPI folder structure: $@" 130 | @rm -rf $@/* 131 | @mkdir -p $(dir $@)/readonly/vendor 132 | $(hide) ln -sf /data/vendor/tombstones/rfs/slpi $@/ramdumps 133 | $(hide) ln -sf /mnt/vendor/persist/rfs/msm/slpi $@/readwrite 134 | $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared 135 | $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos 136 | $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware 137 | $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware 138 | 139 | WIFI_FIRMWARE_SYMLINKS := $(TARGET_OUT_VENDOR)/firmware/wlan/qca_cld 140 | $(WIFI_FIRMWARE_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 141 | @echo "Creating wifi firmware symlinks: $@" 142 | mkdir -p $@ 143 | $(hide) ln -sf /vendor/etc/wifi/WCNSS_qcom_cfg.ini $@/WCNSS_qcom_cfg.ini 144 | $(hide) ln -sf /mnt/vendor/persist/wlan_mac.bin $@/wlan_mac.bin 145 | 146 | ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MDM_ADSP_SYMLINKS) $(RFS_MDM_CDSP_SYMLINKS) $(RFS_MDM_MPSS_SYMLINKS) $(RFS_MDM_SLPI_SYMLINKS) $(RFS_MSM_ADSP_SYMLINKS) $(RFS_MSM_CDSP_SYMLINKS) $(RFS_MSM_MPSS_SYMLINKS) $(RFS_MSM_SLPI_SYMLINKS) $(WIFI_FIRMWARE_SYMLINKS) 147 | 148 | endif 149 | -------------------------------------------------------------------------------- /configs/gps/sap.conf: -------------------------------------------------------------------------------- 1 | ################################ 2 | # Sensor Settings 3 | ################################ 4 | #The following parameters are optional. 5 | #Internal defaults support MEMS sensors 6 | #native to most handset devices. 7 | #Device specific sensor characterization 8 | #for improved performance is possible as 9 | #described in SAP application notes. 10 | #GYRO_BIAS_RANDOM_WALK= 11 | #ACCEL_RANDOM_WALK_SPECTRAL_DENSITY= 12 | #ANGLE_RANDOM_WALK_SPECTRAL_DENSITY= 13 | #RATE_RANDOM_WALK_SPECTRAL_DENSITY= 14 | #VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY= 15 | 16 | # DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info 17 | # 4 - Debug, 5 - Verbose 18 | # If DEBUG_LEVEL is commented, Android's logging levels will be used 19 | DEBUG_LEVEL = 0 20 | # Sensor Sampling Rate Parameters for Low-Data Rate Filter (should be greater than 0) 21 | # used in loc_eng_reinit 22 | SENSOR_ACCEL_BATCHES_PER_SEC=2 23 | SENSOR_ACCEL_SAMPLES_PER_BATCH=5 24 | SENSOR_GYRO_BATCHES_PER_SEC=2 25 | SENSOR_GYRO_SAMPLES_PER_BATCH=5 26 | # Sensor Sampling Rate Parameters for High-Data Rate Filter (should be greater than 0) 27 | SENSOR_ACCEL_BATCHES_PER_SEC_HIGH=4 28 | SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH=25 29 | SENSOR_GYRO_BATCHES_PER_SEC_HIGH=4 30 | SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH=25 31 | 32 | # Sensor Control Mode (0=AUTO, 1=FORCE_ON, 2=MODEM_DEFAULT) 33 | # used in loc_eng_reinit 34 | SENSOR_CONTROL_MODE=1 35 | 36 | # Bit mask used to define which sensor algorithms are used. 37 | # Setting each bit has the following definition: 38 | # 0x1 - DISABLE_INS_POSITIONING_FILTER 39 | # 0x0 - ENABLE_INS_POSITIONING_FILTER 40 | SENSOR_ALGORITHM_CONFIG_MASK=0x00 41 | 42 | #Vehicle Network Provider configuration 43 | 44 | #Service configuration strings 45 | #The number before colon in VN_X items defines version of the format of the rest of the string 46 | #VN_ACCEL_CFG=0:5 47 | #VN_GYRO_CFG=0:5.5 48 | #VN_ODOMETRY_CFG=0:2,4.5 49 | 50 | ################################################ 51 | # QDR3 configurations # 52 | ################################################ 53 | #VN_SPEED_CFG=1:131,5,8,1,2,3,1,1,9,2,14,2 54 | #VN_GEAR_CFG=1:422,20,4,0,4,1,9,0,1,2,3,4,5,6,7,8 55 | VN_SPEED_CFG=1:777,0,0,1,3,1,0.002778,0,40,8,32,8 56 | VN_GEAR_CFG=1:422,20,4,0,4,1,9,0,1,2,3,4,5,6,7,8 57 | 58 | ################################################ 59 | # QDR2-Gyro configurations # 60 | ################################################ 61 | #VN_GYRO_CFG=1:555,0,1,0,0,0,0,-6.5,6.6066,-6.5,-1.00,2,6.607,6.6068,0,0,16,0.0002,0,16,0.0002,0,16,0.0002 62 | #VN_SPEED_CFG=1:555,0,0,1,2,1,0.01,0,56,8,48,8 63 | #VN_GEAR_CFG=1:555,16,4,0,1,1,9,0,1,2,3,4,5,6,7,8 64 | 65 | ################################################ 66 | # QDR2-DWT configurations # 67 | ################################################ 68 | #VN_SPEED_CFG=1:555,22,1,2,1,1,1,0,8,8,23,1,2,0,1,0,8,8,23,1 69 | #VN_GEAR_CFG=1:555,12,4,16,14,16,8,1,2,3,4,5,6,7,8 70 | #VN_DWS_CFG=1:555,0,0,1,3,1,1,0,0,8,0,0,8,8,0,0,16,8,0,0,24,8,0,0 71 | #VN_GYRO_CFG=1:555,40,16,1.0,40,16,1.0,40,16,1.0 72 | 73 | ##################################################################################### 74 | # VNW service batching configuration strings # 75 | # VNW provider will initialize default type as Time based batching # 76 | # Each service batch value is configured to be 100 # 77 | # VN_ACCEL_CFG_BATCH_VALUE will be treated as time in Ms if VN_CFG_BATCH_TYPE # 78 | # is set to time based batching # 79 | # VN_ACCEL_CFG_BATCH_VALUE will be treated as sample count if VN_CFG_BATCH_TYPE # 80 | # is set to count based batching # 81 | # Uncomment and update batch time /sample count as per selected batching type # 82 | ##################################################################################### 83 | # Batching type 84 | # 1 - Time based (default) 85 | # 2 - Count based 86 | VN_CFG_BATCH_TYPE=1 87 | 88 | #Vehicle Accel batching value, it can either accept time in milli seconds or sample count 89 | #VN_ACCEL_CFG_BATCH_VALUE=100 90 | 91 | #Vehicle Gyro batching value, it can either accept time in milli seconds or sample count 92 | VN_GYRO_CFG_BATCH_VALUE=50 93 | 94 | #Vehicle Odo batching value, it can either accept time in milli seconds or sample count 95 | #VN_ODOMETRY_CFG_BATCH_VALUE=100 96 | 97 | #Vehicle Speed batching value, it can either accept time in milli seconds or sample count 98 | VN_SPEED_CFG_BATCH_VALUE=50 99 | 100 | #Vehicle Gear batching value, it can either accept time in milli seconds or sample count 101 | VN_GEAR_CFG_BATCH_VALUE=50 102 | 103 | #Vehicle DWS batching value, it can either accept time in milli seconds or sample count 104 | #VN_DWS_CFG_BATCH_VALUE=100 105 | #################################################################################### 106 | 107 | #Procesors clock ratio: AP and CAN bus microcontroller 108 | ################################################ 109 | # QDR3 configurations # 110 | ################################################ 111 | VN_PROC_CLOCK_RATIO=1.0 112 | 113 | ################################################ 114 | # QDR2-DWT OR QDR2-Gyro configurations # 115 | ################################################ 116 | #VN_PROC_CLOCK_RATIO = 1.0 117 | 118 | # Time source used by Sensor HAL 119 | # Setting this value controls accuracy of location sensor services. 120 | # 0 - Unknown 121 | # 1 - CLOCK_BOOTTIME 122 | # 2 - CLOCK_MONOTONIC 123 | # 3 - CLOCK_REALTIME 124 | # 4 - CLOCK_BOOTTIME using Alarm timer interface 125 | NDK_PROVIDER_TIME_SOURCE=1 126 | 127 | # Sensor Batching Configuration 128 | # 0 - Time based 129 | # 1 - Fixed count based 130 | # 2 - Variable count based 131 | COUNT_BASED_BATCHING=1 132 | SYNC_ONCE=0 133 | 134 | # Vehicle Network Data optimization 135 | # Default value: 0 136 | # Value 0x40000 - Speed(bit 18 eSLIM_SERVICE_VEHICLE_SPEED) 137 | # Value 0x80000 - Speed(bit 19 eSLIM_SERVICE_VEHICLE_DWS) 138 | # Value 0x100000 - Speed(bit 20 eSLIM_SERVICE_VEHICLE_GEAR) 139 | VN_ENABLE_DATA_OPTIMIZATION=0x100000 140 | 141 | # Vehicle Network Data Routing time interval 142 | # This is applicable only if VN_ENABLE_DATA_OPTIMIZATION value is set 143 | # Default value: 5000 msec 144 | VN_DATA_ROUTING_TIME_INTERVAL_MSEC=3000 145 | 146 | #Sensor HAL Provider Configuration HAL Library name including path 147 | ################################################ 148 | # # 149 | # Configuration for BMI 160 Sensor # 150 | # # 151 | ################################################ 152 | #SENSOR_TYPE=2 153 | #SENSOR_HAL_LIB_PATH=/usr/lib/libbmi160sensors.so.1 154 | 155 | ################################################ 156 | # # 157 | # Configuration for ASM330 Sensor # 158 | # # 159 | ################################################ 160 | SENSOR_TYPE=1 161 | SENSOR_HAL_LIB_PATH=/usr/lib/libasm330sensors.so.1 162 | 163 | 164 | ################################################ 165 | # # 166 | # Configuration for IAM20680 Sensor # 167 | # # 168 | ################################################ 169 | #SENSOR_TYPE=3 170 | #SENSOR_HAL_LIB_PATH=/usr/lib/libiam20680sensors.so.1 171 | 172 | 173 | ################################################ 174 | # # 175 | # Configuration for SMI130 Sensor # 176 | # # 177 | ################################################ 178 | #SENSOR_TYPE=4 179 | #SENSOR_HAL_LIB_PATH=/usr/lib/libsmi130sensors.so.1 180 | -------------------------------------------------------------------------------- /configs/qti_whitelist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /rootdir/bin/init.qcom.class_core.sh: -------------------------------------------------------------------------------- 1 | #!/vendor/bin/sh 2 | 3 | # Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # * Neither the name of The Linux Foundation nor 13 | # the names of its contributors may be used to endorse or promote 14 | # products derived from this software without specific prior written 15 | # permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 21 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 27 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | 30 | # Set platform variables 31 | target=`getprop ro.board.platform` 32 | if [ -f /sys/devices/soc0/hw_platform ]; then 33 | soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null 34 | else 35 | soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null 36 | fi 37 | if [ -f /sys/devices/soc0/soc_id ]; then 38 | soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null 39 | else 40 | soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null 41 | fi 42 | if [ -f /sys/devices/soc0/platform_version ]; then 43 | soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null 44 | else 45 | soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null 46 | fi 47 | 48 | 49 | # Dynamic Memory Managment (DMM) provides a sys file system to the userspace 50 | # that can be used to plug in/out memory that has been configured as unstable. 51 | # This unstable memory can be in Active or In-Active State. 52 | # Each of which the userspace can request by writing to a sys file. 53 | # 54 | # ro.dev.dmm = 1; Indicates that DMM is enabled in the Android User Space. This 55 | # property is set in the Android system properties file. 56 | # 57 | # If ro.dev.dmm.dpd.start_address is set here then the target has a memory 58 | # configuration that supports DynamicMemoryManagement. 59 | init_DMM() 60 | { 61 | block=-1 62 | 63 | case "$target" in 64 | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm8960") 65 | ;; 66 | *) 67 | return 68 | ;; 69 | esac 70 | 71 | mem="/sys/devices/system/memory" 72 | op=`cat $mem/movable_start_bytes` 73 | case "$op" in 74 | "0") 75 | log -p i -t DMM DMM Disabled. movable_start_bytes not set: $op 76 | ;; 77 | 78 | "$mem/movable_start_bytes: No such file or directory ") 79 | log -p i -t DMM DMM Disabled. movable_start_bytes does not exist: $op 80 | ;; 81 | 82 | *) 83 | log -p i -t DMM DMM available. movable_start_bytes at $op 84 | movable_start_bytes=0x`cat $mem/movable_start_bytes` 85 | block_size_bytes=0x`cat $mem/block_size_bytes` 86 | block=$((#${movable_start_bytes}/${block_size_bytes})) 87 | 88 | chown -h system.system $mem/memory$block/state 89 | chown -h system.system $mem/probe 90 | chown -h system.system $mem/active 91 | chown -h system.system $mem/remove 92 | 93 | case "$target" in 94 | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion") 95 | echo $movable_start_bytes > $mem/probe 96 | case "$?" in 97 | "0") 98 | log -p i -t DMM $movable_start_bytes to physical hotplug succeeded. 99 | ;; 100 | *) 101 | log -p e -t DMM $movable_start_bytes to physical hotplug failed. 102 | return 103 | ;; 104 | esac 105 | 106 | echo online > $mem/memory$block/state 107 | case "$?" in 108 | "0") 109 | log -p i -t DMM \'echo online\' to logical hotplug succeeded. 110 | ;; 111 | *) 112 | log -p e -t DMM \'echo online\' to logical hotplug failed. 113 | return 114 | ;; 115 | esac 116 | ;; 117 | esac 118 | 119 | setprop ro.dev.dmm.dpd.start_address $movable_start_bytes 120 | setprop ro.dev.dmm.dpd.block $block 121 | ;; 122 | esac 123 | 124 | case "$target" in 125 | "msm8960") 126 | return 127 | ;; 128 | esac 129 | 130 | # For 7X30 targets: 131 | # ro.dev.dmm.dpd.start_address is set when the target has a 2x256Mb memory 132 | # configuration. This is also used to indicate that the target is capable of 133 | # setting EBI-1 to Deep Power Down or Self Refresh. 134 | op=`cat $mem/low_power_memory_start_bytes` 135 | case "$op" in 136 | "0") 137 | log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes not set:$op 138 | ;; 139 | "$mem/low_power_memory_start_bytes No such file or directory ") 140 | log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes does not exist:$op 141 | ;; 142 | *) 143 | log -p i -t DMM Self-Refresh-Only available. low_power_memory_start_bytes at $op 144 | ;; 145 | esac 146 | } 147 | 148 | # 149 | # For controlling console and shell on console on 8960 - perist.serial.enable 8960 150 | # On other target use default ro.debuggable property. 151 | # 152 | serial=`getprop persist.serial.enable` 153 | dserial=`getprop ro.debuggable` 154 | case "$target" in 155 | "msm8960") 156 | case "$serial" in 157 | "0") 158 | echo 0 > /sys/devices/platform/msm_serial_hsl.0/console 159 | ;; 160 | "1") 161 | echo 1 > /sys/devices/platform/msm_serial_hsl.0/console 162 | start console 163 | ;; 164 | *) 165 | case "$dserial" in 166 | "1") 167 | start console 168 | ;; 169 | esac 170 | ;; 171 | esac 172 | ;; 173 | 174 | "msm8610" | "msm8974" | "msm8226") 175 | case "$serial" in 176 | "0") 177 | echo 0 > /sys/devices/f991f000.serial/console 178 | ;; 179 | "1") 180 | echo 1 > /sys/devices/f991f000.serial/console 181 | start console 182 | ;; 183 | *) 184 | case "$dserial" in 185 | "1") 186 | start console 187 | ;; 188 | esac 189 | ;; 190 | esac 191 | ;; 192 | *) 193 | case "$dserial" in 194 | "1") 195 | start console 196 | ;; 197 | esac 198 | ;; 199 | esac 200 | 201 | case "$target" in 202 | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion") 203 | insmod /system/lib/modules/ss_mfcinit.ko 204 | insmod /system/lib/modules/ss_vencoder.ko 205 | insmod /system/lib/modules/ss_vdecoder.ko 206 | chmod -h 0666 /dev/ss_mfc_reg 207 | chmod -h 0666 /dev/ss_vdec 208 | chmod -h 0666 /dev/ss_venc 209 | 210 | init_DMM 211 | ;; 212 | 213 | "msm8960") 214 | init_DMM 215 | ;; 216 | esac 217 | --------------------------------------------------------------------------------