├── sepolicy ├── vendor │ ├── radio.te │ ├── rild.te │ ├── sensors.te │ ├── rmt_storage.te │ ├── hal_audio_default.te │ ├── hal_drm_default.te │ ├── hal_wifi_default.te │ ├── device.te │ ├── vold.te │ ├── hal_graphics_composer_default.te │ ├── property.te │ ├── thermal-engine.te │ ├── seapp_contexts │ ├── platform_app.te │ ├── wcnss_service.te │ ├── hwservice.te │ ├── tee.te │ ├── attributes │ ├── init.te │ ├── hal_cameraHIDL_default.te │ ├── file.te │ ├── hal_ifaa.te │ ├── vendor_init.te │ ├── hal_cameraHIDL.te │ ├── dashd.te │ ├── qtidataservices_app.te │ ├── hal_power_default.te │ ├── hwservice_contexts │ ├── hal_touch_oneplus_msm8998.te │ ├── hal_ifaa_default.te │ ├── hal_camera_default.te │ ├── init_radio.te │ ├── hal_fingerprint_default.te │ ├── init_devstart.te │ ├── hal_livedisplay_oneplus_msm8998.te │ ├── genfs_contexts │ ├── property_contexts │ └── file_contexts ├── public │ └── file.te └── private │ ├── seapp_contexts │ └── pocketmode_app.te ├── setup-makefiles.py ├── livedisplay ├── .clang-format ├── vendor.lineage.livedisplay@2.0-service.oneplus_msm8998.rc ├── vendor.lineage.livedisplay@2.0-service.oneplus_msm8998.xml ├── Android.bp ├── DisplayModes.h ├── service.cpp └── DisplayModes.cpp ├── pocketmode ├── proguard.flags ├── Android.bp ├── src │ └── org │ │ └── lineageos │ │ └── pocketmode │ │ ├── BootCompletedReceiver.java │ │ ├── ProximitySensor.java │ │ └── PocketModeService.java └── AndroidManifest.xml ├── wifi ├── p2p_supplicant_overlay.conf └── wpa_supplicant_overlay.conf ├── system_ext.prop ├── configs ├── qmi_fw.conf ├── msm_irqbalance.conf ├── public.libraries.txt ├── gps │ ├── lowi.conf │ ├── flp.conf │ ├── xtwifi.conf │ ├── apdr.conf │ ├── sap.conf │ ├── izat.conf │ └── gps.conf ├── FOSSConfig.xml ├── system_ext-privapp-permissions-qti.xml ├── qti_whitelist.xml ├── nfc │ └── libnfc-nci.conf └── media_codecs_performance.xml ├── rro_overlays ├── WifiOverlay │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ └── values │ │ └── config.xml ├── CarrierConfigOverlay │ ├── Android.bp │ └── AndroidManifest.xml └── TetheringOverlay │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ └── values │ └── config.xml ├── rootdir ├── bin │ ├── init.devstart.sh │ └── init.radio.sh ├── Android.bp └── etc │ ├── fstab.qcom │ ├── ueventd.qcom.rc │ └── init.qcom.usb.rc ├── lineage.dependencies ├── recovery ├── root │ └── init.recovery.qcom.rc ├── Android.bp └── recovery_updater.cpp ├── ifaa ├── java │ └── org │ │ └── ifaa │ │ └── android │ │ └── manager │ │ ├── IFAAManagerV2.java │ │ ├── IFAAManager.java │ │ └── IFAAManagerFactory.java ├── Android.bp └── aidl │ └── com │ └── android │ └── internal │ └── app │ └── IIFAAService.aidl ├── seccomp_policy └── mediacodec-seccomp.policy ├── init ├── Android.bp └── init_oneplus_msm8998.cpp ├── overlay-lineage ├── packages │ └── apps │ │ ├── Dialer │ │ └── java │ │ │ └── com │ │ │ └── android │ │ │ └── dialer │ │ │ └── callrecord │ │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ │ └── Aperture │ │ └── app │ │ └── src │ │ └── main │ │ └── res │ │ └── values │ │ └── config.xml ├── lineage-sdk │ ├── packages │ │ └── LineageSettingsProvider │ │ │ └── res │ │ │ └── values │ │ │ └── defaults.xml │ └── lineage │ │ └── res │ │ └── res │ │ └── values │ │ └── config.xml └── hardware │ └── oneplus │ └── doze │ └── res │ └── values │ └── config.xml ├── overlay ├── frameworks │ └── base │ │ ├── packages │ │ ├── SettingsProvider │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── defaults.xml │ │ └── SystemUI │ │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ │ └── core │ │ └── res │ │ └── res │ │ └── xml │ │ └── power_profile.xml └── packages │ ├── apps │ └── Settings │ │ └── res │ │ └── values │ │ └── arrays.xml │ └── services │ └── Telephony │ └── res │ └── values │ └── config.xml ├── Android.bp ├── touch └── include │ └── TouchscreenGestureConfig.h ├── framework_compatibility_matrix.xml ├── system.prop ├── config.fs ├── audio ├── graphite_ipc_platform_info.xml ├── audio_output_policy.conf ├── audio_effects.xml └── audio_policy_volumes.xml ├── extract-files.py ├── releasetools └── releasetools.py ├── BoardConfigCommon.mk └── vendor.prop /sepolicy/vendor/radio.te: -------------------------------------------------------------------------------- 1 | get_prop(radio, vendor_qcom_ims_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/rild.te: -------------------------------------------------------------------------------- 1 | binder_call(rild, qtidataservices_app) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/sensors.te: -------------------------------------------------------------------------------- 1 | r_dir_file(sensors, proc_cmdline) 2 | -------------------------------------------------------------------------------- /setup-makefiles.py: -------------------------------------------------------------------------------- 1 | #!./extract-files.py --regenerate_makefiles 2 | -------------------------------------------------------------------------------- /sepolicy/public/file.te: -------------------------------------------------------------------------------- 1 | type sysfs_proximity, fs_type, sysfs_type; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/rmt_storage.te: -------------------------------------------------------------------------------- 1 | r_dir_file(rmt_storage, sysfs_data) 2 | -------------------------------------------------------------------------------- /livedisplay/.clang-format: -------------------------------------------------------------------------------- 1 | ../../../../build/soong/scripts/system-clang-format -------------------------------------------------------------------------------- /pocketmode/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class org.lineageos.pocketmode.* { 2 | *; 3 | } 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_audio_default.te: -------------------------------------------------------------------------------- 1 | allow hal_audio_default sysfs:dir r_dir_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_drm_default.te: -------------------------------------------------------------------------------- 1 | add_hwservice(hal_drm_default, hal_drmkey_hwservice) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_wifi_default.te: -------------------------------------------------------------------------------- 1 | allow hal_wifi_default proc_net:file w_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/device.te: -------------------------------------------------------------------------------- 1 | type dash_device, dev_type; 2 | type fingerprint_device, dev_type; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/vold.te: -------------------------------------------------------------------------------- 1 | # For setting read_ahead_kb 2 | allow vold sysfs_mmc_host:file w_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_graphics_composer_default.te: -------------------------------------------------------------------------------- 1 | r_dir_file(hal_graphics_composer_default, sysfs_graphics) 2 | -------------------------------------------------------------------------------- /wifi/p2p_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_no_group_iface=1 3 | persistent_reconnect=1 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/property.te: -------------------------------------------------------------------------------- 1 | vendor_internal_prop(thermal_engine_prop) 2 | vendor_internal_prop(vendor_device_prop) 3 | -------------------------------------------------------------------------------- /system_ext.prop: -------------------------------------------------------------------------------- 1 | # Dex2oat 2 | dalvik.vm.dex2oat64.enabled=true 3 | 4 | # DPM 5 | persist.vendor.dpm.feature=11 6 | -------------------------------------------------------------------------------- /configs/qmi_fw.conf: -------------------------------------------------------------------------------- 1 | #Debug messages with priority >= ANDROID_LOG_WARN 2 | QMI_CCI_DEBUG_LEVEL=5 3 | QMI_CSI_DEBUG_LEVEL=5 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/thermal-engine.te: -------------------------------------------------------------------------------- 1 | r_dir_file(thermal-engine, sysfs) 2 | 3 | set_prop(thermal-engine, thermal_engine_prop) 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/seapp_contexts: -------------------------------------------------------------------------------- 1 | user=radio seinfo=platform name=.qtidataservices domain=qtidataservices_app type=radio_data_file 2 | -------------------------------------------------------------------------------- /sepolicy/private/seapp_contexts: -------------------------------------------------------------------------------- 1 | user=system seinfo=platform name=org.lineageos.pocketmode domain=pocketmode_app type=system_app_data_file 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/platform_app.te: -------------------------------------------------------------------------------- 1 | allow platform_app hal_ifaa_hwservice:hwservice_manager find; 2 | binder_call(platform_app, hal_ifaa_default) 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/wcnss_service.te: -------------------------------------------------------------------------------- 1 | allow wcnss_service sysfs_project_info:dir search; 2 | allow wcnss_service sysfs_project_info:file r_file_perms; 3 | -------------------------------------------------------------------------------- /rro_overlays/WifiOverlay/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "WifiOverlay", 3 | theme: "WifiOverlay", 4 | product_specific: true, 5 | } 6 | -------------------------------------------------------------------------------- /configs/msm_irqbalance.conf: -------------------------------------------------------------------------------- 1 | PRIO=1,1,1,1,0,0,0,0 2 | #arch_timer, arm-pmu, arch_mem_timer, smem-rpm, mpm 3 | IGNORED_IRQ=19,22,39,200,203 4 | #WLAN irqs 5 | BLACKLIST_IRQ=446,455,456 6 | -------------------------------------------------------------------------------- /rootdir/bin/init.devstart.sh: -------------------------------------------------------------------------------- 1 | #!/vendor/bin/sh 2 | 3 | echo 1 > /dev/ipa 4 | echo 1 > /sys/kernel/boot_adsp/boot 5 | echo 1 > /sys/kernel/boot_slpi/boot 6 | 7 | setprop vendor.qcom.devup 1 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice.te: -------------------------------------------------------------------------------- 1 | type hal_cameraHIDL_hwservice, hwservice_manager_type; 2 | type hal_drmkey_hwservice, hwservice_manager_type; 3 | type hal_ifaa_hwservice, hwservice_manager_type; 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/tee.te: -------------------------------------------------------------------------------- 1 | typeattribute tee data_between_core_and_vendor_violators; 2 | allow tee fingerprintd_data_file:dir rw_dir_perms; 3 | allow tee fingerprintd_data_file:file create_file_perms; 4 | -------------------------------------------------------------------------------- /rro_overlays/CarrierConfigOverlay/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "CarrierConfigOverlay", 3 | theme: "CarrierConfigOverlay", 4 | product_specific: true, 5 | aaptflags: ["--keep-raw-values"], 6 | } 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /sepolicy/vendor/init.te: -------------------------------------------------------------------------------- 1 | allow init proc_alarm_boot:file r_file_perms; 2 | allow init socket_device:sock_file { unlink setattr create }; 3 | 4 | allow init bt_firmware_file:filesystem getattr; 5 | allow init firmware_file:filesystem getattr; 6 | -------------------------------------------------------------------------------- /configs/public.libraries.txt: -------------------------------------------------------------------------------- 1 | libadsprpc.so 2 | libcdsprpc.so 3 | libsdsprpc.so 4 | libfastcvopt.so 5 | liblistenjni.so 6 | liblistensoundmodel2.so 7 | libOpenCL.so 8 | libnpu.so 9 | libhta_hexagon_runtime.so 10 | libprotobuf-cpp-lite.so 11 | -------------------------------------------------------------------------------- /wifi/wpa_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_disabled=1 3 | tdls_external_control=1 4 | bss_max_count=512 5 | interworking=1 6 | hs20=1 7 | auto_interworking=0 8 | bss_no_flush_when_down=1 9 | driver_param=use_p2p_group_interface=1 10 | -------------------------------------------------------------------------------- /lineage.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "repository": "android_hardware_oneplus", 4 | "target_path": "hardware/oneplus" 5 | }, 6 | { 7 | "repository": "android_kernel_oneplus_msm8998", 8 | "target_path": "kernel/oneplus/msm8998" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /recovery/root/init.recovery.qcom.rc: -------------------------------------------------------------------------------- 1 | on fs 2 | wait /dev/block/platform/soc/1da4000.ufshc 3 | symlink /dev/block/platform/soc/1da4000.ufshc /dev/block/bootdevice 4 | 5 | on init 6 | setprop sys.usb.controller "a800000.dwc3" 7 | setprop sys.usb.configfs 1 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /sepolicy/vendor/file.te: -------------------------------------------------------------------------------- 1 | type debugfs_rpm, fs_type, debugfs_type; 2 | type proc_alarm_boot, fs_type, proc_type; 3 | type proc_touchpanel, fs_type, proc_type; 4 | type sysfs_fp_detect, fs_type, sysfs_type; 5 | type sysfs_project_info, fs_type, sysfs_type; 6 | type sysfs_wifi, fs_type, sysfs_type; 7 | -------------------------------------------------------------------------------- /rro_overlays/TetheringOverlay/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2020 The Android Open-Source Project 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | 6 | runtime_resource_overlay { 7 | name: "TetheringConfigOverlay", 8 | resource_dirs: ["res"], 9 | proprietary: true, 10 | } 11 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_ifaa.te: -------------------------------------------------------------------------------- 1 | # HwBinder IPC from client to server, and callbacks 2 | binder_call(hal_ifaa_client, hal_ifaa_server) 3 | binder_call(hal_ifaa_server, hal_ifaa_client) 4 | 5 | add_hwservice(hal_ifaa_server, hal_ifaa_hwservice) 6 | allow hal_ifaa_client hal_ifaa_hwservice:hwservice_manager find; 7 | -------------------------------------------------------------------------------- /ifaa/java/org/ifaa/android/manager/IFAAManagerV2.java: -------------------------------------------------------------------------------- 1 | package org.ifaa.android.manager; 2 | 3 | import android.content.Context; 4 | 5 | public abstract class IFAAManagerV2 extends IFAAManager { 6 | 7 | public abstract byte[] processCmdV2(Context paramContext, byte[] paramArrayOfByte); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /ifaa/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2017-2019 The LineageOS Project 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | 6 | java_library { 7 | name: "org.ifaa.android.manager", 8 | installable: true, 9 | srcs: [ 10 | "java/**/*.java", 11 | "aidl/**/I*.aidl", 12 | ], 13 | } 14 | -------------------------------------------------------------------------------- /seccomp_policy/mediacodec-seccomp.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 | inotify_init1: 1 12 | inotify_add_watch: 1 13 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_init.te: -------------------------------------------------------------------------------- 1 | allow vendor_init dash_device:chr_file r_file_perms; 2 | allow vendor_init tmpfs:dir { create rw_dir_perms }; 3 | 4 | allow vendor_init sysfs_wifi:file w_file_perms; 5 | 6 | set_prop(vendor_init, camera_prop); 7 | set_prop(vendor_init, vendor_qcom_ims_prop); 8 | set_prop(vendor_init, vendor_time_service_prop); 9 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_cameraHIDL.te: -------------------------------------------------------------------------------- 1 | # HwBinder IPC from client to server, and callbacks 2 | binder_call(hal_cameraHIDL_client, hal_cameraHIDL_server) 3 | binder_call(hal_cameraHIDL_server, hal_cameraHIDL_client) 4 | 5 | add_hwservice(hal_cameraHIDL_server, hal_cameraHIDL_hwservice) 6 | allow hal_cameraHIDL_client hal_cameraHIDL_hwservice:hwservice_manager find; 7 | -------------------------------------------------------------------------------- /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 | wakelock_use(dashd) 7 | 8 | allow dashd kmsg_device:chr_file rw_file_perms; 9 | allow dashd dash_device:chr_file rw_file_perms; 10 | 11 | r_dir_file(dashd, sysfs_usb_supply); 12 | r_dir_file(dashd, sysfs_battery_supply); 13 | -------------------------------------------------------------------------------- /sepolicy/vendor/qtidataservices_app.te: -------------------------------------------------------------------------------- 1 | allow qtidataservices_app self:socket create_socket_perms; 2 | 3 | allow qtidataservices_app system_app_data_file:dir create_dir_perms; 4 | allow qtidataservices_app system_app_data_file:file create_file_perms; 5 | 6 | binder_call(qtidataservices_app, location) 7 | 8 | allowxperm qtidataservices_app self:socket ioctl msm_sock_ipc_ioctls; 9 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_power_default.te: -------------------------------------------------------------------------------- 1 | # To do powerhint on nodes defined in powerhint.json 2 | allow hal_power_default device_latency:chr_file rw_file_perms; 3 | 4 | # Enable DT2W 5 | allow hal_power_default proc_touchpanel:dir search; 6 | allow hal_power_default proc_touchpanel:file rw_file_perms; 7 | 8 | # Connect to PPS 9 | unix_socket_connect(hal_power_default, pps, mm-pp-daemon) 10 | -------------------------------------------------------------------------------- /init/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2020,2022 The LineageOS Project 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | 6 | cc_library_static { 7 | name: "libinit_oneplus_msm8998", 8 | recovery_available: true, 9 | srcs: ["init_oneplus_msm8998.cpp"], 10 | include_dirs: [ 11 | "system/core/init", 12 | ], 13 | shared_libs: [ 14 | "libbase", 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | true 9 | 4 10 | 11 | 12 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | true 10 | 11 | 12 | -------------------------------------------------------------------------------- /overlay-lineage/lineage-sdk/packages/LineageSettingsProvider/res/values/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | true 11 | 12 | 13 | -------------------------------------------------------------------------------- /rro_overlays/TetheringOverlay/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /recovery/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // SPDX-FileCopyrightText: 2024 The LineageOS Project 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | 6 | cc_library_static { 7 | srcs: ["recovery_updater.cpp"], 8 | name: "librecovery_updater_oneplus", 9 | include_dirs: [ 10 | "bootable/deprecated-ota/edify/include", 11 | "bootable/deprecated-ota/updater/include", 12 | "bootable/recovery", 13 | "bootable/recovery/otautil/include", 14 | "system/libbase/include", 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice_contexts: -------------------------------------------------------------------------------- 1 | vendor.nxp.nxpnfc::INxpNfc u:object_r:hal_nfc_hwservice:s0 2 | 3 | vendor.oneplus.fingerprint.extension::IVendorFingerprintExtensions u:object_r:hal_fingerprint_hwservice:s0 4 | 5 | vendor.oneplus.camera.CameraHIDL::IOnePlusCameraProvider u:object_r:hal_cameraHIDL_hwservice:s0 6 | vendor.oneplus.hardware.drmkey::IOneplusDrmKey u:object_r:hal_drmkey_hwservice:s0 7 | vendor.oneplus.hardware.ifaa::IOneplusIfaa u:object_r:hal_ifaa_hwservice:s0 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_touch_oneplus_msm8998.te: -------------------------------------------------------------------------------- 1 | type hal_touch_oneplus_msm8998, domain; 2 | type hal_touch_oneplus_msm8998_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(hal_touch_oneplus_msm8998) 5 | 6 | hal_server_domain(hal_touch_oneplus_msm8998, hal_lineage_touch) 7 | 8 | binder_call(hal_touch_oneplus_msm8998, servicemanager) 9 | 10 | # Allow access to gesture enable nodes 11 | allow hal_touch_oneplus_msm8998 proc_touchpanel:dir search; 12 | allow hal_touch_oneplus_msm8998 proc_touchpanel:file rw_file_perms; 13 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 10 | 11 | 0 12 | -1 13 | -1 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /pocketmode/Android.bp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2024 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | android_app { 8 | name: "OnePlusPocketMode", 9 | 10 | srcs: ["src/**/*.java"], 11 | 12 | certificate: "platform", 13 | platform_apis: true, 14 | privileged: true, 15 | system_ext_specific: true, 16 | 17 | static_libs: [ 18 | "org.lineageos.platform.internal", 19 | ], 20 | 21 | optimize: { 22 | proguard_flags_files: ["proguard.flags"], 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /overlay-lineage/hardware/oneplus/doze/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | android.sensor.tilt_detector 10 | android.sensor.proximity 11 | 12 | 13 | 5.0002785 14 | 15 | 16 | -------------------------------------------------------------------------------- /sepolicy/private/pocketmode_app.te: -------------------------------------------------------------------------------- 1 | type pocketmode_app, domain; 2 | 3 | app_domain(pocketmode_app) 4 | 5 | # Allow pocketmode_app to find app_api_service 6 | allow pocketmode_app app_api_service:service_manager find; 7 | 8 | # Allow pocketmode_app read and write /data/data subdirectory 9 | allow pocketmode_app system_app_data_file:dir create_dir_perms; 10 | allow pocketmode_app system_app_data_file:{ file lnk_file } create_file_perms; 11 | 12 | # Allow pocketmode_app to enable/disable proximity_state 13 | allow pocketmode_app sysfs_proximity:file { w_file_perms getattr }; 14 | -------------------------------------------------------------------------------- /overlay-lineage/packages/apps/Aperture/app/src/main/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | true 10 | 11 | 12 | 13 | 3 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /livedisplay/vendor.lineage.livedisplay@2.0-service.oneplus_msm8998.rc: -------------------------------------------------------------------------------- 1 | on init 2 | chown system graphics /sys/devices/virtual/graphics/fb0/hbm 3 | chown system graphics /sys/devices/virtual/graphics/fb0/preset 4 | chmod 0660 /sys/devices/virtual/graphics/fb0/hbm 5 | chmod 0660 /sys/devices/virtual/graphics/fb0/preset 6 | 7 | on post-fs-data 8 | mkdir /data/vendor/display/ 0770 system graphics 9 | 10 | service vendor.livedisplay-hal-2-0 /vendor/bin/hw/vendor.lineage.livedisplay@2.0-service.oneplus_msm8998 11 | class late_start 12 | user system 13 | group system 14 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_ifaa_default.te: -------------------------------------------------------------------------------- 1 | type hal_ifaa_default, domain; 2 | type hal_ifaa_default_exec, exec_type, vendor_file_type, file_type; 3 | 4 | hal_server_domain(hal_ifaa_default, hal_ifaa) 5 | init_daemon_domain(hal_ifaa_default) 6 | 7 | allow hal_ifaa_default tee_device:chr_file rw_file_perms; 8 | allow hal_ifaa_default ion_device:chr_file r_file_perms; 9 | r_dir_file(hal_ifaa_default, firmware_file) 10 | 11 | allow hal_ifaa_default hal_perf_hwservice:hwservice_manager find; 12 | binder_call(hal_ifaa_default, hal_perf_default) 13 | 14 | get_prop(hal_ifaa_default, hwservicemanager_prop) 15 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | true 10 | 11 | 13 | true 14 | 15 | 16 | -------------------------------------------------------------------------------- /rro_overlays/CarrierConfigOverlay/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 10 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_camera_default.te: -------------------------------------------------------------------------------- 1 | hal_client_domain(hal_camera_default, hal_configstore) 2 | hal_client_domain(hal_camera_default, hal_graphics_allocator) 3 | 4 | allow hal_camera_default mnt_vendor_file:file { rw_file_perms setattr }; 5 | 6 | typeattribute hal_camera_default data_between_core_and_vendor_violators; 7 | r_dir_file(hal_camera_default, camera_data_file) 8 | 9 | get_prop(hal_camera_default, bootanim_system_prop) 10 | userdebug_or_eng(` 11 | get_prop(hal_camera_default, vendor_sensors_dbg_prop) 12 | ') 13 | get_prop(hal_camera_default, vendor_system_prop) 14 | set_prop(hal_camera_default, camera_prop) 15 | -------------------------------------------------------------------------------- /sepolicy/vendor/init_radio.te: -------------------------------------------------------------------------------- 1 | type init-radio-sh, domain; 2 | type init-radio-sh_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(init-radio-sh) 5 | 6 | allow init-radio-sh vendor_shell_exec:file rx_file_perms; 7 | allow init-radio-sh vendor_toolbox_exec:file rx_file_perms; 8 | 9 | allow init-radio-sh self:capability fowner; 10 | 11 | allow init-radio-sh vendor_mbn_data_file:dir create_dir_perms; 12 | allow init-radio-sh vendor_mbn_data_file:file create_file_perms; 13 | allow init-radio-sh vendor_radio_data_file:file create_file_perms; 14 | 15 | r_dir_file(init-radio-sh, vendor_radio_data_file) 16 | -------------------------------------------------------------------------------- /rro_overlays/WifiOverlay/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /livedisplay/vendor.lineage.livedisplay@2.0-service.oneplus_msm8998.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | vendor.lineage.livedisplay 4 | hwbinder 5 | 2.0 6 | 7 | IDisplayModes 8 | default 9 | 10 | 11 | IPictureAdjustment 12 | default 13 | 14 | 15 | ISunlightEnhancement 16 | default 17 | 18 | 19 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_fingerprint_default.te: -------------------------------------------------------------------------------- 1 | allow hal_fingerprint_default fingerprint_device:chr_file rw_file_perms; 2 | 3 | allow hal_fingerprint_default firmware_file:dir search; 4 | allow hal_fingerprint_default firmware_file:file r_file_perms; 5 | 6 | typeattribute hal_fingerprint_default data_between_core_and_vendor_violators; 7 | allow hal_fingerprint_default fingerprintd_data_file:dir rw_dir_perms; 8 | allow hal_fingerprint_default fingerprintd_data_file:file create_file_perms; 9 | 10 | allow hal_fingerprint_default sysfs_fp_detect:file r_file_perms; 11 | 12 | allow hal_fingerprint_default tee_device:chr_file rw_file_perms; 13 | allow hal_fingerprint_default self:netlink_socket create_socket_perms_no_ioctl; 14 | -------------------------------------------------------------------------------- /Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2018-2024 The LineageOS Project 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | 6 | soong_namespace { 7 | imports: [ 8 | "hardware/google/interfaces", 9 | "hardware/google/pixel" 10 | ], 11 | } 12 | 13 | install_symlink { 14 | name: "firmware_wlan_mac.bin_symlink", 15 | vendor: true, 16 | installed_location: "firmware/wlan/qca_cld/wlan_mac.bin", 17 | symlink_target: "/mnt/vendor/persist/wlan_mac.bin", 18 | } 19 | 20 | install_symlink { 21 | name: "firmware_WCNSS_qcom_cfg.ini_symlink", 22 | vendor: true, 23 | installed_location: "firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini", 24 | symlink_target: "/vendor/etc/wifi/WCNSS_qcom_cfg.ini", 25 | } 26 | -------------------------------------------------------------------------------- /pocketmode/src/org/lineageos/pocketmode/BootCompletedReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | package org.lineageos.pocketmode; 7 | 8 | import android.content.BroadcastReceiver; 9 | import android.content.Context; 10 | import android.content.Intent; 11 | import android.os.UserHandle; 12 | import android.util.Log; 13 | 14 | public class BootCompletedReceiver extends BroadcastReceiver { 15 | 16 | private static final String TAG = "OnePlusPocketMode"; 17 | 18 | @Override 19 | public void onReceive(final Context context, Intent intent) { 20 | Log.d(TAG, "Starting"); 21 | context.startServiceAsUser(new Intent(context, PocketModeService.class), 22 | UserHandle.CURRENT); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ifaa/aidl/com/android/internal/app/IIFAAService.aidl: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Copyright (C), 2014-2017, OnePlus Mobile Comm Corp., Ltd 3 | ** VENDOR_EDIT, All rights reserved. 4 | ** 5 | ** File: - IIFAAService.aidl 6 | ** Description: 7 | ** IFAAService service interface 8 | ** 9 | ** ------------------------------- Revision History: ---------------------------- 10 | ** 11 | ** ------------------------------------------------------------------------------ 12 | ** KenShen@Framework 2017-03-30 v1 add init version. 13 | 14 | ********************************************************************************/ 15 | 16 | package com.android.internal.app; 17 | 18 | interface IIFAAService { 19 | byte[] processCmdV2(in byte[] dataIn); 20 | } 21 | -------------------------------------------------------------------------------- /sepolicy/vendor/init_devstart.te: -------------------------------------------------------------------------------- 1 | type init-devstart-sh, domain; 2 | type init-devstart-sh_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(init-devstart-sh) 5 | 6 | allow init-devstart-sh vendor_shell_exec:file rx_file_perms; 7 | allow init-devstart-sh vendor_toolbox_exec:file rx_file_perms; 8 | 9 | # execute grep 10 | allow init-devstart-sh vendor_file:file rx_file_perms; 11 | 12 | # Set the vendor.qcom.devup property 13 | set_prop(init-devstart-sh, vendor_device_prop) 14 | 15 | allow init-devstart-sh ipa_dev:chr_file w_file_perms; 16 | allow init-devstart-sh sysfs_boot_adsp:dir r_dir_perms; 17 | allow init-devstart-sh sysfs_boot_adsp:file w_file_perms; 18 | allow init-devstart-sh sysfs_slpi:dir r_dir_perms; 19 | allow init-devstart-sh sysfs_slpi:file w_file_perms; 20 | 21 | # Read versions from firmware 22 | r_dir_file(init-devstart-sh, firmware_file) 23 | -------------------------------------------------------------------------------- /configs/gps/lowi.conf: -------------------------------------------------------------------------------- 1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 2 | # 3 | # LOWI Config file 4 | # 5 | # GENERAL DESCRIPTION 6 | # This file contains the config params for LOWI 7 | # 8 | # Copyright (c) 2019 Qualcomm Technologies, Inc. 9 | # All Rights Reserved. 10 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 11 | # 12 | # 2012-2013 Qualcomm Atheros, Inc. 13 | # All Rights Reserved. 14 | # Qualcomm Atheros Confidential and Proprietary. 15 | # 16 | # Export of this technology or software is regulated by the U.S. Government. 17 | # Diversion contrary to U.S. law prohibited. 18 | #=============================================================================*/ 19 | 20 | # X86 ONLY - UBUNTU: 21 | # Copy this file in the same directory where the executable is 22 | 23 | # Log level 24 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100 25 | LOWI_LOG_LEVEL = 3 26 | LOWI_USE_LOWI_LP = 0 27 | 28 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_livedisplay_oneplus_msm8998.te: -------------------------------------------------------------------------------- 1 | type hal_livedisplay_oneplus_msm8998, domain; 2 | type hal_livedisplay_oneplus_msm8998_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(hal_livedisplay_oneplus_msm8998) 5 | 6 | hal_server_domain(hal_livedisplay_oneplus_msm8998, hal_lineage_livedisplay) 7 | 8 | # Allow LiveDisplay to use vendor-binder service 9 | vndbinder_use(hal_livedisplay_oneplus_msm8998) 10 | allow hal_livedisplay_oneplus_msm8998 qdisplay_service:service_manager find; 11 | binder_call(hal_livedisplay_oneplus_msm8998, hal_graphics_composer_default) 12 | 13 | # Write DisplayMode nodes 14 | allow hal_livedisplay_oneplus_msm8998 sysfs_graphics:dir r_dir_perms; 15 | allow hal_livedisplay_oneplus_msm8998 sysfs_livedisplay_tuneable:file rw_file_perms; 16 | 17 | # Store files in /data/vendor/display and access them 18 | allow hal_livedisplay_oneplus_msm8998 display_vendor_data_file:dir rw_dir_perms; 19 | allow hal_livedisplay_oneplus_msm8998 display_vendor_data_file:file create_file_perms; 20 | -------------------------------------------------------------------------------- /rootdir/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // SPDX-FileCopyrightText: 2024 The LineageOS Project 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | 6 | // Init configuration files 7 | 8 | prebuilt_etc { 9 | name: "fstab.qcom", 10 | src: "etc/fstab.qcom", 11 | vendor: true, 12 | ramdisk_available: true, 13 | } 14 | 15 | prebuilt_etc { 16 | name: "init.qcom.usb.rc", 17 | src: "etc/init.qcom.usb.rc", 18 | sub_dir: "init/hw", 19 | vendor: true, 20 | } 21 | 22 | prebuilt_etc { 23 | name: "init.qcom.rc", 24 | src: "etc/init.qcom.rc", 25 | sub_dir: "init/hw", 26 | vendor: true, 27 | } 28 | 29 | prebuilt_etc { 30 | name: "ueventd.qcom.rc", 31 | filename: "ueventd.rc", 32 | src: "etc/ueventd.qcom.rc", 33 | vendor: true, 34 | } 35 | 36 | // Init scripts 37 | 38 | sh_binary { 39 | name: "init.devstart.sh", 40 | src: "bin/init.devstart.sh", 41 | vendor: true, 42 | } 43 | 44 | sh_binary { 45 | name: "init.radio.sh", 46 | src: "bin/init.radio.sh", 47 | vendor: true, 48 | } 49 | -------------------------------------------------------------------------------- /rro_overlays/TetheringOverlay/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 11 | 12 | "wlan\\d" 13 | 14 | 15 | 18 | 19 | "bnep\\d" 20 | "bt-pan" 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /livedisplay/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019 The LineageOS Project 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | 6 | cc_binary { 7 | name: "vendor.lineage.livedisplay@2.0-service.oneplus_msm8998", 8 | defaults: ["hidl_defaults"], 9 | init_rc: ["vendor.lineage.livedisplay@2.0-service.oneplus_msm8998.rc"], 10 | vintf_fragments: ["vendor.lineage.livedisplay@2.0-service.oneplus_msm8998.xml"], 11 | relative_install_path: "hw", 12 | srcs: [ 13 | ":vendor.lineage.livedisplay@2.0-sdm-pa", 14 | ":vendor.lineage.livedisplay@2.0-sdm-utils", 15 | ":vendor.lineage.livedisplay@2.0-sysfs-sre", 16 | "DisplayModes.cpp", 17 | "service.cpp", 18 | ], 19 | shared_libs: [ 20 | "libbase", 21 | "libbinder", 22 | "libhidlbase", 23 | "libutils", 24 | "vendor.lineage.livedisplay@2.0", 25 | ], 26 | header_libs: [ 27 | "vendor.lineage.livedisplay@2.0-sdm-headers", 28 | "vendor.lineage.livedisplay@2.0-sysfs-headers", 29 | ], 30 | proprietary: true, 31 | } 32 | -------------------------------------------------------------------------------- /pocketmode/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /configs/FOSSConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 4 | 0 5 | 128 6 | 1 7 | 60 8 | 8 9 | 4 10 | 4 11 | 0 36 72 109 145 182 218 255 12 | 0 45 73 143 253 438 717 1023 13 | 32 48 700 788 14 | 255 204 204 192 15 | 55 128 175 204 16 | 80 64 16 1 17 | 18 | -------------------------------------------------------------------------------- /rootdir/bin/init.radio.sh: -------------------------------------------------------------------------------- 1 | #! /vendor/bin/sh 2 | 3 | # 4 | # Make modem config folder and copy firmware config to that folder for RIL 5 | # 6 | if [ -f /data/vendor/modem_config/ver_info.txt ]; then 7 | prev_version_info=`cat /data/vendor/modem_config/ver_info.txt` 8 | else 9 | prev_version_info="" 10 | fi 11 | 12 | cur_version_info=`cat /vendor/firmware_mnt/verinfo/ver_info.txt` 13 | if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then 14 | # add W for group recursively before delete 15 | chmod g+w -R /data/vendor/modem_config/* 16 | rm -rf /data/vendor/modem_config/* 17 | # preserve the read only mode for all subdir and files 18 | cp --preserve=m -dr /vendor/firmware_mnt/image/modem_pr/mcfg/configs/* /data/vendor/modem_config 19 | cp --preserve=m -d /vendor/firmware_mnt/verinfo/ver_info.txt /data/vendor/modem_config/ 20 | cp --preserve=m -d /vendor/firmware/mbn_ota/mbn_ota.txt /data/vendor/modem_config/ 21 | # the group must be root, otherwise this script could not add "W" for group recursively 22 | chown -hR radio.root /data/vendor/modem_config/* 23 | fi 24 | chmod g-w /data/vendor/modem_config 25 | echo 1 > /data/vendor/radio/copy_complete 26 | -------------------------------------------------------------------------------- /ifaa/java/org/ifaa/android/manager/IFAAManager.java: -------------------------------------------------------------------------------- 1 | package org.ifaa.android.manager; 2 | 3 | import android.content.Context; 4 | 5 | public abstract class IFAAManager { 6 | 7 | /** 8 | * 返回手机系统上支持的校验方式,目前IFAF协议1.0版本指纹为0x01、虹膜为0x02 9 | */ 10 | public abstract int getSupportBIOTypes(Context context); 11 | 12 | /** 13 | * 启动系统的指纹/虹膜管理应用界面,让用户进行指纹录入。指纹录入是在系统的指纹管理应用中实现的, 14 | * 本函数的作用只是将指纹管理应用运行起来,直接进行页面跳转,方便用户录入。 15 | * @param context 16 | * @param authType 生物特征识别类型,指纹为1,虹膜为2 17 | * @return 0,成功启动指纹管理应用;-1,启动指纹管理应用失败。 18 | */ 19 | public abstract int startBIOManager(Context context, int authType); 20 | 21 | /** 22 | * 通过ifaateeclient的so文件实现REE到TA的通道 23 | * @param context 24 | * @param param 用于传输到IFAA TA的数据buffer 25 | * @return IFAA TA返回给REE数据buffer 26 | */ 27 | public native byte[] processCmd(Context context, byte[] param); 28 | 29 | /** 30 | * 获取设备型号,同一款机型型号需要保持一致 31 | */ 32 | public abstract String getDeviceModel(); 33 | 34 | /** 35 | * 获取IFAAManager接口定义版本,目前为1 36 | */ 37 | public abstract int getVersion(); 38 | 39 | /** 40 | * load so to communicate from REE to TEE 41 | */ 42 | static { 43 | System.loadLibrary("teeclientjni");//teeclientjni for TA test binary //ifaateeclient 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /sepolicy/vendor/genfs_contexts: -------------------------------------------------------------------------------- 1 | genfscon debugfs /system_stats u:object_r:debugfs_rpm:s0 2 | userdebug_or_eng(` 3 | genfscon debugfs /rmt_storage/rmts u:object_r:qti_debugfs:s0 4 | genfscon debugfs /msm_core u:object_r:qti_debugfs:s0 5 | ') 6 | 7 | genfscon proc /touchpanel u:object_r:proc_touchpanel:s0 8 | genfscon proc /tri-state-key u:object_r:proc_touchpanel:s0 9 | genfscon proc /sys/kernel/boot_reason u:object_r:proc_alarm_boot:s0 10 | 11 | genfscon sysfs /devices/soc/soc:fingerprint_detect/sensor_version u:object_r:sysfs_fp_detect:s0 12 | genfscon sysfs /devices/virtual/graphics/fb0 u:object_r:sysfs_graphics:s0 13 | 14 | # LiveDisplay 15 | genfscon sysfs /devices/virtual/graphics/fb0/num_presets u:object_r:sysfs_livedisplay_tuneable:s0 16 | genfscon sysfs /devices/virtual/graphics/fb0/preset u:object_r:sysfs_livedisplay_tuneable:s0 17 | 18 | genfscon sysfs /project_info u:object_r:sysfs_project_info:s0 19 | 20 | genfscon sysfs /devices/soc/800f000.qcom,spmi/spmi-0/spmi0-02/800f000.qcom,spmi:qcom,pmi8998@2:gpio-leds/leds/button-backlight/brightness u:object_r:sysfs_graphics:s0 21 | genfscon sysfs /devices/soc/800f000.qcom,spmi/spmi-0/spmi0-03/800f000.qcom,spmi:qcom,pmi8998@3:qcom,leds@d000/leds/rgb/rgb_blink u:object_r:sysfs_graphics:s0 22 | -------------------------------------------------------------------------------- /sepolicy/vendor/property_contexts: -------------------------------------------------------------------------------- 1 | # Bluetooth 2 | persist.vendor.bt.address u:object_r:vendor_bluetooth_prop:s0 3 | ro.vendor.bt.bdaddr_path u:object_r:vendor_bluetooth_prop:s0 4 | 5 | # Camera 6 | camera.on u:object_r:camera_prop:s0 7 | persist.camera. u:object_r:camera_prop:s0 8 | persist.vendor.camera. u:object_r:camera_prop:s0 9 | vendor.camera. u:object_r:camera_prop:s0 10 | 11 | # Display 12 | sdm.disable_hdr_lut_gen u:object_r:vendor_display_prop:s0 13 | 14 | # Fingerprint 15 | gf.debug.dump_data u:object_r:vendor_default_prop:s0 16 | 17 | # Firmware 18 | ro.build.expect. u:object_r:exported_default_prop:s0 19 | 20 | # Init 21 | vendor.qcom.devup u:object_r:vendor_device_prop:s0 22 | 23 | # Mediacodec 24 | gpu.stats.debug.level u:object_r:vendor_video_prop:s0 25 | 26 | # RIL 27 | persist.sys.assert.panic u:object_r:radio_control_prop:s0 28 | persist.sys.oem.region u:object_r:radio_control_prop:s0 29 | vendor.oem.device.imeicache0 u:object_r:vendor_radio_prop:s0 30 | vendor.oem.device.imeicache1 u:object_r:vendor_radio_prop:s0 31 | 32 | # Thermal 33 | sys.thermal. u:object_r:thermal_engine_prop:s0 34 | -------------------------------------------------------------------------------- /touch/include/TouchscreenGestureConfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2025 The LineageOS Project 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | #ifndef TOUCH_ONEPLUS_TOUCHSCREENGESTURECONFIG_H 7 | #define TOUCH_ONEPLUS_TOUCHSCREENGESTURECONFIG_H 8 | 9 | #include 10 | 11 | namespace aidl { 12 | namespace vendor { 13 | namespace lineage { 14 | namespace touch { 15 | 16 | const std::map kGestureInfoMap = { 17 | {0, {251, "Two fingers down swipe", "/proc/touchpanel/double_swipe_enable"}}, 18 | {1, {252, "Up arrow", "/proc/touchpanel/up_arrow_enable"}}, 19 | {2, {254, "Right arrow", "/proc/touchpanel/right_arrow_enable"}}, 20 | {3, {255, "Down arrow", "/proc/touchpanel/down_arrow_enable"}}, 21 | {4, {253, "Left arrow", "/proc/touchpanel/left_arrow_enable"}}, 22 | {5, {66, "One finger up swipe", "/proc/touchpanel/up_swipe_enable"}}, 23 | {6, {65, "One finger right swipe", "/proc/touchpanel/right_swipe_enable"}}, 24 | {7, {64, "One finger down swipe", "/proc/touchpanel/down_swipe_enable"}}, 25 | {8, {63, "One finger left swipe", "/proc/touchpanel/left_swipe_enable"}}, 26 | {9, {247, "Letter M", "/proc/touchpanel/letter_m_enable"}}, 27 | {10, {250, "Letter O", "/proc/touchpanel/letter_o_enable"}}, 28 | {11, {248, "Letter S", "/proc/touchpanel/letter_s_enable"}}, 29 | {12, {246, "Letter W", "/proc/touchpanel/letter_w_enable"}}, 30 | }; 31 | 32 | } // namespace touch 33 | } // namespace lineage 34 | } // namespace vendor 35 | } // namespace aidl 36 | 37 | #endif // TOUCH_ONEPLUS_TOUCHSCREENGESTURE_H 38 | -------------------------------------------------------------------------------- /framework_compatibility_matrix.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | vendor.oneplus.camera.CameraHIDL 4 | hwbinder 5 | 1.0 6 | 7 | IOnePlusCameraProvider 8 | default 9 | 10 | 11 | 12 | vendor.oneplus.fingerprint.extension 13 | hwbinder 14 | 1.0 15 | 16 | IVendorFingerprintExtensions 17 | default 18 | 19 | 20 | 21 | vendor.oneplus.hardware.drmkey 22 | hwbinder 23 | 1.0 24 | 25 | IOneplusDrmKey 26 | default 27 | 28 | 29 | 30 | vendor.oneplus.hardware.ifaa 31 | hwbinder 32 | 2.0 33 | 34 | IOneplusIfaa 35 | default 36 | 37 | 38 | 39 | vendor.nxp.nxpnfc 40 | hwbinder 41 | 1.0 42 | 43 | INxpNfc 44 | default 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /livedisplay/DisplayModes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019-2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYMODES_H 8 | #define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYMODES_H 9 | 10 | #include 11 | #include 12 | 13 | namespace vendor { 14 | namespace lineage { 15 | namespace livedisplay { 16 | namespace V2_0 { 17 | namespace implementation { 18 | 19 | using ::android::sp; 20 | using ::android::hardware::Return; 21 | using ::android::hardware::Void; 22 | 23 | class DisplayModes : public IDisplayModes { 24 | public: 25 | DisplayModes(); 26 | 27 | using DisplayModeSetCallback = std::function; 28 | inline void registerDisplayModeSetCallback(DisplayModeSetCallback callback) { 29 | mOnDisplayModeSet = callback; 30 | } 31 | 32 | // Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayModes follow. 33 | Return getDisplayModes(getDisplayModes_cb resultCb) override; 34 | Return getCurrentDisplayMode(getCurrentDisplayMode_cb resultCb) override; 35 | Return getDefaultDisplayMode(getDefaultDisplayMode_cb ResultCb) override; 36 | Return setDisplayMode(int32_t modeID, bool makeDefault) override; 37 | 38 | private: 39 | static const std::map kModeMap; 40 | int32_t mCurrentModeId; 41 | int32_t mDefaultModeId; 42 | DisplayModeSetCallback mOnDisplayModeSet; 43 | }; 44 | 45 | } // namespace implementation 46 | } // namespace V2_0 47 | } // namespace livedisplay 48 | } // namespace lineage 49 | } // namespace vendor 50 | 51 | #endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYMODES_H 52 | -------------------------------------------------------------------------------- /system.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 | ro.af.client_heap_size_kbyte=7168 7 | ro.config.media_vol_steps=25 8 | ro.config.vc_call_vol_steps=6 9 | 10 | # Camera 11 | camera.disable_zsl_mode=1 12 | 13 | # Charger 14 | ro.charger.disable_init_blank=true 15 | ro.charger.enable_suspend=true 16 | 17 | # DRM 18 | drm.service.enabled=true 19 | 20 | # Fastbootd 21 | ro.fastbootd.available=true 22 | 23 | # Filesystem 24 | fs_mgr.overlayfs.prefer_cache_backing_storage=true 25 | 26 | # FRP 27 | ro.frp.pst=/dev/block/bootdevice/by-name/config 28 | 29 | # Graphics 30 | debug.renderengine.backend=skiaglthreaded 31 | debug.sf.enable_hwc_vds=1 32 | debug.sf.hw=1 33 | dev.pm.dyn_samplingrate=1 34 | persist.demo.hdmirotationlock=false 35 | persist.hwc.enable_vds=1 36 | persist.sys.wfd.virtual=0 37 | ro.opengles.version=196610 38 | 39 | # Media 40 | media.stagefright.thumbnail.prefer_hw_codecs=true 41 | vidc.enc.dcvs.extra-buff-count=2 42 | 43 | # OEM Unlock 44 | ro.oem_unlock_supported=1 45 | 46 | # RIL 47 | keyguard.no_require_sim=true 48 | persist.radio.multisim.config=dsds 49 | ril.subscription.types=NV,RUIM 50 | ro.telephony.call_ring.multiple=false 51 | ro.telephony.default_network=22,20 52 | telephony.lteOnCdmaDevice=1 53 | 54 | # SurfaceFlinger 55 | ro.surface_flinger.force_hwc_copy_for_virtual_displays=true 56 | ro.surface_flinger.max_frame_buffer_acquired_buffers=3 57 | ro.surface_flinger.max_virtual_display_dimension=4096 58 | ro.surface_flinger.protected_contents=true 59 | 60 | # TimeService 61 | persist.timed.enable=true 62 | 63 | # VoLTE 64 | persist.dbg.volte_avail_ovr=1 65 | persist.dbg.vt_avail_ovr=1 66 | persist.dbg.wfc_avail_ovr=1 67 | 68 | # Wi-Fi 69 | wifi.interface=wlan0 70 | -------------------------------------------------------------------------------- /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 | [vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti] 23 | mode: 0755 24 | user: AID_BLUETOOTH 25 | group: AID_BLUETOOTH 26 | caps: BLOCK_SUSPEND NET_ADMIN 27 | 28 | [vendor/bin/pm-service] 29 | mode: 0755 30 | user: AID_SYSTEM 31 | group: AID_SYSTEM 32 | caps: NET_BIND_SERVICE 33 | 34 | [vendor/bin/pd-mapper] 35 | mode: 0755 36 | user: AID_SYSTEM 37 | group: AID_SYSTEM 38 | caps: NET_BIND_SERVICE 39 | 40 | [vendor/bin/imsdatadaemon] 41 | mode: 0755 42 | user: AID_RADIO 43 | group: AID_RADIO 44 | caps: NET_BIND_SERVICE 45 | 46 | [vendor/bin/ims_rtp_daemon] 47 | mode: 0755 48 | user: AID_RADIO 49 | group: AID_RADIO 50 | caps: NET_BIND_SERVICE 51 | 52 | [vendor/bin/imsrcsd] 53 | mode: 0755 54 | user: AID_RADIO 55 | group: AID_RADIO 56 | caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM 57 | 58 | [vendor/bin/cnd] 59 | mode: 0755 60 | user: AID_SYSTEM 61 | group: AID_SYSTEM 62 | caps: NET_BIND_SERVICE BLOCK_SUSPEND NET_ADMIN 63 | 64 | [vendor/bin/slim_daemon] 65 | mode: 0755 66 | user: AID_GPS 67 | group: AID_GPS 68 | caps: NET_BIND_SERVICE 69 | 70 | [vendor/bin/loc_launcher] 71 | mode: 0755 72 | user: AID_GPS 73 | group: AID_GPS 74 | caps: SETUID SETGID 75 | 76 | [vendor/bin/xtwifi-client] 77 | mode: 0755 78 | user: AID_GPS 79 | group: AID_GPS 80 | caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM 81 | 82 | [vendor/bin/sensors.qti] 83 | mode: 0755 84 | user: AID_SYSTEM 85 | group: AID_SYSTEM 86 | caps: NET_BIND_SERVICE 87 | 88 | [vendor/firmware_mnt/image/*] 89 | mode: 0771 90 | user: AID_SYSTEM 91 | group: AID_SYSTEM 92 | caps: 0 93 | 94 | [persist/] 95 | mode: 0771 96 | user: AID_SYSTEM 97 | group: AID_SYSTEM 98 | caps: 0 99 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | true 10 | 11 | 12 | true 13 | 14 | 17 | true 18 | 19 | 23 | true 24 | 25 | 26 | true 27 | 28 | 29 | true 30 | 31 | 32 | false 33 | 34 | 35 | org.codeaurora.ims 36 | 37 | 38 | org.codeaurora.ims 39 | 40 | 41 | -------------------------------------------------------------------------------- /configs/system_ext-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 | -------------------------------------------------------------------------------- /configs/gps/flp.conf: -------------------------------------------------------------------------------- 1 | ################################### 2 | ##### FLP settings ##### 3 | ################################### 4 | 5 | ################################### 6 | # FLP BATCH SIZE 7 | ################################### 8 | # The number of batched locations 9 | # requested to modem. The desired number 10 | # defined below may not be satisfied, as 11 | # the modem can only return the number 12 | # of batched locations that can be allocated, 13 | # which is limited by memory. The default 14 | # batch size defined as 20 as below. 15 | BATCH_SIZE=20 16 | 17 | ################################### 18 | # FLP OUTDOOR TRIP BATCH SIZE 19 | ################################### 20 | # The number of batched locations 21 | # requested to modem for outdoor 22 | # trip batching. The desired number 23 | # defined below may not be satisfied, as 24 | # the modem can only return the number 25 | # of batched locations that can be allocated, 26 | # which is limited by memory. The default 27 | # trip batch size defined as 600 as below. 28 | OUTDOOR_TRIP_BATCH_SIZE=600 29 | 30 | ################################### 31 | # FLP BATCHING SESSION TIMEOUT 32 | ################################### 33 | # Duration with which batch session timeout 34 | # happens in milliseconds. If not specified 35 | # or set to zero, batching session timeout 36 | # defaults to 20 seconds by the modem. 37 | # BATCH_SESSION_TIMEOUT=20000 38 | 39 | ################################### 40 | # FLP BATCHING ACCURACY 41 | ################################### 42 | # Set to one of the defined values below 43 | # to define the accuracy of batching. 44 | # If not specified, accuracy defaults 45 | # to LOW. 46 | # FLP BATCHING ACCURACY values: 47 | # Low accuracy = 0 48 | # Medium accuracy = 1 49 | # High accuracy = 2 50 | ACCURACY=1 51 | 52 | #################################### 53 | # By default if network fixes are not sensor assisted 54 | # these fixes must be dropped. This parameter adds an exception 55 | # for targets where there is no PDR and we still want to 56 | # report out network fixes 57 | # 0: MUST NOT ALLOW NETWORK FIXES 58 | # 1: ALLOW NETWORK FIXES 59 | #################################### 60 | ALLOW_NETWORK_FIXES = 0 61 | -------------------------------------------------------------------------------- /configs/qti_whitelist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /livedisplay/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019-2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #define LOG_TAG "vendor.lineage.livedisplay@2.0-service.oneplus_msm8998" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "DisplayModes.h" 16 | 17 | using ::vendor::lineage::livedisplay::V2_0::IDisplayModes; 18 | using ::vendor::lineage::livedisplay::V2_0::IPictureAdjustment; 19 | using ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement; 20 | using ::vendor::lineage::livedisplay::V2_0::implementation::DisplayModes; 21 | using ::vendor::lineage::livedisplay::V2_0::sdm::PictureAdjustment; 22 | using ::vendor::lineage::livedisplay::V2_0::sdm::SDMController; 23 | using ::vendor::lineage::livedisplay::V2_0::sysfs::SunlightEnhancement; 24 | 25 | int main() { 26 | std::shared_ptr controller = std::make_shared(); 27 | android::sp modesService = new DisplayModes(); 28 | android::sp paService = new PictureAdjustment(controller); 29 | android::sp seService = new SunlightEnhancement(); 30 | 31 | LOG(DEBUG) << "LiveDisplay HAL service is starting."; 32 | 33 | android::hardware::configureRpcThreadpool(1 /*threads*/, true /*callerWillJoin*/); 34 | 35 | if (modesService->registerAsService() != android::OK) { 36 | LOG(ERROR) << "Cannot register display modes HAL service."; 37 | return 1; 38 | } 39 | 40 | if (paService->registerAsService() != android::OK) { 41 | LOG(ERROR) << "Cannot register picture adjustment HAL service."; 42 | return 1; 43 | } 44 | 45 | if (seService->registerAsService() != android::OK) { 46 | LOG(ERROR) << "Cannot register sunlight enhancement HAL service."; 47 | return 1; 48 | } 49 | 50 | LOG(INFO) << "LiveDisplay HAL service is ready."; 51 | 52 | android::hardware::joinRpcThreadpool(); 53 | 54 | LOG(ERROR) << "LiveDisplay HAL service failed to join thread pool."; 55 | return 1; 56 | } 57 | -------------------------------------------------------------------------------- /sepolicy/vendor/file_contexts: -------------------------------------------------------------------------------- 1 | # Block devices 2 | /dev/block/platform/soc/1da4000\.ufshc/by-name/oem_dycnvbk u:object_r:modem_efs_partition_device:s0 3 | /dev/block/platform/soc/1da4000\.ufshc/by-name/oem_stanvbk u:object_r:modem_efs_partition_device:s0 4 | /dev/block/platform/soc/1da4000\.ufshc/by-name/config u:object_r:frp_block_device:s0 5 | 6 | # DASH 7 | /vendor/bin/dashd u:object_r:dashd_exec:s0 8 | 9 | # Devices 10 | /dev/dash u:object_r:dash_device:s0 11 | 12 | # Fingerprint 13 | /data/system/users/0/fpdata(/.*)? u:object_r:fingerprintd_data_file:s0 14 | 15 | # HALs 16 | /(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service-custom u:object_r:hal_fingerprint_default_exec:s0 17 | /(vendor|system/vendor)/bin/hw/android\.hardware\.power-service\.oneplus-libperfmgr u:object_r:hal_power_default_exec:s0 18 | /(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.oneplus_msm8998 u:object_r:hal_livedisplay_oneplus_msm8998_exec:s0 19 | /(vendor|system/vendor)/bin/hw/vendor\.oneplus\.camera\.CameraHIDL@1\.0-service u:object_r:hal_cameraHIDL_default_exec:s0 20 | /(vendor|system/vendor)/bin/hw/vendor\.oneplus\.hardware\.drmkey@1\.0-service u:object_r:hal_drm_default_exec:s0 21 | /(vendor|system/vendor)/bin/hw/vendor\.oneplus\.hardware\.ifaa@2\.0-service u:object_r:hal_ifaa_default_exec:s0 22 | 23 | # Init 24 | /(vendor|system/vendor)/bin/init\.devstart\.sh u:object_r:init-devstart-sh_exec:s0 25 | 26 | # Power supply 27 | /sys/devices/soc/.*ssusb/power_supply/usb(/.*)? u:object_r:sysfs_usb_supply:s0 28 | /sys/devices/soc/800f000\.qcom,spmi/spmi-0/spmi0-02/800f000\.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/power_supply/main(/.*)? u:object_r:sysfs_usb_supply:s0 29 | /sys/devices/soc/800f000\.qcom,spmi/spmi-0/spmi0-02/800f000\.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/power_supply/usb(/.*)? u:object_r:sysfs_usb_supply:s0 30 | /sys/devices/soc/800f000\.qcom,spmi/spmi-0/spmi0-02/800f000\.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/power_supply/battery(/.*)? u:object_r:sysfs_battery_supply:s0 31 | /sys/devices/soc/800f000\.qcom,spmi/spmi-0/spmi0-02/800f000\.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/power_supply/dc(/.*)? u:object_r:sysfs_battery_supply:s0 32 | /sys/devices/soc/800f000\.qcom,spmi/spmi-0/spmi0-02/800f000\.qcom,spmi:qcom,pmi8998@2:qpnp,fg/power_supply/bms(/.*)? u:object_r:sysfs_battery_supply:s0 33 | 34 | # Ril 35 | /(vendor|system/vendor)/bin/init\.radio\.sh u:object_r:init-radio-sh_exec:s0 36 | 37 | # Root symlink 38 | /persist u:object_r:mnt_vendor_file:s0 39 | -------------------------------------------------------------------------------- /pocketmode/src/org/lineageos/pocketmode/ProximitySensor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * Copyright (c) 2018 The LineageOS Project 4 | * 5 | * SPDX-License-Identifier: Apache-2.0 6 | */ 7 | package org.lineageos.pocketmode; 8 | 9 | import android.content.Context; 10 | import android.hardware.Sensor; 11 | import android.hardware.SensorEvent; 12 | import android.hardware.SensorEventListener; 13 | import android.hardware.SensorManager; 14 | import android.os.FileUtils; 15 | import android.os.SystemProperties; 16 | import android.util.Log; 17 | 18 | import java.io.IOException; 19 | import java.util.concurrent.ExecutorService; 20 | import java.util.concurrent.Executors; 21 | 22 | public class ProximitySensor implements SensorEventListener { 23 | 24 | private static final boolean DEBUG = false; 25 | private static final String TAG = "PocketModeProximity"; 26 | 27 | private final String FPC_FILE; 28 | 29 | private SensorManager mSensorManager; 30 | private Sensor mSensor; 31 | private Context mContext; 32 | private ExecutorService mExecutorService; 33 | 34 | public ProximitySensor(Context context) { 35 | mContext = context; 36 | mSensorManager = mContext.getSystemService(SensorManager.class); 37 | mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); 38 | mExecutorService = Executors.newSingleThreadExecutor(); 39 | 40 | switch (android.os.Build.DEVICE) { 41 | case "OnePlus5": 42 | FPC_FILE = "/sys/devices/soc/soc:fpc_fpc1020/proximity_state"; 43 | break; 44 | case "OnePlus5T": 45 | FPC_FILE = "/sys/devices/soc/soc:goodix_fp/proximity_state"; 46 | break; 47 | default: 48 | FPC_FILE = "/dev/null"; 49 | Log.e(TAG, "Invalid device model found: " + android.os.Build.DEVICE); 50 | break; 51 | } 52 | } 53 | 54 | @Override 55 | public void onSensorChanged(SensorEvent event) { 56 | setFPProximityState(event.values[0] < mSensor.getMaximumRange()); 57 | } 58 | 59 | @Override 60 | public void onAccuracyChanged(Sensor sensor, int accuracy) { 61 | /* Empty */ 62 | } 63 | 64 | private void setFPProximityState(boolean isNear) { 65 | try { 66 | FileUtils.stringToFile(FPC_FILE, isNear ? "1" : "0"); 67 | } catch (IOException e) { 68 | Log.e(TAG, "Failed to write to " + FPC_FILE, e); 69 | } 70 | } 71 | 72 | protected void enable() { 73 | if (DEBUG) Log.d(TAG, "Enabling"); 74 | mExecutorService.submit(() -> { 75 | mSensorManager.registerListener(this, mSensor, SensorManager.SENSOR_DELAY_NORMAL); 76 | }); 77 | } 78 | 79 | protected void disable() { 80 | if (DEBUG) Log.d(TAG, "Disabling"); 81 | mExecutorService.submit(() -> { 82 | mSensorManager.unregisterListener(this, mSensor); 83 | // Ensure FP is left enabled 84 | setFPProximityState(/* isNear */ false); 85 | }); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /rootdir/etc/fstab.qcom: -------------------------------------------------------------------------------- 1 | # Android fstab file. 2 | # The filesystem that contains the filesystem checker binary (typically /system) cannot 3 | # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK 4 | 5 | # 6 | /dev/block/bootdevice/by-name/boot /boot emmc defaults recoveryonly 7 | /dev/block/bootdevice/by-name/recovery /recovery emmc defaults recoveryonly 8 | 9 | /dev/block/by-name/system /system ext4 ro,barrier=1,discard wait,first_stage_mount 10 | /dev/block/by-name/vendor /vendor ext4 ro,barrier=1,discard wait,first_stage_mount 11 | 12 | /dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,noatime,barrier=1,noauto_da_alloc wait,check,latemount,fileencryption=ice,quota,reservedsize=128M 13 | /dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,barrier=1 wait,check,formattable 14 | /dev/block/bootdevice/by-name/misc /misc emmc defaults defaults 15 | /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 16 | /dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=222,fmask=333,context=u:object_r:bt_firmware_file:s0 wait 17 | /dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait 18 | /dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait 19 | 20 | /devices/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.0.auto/usb* auto auto defaults voldmanaged=usb:auto 21 | 22 | /dev/block/zram0 none swap defaults zramsize=25% 23 | -------------------------------------------------------------------------------- /livedisplay/DisplayModes.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019-2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #define LOG_TAG "DisplayModesService" 8 | 9 | #include 10 | #include 11 | 12 | #include "DisplayModes.h" 13 | 14 | namespace vendor { 15 | namespace lineage { 16 | namespace livedisplay { 17 | namespace V2_0 { 18 | namespace implementation { 19 | 20 | static const std::string kModeBasePath = "/sys/devices/virtual/graphics/fb0/preset"; 21 | static const std::string kAvailableModesPath = "/sys/devices/virtual/graphics/fb0/num_presets"; 22 | static const std::string kDefaultPath = "/data/vendor/display/default_display_mode"; 23 | 24 | const std::map DisplayModes::kModeMap = { 25 | {0, "Standard"}, {1, "sRGB"}, {2, "DCI-P3"}, {3, "OnePlus"}, {4, "Adaptive"}, 26 | }; 27 | 28 | DisplayModes::DisplayModes() : mCurrentModeId(0), mDefaultModeId(0) { 29 | std::ifstream defaultFile(kDefaultPath); 30 | 31 | defaultFile >> mDefaultModeId; 32 | LOG(DEBUG) << "Default file read result " << mDefaultModeId << " fail " << defaultFile.fail(); 33 | 34 | setDisplayMode(mDefaultModeId, false); 35 | } 36 | 37 | // Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayModes follow. 38 | Return DisplayModes::getDisplayModes(getDisplayModes_cb resultCb) { 39 | std::vector modes; 40 | std::ifstream numFile(kAvailableModesPath); 41 | int32_t maxModeCount; 42 | 43 | numFile >> maxModeCount; 44 | if (numFile.fail()) { 45 | LOG(ERROR) << "Failed to read available display modes " << numFile.fail(); 46 | } 47 | if (maxModeCount > 0) { 48 | for (const auto& entry : kModeMap) { 49 | modes.push_back({entry.first, entry.second}); 50 | if (entry.first == maxModeCount - 1) break; 51 | } 52 | } 53 | resultCb(modes); 54 | return Void(); 55 | } 56 | 57 | Return DisplayModes::getCurrentDisplayMode(getCurrentDisplayMode_cb resultCb) { 58 | resultCb({mCurrentModeId, kModeMap.at(mCurrentModeId)}); 59 | return Void(); 60 | } 61 | 62 | Return DisplayModes::getDefaultDisplayMode(getDefaultDisplayMode_cb resultCb) { 63 | resultCb({mDefaultModeId, kModeMap.at(mDefaultModeId)}); 64 | return Void(); 65 | } 66 | 67 | Return DisplayModes::setDisplayMode(int32_t modeID, bool makeDefault) { 68 | const auto iter = kModeMap.find(modeID); 69 | if (iter == kModeMap.end()) { 70 | return false; 71 | } 72 | std::ofstream file(kModeBasePath); 73 | file << modeID; 74 | if (file.fail()) { 75 | LOG(ERROR) << "Failed to write to " << (kModeBasePath); 76 | } 77 | mCurrentModeId = iter->first; 78 | if (makeDefault) { 79 | std::ofstream defaultFile(kDefaultPath); 80 | defaultFile << iter->first; 81 | if (!defaultFile.fail()) { 82 | mDefaultModeId = iter->first; 83 | } 84 | } 85 | if (mOnDisplayModeSet) { 86 | mOnDisplayModeSet(); 87 | } 88 | return true; 89 | } 90 | 91 | } // namespace implementation 92 | } // namespace V2_0 93 | } // namespace livedisplay 94 | } // namespace lineage 95 | } // namespace vendor 96 | -------------------------------------------------------------------------------- /overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 21 | 64 22 | 23 | 25 | true 26 | 100 27 | true 28 | 29 | 42 | 107 43 | 44 | 46 | 2500 47 | 25000 48 | 49 | 51 | 8000 52 | 5000 53 | 54 | 55 | 20000 56 | 57 | 59 | 60 | com.android.camera 61 | com.oneplus.camera 62 | org.codeaurora.snapcam 63 | org.lineageos.aperture 64 | org.lineageos.aperture.dev 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /extract-files.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3 2 | # 3 | # SPDX-FileCopyrightText: 2024 The LineageOS Project 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | 7 | from extract_utils.fixups_blob import ( 8 | blob_fixup, 9 | blob_fixups_user_type, 10 | ) 11 | from extract_utils.fixups_lib import ( 12 | lib_fixup_remove, 13 | lib_fixups, 14 | lib_fixups_user_type, 15 | ) 16 | from extract_utils.main import ( 17 | ExtractUtils, 18 | ExtractUtilsModule, 19 | ) 20 | 21 | namespace_imports = [ 22 | 'device/oneplus/msm8998-common', 23 | 'hardware/qcom-caf/msm8998', 24 | 'hardware/qcom-caf/wlan', 25 | 'hardware/oneplus', 26 | 'vendor/qcom/opensource/dataservices', 27 | ] 28 | 29 | def lib_fixup_vendor_suffix(lib: str, partition: str, *args, **kwargs): 30 | return f'{lib}_{partition}' if partition == 'vendor' else None 31 | 32 | lib_fixups: lib_fixups_user_type = { 33 | **lib_fixups, 34 | ( 35 | 'com.qualcomm.qti.dpm.api@1.0', 36 | 'vendor.qti.imsrtpservice@3.0', 37 | ): lib_fixup_vendor_suffix, 38 | ( 39 | ): lib_fixup_remove, 40 | } 41 | 42 | blob_fixups: blob_fixups_user_type = { 43 | 'product/etc/permissions/vendor-qti-hardware-sensorscalibrate.xml': blob_fixup() 44 | .binary_regex_replace(b'/system/framework/', b'/system/product/framework/'), 45 | ( 46 | 'system_ext/lib64/lib-imsvideocodec.so', 47 | 'system_ext/lib64/lib-imscamera.so', 48 | ): blob_fixup() 49 | .add_needed('libgui_shim.so') 50 | .replace_needed('libqdMetaData.so', 'libqdMetaData.system.so'), 51 | 'vendor/etc/permissions/com.fingerprints.extension.xml': blob_fixup() 52 | .binary_regex_replace(b'/system/framework/', b'/vendor/framework/'), 53 | ( 54 | 'vendor/lib/libSonyIMX371RmscLibrary.so', 55 | 'vendor/lib/libmms_gyro_vstab.so', 56 | 'vendor/lib/libmms_gyro_vstab_auth.so', 57 | ): blob_fixup() 58 | .replace_needed('libstdc++.so', 'libstdc++_vendor.so'), 59 | 'vendor/lib64/libwvhidl.so': blob_fixup() 60 | .add_needed('libcrypto_shim.so'), 61 | ( 62 | 'vendor/lib/libOGLManager.so', 63 | 'vendor/lib64/libOGLManager.so', 64 | ): blob_fixup() 65 | .clear_symbol_version('AHardwareBuffer_allocate') 66 | .clear_symbol_version('AHardwareBuffer_describe') 67 | .clear_symbol_version('AHardwareBuffer_lock') 68 | .clear_symbol_version('AHardwareBuffer_release') 69 | .clear_symbol_version('AHardwareBuffer_unlock'), 70 | ( 71 | 'vendor/lib/libmmcamera_faceproc.so', 72 | 'vendor/lib64/libmmcamera_faceproc.so', 73 | ): blob_fixup() 74 | .clear_symbol_version('__aeabi_memcpy') 75 | .clear_symbol_version('__aeabi_memset') 76 | .clear_symbol_version('__gnu_Unwind_Find_exidx'), 77 | ( 78 | 'vendor/lib/libEIS.so', 79 | 'vendor/lib64/libEIS.so', 80 | ): blob_fixup() 81 | .add_needed('libsensor1.so'), 82 | } # fmt: skip 83 | 84 | module = ExtractUtilsModule( 85 | 'msm8998-common', 86 | 'oneplus', 87 | blob_fixups=blob_fixups, 88 | lib_fixups=lib_fixups, 89 | namespace_imports=namespace_imports, 90 | ) 91 | 92 | if __name__ == '__main__': 93 | utils = ExtractUtils.device(module) 94 | utils.run() 95 | -------------------------------------------------------------------------------- /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_24_BIT_PACKED 17 | sampling_rates 48000 18 | bit_width 24 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 | deep_buffer { 29 | flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER 30 | formats AUDIO_FORMAT_PCM_24_BIT_PACKED 31 | sampling_rates 48000 32 | bit_width 24 33 | app_type 69936 34 | } 35 | direct_pcm_16 { 36 | flags AUDIO_OUTPUT_FLAG_DIRECT 37 | formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT 38 | sampling_rates 44100|48000|88200|96000|176400|192000 39 | bit_width 16 40 | app_type 69936 41 | } 42 | direct_pcm_24 { 43 | flags AUDIO_OUTPUT_FLAG_DIRECT 44 | formats 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|352800|384000 46 | bit_width 24 47 | app_type 69940 48 | } 49 | direct_pcm_32 { 50 | flags AUDIO_OUTPUT_FLAG_DIRECT 51 | formats AUDIO_FORMAT_PCM_32_BIT 52 | sampling_rates 44100|48000|88200|96000|176400|192000|352800|384000 53 | bit_width 32 54 | app_type 69942 55 | } 56 | compress_passthrough { 57 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING|AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH 58 | formats AUDIO_FORMAT_DTS|AUDIO_FORMAT_DTS_HD|AUDIO_FORMAT_DSD 59 | sampling_rates 32000|44100|48000|88200|96000|176400|192000|352800 60 | bit_width 16 61 | app_type 69941 62 | } 63 | compress_offload_16 { 64 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING 65 | 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 66 | sampling_rates 44100|48000|88200|96000|176400|192000 67 | bit_width 16 68 | app_type 69936 69 | } 70 | compress_offload_24 { 71 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING 72 | 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 73 | sampling_rates 44100|48000|88200|96000|176400|192000 74 | bit_width 24 75 | app_type 69940 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /releasetools/releasetools.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2009 The Android Open Source Project 3 | # Copyright (c) 2011, The Linux Foundation. All rights reserved. 4 | # Copyright (C) 2017 The LineageOS Project 5 | # 6 | # SPDX-License-Identifier: Apache-2.0 7 | # 8 | 9 | import common 10 | import os 11 | import re 12 | 13 | def FullOTA_Assertions(info): 14 | AddVendorAssertion(info) 15 | 16 | firmware_files = [ 17 | os.path.basename(item) 18 | for item in info.input_zip.namelist() 19 | if item.startswith("RADIO/") 20 | ] 21 | 22 | if not firmware_files: 23 | # Firmware files not present, assert 24 | AddModemAssertion(info) 25 | return 26 | 27 | # Firmware files present, copy to OTA zip 28 | CopyBlobs(info.input_zip, info.output_zip) 29 | # And flash if necessary 30 | AddFirmwareUpdate(info, firmware_files) 31 | return 32 | 33 | def IncrementalOTA_Assertions(info): 34 | AddVendorAssertion(info) 35 | AddModemAssertion(info) 36 | return 37 | 38 | def CopyBlobs(input_zip, output_zip): 39 | for info in input_zip.infolist(): 40 | f = info.filename 41 | # Copy files in 'RADIO' to output zip 'firmware-update' 42 | if f.startswith("RADIO/") and (f.__len__() > len("RADIO/")): 43 | fn = f[6:] 44 | common.ZipWriteStr(output_zip, "firmware-update/" + fn, input_zip.read(f)) 45 | 46 | def AddVendorAssertion(info): 47 | cmd = 'assert(oneplus.file_exists("/dev/block/bootdevice/by-name/vendor") == "1" || \ 48 | abort("Error: Vendor partition doesn\'t exist!"););' 49 | info.script.AppendExtra(cmd) 50 | return 51 | 52 | def AddModemAssertion(info): 53 | android_info = info.input_zip.read("OTA/android-info.txt").decode('utf-8') 54 | m = re.search(r'require\s+version-modem\s*=\s*(.+)', android_info) 55 | f = re.search(r'require\s+version-firmware\s*=\s*(.+)', android_info) 56 | if m and f: 57 | version_modem = m.group(1).rstrip() 58 | version_firmware = f.group(1).rstrip() 59 | if ((len(version_modem) and '*' not in version_modem) and \ 60 | (len(version_firmware) and '*' not in version_firmware)): 61 | cmd = 'assert(oneplus.verify_modem("' + version_modem + '") == "1" || \ 62 | abort("Error: This package requires firmware version ' + version_firmware + \ 63 | ' or newer. Please upgrade firmware and retry!"););' 64 | info.script.AppendExtra(cmd) 65 | return 66 | 67 | def AddFirmwareUpdate(info, filemap): 68 | android_info = info.input_zip.read("OTA/android-info.txt").decode('utf-8') 69 | m = re.search(r'require\s+version-modem\s*=\s*(.+)', android_info) 70 | f = re.search(r'require\s+version-firmware\s*=\s*(.+)', android_info) 71 | if m and f: 72 | version_modem = m.group(1).rstrip() 73 | version_firmware = f.group(1).rstrip() 74 | if ((len(version_modem) and '*' not in version_modem) and \ 75 | (len(version_firmware) and '*' not in version_firmware)): 76 | info.script.AppendExtra('ifelse(oneplus.verify_modem("' + version_modem + '") != "1",') 77 | info.script.AppendExtra('(') 78 | info.script.AppendExtra(' ui_print("Upgrading firmware to ' + version_firmware + '");') 79 | for file in filemap: 80 | partname = os.path.splitext(file)[0] 81 | info.script.AppendExtra('package_extract_file("firmware-update/' + file + '", "/dev/block/bootdevice/by-name/' + partname + '");') 82 | info.script.AppendExtra('),') 83 | info.script.AppendExtra('(') 84 | info.script.AppendExtra(' ui_print("Firmware is up-to-date");') 85 | info.script.AppendExtra(')') 86 | info.script.AppendExtra(');') 87 | -------------------------------------------------------------------------------- /rro_overlays/WifiOverlay/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 12 | true 13 | 14 | 15 | true 16 | 17 | 18 | true 19 | 20 | 21 | true 22 | 23 | 24 | true 25 | 26 | 27 | true 28 | 29 | 30 | true 31 | 32 | 33 | true 34 | 35 | 37 | 524288,2097152,8388608,262144,524288,4194304 38 | 39 | 40 | true 41 | 42 | 43 | true 44 | 45 | 46 | true 47 | 48 | 49 | true 50 | 51 | 52 | 32 53 | 54 | 55 | true 56 | 57 | 58 | false 59 | 60 | 61 | true 62 | 63 | 64 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pocketmode/src/org/lineageos/pocketmode/PocketModeService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | package org.lineageos.pocketmode; 7 | 8 | import android.app.Service; 9 | import android.content.BroadcastReceiver; 10 | import android.content.Context; 11 | import android.content.Intent; 12 | import android.content.IntentFilter; 13 | import android.database.ContentObserver; 14 | import android.os.Handler; 15 | import android.os.IBinder; 16 | import android.os.UserHandle; 17 | import android.util.Log; 18 | 19 | import lineageos.providers.LineageSettings; 20 | 21 | public class PocketModeService extends Service { 22 | 23 | private static final String TAG = "PocketModeService"; 24 | private static final boolean DEBUG = false; 25 | 26 | private ProximitySensor mProximitySensor; 27 | private SettingsObserver mSettingsObserver; 28 | 29 | @Override 30 | public void onCreate() { 31 | if (DEBUG) Log.d(TAG, "Creating service"); 32 | mProximitySensor = new ProximitySensor(this); 33 | mSettingsObserver = new SettingsObserver(new Handler()); 34 | mSettingsObserver.register(); 35 | } 36 | 37 | @Override 38 | public int onStartCommand(Intent intent, int flags, int startId) { 39 | if (DEBUG) Log.d(TAG, "Starting service"); 40 | return START_STICKY; 41 | } 42 | 43 | @Override 44 | public void onDestroy() { 45 | if (DEBUG) Log.d(TAG, "Destroying service"); 46 | this.unregisterReceiver(mScreenStateReceiver); 47 | mProximitySensor.disable(); 48 | mSettingsObserver.unregister(); 49 | super.onDestroy(); 50 | } 51 | 52 | @Override 53 | public IBinder onBind(Intent intent) { 54 | return null; 55 | } 56 | 57 | private BroadcastReceiver mScreenStateReceiver = new BroadcastReceiver() { 58 | @Override 59 | public void onReceive(Context context, Intent intent) { 60 | if (intent.getAction().equals(Intent.ACTION_USER_PRESENT)) { 61 | if (DEBUG) Log.d(TAG, "Device unlocked"); 62 | mProximitySensor.disable(); 63 | } else if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) { 64 | if (DEBUG) Log.d(TAG, "Display off"); 65 | mProximitySensor.enable(); 66 | } 67 | } 68 | }; 69 | 70 | private final class SettingsObserver extends ContentObserver { 71 | private boolean mIsRegistered = false; 72 | 73 | private SettingsObserver(Handler handler) { 74 | super(handler); 75 | } 76 | 77 | public void register() { 78 | getContentResolver().registerContentObserver(LineageSettings.System.getUriFor( 79 | LineageSettings.System.PROXIMITY_ON_WAKE), false, this); 80 | 81 | update(); 82 | } 83 | 84 | public void unregister() { 85 | getContentResolver().unregisterContentObserver(this); 86 | } 87 | 88 | @Override 89 | public void onChange(boolean selfChange) { 90 | update(); 91 | } 92 | 93 | private void update() { 94 | boolean defaultProximity = getResources().getBoolean( 95 | org.lineageos.platform.internal.R.bool.config_proximityCheckOnWakeEnabledByDefault); 96 | boolean proximityWakeCheckEnabled = LineageSettings.System.getIntForUser( 97 | getContentResolver(), LineageSettings.System.PROXIMITY_ON_WAKE, defaultProximity 98 | ? 1 : 0, UserHandle.USER_CURRENT) == 1; 99 | 100 | if (proximityWakeCheckEnabled) { 101 | IntentFilter screenStateFilter = new IntentFilter(Intent.ACTION_USER_PRESENT); 102 | screenStateFilter.addAction(Intent.ACTION_SCREEN_OFF); 103 | registerReceiver(mScreenStateReceiver, screenStateFilter); 104 | mIsRegistered = true; 105 | } else { 106 | mProximitySensor.disable(); 107 | if (mIsRegistered) { 108 | unregisterReceiver(mScreenStateReceiver); 109 | mIsRegistered = false; 110 | } 111 | } 112 | } 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /BoardConfigCommon.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017 The LineageOS Open Source Project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | 7 | PLATFORM_PATH := device/oneplus/msm8998-common 8 | 9 | # Bootloader 10 | TARGET_BOOTLOADER_BOARD_NAME := msm8998 11 | TARGET_NO_BOOTLOADER := true 12 | 13 | # Platform 14 | TARGET_BOARD_PLATFORM := msm8998 15 | 16 | # Architecture 17 | TARGET_ARCH := arm64 18 | TARGET_ARCH_VARIANT := armv8-a 19 | TARGET_CPU_ABI := arm64-v8a 20 | TARGET_CPU_ABI2 := 21 | TARGET_CPU_VARIANT := generic 22 | TARGET_CPU_VARIANT_RUNTIME := cortex-a73 23 | 24 | TARGET_2ND_ARCH := arm 25 | TARGET_2ND_ARCH_VARIANT := armv8-a 26 | TARGET_2ND_CPU_ABI := armeabi-v7a 27 | TARGET_2ND_CPU_ABI2 := armeabi 28 | TARGET_2ND_CPU_VARIANT := generic 29 | TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a73 30 | 31 | # Kernel 32 | BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom msm_rtb.filter=0x37 ehci-hcd.park=3 33 | BOARD_KERNEL_CMDLINE += service_locator.enable=1 swiotlb=2048 34 | BOARD_KERNEL_CMDLINE += loop.max_part=7 35 | #BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive 36 | BOARD_KERNEL_BASE := 0x00000000 37 | BOARD_KERNEL_PAGESIZE := 4096 38 | BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb 39 | TARGET_KERNEL_SOURCE := kernel/oneplus/msm8998 40 | TARGET_KERNEL_CONFIG := lineage_oneplus5_defconfig 41 | 42 | # QCOM hardware 43 | BOARD_USES_QCOM_HARDWARE := true 44 | 45 | # A/B 46 | AB_OTA_UPDATER := false 47 | 48 | # ANT+ 49 | BOARD_ANT_WIRELESS_DEVICE := "qualcomm-hidl" 50 | 51 | # Audio 52 | AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true 53 | BOARD_SUPPORTS_SOUND_TRIGGER := true 54 | BOARD_USES_ALSA_AUDIO := true 55 | 56 | # Display 57 | TARGET_SCREEN_DENSITY := 420 58 | 59 | # Filesystem 60 | TARGET_FS_CONFIG_GEN += $(PLATFORM_PATH)/config.fs 61 | 62 | # HIDL 63 | DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ 64 | $(PLATFORM_PATH)/framework_compatibility_matrix.xml \ 65 | hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \ 66 | hardware/qcom-caf/common/vendor_framework_compatibility_matrix_legacy.xml \ 67 | vendor/lineage/config/device_framework_matrix.xml 68 | DEVICE_MANIFEST_FILE := $(PLATFORM_PATH)/manifest.xml 69 | DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml 70 | 71 | # Media 72 | TARGET_USES_ION := true 73 | 74 | # Partitions 75 | BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 76 | BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 77 | BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456 78 | BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864 79 | BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472 80 | BOARD_SYSTEMIMAGE_PARTITION_TYPE := ext4 81 | BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824 82 | BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 83 | BOARD_FLASH_BLOCK_SIZE := 131072 84 | TARGET_COPY_OUT_VENDOR := vendor 85 | 86 | # Properties 87 | TARGET_SYSTEM_EXT_PROP += $(PLATFORM_PATH)/system_ext.prop 88 | TARGET_SYSTEM_PROP += $(PLATFORM_PATH)/system.prop 89 | TARGET_VENDOR_PROP += $(PLATFORM_PATH)/vendor.prop 90 | 91 | # Recovery 92 | TARGET_RECOVERY_DEVICE_DIRS := $(PLATFORM_PATH) 93 | TARGET_RECOVERY_FSTAB := $(PLATFORM_PATH)/rootdir/etc/fstab.qcom 94 | TARGET_USERIMAGES_USE_EXT4 := true 95 | 96 | # Releasetools 97 | TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_oneplus 98 | TARGET_RELEASETOOLS_EXTENSIONS := $(PLATFORM_PATH)/releasetools 99 | 100 | # RIL 101 | ENABLE_VENDOR_RIL_SERVICE := true 102 | 103 | # Root 104 | BOARD_ROOT_EXTRA_SYMLINKS += /mnt/vendor/persist:/persist 105 | 106 | # Security 107 | VENDOR_SECURITY_PATCH := 2020-09-01 108 | 109 | # SELinux 110 | include device/lineage/sepolicy/libperfmgr/sepolicy.mk 111 | include device/qcom/sepolicy-legacy-um/SEPolicy.mk 112 | 113 | BOARD_VENDOR_SEPOLICY_DIRS += $(PLATFORM_PATH)/sepolicy/vendor 114 | PRODUCT_PRIVATE_SEPOLICY_DIRS += $(PLATFORM_PATH)/sepolicy/private 115 | PRODUCT_PUBLIC_SEPOLICY_DIRS += $(PLATFORM_PATH)/sepolicy/public 116 | 117 | # Treble 118 | PRODUCT_FULL_TREBLE_OVERRIDE := true 119 | 120 | # Verity 121 | # Only needed for signing 122 | BOARD_AVB_ENABLE := false 123 | 124 | # Wifi 125 | BOARD_WLAN_DEVICE := qcwcn 126 | BOARD_HOSTAPD_DRIVER := NL80211 127 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) 128 | BOARD_WPA_SUPPLICANT_DRIVER := NL80211 129 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) 130 | WIFI_HIDL_FEATURE_DUAL_INTERFACE := true 131 | WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true 132 | WPA_SUPPLICANT_VERSION := VER_0_8_X 133 | 134 | # inherit from the proprietary version 135 | include vendor/oneplus/msm8998-common/BoardConfigVendor.mk 136 | -------------------------------------------------------------------------------- /ifaa/java/org/ifaa/android/manager/IFAAManagerFactory.java: -------------------------------------------------------------------------------- 1 | package org.ifaa.android.manager; 2 | 3 | import android.content.ActivityNotFoundException; 4 | import android.content.ComponentName; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.content.ServiceConnection; 8 | import android.os.Build; 9 | import android.os.IBinder; 10 | import android.os.RemoteException; 11 | import android.util.Slog; 12 | 13 | import com.android.internal.app.IIFAAService; 14 | 15 | public class IFAAManagerFactory extends IFAAManagerV2 { 16 | 17 | private static final String TAG = "IFAAManagerFactory"; 18 | 19 | private static final int BIOTypeFingerprint = 0x01; 20 | private static final int BIOTypeIris = 0x02; 21 | 22 | private static final int ACTIVITY_START_SUCCESS = 0; 23 | private static final int ACTIVITY_START_FAILED = -1; 24 | 25 | private static final int BIND_IFAASER_SERVICE_TIMEOUT = 10000; 26 | 27 | public static IFAAManagerFactory mIFAAManagerFactory = null; 28 | 29 | static final String IFAA_SERVICE_PACKAGE = "com.oneplus.ifaaservice"; 30 | static final String IFAA_SERVICE_CLASS = "com.oneplus.ifaaservice.IFAAService"; 31 | 32 | static final ComponentName IFAA_SERVICE_COMPONENT = new ComponentName( 33 | IFAA_SERVICE_PACKAGE, 34 | IFAA_SERVICE_CLASS); 35 | 36 | private IIFAAService mIFAAService = null; 37 | 38 | public IFAAManagerFactory() { 39 | } 40 | 41 | public int getSupportBIOTypes(Context context) { 42 | Slog.e(TAG, "BIOTypeFingerprint" + BIOTypeFingerprint); 43 | return BIOTypeFingerprint; 44 | } 45 | 46 | public int startBIOManager(Context context, int authType) { 47 | try { 48 | Slog.e(TAG, "startBIOManager" + context); 49 | Intent intent = new Intent("android.settings.FINGERPRINT_SETTINGS"); 50 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 51 | Slog.e(TAG, "OOS context" + context); 52 | context.startActivity(intent); 53 | } catch (ActivityNotFoundException e) { 54 | e.printStackTrace(); 55 | return ACTIVITY_START_FAILED; 56 | } finally { 57 | return ACTIVITY_START_SUCCESS; 58 | } 59 | } 60 | 61 | public String getDeviceModel() { 62 | //return Build.MODEL; 63 | Slog.e(TAG, "device model"); 64 | return "ONEPLUS-A5000"; 65 | } 66 | 67 | public int getVersion() { 68 | return 2; 69 | } 70 | 71 | public static IFAAManagerV2 getIFAAManager(Context context, int authType) { 72 | Slog.e(TAG, "getIFAAManager"); 73 | if (mIFAAManagerFactory == null) { 74 | mIFAAManagerFactory = new IFAAManagerFactory(); 75 | return mIFAAManagerFactory; 76 | } else { 77 | return mIFAAManagerFactory; 78 | } 79 | } 80 | 81 | public byte[] processCmdV2(Context context, byte[] data) { 82 | // set default return as null 83 | byte[] result = null; 84 | 85 | // to ensure that IFAAService was bound successfully 86 | ensureIfaaService(context); 87 | 88 | // get processCmdV2 from pass through remote service: IFAAService 89 | try { 90 | result = mIFAAService.processCmdV2(data); 91 | } catch (RemoteException e) { 92 | Slog.e(TAG, "exception while invoking processCmdV2 of remote IFAAService: " + e); 93 | } 94 | 95 | return result; 96 | } 97 | 98 | private void ensureIfaaService(Context context) { 99 | if (mIFAAService == null) { 100 | Intent service = new Intent().setComponent(IFAA_SERVICE_COMPONENT); 101 | context.bindService(service, mConnection, Context.BIND_AUTO_CREATE); 102 | synchronized (mConnection) { 103 | try { 104 | mConnection.wait(BIND_IFAASER_SERVICE_TIMEOUT); 105 | } catch (InterruptedException e) { 106 | Slog.e(TAG, "exception while binding IFAAService: " + e); 107 | } 108 | } 109 | } 110 | } 111 | 112 | private ServiceConnection mConnection = new ServiceConnection() { 113 | @Override 114 | public void onServiceConnected(ComponentName name, IBinder service) { 115 | mIFAAService = IIFAAService.Stub.asInterface(service); 116 | synchronized (mConnection) { 117 | notifyAll(); 118 | } 119 | } 120 | 121 | public void onServiceDisconnected(ComponentName name) { 122 | mIFAAService = null; 123 | } 124 | }; 125 | } 126 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml/power_profile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0 4 | 70 5 | 205 6 | 36 7 | 2 8 | 8 9 | 160 10 | 166 11 | 37 12 | 64 13 | 118 14 | 547 15 | 103 16 | 1 17 | 80 18 | 19 | 3 20 | 2 21 | 22 | 23 | 4 24 | 4 25 | 26 | 27 | 300000 28 | 364800 29 | 441600 30 | 518400 31 | 595200 32 | 672000 33 | 748800 34 | 825600 35 | 883200 36 | 960000 37 | 1036800 38 | 1094400 39 | 1171200 40 | 1248000 41 | 1324800 42 | 1401600 43 | 1478400 44 | 1555200 45 | 1670400 46 | 1747200 47 | 1824000 48 | 1900800 49 | 50 | 51 | 300000 52 | 345600 53 | 422400 54 | 499200 55 | 576000 56 | 652800 57 | 729600 58 | 806400 59 | 902400 60 | 979200 61 | 1056000 62 | 1132800 63 | 1190400 64 | 1267200 65 | 1344000 66 | 1420800 67 | 1497600 68 | 1574400 69 | 1651200 70 | 1728000 71 | 1804800 72 | 1881600 73 | 1958400 74 | 2035200 75 | 2112000 76 | 2208000 77 | 2265600 78 | 2323200 79 | 2342400 80 | 2361600 81 | 2457600 82 | 83 | 84 | 28.48 85 | 28.57 86 | 28.59 87 | 29.79 88 | 30.84 89 | 29.39 90 | 29.59 91 | 32.05 92 | 36.82 93 | 38.51 94 | 40.25 95 | 41.58 96 | 42.91 97 | 44.91 98 | 47.25 99 | 49.04 100 | 51.83 101 | 54.95 102 | 60.71 103 | 64.83 104 | 67.19 105 | 72.99 106 | 107 | 108 | 38.55 109 | 40.25 110 | 43.64 111 | 47.55 112 | 50.87 113 | 54.41 114 | 58.78 115 | 61.56 116 | 65.46 117 | 68.79 118 | 72.12 119 | 74.97 120 | 81.02 121 | 87.36 122 | 94.89 123 | 103.22 124 | 111.81 125 | 121.87 126 | 132.96 127 | 141.15 128 | 155.74 129 | 171.69 130 | 186.12 131 | 198.85 132 | 213.81 133 | 267.21 134 | 289.53 135 | 311.57 136 | 319.43 137 | 325.12 138 | 334.58 139 | 140 | 7.46 141 | 9.85 142 | 3300 143 | 144 | .0002 145 | .002 146 | .02 147 | .2 148 | 2 149 | 150 | 3300 151 | 152 | -------------------------------------------------------------------------------- /configs/nfc/libnfc-nci.conf: -------------------------------------------------------------------------------- 1 | ###################### Start of libnfc-common.conf ####################### 2 | 3 | ############################################################################### 4 | # Application options 5 | APPL_TRACE_LEVEL=0xFF 6 | PROTOCOL_TRACE_LEVEL=0xFFFFFFFF 7 | 8 | NFC_DEBUG_ENABLED=0x00 9 | 10 | ############################################################################### 11 | # File used for NFA storage 12 | NFA_STORAGE="/data/nfc" 13 | 14 | ############################################################################### 15 | # Force UICC to only listen to the following technology(s). 16 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. 17 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | NFA_TECHNOLOGY_MASK_F 18 | UICC_LISTEN_TECH_MASK=0x07 19 | 20 | ############################################################################### 21 | # Configure the default Destination Gate used by HCI (the default is 4, which 22 | # is the ETSI loopback gate. 23 | NFA_HCI_DEFAULT_DEST_GATE=0xF0 24 | 25 | ############################################################################### 26 | # Forcing HOST to listen for a selected protocol 27 | # 0x00 : Disable Host Listen 28 | # 0x01 : Enable Host to Listen (A) for ISO-DEP tech A 29 | # 0x02 : Enable Host to Listen (B) for ISO-DEP tech B 30 | # 0x04 : Enable Host to Listen (F) for T3T Tag Type Protocol tech F 31 | # 0x07 : Enable Host to Listen (ABF)for ISO-DEP tech AB & T3T Tag Type Protocol tech F 32 | HOST_LISTEN_TECH_MASK=0x07 33 | 34 | ############################################################################### 35 | # Enabling/Disabling Forward functionality 36 | # Disable 0x00 37 | # Enable 0x01 38 | NXP_FWD_FUNCTIONALITY_ENABLE=0x01 39 | 40 | ############################################################################### 41 | # AID for Empty Select command 42 | # If specified, this AID will be substituted when an Empty SELECT command is 43 | # detected. The first byte is the length of the AID. Maximum length is 16. 44 | AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00} 45 | 46 | ############################################################################### 47 | # When screen is turned off, specify the desired power state of the controller. 48 | # 0: power-off-sleep state; DEFAULT 49 | # 1: full-power state 50 | # 2: screen-off card-emulation (CE4/CE3/CE1 modes are used) 51 | SCREEN_OFF_POWER_STATE=1 52 | 53 | ############################################################################### 54 | # Firmware patch format, Only 1 and 5 should be set 55 | # 0 -> NFC Default 56 | # 1 -> EMVCO Default 57 | # 3 -> EMVCO Polling, DISC_IDLE = POWER_OFF, DISC DEACTIVATE = Removal process 58 | # 5 -> EMVCO Cert Polling, DISC_IDLE = Removal process , DISC DEACTIVATE = POWER_OFF 59 | # 7 -> EMVCO Polling, DISC_IDLE = POWER_OFF, DISC DEACTIVATE = POWER_OFF 60 | NFA_CONFIG_FORMAT=1 61 | 62 | ############################################################################### 63 | # Default poll duration (in ms) 64 | # The defualt is 500ms if not set (see nfc_target.h) 65 | #NFA_DM_DISC_DURATION_POLL=333 66 | 67 | ############################################################################### 68 | # Force tag polling for the following technology(s). 69 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. 70 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | 71 | # NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 | 72 | # NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_KOVIO | 73 | # NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE. 74 | # 75 | # Notable bits: 76 | # NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */ 77 | # NFA_TECHNOLOGY_MASK_B 0x02 /* NFC Technology B */ 78 | # NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */ 79 | # NFA_TECHNOLOGY_MASK_ISO15693 0x08 /* Proprietary Technology */ 80 | # NFA_TECHNOLOGY_MASK_KOVIO 0x20 /* Proprietary Technology */ 81 | # NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */ 82 | # NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */ 83 | POLLING_TECH_MASK=0xCF 84 | 85 | ############################################################################### 86 | # Force P2P to only listen for the following technology(s). 87 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. 88 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F | 89 | # NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE 90 | # 91 | # Notable bits: 92 | # NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */ 93 | # NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */ 94 | # NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */ 95 | # NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */ 96 | P2P_LISTEN_TECH_MASK=0xC5 97 | 98 | PRESERVE_STORAGE=0x01 99 | 100 | ############################################################################### 101 | # Deactivate notification wait time out in seconds used in ETSI Reader mode 102 | # 0 - Infinite wait 103 | NFA_DM_DISC_NTF_TIMEOUT=0 104 | 105 | ############################################################################### 106 | # AID_MATCHING constants 107 | # AID_MATCHING_EXACT_ONLY 0x00 108 | # AID_MATCHING_EXACT_OR_PREFIX 0x01 109 | # AID_MATCHING_PREFIX_ONLY 0x02 110 | AID_MATCHING_MODE=0x01 111 | 112 | ############################################################################### 113 | -------------------------------------------------------------------------------- /init/init_oneplus_msm8998.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007, The Android Open Source Project 3 | Copyright (c) 2016, The CyanogenMod Project 4 | Copyright (c) 2017, The LineageOS Project 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are 8 | met: 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above 12 | copyright notice, this list of conditions and the following 13 | disclaimer in the documentation and/or other materials provided 14 | with the distribution. 15 | * Neither the name of The Linux Foundation nor the names of its 16 | contributors may be used to endorse or promote products derived 17 | from this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 20 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 23 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 26 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 28 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 29 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | #include 40 | #include 41 | #include 42 | #include 43 | 44 | #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ 45 | #include 46 | 47 | #include "vendor_init.h" 48 | #include "property_service.h" 49 | 50 | using android::base::Trim; 51 | using android::base::ReadFileToString; 52 | 53 | void property_override(char const prop[], char const value[], bool add = true) 54 | { 55 | auto pi = (prop_info *) __system_property_find(prop); 56 | 57 | if (pi != nullptr) { 58 | __system_property_update(pi, value, strlen(value)); 59 | } else if (add) { 60 | __system_property_add(prop, strlen(prop), value, strlen(value)); 61 | } 62 | } 63 | 64 | void init_alarm_boot_properties() 65 | { 66 | char const *boot_reason_file = "/proc/sys/kernel/boot_reason"; 67 | std::string boot_reason; 68 | 69 | if (ReadFileToString(boot_reason_file, &boot_reason)) { 70 | /* 71 | * Setup ro.vendor.alarm_boot value to true when it is RTC triggered boot up 72 | * For existing PMIC chips, the following mapping applies 73 | * for the value of boot_reason: 74 | * 75 | * 0 -> unknown 76 | * 1 -> hard reset 77 | * 2 -> sudden momentary power loss (SMPL) 78 | * 3 -> real time clock (RTC) 79 | * 4 -> DC charger inserted 80 | * 5 -> USB charger inserted 81 | * 6 -> PON1 pin toggled (for secondary PMICs) 82 | * 7 -> CBLPWR_N pin toggled (for external power supply) 83 | * 8 -> KPDPWR_N pin toggled (power key pressed) 84 | */ 85 | if (Trim(boot_reason) == "0") { 86 | property_override("ro.boot.bootreason", "invalid"); 87 | property_override("ro.vendor.alarm_boot", "false"); 88 | } 89 | else if (Trim(boot_reason) == "1") { 90 | property_override("ro.boot.bootreason", "hard_reset"); 91 | property_override("ro.vendor.alarm_boot", "false"); 92 | } 93 | else if (Trim(boot_reason) == "2") { 94 | property_override("ro.boot.bootreason", "smpl"); 95 | property_override("ro.vendor.alarm_boot", "false"); 96 | } 97 | else if (Trim(boot_reason) == "3") { 98 | property_override("ro.vendor.alarm_boot", "true"); 99 | // disable boot animation for RTC wakeup 100 | property_override("debug.sf.nobootanimation", "1"); 101 | } 102 | else if (Trim(boot_reason) == "4") { 103 | property_override("ro.boot.bootreason", "dc_chg"); 104 | property_override("ro.vendor.alarm_boot", "false"); 105 | } 106 | else if (Trim(boot_reason) == "5") { 107 | property_override("ro.boot.bootreason", "usb_chg"); 108 | property_override("ro.vendor.alarm_boot", "false"); 109 | } 110 | else if (Trim(boot_reason) == "6") { 111 | property_override("ro.boot.bootreason", "pon1"); 112 | property_override("ro.vendor.alarm_boot", "false"); 113 | } 114 | else if (Trim(boot_reason) == "7") { 115 | property_override("ro.boot.bootreason", "cblpwr"); 116 | property_override("ro.vendor.alarm_boot", "false"); 117 | } 118 | else if (Trim(boot_reason) == "8") { 119 | property_override("ro.boot.bootreason", "kpdpwr"); 120 | property_override("ro.vendor.alarm_boot", "false"); 121 | } 122 | } 123 | else { 124 | LOG(ERROR) << "Unable to read bootreason from " << boot_reason_file; 125 | } 126 | } 127 | 128 | void vendor_load_properties() { 129 | LOG(INFO) << "Loading vendor specific properties"; 130 | init_alarm_boot_properties(); 131 | } 132 | -------------------------------------------------------------------------------- /vendor.prop: -------------------------------------------------------------------------------- 1 | # Audio 2 | persist.vendor.audio_hal.dsp_bit_width_enforce_mode=24 3 | persist.vendor.audio.aanc.enable=true 4 | persist.vendor.audio.fluence.speaker=true 5 | persist.vendor.audio.fluence.voicecall=true 6 | persist.vendor.audio.fluence.voicerec=true 7 | persist.vendor.audio.ras.enabled=false 8 | ro.vendor.audio.sdk.fluencetype=fluencepro 9 | vendor.audio_hal.period_size=192 10 | vendor.audio.feature.a2dp_offload.enable=false 11 | vendor.audio.feature.afe_proxy.enable=true 12 | vendor.audio.feature.anc_headset.enable=true 13 | vendor.audio.feature.audiozoom.enable=false 14 | vendor.audio.feature.battery_listener.enable=false 15 | vendor.audio.feature.compr_cap.enable=false 16 | vendor.audio.feature.compr_voip.enable=true 17 | vendor.audio.feature.compress_in.enable=false 18 | vendor.audio.feature.compress_meta_data.enable=true 19 | vendor.audio.feature.concurrent_capture.enable=false 20 | vendor.audio.feature.custom_stereo.enable=true 21 | vendor.audio.feature.deepbuffer_as_primary.enable=false 22 | vendor.audio.feature.display_port.enable=true 23 | vendor.audio.feature.dsm_feedback.enable=false 24 | vendor.audio.feature.dynamic_ecns.enable=false 25 | vendor.audio.feature.ext_hw_plugin.enable=false 26 | vendor.audio.feature.external_dsp.enable=false 27 | vendor.audio.feature.external_speaker.enable=false 28 | vendor.audio.feature.external_speaker_tfa.enable=false 29 | vendor.audio.feature.fluence.enable=true 30 | vendor.audio.feature.fm.enable=true 31 | vendor.audio.feature.hdmi_edid.enable=true 32 | vendor.audio.feature.hdmi_passthrough.enable=false 33 | vendor.audio.feature.hfp.enable=true 34 | vendor.audio.feature.hifi_audio.enable=false 35 | vendor.audio.feature.hwdep_cal.enable=false 36 | vendor.audio.feature.incall_music.enable=false 37 | vendor.audio.feature.keep_alive.enable=false 38 | vendor.audio.feature.kpi_optimize.enable=false 39 | vendor.audio.feature.maxx_audio.enable=false 40 | vendor.audio.feature.multi_voice_session.enable=true 41 | vendor.audio.feature.ras.enable=true 42 | vendor.audio.feature.record_play_concurency.enable=false 43 | vendor.audio.feature.snd_mon.enable=true 44 | vendor.audio.feature.spkr_prot.enable=true 45 | vendor.audio.feature.src_trkn.enable=true 46 | vendor.audio.feature.ssrec.enable=true 47 | vendor.audio.feature.usb_offload.enable=true 48 | vendor.audio.feature.usb_offload_burst_mode.enable=false 49 | vendor.audio.feature.usb_offload_sidetone_volume.enable=false 50 | vendor.audio.feature.vbat.enable=true 51 | vendor.audio.feature.wsa.enable=false 52 | vendor.audio.offload.gapless.enabled=true 53 | vendor.audio.offload.multiple.enabled=true 54 | vendor.audio.offload.passthrough=false 55 | vendor.audio.offload.track.enable=true 56 | vendor.audio.safx.pbe.enabled=true 57 | vendor.audio.spkr_prot.tx.sampling_rate=48000 58 | vendor.audio.use.sw.alac.decoder=true 59 | vendor.audio.use.sw.ape.decoder=true 60 | vendor.voice.path.for.pcm.voip=true 61 | 62 | # Bluetooth 63 | bluetooth.device.class_of_device=90,2,12 64 | bluetooth.hardware.power.operating_voltage_mv=3300 65 | bluetooth.profile.a2dp.source.enabled=true 66 | bluetooth.profile.asha.central.enabled=true 67 | bluetooth.profile.avrcp.target.enabled=true 68 | bluetooth.profile.bas.client.enabled=true 69 | bluetooth.profile.gatt.enabled=true 70 | bluetooth.profile.hfp.ag.enabled=true 71 | bluetooth.profile.hid.device.enabled=true 72 | bluetooth.profile.hid.host.enabled=true 73 | bluetooth.profile.map.server.enabled=true 74 | bluetooth.profile.opp.enabled=true 75 | bluetooth.profile.pan.nap.enabled=true 76 | bluetooth.profile.pan.panu.enabled=true 77 | bluetooth.profile.pbap.server.enabled=true 78 | bluetooth.profile.sap.server.enabled=true 79 | persist.vendor.qcom.bluetooth.aac_frm_ctl.enabled=true 80 | persist.vendor.qcom.bluetooth.soc=cherokee 81 | ro.vendor.bluetooth.wipower=false 82 | 83 | # CNE 84 | persist.vendor.cne.feature=1 85 | 86 | # Data 87 | persist.vendor.data.iwlan.enable=true 88 | persist.vendor.data.mode=concurrent 89 | 90 | # Display 91 | ro.surface_flinger.enable_frame_rate_override=false 92 | ro.vendor.display.sensortype=3 93 | ro.vendor.display.paneltype=1 94 | ro.vendor.display.foss=1 95 | vendor.display.foss.config=1 96 | vendor.display.foss.config_path=/vendor/etc/FOSSConfig.xml 97 | 98 | # Graphics 99 | ro.hardware.egl=adreno 100 | vendor.display.disable_partial_split=1 101 | vendor.display.disable_rotator_downscale=1 102 | vendor.display.disable_skip_validate=1 103 | vendor.display.enable_default_color_mode=1 104 | vendor.gralloc.enable_fb_ubwc=1 105 | 106 | # Media 107 | vendor.vidc.debug.level=1 108 | 109 | # Perf 110 | ro.vendor.extension_library=libqti-perfd-client.so 111 | 112 | # QCOM 113 | ro.vendor.qti.va_aosp.support=1 114 | 115 | # RCS 116 | persist.rcs.supported=1 117 | 118 | # RIL 119 | persist.vendor.radio.add_power_save=1 120 | persist.vendor.radio.apm_sim_not_pwdn=1 121 | persist.vendor.radio.bar_fake_gcell=1 122 | persist.vendor.radio.custom_ecc=1 123 | persist.vendor.radio.data_con_rprt=1 124 | persist.vendor.radio.data_ltd_sys_ind=1 125 | persist.vendor.radio.flexmap_type=none 126 | persist.vendor.radio.force_on_dc=true 127 | persist.vendor.radio.ignore_dom_time=10 128 | persist.vendor.radio.mt_sms_ack=30 129 | persist.vendor.radio.procedure_bytes=SKIP 130 | persist.vendor.radio.rat_on=combine 131 | persist.vendor.radio.sib16_support=1 132 | 133 | # Sensors 134 | ro.vendor.sensors.dev_ori=true 135 | ro.vendor.sensors.pmd=true 136 | ro.vendor.sensors.sta_detect=true 137 | ro.vendor.sensors.mot_detect=true 138 | ro.vendor.sensors.dpc=true 139 | ro.vendor.sensors.multishake=true 140 | persist.vendor.sensors.direct_channel=true 141 | 142 | # Soc 143 | ro.soc.manufacturer=Qualcomm 144 | ro.soc.model=MSM8998 145 | 146 | # Timeservice 147 | persist.vendor.delta_time.enable=true 148 | 149 | # VoLTE 150 | persist.vendor.qti.telephony.vt_cam_interface=1 151 | 152 | # Zygote 153 | zygote.critical_window.minute=10 154 | -------------------------------------------------------------------------------- /rootdir/etc/ueventd.qcom.rc: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012-2015, 2017-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 met: 5 | # * Redistributions of source code must retain the above copyright 6 | # notice, this list of conditions and the following disclaimer. 7 | # * Redistributions in binary form must reproduce the above copyright 8 | # notice, this list of conditions and the following disclaimer in the 9 | # documentation and/or other materials provided with the distribution. 10 | # * Neither the name of The Linux Foundation nor 11 | # the names of its contributors may be used to endorse or promote 12 | # products derived from this software without specific prior written 13 | # permission. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 19 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | # 27 | 28 | # Firmware directory Path 29 | # Below macro will be read by uevent and path will 30 | # be added to search path for firmware loading 31 | firmware_directories /vendor/firmware_mnt/image/ 32 | 33 | # the DIAG device node is not world writable/readable. 34 | /dev/diag 0660 system oem_2901 35 | 36 | /dev/wlan 0660 wifi wifi 37 | /dev/kgsl-3d0 0666 system system 38 | /dev/ion 0664 system system 39 | /dev/rtc0 0660 system system 40 | /dev/rmnet_ctrl 0660 usb usb 41 | 42 | # CSVT 43 | /dev/smd11 0660 radio radio 44 | 45 | # BT/FM 46 | /dev/smd7 0660 bluetooth bluetooth 47 | /dev/btpower 0660 bluetooth system 48 | /dev/ttyHS0 0660 bluetooth net_bt 49 | 50 | # pta 51 | /dev/pta 0660 system system 52 | 53 | /dev/ipa 0660 radio radio 54 | /dev/wwan_ioctl 0660 radio radio 55 | /dev/ipaNatTable 0660 radio radio 56 | /dev/smdcntl8 0640 radio radio 57 | /dev/at_usb0 0640 radio radio 58 | /dev/at_mdm0 0640 radio radio 59 | 60 | /dev/video* 0660 system camera 61 | /dev/media* 0660 system camera 62 | /dev/v4l-subdev* 0660 system camera 63 | /dev/qseecom 0660 system drmrpc 64 | /dev/qce 0660 system drmrpc 65 | /dev/smcinvoke 0660 system system 66 | /dev/qsee_ipc_irq_spss 0660 system drmrpc 67 | /dev/spcom 0660 system system 68 | /dev/spdaemon_ssr 0660 system system 69 | /dev/jpeg0 0660 system camera 70 | /dev/adsprpc-smd 0664 system system 71 | /dev/adsprpc-smd-secure 0644 system system 72 | 73 | # audio 74 | /dev/wcd-dsp-glink 0660 system audio 75 | /dev/msm_qcelp 0660 system audio 76 | /dev/msm_evrc 0660 system audio 77 | /dev/msm_wma 0660 system audio 78 | /dev/msm_wmapro 0660 system audio 79 | /dev/msm_alac 0660 system audio 80 | /dev/msm_ape 0660 system audio 81 | /dev/msm_amrnb 0660 system audio 82 | /dev/msm_amrwb 0660 system audio 83 | /dev/msm_amrwbplus 0660 system audio 84 | /dev/msm_aac 0660 system audio 85 | /dev/msm_multi_aac 0660 system audio 86 | /dev/msm_aac_in 0660 system audio 87 | /dev/msm_qcelp_in 0660 system audio 88 | /dev/msm_evrc_in 0660 system audio 89 | /dev/msm_amrnb_in 0660 system audio 90 | /dev/msm_amrwb_in 0660 system audio 91 | /dev/msm_audio_cal 0660 system audio 92 | /dev/msm_hweffects 0660 system audio 93 | /dev/msm_rtac 0660 system audio 94 | /dev/i2c-5 0660 media media 95 | /dev/avtimer 0660 system audio 96 | 97 | # sensors 98 | /dev/sensors 0660 system system 99 | 100 | # nfc 101 | /dev/nq-nci 0660 nfc nfc 102 | 103 | # UIO 104 | /dev/uio0 0660 system system 105 | /dev/uio1 0660 system system 106 | 107 | # SSR 108 | /dev/subsys_* 0640 system system 109 | 110 | # Ultrasound 111 | /dev/usf1 0660 system system 112 | 113 | # Ramdump 114 | /dev/ramdump* 0640 system system 115 | 116 | # Kmsg 117 | /dev/kmsg 0620 root system 118 | 119 | # Add device block for FRP 120 | /dev/block/platform/soc/1da4000.ufshc/by-name/config 0600 system system 121 | /dev/block/platform/soc/1da4000.ufshc/by-name/frp 0600 system system 122 | 123 | # USB role switch 124 | /sys/class/dual_role_usb/* data_role 0660 system system 125 | /sys/class/dual_role_usb/* power_role 0660 system system 126 | /sys/class/dual_role_usb/* mode 0660 system system 127 | 128 | # KGSL 129 | /sys/class/kgsl/kgsl-3d0 perfcounter 0660 root shell 130 | 131 | # socinfo 132 | /sys/devices/soc0 serial_number 0000 root root 133 | 134 | # Charger 135 | /sys/class/power_supply/battery charging_enabled 0660 system system 136 | -------------------------------------------------------------------------------- /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 | # # 30 | # Default Configuration # 31 | # (GNSS only,QDR Disabled) # 32 | # # 33 | # For QDR enablement, comment # 34 | # this section and enabled # 35 | # either QDR3 OR # 36 | # QDR2-DWT OR QDR2-Gyro related # 37 | # configuration section in below. # 38 | # # 39 | ###################################### 40 | 41 | SENSOR_SERVICE = accel 42 | SENSOR_PROVIDER = native 43 | SENSOR_RATE = 100 44 | SENSOR_SAMPLES = 1 45 | 46 | SENSOR_SERVICE = gyro 47 | SENSOR_PROVIDER = native 48 | SENSOR_RATE = 100 49 | SENSOR_SAMPLES = 1 50 | 51 | SENSOR_SERVICE = vehicle_gear 52 | SENSOR_PROVIDER = native 53 | SENSOR_RATE = 100 54 | SENSOR_SAMPLES = 1 55 | 56 | 57 | ###################################### 58 | # # 59 | # QDR3 Configuration # 60 | # # 61 | # For QDR3, # 62 | # comment default configuration above# 63 | # and # 64 | # uncomment below configuration # 65 | # settings. # 66 | # # 67 | ###################################### 68 | # 69 | #SENSOR_SERVICE = accel 70 | #SENSOR_PROVIDER = native 71 | #SENSOR_RATE = 10 72 | #SENSOR_SAMPLES = 10 73 | # 74 | #SENSOR_SERVICE = vehicle_speed 75 | #SENSOR_PROVIDER = native 76 | #SENSOR_RATE = 100 77 | #SENSOR_SAMPLES = 1 78 | # 79 | #SENSOR_SERVICE = gyro 80 | #SENSOR_PROVIDER = native 81 | #SENSOR_RATE = 10 82 | #SENSOR_SAMPLES = 10 83 | # 84 | #SENSOR_SERVICE = vehicle_gear 85 | #SENSOR_PROVIDER = native 86 | #SENSOR_RATE = 100 87 | #SENSOR_SAMPLES = 1 88 | # 89 | # 90 | ##Enable/disable sensor data flashback feature 91 | #QDR_FLASHBACK_ENABLED = 0 92 | ##Configure QDR library to be loaded 1: QDR3 2: QDR2-GYRO 3: QDR2-DWS 93 | #QDR_DYNAMIC_LOADING = 1 94 | ##Enable/disable sensor data batching feature 95 | #QDR_BATCHING_ENABLED = 2 96 | ##Reporting offset before PPS boundary 97 | #QDR_REPORTING_OFFSET = 0 98 | ##Sensor dispatch threshold declaration 99 | #QDR_SENSDISPATCH_MS = 30 100 | # 101 | 102 | ###################################### 103 | # # 104 | # QDR2-DWT Configuration # 105 | # # 106 | # For QDR2-DWT, # 107 | # comment default configuration above# 108 | # and # 109 | # uncomment below configuration # 110 | # settings. # 111 | # # 112 | ###################################### 113 | # 114 | #SENSOR_SERVICE = vehicle_speed 115 | #SENSOR_PROVIDER = native 116 | #SENSOR_RATE = 100 117 | #SENSOR_SAMPLES = 1 118 | #SENSOR_STATISTIC_ENABLED = 3 119 | #SENSOR_STATISTIC_PRINT_COUNT = 50 120 | # 121 | #SENSOR_SERVICE = vehicle_dws 122 | #SENSOR_PROVIDER = native 123 | #SENSOR_RATE = 100 124 | #SENSOR_SAMPLES = 1 125 | #SENSOR_STATISTIC_ENABLED = 3 126 | #SENSOR_STATISTIC_PRINT_COUNT = 50 127 | # 128 | #SENSOR_SERVICE = vehicle_gear 129 | #SENSOR_PROVIDER = native 130 | #SENSOR_RATE = 100 131 | #SENSOR_SAMPLES = 1 132 | #SENSOR_STATISTIC_ENABLED = 3 133 | #SENSOR_STATISTIC_PRINT_COUNT = 50 134 | # 135 | #GNSS_POS_STATISTIC_ENABLED = 3 136 | #GNSS_POS_STATISTIC_PRNTCNT = 10 137 | #GNSS_MSR_STATISTIC_ENABLED = 3 138 | #GNSS_MSR_STATISTIC_PRNTCNT = 10 139 | # 140 | ##Enable/disable sensor data flashback feature 141 | #QDR_FLASHBACK_ENABLED = 0 142 | ##Configure QDR library to be loaded 1: QDR3 2: QDR2-GYRO 3: QDR2-DWS 143 | #QDR_DYNAMIC_LOADING = 3 144 | ##Enable/disable sensor data batching feature 145 | #QDR_BATCHING_ENABLED = 0 146 | ##Reporting offset before PPS boundary 147 | #QDR_REPORTING_OFFSET = 0 148 | ##Sensor dispatch threshold declaration 149 | #QDR_SENSDISPATCH_MS = 30 150 | ##QDR_ENABLE_QG shall be set as 1 151 | #QDR_ENABLE_QG = 1 152 | ##Select Wheel set (E.g.: Front two wheels, Rear two wheels OR All four wheels) 153 | ##To be used for differential wheel tick OR speed service. 154 | ##This configuration is applicable when QDR_CAN_TYPE configured as 155 | ##ODO_DWS(3) or ODO_DWT(2). 156 | ##Value "0": Use Front two wheels 157 | ##Value "1": Use Rear two wheels 158 | ##Value "2": Use All four wheels 159 | #QG_DRIVE_WHEEL_FW_RW_AW = 2 160 | ##Max Wheel tick value above which wheel tick rolls over 161 | ##This configuration is applicable when QDR_CAN_TYPE configured as ODO_DWT(2) 162 | #QG_DWT_MAX_WHEEL_TICK_COUNT = 255.0 163 | ##Configure Wheel constant for DWT based below equation 164 | ##(2 * pi * WHEEL_RADIUS / Pulses Per revolution) 165 | ##This configuration is applicable when QDR_CAN_TYPE configured as ODO_DWT(2) 166 | #QG_DWT_WHEEL_CONSTANT = 0.044 167 | 168 | ###################################### 169 | # # 170 | # QDR2-GYRO Configuration # 171 | # # 172 | # For QDR2-GYRO, # 173 | # comment default configuration above# 174 | # and # 175 | # uncomment below configuration # 176 | # settings. # 177 | # # 178 | ###################################### 179 | # 180 | #SENSOR_SERVICE = vehicle_speed 181 | #SENSOR_PROVIDER = native 182 | #SENSOR_RATE = 100 183 | #SENSOR_SAMPLES = 1 184 | # 185 | #SENSOR_SERVICE = vehicle_gyro 186 | #SENSOR_PROVIDER = native 187 | #SENSOR_RATE = 100 188 | #SENSOR_SAMPLES = 1 189 | # 190 | #SENSOR_SERVICE = vehicle_gear 191 | #SENSOR_PROVIDER = native 192 | #SENSOR_RATE = 100 193 | #SENSOR_SAMPLES = 1 194 | # 195 | ##Enable/disable sensor data flashback feature 196 | #QDR_FLASHBACK_ENABLED = 0 197 | ##Configure QDR library to be loaded 1: QDR3 2: QDR2-GYRO 3: QDR2-DWS 198 | #QDR_DYNAMIC_LOADING = 2 199 | ##Enable/disable sensor data batching feature 200 | #QDR_BATCHING_ENABLED = 0 201 | ##Reporting offset before PPS boundary 202 | #QDR_REPORTING_OFFSET = 0 203 | ##Sensor dispatch threshold declaration 204 | #QDR_SENSDISPATCH_MS = 30 205 | # 206 | -------------------------------------------------------------------------------- /recovery/recovery_updater.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015, The CyanogenMod Project 3 | * Copyright (C) 2017, The LineageOS Project 4 | * 5 | * SPDX-License-Identifier: Apache-2.0 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include 21 | 22 | #include "edify/expr.h" 23 | #include "otautil/error_code.h" 24 | #include "updater/install.h" 25 | 26 | #define MAX(a, b) (((a) > (b)) ? (a) : (b)) 27 | 28 | #define ALPHABET_LEN 256 29 | 30 | #ifdef USES_BOOTDEVICE_PATH 31 | #define MODEM_PART_PATH "/dev/block/bootdevice/by-name/modem" 32 | #else 33 | #define MODEM_PART_PATH "/dev/block/platform/soc/1da4000.ufshc/by-name/modem" 34 | #endif 35 | #define MODEM_VER_STR "Time_Stamp\": \"" 36 | #define MODEM_VER_STR_LEN 14 37 | #define MODEM_VER_BUF_LEN 20 38 | 39 | /* Boyer-Moore string search implementation from Wikipedia */ 40 | 41 | /* Return longest suffix length of suffix ending at str[p] */ 42 | static int max_suffix_len(const char *str, size_t str_len, size_t p) { 43 | uint32_t i; 44 | 45 | for (i = 0; (str[p - i] == str[str_len - 1 - i]) && (i < p); ) { 46 | i++; 47 | } 48 | 49 | return i; 50 | } 51 | 52 | /* Generate table of distance between last character of pat and rightmost 53 | * occurrence of character c in pat 54 | */ 55 | static void bm_make_delta1(int *delta1, const char *pat, size_t pat_len) { 56 | uint32_t i; 57 | for (i = 0; i < ALPHABET_LEN; i++) { 58 | delta1[i] = pat_len; 59 | } 60 | for (i = 0; i < pat_len - 1; i++) { 61 | uint8_t idx = (uint8_t) pat[i]; 62 | delta1[idx] = pat_len - 1 - i; 63 | } 64 | } 65 | 66 | /* Generate table of next possible full match from mismatch at pat[p] */ 67 | static void bm_make_delta2(int *delta2, const char *pat, size_t pat_len) { 68 | int p; 69 | uint32_t last_prefix = pat_len - 1; 70 | 71 | for (p = pat_len - 1; p >= 0; p--) { 72 | /* Compare whether pat[p-pat_len] is suffix of pat */ 73 | if (strncmp(pat + p, pat, pat_len - p) == 0) { 74 | last_prefix = p + 1; 75 | } 76 | delta2[p] = last_prefix + (pat_len - 1 - p); 77 | } 78 | 79 | for (p = 0; p < (int) pat_len - 1; p++) { 80 | /* Get longest suffix of pattern ending on character pat[p] */ 81 | int suf_len = max_suffix_len(pat, pat_len, p); 82 | if (pat[p - suf_len] != pat[pat_len - 1 - suf_len]) { 83 | delta2[pat_len - 1 - suf_len] = pat_len - 1 - p + suf_len; 84 | } 85 | } 86 | } 87 | 88 | static char * bm_search(const char *str, size_t str_len, const char *pat, 89 | size_t pat_len) { 90 | int delta1[ALPHABET_LEN]; 91 | int delta2[pat_len]; 92 | int i; 93 | 94 | bm_make_delta1(delta1, pat, pat_len); 95 | bm_make_delta2(delta2, pat, pat_len); 96 | 97 | if (pat_len == 0) { 98 | return (char *) str; 99 | } 100 | 101 | i = pat_len - 1; 102 | while (i < (int) str_len) { 103 | int j = pat_len - 1; 104 | while (j >= 0 && (str[i] == pat[j])) { 105 | i--; 106 | j--; 107 | } 108 | if (j < 0) { 109 | return (char *) (str + i + 1); 110 | } 111 | i += MAX(delta1[(uint8_t) str[i]], delta2[j]); 112 | } 113 | 114 | return NULL; 115 | } 116 | 117 | static int get_modem_version(char *ver_str, size_t len) { 118 | int ret = 0; 119 | int fd; 120 | int modem_size; 121 | char *modem_data = NULL; 122 | char *offset = NULL; 123 | 124 | fd = open(MODEM_PART_PATH, O_RDONLY); 125 | if (fd < 0) { 126 | ret = errno; 127 | goto err_ret; 128 | } 129 | 130 | modem_size = lseek64(fd, 0, SEEK_END); 131 | if (modem_size == -1) { 132 | ret = errno; 133 | goto err_fd_close; 134 | } 135 | 136 | modem_data = (char *) mmap(NULL, modem_size, PROT_READ, MAP_PRIVATE, fd, 0); 137 | if (modem_data == (char *)-1) { 138 | ret = errno; 139 | goto err_fd_close; 140 | } 141 | 142 | /* Do Boyer-Moore search across MODEM data */ 143 | offset = bm_search(modem_data, modem_size, MODEM_VER_STR, MODEM_VER_STR_LEN); 144 | if (offset != NULL) { 145 | snprintf(ver_str, len, "%s", offset + MODEM_VER_STR_LEN); 146 | } else { 147 | ret = -ENOENT; 148 | } 149 | 150 | munmap(modem_data, modem_size); 151 | err_fd_close: 152 | close(fd); 153 | err_ret: 154 | return ret; 155 | } 156 | 157 | /* oneplus.verify_modem("MODEM_VERSION") */ 158 | Value * VerifyModemFn(const char *name, State *state, const std::vector>& argv) { 159 | char current_modem_version[MODEM_VER_BUF_LEN]; 160 | size_t i; 161 | int ret; 162 | struct tm tm1, tm2; 163 | auto updater = state->updater; 164 | 165 | ret = get_modem_version(current_modem_version, MODEM_VER_BUF_LEN); 166 | if (ret) { 167 | return ErrorAbort(state, kVendorFailure, 168 | "%s() failed to read current MODEM build time-stamp: %d", name, ret); 169 | } 170 | 171 | memset(&tm1, 0, sizeof(tm)); 172 | strptime(current_modem_version, "%Y-%m-%d %H:%M:%S", &tm1); 173 | 174 | std::vector modem_version; 175 | if (!ReadArgs(state, argv, &modem_version)) { 176 | return ErrorAbort(state, kArgsParsingFailure, "%s() error parsing arguments", name); 177 | } 178 | 179 | ret = 0; 180 | for (i = 0; i < argv.size(); i++) { 181 | updater->UiPrint(android::base::StringPrintf("Checking for MODEM build time-stamp %s\n", 182 | modem_version[i].c_str())); 183 | memset(&tm2, 0, sizeof(tm)); 184 | strptime(modem_version[i].c_str(), "%Y-%m-%d %H:%M:%S", &tm2); 185 | 186 | if (mktime(&tm1) >= mktime(&tm2)) { 187 | ret = 1; 188 | break; 189 | } 190 | } 191 | 192 | return StringValue(strdup(ret ? "1" : "0")); 193 | } 194 | 195 | /* oneplus.file_exists("PATH") */ 196 | Value * FileExistsFn(const char *name, State *state, const std::vector>& argv) { 197 | struct stat buffer; 198 | std::vector file_path; 199 | 200 | if (!ReadArgs(state, argv, &file_path)) { 201 | return ErrorAbort(state, kArgsParsingFailure, "%s() error parsing arguments", name); 202 | } 203 | 204 | return StringValue((stat(file_path[0].c_str(), &buffer) == 0) ? "1" : "0"); 205 | } 206 | 207 | void Register_librecovery_updater_oneplus() { 208 | RegisterFunction("oneplus.verify_modem", VerifyModemFn); 209 | RegisterFunction("oneplus.file_exists", FileExistsFn); 210 | } 211 | -------------------------------------------------------------------------------- /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 | # Sensor Sampling Rate Parameters for Low-Data Rate Filter (should be greater than 0) 17 | # used in loc_eng_reinit 18 | SENSOR_ACCEL_BATCHES_PER_SEC=2 19 | SENSOR_ACCEL_SAMPLES_PER_BATCH=5 20 | SENSOR_GYRO_BATCHES_PER_SEC=2 21 | SENSOR_GYRO_SAMPLES_PER_BATCH=5 22 | # Sensor Sampling Rate Parameters for High-Data Rate Filter (should be greater than 0) 23 | SENSOR_ACCEL_BATCHES_PER_SEC_HIGH=4 24 | SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH=25 25 | SENSOR_GYRO_BATCHES_PER_SEC_HIGH=4 26 | SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH=25 27 | 28 | # Sensor Control Mode (0=AUTO, 1=FORCE_ON, 2=MODEM_DEFAULT) 29 | # used in loc_eng_reinit 30 | SENSOR_CONTROL_MODE=2 31 | 32 | # Bit mask used to define which sensor algorithms are used. 33 | # Setting each bit has the following definition: 34 | # 0x1 - DISABLE_INS_POSITIONING_FILTER 35 | # 0x0 - ENABLE_INS_POSITIONING_FILTER 36 | SENSOR_ALGORITHM_CONFIG_MASK=0x0 37 | 38 | #Vehicle Network Provider configuration 39 | 40 | #Service configuration strings 41 | #The number before colon in VN_X items defines version of the format of the rest of the string 42 | #VN_ACCEL_CFG=0:5 43 | #VN_GYRO_CFG=0:5.5 44 | #VN_ODOMETRY_CFG=0:2,4.5 45 | 46 | ################################################ 47 | # QDR3 configurations # 48 | ################################################ 49 | VN_SPEED_CFG=1:131,5,8,1,2,3,1,1,9,2,14,2 50 | VN_GEAR_CFG=1:422,20,4,0,4,1,9,0,1,2,3,4,5,6,7,8 51 | 52 | ################################################ 53 | # QDR2-Gyro configurations # 54 | ################################################ 55 | #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 56 | #VN_SPEED_CFG=1:555,0,0,1,2,1,0.01,0,56,8,48,8 57 | #VN_GEAR_CFG=1:555,16,4,0,1,1,9,0,1,2,3,4,5,6,7,8 58 | 59 | ################################################ 60 | # QDR2-DWT configurations # 61 | ################################################ 62 | #VN_SPEED_CFG=1:555,22,1,2,1,1,1,0,8,8,23,1,2,0,1,0,8,8,23,1 63 | #VN_GEAR_CFG=1:555,12,4,16,14,16,8,1,2,3,4,5,6,7,8 64 | #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 65 | #VN_GYRO_CFG=1:555,40,16,1.0,40,16,1.0,40,16,1.0 66 | 67 | ##################################################################################### 68 | # VNW service batching configuration strings # 69 | # VNW provider will initialize default type as Time based batching # 70 | # Each service batch value is configured to be 100 # 71 | # VN_ACCEL_CFG_BATCH_VALUE will be treated as time in Ms if VN_CFG_BATCH_TYPE # 72 | # is set to time based batching # 73 | # VN_ACCEL_CFG_BATCH_VALUE will be treated as sample count if VN_CFG_BATCH_TYPE # 74 | # is set to count based batching # 75 | # Uncomment and update batch time /sample count as per selected batching type # 76 | ##################################################################################### 77 | # Batching type 78 | # 1 - Time based (default) 79 | # 2 - Count based 80 | #VN_CFG_BATCH_TYPE=1 81 | 82 | #Vehicle Accel batching value, it can either accept time in milli seconds or sample count 83 | #VN_ACCEL_CFG_BATCH_VALUE=100 84 | 85 | #Vehicle Gyro batching value, it can either accept time in milli seconds or sample count 86 | #VN_GYRO_CFG_BATCH_VALUE=100 87 | 88 | #Vehicle Odo batching value, it can either accept time in milli seconds or sample count 89 | #VN_ODOMETRY_CFG_BATCH_VALUE=100 90 | 91 | #Vehicle Speed batching value, it can either accept time in milli seconds or sample count 92 | #VN_SPEED_CFG_BATCH_VALUE=100 93 | 94 | #Vehicle Gear batching value, it can either accept time in milli seconds or sample count 95 | #VN_GEAR_CFG_BATCH_VALUE=100 96 | 97 | #Vehicle DWS batching value, it can either accept time in milli seconds or sample count 98 | #VN_DWS_CFG_BATCH_VALUE=100 99 | #################################################################################### 100 | 101 | #Procesors clock ratio: AP and CAN bus microcontroller 102 | ################################################ 103 | # QDR3 configurations # 104 | ################################################ 105 | VN_PROC_CLOCK_RATIO=1.0 106 | 107 | ################################################ 108 | # QDR2-DWT OR QDR2-Gyro configurations # 109 | ################################################ 110 | #VN_PROC_CLOCK_RATIO = 1.0 111 | 112 | # Time source used by Sensor HAL 113 | # Setting this value controls accuracy of location sensor services. 114 | # 0 - Unknown 115 | # 1 - CLOCK_BOOTTIME 116 | # 2 - CLOCK_MONOTONIC 117 | # 3 - CLOCK_REALTIME 118 | # 4 - CLOCK_BOOTTIME using Alarm timer interface 119 | NDK_PROVIDER_TIME_SOURCE=1 120 | 121 | # Sensor Batching Configuration 122 | # 0 - Time based 123 | # 1 - Fixed count based 124 | # 2 - Variable count based 125 | COUNT_BASED_BATCHING=1 126 | SYNC_ONCE=0 127 | 128 | #Sensor HAL Provider Configuration HAL Library name including path 129 | ################################################ 130 | # # 131 | # Configuration for BMI 160 Sensor # 132 | # # 133 | ################################################ 134 | SENSOR_TYPE=2 135 | SENSOR_HAL_LIB_PATH=/usr/lib/libbmi160sensors.so.1 136 | 137 | ################################################ 138 | # # 139 | # Configuration for ASM330 Sensor # 140 | # # 141 | ################################################ 142 | #SENSOR_TYPE=1 143 | #SENSOR_HAL_LIB_PATH=/usr/lib/libasm330sensors.so.1 144 | 145 | 146 | ################################################ 147 | # # 148 | # Configuration for IAM20680 Sensor # 149 | # # 150 | ################################################ 151 | #SENSOR_TYPE=3 152 | #SENSOR_HAL_LIB_PATH=/usr/lib/libiam20680sensors.so.1 153 | 154 | 155 | ################################################ 156 | # # 157 | # Configuration for SMI130 Sensor # 158 | # # 159 | ################################################ 160 | #SENSOR_TYPE=4 161 | #SENSOR_HAL_LIB_PATH=/usr/lib/libsmi130sensors.so.1 162 | -------------------------------------------------------------------------------- /audio/audio_effects.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 | 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 | -------------------------------------------------------------------------------- /rootdir/etc/init.qcom.usb.rc: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011-2016, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are met: 5 | # * Redistributions of source code must retain the above copyright 6 | # notice, this list of conditions and the following disclaimer. 7 | # * Redistributions in binary form must reproduce the above copyright 8 | # notice, this list of conditions and the following disclaimer in the 9 | # documentation and/or other materials provided with the distribution. 10 | # * Neither the name of The Linux Foundation nor 11 | # the names of its contributors may be used to endorse or promote 12 | # products derived from this software without specific prior written 13 | # permission. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 19 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | # 27 | 28 | on boot 29 | # Create mount-point for ConfigFS USB gadgets 30 | mkdir /dev/usb-ffs 0770 shell shell 31 | mkdir /dev/usb-ffs/adb 0770 shell shell 32 | mount configfs none /config 33 | mkdir /config/usb_gadget/g1 0770 shell shell 34 | mkdir /config/usb_gadget/g1/strings/0x409 0770 shell shell 35 | 36 | # Set gadget properties 37 | write /config/usb_gadget/g1/bcdUSB 0x0200 38 | write /config/usb_gadget/g1/os_desc/use 1 39 | write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno} 40 | write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer} 41 | write /config/usb_gadget/g1/strings/0x409/product ${vendor.usb.product_string} 42 | 43 | # Create gadget functions 44 | mkdir /config/usb_gadget/g1/functions/mass_storage.0 45 | mkdir /config/usb_gadget/g1/functions/mtp.gs0 46 | mkdir /config/usb_gadget/g1/functions/ptp.gs1 47 | mkdir /config/usb_gadget/g1/functions/accessory.gs2 48 | mkdir /config/usb_gadget/g1/functions/audio_source.gs3 49 | mkdir /config/usb_gadget/g1/functions/midi.gs5 50 | mkdir /config/usb_gadget/g1/functions/ffs.adb 51 | mkdir /config/usb_gadget/g1/functions/diag.diag 52 | mkdir /config/usb_gadget/g1/functions/cser.dun.0 53 | mkdir /config/usb_gadget/g1/functions/cser.nmea.1 54 | mkdir /config/usb_gadget/g1/functions/gsi.rmnet 55 | mkdir /config/usb_gadget/g1/functions/gsi.rndis 56 | mkdir /config/usb_gadget/g1/functions/qdss.qdss 57 | 58 | # Set gadget configs 59 | mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell 60 | mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell 61 | write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1 62 | write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100" 63 | symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 64 | 65 | # Mount adb 66 | mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000 67 | 68 | # Set device properties 69 | setprop sys.usb.controller "a800000.dwc3" 70 | setprop sys.usb.configfs 1 71 | 72 | # USB compositions 73 | on property:sys.usb.config=rndis && property:sys.usb.configfs=1 74 | write /config/usb_gadget/g1/idVendor 0x2717 75 | write /config/usb_gadget/g1/idProduct 0xff80 76 | symlink /config/usb_gadget/g1/functions/gsi.rndis /config/usb_gadget/g1/configs/b.1/f1 77 | rm /config/usb_gadget/g1/configs/b.1/f2 78 | 79 | on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1 80 | write /config/usb_gadget/g1/idVendor 0x2717 81 | write /config/usb_gadget/g1/idProduct 0xff88 82 | symlink /config/usb_gadget/g1/functions/gsi.rndis /config/usb_gadget/g1/configs/b.1/f1 83 | rm /config/usb_gadget/g1/configs/b.1/f2 84 | 85 | on property:sys.usb.config=adb && property:sys.usb.configfs=1 86 | write /config/usb_gadget/g1/idVendor 0x18d1 87 | write /config/usb_gadget/g1/idProduct 0x4ee7 88 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 89 | rm /config/usb_gadget/g1/configs/b.1/f2 90 | 91 | on property:sys.usb.config=mtp && property:sys.usb.configfs=1 92 | write /config/usb_gadget/g1/idVendor 0x2717 93 | write /config/usb_gadget/g1/idProduct 0xff40 94 | write /config/usb_gadget/g1/os_desc/use 1 95 | symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 96 | rm /config/usb_gadget/g1/configs/b.1/f2 97 | 98 | on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1 99 | write /config/usb_gadget/g1/idVendor 0x2717 100 | write /config/usb_gadget/g1/idProduct 0xff48 101 | write /config/usb_gadget/g1/os_desc/use 1 102 | symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 103 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 104 | 105 | on property:sys.usb.config=ptp && property:sys.usb.configfs=1 106 | write /config/usb_gadget/g1/idVendor 0x2717 107 | write /config/usb_gadget/g1/idProduct 0xff10 108 | write /config/usb_gadget/g1/os_desc/use 1 109 | symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1 110 | rm /config/usb_gadget/g1/configs/b.1/f2 111 | 112 | on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1 113 | write /config/usb_gadget/g1/idVendor 0x2717 114 | write /config/usb_gadget/g1/idProduct 0xff18 115 | write /config/usb_gadget/g1/os_desc/use 1 116 | symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1 117 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 118 | 119 | on property:sys.usb.config=accessory && property:sys.usb.configfs=1 120 | write /config/usb_gadget/g1/idVendor 0x18d1 121 | write /config/usb_gadget/g1/idProduct 0x2d00 122 | 123 | on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1 124 | write /config/usb_gadget/g1/idVendor 0x18d1 125 | write /config/usb_gadget/g1/idProduct 0x2d01 126 | 127 | on property:sys.usb.config=audio_source && property:sys.usb.configfs=1 128 | write /config/usb_gadget/g1/idVendor 0x18d1 129 | write /config/usb_gadget/g1/idProduct 0x2d02 130 | 131 | on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1 132 | write /config/usb_gadget/g1/idVendor 0x18d1 133 | write /config/usb_gadget/g1/idProduct 0x2d03 134 | 135 | on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1 136 | write /config/usb_gadget/g1/idVendor 0x18d1 137 | write /config/usb_gadget/g1/idProduct 0x2d04 138 | 139 | on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1 140 | write /config/usb_gadget/g1/idVendor 0x18d1 141 | write /config/usb_gadget/g1/idProduct 0x2d05 142 | 143 | on property:sys.usb.config=midi && property:sys.usb.configfs=1 144 | write /config/usb_gadget/g1/idVendor 0x18d1 145 | write /config/usb_gadget/g1/idProduct 0x4ee8 146 | 147 | on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1 148 | write /config/usb_gadget/g1/idVendor 0x18d1 149 | write /config/usb_gadget/g1/idProduct 0x4ee9 150 | -------------------------------------------------------------------------------- /configs/gps/izat.conf: -------------------------------------------------------------------------------- 1 | ######################################### 2 | # Log verbosity control for izat modules 3 | ######################################### 4 | # OFF = 0, ERROR = 1, WARNING = 2, INFO = 3, DEBUG = 4, VERBOSE = 5 5 | IZAT_DEBUG_LEVEL = 2 6 | 7 | ################################################## 8 | # Select WIFI Wait Timeout value in seconds for SUPL 9 | ################################################## 10 | WIFI_WAIT_TIMEOUT_SELECT = 0 11 | 12 | ################################################## 13 | # Time interval of injecting SRN scan data to modem 14 | # time in seconds. 15 | # Note: recommended value is between 1-5 sec 16 | ################################################## 17 | LPPE_SRN_DATA_SCAN_INJECT_TIME=2 18 | 19 | ################################ 20 | # NLP Settings 21 | ################################ 22 | # NLP_MODE 1: OSNLP Only, 2: QNP Only, 3: Combo, 4: QNP preferred 23 | # For Automotive products, please use NLP_MODE = 4 only. 24 | # NLP_TOLERANCE_TIME_FIRST: Time in ms used in Combo mode 25 | # to determine how much Tolerance for first position 26 | # NLP_TOLERANCE_TIME_AFTER: Time in ms used in Combo mode 27 | # to determine how much Tolerance for positions after first 28 | # NLP_THRESHOLD: Sets how many failures needed before 29 | # switching preferred NLP in Combo mode 30 | # NLP_ACCURACY_MULTIPLE: Determines how far off the accuracy 31 | # must be, in multiples, between two NLP location reports to 32 | # be considered much worse accuracy. Used in switching logic 33 | # NLP COMBO MODE USES QNP WITH NO EULA CONSENT: Determines 34 | # whether or not to still send network location requests to 35 | # QNP when the EULA is not consented to by the user. QNP can 36 | # still return ZPP locations or injected locations even 37 | # without EULA consent, but the uncertainty can be high. 38 | # QNP preferred mode prefers QNP when there is EULA consent, 39 | # otherwise OSNLP is used. 40 | NLP_MODE = 1 41 | NLP_MODE_EMERGENCY = 2 42 | NLP_TOLERANCE_TIME_FIRST = 5000 43 | NLP_TOLERANCE_TIME_AFTER = 20000 44 | NLP_THRESHOLD = 3 45 | NLP_ACCURACY_MULTIPLE = 2 46 | NLP_COMBO_MODE_USES_QNP_WITH_NO_EULA_CONSENT = 1 47 | 48 | ######################################### 49 | # NLP PACKAGE SETTINGS 50 | ######################################### 51 | # OSNLP_PACKAGE: name of default NLP package 52 | OSNLP_PACKAGE = com.google.android.gms 53 | # REGION_OSNLP_PACKAGE: 54 | # This value will be used as alternative 55 | # for particular region where default NLP is not functional. 56 | #REGION_OSNLP_PACKAGE = 57 | 58 | ################################### 59 | # GEOFENCE SERVICES 60 | ################################### 61 | # If set to one of the defined values below, it will override 62 | # the responsiveness for geofence services, which implements 63 | # the Proximity Alert API. If not set to a value defined below, 64 | # which is default, it will not override the responsivness. 65 | # The geofence HAL API is unaffected by this value. 66 | # GEOFENCE_SERVICES_RESPONSIVENESS_OVERRIDE Values: 67 | # 1: LOW responsiveness 68 | # 2: MEDIUM responsiveness 69 | # 3: HIGH responsiveness 70 | GEOFENCE_SERVICES_RESPONSIVENESS_OVERRIDE = 0 71 | 72 | ##################################### 73 | #GTP Opt-In app 74 | ##################################### 75 | 76 | #GTP privacy policy version url 77 | #https support is required 78 | GTP_PRIVACY_VERSION_URL = https://info.izatcloud.net/privacy/version.html 79 | 80 | #GTP privacy policy version download retry interval 81 | #unit is second. default is 86400 82 | GTP_PRIVACY_RETRY_INTERVAL = 86400 83 | 84 | ##################################### 85 | # IZAT PREMIUM FEATURE SETTINGS 86 | ##################################### 87 | #Possible states of a feature: 88 | #DISABLED 89 | #BASIC 90 | #PREMIUM 91 | 92 | #GTP_MODE valid modes: 93 | # DISABLED 94 | # LEGACY_WWAN 95 | # SDK (WWAN not available for Modems before LocTech 10.0) 96 | GTP_MODE=DISABLED 97 | 98 | #GTP_WAA valid modes: 99 | # DISABLED 100 | # BASIC 101 | GTP_WAA=DISABLED 102 | 103 | #SAP valid modes: 104 | # DISABLED 105 | # BASIC 106 | # PREMIUM 107 | # MODEM_DEFAULT 108 | SAP=PREMIUM 109 | 110 | 111 | #FREE_WIFI_SCAN_INJECT valid modes: 112 | #DISABLED 113 | #BASIC 114 | FREE_WIFI_SCAN_INJECT=BASIC 115 | 116 | #SUPL_WIFI valid modes: 117 | #DISABLED 118 | #BASIC 119 | SUPL_WIFI=BASIC 120 | 121 | #WIFI_SUPPLICANT_INFO valid modes: 122 | #DISABLED 123 | #BASIC 124 | WIFI_SUPPLICANT_INFO=BASIC 125 | 126 | ##################################### 127 | # Location process launcher settings 128 | ##################################### 129 | 130 | # DO NOT MODIFY 131 | # Modifying below attributes without 132 | # caution can have serious implications. 133 | 134 | #Values for PROCESS_STATE: 135 | # ENABLED 136 | # DISABLED 137 | 138 | #Values for LOW_RAM_TARGETS: 139 | # ENABLED 140 | # DISABLED 141 | # Property to enable/disable processes for low ram targets. Uses ro.config.low_ram property 142 | # to identify low ram targets. 143 | 144 | #PROCESS_NAME 145 | # Name of the executable file. 146 | 147 | #FEATURE MASKS: 148 | # GTP-WIFI 0X03 149 | # GTP-MP-CELL 0xc00 150 | # GTP-WAA 0x100 151 | # SAP 0Xc0 152 | # ODCPI 0x1000 153 | # FREE_WIFI_SCAN_INJECT 0x2000 154 | # SUPL_WIFI 0x4000 155 | # WIFI_SUPPLICANT_INFO 0x8000 156 | 157 | #Values for PLATFORMS can be: 158 | #1. Any valid values obtained from ro.board.platform separated by single space. For example: msm8960 msm8226 159 | #2. 'all' or 'all exclude' -> for All platforms 160 | #3. 'all exclude XXXX' -> All platforms exclude XXXX. For example: all exclude msm8937 161 | 162 | #Values for SOC_IDS can be: 163 | #1. Any valid values obtained from soc_id node separated by single space. For example: 339 386 436 164 | ## soc_id value can be obtained from any one of below node: 165 | ## - /sys/devices/soc0/soc_id 166 | ## - /sys/devices/system/soc/soc0/id 167 | #2. 'all' or 'all exclude' -> for All soc id's 168 | #3. 'all exclude XXXX' -> All soc id's exclude XXXX. For example: all exclude 339 386 169 | 170 | #Values for BASEBAND can be: 171 | #1. Any valid values obtained from ro.baseband separated by single space. For example: sglte sglte2 172 | #2. 'all' or 'all exclude' -> for all basebands 173 | #3. 'all exclude XXXX' -> All basebands exclude XXXX. For example: all exclude sglte 174 | PROCESS_NAME=lowi-server 175 | PROCESS_ARGUMENT= 176 | PROCESS_STATE=ENABLED 177 | PROCESS_GROUPS=gps wifi inet oem_2901 178 | PREMIUM_FEATURE=0 179 | IZAT_FEATURE_MASK=0xf303 180 | PLATFORMS=all 181 | SOC_IDS=all 182 | BASEBAND=all 183 | LOW_RAM_TARGETS=DISABLED 184 | HARDWARE_TYPE=all 185 | VENDOR_ENHANCED_PROCESS=0 186 | 187 | PROCESS_NAME=xtwifi-inet-agent 188 | PROCESS_ARGUMENT= 189 | PROCESS_STATE=ENABLED 190 | PROCESS_GROUPS=inet gps 191 | PREMIUM_FEATURE=1 192 | IZAT_FEATURE_MASK=0xc03 193 | PLATFORMS=all 194 | SOC_IDS=all exclude 386 436 195 | BASEBAND=all 196 | LOW_RAM_TARGETS=DISABLED 197 | HARDWARE_TYPE=all 198 | VENDOR_ENHANCED_PROCESS=1 199 | 200 | PROCESS_NAME=xtwifi-client 201 | PROCESS_ARGUMENT= 202 | PROCESS_STATE=ENABLED 203 | PROCESS_GROUPS=wifi inet gps system oem_2904 204 | PREMIUM_FEATURE=1 205 | IZAT_FEATURE_MASK=0xd03 206 | PLATFORMS=all 207 | SOC_IDS=all exclude 386 436 208 | BASEBAND=all 209 | LOW_RAM_TARGETS=DISABLED 210 | HARDWARE_TYPE=all 211 | VENDOR_ENHANCED_PROCESS=1 212 | 213 | PROCESS_NAME=slim_daemon 214 | PROCESS_ARGUMENT= 215 | PROCESS_STATE=DISABLED 216 | PROCESS_GROUPS=gps oem_2901 can plugdev diag sensors 217 | PREMIUM_FEATURE=1 218 | IZAT_FEATURE_MASK=0xf0 219 | PLATFORMS=all 220 | SOC_IDS=all exclude 386 436 221 | BASEBAND=all 222 | LOW_RAM_TARGETS=DISABLED 223 | HARDWARE_TYPE=all 224 | VENDOR_ENHANCED_PROCESS=1 225 | 226 | PROCESS_NAME=xtra-daemon 227 | PROCESS_ARGUMENT= 228 | PROCESS_STATE=ENABLED 229 | PROCESS_GROUPS=inet gps system 230 | PREMIUM_FEATURE=0 231 | IZAT_FEATURE_MASK=0 232 | PLATFORMS=all 233 | SOC_IDS=all 234 | BASEBAND=all 235 | LOW_RAM_TARGETS=ENABLED 236 | HARDWARE_TYPE=all 237 | VENDOR_ENHANCED_PROCESS=0 238 | 239 | ######################################## 240 | # Engine Service which host DRE module # 241 | # To enable DRE engine service, change # 242 | # PROCESS_STATE=ENABLED # 243 | ######################################## 244 | PROCESS_NAME=engine-service 245 | PROCESS_ARGUMENT=DRE-INT libloc_epDr.so 246 | PROCESS_STATE=DISABLED 247 | PROCESS_GROUPS=gps diag inet qwes oem_2901 system 248 | PREMIUM_FEATURE=0 249 | IZAT_FEATURE_MASK=0 250 | PLATFORMS=all 251 | SOC_IDS=all 252 | BASEBAND=all 253 | LOW_RAM_TARGETS=DISABLED 254 | HARDWARE_TYPE=all 255 | VENDOR_ENHANCED_PROCESS=1 256 | 257 | ######################################## 258 | # Engine Service which host PPE module # 259 | # To enable PPE engine service, change # 260 | # PROCESS_STATE=ENABLED # 261 | # and update process arugements # 262 | # with PPE library name # 263 | #PROCESS_ARGUMENT=PPE libepsimulator.so# 264 | ######################################## 265 | PROCESS_NAME=engine-service 266 | PROCESS_ARGUMENT=PPE libepsimulator.so 267 | PROCESS_STATE=DISABLED 268 | PROCESS_GROUPS=gps diag inet oem_2901 269 | PREMIUM_FEATURE=0 270 | IZAT_FEATURE_MASK=0 271 | PLATFORMS=all 272 | SOC_IDS=all 273 | BASEBAND=all 274 | LOW_RAM_TARGETS=DISABLED 275 | HARDWARE_TYPE=all 276 | VENDOR_ENHANCED_PROCESS=1 277 | -------------------------------------------------------------------------------- /configs/gps/gps.conf: -------------------------------------------------------------------------------- 1 | #Version check for XTRA 2 | #DISABLE = 0 3 | #AUTO = 1 4 | #XTRA2 = 2 5 | #XTRA3 = 3 6 | XTRA_VERSION_CHECK=1 7 | 8 | # Error Estimate 9 | # _SET = 1 10 | # _CLEAR = 0 11 | ERR_ESTIMATE=0 12 | 13 | #NTP server 14 | NTP_SERVER=time.xtracloud.net 15 | 16 | #XTRA CA path 17 | XTRA_CA_PATH=/usr/lib/ssl-1.1/certs 18 | 19 | # DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info 20 | # 4 - Debug, 5 - Verbose 21 | # If DEBUG_LEVEL is commented, Android's logging levels will be used 22 | DEBUG_LEVEL = 2 23 | 24 | # Intermediate position report, 1=enable, 0=disable 25 | INTERMEDIATE_POS=0 26 | 27 | # supl version 2.0 28 | SUPL_VER=0x20000 29 | 30 | # Emergency SUPL, 1=enable, 0=disable 31 | #SUPL_ES=1 32 | 33 | #Choose PDN for Emergency SUPL 34 | #1 - Use emergency PDN 35 | #0 - Use regular SUPL PDN for Emergency SUPL 36 | #USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=0 37 | 38 | #SUPL_MODE is a bit mask set in config.xml per carrier by default. 39 | #If it is uncommented here, this value will overwrite the value from 40 | #config.xml. 41 | #MSA=0X2 42 | #MSB=0X1 43 | SUPL_MODE=3 44 | 45 | # GPS Capabilities bit mask 46 | # SCHEDULING = 0x01 47 | # MSB = 0x02 48 | # MSA = 0x04 49 | # ON_DEMAND_TIME = 0x10 50 | # default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING 51 | CAPABILITIES=0x17 52 | 53 | # Accuracy threshold for intermediate positions 54 | # less accurate positions are ignored, 0 for passing all positions 55 | # ACCURACY_THRES=5000 56 | 57 | ################################ 58 | ##### AGPS server settings ##### 59 | ################################ 60 | 61 | # FOR SUPL SUPPORT, set the following 62 | # SUPL_HOST=supl.host.com or IP 63 | # SUPL_PORT=1234 64 | 65 | # FOR MO SUPL SUPPORT, set the following 66 | # MO_SUPL_HOST=supl.host.com or IP 67 | # MO_SUPL_PORT=1234 68 | 69 | SUPL_HOST=supl.google.com 70 | SUPL_PORT=7275 71 | 72 | # FOR C2K PDE SUPPORT, set the following 73 | # C2K_HOST=c2k.pde.com or IP 74 | # C2K_PORT=1234 75 | 76 | # Bitmask of slots that are available 77 | # for write/install to, where 1s indicate writable, 78 | # and the default value is 0 where no slots 79 | # are writable. For example, AGPS_CERT_WRITABLE_MASK 80 | # of b1000001010 makes 3 slots available 81 | # and the remaining 7 slots unwritable. 82 | #AGPS_CERT_WRITABLE_MASK=0 83 | 84 | #################################### 85 | # LTE Positioning Profile Settings 86 | #################################### 87 | # 0: Enable RRLP on LTE(Default) 88 | # 1: Enable LPP_User_Plane on LTE 89 | # 2: Enable LPP_Control_Plane 90 | # 3: Enable both LPP_User_Plane and LPP_Control_Plane 91 | LPP_PROFILE = 2 92 | 93 | #################################### 94 | #Datum Type 95 | #################################### 96 | # 0: WGS-84 97 | # 1: PZ-90 98 | DATUM_TYPE = 0 99 | 100 | ################################ 101 | # EXTRA SETTINGS 102 | ################################ 103 | # NMEA provider (1=Modem Processor, 0=Application Processor) 104 | NMEA_PROVIDER=0 105 | 106 | # Customized NMEA GGA fix quality that can be used to tell 107 | # whether SENSOR contributed to the fix. 108 | # 109 | # When this configuration item is not enabled (set to any value that is not 1), 110 | # GGA fix quality conforms to NMEA standard spec as below: 111 | # PPP/DGNSS/SBAS correction fix w/ or w/o sensor: 2 112 | # RTK fixed fix w/ or w/o sensor: 4 113 | # RTK float fix w/ or w/o sensor: 5 114 | # SPE fix w/ or w/o sensor: 1 115 | # Sensor dead reckoning fix: 6 116 | # 117 | # When this configuration is enabled (set to 1), GGA fix quality 118 | # will be output as below: 119 | # PPP fix w/o sensor: 59, w/ sensor: 69 120 | # DGNSS/SBAS correction fix w/o sensor: 2, w/ sensor: 62 121 | # RTK fixed fix w/o sensor: 4, w/ sensor: 64 122 | # RTK float fix w/o sensor: 5, w/ sensor: 65, 123 | # SPE fix w/o sensor: 1, and w/ sensor: 61 124 | # Sensor dead reckoning fix: 6 125 | # 126 | # any value that is not 1 - disabled 127 | # 1 - enabled 128 | CUSTOM_NMEA_GGA_FIX_QUALITY_ENABLED = 0 129 | 130 | # Mark if it is a SGLTE target (1=SGLTE, 0=nonSGLTE) 131 | SGLTE_TARGET=0 132 | 133 | ################################################## 134 | # Select Positioning Protocol on A-GLONASS system 135 | ################################################## 136 | # 0x1: RRC CPlane 137 | # 0x2: RRLP UPlane 138 | # 0x4: LLP Uplane 139 | A_GLONASS_POS_PROTOCOL_SELECT = 0 140 | 141 | ################################################## 142 | # Select technology for LPPe Control Plane 143 | ################################################## 144 | # 0x1: DBH for LPPe CP 145 | # 0x2: WLAN AP Measurements for LPPe CP 146 | # 0x4: SRN AP measurement for CP 147 | # 0x8: Sensor Barometer Measurement LPPe CP 148 | LPPE_CP_TECHNOLOGY = 0 149 | 150 | ################################################## 151 | # Select technology for LPPe User Plane 152 | ################################################## 153 | # 0x1: DBH for LPPe UP 154 | # 0x2: WLAN AP Measurements for LPPe UP 155 | # 0x4: SRN AP measurement for UP 156 | # 0x8: Sensor Barometer Measurement LPPe UP 157 | LPPE_UP_TECHNOLOGY = 0 158 | 159 | ################################################## 160 | # AGPS_CONFIG_INJECT 161 | ################################################## 162 | # enable/disable injection of AGPS configurations: 163 | # SUPL_VER 164 | # SUPL_HOST 165 | # SUPL_PORT 166 | # MO_SUPL_HOST 167 | # MO_SUPL_PORT 168 | # C2K_HOST 169 | # C2K_PORT 170 | # LPP_PROFILE 171 | # A_GLONASS_POS_PROTOCOL_SELECT 172 | # 0: disable 173 | # 1: enable 174 | AGPS_CONFIG_INJECT = 1 175 | 176 | ################################################## 177 | # GNSS settings for automotive use cases 178 | # Configurations in following section are 179 | # specific to automotive use cases, others 180 | # please do not change, keep the default values 181 | ################################################## 182 | 183 | # AP Coarse Timestamp Uncertainty 184 | ################################################## 185 | # default : 10 186 | # AP time stamp uncertainty, until GNSS receiver 187 | # is able to acquire better timing information 188 | AP_TIMESTAMP_UNCERTAINTY = 10 189 | 190 | ################################################## 191 | # QDR engine availability status 192 | ################################################## 193 | # 0 : NO QDR (default) 194 | # 1 : QDR enabled 195 | # This settings enables QDR Configuration for 196 | # automotive use case, if enabled then 197 | # DR_AP_Service needs to be enabled in izat.conf 198 | #EXTERNAL_DR_ENABLED = 0 199 | 200 | ##################################### 201 | # DR_SYNC Pulse Availability 202 | ##################################### 203 | # 0 : DR_SYNC pulse not available (default) 204 | # 1 : DR_SYNC pulse available 205 | # This configuration enables the driver to make use 206 | # of PPS events generated by DR_SYNC pulse 207 | # Standard Linux PPS driver needs to be enabled 208 | DR_SYNC_ENABLED = 0 209 | 210 | ##################################### 211 | # PPS Device name 212 | ##################################### 213 | PPS_DEVICENAME = /dev/pps0 214 | 215 | ##################################### 216 | # Ignore PPS at Startup and after long outage 217 | ##################################### 218 | IGNORE_PPS_PULSE_COUNT = 1 219 | 220 | ##################################### 221 | # Long GNSS RF outage in seconds 222 | ##################################### 223 | GNSS_OUTAGE_DURATION = 10 224 | 225 | ##################################### 226 | # AP Clock Accuracy 227 | ##################################### 228 | # Quality of APPS processor clock (in PPM). 229 | # Value specified is used for calculation of 230 | # APPS time stamp uncertainty 231 | AP_CLOCK_PPM = 100 232 | 233 | ##################################### 234 | # MAX ms difference to detect missing pulse 235 | ##################################### 236 | # Specifies time threshold in ms to validate any missing PPS pulses 237 | MISSING_PULSE_TIME_DELTA = 900 238 | 239 | ##################################### 240 | # Propagation time uncertainty 241 | ##################################### 242 | # This settings enables time uncertainty propagation 243 | # logic incase of missing PPS pulse 244 | PROPAGATION_TIME_UNCERTAINTY = 1 245 | 246 | ####################################### 247 | # APN / IP Type Configuration 248 | # APN and IP Type to use for setting 249 | # up WWAN call. 250 | # Use below values for IP Type: 251 | # v4 = 4 252 | # v6 = 6 253 | # v4v6 = 10 254 | ####################################### 255 | # INTERNET_APN = abc.xyz 256 | # INTERNET_IP_TYPE = 4 257 | # SUPL_APN = abc.xyz 258 | # SUPL_IP_TYPE = 4 259 | 260 | ##################################### 261 | # Modem type 262 | ##################################### 263 | # This setting configures modem type 264 | # (external=0 or internal=1) 265 | # comment out the next line to vote 266 | # for the first modem in the list 267 | MODEM_TYPE = 1 268 | 269 | ################################################## 270 | # CONSTRAINED TIME UNCERTAINTY MODE 271 | ################################################## 272 | # 0 : disabled (default) 273 | # 1 : enabled 274 | # This setting enables GPS engine to keep its time 275 | # uncertainty below the specified constraint 276 | #CONSTRAINED_TIME_UNCERTAINTY_ENABLED = 0 277 | 278 | # If constrained time uncertainty mode is enabled, 279 | # this setting specifies the time uncertainty 280 | # threshold that gps engine need to maintain. 281 | # In unit of milli-seconds. 282 | # Default is 0.0 meaning that modem default value 283 | # of time uncertainty threshold will be used. 284 | #CONSTRAINED_TIME_UNCERTAINTY_THRESHOLD = 0.0 285 | 286 | # If constrained time uncertainty mode is enabled, 287 | # this setting specifies the power budget that 288 | # gps engine is allowed to spend to maintain the time 289 | # uncertainty. 290 | # Default is 0 meaning that GPS engine is not constained 291 | # by power budget and can spend as much power as needed. 292 | # In unit of 0.1 milli watt second. 293 | #CONSTRAINED_TIME_UNCERTAINTY_ENERGY_BUDGET = 0 294 | 295 | ################################################## 296 | # POSITION ASSISTED CLOCK ESTIMATOR 297 | ################################################## 298 | # 0 : disabled (default) 299 | # 1 : enabled 300 | # This setting enables GPS engine to estimate clock 301 | # bias and drift when the signal from at least 1 302 | # SV is available and the UE's position is known by 303 | # other position engines. 304 | #POSITION_ASSISTED_CLOCK_ESTIMATOR_ENABLED = 0 305 | 306 | ##################################### 307 | # proxyAppPackageName 308 | ##################################### 309 | # This is a string that is sent to the framework 310 | # in nfwNotifyCb callback 311 | PROXY_APP_PACKAGE_NAME = com.google.android.carrierlocation 312 | 313 | ##################################### 314 | # CP_MTLR_ES 315 | ##################################### 316 | # CP MTLR ES, 1=enable, 0=disable 317 | CP_MTLR_ES=0 318 | 319 | ################################################## 320 | # GNSS_DEPLOYMENT 321 | ################################################## 322 | # 0 : Enable QTI GNSS (default) 323 | # 1 : Enable QCSR SS5 324 | # This setting use to select between QTI GNSS 325 | # and QCSR SS5 hardware receiver. 326 | # By default QTI GNSS receiver is enabled. 327 | # GNSS_DEPLOYMENT = 0 328 | -------------------------------------------------------------------------------- /configs/media_codecs_performance.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 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 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | -------------------------------------------------------------------------------- /audio/audio_policy_volumes.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 24 | 25 | 26 | 27 | 0,-4200 28 | 33,-2800 29 | 66,-1400 30 | 100,0 31 | 32 | 33 | 0,-2400 34 | 33,-1600 35 | 66,-800 36 | 100,0 37 | 38 | 39 | 0,-2400 40 | 33,-1600 41 | 66,-800 42 | 100,0 43 | 44 | 46 | 48 | 49 | 1,-3000 50 | 33,-2600 51 | 66,-2200 52 | 100,-1800 53 | 54 | 56 | 58 | 60 | 62 | 64 | 65 | 1,-2970 66 | 33,-2010 67 | 66,-1020 68 | 100,0 69 | 70 | 72 | 74 | 76 | 77 | 78 | 1,-6100 79 | 20,-4300 80 | 60,-1400 81 | 100,0 82 | 83 | 85 | 87 | 89 | 91 | 93 | 94 | 0,-2970 95 | 33,-2010 96 | 66,-1020 97 | 100,0 98 | 99 | 101 | 103 | 105 | 107 | 108 | 1,-2970 109 | 33,-2010 110 | 66,-1020 111 | 100,0 112 | 113 | 115 | 117 | 119 | 120 | 0,-4200 121 | 33,-2800 122 | 66,-1400 123 | 100,0 124 | 125 | 126 | 0,-2400 127 | 33,-1600 128 | 66,-800 129 | 100,0 130 | 131 | 132 | 0,-4200 133 | 33,-2800 134 | 66,-1400 135 | 100,0 136 | 137 | 139 | 141 | 142 | 1,-3000 143 | 33,-2600 144 | 66,-2200 145 | 100,-1800 146 | 147 | 149 | 151 | 153 | 155 | 156 | 1,-3000 157 | 33,-2600 158 | 66,-2200 159 | 100,-1800 160 | 161 | 163 | 165 | 167 | 169 | 171 | 173 | 175 | 177 | 179 | 181 | 183 | 185 | 187 | 189 | 191 | 193 | 195 | 197 | 199 | 201 | 203 | 205 | 207 | 209 | 210 | --------------------------------------------------------------------------------