├── shims
├── stub
│ ├── empty.cpp
│ └── Android.bp
├── liboemcrypto
│ ├── libshim_oemcrypto.map.txt
│ ├── oemcrypto.c
│ └── Android.bp
├── libdsms
│ ├── Android.bp
│ └── dsms.c
├── libsfpex
│ ├── Android.bp
│ └── sfpex.c
├── libutils-v32
│ ├── Android.bp
│ ├── Thread.h
│ └── Thread.cpp
├── libcamera
│ ├── Android.bp
│ ├── Fence.h
│ ├── GraphicBufferMapper.cpp
│ └── Fence.cpp
├── libcrypto
│ ├── Android.bp
│ └── crypto.c
└── libsensorndkbridge
│ ├── Android.bp
│ └── ASensorManager.cpp
├── sepolicy
└── vendor
│ ├── attributes
│ ├── cbd.te
│ ├── proc_net.te
│ ├── surfaceflinger.te
│ ├── audioserver.te
│ ├── hal_health_default.te
│ ├── hal_memtrack_default.te
│ ├── hal_wifi_default.te
│ ├── fsck_untrusted.te
│ ├── hal_bluetooth_default.te
│ ├── hal_lineage_touch_default.te
│ ├── hal_lineage_powershare_default.te
│ ├── service.te
│ ├── system_app.te
│ ├── vold.te
│ ├── service_contexts
│ ├── mediacodec.te
│ ├── nfc.te
│ ├── lhd.te
│ ├── system_server.te
│ ├── hal_gatekeeper_default.te
│ ├── hwservice_contexts
│ ├── property.te
│ ├── hal_nfc_default.te
│ ├── rild.te
│ ├── gpsd.te
│ ├── bootanim.te
│ ├── device.te
│ ├── hal_lineage_livedisplay_exynos.te
│ ├── charger_vendor.te
│ ├── hal_keymaster_default.te
│ ├── fastbootd.te
│ ├── hal_fingerprint_default.te
│ ├── hal_power_default.te
│ ├── tzdaemon.te
│ ├── fsck.te
│ ├── hal_sensors_default.te
│ ├── property_contexts
│ ├── init.te
│ ├── hal_audio_default.te
│ ├── hal_samsung_spen.te
│ ├── vendor_init.te
│ ├── hal_drm_widevine.te
│ ├── kernel.te
│ ├── hal_samsung_spen_default.te
│ ├── hal_camera_default.te
│ ├── file.te
│ ├── hal_graphics_composer_default.te
│ └── file_contexts
├── configs
├── ril
│ └── sehradiomanager.conf
├── wifi
│ └── wpa_supplicant_overlay.conf
├── idc
│ └── sec_e-pen.idc
├── init
│ ├── init.udfps.rc
│ ├── init.recovery.exynos9820.rc
│ ├── Android.bp
│ ├── init.stune.rc
│ └── fstab.exynos9820.in
├── kernel
│ ├── exynos9820.cfg
│ ├── exynos9825-r.cfg
│ ├── f62.cfg
│ ├── d1x.cfg
│ ├── d1.cfg
│ ├── beyond0lte.cfg
│ ├── beyondx.cfg
│ ├── beyond1lte.cfg
│ ├── d2s.cfg
│ ├── d2x.cfg
│ └── beyond2lte.cfg
├── linker
│ └── public.libraries.txt
├── task_profiles
│ ├── cgroups_30.json
│ └── task_profiles_30.json
├── keylayout
│ └── gpio_keys.kl
├── power
│ ├── README.md
│ └── powerhint.json
├── thermal
│ └── thermal_info_config.json
└── nfc
│ └── libnfc-sec-vendor.conf
├── setup-makefiles.py
├── vendor.exynos9820.prop
├── vendor.exynos9825.prop
├── interfaces
└── spen
│ └── aidl
│ ├── aidl_api
│ └── vendor.samsung.hardware.spen
│ │ ├── 1
│ │ ├── .hash
│ │ └── vendor
│ │ │ └── samsung
│ │ │ └── hardware
│ │ │ └── spen
│ │ │ └── ISPen.aidl
│ │ ├── 2
│ │ ├── .hash
│ │ └── vendor
│ │ │ └── samsung
│ │ │ └── hardware
│ │ │ └── spen
│ │ │ └── ISPen.aidl
│ │ └── current
│ │ └── vendor
│ │ └── samsung
│ │ └── hardware
│ │ └── spen
│ │ └── ISPen.aidl
│ ├── vendor
│ └── samsung
│ │ └── hardware
│ │ └── spen
│ │ └── ISPen.aidl
│ └── Android.bp
├── bluetooth
├── Android.bp
└── libbt_vndcfg.txt
├── rro_overlays
├── WifiOverlay
│ ├── Android.bp
│ ├── AndroidManifest.xml
│ └── res
│ │ └── values
│ │ └── config.xml
└── WifiOverlayNoSAE
│ ├── Android.bp
│ ├── AndroidManifest.xml
│ └── res
│ └── values
│ └── config.xml
├── Android.bp
├── overlay
├── packages
│ ├── apps
│ │ ├── Aperture
│ │ │ └── app
│ │ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── res
│ │ │ │ └── values
│ │ │ │ └── config.xml
│ │ ├── Dialer
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── android
│ │ │ │ └── dialer
│ │ │ │ └── callrecord
│ │ │ │ └── res
│ │ │ │ └── values
│ │ │ │ └── config.xml
│ │ └── Settings
│ │ │ └── res
│ │ │ └── values
│ │ │ └── config.xml
│ └── services
│ │ └── Telephony
│ │ └── res
│ │ └── values
│ │ └── config.xml
├── frameworks
│ └── base
│ │ └── packages
│ │ ├── SettingsProvider
│ │ └── res
│ │ │ └── values
│ │ │ └── defaults.xml
│ │ └── SystemUI
│ │ └── res
│ │ └── values
│ │ └── config.xml
├── hardware
│ └── samsung
│ │ └── AdvancedDisplay
│ │ └── res
│ │ └── values
│ │ └── config.xml
└── lineage-sdk
│ └── lineage
│ └── res
│ └── res
│ └── values
│ └── config.xml
├── aidl
└── spen
│ ├── vendor.samsung.hardware.spen-service.davinci.xml
│ ├── vendor.samsung.hardware.spen-service.davinci.rc
│ ├── Android.bp
│ ├── service.cpp
│ ├── SPen.h
│ └── SPen.cpp
├── device_framework_matrix.xml
├── exynos9825_manifest.xml
├── SPenActions
├── src
│ └── org
│ │ └── lineageos
│ │ └── spenactions
│ │ ├── SPenDirection.java
│ │ ├── ButtonAction.java
│ │ ├── settings
│ │ ├── SettingsActivity.java
│ │ ├── SettingsUtils.java
│ │ └── SPenSettingsFragment.java
│ │ ├── BootReceiver.java
│ │ ├── MotionEvent.java
│ │ ├── BluetoothReceiver.java
│ │ ├── SPenActionsService.java
│ │ ├── SPenMode.java
│ │ ├── BluetoothUtils.java
│ │ └── SPenConnectionManager.java
├── res
│ ├── values
│ │ ├── config.xml
│ │ ├── arrays.xml
│ │ └── strings.xml
│ ├── layout
│ │ └── spensettings.xml
│ └── xml
│ │ └── spen_settings.xml
├── privapp-permissions_org.lineageos.spenactions.xml
├── Android.bp
└── AndroidManifest.xml
├── overlay-exynos9820
└── lineage-sdk
│ ├── lineage
│ └── res
│ │ └── res
│ │ └── values
│ │ └── config.xml
│ └── packages
│ └── LineageSettingsProvider
│ └── res
│ └── values
│ └── defaults.xml
├── common_pie_launched.mk
├── recovery
└── Android.bp
├── exynos9825-r.mk
├── exynos9820.mk
├── exynos9825.mk
├── BoardConfig9820.mk
├── lineage.dependencies
├── BoardConfig9825.mk
├── AndroidBoard.mk
├── BoardConfigPieLaunched.mk
├── BoardConfig9825-r.mk
├── audio
└── proxy
│ ├── audio_board_info.h
│ ├── audio_usb_proxy_interface.h
│ ├── audio_abox.h
│ ├── audio_a2dp_proxy.h
│ ├── Android.bp
│ ├── audio_mixer.h
│ └── audio_streamconfig.h
├── compatibility_matrix.xml
├── vendor.prop
├── extract-files.py
├── manifest.xml
└── releasetools
└── releasetools.py
/shims/stub/empty.cpp:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/sepolicy/vendor/attributes:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/configs/ril/sehradiomanager.conf:
--------------------------------------------------------------------------------
1 | FW_READY=1
2 | CA_ENABLED=1
3 |
--------------------------------------------------------------------------------
/setup-makefiles.py:
--------------------------------------------------------------------------------
1 | #!./extract-files.py --regenerate_makefiles
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/cbd.te:
--------------------------------------------------------------------------------
1 | allow cbd radio_device:chr_file rw_file_perms;
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/proc_net.te:
--------------------------------------------------------------------------------
1 | allow proc_net proc:filesystem associate;
2 |
--------------------------------------------------------------------------------
/configs/wifi/wpa_supplicant_overlay.conf:
--------------------------------------------------------------------------------
1 | driver_param=use_p2p_group_interface=1
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/surfaceflinger.te:
--------------------------------------------------------------------------------
1 | get_prop(surfaceflinger, vendor_hwc_prop)
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/audioserver.te:
--------------------------------------------------------------------------------
1 | dontaudit audioserver vendor_default_prop:file read;
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_health_default.te:
--------------------------------------------------------------------------------
1 | r_dir_file(hal_health_default, sysfs_battery);
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_memtrack_default.te:
--------------------------------------------------------------------------------
1 | r_dir_file(hal_memtrack_default, sysfs_gpu)
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_wifi_default.te:
--------------------------------------------------------------------------------
1 | set_prop(hal_wifi_default, vendor_wlan_prop);
2 |
--------------------------------------------------------------------------------
/configs/idc/sec_e-pen.idc:
--------------------------------------------------------------------------------
1 | touch.orientationAware = 1
2 | touch.deviceType = touchScreen
3 |
--------------------------------------------------------------------------------
/configs/init/init.udfps.rc:
--------------------------------------------------------------------------------
1 | on init
2 | write /sys/class/sec/tsp/cmd "fod_enable,1"
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/fsck_untrusted.te:
--------------------------------------------------------------------------------
1 | allow fsck_untrusted sysfs_block:file r_file_perms;
2 |
--------------------------------------------------------------------------------
/configs/kernel/exynos9820.cfg:
--------------------------------------------------------------------------------
1 | exynos9820.dtb
2 | custom0=0x00000000
3 | custom1=0xff000000
4 |
--------------------------------------------------------------------------------
/shims/liboemcrypto/libshim_oemcrypto.map.txt:
--------------------------------------------------------------------------------
1 | LIBC {
2 | global:
3 | kopen;
4 | };
5 |
--------------------------------------------------------------------------------
/vendor.exynos9820.prop:
--------------------------------------------------------------------------------
1 | ## SoC
2 | ro.soc.manufacturer=Samsung
3 | ro.soc.model=Exynos 9820
4 |
--------------------------------------------------------------------------------
/vendor.exynos9825.prop:
--------------------------------------------------------------------------------
1 | ## SoC
2 | ro.soc.manufacturer=Samsung
3 | ro.soc.model=Exynos 9825
4 |
--------------------------------------------------------------------------------
/configs/kernel/exynos9825-r.cfg:
--------------------------------------------------------------------------------
1 | exynos9825-r.dtb
2 | custom0=0x00000000
3 | custom1=0x000000ff
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_bluetooth_default.te:
--------------------------------------------------------------------------------
1 | set_prop(hal_bluetooth_default, vendor_bluetooth_prop);
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_lineage_touch_default.te:
--------------------------------------------------------------------------------
1 | allow hal_lineage_touch_default sysfs_spen:dir search;
2 |
--------------------------------------------------------------------------------
/interfaces/spen/aidl/aidl_api/vendor.samsung.hardware.spen/1/.hash:
--------------------------------------------------------------------------------
1 | 05ef0a7a50b826df1f97730059434688b02dc41d
2 |
--------------------------------------------------------------------------------
/interfaces/spen/aidl/aidl_api/vendor.samsung.hardware.spen/2/.hash:
--------------------------------------------------------------------------------
1 | feb1de30b12e8a8b4862d4da1197a11771ad7a02
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_lineage_powershare_default.te:
--------------------------------------------------------------------------------
1 | r_dir_file(hal_lineage_powershare_default, sysfs_battery);
2 |
--------------------------------------------------------------------------------
/bluetooth/Android.bp:
--------------------------------------------------------------------------------
1 | filegroup {
2 | name: "vnd_exynos9820.txt",
3 | srcs: ["libbt_vndcfg.txt"],
4 | }
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/service.te:
--------------------------------------------------------------------------------
1 | type hal_samsung_spen_service, hal_service_type, protected_service, service_manager_type;
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/system_app.te:
--------------------------------------------------------------------------------
1 | # Allow S Pen HAL service to be found
2 | hal_client_domain(system_app, hal_samsung_spen)
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vold.te:
--------------------------------------------------------------------------------
1 | allow vold efs_file:dir rw_file_perms;
2 |
3 | allow vold sysfs_block_writable:file rw_file_perms;
4 |
--------------------------------------------------------------------------------
/configs/linker/public.libraries.txt:
--------------------------------------------------------------------------------
1 | libGLES_mali.so
2 | libOpenCL.so
3 | libOpenCL.so.1
4 | libOpenCL.so.1.1
5 | vulkan.mali.so
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/service_contexts:
--------------------------------------------------------------------------------
1 | vendor.samsung.hardware.spen.ISPen/default u:object_r:hal_samsung_spen_service:s0
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/mediacodec.te:
--------------------------------------------------------------------------------
1 | r_dir_file(mediacodec, sysfs_v4l);
2 |
3 | allow mediacodec m2m1shot_device:chr_file rw_file_perms;
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/nfc.te:
--------------------------------------------------------------------------------
1 | allow nfc nfc_vendor_data_file:dir rw_dir_perms;
2 | allow nfc nfc_vendor_data_file:file create_file_perms;
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/lhd.te:
--------------------------------------------------------------------------------
1 | allow lhd sysfs_sensors_writable:file rw_file_perms;
2 |
3 | binder_call(lhd, servicemanager)
4 | wakelock_use(lhd)
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/system_server.te:
--------------------------------------------------------------------------------
1 | allow system_server self:capability sys_module;
2 |
3 | allow system_server sysfs_extcon:file r_file_perms;
4 |
--------------------------------------------------------------------------------
/rro_overlays/WifiOverlay/Android.bp:
--------------------------------------------------------------------------------
1 | runtime_resource_overlay {
2 | name: "WifiOverlay",
3 | theme: "WifiOverlay",
4 | vendor: true
5 | }
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_gatekeeper_default.te:
--------------------------------------------------------------------------------
1 | get_prop(hal_gatekeeper_default, vendor_tztsdaemon_prop);
2 |
3 | teegris_use(hal_gatekeeper_default);
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hwservice_contexts:
--------------------------------------------------------------------------------
1 | vendor.samsung.hardware.gnss::ISehGnss u:object_r:hal_gnss_hwservice:s0
2 |
--------------------------------------------------------------------------------
/sepolicy/vendor/property.te:
--------------------------------------------------------------------------------
1 | vendor_internal_prop(vendor_bluetooth_prop)
2 | vendor_internal_prop(vendor_camera_prop)
3 | vendor_internal_prop(vendor_wlan_prop)
4 |
--------------------------------------------------------------------------------
/rro_overlays/WifiOverlayNoSAE/Android.bp:
--------------------------------------------------------------------------------
1 | runtime_resource_overlay {
2 | name: "WifiOverlayNoSAE",
3 | theme: "WifiOverlayNoSAE",
4 | vendor: true
5 | }
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_nfc_default.te:
--------------------------------------------------------------------------------
1 | allow hal_nfc_default nfc_vendor_data_file:dir create_dir_perms;
2 | allow hal_nfc_default nfc_vendor_data_file:dir create_file_perms;
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/rild.te:
--------------------------------------------------------------------------------
1 | allow rild log_vendor_data_file:dir create_dir_perms;
2 |
3 | dontaudit rild default_prop:file read;
4 | dontaudit rild system_prop:file read;
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/gpsd.te:
--------------------------------------------------------------------------------
1 | allow gpsd gpsd_exec:file execute_no_trans;
2 |
3 | binder_call(gpsd, servicemanager)
4 | allow gpsd hal_system_suspend_service:service_manager find;
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/bootanim.te:
--------------------------------------------------------------------------------
1 | allow bootanim traced_producer_socket:sock_file write;
2 | allow bootanim traced:unix_stream_socket connectto;
3 |
4 | dontaudit bootanim system_data_file:dir search;
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/device.te:
--------------------------------------------------------------------------------
1 | type dtb_block_device, dev_type;
2 | type jsqz_device, dev_type;
3 | type m2m1shot_device, dev_type;
4 | type secmem_device, dev_type;
5 | type vts_fio_device, dev_type;
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_lineage_livedisplay_exynos.te:
--------------------------------------------------------------------------------
1 | allow hal_lineage_livedisplay_exynos sysfs_lcd_writable:dir search;
2 | allow hal_lineage_livedisplay_exynos sysfs_lcd_writable:file rw_file_perms;
3 |
--------------------------------------------------------------------------------
/sepolicy/vendor/charger_vendor.te:
--------------------------------------------------------------------------------
1 | allow charger_vendor device:dir r_file_perms;
2 | allow charger_vendor sysfs_battery:file r_file_perms;
3 | allow charger_vendor sysfs_battery_writable:file r_file_perms;
4 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_keymaster_default.te:
--------------------------------------------------------------------------------
1 | get_prop(hal_keymaster_default, vendor_tztsdaemon_prop);
2 |
3 | teegris_use(hal_keymaster_default);
4 |
5 | r_dir_file(hal_keymaster_default, prov_efs_file);
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/fastbootd.te:
--------------------------------------------------------------------------------
1 | allow fastbootd {
2 | dtb_block_device
3 | system_block_device
4 | }:blk_file rw_file_perms;
5 | allowxperm fastbootd system_block_device:blk_file ioctl { BLKDISCARD BLKSECDISCARD };
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_fingerprint_default.te:
--------------------------------------------------------------------------------
1 | allow hal_fingerprint_default efs_file:dir search;
2 |
3 | r_dir_file(hal_fingerprint_default, sec_efs_file);
4 |
5 | allow hal_fingerprint_default uhid_device:chr_file rw_file_perms;
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_power_default.te:
--------------------------------------------------------------------------------
1 | allow hal_power_default pm_qos_device:chr_file rw_file_perms;
2 |
3 | allow hal_power_default sysfs_battery:dir search;
4 | allow hal_power_default sysfs_battery_writable:file rw_file_perms;
5 |
--------------------------------------------------------------------------------
/sepolicy/vendor/tzdaemon.te:
--------------------------------------------------------------------------------
1 | allow tzdaemon efs_file:dir search;
2 | allow tzdaemon mnt_vendor_file:dir search;
3 |
4 | allow tzdaemon tee_efs_file:dir create_dir_perms;
5 | allow tzdaemon tee_efs_file:file create_file_perms;
6 |
--------------------------------------------------------------------------------
/sepolicy/vendor/fsck.te:
--------------------------------------------------------------------------------
1 | allow fsck sysfs_battery:dir search;
2 |
3 | allow fsck efs_block_device:blk_file rw_file_perms;
4 | allow fsck keydata_block_device:blk_file rw_file_perms;
5 | allow fsck keyrefuge_block_device:blk_file rw_file_perms;
6 |
--------------------------------------------------------------------------------
/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2021-2025 The LineageOS Project
3 | //
4 | // SPDX-License-Identifier: Apache-2.0
5 | //
6 |
7 | soong_namespace {
8 | imports: [
9 | "vendor/samsung/exynos9820-common",
10 | ],
11 | }
12 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Aperture/app/src/main/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 |
6 |
--------------------------------------------------------------------------------
/aidl/spen/vendor.samsung.hardware.spen-service.davinci.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | vendor.samsung.hardware.spen
4 | ISPen/default
5 |
6 |
7 |
--------------------------------------------------------------------------------
/configs/init/init.recovery.exynos9820.rc:
--------------------------------------------------------------------------------
1 | on init
2 | write /proc/sys/kernel/hung_task_timeout_secs 0
3 |
4 | setprop sys.usb.configfs 1
5 |
6 | on fs && property:ro.boot.super_partition=*
7 | symlink /dev/block/by-name/${ro.boot.super_partition} /dev/block/by-name/super
8 |
--------------------------------------------------------------------------------
/configs/task_profiles/cgroups_30.json:
--------------------------------------------------------------------------------
1 | {
2 | "Cgroups": [
3 | {
4 | "Controller": "schedtune",
5 | "Path": "/dev/stune",
6 | "Mode": "0755",
7 | "UID": "system",
8 | "GID": "system",
9 | "Optional": true
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/aidl/spen/vendor.samsung.hardware.spen-service.davinci.rc:
--------------------------------------------------------------------------------
1 | service vendor.spen-default /vendor/bin/hw/vendor.samsung.hardware.spen-service.davinci
2 | class hal
3 | user system
4 | group system
5 | shutdown critical
6 |
7 | on fs
8 | mkdir /mnt/vendor/efs/spen 0770 system system
9 |
--------------------------------------------------------------------------------
/bluetooth/libbt_vndcfg.txt:
--------------------------------------------------------------------------------
1 | BLUETOOTH_UART_DEVICE_PORT = "/dev/ttySAC1"
2 | FW_PATCHFILE_LOCATION = "/vendor/firmware"
3 | FW_PATCH_SETTLEMENT_DELAY_MS = 0
4 | UART_TARGET_BAUD_RATE = 3000000
5 | LPM_IDLE_TIMEOUT_MULTIPLE = 5
6 | SCO_USE_I2S_INTERFACE = TRUE
7 | SCO_I2SPCM_IF_ROLE = 0
8 | VENDOR_LIB_CONF_FILE = "/vendor/etc/bluetooth/bt_vendor.conf"
9 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_sensors_default.te:
--------------------------------------------------------------------------------
1 | allow hal_sensors_default sysfs:dir r_dir_perms;
2 | allow hal_sensors_default sysfs_input_writable:file rw_file_perms;
3 |
4 | allow hal_sensors_default sensors_device:chr_file rw_file_perms;
5 |
6 | allow hal_sensors_default log_vendor_data_file:dir search;
7 |
8 | binder_call(hal_sensors_default, system_server)
9 |
--------------------------------------------------------------------------------
/sepolicy/vendor/property_contexts:
--------------------------------------------------------------------------------
1 | # Bluetooth
2 | vendor.bluetooth_fw_ver u:object_r:vendor_bluetooth_prop:s0
3 |
4 | # Camera
5 | persist.vendor.sys.camera. u:object_r:vendor_camera_prop:s0
6 |
7 | # HWC
8 | vendor.hwc. u:object_r:vendor_hwc_prop:s0
9 |
10 | # WiFi
11 | vendor.wlan. u:object_r:vendor_wlan_prop:s0
12 |
--------------------------------------------------------------------------------
/shims/liboemcrypto/oemcrypto.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | FILE* kopen(char* filename, char* modes) {
5 | char* kfilename = filename;
6 |
7 | if (!strcmp(filename, "/efs/wv.keys") || !strcmp(filename, "/efs/cpk/wv.keys")) {
8 | kfilename = "/mnt/vendor/efs/wv.keys";
9 | }
10 |
11 | return fopen(kfilename, modes);
12 | }
13 |
--------------------------------------------------------------------------------
/configs/kernel/f62.cfg:
--------------------------------------------------------------------------------
1 | exynos9825-f62_swa_ins_00.dtbo
2 | custom0=0x00000000
3 | custom1=0x00000000
4 |
5 | exynos9825-f62_swa_ins_01.dtbo
6 | custom0=0x00000001
7 | custom1=0x00000001
8 |
9 | exynos9825-f62_swa_ins_02.dtbo
10 | custom0=0x00000002
11 | custom1=0x00000002
12 |
13 | exynos9825-f62_swa_ins_03.dtbo
14 | custom0=0x00000003
15 | custom1=0x000000ff
16 |
--------------------------------------------------------------------------------
/sepolicy/vendor/init.te:
--------------------------------------------------------------------------------
1 | allow init boot_block_device:lnk_file relabelto;
2 | allow init dtbo_block_device:lnk_file relabelto;
3 |
4 | allow init efs_file:dir mounton;
5 | allow init mnt_vendor_file:dir mounton;
6 |
7 | allow init socket_device:sock_file { create setattr unlink };
8 |
9 | allow init kernel:system module_request;
10 |
11 | allow init sysfs_block_writable:file rw_file_perms;
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_audio_default.te:
--------------------------------------------------------------------------------
1 | allow hal_audio_default vts_fio_device:chr_file rw_file_perms;
2 |
3 | allow hal_audio_default efs_file:dir search;
4 | r_dir_file(hal_audio_default, imei_efs_file);
5 | r_dir_file(hal_audio_default, sec_efs_file);
6 |
7 | allow hal_audio_default rild:unix_stream_socket connectto;
8 |
9 | get_prop(hal_audio_default, vendor_radio_prop);
10 |
11 | wakelock_use(hal_audio_default);
12 |
--------------------------------------------------------------------------------
/device_framework_matrix.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | vendor.samsung.hardware.spen
5 | 1
6 |
7 | ISPen
8 | default
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_samsung_spen.te:
--------------------------------------------------------------------------------
1 | hal_attribute(samsung_spen)
2 |
3 | # HWBinder IPC from client to server
4 | binder_call(hal_samsung_spen_client, hal_samsung_spen_server)
5 |
6 | add_service(hal_samsung_spen_server, hal_samsung_spen_service)
7 | allow hal_samsung_spen_client hal_samsung_spen_service:service_manager find;
8 |
9 | # Allow binder communication with system_app
10 | binder_call(hal_samsung_spen, system_app)
11 |
--------------------------------------------------------------------------------
/exynos9825_manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | android.hardware.gnss
4 | hwbinder
5 | 2.1
6 | 1.1
7 |
8 | IGnss
9 | default
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/configs/kernel/d1x.cfg:
--------------------------------------------------------------------------------
1 | exynos9820-d1x_kor_18.dtbo
2 | custom0=0x00000012
3 | custom1=0x00000012
4 |
5 | exynos9820-d1x_kor_19.dtbo
6 | custom0=0x00000013
7 | custom1=0x00000014
8 |
9 | exynos9820-d1x_kor_21.dtbo
10 | custom0=0x00000015
11 | custom1=0x00000015
12 |
13 | exynos9820-d1x_kor_22.dtbo
14 | custom0=0x00000016
15 | custom1=0x00000016
16 |
17 | exynos9820-d1x_kor_23.dtbo
18 | custom0=0x00000017
19 | custom1=0x000000ff
20 |
--------------------------------------------------------------------------------
/configs/kernel/d1.cfg:
--------------------------------------------------------------------------------
1 | exynos9820-d1_eur_open_18.dtbo
2 | custom0=0x00000012
3 | custom1=0x00000012
4 |
5 | exynos9820-d1_eur_open_19.dtbo
6 | custom0=0x00000013
7 | custom1=0x00000014
8 |
9 | exynos9820-d1_eur_open_21.dtbo
10 | custom0=0x00000015
11 | custom1=0x00000015
12 |
13 | exynos9820-d1_eur_open_22.dtbo
14 | custom0=0x00000016
15 | custom1=0x00000016
16 |
17 | exynos9820-d1_eur_open_23.dtbo
18 | custom0=0x00000017
19 | custom1=0x000000ff
20 |
--------------------------------------------------------------------------------
/sepolicy/vendor/vendor_init.te:
--------------------------------------------------------------------------------
1 | allow vendor_init cgroup:file getattr;
2 |
3 | get_prop(vendor_init, vendor_radio_prop);
4 | dontaudit vendor_init system_prop:file read;
5 |
6 | allow vendor_init proc_swappiness:file rw_file_perms;
7 |
8 | allow vendor_init cpdebug_efs_file:lnk_file getattr;
9 | allow vendor_init ssm_efs_file:file getattr;
10 |
11 | get_prop(vendor_init, vts_status_prop)
12 |
13 | allow vendor_init efs_file:dir rw_dir_perms;
14 | allow vendor_init spen_efs_file:dir create_dir_perms;
15 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_drm_widevine.te:
--------------------------------------------------------------------------------
1 | teegris_use(hal_drm_widevine);
2 |
3 | allow hal_drm_widevine mnt_vendor_file:dir search;
4 | r_dir_file(hal_drm_widevine, efs_file);
5 | allow hal_drm_widevine sec_efs_file:file r_file_perms;
6 |
7 | allow hal_drm_widevine mediadrm_vendor_data_file:dir create_dir_perms;
8 | allow hal_drm_widevine mediadrm_vendor_data_file:file create_file_perms;
9 |
10 | allow hal_drm_widevine secmem_device:chr_file rw_file_perms;
11 |
12 | allow hal_drm_widevine mediacodec:fd use;
13 |
--------------------------------------------------------------------------------
/sepolicy/vendor/kernel.te:
--------------------------------------------------------------------------------
1 | allow kernel self:capability { mknod sys_admin };
2 | allow kernel self:perf_event cpu;
3 | dontaudit kernel self:capability { dac_override dac_read_search };
4 |
5 | allow kernel block_device:dir search;
6 | allow kernel device:dir { add_name create write remove_name rmdir };
7 | allow kernel device:chr_file { create setattr getattr unlink };
8 | dontaudit kernel device:blk_file create;
9 |
10 | r_dir_file(kernel, efs_file);
11 | allow kernel app_efs_file:dir create_dir_perms;
12 | allow kernel app_efs_file:file create_file_perms;
13 |
14 | r_dir_file(kernel, sysfs_sec_key);
15 |
--------------------------------------------------------------------------------
/aidl/spen/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2022 The LineageOS Project
3 | //
4 | // SPDX-License-Identifier: Apache-2.0
5 | //
6 |
7 | cc_binary {
8 | name: "vendor.samsung.hardware.spen-service.davinci",
9 | relative_install_path: "hw",
10 | init_rc: ["vendor.samsung.hardware.spen-service.davinci.rc"],
11 | vintf_fragments: ["vendor.samsung.hardware.spen-service.davinci.xml"],
12 | srcs: [
13 | "SPen.cpp",
14 | "service.cpp",
15 | ],
16 | shared_libs: [
17 | "libbase",
18 | "libbinder_ndk",
19 | "vendor.samsung.hardware.spen-V2-ndk",
20 | ],
21 | vendor: true,
22 | }
23 |
--------------------------------------------------------------------------------
/configs/kernel/beyond0lte.cfg:
--------------------------------------------------------------------------------
1 | exynos9820-beyond0lte_eur_open_17.dtbo
2 | custom0=0x11000000
3 | custom1=0x11000000
4 |
5 | exynos9820-beyond0lte_eur_open_18.dtbo
6 | custom0=0x12000000
7 | custom1=0x12000000
8 |
9 | exynos9820-beyond0lte_eur_open_19.dtbo
10 | custom0=0x13000000
11 | custom1=0x13000000
12 |
13 | exynos9820-beyond0lte_eur_open_20.dtbo
14 | custom0=0x14000000
15 | custom1=0x15000000
16 |
17 | exynos9820-beyond0lte_eur_open_22.dtbo
18 | custom0=0x16000000
19 | custom1=0x17000000
20 |
21 | exynos9820-beyond0lte_eur_open_24.dtbo
22 | custom0=0x18000000
23 | custom1=0x18000000
24 |
25 | exynos9820-beyond0lte_eur_open_25.dtbo
26 | custom0=0x19000000
27 | custom1=0xff000000
28 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_samsung_spen_default.te:
--------------------------------------------------------------------------------
1 | type hal_samsung_spen_default, domain;
2 | hal_server_domain(hal_samsung_spen_default, hal_samsung_spen)
3 |
4 | type hal_samsung_spen_default_exec, exec_type, vendor_file_type, file_type;
5 | init_daemon_domain(hal_samsung_spen_default)
6 |
7 | allow hal_samsung_spen_default sysfs_spen:dir search;
8 | allow hal_samsung_spen_default sysfs_spen:file rw_file_perms;
9 | r_dir_file(hal_samsung_spen_default, efs_file);
10 |
11 | allow hal_samsung_spen_default mnt_vendor_file:dir search;
12 | allow hal_samsung_spen_default spen_efs_file:dir rw_dir_perms;
13 | allow hal_samsung_spen_default spen_efs_file:file create_file_perms;
14 |
15 | binder_call(hal_samsung_spen_default, servicemanager);
16 |
--------------------------------------------------------------------------------
/configs/keylayout/gpio_keys.kl:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2021 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | key 114 VOLUME_DOWN
18 | key 115 VOLUME_UP
19 | key 116 POWER
20 | key 703 ASSIST
21 |
--------------------------------------------------------------------------------
/shims/libdsms/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2024 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | cc_library_shared {
17 | name: "libdsms_vendor",
18 | srcs: ["dsms.c"],
19 | vendor: true,
20 | }
21 |
--------------------------------------------------------------------------------
/shims/libsfpex/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2022 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | cc_library_shared {
17 | name: "libshim_sfpex",
18 | srcs: ["sfpex.c"],
19 | compile_multilib: "64",
20 | vendor: true,
21 | }
22 |
--------------------------------------------------------------------------------
/shims/libdsms/dsms.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 |
19 | uint64_t dsms_send_message(char* param_1 __unused, char* param_2 __unused, long param_3 __unused) {
20 | return 0xfffffff2;
21 | }
22 |
--------------------------------------------------------------------------------
/shims/libutils-v32/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2023 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | cc_library_shared {
17 | name: "libutils-v32",
18 | srcs: ["Thread.cpp"],
19 | shared_libs: [
20 | "libutils",
21 | ],
22 | vendor: true,
23 | }
24 |
--------------------------------------------------------------------------------
/shims/stub/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2025 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | soong_namespace {
17 | }
18 |
19 | cc_library_shared {
20 | name: "libvkmanager_vendor",
21 | srcs: ["empty.cpp"],
22 | installable: false,
23 | vendor: true,
24 | }
25 |
--------------------------------------------------------------------------------
/SPenActions/src/org/lineageos/spenactions/SPenDirection.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021-2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.lineageos.spenactions;
17 |
18 | public enum SPenDirection {
19 | POSITIVE_Y, NEGATIVE_Y, POSITIVE_X, NEGATIVE_X;
20 | }
21 |
--------------------------------------------------------------------------------
/shims/liboemcrypto/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2023-2025 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | cc_library_shared {
17 | name: "libshim_oemcrypto",
18 | srcs: ["oemcrypto.c"],
19 | version_script: "libshim_oemcrypto.map.txt",
20 | vendor: true,
21 | }
22 |
--------------------------------------------------------------------------------
/configs/kernel/beyondx.cfg:
--------------------------------------------------------------------------------
1 | exynos9820-beyondx_eur_open_00.dtbo
2 | custom0=0x00000000
3 | custom1=0x00000000
4 |
5 | exynos9820-beyondx_eur_open_01.dtbo
6 | custom0=0x00000001
7 | custom1=0x00000001
8 |
9 | exynos9820-beyondx_eur_open_02.dtbo
10 | custom0=0x00000002
11 | custom1=0x00000002
12 |
13 | exynos9820-beyondx_eur_open_03.dtbo
14 | custom0=0x00000003
15 | custom1=0x00000003
16 |
17 | exynos9820-beyondx_eur_open_04.dtbo
18 | custom0=0x00000004
19 | custom1=0x00000004
20 |
21 | exynos9820-beyondx_eur_open_05.dtbo
22 | custom0=0x00000005
23 | custom1=0x00000005
24 |
25 | exynos9820-beyondx_eur_open_06.dtbo
26 | custom0=0x00000006
27 | custom1=0x00000006
28 |
29 | exynos9820-beyondx_eur_open_07.dtbo
30 | custom0=0x00000007
31 | custom1=0x00000007
32 |
33 | exynos9820-beyondx_eur_open_08.dtbo
34 | custom0=0x00000008
35 | custom1=0x000000ff
36 |
--------------------------------------------------------------------------------
/aidl/spen/service.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 The LineageOS Project
3 | *
4 | * SPDX-License-Identifier: Apache-2.0
5 | */
6 |
7 | #define LOG_TAG "vendor.samsung.hardware.spen-service.davinci"
8 |
9 | #include "SPen.h"
10 |
11 | #include
12 | #include
13 | #include
14 |
15 | using ::aidl::vendor::samsung::hardware::spen::SPen;
16 |
17 | int main() {
18 | ABinderProcess_setThreadPoolMaxThreadCount(0);
19 | std::shared_ptr spen = ndk::SharedRefBase::make();
20 |
21 | const std::string instance = std::string() + SPen::descriptor + "/default";
22 | binder_status_t status = AServiceManager_addService(spen->asBinder().get(), instance.c_str());
23 | CHECK(status == STATUS_OK);
24 |
25 | ABinderProcess_joinThreadPool();
26 | return EXIT_FAILURE; // should not reach
27 | }
28 |
--------------------------------------------------------------------------------
/configs/kernel/beyond1lte.cfg:
--------------------------------------------------------------------------------
1 | exynos9820-beyond1lte_eur_open_17.dtbo
2 | custom0=0x11000000
3 | custom1=0x11000000
4 |
5 | exynos9820-beyond1lte_eur_open_18.dtbo
6 | custom0=0x12000000
7 | custom1=0x12000000
8 |
9 | exynos9820-beyond1lte_eur_open_19.dtbo
10 | custom0=0x13000000
11 | custom1=0x13000000
12 |
13 | exynos9820-beyond1lte_eur_open_20.dtbo
14 | custom0=0x14000000
15 | custom1=0x14000000
16 |
17 | exynos9820-beyond1lte_eur_open_21.dtbo
18 | custom0=0x15000000
19 | custom1=0x15000000
20 |
21 | exynos9820-beyond1lte_eur_open_22.dtbo
22 | custom0=0x16000000
23 | custom1=0x16000000
24 |
25 | exynos9820-beyond1lte_eur_open_23.dtbo
26 | custom0=0x17000000
27 | custom1=0x17000000
28 |
29 | exynos9820-beyond1lte_eur_open_24.dtbo
30 | custom0=0x18000000
31 | custom1=0x19000000
32 |
33 | exynos9820-beyond1lte_eur_open_26.dtbo
34 | custom0=0x1a000000
35 | custom1=0xff000000
36 |
--------------------------------------------------------------------------------
/configs/kernel/d2s.cfg:
--------------------------------------------------------------------------------
1 | exynos9820-d2_eur_open_02.dtbo
2 | custom0=0x00000002
3 | custom1=0x0000000f
4 |
5 | exynos9820-d2_eur_open_16.dtbo
6 | custom0=0x00000010
7 | custom1=0x00000010
8 |
9 | exynos9820-d2_eur_open_17.dtbo
10 | custom0=0x00000011
11 | custom1=0x00000011
12 |
13 | exynos9820-d2_eur_open_18.dtbo
14 | custom0=0x00000012
15 | custom1=0x00000012
16 |
17 | exynos9820-d2_eur_open_19.dtbo
18 | custom0=0x00000013
19 | custom1=0x00000013
20 |
21 | exynos9820-d2_eur_open_20.dtbo
22 | custom0=0x00000014
23 | custom1=0x00000014
24 |
25 | exynos9820-d2_eur_open_21.dtbo
26 | custom0=0x00000015
27 | custom1=0x00000015
28 |
29 | exynos9820-d2_eur_open_22.dtbo
30 | custom0=0x00000016
31 | custom1=0x00000016
32 |
33 | exynos9820-d2_eur_open_23.dtbo
34 | custom0=0x00000017
35 | custom1=0x00000017
36 |
37 | exynos9820-d2_eur_open_24.dtbo
38 | custom0=0x00000018
39 | custom1=0x000000ff
40 |
--------------------------------------------------------------------------------
/SPenActions/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | dc6bb0a8-202e-487c-8f1b-53b37cc837c6
19 |
20 |
--------------------------------------------------------------------------------
/configs/kernel/d2x.cfg:
--------------------------------------------------------------------------------
1 | exynos9820-d2x_eur_open_02.dtbo
2 | custom0=0x00000002
3 | custom1=0x0000000f
4 |
5 | exynos9820-d2x_eur_open_16.dtbo
6 | custom0=0x00000010
7 | custom1=0x00000010
8 |
9 | exynos9820-d2x_eur_open_17.dtbo
10 | custom0=0x00000011
11 | custom1=0x00000011
12 |
13 | exynos9820-d2x_eur_open_18.dtbo
14 | custom0=0x00000012
15 | custom1=0x00000012
16 |
17 | exynos9820-d2x_eur_open_19.dtbo
18 | custom0=0x00000013
19 | custom1=0x00000013
20 |
21 | exynos9820-d2x_eur_open_20.dtbo
22 | custom0=0x00000014
23 | custom1=0x00000014
24 |
25 | exynos9820-d2x_eur_open_21.dtbo
26 | custom0=0x00000015
27 | custom1=0x00000015
28 |
29 | exynos9820-d2x_eur_open_22.dtbo
30 | custom0=0x00000016
31 | custom1=0x00000016
32 |
33 | exynos9820-d2x_eur_open_23.dtbo
34 | custom0=0x00000017
35 | custom1=0x00000017
36 |
37 | exynos9820-d2x_eur_open_24.dtbo
38 | custom0=0x00000018
39 | custom1=0x000000ff
40 |
--------------------------------------------------------------------------------
/overlay-exynos9820/lineage-sdk/lineage/res/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 | true
17 |
18 |
--------------------------------------------------------------------------------
/shims/libutils-v32/Thread.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 |
19 | namespace utils32 {
20 |
21 | class Thread : public android::Thread {
22 | public:
23 | android::status_t run(const char* name, int32_t priority, size_t stack);
24 | };
25 |
26 | } // namespace utils32
27 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | true
19 | 4
20 |
21 |
--------------------------------------------------------------------------------
/interfaces/spen/aidl/vendor/samsung/hardware/spen/ISPen.aidl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package vendor.samsung.hardware.spen;
18 |
19 | @VintfStability
20 | interface ISPen {
21 | boolean isCharging();
22 | boolean setCharging(boolean charge);
23 | String getMACAddress();
24 | void setMACAddress(String mac);
25 | }
26 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 | true
21 | true
22 |
23 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_camera_default.te:
--------------------------------------------------------------------------------
1 | r_dir_file(hal_camera_default, sysfs_camera);
2 | allow hal_camera_default sysfs_camera_writable:file rw_file_perms;
3 |
4 | get_prop(hal_camera_default, exported_camera_prop);
5 | set_prop(hal_camera_default, vendor_camera_prop);
6 |
7 | allow hal_camera_default hal_graphics_mapper_hwservice:hwservice_manager find;
8 |
9 | allow hal_camera_default sysfs_mem_boost_writable:file rw_file_perms;
10 |
11 | allow hal_camera_default jsqz_device:chr_file rw_file_perms;
12 |
13 | r_dir_file(hal_camera_default, sysfs_battery);
14 | r_dir_file(hal_camera_default, sysfs_sensors);
15 |
16 | binder_call(hal_camera_default, system_server);
17 | allow system_server hal_camera_default:binder call;
18 |
19 | allow hal_camera_default hal_graphics_composer_default:fd use;
20 |
21 | allow hal_camera_default gpu_device:chr_file rw_file_perms;
22 |
23 | r_dir_file(hal_camera_default, app_efs_file);
24 |
25 | dontaudit hal_camera_default default_prop:file read;
26 |
--------------------------------------------------------------------------------
/shims/libcamera/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2024-2025 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | cc_library_shared {
17 | name: "libshim_camera",
18 | srcs: [
19 | "Fence.cpp",
20 | "GraphicBufferMapper.cpp",
21 | ],
22 | shared_libs: [
23 | "libcutils",
24 | "libsync",
25 | "libui",
26 | "libutils",
27 | ],
28 | vendor: true,
29 | }
30 |
--------------------------------------------------------------------------------
/shims/libcrypto/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2023-2024 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | cc_library_shared {
17 | name: "libshim_crypto",
18 | enabled: false,
19 | target: {
20 | android_arm64: {
21 | enabled: true,
22 | },
23 | },
24 | srcs: ["crypto.c"],
25 | compile_multilib: "64",
26 | shared_libs: ["libcrypto-tm"],
27 | vendor: true,
28 | }
29 |
--------------------------------------------------------------------------------
/SPenActions/res/layout/spensettings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/configs/kernel/beyond2lte.cfg:
--------------------------------------------------------------------------------
1 | exynos9820-beyond2lte_eur_open_04.dtbo
2 | custom0=0x04000000
3 | custom1=0x0f000000
4 |
5 | exynos9820-beyond2lte_eur_open_16.dtbo
6 | custom0=0x10000000
7 | custom1=0x10000000
8 |
9 | exynos9820-beyond2lte_eur_open_17.dtbo
10 | custom0=0x11000000
11 | custom1=0x11000000
12 |
13 | exynos9820-beyond2lte_eur_open_18.dtbo
14 | custom0=0x12000000
15 | custom1=0x12000000
16 |
17 | exynos9820-beyond2lte_eur_open_19.dtbo
18 | custom0=0x13000000
19 | custom1=0x13000000
20 |
21 | exynos9820-beyond2lte_eur_open_20.dtbo
22 | custom0=0x14000000
23 | custom1=0x16000000
24 |
25 | exynos9820-beyond2lte_eur_open_23.dtbo
26 | custom0=0x17000000
27 | custom1=0x17000000
28 |
29 | exynos9820-beyond2lte_eur_open_24.dtbo
30 | custom0=0x18000000
31 | custom1=0x18000000
32 |
33 | exynos9820-beyond2lte_eur_open_25.dtbo
34 | custom0=0x19000000
35 | custom1=0x19000000
36 |
37 | exynos9820-beyond2lte_eur_open_26.dtbo
38 | custom0=0x1a000000
39 | custom1=0xff000000
40 |
--------------------------------------------------------------------------------
/overlay-exynos9820/lineage-sdk/packages/LineageSettingsProvider/res/values/defaults.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 | true
21 |
22 |
--------------------------------------------------------------------------------
/shims/libutils-v32/Thread.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2023 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 |
19 | #include "Thread.h"
20 |
21 | using android::sp;
22 |
23 | namespace utils32 {
24 |
25 | android::status_t Thread::run(const char* name, int32_t priority, size_t stack) {
26 | this->forceIncStrong(this);
27 | return android::Thread::run(name, priority, stack);
28 | }
29 |
30 | } // namespace utils32
31 |
--------------------------------------------------------------------------------
/shims/libsensorndkbridge/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2020-2023 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | cc_library_shared {
17 | name: "libshim_sensorndkbridge",
18 | srcs: ["ASensorManager.cpp"],
19 | shared_libs: [
20 | "libbase",
21 | "libsensorndkbridge",
22 | "libutils",
23 | ],
24 | include_dirs: [
25 | "frameworks/hardware/interfaces/sensorservice/libsensorndkbridge",
26 | ],
27 | vendor: true,
28 | }
29 |
--------------------------------------------------------------------------------
/sepolicy/vendor/file.te:
--------------------------------------------------------------------------------
1 | # data types
2 | type mediadrm_vendor_data_file, file_type, data_file_type;
3 | type nfc_vendor_data_file, file_type, data_file_type;
4 |
5 | # efs types
6 | type cpdebug_efs_file, file_type;
7 | type spen_efs_file, file_type;
8 | type ssm_efs_file, file_type;
9 |
10 | # proc types
11 | type proc_swappiness, fs_type, proc_type;
12 |
13 | # sysfs types
14 | type sysfs_block, sysfs_type, r_fs_type, fs_type;
15 | type sysfs_block_writable, sysfs_type, rw_fs_type, fs_type;
16 | type sysfs_camera, sysfs_type, r_fs_type, fs_type;
17 | type sysfs_camera_writable, sysfs_type, rw_fs_type, fs_type;
18 | type sysfs_chipid, sysfs_type, r_fs_type, fs_type;
19 | type sysfs_decon, sysfs_type, r_fs_type, fs_type;
20 | type sysfs_decon_writable, sysfs_type, rw_fs_type, fs_type;
21 | type sysfs_displayport_writable, sysfs_type, rw_fs_type, fs_type;
22 | type sysfs_input_writable, sysfs_type, rw_fs_type, fs_type;
23 | type sysfs_mem_boost_writable, sysfs_type, rw_fs_type, fs_type;
24 | type sysfs_spen, sysfs_type, rw_fs_type, fs_type;
25 | type sysfs_v4l, sysfs_type, r_fs_type, fs_type;
26 |
--------------------------------------------------------------------------------
/common_pie_launched.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2023-2025 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # Inherit common configuration
18 | $(call inherit-product, $(COMMON_PATH)/common.mk)
19 |
20 | # NFC
21 | PRODUCT_COPY_FILES += \
22 | $(COMMON_PATH)/configs/nfc/libnfc-sec-vendor.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-sec-vendor.conf
23 |
24 | # Overlays
25 | DEVICE_PACKAGE_OVERLAYS += $(COMMON_PATH)/overlay-exynos9820
26 |
27 | # PowerShare
28 | PRODUCT_PACKAGES += \
29 | vendor.lineage.powershare-service.samsung
30 |
--------------------------------------------------------------------------------
/recovery/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2022-2024 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | //
16 |
17 | cc_library_static {
18 | name: "librecovery_updater_exynos9820",
19 | srcs: [
20 | "recovery_updater.cpp",
21 | ],
22 | header_libs: ["libbase_headers"],
23 | include_dirs: [
24 | "bootable/deprecated-ota/edify/include",
25 | "bootable/recovery",
26 | "bootable/recovery/otautil/include",
27 | "system/libziparchive/include"
28 | ],
29 | static_libs: ["liblp"],
30 | }
31 |
--------------------------------------------------------------------------------
/aidl/spen/SPen.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022-2023 The LineageOS Project
3 | *
4 | * SPDX-License-Identifier: Apache-2.0
5 | */
6 |
7 | #pragma once
8 |
9 | #include
10 |
11 | namespace aidl {
12 | namespace vendor {
13 | namespace samsung {
14 | namespace hardware {
15 | namespace spen {
16 |
17 | #define SYSFS_CHARGING_NODE "/sys/class/sec/sec_epen/epen_ble_charging_mode"
18 | #define SPEN_STATE_CHARGE "CHARGE"
19 | #define SPEN_STATE_NG "NG"
20 | #define SPEN_ADDR_PATH_VENDOR "/mnt/vendor/efs/spen/blespen_addr"
21 | #define SPEN_ADDR_PATH "/mnt/vendor/efs/spen/blespen_addr"
22 | #define SPEN_ADDR_DEFAULT "00:00:00:00:00:00"
23 |
24 | class SPen : public BnSPen {
25 | public:
26 | SPen();
27 |
28 | ndk::ScopedAStatus setCharging(bool in_charging, bool *_aidl_return) override;
29 | ndk::ScopedAStatus isCharging(bool *_aidl_return) override;
30 | ndk::ScopedAStatus getMACAddress(std::string *_aidl_return) override;
31 | ndk::ScopedAStatus setMACAddress(const std::string& in_mac) override;
32 | };
33 |
34 | } // namespace spen
35 | } // namespace hardware
36 | } // namespace samsung
37 | } // namespace vendor
38 | } // namespace aidl
39 |
--------------------------------------------------------------------------------
/SPenActions/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | - @string/spen_mode_navigation
19 | - @string/spen_mode_camera
20 | - @string/spen_mode_media_control
21 |
22 |
23 |
24 | - 0
25 | - 1
26 | - 2
27 |
28 |
29 |
--------------------------------------------------------------------------------
/exynos9825-r.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2023-2025 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | COMMON_PATH := device/samsung/exynos9820-common
18 |
19 | # Inherit common configuration
20 | $(call inherit-product, $(COMMON_PATH)/common.mk)
21 |
22 | # Audio
23 | PRODUCT_PACKAGES += \
24 | audio.primary.universal9825_r
25 |
26 | # Display
27 | PRODUCT_PACKAGES += \
28 | gralloc.universal9825_r
29 |
30 | # init
31 | PRODUCT_PACKAGES += \
32 | fstab.exynos9825 \
33 | fstab.exynos9825.ramdisk
34 |
35 | PRODUCT_COPY_FILES += \
36 | $(COMMON_PATH)/configs/init/init.recovery.exynos9820.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.exynos9825.rc
37 |
--------------------------------------------------------------------------------
/SPenActions/privapp-permissions_org.lineageos.spenactions.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/exynos9820.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2023 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | COMMON_PATH := device/samsung/exynos9820-common
18 |
19 | # Inherit exynos9820 configuration
20 | $(call inherit-product, $(COMMON_PATH)/common_pie_launched.mk)
21 |
22 | # Audio
23 | PRODUCT_PACKAGES += \
24 | audio.primary.universal9820
25 |
26 | # Display
27 | PRODUCT_PACKAGES += \
28 | gralloc.universal9820
29 |
30 | # init
31 | PRODUCT_PACKAGES += \
32 | fstab.exynos9820 \
33 | fstab.exynos9820.ramdisk
34 |
35 | PRODUCT_COPY_FILES += \
36 | $(COMMON_PATH)/configs/init/init.recovery.exynos9820.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.exynos9820.rc
37 |
--------------------------------------------------------------------------------
/exynos9825.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2023 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | COMMON_PATH := device/samsung/exynos9820-common
18 |
19 | # Inherit exynos9820 configuration
20 | $(call inherit-product, $(COMMON_PATH)/common_pie_launched.mk)
21 |
22 | # Audio
23 | PRODUCT_PACKAGES += \
24 | audio.primary.universal9825
25 |
26 | # Display
27 | PRODUCT_PACKAGES += \
28 | gralloc.universal9825
29 |
30 | # init
31 | PRODUCT_PACKAGES += \
32 | fstab.exynos9825 \
33 | fstab.exynos9825.ramdisk
34 |
35 | PRODUCT_COPY_FILES += \
36 | $(COMMON_PATH)/configs/init/init.recovery.exynos9820.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.exynos9825.rc
37 |
--------------------------------------------------------------------------------
/interfaces/spen/aidl/Android.bp:
--------------------------------------------------------------------------------
1 | // Copyright (C) 2022 The LineageOS Project
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | aidl_interface {
16 | name: "vendor.samsung.hardware.spen",
17 | vendor_available: true,
18 | srcs: [
19 | "vendor/samsung/hardware/spen/*.aidl",
20 | ],
21 | stability: "vintf",
22 | backend: {
23 | java: {
24 | platform_apis: true,
25 | },
26 | },
27 | versions_with_info: [
28 | {
29 | version: "1",
30 | imports: [],
31 | },
32 | {
33 | version: "2",
34 | imports: [],
35 | },
36 |
37 | ],
38 | owner: "samsung",
39 | }
40 |
--------------------------------------------------------------------------------
/rro_overlays/WifiOverlay/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
21 |
22 |
27 |
28 |
--------------------------------------------------------------------------------
/overlay/hardware/samsung/AdvancedDisplay/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 |
20 |
21 |
22 | "/sys/class/mdnie/mdnie/scenario"
23 | "/sys/class/mdnie/mdnie/accessibility"
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/rro_overlays/WifiOverlayNoSAE/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
21 |
22 |
27 |
28 |
--------------------------------------------------------------------------------
/sepolicy/vendor/hal_graphics_composer_default.te:
--------------------------------------------------------------------------------
1 | vndbinder_use(hal_graphics_composer_default);
2 |
3 | allow hal_graphics_composer_default video_device:chr_file rw_file_perms;
4 |
5 | allow hal_graphics_composer_default log_vendor_data_file:dir { rw_file_perms add_name search };
6 | allow hal_graphics_composer_default log_vendor_data_file:file { rw_file_perms create };
7 |
8 | allow hal_graphics_composer_default self:netlink_kobject_uevent_socket { create bind read setopt };
9 |
10 | binder_call(hal_graphics_composer_default, vndservicemanager);
11 | hal_client_domain(hal_graphics_composer_default, hal_graphics_allocator);
12 |
13 | allow hal_graphics_composer_default sysfs_chipid:file r_file_perms;
14 |
15 | allow hal_graphics_composer_default sysfs_decon:file r_file_perms;
16 | allow hal_graphics_composer_default sysfs_decon_writable:file rw_file_perms;
17 |
18 | get_prop(hal_graphics_composer_default, boot_status_prop);
19 | get_prop(hal_graphics_composer_default, vendor_camera_prop);
20 |
21 | allow hal_graphics_composer_default vendor_surfaceflinger_vndservice:service_manager { add find };
22 |
23 | allow hal_graphics_composer_default sysfs_displayport_writable:file rw_file_perms;
24 |
25 | allow hal_graphics_composer_default sysfs_backlight_writable:file rw_file_perms;
26 |
--------------------------------------------------------------------------------
/shims/libcamera/Fence.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2025 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 | #include
19 | #include
20 |
21 | using android::base::unique_fd;
22 | using android::status_t;
23 |
24 | namespace exynos5 {
25 |
26 | class Fence
27 | : public android::LightRefBase {
28 | public:
29 | explicit Fence(int fenceFd);
30 | explicit Fence(unique_fd fenceFd);
31 |
32 | status_t wait(int timeout);
33 |
34 | private:
35 | friend class LightRefBase;
36 | virtual ~Fence() = default;
37 |
38 | android::base::unique_fd mFenceFd;
39 | };
40 |
41 | } // namespace exynos5
42 |
--------------------------------------------------------------------------------
/rro_overlays/WifiOverlayNoSAE/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
23 |
24 |
25 | false
26 |
27 |
--------------------------------------------------------------------------------
/overlay/packages/services/Telephony/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
22 |
23 |
26 | true
27 |
28 |
--------------------------------------------------------------------------------
/shims/libcamera/GraphicBufferMapper.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 | #include
19 |
20 | using android::status_t;
21 |
22 | extern "C" {
23 | status_t _ZN7android19GraphicBufferMapper6unlockEPK13native_handle(void* thisptr,
24 | buffer_handle_t handle) {
25 | android::base::unique_fd outFence;
26 | auto* gpm = static_cast(thisptr);
27 | status_t status = gpm->unlock(handle, &outFence);
28 | if (status == android::OK && outFence.get() >= 0) {
29 | sync_wait(outFence.get(), -1);
30 | outFence.reset();
31 | }
32 | return status;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/SPenActions/src/org/lineageos/spenactions/ButtonAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021-2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.lineageos.spenactions;
17 |
18 | public class ButtonAction {
19 |
20 | public enum Action {
21 | UP, DOWN;
22 | }
23 |
24 | private final Action mAction;
25 |
26 | private ButtonAction(Action action) {
27 | this.mAction = action;
28 | }
29 |
30 | public Action getAction() {
31 | return mAction;
32 | }
33 |
34 | public static ButtonAction fromType(int type) {
35 | switch (type) {
36 | case 0: return new ButtonAction(Action.UP);
37 | case 3: return new ButtonAction(Action.DOWN);
38 | default: return null;
39 | }
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/BoardConfig9820.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2023-2024 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | COMMON_PATH := device/samsung/exynos9820-common
17 |
18 | ## Inherit exynos9820 configuration
19 | include $(COMMON_PATH)/BoardConfigPieLaunched.mk
20 |
21 | ## Audio
22 | $(call soong_config_set,exynos9820AudioVars,use_spkamp_playback,true)
23 |
24 | ## Dynamic Partitions
25 | BOARD_SUPER_PARTITION_SIZE := 5976883200
26 | BOARD_SAMSUNG_DYNAMIC_PARTITIONS_SIZE := 5972688896
27 |
28 | ## Platform
29 | TARGET_BOARD_PLATFORM := universal9820
30 | TARGET_BOOTLOADER_BOARD_NAME := exynos9820
31 |
32 | ## Properties
33 | TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.exynos9820.prop
34 |
35 | ## Security
36 | ifeq ($(TARGET_DEVICE),beyondx)
37 | VENDOR_SECURITY_PATCH := 2023-04-01
38 | else
39 | VENDOR_SECURITY_PATCH := 2023-03-01
40 | endif
41 |
--------------------------------------------------------------------------------
/lineage.dependencies:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "repository": "android_device_samsung_slsi_sepolicy",
4 | "target_path": "device/samsung_slsi/sepolicy"
5 | },
6 | {
7 | "repository": "android_hardware_samsung",
8 | "target_path": "hardware/samsung"
9 | },
10 | {
11 | "repository": "android_hardware_samsung_slsi-linaro_config",
12 | "target_path": "hardware/samsung_slsi-linaro/config"
13 | },
14 | {
15 | "repository": "android_hardware_samsung_slsi-linaro_exynos",
16 | "target_path": "hardware/samsung_slsi-linaro/exynos"
17 | },
18 | {
19 | "repository": "android_hardware_samsung_slsi-linaro_exynos5",
20 | "target_path": "hardware/samsung_slsi-linaro/exynos5"
21 | },
22 | {
23 | "repository": "android_hardware_samsung_slsi-linaro_graphics",
24 | "target_path": "hardware/samsung_slsi-linaro/graphics"
25 | },
26 | {
27 | "repository": "android_hardware_samsung_slsi-linaro_interfaces",
28 | "target_path": "hardware/samsung_slsi-linaro/interfaces"
29 | },
30 | {
31 | "repository": "android_hardware_samsung_slsi-linaro_openmax",
32 | "target_path": "hardware/samsung_slsi-linaro/openmax"
33 | },
34 | {
35 | "repository": "android_kernel_samsung_exynos9820",
36 | "target_path": "kernel/samsung/exynos9820"
37 | }
38 | ]
39 |
--------------------------------------------------------------------------------
/SPenActions/src/org/lineageos/spenactions/settings/SettingsActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021-2024 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.lineageos.spenactions.settings;
17 |
18 | import android.os.Bundle;
19 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
20 |
21 | public class SettingsActivity extends CollapsingToolbarBaseActivity {
22 |
23 | private static final String TAG_SPENACTIONS = "spenactions";
24 |
25 | @Override
26 | public void onCreate(Bundle savedInstanceState) {
27 | super.onCreate(savedInstanceState);
28 |
29 | getFragmentManager().beginTransaction().replace(
30 | com.android.settingslib.collapsingtoolbar.R.id.content_frame,
31 | new SPenSettingsFragment(), TAG_SPENACTIONS).commit();
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/shims/libcrypto/crypto.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2024 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 | #include
19 |
20 | extern void *sk_new_null(void);
21 | void *OPENSSL_sk_new_null(void) {
22 | return sk_new_null();
23 | }
24 |
25 | extern size_t sk_num(void *sk);
26 | size_t OPENSSL_sk_num(void *sk) {
27 | return sk_num(sk);
28 | }
29 |
30 | extern size_t sk_push(void *sk, void *p);
31 | size_t OPENSSL_sk_push(void *sk, void *p) {
32 | return sk_push(sk, p);
33 | }
34 |
35 | extern void *sk_value(const void *sk, size_t i);
36 | void* OPENSSL_sk_value(const void *sk, size_t i) {
37 | return sk_value(sk, i);
38 | }
39 |
40 | extern void *ASN1_TIME_set(void *s, time_t time);
41 | void *ASN1_TIME_set_posix(void *s, int64_t posix_time) {
42 | return ASN1_TIME_set(s, posix_time);
43 | }
44 |
--------------------------------------------------------------------------------
/SPenActions/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 | S Pen Actions
18 |
19 |
20 | S Pen Bluetooth Settings
21 |
22 | S Pen Bluetooth Connection
23 | Connect your S Pen via Bluetooth to be able to use Air Gestures
24 |
25 | S Pen Mode
26 | Gesture Navigation
27 | Camera Control
28 | Media Control
29 |
30 | Reset S Pen
31 |
32 |
--------------------------------------------------------------------------------
/SPenActions/src/org/lineageos/spenactions/BootReceiver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021-2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.lineageos.spenactions;
17 |
18 | import android.content.BroadcastReceiver;
19 | import android.content.Context;
20 | import android.content.Intent;
21 | import android.os.UserHandle;
22 | import android.util.Log;
23 |
24 | public class BootReceiver extends BroadcastReceiver {
25 |
26 | private static final String LOG_TAG = "SPenActions/BootReceiver";
27 |
28 | @Override
29 | public void onReceive(Context context, Intent intent) {
30 | if (Intent.ACTION_LOCKED_BOOT_COMPLETED.equalsIgnoreCase(intent.getAction())) {
31 | Log.i(LOG_TAG, "Starting service");
32 |
33 | context.startServiceAsUser(new Intent(context, SPenActionsService.class),
34 | UserHandle.CURRENT);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/SPenActions/Android.bp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021-2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | android_app {
18 | name: "SPenActions",
19 | defaults: ["SettingsLibDefaults"],
20 |
21 | srcs: ["src/**/*.java"],
22 | resource_dirs: ["res"],
23 |
24 | certificate: "platform",
25 | platform_apis: true,
26 | system_ext_specific: true,
27 | privileged: true,
28 |
29 | static_libs: [
30 | "vendor.samsung.hardware.spen-V2-java",
31 | ],
32 |
33 | required: [
34 | "privapp-permissions_org.lineageos.spenactions"
35 | ],
36 | optimize: {
37 | enabled: false,
38 | },
39 | }
40 |
41 | prebuilt_etc {
42 | name: "privapp-permissions_org.lineageos.spenactions",
43 | system_ext_specific: true,
44 | sub_dir: "permissions",
45 | src: "privapp-permissions_org.lineageos.spenactions.xml",
46 | filename_from_src: true,
47 | }
48 |
--------------------------------------------------------------------------------
/overlay/lineage-sdk/lineage/res/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 | 0
17 |
18 |
19 |
20 | - restart
21 | - restart_recovery
22 | - restart_fastboot
23 | - restart_download
24 |
25 |
26 |
27 | true
28 |
29 |
30 | 0
31 |
32 |
--------------------------------------------------------------------------------
/BoardConfig9825.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2023-2024 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | COMMON_PATH := device/samsung/exynos9820-common
17 |
18 | ## Inherit exynos9820 configuration
19 | include $(COMMON_PATH)/BoardConfigPieLaunched.mk
20 |
21 | ## Audio
22 | $(call soong_config_set,exynos9820AudioVars,use_quad_mic_apcall,true)
23 | $(call soong_config_set,exynos9820AudioVars,use_quad_mic_camcorder,true)
24 |
25 | ## Dynamic Partitions
26 | ifneq ($(filter d1x d2x, $(TARGET_DEVICE)),)
27 | BOARD_SUPER_PARTITION_SIZE := 6480199680
28 | BOARD_SAMSUNG_DYNAMIC_PARTITIONS_SIZE := 6476005376
29 | else
30 | BOARD_SUPER_PARTITION_SIZE := 6502219776
31 | BOARD_SAMSUNG_DYNAMIC_PARTITIONS_SIZE := 6498025472
32 | endif
33 |
34 | ## Platform
35 | DEVICE_MANIFEST_FILE += $(COMMON_PATH)/exynos9825_manifest.xml
36 | TARGET_BOARD_PLATFORM := universal9825
37 | TARGET_BOOTLOADER_BOARD_NAME := exynos9825
38 |
39 | ## Properties
40 | TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.exynos9825.prop
41 |
42 | ## Security
43 | VENDOR_SECURITY_PATCH := 2023-08-01
44 |
--------------------------------------------------------------------------------
/AndroidBoard.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2021-2025 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | MKDTBOIMG := $(HOST_OUT_EXECUTABLES)/mkdtboimg$(HOST_EXECUTABLE_SUFFIX)
18 | KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
19 | DTB_DIR := $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/dts/exynos
20 | DTB_CFG := $(COMMON_PATH)/configs/kernel/$(TARGET_SOC).cfg
21 |
22 | INSTALLED_DTBIMAGE_TARGET := $(PRODUCT_OUT)/dtb.img
23 |
24 | $(INSTALLED_DTBIMAGE_TARGET): $(PRODUCT_OUT)/kernel $(MKDTBOIMG) $(AVBTOOL)
25 | $(hide) echo "Building dtb.img"
26 | $(hide) $(MKDTBOIMG) cfg_create $@ $(DTB_CFG) -d $(DTB_DIR)
27 | $(hide) $(call assert-max-image-size,$@,$(BOARD_DTBIMG_PARTITION_SIZE),raw)
28 | $(hide) $(AVBTOOL) add_hash_footer \
29 | --image $@ \
30 | --partition_size $(BOARD_DTBIMG_PARTITION_SIZE) \
31 | --partition_name dtb \
32 | --algorithm $(BOARD_AVB_ALGORITHM) \
33 | --key $(BOARD_AVB_KEY_PATH)
34 |
35 | .PHONY: dtbimage
36 | dtbimage: $(INSTALLED_DTBIMAGE_TARGET)
37 |
38 | INSTALLED_RADIOIMAGE_TARGET += $(INSTALLED_DTBIMAGE_TARGET)
39 |
--------------------------------------------------------------------------------
/SPenActions/res/xml/spen_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
23 |
24 |
32 |
33 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/shims/libsfpex/sfpex.c:
--------------------------------------------------------------------------------
1 | #define FP_EX_INVALID 0x01
2 | #define FP_EX_DIVZERO 0x02
3 | #define FP_EX_OVERFLOW 0x04
4 | #define FP_EX_UNDERFLOW 0x08
5 | #define FP_EX_INEXACT 0x10
6 |
7 | void
8 | __sfp_handle_exceptions (int _fex)
9 | {
10 | const float fp_max = __FLT_MAX__;
11 | const float fp_min = __FLT_MIN__;
12 | const float fp_1e32 = 1.0e32f;
13 | const float fp_zero = 0.0;
14 | const float fp_one = 1.0;
15 | unsigned long fpsr;
16 |
17 | if (_fex & FP_EX_INVALID)
18 | {
19 | __asm__ __volatile__ ("fdiv\ts0, %s0, %s0"
20 | :
21 | : "w" (fp_zero)
22 | : "s0");
23 | __asm__ __volatile__ ("mrs\t%0, fpsr" : "=r" (fpsr));
24 | }
25 | if (_fex & FP_EX_DIVZERO)
26 | {
27 | __asm__ __volatile__ ("fdiv\ts0, %s0, %s1"
28 | :
29 | : "w" (fp_one), "w" (fp_zero)
30 | : "s0");
31 | __asm__ __volatile__ ("mrs\t%0, fpsr" : "=r" (fpsr));
32 | }
33 | if (_fex & FP_EX_OVERFLOW)
34 | {
35 | __asm__ __volatile__ ("fadd\ts0, %s0, %s1"
36 | :
37 | : "w" (fp_max), "w" (fp_1e32)
38 | : "s0");
39 | __asm__ __volatile__ ("mrs\t%0, fpsr" : "=r" (fpsr));
40 | }
41 | if (_fex & FP_EX_UNDERFLOW)
42 | {
43 | __asm__ __volatile__ ("fmul\ts0, %s0, %s0"
44 | :
45 | : "w" (fp_min)
46 | : "s0");
47 | __asm__ __volatile__ ("mrs\t%0, fpsr" : "=r" (fpsr));
48 | }
49 | if (_fex & FP_EX_INEXACT)
50 | {
51 | __asm__ __volatile__ ("fsub\ts0, %s0, %s1"
52 | :
53 | : "w" (fp_max), "w" (fp_one)
54 | : "s0");
55 | __asm__ __volatile__ ("mrs\t%0, fpsr" : "=r" (fpsr));
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/BoardConfigPieLaunched.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2023-2024 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | COMMON_PATH := device/samsung/exynos9820-common
17 |
18 | ## Inherit common configuration
19 | include $(COMMON_PATH)/BoardConfigCommon.mk
20 |
21 | ## Audio
22 | $(call soong_config_set,exynos9820AudioVars,use_dual_speaker,true)
23 | $(call soong_config_set,exynos9820AudioVars,use_quad_mic,true)
24 |
25 | ## Boot Image
26 | BOARD_BOOTIMG_HEADER_VERSION := 1
27 |
28 | BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOTIMG_HEADER_VERSION)
29 |
30 | ## Dynamic Partitions
31 | BOARD_SUPER_PARTITION_METADATA_DEVICE := system
32 |
33 | ## DTB
34 | BOARD_PACK_RADIOIMAGES += dtb.img
35 |
36 | ## Partitions
37 | BOARD_BOOTIMAGE_PARTITION_SIZE := 57671680
38 | BOARD_DTBIMG_PARTITION_SIZE := 8388608
39 | BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67633152
40 |
41 | ## Recovery
42 | TARGET_RECOVERY_FSTAB_GENRULE := gen_fstab.exynos9820
43 |
44 | ## Verified Boot
45 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --include_descriptors_from_image $(PRODUCT_OUT)/dtb.img
46 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
47 |
--------------------------------------------------------------------------------
/SPenActions/src/org/lineageos/spenactions/settings/SettingsUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021-2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.lineageos.spenactions.settings;
17 |
18 | import android.content.Context;
19 | import android.content.SharedPreferences.Editor;
20 | import android.provider.Settings;
21 |
22 | import androidx.preference.PreferenceManager;
23 |
24 | public class SettingsUtils {
25 |
26 | public static final String SPEN_BLUETOOTH_ENABLE = "spen_bluetooth_enable";
27 | public static final String SPEN_MODE = "spen_mode";
28 | public static final String ACTION_BUTTONS = "action_buttons";
29 |
30 | public static boolean isEnabled(Context context, String pref, boolean defValue) {
31 | return PreferenceManager.getDefaultSharedPreferences(context)
32 | .getBoolean(pref, defValue);
33 | }
34 |
35 | public static String getSwitchPreference(Context context, String pref, String defValue) {
36 | return PreferenceManager.getDefaultSharedPreferences(context)
37 | .getString(pref, defValue);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/shims/libcamera/Fence.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2025 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include "Fence.h"
18 |
19 | #define ATRACE_TAG ATRACE_TAG_GRAPHICS
20 |
21 | // We would eliminate the non-conforming zero-length array, but we can't since
22 | // this is effectively included from the Linux kernel
23 | #pragma clang diagnostic push
24 | #pragma clang diagnostic ignored "-Wzero-length-array"
25 | #include
26 | #pragma clang diagnostic pop
27 |
28 | #include
29 | #include
30 | #include
31 |
32 | using android::NO_ERROR;
33 |
34 | namespace exynos5 {
35 |
36 | Fence::Fence(int fenceFd) :
37 | mFenceFd(fenceFd) {
38 | }
39 |
40 | Fence::Fence(unique_fd fenceFd) :
41 | mFenceFd(std::move(fenceFd)) {
42 | }
43 |
44 | status_t Fence::wait(int timeout) {
45 | ATRACE_CALL();
46 | if (mFenceFd == -1) {
47 | return NO_ERROR;
48 | }
49 | int err = sync_wait(mFenceFd, timeout);
50 |
51 | close(mFenceFd.release());
52 |
53 | return err < 0 ? -errno : status_t(NO_ERROR);
54 | }
55 |
56 | } // namespace exynos5
57 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
22 |
23 |
27 | true
28 |
29 |
30 | 10800000
31 |
32 |
33 | #00ffffff
34 |
35 |
37 | true
38 |
39 |
--------------------------------------------------------------------------------
/shims/libsensorndkbridge/ASensorManager.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020 LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 |
19 | #define LOG_TAG "libshim_sensorndkbridge"
20 | #include
21 |
22 | using android::Mutex;
23 |
24 | static Mutex gLock;
25 |
26 | extern "C" ALooper *ALooper_forCamera() {
27 | LOG(VERBOSE) << "ALooper_forCamera";
28 | ALooper *sLooper = NULL;
29 |
30 | Mutex::Autolock autoLock(gLock);
31 | sLooper = new ALooper;
32 |
33 | return sLooper;
34 | }
35 |
36 | extern "C" int ALooper_release_forCamera(ALooper *sLooper) {
37 | if (sLooper != nullptr) {
38 | Mutex::Autolock autoLock(gLock);
39 | delete sLooper;
40 | }
41 |
42 | return 0;
43 | }
44 |
45 | extern "C" int ALooper_pollOnce_camera(ALooper *sLooper,
46 | int timeoutMillis,
47 | int* outFd,
48 | int* outEvents,
49 | void** outData) {
50 | int res = sLooper->pollOnce(timeoutMillis, outFd, outEvents, outData);
51 | LOG(VERBOSE) << "ALooper_pollOnce_camera => " << res;
52 | return res;
53 | }
54 |
--------------------------------------------------------------------------------
/configs/init/Android.bp:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (C) 2023 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | soong_config_module_type {
17 | name: "metadata_partition",
18 | module_type: "genrule_defaults",
19 | config_namespace: "fstab_exynos9820",
20 | bool_variables: ["has_metadata_partition"],
21 | properties: ["cmd"],
22 | }
23 |
24 | metadata_partition {
25 | name: "metadata_partition_defaults",
26 | soong_config_variables: {
27 | has_metadata_partition: {
28 | cmd: "sed -e 's/@metadata@/metadata /' $(in) > $(out)",
29 | conditions_default: {
30 | cmd: "sed -e 's/@metadata@/omr /' $(in) > $(out)",
31 | },
32 | },
33 | },
34 | }
35 |
36 | genrule {
37 | name: "gen_fstab.exynos9820",
38 | defaults: ["metadata_partition_defaults"],
39 | srcs: ["fstab.exynos9820.in"],
40 | out: ["fstab.exynos9820"],
41 | }
42 |
43 | prebuilt_etc {
44 | name: "fstab.exynos9820",
45 | src: ":gen_fstab.exynos9820",
46 | vendor: true,
47 | ramdisk_available: true,
48 | }
49 |
50 | prebuilt_etc {
51 | name: "fstab.exynos9825",
52 | src: ":gen_fstab.exynos9820",
53 | vendor: true,
54 | ramdisk_available: true,
55 | }
56 |
--------------------------------------------------------------------------------
/SPenActions/src/org/lineageos/spenactions/MotionEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021-2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.lineageos.spenactions;
17 |
18 | public class MotionEvent {
19 |
20 | public enum Action {
21 | MOVE;
22 | }
23 |
24 | private final Action mAction;
25 | private final short mDx;
26 | private final short mDy;
27 |
28 | private MotionEvent(Action action, short dx, short dy) {
29 | this.mAction = action;
30 | this.mDx = dx;
31 | this.mDy = dy;
32 | }
33 |
34 | public Action getAction() {
35 | return mAction;
36 | }
37 |
38 | public short getDX() {
39 | return mDx;
40 | }
41 |
42 | public short getDY() {
43 | return mDy;
44 | }
45 |
46 | private static short extractShortValue(byte[] bArr, int i) {
47 | return (short) ((bArr[i] & 255) | ((bArr[i + 1] & 255) << 8));
48 | }
49 |
50 | public static MotionEvent fromTypeData(int type, byte[] value) {
51 | switch (type) {
52 | case 15:
53 | return new MotionEvent(Action.MOVE, extractShortValue(value, 1), extractShortValue(value, 3));
54 | default:
55 | return null;
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/SPenActions/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
18 |
22 |
23 |
24 |
25 |
27 |
28 |
32 |
33 |
34 |
35 |
36 |
37 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/BoardConfig9825-r.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2023 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | COMMON_PATH := device/samsung/exynos9820-common
17 |
18 | ## Inherit common configuration
19 | include $(COMMON_PATH)/BoardConfigCommon.mk
20 |
21 | ## Boot Image
22 | BOARD_BOOTIMG_HEADER_VERSION := 2
23 | BOARD_INCLUDE_DTB_IN_BOOTIMG := true
24 |
25 | BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOTIMG_HEADER_VERSION)
26 |
27 | ## Dynamic Partitions
28 | BOARD_SUPER_PARTITION_SIZE := 9856614400
29 | BOARD_SAMSUNG_DYNAMIC_PARTITIONS_SIZE := 9852420096
30 |
31 | ## DTB
32 | BOARD_DTB_CFG := $(COMMON_PATH)/configs/kernel/exynos9825-r.cfg
33 |
34 | ## Partitions
35 | BOARD_BOOTIMAGE_PARTITION_SIZE := 61865984
36 | BOARD_RECOVERYIMAGE_PARTITION_SIZE := 71102464
37 |
38 | $(call soong_config_set,fstab_exynos9820,has_metadata_partition,true)
39 |
40 | ## Platform
41 | DEVICE_MANIFEST_FILE += $(COMMON_PATH)/exynos9825_manifest.xml
42 | TARGET_BOARD_PLATFORM := universal9825_r
43 | TARGET_BOOTLOADER_BOARD_NAME := exynos9825
44 |
45 | ## Properties
46 | TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.exynos9825.prop
47 |
48 | ## Recovery
49 | TARGET_RECOVERY_FSTAB_GENRULE := gen_fstab.exynos9820
50 |
51 | ## Security
52 | VENDOR_SECURITY_PATCH := 2024-11-01
53 |
54 | ## Verified Boot
55 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 0
56 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --algorithm NONE
57 |
--------------------------------------------------------------------------------
/interfaces/spen/aidl/aidl_api/vendor.samsung.hardware.spen/1/vendor/samsung/hardware/spen/ISPen.aidl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | ///////////////////////////////////////////////////////////////////////////////
17 | // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
18 | ///////////////////////////////////////////////////////////////////////////////
19 |
20 | // This file is a snapshot of an AIDL file. Do not edit it manually. There are
21 | // two cases:
22 | // 1). this is a frozen version file - do not edit this in any case.
23 | // 2). this is a 'current' file. If you make a backwards compatible change to
24 | // the interface (from the latest frozen version), the build system will
25 | // prompt you to update this file with `m -update-api`.
26 | //
27 | // You must not make a backward incompatible change to any AIDL file built
28 | // with the aidl_interface module type with versions property set. The module
29 | // type is used to build AIDL files in a way that they can be used across
30 | // independently updatable components of the system. If a device is shipped
31 | // with such a backward incompatible change, it has a high risk of breaking
32 | // later when a module using the interface is updated, e.g., Mainline modules.
33 |
34 | package vendor.samsung.hardware.spen;
35 | @VintfStability
36 | interface ISPen {
37 | boolean isCharging();
38 | boolean setCharging(boolean charge);
39 | String getMACAddress();
40 | }
41 |
--------------------------------------------------------------------------------
/aidl/spen/SPen.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022-2023 The LineageOS Project
3 | *
4 | * SPDX-License-Identifier: Apache-2.0
5 | */
6 |
7 | #define LOG_TAG "vendor.samsung.hardware.spen-service.davinci"
8 |
9 | #include
10 |
11 | #include "SPen.h"
12 |
13 | namespace aidl {
14 | namespace vendor {
15 | namespace samsung {
16 | namespace hardware {
17 | namespace spen {
18 |
19 | /*
20 | * Write value to path and close file.
21 | */
22 | template
23 | static void set(const std::string& path, const T& value) {
24 | std::ofstream file(path);
25 | file << value << std::endl;
26 | }
27 |
28 | template
29 | static T get(const std::string& path, const T& def) {
30 | std::ifstream file(path);
31 | T result;
32 |
33 | file >> result;
34 | return file.fail() ? def : result;
35 | }
36 |
37 | SPen::SPen() {}
38 |
39 | ndk::ScopedAStatus SPen::setCharging(bool in_charging, bool *_aidl_return) {
40 | set(SYSFS_CHARGING_NODE, in_charging ? 1 : 0);
41 |
42 | return isCharging(_aidl_return);
43 | }
44 |
45 | ndk::ScopedAStatus SPen::isCharging(bool *_aidl_return) {
46 | *_aidl_return = get(SYSFS_CHARGING_NODE, std::string(SPEN_STATE_NG))
47 | == SPEN_STATE_CHARGE;
48 |
49 | return ndk::ScopedAStatus::ok();
50 | }
51 |
52 | ndk::ScopedAStatus SPen::getMACAddress(std::string *_aidl_return) {
53 | std::ifstream file(SPEN_ADDR_PATH_VENDOR);
54 | if (file.good()) {
55 | *_aidl_return = get(SPEN_ADDR_PATH_VENDOR, std::string(SPEN_ADDR_DEFAULT));
56 | } else {
57 | *_aidl_return = get(SPEN_ADDR_PATH, std::string(SPEN_ADDR_DEFAULT));
58 | }
59 |
60 | return ndk::ScopedAStatus::ok();
61 | }
62 |
63 | ndk::ScopedAStatus SPen::setMACAddress(const std::string& in_mac) {
64 | if (get(SPEN_ADDR_PATH_VENDOR, std::string(SPEN_ADDR_DEFAULT)) != in_mac) {
65 | set(SPEN_ADDR_PATH_VENDOR, in_mac);
66 | }
67 |
68 | return ndk::ScopedAStatus::ok();
69 | }
70 |
71 | } // namespace spen
72 | } // namespace hardware
73 | } // namespace samsung
74 | } // namespace vendor
75 | } // namespace aidl
76 |
--------------------------------------------------------------------------------
/interfaces/spen/aidl/aidl_api/vendor.samsung.hardware.spen/2/vendor/samsung/hardware/spen/ISPen.aidl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | ///////////////////////////////////////////////////////////////////////////////
17 | // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
18 | ///////////////////////////////////////////////////////////////////////////////
19 |
20 | // This file is a snapshot of an AIDL file. Do not edit it manually. There are
21 | // two cases:
22 | // 1). this is a frozen version file - do not edit this in any case.
23 | // 2). this is a 'current' file. If you make a backwards compatible change to
24 | // the interface (from the latest frozen version), the build system will
25 | // prompt you to update this file with `m -update-api`.
26 | //
27 | // You must not make a backward incompatible change to any AIDL file built
28 | // with the aidl_interface module type with versions property set. The module
29 | // type is used to build AIDL files in a way that they can be used across
30 | // independently updatable components of the system. If a device is shipped
31 | // with such a backward incompatible change, it has a high risk of breaking
32 | // later when a module using the interface is updated, e.g., Mainline modules.
33 |
34 | package vendor.samsung.hardware.spen;
35 | @VintfStability
36 | interface ISPen {
37 | boolean isCharging();
38 | boolean setCharging(boolean charge);
39 | String getMACAddress();
40 | void setMACAddress(String mac);
41 | }
42 |
--------------------------------------------------------------------------------
/interfaces/spen/aidl/aidl_api/vendor.samsung.hardware.spen/current/vendor/samsung/hardware/spen/ISPen.aidl:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | ///////////////////////////////////////////////////////////////////////////////
17 | // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
18 | ///////////////////////////////////////////////////////////////////////////////
19 |
20 | // This file is a snapshot of an AIDL file. Do not edit it manually. There are
21 | // two cases:
22 | // 1). this is a frozen version file - do not edit this in any case.
23 | // 2). this is a 'current' file. If you make a backwards compatible change to
24 | // the interface (from the latest frozen version), the build system will
25 | // prompt you to update this file with `m -update-api`.
26 | //
27 | // You must not make a backward incompatible change to any AIDL file built
28 | // with the aidl_interface module type with versions property set. The module
29 | // type is used to build AIDL files in a way that they can be used across
30 | // independently updatable components of the system. If a device is shipped
31 | // with such a backward incompatible change, it has a high risk of breaking
32 | // later when a module using the interface is updated, e.g., Mainline modules.
33 |
34 | package vendor.samsung.hardware.spen;
35 | @VintfStability
36 | interface ISPen {
37 | boolean isCharging();
38 | boolean setCharging(boolean charge);
39 | String getMACAddress();
40 | void setMACAddress(String mac);
41 | }
42 |
--------------------------------------------------------------------------------
/SPenActions/src/org/lineageos/spenactions/BluetoothReceiver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021-2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.lineageos.spenactions;
17 |
18 | import android.bluetooth.BluetoothAdapter;
19 | import android.content.BroadcastReceiver;
20 | import android.content.Context;
21 | import android.content.Intent;
22 | import android.os.RemoteException;
23 | import android.util.Log;
24 |
25 | import org.lineageos.spenactions.settings.SettingsUtils;
26 |
27 | public class BluetoothReceiver extends BroadcastReceiver {
28 |
29 | private final Context mContext;
30 | private final SPenConnectionManager mConnectionManager;
31 |
32 | public BluetoothReceiver(Context context) {
33 | this.mContext = context;
34 | this.mConnectionManager = new SPenConnectionManager(context);
35 | }
36 |
37 | @Override
38 | public void onReceive(Context context, Intent intent) {
39 | try {
40 | int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1);
41 |
42 | if (state == BluetoothAdapter.STATE_ON) {
43 | if (SettingsUtils.isEnabled(mContext, SettingsUtils.SPEN_BLUETOOTH_ENABLE, false)) {
44 | mConnectionManager.disconnect();
45 | mConnectionManager.connect();
46 | }
47 | } else if (state == BluetoothAdapter.STATE_OFF) {
48 | mConnectionManager.disconnect();
49 | }
50 | } catch (RemoteException ex) {
51 | ex.printStackTrace();
52 | }
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Settings/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
35 | 3
36 |
37 |
38 | 10800000
39 |
40 |
--------------------------------------------------------------------------------
/configs/power/README.md:
--------------------------------------------------------------------------------
1 | # Scaling Available Frequencies (Exynos9820)
2 |
3 | See https://www.kernel.org/doc/Documentation/power/pm_qos_interface.txt
4 |
5 | > Alternatively the user mode program could write a hex
6 | > string for the value using 10 char long format e.g. "0x12345678".
7 |
8 | ## CPU Little Cluster (CPU0)
9 |
10 | 0x12345678
11 |
12 | 1950000 -> 0x001dc130
13 | 1846000 -> 0x001c2af0
14 | 1742000 -> 0x001a94b0
15 | 1586000 -> 0x00183350
16 | 1456000 -> 0x00163780
17 | 1300000 -> 0x0013d620
18 | 1157000 -> 0x0011a788
19 | 1053000 -> 0x00101148
20 | 949000 -> 0x000e7b08
21 | 806000 -> 0x000c4c70
22 | 650000 -> 0x0009eb10
23 | 546000 -> 0x000854d0
24 | 442000 -> 0x0006be90
25 |
26 | ## CPU Big Cluster (CPU4)
27 |
28 | 2314000 -> 0x00234f10
29 | 2210000 -> 0x0021b8d0
30 | 2106000 -> 0x00202290
31 | 2002000 -> 0x001e8c50
32 | 1898000 -> 0x001cf610
33 | 1794000 -> 0x001b5fd0
34 | 1690000 -> 0x0019c990
35 | 1586000 -> 0x00183350
36 | 1508000 -> 0x001702a0
37 | 1404000 -> 0x00156c60
38 | 1222000 -> 0x0012a570
39 | 1066000 -> 0x00104410
40 | 962000 -> 0x000eadd0
41 | 845000 -> 0x000ce4c8
42 | 754000 -> 0x000b8150
43 | 650000 -> 0x0009eb10
44 | 507000 -> 0x0007bc78
45 |
46 | ## CPU Big Plus Cluster (CPU6)
47 |
48 | 2730000 -> 0x0029a810
49 | 2600000 -> 0x0027ac40
50 | 2530000 -> 0x00269ad0
51 | 2470000 -> 0x0025b070
52 | 2340000 -> 0x0023b4a0
53 | 2236000 -> 0x00221e60
54 | 2080000 -> 0x001fbd00
55 | 1976000 -> 0x001e26c0
56 | 1820000 -> 0x001bc560
57 | 1664000 -> 0x00196400
58 | 1560000 -> 0x0017cdc0
59 | 1456000 -> 0x00163780
60 | 1378000 -> 0x001506d0
61 | 1248000 -> 0x00130b00
62 | 1144000 -> 0x001174c0
63 | 1040000 -> 0x000fde80
64 | 936000 -> 0x000e4840
65 | 819000 -> 0x000c7f38
66 | 728000 -> 0x000b1bc0
67 | 624000 -> 0x00098580
68 | 520000 -> 0x0007ef40
69 |
70 | ## GPU Scaling
71 |
72 | 702000 -> 0x0000ab630
73 | 650000 -> 0x00009eb10
74 | 572000 -> 0x00008ba60
75 | 433000 -> 0x000069b68
76 | 377000 -> 0x00005c0a8
77 | 325000 -> 0x00004f588
78 | 260000 -> 0x00003f7a0
79 | 200000 -> 0x000030d40
80 | 156000 -> 0x000026160
81 |
--------------------------------------------------------------------------------
/configs/init/init.stune.rc:
--------------------------------------------------------------------------------
1 | on init
2 | # Create energy-aware scheduler tuning nodes
3 | mkdir /dev/stune/foreground
4 | mkdir /dev/stune/background
5 | mkdir /dev/stune/top-app
6 | mkdir /dev/stune/rt
7 | chown system system /dev/stune
8 | chown system system /dev/stune/foreground
9 | chown system system /dev/stune/background
10 | chown system system /dev/stune/top-app
11 | chown system system /dev/stune/rt
12 | chown system system /dev/stune/tasks
13 | chown system system /dev/stune/foreground/tasks
14 | chown system system /dev/stune/background/tasks
15 | chown system system /dev/stune/top-app/tasks
16 | chown system system /dev/stune/rt/tasks
17 | chown system system /dev/stune/cgroup.procs
18 | chown system system /dev/stune/foreground/cgroup.procs
19 | chown system system /dev/stune/background/cgroup.procs
20 | chown system system /dev/stune/top-app/cgroup.procs
21 | chown system system /dev/stune/rt/cgroup.procs
22 | chmod 0664 /dev/stune/tasks
23 | chmod 0664 /dev/stune/foreground/tasks
24 | chmod 0664 /dev/stune/background/tasks
25 | chmod 0664 /dev/stune/top-app/tasks
26 | chmod 0664 /dev/stune/rt/tasks
27 | chmod 0664 /dev/stune/cgroup.procs
28 | chmod 0664 /dev/stune/foreground/cgroup.procs
29 | chmod 0664 /dev/stune/background/cgroup.procs
30 | chmod 0664 /dev/stune/top-app/cgroup.procs
31 | chmod 0664 /dev/stune/rt/cgroup.procs
32 |
33 | # Create an stune group for camera-specific processes
34 | mkdir /dev/stune/camera-daemon
35 | chown system system /dev/stune/camera-daemon
36 | chown system system /dev/stune/camera-daemon/tasks
37 | chown system system /dev/stune/camera-daemon/cgroup.procs
38 | chmod 0664 /dev/stune/camera-daemon/tasks
39 | chmod 0664 /dev/stune/camera-daemon/cgroup.procs
40 |
41 | # Create an stune group for NNAPI HAL processes
42 | mkdir /dev/stune/nnapi-hal
43 | chown system system /dev/stune/nnapi-hal
44 | chown system system /dev/stune/nnapi-hal/tasks
45 | chown system system /dev/stune/nnapi-hal/cgroup.procs
46 | chmod 0664 /dev/stune/nnapi-hal/tasks
47 | chmod 0664 /dev/stune/nnapi-hal/cgroup.procs
48 | write /dev/stune/nnapi-hal/schedtune.boost 1
49 | write /dev/stune/nnapi-hal/schedtune.prefer_idle 1
50 |
--------------------------------------------------------------------------------
/audio/proxy/audio_board_info.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef _AUDIO_BOARD_INFO_H_
18 | #define _AUDIO_BOARD_INFO_H_
19 |
20 | /* Audio Board Device's Information */
21 |
22 | #define BOARD_INFO_XML_PATH "vendor/etc/audio_board_info.xml"
23 |
24 | #define AUDIO_STRING_TO_ENUM(X) {#X, X}
25 | #define ARRAY_SIZE(x) (sizeof((x))/sizeof((x)[0]) )
26 |
27 | typedef enum {
28 | INFO_NONE,
29 | MICROPHONE_CHARACTERISTIC,
30 | } set_information;
31 |
32 | static set_information set_info;
33 |
34 | struct audio_string_to_enum {
35 | char *name;
36 | int value;
37 | };
38 |
39 | struct audio_string_to_enum device_in_type[] = {
40 | AUDIO_STRING_TO_ENUM(AUDIO_DEVICE_IN_BUILTIN_MIC),
41 | AUDIO_STRING_TO_ENUM(AUDIO_DEVICE_IN_BACK_MIC),
42 | };
43 |
44 | struct audio_string_to_enum microphone_location[AUDIO_MICROPHONE_LOCATION_CNT] = {
45 | AUDIO_STRING_TO_ENUM(AUDIO_MICROPHONE_LOCATION_UNKNOWN),
46 | AUDIO_STRING_TO_ENUM(AUDIO_MICROPHONE_LOCATION_MAINBODY),
47 | AUDIO_STRING_TO_ENUM(AUDIO_MICROPHONE_LOCATION_MAINBODY_MOVABLE),
48 | AUDIO_STRING_TO_ENUM(AUDIO_MICROPHONE_LOCATION_PERIPHERAL),
49 | };
50 |
51 | struct audio_string_to_enum microphone_directionality[AUDIO_MICROPHONE_DIRECTIONALITY_CNT] = {
52 | AUDIO_STRING_TO_ENUM(AUDIO_MICROPHONE_DIRECTIONALITY_UNKNOWN),
53 | AUDIO_STRING_TO_ENUM(AUDIO_MICROPHONE_DIRECTIONALITY_OMNI),
54 | AUDIO_STRING_TO_ENUM(AUDIO_MICROPHONE_DIRECTIONALITY_BI_DIRECTIONAL),
55 | AUDIO_STRING_TO_ENUM(AUDIO_MICROPHONE_DIRECTIONALITY_CARDIOID),
56 | AUDIO_STRING_TO_ENUM(AUDIO_MICROPHONE_DIRECTIONALITY_HYPER_CARDIOID),
57 | AUDIO_STRING_TO_ENUM(AUDIO_MICROPHONE_DIRECTIONALITY_SUPER_CARDIOID),
58 | };
59 |
60 | #endif // _AUDIO_BOARD_INFO_H_
61 |
--------------------------------------------------------------------------------
/compatibility_matrix.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | android.frameworks.displayservice
4 | 1.0
5 |
6 | IDisplayService
7 | default
8 |
9 |
10 |
11 | android.frameworks.schedulerservice
12 | 1.0
13 |
14 | ISchedulingPolicyService
15 | default
16 |
17 |
18 |
19 | android.frameworks.sensorservice
20 | 1.0
21 |
22 | ISensorManager
23 | default
24 |
25 |
26 |
27 | android.hardware.graphics.composer
28 | 2.1
29 |
30 | IComposer
31 | vr
32 |
33 |
34 |
35 | android.hidl.allocator
36 | 1.0
37 |
38 | IAllocator
39 | ashmem
40 |
41 |
42 |
43 | android.hidl.manager
44 | 1.0
45 |
46 | IServiceManager
47 | default
48 |
49 |
50 |
51 | android.hidl.memory
52 | 1.0
53 |
54 | IMapper
55 | ashmem
56 |
57 |
58 |
59 | android.hidl.token
60 | 1.0
61 |
62 | ITokenManager
63 | default
64 |
65 |
66 |
67 | android.system.wifi.keystore
68 | 1.0
69 |
70 | IKeystore
71 | default
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/SPenActions/src/org/lineageos/spenactions/SPenActionsService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021-2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.lineageos.spenactions;
17 |
18 | import android.app.Service;
19 | import android.bluetooth.BluetoothAdapter;
20 | import android.bluetooth.BluetoothManager;
21 | import android.content.Context;
22 | import android.content.Intent;
23 | import android.content.IntentFilter;
24 | import android.os.IBinder;
25 | import android.os.UserHandle;
26 | import android.util.Log;
27 |
28 | public class SPenActionsService extends Service {
29 |
30 | private static final String LOG_TAG = "SPenActions/Service";
31 |
32 | @Override
33 | public IBinder onBind(Intent intent) {
34 | return null;
35 | }
36 |
37 | @Override
38 | public int onStartCommand(Intent intent, int flags, int startId) {
39 | Log.i(LOG_TAG, "Service started");
40 |
41 | IntentFilter bluetoothFilter = new IntentFilter();
42 | bluetoothFilter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
43 | registerReceiver(new BluetoothReceiver(this), bluetoothFilter);
44 |
45 | // Just started - manually send current bluetooth state
46 | Intent bluetoothState = new Intent(BluetoothAdapter.ACTION_STATE_CHANGED);
47 | bluetoothState.setPackage(getPackageName());
48 | bluetoothState.putExtra(BluetoothAdapter.EXTRA_STATE,
49 | ((BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter().getState());
50 | sendBroadcastAsUser(bluetoothState, UserHandle.CURRENT);
51 |
52 | return super.onStartCommand(intent, flags, startId);
53 | }
54 |
55 | @Override
56 | public void onDestroy() {
57 | Log.i(LOG_TAG, "Service stopping");
58 |
59 | // Force stop by faking bluetooth turn off
60 | Intent bluetoothState = new Intent(BluetoothAdapter.ACTION_STATE_CHANGED);
61 | bluetoothState.setPackage(getPackageName());
62 | bluetoothState.putExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.STATE_OFF);
63 | sendBroadcastAsUser(bluetoothState, UserHandle.CURRENT);
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/vendor.prop:
--------------------------------------------------------------------------------
1 | ## Adoptable Storage
2 | ro.crypto.volume.options=aes-256-xts:aes-256-cts:v2
3 |
4 | ## APK Verity
5 | ro.apk_verity.mode=2
6 |
7 | ## Audio
8 | audio.offload.min.duration.secs=30
9 | aaudio.mmap_policy=2
10 | aaudio.mmap_exclusive_policy=2
11 | aaudio.hw_burst_min_usec=2000
12 | af.fast_track_multiplier=1
13 |
14 | ## Bluetooth
15 | bluetooth.device.class_of_device=90,2,12
16 | bluetooth.profile.asha.central.enabled=true
17 | bluetooth.profile.a2dp.source.enabled=true
18 | bluetooth.profile.avrcp.target.enabled=true
19 | bluetooth.profile.bas.client.enabled=true
20 | bluetooth.profile.gatt.enabled=true
21 | bluetooth.profile.hfp.ag.enabled=true
22 | bluetooth.profile.hid.device.enabled=true
23 | bluetooth.profile.hid.host.enabled=true
24 | bluetooth.profile.map.server.enabled=true
25 | bluetooth.profile.opp.enabled=true
26 | bluetooth.profile.pan.nap.enabled=true
27 | bluetooth.profile.pan.panu.enabled=true
28 | bluetooth.profile.pbap.server.enabled=true
29 | bluetooth.profile.sap.server.enabled=true
30 |
31 | ## Dalvik
32 | dalvik.vm.dex2oat64.enabled=true
33 | dalvik.vm.lockprof.threshold=500
34 |
35 | ## Eden
36 | log.tag.EDEN=INFO
37 | ro.vendor.eden.devices=CPU1_GPU1_NPU1
38 | ro.vendor.eden.npu.version.path=/sys/devices/platform/npu@17800000/version
39 |
40 | ## FRP
41 | ro.frp.pst=/dev/block/persistent
42 |
43 | ## FUSE
44 | persist.sys.fuse.passthrough.enable=true
45 |
46 | ## Graphics
47 | debug.sf.auto_latch_unsignaled=0
48 | debug.sf.disable_client_composition_cache=1
49 | debug.sf.enable_transaction_tracing=false
50 | debug.sf.latch_unsignaled=1
51 | debug.sf.predict_hwc_composition_strategy=0
52 | persist.sys.sf.color_saturation=1.0
53 | persist.sys.sf.native_mode=2
54 | ro.hardware.egl=mali
55 | ro.hardware.vulkan=mali
56 | ro.opengles.version=196610
57 | ro.surface_flinger.enable_frame_rate_override=false
58 | ro.surface_flinger.has_wide_color_display=true
59 | ro.surface_flinger.has_HDR_display=true
60 | ro.surface_flinger.max_frame_buffer_acquired_buffers=3
61 | ro.surface_flinger.use_color_management=true
62 | ro.vendor.ddk.set.afbc=1
63 |
64 | ## Incremental FS
65 | ro.incremental.enable=true
66 |
67 | ## Metadata Encryption
68 | ro.crypto.dm_default_key.options_format.version=2
69 | # Call deleteAllKeys if vold detects a factory reset
70 | ro.crypto.metadata_init_delete_all_keys.enabled=true
71 | ro.crypto.volume.metadata.method=dm-default-key
72 |
73 | ## Power HAL
74 | vendor.powerhal.disp.idle_support=false
75 |
76 | ## RIL
77 | vendor.sec.rild.libpath=/vendor/lib64/libsec-ril.so
78 |
79 | ## Samsung specific
80 | ro.product_ship=true
81 | # Set csc support in OMX
82 | # If not set or set to 0, OMX will only use BT.601 colorspace.
83 | ro.vendor.cscsupported=1
84 |
85 | ## Wi-Fi Direct
86 | wifi.direct.interface=p2p-dev-wlan0
87 |
--------------------------------------------------------------------------------
/SPenActions/src/org/lineageos/spenactions/SPenMode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021-2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.lineageos.spenactions;
17 |
18 | import android.view.KeyEvent;
19 |
20 | public enum SPenMode {
21 | NAVIGATION, CAMERA, MEDIA;
22 |
23 | public int getButtonKey() {
24 | switch (this) {
25 | case NAVIGATION:
26 | return KeyEvent.KEYCODE_ENTER;
27 | case CAMERA:
28 | return KeyEvent.KEYCODE_CAMERA;
29 | case MEDIA:
30 | return KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE;
31 | default:
32 | return KeyEvent.KEYCODE_UNKNOWN;
33 | }
34 | }
35 |
36 | public int getGestureKey(SPenDirection direction) {
37 | switch (this) {
38 | case NAVIGATION:
39 | switch (direction) {
40 | case POSITIVE_X:
41 | return KeyEvent.KEYCODE_DPAD_RIGHT;
42 | case NEGATIVE_X:
43 | return KeyEvent.KEYCODE_DPAD_LEFT;
44 | case NEGATIVE_Y:
45 | return KeyEvent.KEYCODE_DPAD_UP;
46 | case POSITIVE_Y:
47 | return KeyEvent.KEYCODE_DPAD_DOWN;
48 | default:
49 | return KeyEvent.KEYCODE_UNKNOWN;
50 | }
51 | case MEDIA:
52 | switch (direction) {
53 | case POSITIVE_X:
54 | return KeyEvent.KEYCODE_MEDIA_NEXT;
55 | case NEGATIVE_X:
56 | return KeyEvent.KEYCODE_MEDIA_PREVIOUS;
57 | case NEGATIVE_Y:
58 | return KeyEvent.KEYCODE_VOLUME_UP;
59 | case POSITIVE_Y:
60 | return KeyEvent.KEYCODE_VOLUME_DOWN;
61 | default:
62 | return KeyEvent.KEYCODE_UNKNOWN;
63 | }
64 | default:
65 | return KeyEvent.KEYCODE_UNKNOWN;
66 | }
67 | }
68 |
69 | public static SPenMode valueOfPref(String prefValue) {
70 | return SPenMode.values()[Integer.parseInt(prefValue)];
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/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_vendorcompat,
13 | lib_fixups_user_type,
14 | libs_proto_3_9_1,
15 | )
16 | from extract_utils.main import (
17 | ExtractUtils,
18 | ExtractUtilsModule,
19 | )
20 |
21 | namespace_imports = [
22 | 'device/samsung/exynos9820-common',
23 | 'hardware/samsung',
24 | 'hardware/samsung_slsi-linaro/graphics',
25 | ]
26 |
27 | def lib_fixup_vendor_suffix(lib: str, partition: str, *args, **kwargs):
28 | return f'{lib}_{partition}' if partition == 'vendor' else None
29 |
30 | def lib_fixup_device_dep(lib: str, partition: str, *args, **kwargs):
31 | return f'//device/samsung/exynos9820-common/shims/stub:{lib}'
32 |
33 | lib_fixups: lib_fixups_user_type = {
34 | libs_proto_3_9_1: lib_fixup_vendorcompat,
35 | 'libuuid': lib_fixup_vendor_suffix,
36 | 'libvkmanager_vendor': lib_fixup_device_dep,
37 | } # fmt: skip
38 |
39 | blob_fixups: blob_fixups_user_type = {
40 | 'vendor/etc/libnfc-nci.conf': blob_fixup()
41 | .regex_replace('/data/nfc', '/data/vendor/nfc'),
42 | 'vendor/lib64/libcrypto-tm.so': blob_fixup()
43 | .replace_needed('libssl.so', 'libssl-tm.so'),
44 | 'vendor/lib/liboemcrypto.so': blob_fixup()
45 | .add_needed('libshim_oemcrypto.so')
46 | .binary_regex_replace(b'fopen', b'kopen'),
47 | 'vendor/lib64/libsec-ril.so': blob_fixup()
48 | .sig_replace('80 0E 40 F9 E1 03 16 AA 82 0C 80 52 E3 03 15 AA',
49 | '80 0E 40 F9 E1 03 16 AA 82 0C 80 52 08 00 80 D2'),
50 | 'vendor/lib64/libsensorlistener.so': blob_fixup()
51 | .add_needed('libshim_sensorndkbridge.so'),
52 | (
53 | 'vendor/lib64/libkeymaster_helper.so',
54 | 'vendor/lib64/libskeymaster4device.so',
55 | ): blob_fixup()
56 | .replace_needed('libcrypto.so', 'libcrypto-tm.so')
57 | .add_needed('libshim_crypto.so'),
58 | 'vendor/lib/libwvhidl.so': blob_fixup()
59 | .replace_needed('libprotobuf-cpp-lite-3.9.1.so', 'libprotobuf-cpp-full-3.9.1.so'),
60 | (
61 | 'vendor/lib/sensors.grip.so',
62 | 'vendor/lib64/sensors.grip.so',
63 | ): blob_fixup()
64 | .add_needed('libutils-v32.so')
65 | .binary_regex_replace(b'_ZN7android6Thread3runEPKcim', b'_ZN7utils326Thread3runEPKcim'),
66 | } # fmt: skip
67 |
68 | module = ExtractUtilsModule(
69 | 'exynos9820-common',
70 | 'samsung',
71 | namespace_imports=namespace_imports,
72 | blob_fixups=blob_fixups,
73 | lib_fixups=lib_fixups,
74 | )
75 |
76 | if __name__ == '__main__':
77 | utils = ExtractUtils.device(module)
78 | utils.run()
79 |
--------------------------------------------------------------------------------
/audio/proxy/audio_usb_proxy_interface.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef AUDIO_USB_PROXY_INTERFACE_H
18 | #define AUDIO_USB_PROXY_INTERFACE_H
19 |
20 | /* USB Proxy interface function prototypes */
21 | int proxy_is_usb_playback_CPCall_prepared(void *proxy_usb);
22 | int proxy_is_usb_playback_device_connected(void *proxy_usb);
23 | int proxy_is_usb_capture_device_connected(void *proxy_usb);
24 | unsigned int proxy_usb_get_capture_samplerate(void *proxy_usb);
25 | unsigned int proxy_usb_get_capture_channels(void *proxy_usb);
26 | int proxy_usb_get_capture_format(void *proxy_usb);
27 | int proxy_usb_get_playback_samplerate(void *proxy_usb);
28 | int proxy_usb_get_playback_channels(void *proxy_usb);
29 | int proxy_usb_get_playback_format(void *proxy_usb);
30 | int proxy_usb_get_playback_bitwidth(void *proxy_usb);
31 | int proxy_usb_get_playback_highest_supported_channels(void *proxy_usb);
32 |
33 | // Audio Stream USB Proxy Playback Functions
34 | void proxy_usb_playback_prepare(void *proxy_usb, bool set_default);
35 | int proxy_usb_getparam_playback_stream(void *proxy_usb, void *query_params, void *reply_params);
36 | int proxy_usb_setparam_playback_stream(void *proxy_usb, void *parameters);
37 |
38 | // Audio Stream USB Proxy Capture Functions
39 | void proxy_usb_capture_prepare(void *proxy_usb, bool set_default);
40 | int proxy_usb_getparam_capture_stream(void *proxy_usb, void *query_params, void *reply_params);
41 | int proxy_usb_setparam_capture_stream(void *proxy_usb, void *parameters);
42 |
43 | // Audio USB Device Proxy Functions
44 | bool proxy_usb_out_pick_best_pcmconfig(void *proxy_usb, struct pcm_config cur_pcmconfig);
45 | int proxy_usb_out_reconfig_needed(void *proxy_usb);
46 | void proxy_usb_out_reset_config(void *proxy_usb);
47 | void proxy_usb_open_out_proxy(void *proxy_usb);
48 | void proxy_usb_close_out_proxy(void *proxy_usb);
49 | void proxy_usb_open_in_proxy(void *proxy_usb);
50 | void proxy_usb_close_in_proxy(void *proxy_usb);
51 |
52 | // set parameters function carries USB configuration inforamtion
53 | void proxy_usb_set_gain(void *proxy_usb, char *path_name);
54 | void proxy_usb_reset_gain(void *proxy_usb, char *path_name);
55 | int proxy_usb_set_parameters(void *proxy_usb, void *parameters);
56 | void *proxy_usb_init(void);
57 | void proxy_usb_deinit(void* proxy_usb);
58 |
59 | #endif /* AUDIO_USB_PROXY_INTERFACE_H */
60 |
--------------------------------------------------------------------------------
/rro_overlays/WifiOverlay/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
23 |
24 |
25 | Samsung Galaxy
26 |
27 |
28 | true
29 |
30 |
31 | true
32 |
33 |
34 | false
35 |
36 |
37 | true
38 |
39 |
40 | true
41 |
42 |
43 | true
44 |
45 |
46 | true
47 |
48 |
49 | true
50 |
51 |
55 | true
56 |
57 |
--------------------------------------------------------------------------------
/audio/proxy/audio_abox.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef __EXYNOS_AUDIOPROXY_ABOX_H__
18 | #define __EXYNOS_AUDIOPROXY_ABOX_H__
19 |
20 | #include
21 | #include
22 |
23 | /* A-Box HW limitations */
24 |
25 | // Supported Sampling Rate
26 | #define MAX_NUM_PLAYBACK_SR 8
27 | unsigned int supported_playback_samplingrate[MAX_NUM_PLAYBACK_SR] = {8000, 16000, 32000, 44100, 48000, 96000, 192000, 384000};
28 |
29 | /* In spite of A-Box spec, we need to fix 48KHz recording only to support some solution limitation */
30 | #define MAX_NUM_CAPTURE_SR 1
31 | unsigned int supported_capture_samplingrate[MAX_NUM_CAPTURE_SR] = {48000};
32 |
33 | // Supported Channel Mask
34 | #define MAX_NUM_PLAYBACK_CM 2
35 | audio_channel_mask_t supported_playback_channelmask[MAX_NUM_PLAYBACK_CM] = {AUDIO_CHANNEL_OUT_MONO, AUDIO_CHANNEL_OUT_STEREO};
36 |
37 | // Supported direct Channel Mask
38 | #define MAX_NUM_DIRECT_PLAYBACK_CM 3
39 | audio_channel_mask_t supported_direct_playback_channelmask[MAX_NUM_DIRECT_PLAYBACK_CM] = {AUDIO_CHANNEL_OUT_5POINT1, AUDIO_CHANNEL_OUT_6POINT1, AUDIO_CHANNEL_OUT_7POINT1};
40 |
41 | #define MAX_NUM_CAPTURE_CM 2
42 | audio_channel_mask_t supported_capture_channelmask[MAX_NUM_CAPTURE_CM] = {AUDIO_CHANNEL_IN_STEREO, AUDIO_CHANNEL_IN_FRONT_BACK};
43 |
44 | // Supported PCM Format
45 | #define MAX_NUM_PLAYBACK_PF 3
46 | audio_format_t supported_playback_pcmformat[MAX_NUM_PLAYBACK_PF] = {AUDIO_FORMAT_PCM_16_BIT, AUDIO_FORMAT_PCM_8_24_BIT, AUDIO_FORMAT_PCM_32_BIT};
47 |
48 | #define MAX_NUM_CAPTURE_PF 2
49 | audio_format_t supported_capture_pcmformat[MAX_NUM_CAPTURE_PF] = {AUDIO_FORMAT_PCM_16_BIT, AUDIO_FORMAT_PCM_8_24_BIT};
50 |
51 | // Supported Audio Format
52 | #define MAX_NUM_PLAYBACK_AF 1
53 | audio_format_t supported_playback_audioformat[MAX_NUM_PLAYBACK_AF] = {AUDIO_FORMAT_MP3};
54 |
55 | /* Calliope Firmware Dump */
56 | #define CALLIOPE_LOG_BUFFERSIZE (4 * 1024)
57 |
58 | #define CALLIOPE_DBG_PATH "/sys/kernel/debug/abox/"
59 | #define CALLIOPE_LOG "log-00"
60 | #define SYSFS_PREFIX "/sys"
61 | #define ABOX_DEV "/devices/platform/18c50000.abox/"
62 | #define ABOX_REGMAP_PATH "/d/regmap/18c50000.abox/"
63 | #define ABOX_DEBUG "0.abox-debug/"
64 | #define ABOX_SRAM "calliope_sram"
65 | #define ABOX_DRAM "calliope_dram"
66 | #define ABOX_REG_FILE "registers"
67 | #define ABOX_DUMP "/data/vendor/log/abox/"
68 | #define ABOX_DUMP_LIMIT (10)
69 | #define ABOX_GPR "gpr"
70 |
71 | // ION Memory MMAP FD retreiving interface
72 | struct snd_pcm_mmap_fd {
73 | int32_t dir;
74 | int32_t fd;
75 | int32_t size;
76 | int32_t actual_size;
77 | };
78 |
79 | #define SNDRV_PCM_IOCTL_MMAP_DATA_FD _IOWR('U', 0xd2, struct snd_pcm_mmap_fd)
80 |
81 | #endif // __EXYNOS_AUDIOPROXY_ABOX_H__
82 |
--------------------------------------------------------------------------------
/audio/proxy/audio_a2dp_proxy.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef AUDIO_A2DP_PROXY_H
18 | #define AUDIO_A2DP_PROXY_H
19 |
20 | #ifdef __cplusplus
21 | extern "C" {
22 | #endif
23 |
24 | /*****************************************************************************
25 | ** Constants & Macros
26 | ******************************************************************************/
27 |
28 | #if 0
29 | enum {
30 | ENC_CODEC_TYPE_SBC = 520093696u, // 0x1F000000UL
31 | ENC_CODEC_TYPE_APTX = 536870912u, // 0x20000000UL
32 | };
33 | #endif
34 |
35 | /* Encoder Format & Channel Definition */
36 | #define ENC_MEDIA_FMT_APTX 0x000131ff
37 | #define ENC_MEDIA_FMT_APTX_HD 0x00013200
38 | #define ENC_MEDIA_FMT_SBC 0x00010BF2
39 |
40 | #define PCM_CHANNEL_L 1
41 | #define PCM_CHANNEL_R 2
42 | #define PCM_CHANNEL_C 3
43 |
44 | /* These Configurations from A2DP IPC Library */
45 | typedef struct {
46 | uint32_t subband; /* 4, 8 */
47 | uint32_t blk_len; /* 4, 8, 12, 16 */
48 | uint16_t sampling_rate; /*44.1khz,48khz*/
49 | uint8_t channels; /*0(Mono),1(Dual_mono),2(Stereo),3(JS)*/
50 | uint8_t alloc; /*0(Loudness),1(SNR)*/
51 | uint8_t min_bitpool; /* 2 */
52 | uint8_t max_bitpool; /*53(44.1khz),51 (48khz) */
53 | uint32_t bitrate; /* 320kbps to 512kbps */
54 | } audio_sbc_encoder_config;
55 |
56 | typedef struct {
57 | uint16_t sampling_rate;
58 | uint8_t channels;
59 | uint32_t bitrate;
60 | } audio_aptx_encoder_config;
61 |
62 | /* These Configurations for Real A2DP Encoder */
63 | struct sbc_enc_cfg_t {
64 | uint32_t enc_format;
65 | uint32_t num_subbands;
66 | uint32_t blk_len;
67 | uint32_t channel_mode;
68 | uint32_t alloc_method;
69 | uint32_t bit_rate;
70 | uint32_t sample_rate;
71 | } __packed;
72 |
73 | struct aptx_enc_cfg_t {
74 | uint32_t enc_format;
75 | uint32_t sample_rate;
76 | uint32_t num_channels;
77 | uint32_t reserved;
78 | uint32_t channel_mapping[2];
79 | uint32_t custom_size;
80 | } __packed;
81 |
82 |
83 |
84 | /*****************************************************************************
85 | ** External Functions
86 | ******************************************************************************/
87 | int proxy_a2dp_get_config(uint32_t *, void *);
88 |
89 | int proxy_a2dp_start(void);
90 | int proxy_a2dp_stop(void);
91 | int proxy_a2dp_suspend(bool);
92 |
93 | int proxy_a2dp_open(void);
94 | int proxy_a2dp_close(void);
95 |
96 | int proxy_a2dp_init(void);
97 | int proxy_a2dp_deinit(void);
98 |
99 | #ifdef __cplusplus
100 | }
101 | #endif
102 |
103 | #endif /* AUDIO_A2DP_PROXY_H */
104 |
--------------------------------------------------------------------------------
/configs/init/fstab.exynos9820.in:
--------------------------------------------------------------------------------
1 | system /system ext4 ro,barrier=1 wait,logical,first_stage_mount
2 | system /system erofs ro wait,logical,first_stage_mount
3 | system_ext /system_ext ext4 ro,barrier=1 wait,logical,first_stage_mount
4 | system_ext /system_ext erofs ro wait,logical,first_stage_mount
5 | vendor /vendor ext4 ro,barrier=1 wait,logical,first_stage_mount
6 | vendor /vendor erofs ro wait,logical,first_stage_mount
7 | product /product ext4 ro,errors=panic wait,logical,first_stage_mount
8 | product /product erofs ro wait,logical,first_stage_mount
9 | odm /odm ext4 ro,errors=panic wait,logical,first_stage_mount
10 | odm /odm erofs ro wait,logical,first_stage_mount
11 |
12 | /dev/block/platform/13d60000.ufs/by-name/@metadata@ /metadata ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,first_stage_mount,formattable,check,fsverity
13 |
14 | /dev/block/platform/13d60000.ufs/by-name/boot /boot emmc defaults recoveryonly
15 | /dev/block/platform/13d60000.ufs/by-name/recovery /recovery emmc defaults recoveryonly
16 | /dev/block/platform/13d60000.ufs/by-name/vbmeta /vbmeta emmc defaults first_stage_mount
17 | /dev/block/platform/13d60000.ufs/by-name/cache /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check
18 | /dev/block/platform/13d60000.ufs/by-name/efs /mnt/vendor/efs ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check
19 | /dev/block/platform/13d60000.ufs/by-name/misc /misc emmc defaults defaults
20 | /dev/block/platform/13d60000.ufs/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,inlinecrypt latemount,wait,check,quota,formattable,checkpoint=fs,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized,metadata_encryption=aes-256-xts,keydirectory=/metadata/vold/metadata_encryption,fscompress,readahead_size_kb=128
21 |
22 | /devices/platform/13d00000.dwmmc2/mmc_host* auto auto defaults voldmanaged=sdcard:auto,encryptable=userdata
23 | /devices/platform/10c00000.usb* auto auto defaults voldmanaged=usb:auto
24 |
25 | /dev/block/zram0 none swap defaults zramsize=2684354560
26 |
--------------------------------------------------------------------------------
/SPenActions/src/org/lineageos/spenactions/settings/SPenSettingsFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021-2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.lineageos.spenactions.settings;
17 |
18 | import android.bluetooth.BluetoothAdapter;
19 | import android.bluetooth.BluetoothManager;
20 | import android.content.Context;
21 | import android.content.Intent;
22 | import android.os.Bundle;
23 | import android.os.UserHandle;
24 | import android.view.View;
25 | import android.widget.CompoundButton;
26 | import android.widget.CompoundButton.OnCheckedChangeListener;
27 |
28 | import androidx.preference.Preference;
29 | import androidx.preference.PreferenceFragment;
30 | import androidx.preference.SwitchPreferenceCompat;
31 |
32 | import com.android.settingslib.widget.ActionButtonsPreference;
33 | import com.android.settingslib.widget.MainSwitchPreference;
34 |
35 | import org.lineageos.spenactions.BluetoothUtils;
36 | import org.lineageos.spenactions.R;
37 |
38 | public class SPenSettingsFragment extends PreferenceFragment implements
39 | Preference.OnPreferenceChangeListener, OnCheckedChangeListener,
40 | View.OnClickListener {
41 |
42 | private SwitchPreferenceCompat mEnableBluetoothPreference;
43 | private ActionButtonsPreference mActionButtonsPreference;
44 |
45 | @Override
46 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
47 | addPreferencesFromResource(R.xml.spen_settings);
48 |
49 | mEnableBluetoothPreference = findPreference(SettingsUtils.SPEN_BLUETOOTH_ENABLE);
50 | mEnableBluetoothPreference.setOnPreferenceChangeListener(this);
51 | mActionButtonsPreference = findPreference(SettingsUtils.ACTION_BUTTONS);
52 | mActionButtonsPreference.setButton1Text(R.string.reset_spen);
53 | mActionButtonsPreference.setButton1OnClickListener(this);
54 | }
55 |
56 | @Override
57 | public boolean onPreferenceChange(Preference preference, Object newValue) {
58 | if (SettingsUtils.SPEN_BLUETOOTH_ENABLE.equals(preference.getKey())) {
59 | if (((BluetoothManager) getActivity().getSystemService(Context.BLUETOOTH_SERVICE)).getAdapter()
60 | .getState() == BluetoothAdapter.STATE_ON) {
61 | // Simulate bluetooth switch on/off to apply the new settings
62 | Intent bluetoothState = new Intent(BluetoothAdapter.ACTION_STATE_CHANGED);
63 | bluetoothState.setPackage(getActivity().getPackageName());
64 | bluetoothState.putExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.STATE_OFF);
65 | getActivity().sendBroadcastAsUser(bluetoothState, UserHandle.CURRENT);
66 | bluetoothState.putExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.STATE_ON);
67 | getActivity().sendBroadcastAsUser(bluetoothState, UserHandle.CURRENT);
68 | }
69 | }
70 |
71 | return true;
72 | }
73 |
74 | @Override
75 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
76 | }
77 |
78 | @Override
79 | public void onClick(View view) {
80 | BluetoothUtils.resetSPenMAC(getActivity());
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/configs/task_profiles/task_profiles_30.json:
--------------------------------------------------------------------------------
1 | {
2 | "Attributes": [
3 | {
4 | "Name": "STuneBoost",
5 | "Controller": "schedtune",
6 | "File": "schedtune.boost"
7 | },
8 | {
9 | "Name": "STunePreferIdle",
10 | "Controller": "schedtune",
11 | "File": "schedtune.prefer_idle"
12 | }
13 | ],
14 |
15 | "Profiles": [
16 | {
17 | "Name": "HighEnergySaving",
18 | "Actions": [
19 | {
20 | "Name": "JoinCgroup",
21 | "Params":
22 | {
23 | "Controller": "schedtune",
24 | "Path": "background"
25 | }
26 | }
27 | ]
28 | },
29 | {
30 | "Name": "NormalPerformance",
31 | "Actions": [
32 | {
33 | "Name": "JoinCgroup",
34 | "Params":
35 | {
36 | "Controller": "schedtune",
37 | "Path": ""
38 | }
39 | }
40 | ]
41 | },
42 | {
43 | "Name": "ServicePerformance",
44 | "Actions": [
45 | {
46 | "Name": "JoinCgroup",
47 | "Params":
48 | {
49 | "Controller": "schedtune",
50 | "Path": "background"
51 | }
52 | }
53 | ]
54 | },
55 | {
56 | "Name": "HighPerformance",
57 | "Actions": [
58 | {
59 | "Name": "JoinCgroup",
60 | "Params":
61 | {
62 | "Controller": "schedtune",
63 | "Path": "foreground"
64 | }
65 | }
66 | ]
67 | },
68 | {
69 | "Name": "MaxPerformance",
70 | "Actions": [
71 | {
72 | "Name": "JoinCgroup",
73 | "Params":
74 | {
75 | "Controller": "schedtune",
76 | "Path": "top-app"
77 | }
78 | }
79 | ]
80 | },
81 | {
82 | "Name": "RealtimePerformance",
83 | "Actions": [
84 | {
85 | "Name": "JoinCgroup",
86 | "Params":
87 | {
88 | "Controller": "schedtune",
89 | "Path": "rt"
90 | }
91 | }
92 | ]
93 | },
94 | {
95 | "Name": "CameraServicePerformance",
96 | "Actions": [
97 | {
98 | "Name": "JoinCgroup",
99 | "Params":
100 | {
101 | "Controller": "schedtune",
102 | "Path": "camera-daemon"
103 | }
104 | }
105 | ]
106 | },
107 | {
108 | "Name": "NNApiHALPerformance",
109 | "Actions": [
110 | {
111 | "Name": "JoinCgroup",
112 | "Params":
113 | {
114 | "Controller": "schedtune",
115 | "Path": "nnapi-hal"
116 | }
117 | }
118 | ]
119 | },
120 | {
121 | "Name": "Dex2oatPerformance",
122 | "Actions": [
123 | {
124 | "Name": "JoinCgroup",
125 | "Params":
126 | {
127 | "Controller": "schedtune",
128 | "Path": "background"
129 | }
130 | }
131 | ]
132 | },
133 | {
134 | "Name": "CpuPolicySpread",
135 | "Actions": [
136 | {
137 | "Name": "SetAttribute",
138 | "Params":
139 | {
140 | "Name": "STunePreferIdle",
141 | "Value": "1"
142 | }
143 | }
144 | ]
145 | },
146 | {
147 | "Name": "CpuPolicyPack",
148 | "Actions": [
149 | {
150 | "Name": "SetAttribute",
151 | "Params":
152 | {
153 | "Name": "STunePreferIdle",
154 | "Value": "0"
155 | }
156 | }
157 | ]
158 | }
159 | ]
160 | }
161 |
--------------------------------------------------------------------------------
/audio/proxy/Android.bp:
--------------------------------------------------------------------------------
1 | // Copyright (C) 2017 The Android Open Source Project
2 | // Copyright (C) 2024 The LineageOS Project
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 |
16 | soong_config_module_type {
17 | name: "audioproxy",
18 | module_type: "cc_defaults",
19 | config_namespace: "exynos9820AudioVars",
20 | bool_variables: [
21 | "use_bta2dp_offload",
22 | "use_direct_rcvspk_path",
23 | "use_dual_speaker",
24 | "use_soundtrigger_hal",
25 | "use_spkamp_playback",
26 | "use_quad_mic",
27 | "use_quad_mic_apcall",
28 | "use_quad_mic_camcorder",
29 | ],
30 | properties: [
31 | "cflags",
32 | "shared_libs",
33 | "srcs",
34 | ],
35 | }
36 |
37 | audioproxy {
38 | name: "audioproxy_defaults",
39 | soong_config_variables: {
40 | use_bta2dp_offload: {
41 | cflags: ["-DSUPPORT_BTA2DP_OFFLOAD"],
42 | shared_libs: [
43 | "libbase",
44 | "libhidlbase",
45 | "libhidlmemory",
46 | "libhwbinder",
47 | "libutils",
48 | "android.hidl.allocator@1.0",
49 | "android.hidl.memory@1.0",
50 | "vendor.samsung_slsi.hardware.ExynosA2DPOffload@1.0",
51 | ],
52 | srcs: ["audio_a2dp_proxy.cpp"],
53 | },
54 | use_direct_rcvspk_path: {
55 | cflags: ["-DSUPPORT_DIRECT_RCVSPK_PATH"],
56 | },
57 | use_dual_speaker: {
58 | cflags: ["-DSUPPORT_DUAL_SPEAKER"],
59 | },
60 | use_soundtrigger_hal: {
61 | cflags: [
62 | "-DSUPPORT_STHAL_INTERFACE",
63 | "-DTARGET_SOC_NAME=exynos9820",
64 | ],
65 | },
66 | use_spkamp_playback: {
67 | cflags: ["-DENABLE_SPKAMP_PLAYBACK=true"],
68 | },
69 | use_quad_mic: {
70 | cflags: ["-DSUPPORT_QUAD_MIC"],
71 | },
72 | use_quad_mic_apcall: {
73 | cflags: ["-DSUPPORT_APCALL_QUAD_MIC"],
74 | },
75 | use_quad_mic_camcorder: {
76 | cflags: ["-DSUPPORT_CAMCORDER_QUAD_MIC"],
77 | },
78 | },
79 | }
80 |
81 | cc_library_shared {
82 | name: "libaudioproxy",
83 | defaults: ["audioproxy_defaults"],
84 | vendor: true,
85 |
86 | srcs: [
87 | "audio_proxy.c",
88 | "audio_usb_proxy.c",
89 | ],
90 | include_dirs: [
91 | "hardware/samsung_slsi-linaro/exynos/include/libaudio/audiohal",
92 | "external/tinyalsa/include",
93 | "external/tinycompress/include",
94 | "external/kernel-headers/original/uapi/sound",
95 | "external/expat/lib",
96 | ],
97 |
98 | header_libs: ["libhardware_headers"],
99 | shared_libs: [
100 | "liblog",
101 | "libcutils",
102 | "libtinyalsa",
103 | "libtinycompress",
104 | "libaudioutils",
105 | "libaudioroute",
106 | "libalsautils",
107 | "libexpat",
108 | ],
109 | cflags: [
110 | "-Wno-unused-parameter",
111 | "-Wno-unused-variable",
112 | "-Wno-unused-function",
113 | "-DSUPPORT_MCD_FEATURE",
114 | ],
115 | }
116 |
--------------------------------------------------------------------------------
/configs/thermal/thermal_info_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "Sensors": [
3 | {
4 | "Name": "BIG",
5 | "Type": "CPU",
6 | "HotThreshold": [
7 | "NAN",
8 | "NAN",
9 | "NAN",
10 | 96.0,
11 | "NAN",
12 | "NAN",
13 | 115.0
14 | ],
15 | "VrThreshold": "NAN",
16 | "Multiplier": 0.001
17 | },
18 | {
19 | "Name": "MID",
20 | "Type": "CPU",
21 | "HotThreshold": [
22 | "NAN",
23 | "NAN",
24 | "NAN",
25 | 96.0,
26 | "NAN",
27 | "NAN",
28 | 115.0
29 | ],
30 | "VrThreshold": "NAN",
31 | "Multiplier": 0.001
32 | },
33 | {
34 | "Name": "LITTLE",
35 | "Type": "CPU",
36 | "HotThreshold": [
37 | "NAN",
38 | "NAN",
39 | "NAN",
40 | 96.0,
41 | "NAN",
42 | "NAN",
43 | 115.0
44 | ],
45 | "VrThreshold": "NAN",
46 | "Multiplier": 0.001
47 | },
48 | {
49 | "Name": "G3D",
50 | "Type": "GPU",
51 | "HotThreshold": [
52 | "NAN",
53 | "NAN",
54 | "NAN",
55 | 96.0,
56 | "NAN",
57 | "NAN",
58 | 115.0
59 | ],
60 | "VrThreshold": "NAN",
61 | "Multiplier": 0.001
62 | },
63 | {
64 | "Name": "ISP",
65 | "Type": "CPU",
66 | "HotThreshold": [
67 | "NAN",
68 | "NAN",
69 | "NAN",
70 | 96.0,
71 | "NAN",
72 | "NAN",
73 | 115.0
74 | ],
75 | "VrThreshold": "NAN",
76 | "Multiplier": 0.001
77 | },
78 | {
79 | "Name": "ac",
80 | "Type": "USB_PORT",
81 | "HotThreshold": [
82 | "NAN",
83 | "NAN",
84 | "NAN",
85 | "NAN",
86 | "NAN",
87 | "60.0",
88 | "NAN"
89 | ],
90 | "HotHysteresis": [
91 | 0.0,
92 | 0.0,
93 | 0.0,
94 | 0.0,
95 | 0.0,
96 | 5.0,
97 | 0.0
98 | ],
99 | "VrThreshold": "NAN",
100 | "Multiplier": 0.001,
101 | "Monitor": true
102 | },
103 | {
104 | "Name": "battery",
105 | "Type": "BATTERY",
106 | "HotThreshold": [
107 | "NAN",
108 | "NAN",
109 | "NAN",
110 | "NAN",
111 | "NAN",
112 | "NAN",
113 | 60.0
114 | ],
115 | "VrThreshold": "NAN",
116 | "Multiplier": 0.001
117 | }
118 | ],
119 | "CoolingDevices": [
120 | {
121 | "Name": "thermal-cpufreq-0",
122 | "Type": "CPU"
123 | },
124 | {
125 | "Name": "thermal-cpufreq-1",
126 | "Type": "CPU"
127 | },
128 | {
129 | "Name": "thermal-cpufreq-2",
130 | "Type": "CPU"
131 | },
132 | {
133 | "Name": "thermal-gpufreq-0",
134 | "Type": "GPU"
135 | },
136 | {
137 | "Name": "thermal-isp-0",
138 | "Type": "COMPONENT"
139 | }
140 | ]
141 | }
142 |
--------------------------------------------------------------------------------
/configs/power/powerhint.json:
--------------------------------------------------------------------------------
1 | {
2 | "Nodes": [
3 | {
4 | "Name": "GPUMinFreq",
5 | "Path": "/sys/kernel/gpu/gpu_min_clock",
6 | "Values": [
7 | "572000",
8 | "377000",
9 | "260000",
10 | "156000"
11 | ],
12 | "HoldFd": true,
13 | "ResetOnInit": true
14 | },
15 | {
16 | "Name": "TASchedtuneBoost",
17 | "Path": "/dev/stune/top-app/schedtune.boost",
18 | "Values": [
19 | "30",
20 | "5"
21 | ],
22 | "ResetOnInit": true
23 | },
24 | {
25 | "Name": "PMQoSCpuDmaLatency",
26 | "Path": "/dev/cpu_dma_latency",
27 | "Values": [
28 | "0x0000002c",
29 | "0x00000064"
30 | ],
31 | "HoldFd": true
32 | },
33 | {
34 | "Name": "TouchscreenEnable",
35 | "Path": "/sys/class/sec/tsp/input/enabled",
36 | "Values": [
37 | "1",
38 | "0"
39 | ],
40 | "ResetOnInit": true
41 | },
42 | {
43 | "Name": "LCDEnable",
44 | "Path": "/sys/class/power_supply/battery/lcd",
45 | "Values": [
46 | "1",
47 | "0"
48 | ],
49 | "ResetOnInit": true
50 | },
51 | {
52 | "Name": "DoubleTapToWakeEnable",
53 | "Path": "/sys/class/sec/tsp/cmd",
54 | "Values": [
55 | "aod_enable,0",
56 | "set_aod_rect,1440,3040,0,0"
57 | ],
58 | "DefaultIndex": 0,
59 | "ResetOnInit": false
60 | }
61 | ],
62 | "Actions": [
63 | {
64 | "PowerHint": "INTERACTION",
65 | "Node": "TASchedtuneBoost",
66 | "Duration": 0,
67 | "Value": "30"
68 | },
69 | {
70 | "PowerHint": "INTERACTION",
71 | "Node": "GPUMinFreq",
72 | "Duration": 0,
73 | "Value": "377000"
74 | },
75 | {
76 | "PowerHint": "LAUNCH",
77 | "Node": "PMQoSCpuDmaLatency",
78 | "Duration": 5000,
79 | "Value": "0x0000002c"
80 | },
81 | {
82 | "PowerHint": "CAMERA_LAUNCH",
83 | "Node": "PMQoSCpuDmaLatency",
84 | "Duration": 1000,
85 | "Value": "0x0000002c"
86 | },
87 | {
88 | "PowerHint": "CAMERA_SHOT",
89 | "Node": "PMQoSCpuDmaLatency",
90 | "Duration": 1000,
91 | "Value": "0x0000002c"
92 | },
93 | {
94 | "PowerHint": "AUDIO_LAUNCH",
95 | "Node": "PMQoSCpuDmaLatency",
96 | "Duration": 2000,
97 | "Value": "0x0000002c"
98 | },
99 | {
100 | "PowerHint": "AUDIO_STREAMING_LOW_LATENCY",
101 | "Node": "PMQoSCpuDmaLatency",
102 | "Duration": 0,
103 | "Value": "0x0000002c"
104 | },
105 | {
106 | "PowerHint": "INTERACTIVE",
107 | "Node": "TouchscreenEnable",
108 | "Duration": 0,
109 | "Value": "1"
110 | },
111 | {
112 | "PowerHint": "INTERACTIVE",
113 | "Node": "LCDEnable",
114 | "Duration": 0,
115 | "Value": "1"
116 | },
117 | {
118 | "PowerHint": "DOUBLE_TAP_TO_WAKE",
119 | "Node": "DoubleTapToWakeEnable",
120 | "Duration": 0,
121 | "Value": "set_aod_rect,1440,3040,0,0"
122 | },
123 | {
124 | "PowerHint": "EXPENSIVE_RENDERING",
125 | "Node": "GPUMinFreq",
126 | "Duration": 0,
127 | "Value": "572000"
128 | }
129 | ]
130 | }
131 |
--------------------------------------------------------------------------------
/SPenActions/src/org/lineageos/spenactions/BluetoothUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.lineageos.spenactions;
17 |
18 | import android.bluetooth.BluetoothAdapter;
19 | import android.bluetooth.BluetoothManager;
20 | import android.bluetooth.le.BluetoothLeScanner;
21 | import android.bluetooth.le.ScanCallback;
22 | import android.bluetooth.le.ScanFilter;
23 | import android.bluetooth.le.ScanResult;
24 | import android.bluetooth.le.ScanSettings;
25 | import android.content.Context;
26 | import android.content.Intent;
27 | import android.os.Handler;
28 | import android.os.Looper;
29 | import android.os.ParcelUuid;
30 | import android.os.RemoteException;
31 | import android.os.ServiceManager;
32 | import android.os.UserHandle;
33 | import android.util.Log;
34 |
35 | import java.util.List;
36 | import java.util.UUID;
37 |
38 | import vendor.samsung.hardware.spen.ISPen;
39 |
40 | public class BluetoothUtils {
41 |
42 | private static final String LOG_TAG = "SPenActions/BluetoothUtils";
43 |
44 | public static void resetSPenMAC(Context context) {
45 | ISPen hal = ISPen.Stub.asInterface(ServiceManager.waitForDeclaredService("vendor.samsung.hardware.spen.ISPen/default"));
46 | BluetoothManager manager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE);
47 | BluetoothAdapter adapter = manager.getAdapter();
48 |
49 | if (!adapter.isEnabled())
50 | return;
51 |
52 | try {
53 | // Toggle charging to make pen discoverable for a few seconds
54 | hal.setCharging(false);
55 | hal.setCharging(true);
56 | } catch (RemoteException ex) {
57 | ex.printStackTrace();
58 | }
59 |
60 | BluetoothLeScanner scanner = adapter.getBluetoothLeScanner();
61 | ScanCallback callback = new ScanCallback() {
62 | @Override
63 | public void onScanResult(int callbackType, ScanResult result) {
64 | Log.i(LOG_TAG, result.getDevice().getName() + " RSSI: " + result.getRssi());
65 | try {
66 | hal.setMACAddress(result.getDevice().getAddress());
67 | } catch (RemoteException ex) {
68 | ex.printStackTrace();
69 | }
70 | scanner.stopScan(this);
71 | // Simulate bluetooth switch on/off to apply the new MAC
72 | Intent bluetoothState = new Intent(BluetoothAdapter.ACTION_STATE_CHANGED);
73 | bluetoothState.setPackage(context.getPackageName());
74 | bluetoothState.putExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.STATE_OFF);
75 | context.sendBroadcastAsUser(bluetoothState, UserHandle.CURRENT);
76 | bluetoothState.putExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.STATE_ON);
77 | context.sendBroadcastAsUser(bluetoothState, UserHandle.CURRENT);
78 | }
79 | };
80 | ScanFilter filter = new ScanFilter.Builder()
81 | .setServiceUuid(new ParcelUuid(UUID.fromString(context.getResources().getString(R.string.spen_service_uuid)))).build();
82 | ScanSettings settings = new ScanSettings.Builder().setCallbackType(ScanSettings.CALLBACK_TYPE_FIRST_MATCH).build();
83 |
84 | scanner.startScan(List.of(filter), settings, callback);
85 | new Handler(Looper.getMainLooper()).postDelayed(() -> {
86 | scanner.stopScan(callback);
87 | }, 60 * 1000); // Cancel scan after 60s
88 | }
89 |
90 | }
91 |
--------------------------------------------------------------------------------
/SPenActions/src/org/lineageos/spenactions/SPenConnectionManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021-2022 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.lineageos.spenactions;
17 |
18 | import android.bluetooth.BluetoothAdapter;
19 | import android.bluetooth.BluetoothDevice;
20 | import android.bluetooth.BluetoothGatt;
21 | import android.bluetooth.BluetoothManager;
22 | import android.bluetooth.BluetoothProfile;
23 | import android.content.BroadcastReceiver;
24 | import android.content.Context;
25 | import android.content.Intent;
26 | import android.content.IntentFilter;
27 | import android.os.RemoteException;
28 | import android.os.ServiceManager;
29 | import android.util.Log;
30 |
31 | import java.io.IOException;
32 | import java.nio.file.Files;
33 | import java.nio.file.Paths;
34 |
35 | import vendor.samsung.hardware.spen.ISPen;
36 |
37 | public class SPenConnectionManager extends BroadcastReceiver {
38 |
39 | private static final String LOG_TAG = "SPenActions/SPenConnectionManager";
40 |
41 | private final Context mContext;
42 | private ISPen mSPenHAL;
43 | private BluetoothAdapter mAdapter;
44 | private BluetoothDevice mSpen;
45 | private BluetoothGatt mGatt;
46 | private String mCurBleSpenAddr;
47 |
48 | public SPenConnectionManager(Context context) {
49 | this.mContext = context;
50 | this.mSPenHAL = ISPen.Stub.asInterface(ServiceManager.waitForDeclaredService("vendor.samsung.hardware.spen.ISPen/default"));
51 |
52 | context.registerReceiver(this, new IntentFilter(BluetoothDevice.ACTION_PAIRING_REQUEST));
53 | }
54 |
55 | public void connect() throws RemoteException {
56 | String blespenAddr = mSPenHAL.getMACAddress();
57 | Log.i(LOG_TAG, "Connecting! SPen BLE address: " + blespenAddr);
58 |
59 | mCurBleSpenAddr = blespenAddr;
60 | BluetoothManager bluetoothManager = (BluetoothManager) mContext.getSystemService(Context.BLUETOOTH_SERVICE);
61 | mAdapter = bluetoothManager.getAdapter();
62 |
63 | if (!mAdapter.isEnabled())
64 | mAdapter.enable();
65 |
66 | // Try to reset the pen if HAL fails to retrieve MAC
67 | if (blespenAddr.startsWith("00:00:00:00:00:00")) {
68 | Log.i(LOG_TAG, "Trying to reset pen!");
69 | BluetoothUtils.resetSPenMAC(mContext);
70 | return;
71 | }
72 |
73 | mSpen = mAdapter.getRemoteDevice(blespenAddr);
74 |
75 | if (!mSPenHAL.isCharging())
76 | mSPenHAL.setCharging(true);
77 |
78 | if (mGatt == null || bluetoothManager.getConnectionState(mSpen, BluetoothProfile.GATT_SERVER)
79 | == BluetoothProfile.STATE_DISCONNECTED)
80 | mGatt = mSpen.connectGatt(mContext, false, new SPenGattCallback(this, mContext), BluetoothDevice.TRANSPORT_LE);
81 | }
82 |
83 | public void onConnected() {
84 | try {
85 | mSPenHAL.setMACAddress(mCurBleSpenAddr);
86 | } catch (RemoteException ex) {
87 | ex.printStackTrace();
88 | }
89 | }
90 |
91 | public void disconnect() throws RemoteException {
92 | if (mGatt != null) {
93 | mGatt.disconnect();
94 | mGatt.close();
95 | }
96 | if (mSpen != null) mSpen.disconnect();
97 |
98 | mSPenHAL.setCharging(false);
99 | }
100 |
101 | @Override
102 | public void onReceive(Context context, Intent intent) {
103 | BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
104 |
105 | if (mSpen != null && mSpen.getAddress().equals(device.getAddress())) {
106 | device.setPairingConfirmation(true);
107 | abortBroadcast(); // Prevent Settings from receiving the broadcast message
108 | }
109 | }
110 |
111 | }
112 |
--------------------------------------------------------------------------------
/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | android.hardware.audio
5 | hwbinder
6 | 7.1
7 |
8 | IDevicesFactory
9 | default
10 |
11 |
12 |
13 | android.hardware.audio.effect
14 | hwbinder
15 | 7.0
16 |
17 | IEffectsFactory
18 | default
19 |
20 |
21 |
22 | android.hardware.bluetooth
23 | hwbinder
24 | 1.0
25 |
26 | IBluetoothHci
27 | default
28 |
29 |
30 |
31 | android.hardware.gatekeeper
32 | hwbinder
33 | 1.0
34 |
35 | IGatekeeper
36 | default
37 |
38 |
39 |
40 | android.hardware.gnss
41 | hwbinder
42 | 2.0
43 | 1.1
44 |
45 | IGnss
46 | default
47 |
48 |
49 |
50 | android.hardware.graphics.allocator
51 | hwbinder
52 | 2.0
53 |
54 | IAllocator
55 | default
56 |
57 |
58 |
59 | android.hardware.graphics.composer
60 | hwbinder
61 | 2.4
62 |
63 | IComposer
64 | default
65 |
66 |
67 |
68 | android.hardware.graphics.mapper
69 | passthrough
70 | 2.1
71 |
72 | IMapper
73 | default
74 |
75 |
76 |
77 | android.hardware.keymaster
78 | hwbinder
79 | 4.0
80 |
81 | IKeymasterDevice
82 | default
83 |
84 |
85 |
86 | android.hardware.media.omx
87 | hwbinder
88 | 1.0
89 |
90 | IOmx
91 | default
92 |
93 |
94 | IOmxStore
95 | default
96 |
97 |
98 |
99 | vendor.samsung.hardware.gnss
100 | hwbinder
101 | 2.0
102 |
103 | ISehGnss
104 | default
105 |
106 |
107 |
108 | vendor.lineage.touch
109 | 1
110 |
111 | IGloveMode
112 | default
113 |
114 |
115 | IHighTouchPollingRate
116 | default
117 |
118 |
119 | ITouchscreenGesture
120 | default
121 |
122 |
123 |
124 | vendor.lineage.livedisplay
125 | 1
126 |
127 | IDisplayColorCalibration
128 | default
129 |
130 |
131 | IDisplayModes
132 | default
133 |
134 |
135 | IReadingEnhancement
136 | default
137 |
138 |
139 | ISunlightEnhancement
140 | default
141 |
142 |
143 |
144 |
--------------------------------------------------------------------------------
/audio/proxy/audio_mixer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef __EXYNOS_AUDIOPROXY_MIXER_H__
18 | #define __EXYNOS_AUDIOPROXY_MIXER_H__
19 |
20 | #include
21 |
22 | /* Mixer Card Definition */
23 | #define MIXER_CARD0 0
24 |
25 |
26 | #define MAX_PATH_NAME_LEN 50
27 | #define MAX_GAIN_PATH_NAME_LEN 55 //"gain-" + path_name size
28 |
29 | /* Mixer Controls for ERAP Handling */
30 | #define MAX_MIXER_NAME_LEN 50
31 |
32 | // Mixer Control for BT A2DP
33 | #define ABOX_A2DP_OFFLOAD_SET_PARAMS_NAME "ABOX ERAP info A2DP PARAM"
34 | #define ABOX_A2DP_OFFLOAD_SET_PARAMS_COUNT 7
35 |
36 | /* modified by samsung convgergence */
37 | // Mixer control for BT A2DP offload Suspend (MCD Specific)
38 | #define MIXER_CTL_ABOX_A2DP_SUSPEND_PARAMS "ABOX A2DP SUSPEND PARAM"
39 | #define MIXER_CTL_ABOX_A2DP_SUSPEND_PARAMS_CNT 1
40 |
41 | // Mixer Control for set USB Mode
42 | #define ABOX_USBMODE_CONTROL_NAME "ABOX ERAP info USB On"
43 |
44 | // Mixer Control for set MUTE Control
45 | #define ABOX_MUTE_CONTROL_NAME "ABOX ERAP info Mute Primary"
46 | #define ABOX_MUTE_CNT_FOR_PATH_CHANGE 15
47 |
48 | // Mixer Control for set A-Box Early WakeUp Control
49 | #define ABOX_TICKLE_CONTROL_NAME "ABOX Tickle"
50 | #define ABOX_TICKLE_ON 1
51 |
52 | /**
53 | ** Sampling Rate, channels & format Modifier Configuration for USB playback
54 | **/
55 | #define ABOX_SAMPLE_RATE_MIXER_NAME "ABOX SIFS0 Rate"
56 | #define ABOX_CHANNELS_MIXER_NAME "ABOX SIFS0 Channel"
57 | #define ABOX_BIT_WIDTH_MIXER_NAME "ABOX SIFS0 Width"
58 |
59 | typedef enum {
60 | USBMODE = 0,
61 | MUTE_CONTROL,
62 | TICKLE_CONTROL,
63 | } erap_trigger;
64 |
65 |
66 | // Mixer Control for set Android Audio Mode
67 | #define ABOX_AUDIOMODE_CONTROL_NAME "ABOX Audio Mode"
68 |
69 | #define SPK_AMPL_POWER_NAME "ABOX Spk AmpL Power"
70 |
71 | // Compress Offload Volume
72 | #define OFFLOAD_VOLUME_CONTROL_NAME "ABOX ComprTx0 Volume"
73 | #define COMPRESS_PLAYBACK_VOLUME_MAX 8192
74 |
75 | // Compress Offload Upscaling
76 | #define OFFLOAD_UPSCALE_CONTROL_NAME "ABOX ComprTx0 Format"
77 |
78 | typedef enum {
79 | UPSCALE_NONE = 0,
80 | UPSCALE_48K_16B,
81 | UPSCALE_48K_24B,
82 | UPSCALE_192K_24B,
83 | UPSCALE_384K_24B,
84 | } upscale_factor;
85 |
86 | // Mixer control for UAIF configuration
87 | #define MIXER_CTL_ABOX_UAIF0_SWITCH "ABOX UAIF0 Switch"
88 | #define MIXER_CTL_ABOX_UAIF0_SAMPLERATE "ABOX UAIF0 Rate"
89 | #define MIXER_CTL_ABOX_UAIF0_WIDTH "ABOX UAIF0 Width"
90 | #define MIXER_CTL_ABOX_UAIF0_CHANNEL "ABOX UAIF0 Channel"
91 | #define MIXER_CTL_ABOX_UAIF1_SWITCH "ABOX UAIF1 Switch"
92 | #define MIXER_CTL_ABOX_UAIF1_SAMPLERATE "ABOX UAIF1 Rate"
93 | #define MIXER_CTL_ABOX_UAIF1_WIDTH "ABOX UAIF1 Width"
94 | #define MIXER_CTL_ABOX_UAIF1_CHANNEL "ABOX UAIF1 Channel"
95 | #define MIXER_CTL_ABOX_UAIF2_SWITCH "ABOX UAIF2 Switch"
96 | #define MIXER_CTL_ABOX_UAIF2_SAMPLERATE "ABOX UAIF2 Rate"
97 | #define MIXER_CTL_ABOX_UAIF2_WIDTH "ABOX UAIF2 Width"
98 | #define MIXER_CTL_ABOX_UAIF2_CHANNEL "ABOX UAIF2 Channel"
99 | #define MIXER_CTL_ABOX_UAIF3_SWITCH "ABOX UAIF3 Switch"
100 | #define MIXER_CTL_ABOX_UAIF3_SAMPLERATE "ABOX UAIF3 Rate"
101 | #define MIXER_CTL_ABOX_UAIF3_WIDTH "ABOX UAIF3 Width"
102 | #define MIXER_CTL_ABOX_UAIF3_CHANNEL "ABOX UAIF3 Channel"
103 |
104 | // Mixer control for SIFS configuration
105 | #define MIXER_CTL_ABOX_SIFS0_SWITCH "ABOX SIFS0 OUT Switch"
106 | #define MIXER_CTL_ABOX_SIFS0_SAMPLERATE "ABOX SIFS0 Rate"
107 | #define MIXER_CTL_ABOX_SIFS0_WIDTH "ABOX SIFS0 Width"
108 | #define MIXER_CTL_ABOX_SIFS0_CHANNEL "ABOX SIFS0 Channel"
109 |
110 | #define MIXER_ON 1
111 | #define MIXER_OFF 0
112 |
113 | // USB Clock Source inforamtion mixer control
114 | #define MIXER_CTL_ABOX_USB_CLOCKSOURCE "ABOX PCM ext USB SCDS"
115 |
116 | // Capture VirtualPCM DAI input source mixer control
117 | #define MIXER_CTL_ABOX_CATPURE_VPCMDAI_INSRC "ABOX VPCMIN_DAI0_A"
118 |
119 | // MMAP Playback Volume
120 | #define MIXER_CTL_ABOX_MMAP_OUT_VOLUME_CONTROL "ABOX RDMA VOL FACTOR2"
121 | #define MMAP_PLAYBACK_VOLUME_MAX 0xFFFFFF // Decimal value : 16777215
122 |
123 | // Mixer control for BT A2DP offload (MCD Specific)
124 | #define MIXER_CTL_ABOX_A2DP_DYN_PARAMS "ABOX A2DP A2DP DYN PARAM"
125 | #define MIXER_CTL_ABOX_A2DP_DYN_PARAMS_CNT 2
126 |
127 | #endif // __EXYNOS_AUDIOPROXY_MIXER_H__
128 |
--------------------------------------------------------------------------------
/sepolicy/vendor/file_contexts:
--------------------------------------------------------------------------------
1 | ## Data Files
2 | /data/vendor/mediadrm(/.*)? u:object_r:mediadrm_vendor_data_file:s0
3 | /data/vendor/nfc(/.*)? u:object_r:nfc_vendor_data_file:s0
4 |
5 | ## Devices
6 | /dev/block/platform/.+/by-name/dtb u:object_r:dtb_block_device:s0
7 | /dev/block/platform/.+/by-name/radio2 u:object_r:radio_block_device:s0
8 | /dev/block/platform/13d60000.ufs/by-name/omr u:object_r:metadata_block_device:s0
9 | /dev/block/platform/13d60000.ufs/by-name/system u:object_r:super_block_device:s0
10 |
11 | # Camera
12 | /dev/jsqz u:object_r:jsqz_device:s0
13 | /dev/m2m1shot_scaler0 u:object_r:m2m1shot_device:s0
14 |
15 | # Fingerprint
16 | /dev/qbt2000_fd u:object_r:fp_sensor_device:s0
17 | /dev/qbt2000_ipc u:object_r:fp_sensor_device:s0
18 |
19 | # Graphics
20 | /dev/mali[0-9] u:object_r:gpu_device:s0
21 | /dev/g2d u:object_r:graphics_device:s0
22 |
23 | # RIL
24 | /dev/modem_boot_spi u:object_r:vendor_radio_device:s0
25 | /dev/nr_boot0 u:object_r:vendor_radio_device:s0
26 | /dev/nr_dm0 u:object_r:vendor_radio_device:s0
27 | /dev/nr_ipc[0-1] u:object_r:vendor_radio_device:s0
28 | /dev/nr_ramdump0 u:object_r:vendor_radio_device:s0
29 | /dev/nr_rfs0 u:object_r:vendor_radio_device:s0
30 | /dev/nr_router u:object_r:vendor_radio_device:s0
31 |
32 | # Secmem
33 | /dev/s5p-smem u:object_r:secmem_device:s0
34 |
35 | # Sensors
36 | /dev/max_hrm u:object_r:sensors_device:s0
37 |
38 | # Soundtrigger
39 | /dev/vts_fio_dev u:object_r:vts_fio_device:s0
40 |
41 | # ZRAM
42 | /dev/block/zram0 u:object_r:swap_block_device:s0
43 |
44 | ## EFS
45 | /efs/FactoryApp(/.*)? u:object_r:app_efs_file:s0
46 | /efs/TEE(/.*)? u:object_r:prov_efs_file:s0
47 | /efs/biometrics(/.*)? u:object_r:sec_efs_file:s0
48 | /efs/cpdebug(/.*)? u:object_r:cpdebug_efs_file:s0
49 | /efs/cirrus(/.*)? u:object_r:sec_efs_file:s0
50 | /efs/lpm(/.*)? u:object_r:sec_efs_file:s0
51 | /efs/recovery(/.*)? u:object_r:sec_efs_file:s0
52 | /efs/sec_efs(/.*)? u:object_r:sec_efs_file:s0
53 | /efs/ssm(/.*)? u:object_r:ssm_efs_file:s0
54 | /efs/usb_hw_param(/.*)? u:object_r:sec_efs_file:s0
55 | /efs/wv.keys u:object_r:sec_efs_file:s0
56 |
57 | /mnt/vendor/efs/spen(/.*)? u:object_r:spen_efs_file:s0
58 |
59 | ## Sysfs
60 | # Block
61 | /sys/devices/platform/(.*)/block/sda/queue/discard_max_bytes u:object_r:sysfs_block_writable:s0
62 | /sys/devices/platform/(.*)/block/sda/queue/read_ahead_kb u:object_r:sysfs_block_writable:s0
63 | /sys/devices/platform/(.*)/block/mmcblk0/mmcblk0p[0-9]+/start u:object_r:sysfs_block:s0
64 |
65 | # Camera
66 | /sys/devices/virtual/camera/flash/rear_flash u:object_r:sysfs_camera_writable:s0
67 | /sys/devices/virtual/camera/rear/fw_update u:object_r:sysfs_camera_writable:s0
68 | /sys/devices/virtual/camera/rear/ssrm_camera_info u:object_r:sysfs_camera_writable:s0
69 | /sys/devices/virtual/camera(/.*) u:object_r:sysfs_camera:s0
70 |
71 | # Extcon
72 | /sys/devices/platform/(.*)/extcon/extcon[0-9]/cable.[0-9]/name u:object_r:sysfs_extcon:s0
73 | /sys/devices/platform/(.*)/extcon/extcon[0-9]/state u:object_r:sysfs_extcon:s0
74 |
75 | # S Pen
76 | /sys/devices/virtual/sec/sec_epen(/.*)? u:object_r:sysfs_spen:s0
77 |
78 | # Sensors
79 | /sys/devices/platform/10970000.spi/spi_master/spi17/spi17.0(/.*) u:object_r:sysfs_iio:s0
80 | /sys/devices/platform/10970000.spi/spi_master/spi17/spi17.0(/.*)/poll_delay u:object_r:sysfs_sensors_writable:s0
81 | /sys/devices/platform/10970000.spi/spi_master/spi17/spi17.0(/.*)/buffer/enable u:object_r:sysfs_sensors_writable:s0
82 | /sys/devices/platform/10970000.spi/spi_master/spi17/spi17.0(/.*)/buffer/length u:object_r:sysfs_sensors_writable:s0
83 | /sys/devices/platform/15c40000.adc(/.*) u:object_r:sysfs_iio:s0
84 | /sys/devices/virtual/input/input[0-9]/enable u:object_r:sysfs_input_writable:s0
85 | /sys/devices/virtual/input/input[0-9]/poll_delay u:object_r:sysfs_input_writable:s0
86 | /sys/devices/virtual/sec/hall_ic(/.*) u:object_r:sysfs_sec_key:s0
87 |
88 | # Wakeup
89 | /sys/devices/platform/(.*)/wakeup[0-9]*(/.*)? u:object_r:sysfs_wakeup:s0
90 |
91 | ## Vendor
92 | /(vendor|system/vendor)/bin/hw/gps.sh u:object_r:gpsd_exec:s0
93 |
94 | /(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.spen-service\.davinci u:object_r:hal_samsung_spen_default_exec:s0
95 |
--------------------------------------------------------------------------------
/audio/proxy/audio_streamconfig.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef __EXYNOS_AUDIOPROXY_STREAMCONFIG_H__
18 | #define __EXYNOS_AUDIOPROXY_STREAMCONFIG_H__
19 |
20 |
21 | /*
22 | * This header file defines Supported Configurations for each Audio Streams.
23 | * These configurations can be different as projects and boards,
24 | * so engineers should modify this file based on audio_policy_configuration.xml.
25 | */
26 |
27 | // Supported Audio Format Tables
28 | char * stream_format_table[ASTREAM_CNT] = {
29 | [ASTREAM_PLAYBACK_NO_ATTRIBUTE] = "AUDIO_FORMAT_PCM_16_BIT",
30 | [ASTREAM_PLAYBACK_PRIMARY] = "AUDIO_FORMAT_PCM_16_BIT",
31 | [ASTREAM_PLAYBACK_FAST] = "AUDIO_FORMAT_PCM_16_BIT",
32 | [ASTREAM_PLAYBACK_DEEP_BUFFER] = "AUDIO_FORMAT_PCM_8_24_BIT",
33 | [ASTREAM_PLAYBACK_LOW_LATENCY] = "AUDIO_FORMAT_PCM_16_BIT",
34 | [ASTREAM_PLAYBACK_COMPR_OFFLOAD] = "AUDIO_FORMAT_MP3",
35 | [ASTREAM_PLAYBACK_MMAP] = "AUDIO_FORMAT_PCM_16_BIT",
36 | [ASTREAM_PLAYBACK_AUX_DIGITAL] = "AUDIO_FORMAT_PCM_16_BIT",
37 | [ASTREAM_PLAYBACK_INCALL_MUSIC] = "AUDIO_FORMAT_PCM_16_BIT",
38 | [ASTREAM_PLAYBACK_DIRECT] = "AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT",
39 |
40 | [ASTREAM_CAPTURE_NO_ATTRIBUTE] = "AUDIO_FORMAT_PCM_16_BIT",
41 | [ASTREAM_CAPTURE_PRIMARY] = "AUDIO_FORMAT_PCM_16_BIT",
42 | [ASTREAM_CAPTURE_CALL] = "AUDIO_FORMAT_PCM_16_BIT",
43 | [ASTREAM_CAPTURE_LOW_LATENCY] = "AUDIO_FORMAT_PCM_16_BIT",
44 | [ASTREAM_CAPTURE_MMAP] = "AUDIO_FORMAT_PCM_16_BIT",
45 | [ASTREAM_CAPTURE_FM_TUNER] = "AUDIO_FORMAT_PCM_16_BIT",
46 | [ASTREAM_CAPTURE_FM_RECORDING] = "AUDIO_FORMAT_PCM_16_BIT",
47 | #ifdef SUPPORT_STHAL_INTERFACE
48 | [ASTREAM_CAPTURE_HOTWORD] = "AUDIO_FORMAT_PCM_16_BIT",
49 | #endif
50 |
51 | [ASTREAM_NONE] = "AUDIO_FORMAT_INVALID"
52 | };
53 |
54 | // Supported Audio Channel Mask Tables
55 | char * stream_channel_table[ASTREAM_CNT] = {
56 | [ASTREAM_PLAYBACK_NO_ATTRIBUTE] = "AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO",
57 | [ASTREAM_PLAYBACK_PRIMARY] = "AUDIO_CHANNEL_OUT_STEREO",
58 | [ASTREAM_PLAYBACK_FAST] = "AUDIO_CHANNEL_OUT_STEREO",
59 | [ASTREAM_PLAYBACK_DEEP_BUFFER] = "AUDIO_CHANNEL_OUT_STEREO",
60 | [ASTREAM_PLAYBACK_LOW_LATENCY] = "AUDIO_CHANNEL_OUT_STEREO",
61 | [ASTREAM_PLAYBACK_COMPR_OFFLOAD] = "AUDIO_CHANNEL_OUT_STEREO",
62 | [ASTREAM_PLAYBACK_MMAP] = "AUDIO_CHANNEL_OUT_STEREO",
63 | [ASTREAM_PLAYBACK_AUX_DIGITAL] = "AUDIO_CHANNEL_OUT_STEREO",
64 | [ASTREAM_PLAYBACK_INCALL_MUSIC] = "AUDIO_CHANNEL_OUT_STEREO",
65 | [ASTREAM_PLAYBACK_DIRECT] = "AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1",
66 |
67 | [ASTREAM_CAPTURE_NO_ATTRIBUTE] = "AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO",
68 | [ASTREAM_CAPTURE_PRIMARY] = "AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO",
69 | [ASTREAM_CAPTURE_CALL] = "AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO",
70 | [ASTREAM_CAPTURE_LOW_LATENCY] = "AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO",
71 | [ASTREAM_CAPTURE_MMAP] = "AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO",
72 | [ASTREAM_CAPTURE_FM_TUNER] = "AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO",
73 | [ASTREAM_CAPTURE_FM_RECORDING] = "AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO",
74 | #ifdef SUPPORT_STHAL_INTERFACE
75 | [ASTREAM_CAPTURE_HOTWORD] = "AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO",
76 | #endif
77 |
78 | [ASTREAM_NONE] = "AUDIO_CHANNEL_INVALID"
79 | };
80 |
81 | // Supported Audio Sampling Rate Tables
82 | char * stream_rate_table[ASTREAM_CNT] = {
83 | [ASTREAM_PLAYBACK_NO_ATTRIBUTE] = "48000",
84 | [ASTREAM_PLAYBACK_PRIMARY] = "48000",
85 | [ASTREAM_PLAYBACK_FAST] = "48000",
86 | [ASTREAM_PLAYBACK_DEEP_BUFFER] = "48000",
87 | [ASTREAM_PLAYBACK_LOW_LATENCY] = "48000",
88 | [ASTREAM_PLAYBACK_COMPR_OFFLOAD] = "48000",
89 | [ASTREAM_PLAYBACK_MMAP] = "48000",
90 | [ASTREAM_PLAYBACK_AUX_DIGITAL] = "48000",
91 | [ASTREAM_PLAYBACK_INCALL_MUSIC] = "48000",
92 | [ASTREAM_PLAYBACK_DIRECT] = "8000|16000|32000|44100|48000|96000|192000|384000",
93 |
94 | [ASTREAM_CAPTURE_NO_ATTRIBUTE] = "8000|16000|32000|48000",
95 | [ASTREAM_CAPTURE_PRIMARY] = "8000|16000|32000|48000",
96 | [ASTREAM_CAPTURE_CALL] = "8000|16000|32000|48000",
97 | [ASTREAM_CAPTURE_LOW_LATENCY] = "48000",
98 | [ASTREAM_CAPTURE_MMAP] = "48000",
99 | [ASTREAM_CAPTURE_FM_TUNER] = "8000|16000|32000|48000",
100 | [ASTREAM_CAPTURE_FM_RECORDING] = "8000|16000|32000|48000",
101 | #ifdef SUPPORT_STHAL_INTERFACE
102 | [ASTREAM_CAPTURE_HOTWORD] = "8000|16000|32000|48000",
103 | #endif
104 |
105 | [ASTREAM_NONE] = "0"
106 | };
107 |
108 | #endif // __EXYNOS_AUDIOPROXY_STREAMCONFIG_H__
109 |
--------------------------------------------------------------------------------
/releasetools/releasetools.py:
--------------------------------------------------------------------------------
1 | #!/bin/env python3
2 | #
3 | # Copyright (C) 2021-2023 The LineageOS Project
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | import common
18 | import re
19 |
20 | def FullOTA_InstallBegin(info):
21 | if info.info_dict.get("vendor.build.prop").GetProp("ro.board.platform") != "universal9825_r":
22 | AddImage(info, "super_empty.img", "/tmp/super_empty.img", False);
23 | info.script.AppendExtra('exynos9820.retrofit_dynamic_partitions();')
24 | return
25 |
26 | def FullOTA_InstallEnd(info):
27 | OTA_InstallEnd(info)
28 | return
29 |
30 | def IncrementalOTA_InstallEnd(info):
31 | info.input_zip = info.target_zip
32 | OTA_InstallEnd(info)
33 | return
34 |
35 | def AddImage(info, basename, dest, printInfo=True):
36 | data = info.input_zip.read("IMAGES/" + basename)
37 | common.ZipWriteStr(info.output_zip, basename, data)
38 | if printInfo:
39 | info.script.Print("Patching {} image unconditionally...".format(dest.split('/')[-1]))
40 | info.script.AppendExtra('package_extract_file("%s", "%s");' % (basename, dest))
41 |
42 | def AddFirmwareImage(info, model, basename, dest, simple=False, offset=8):
43 | if ("RADIO/%s_%s" % (basename, model)) in info.input_zip.namelist():
44 | data = info.input_zip.read("RADIO/%s_%s" % (basename, model))
45 | common.ZipWriteStr(info.output_zip, "firmware/%s/%s" % (model, basename), data);
46 | info.script.Print("Patching {} image unconditionally...".format(basename.split('.')[0]));
47 | if simple:
48 | info.script.AppendExtra('package_extract_file("firmware/%s/%s", "%s");' % (model, basename, dest))
49 | else:
50 | uses_single_bota = dest == "/dev/block/by-name/bota"
51 | size = info.input_zip.getinfo("RADIO/%s_%s" % (basename, model)).file_size
52 | if not uses_single_bota:
53 | info.script.AppendExtra('assert(exynos9820.mark_header_bt("%s", 0, 0, 0));' % dest);
54 | info.script.AppendExtra('assert(exynos9820.write_data_bt("firmware/%s/%s", "%s", %d, %d));' % (model, basename, dest, offset, size))
55 | if not uses_single_bota:
56 | info.script.AppendExtra('assert(exynos9820.mark_header_bt("%s", 0, 0, 3142939818));' % dest)
57 | return size
58 | return 0
59 |
60 | def OTA_InstallEnd(info):
61 | if "IMAGES/dtb.img" in info.input_zip.namelist():
62 | AddImage(info, "dtb.img", "/dev/block/by-name/dtb")
63 | AddImage(info, "dtbo.img", "/dev/block/by-name/dtbo")
64 | AddImage(info, "vbmeta.img", "/dev/block/by-name/vbmeta")
65 |
66 | if "RADIO/models" in info.input_zip.namelist():
67 | modelsIncluded = []
68 | for model in info.input_zip.read("RADIO/models").decode('utf-8').splitlines():
69 | if "RADIO/version_%s" % model in info.input_zip.namelist():
70 | modelsIncluded.append(model)
71 | version = info.input_zip.read("RADIO/version_%s" % model).decode('utf-8').splitlines()[0]
72 | info.script.AppendExtra('# Firmware update to %s for %s' % (version, model))
73 | info.script.AppendExtra('ifelse (getprop("ro.boot.em.model") == "%s" &&' % model)
74 | info.script.AppendExtra('exynos9820.verify_no_downgrade("%s") == "0" &&' % version)
75 | info.script.AppendExtra('getprop("ro.boot.bootloader") != "%s",' % version)
76 | if info.info_dict.get("vendor.build.prop").GetProp("ro.board.platform") != "universal9825_r":
77 | AddFirmwareImage(info, model, "sboot.bin", "/dev/block/by-name/bota0")
78 | AddFirmwareImage(info, model, "cm.bin", "/dev/block/by-name/bota1")
79 | AddFirmwareImage(info, model, "up_param.bin", "/dev/block/by-name/bota2")
80 | AddFirmwareImage(info, model, "keystorage.bin", "/dev/block/by-name/keystorage", True)
81 | AddFirmwareImage(info, model, "uh.bin", "/dev/block/by-name/uh", True)
82 | else:
83 | offset = 8
84 | numImages = 0
85 | info.script.AppendExtra('assert(exynos9820.mark_header_bt("/dev/block/by-name/bota", 0, 0, 0));')
86 | for image in 'cm.bin', 'keystorage.bin', 'sboot.bin', 'uh.bin', 'up_param.bin':
87 | size = AddFirmwareImage(info, model, image, "/dev/block/by-name/bota", False, offset)
88 | if size > 0:
89 | numImages += 1
90 | offset += size + 36 # header size
91 | info.script.AppendExtra('assert(exynos9820.mark_header_bt("/dev/block/by-name/bota", 0, %d, 3142939818));' % numImages)
92 | AddFirmwareImage(info, model, "modem.bin", "/dev/block/by-name/radio", True)
93 | AddFirmwareImage(info, model, "modem_5g.bin", "/dev/block/by-name/radio2", True)
94 | AddFirmwareImage(info, model, "modem_debug.bin", "/dev/block/by-name/cp_debug", True)
95 | AddFirmwareImage(info, model, "modem_debug_5g.bin", "/dev/block/by-name/cp2_debug", True)
96 | AddFirmwareImage(info, model, "dqmdbg.img", "/dev/block/by-name/dqmdbg", True)
97 | AddFirmwareImage(info, model, "param.bin", "/dev/block/by-name/param", True)
98 | info.script.AppendExtra(',"");')
99 |
100 | modelCheck = ""
101 | for model in modelsIncluded:
102 | if len(modelCheck) > 0:
103 | modelCheck += ' || '
104 | modelCheck += 'getprop("ro.boot.em.model") == "%s"' % model
105 | if len(modelCheck) > 0:
106 | info.script.AppendExtra('%s || abort("Unsupported model, not updating firmware!");' % modelCheck)
107 | return
108 |
--------------------------------------------------------------------------------
/configs/nfc/libnfc-sec-vendor.conf:
--------------------------------------------------------------------------------
1 | ## --------------- Part-I : Configuration for Phone HW ----------------------------##
2 | ####################################################################################
3 | # I-1) Clock Source Information (AP direct 26MHz)
4 | ####################################################################################
5 | ## Clock option for 26MHz PLL (0x12)
6 | ## Clock option for 19.2MHz PLL (0x11)
7 | FW_CFG_CLK_SPEED=0x12
8 | ####################################################################################
9 |
10 |
11 | ## --------------- Part-II : Configuration for Chip / FW -------------------------##
12 | ####################################################################################
13 | # II-1) FW base address :
14 | ####################################################################################
15 | ## FW Base Address for SEN82 (0x2000)
16 | FW_BASE_ADDRESS=0x2000
17 | ####################################################################################
18 | # II-2) Timing parameter
19 | ####################################################################################
20 | # WAKEUP_DELAY for eSE Model
21 | # (Old F/W) 20ms : UICC, 80ms : eSE
22 | # (After Star Model) 20ms : UICC, 20ms : eSE
23 | #WAKEUP_DELAY=20
24 | ####################################################################################
25 | # II-3) Firmware path
26 | ####################################################################################
27 | ## F/W image for S3NRN82
28 | #FW_IMAGE="/vendor/firmware/nfc/sec_s3nrn82_firmware.bin"
29 |
30 | # for single SKU
31 | FW_DIR_PATH="/vendor/firmware/nfc/"
32 | FW_FILE_NAME="sec_s3nrn82_firmware.bin"
33 |
34 | ####################################################################################
35 | # II-4) RF Register path
36 | ####################################################################################
37 | ## RF Register for S3NRN82
38 | #RFREG_FILE="/vendor/etc/nfc/sec_s3nrn82_rfreg.bin"
39 |
40 | RF_DIR_PATH="/vendor/etc/nfc/"
41 | RF_FILE_NAME="sec_s3nrn82_rfreg.bin"
42 | ## --------------- Part-III : Configuration for MW --------------------------------##
43 | ####################################################################################
44 | # III-1) Driver path
45 | ####################################################################################
46 | ## Power driver
47 | POWER_DRIVER="/dev/sec-nfc"
48 | ## Transport driver
49 | TRANS_DRIVER="/dev/sec-nfc"
50 |
51 |
52 | ####################################################################################
53 | # III-2) Trace Level
54 | ####################################################################################
55 | ## TRACE_LEVEL (0: only err, 1: and debug, 2: trace also)
56 | ## DATA TRACE level (0: not display, 1: simply, 2: all of data trace)
57 | TRACE_LEVEL=2
58 | DATA_TRACE=2
59 |
60 | ####################################################################################
61 | # III-3) NFC Sleep Timing
62 | ####################################################################################
63 | # Set wait time to enter CLF sleep mode
64 | SLEEP_TIMEOUT=1000
65 |
66 |
67 | ####################################################################################
68 | # III-4) F/W Update Option
69 | # F/W Update Option
70 | # 0 : Download for different version
71 | # 1 : Download for upper version
72 | # 2 : Force Download
73 | ####################################################################################
74 | # 0 : Default value is "Download for different version"
75 | FW_UPDATE_MODE=0
76 | ####################################################################################
77 |
78 |
79 |
80 |
81 | ###############################################################################
82 | # Configure the default NfcA/IsoDep techology and protocol route. Can be
83 | # either a secure element (e.g. 0x02) or the host (0x00)
84 | DEFAULT_ROUTE=0x03
85 | ###############################################################################
86 | # Configure the single default SE to use. The default is to use the first
87 | # SE that is detected by the stack. This value might be used when the phone
88 | # supports multiple SE but you want to force it to use one of them
89 | DEFAULT_OFFHOST_ROUTE=0x02
90 |
91 | ###############################################################################
92 | # Choose the presence-check algorithm for type-4 tag. If not defined, the default value is 1.
93 | # PRESENCE_CHECK_ALGORITHM=0 : [default] Automatic select for below 4 method.
94 | # PRESENCE_CHECK_ALGORITHM=1 : Read Empty I block.
95 | # PRESENCE_CHECK_ALGORITHM=2 : Sleep/Wakeup Command
96 | # PRESENCE_CHECK_ALGORITHM=3 : Read binary for CH0(K version method)
97 | # PRESENCE_CHECK_ALGORITHM=4 : Read binary for CH3
98 | # PRESENCE_CHECK_ALGORITHM=5 : ACK/NACK
99 | # Default : No use (AUTO)
100 | # For China Region : Use Method 3
101 | ###############################################################################
102 | PRESENCE_CHECK_ALGORITHM=5
103 |
104 | ###############################################################################
105 | # Vendor Specific Proprietary Protocol & Discovery Configuration
106 | # Set to 0xFF if unsupported
107 | # byte[0] NCI_PROTOCOL_18092_ACTIVE
108 | # byte[1] NCI_PROTOCOL_B_PRIME
109 | # byte[2] NCI_PROTOCOL_DUAL
110 | # byte[3] NCI_PROTOCOL_15693
111 | # byte[4] NCI_PROTOCOL_KOVIO
112 | # byte[5] NCI_PROTOCOL_MIFARE
113 | # byte[6] NCI_DISCOVERY_TYPE_POLL_KOVIO
114 | # byte[7] NCI_DISCOVERY_TYPE_POLL_B_PRIME
115 | # byte[8] NCI_DISCOVERY_TYPE_LISTEN_B_PRIME
116 | NFA_PROPRIETARY_CFG={00, 81, 82, 80, 8A, 81, 70, 74, F4}
117 | ###############################################################################
118 | # Extended APDU length for ISO_DEP. If not supported default length is 261
119 | # CHECK in VTS Test case
120 | # ISO_DEP_MAX_TRANSCEIVE=0xFEFF
121 | ISO_DEP_MAX_TRANSCEIVE=0xFEFF
122 |
123 | ############### end of config ##############################
124 |
--------------------------------------------------------------------------------