Skip to content

Commit

Permalink
garnet: Add Viper, BCR and Shorekeeper (KSU)
Browse files Browse the repository at this point in the history
  • Loading branch information
royweisfeld committed Jan 22, 2025
1 parent f2e8e00 commit 6b54e3c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
14 changes: 7 additions & 7 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,18 @@ BOARD_BOOTCONFIG := \
androidboot.usbcontroller=a600000.dwc3

# Kernel (prebuilt)
PREBUILT_PATH := device/xiaomi/garnet-prebuilt
BOARD_PREBUILT_DTBIMAGE_DIR := $(PREBUILT_PATH)/images/dtbs/
BOARD_PREBUILT_DTBOIMAGE := $(PREBUILT_PATH)/images/dtbo.img
KERNEL_PATH := device/xiaomi/garnet-kernel
BOARD_PREBUILT_DTBIMAGE_DIR := $(KERNEL_PATH)/images/dtbs/
BOARD_PREBUILT_DTBOIMAGE := $(KERNEL_PATH)/images/dtbo.img

TARGET_NO_KERNEL_OVERRIDE := true
TARGET_KERNEL_SOURCE := $(PREBUILT_PATH)/kernel-headers
TARGET_KERNEL_SOURCE := $(KERNEL_PATH)/kernel-headers
PRODUCT_COPY_FILES += \
$(PREBUILT_PATH)/images/kernel:kernel
$(KERNEL_PATH)/images/shorekeeper/v2/kernel-su:kernel

# Kernel modules
DLKM_MODULES_PATH := $(PREBUILT_PATH)/modules/dlkm
RAMDISK_MODULES_PATH := $(PREBUILT_PATH)/modules/ramdisk
DLKM_MODULES_PATH := $(KERNEL_PATH)/modules/dlkm
RAMDISK_MODULES_PATH := $(KERNEL_PATH)/modules/ramdisk

BOARD_VENDOR_KERNEL_MODULES := $(wildcard $(DLKM_MODULES_PATH)/*.ko)
BOARD_VENDOR_KERNEL_MODULES_LOAD := $(patsubst %,$(DLKM_MODULES_PATH)/%,$(shell cat $(DLKM_MODULES_PATH)/modules.load))
Expand Down
6 changes: 4 additions & 2 deletions configs/audio/audio_effects.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
<library name="audio_pre_processing" path="libqcomvoiceprocessing.so"/>
<library name="volume_listener" path="libvolumelistener.so"/>
<library name="audiosphere" path="libasphere.so"/>
<library name="misoundfx" path="libmisoundfx.so"/>
<library name="misoundfx" path="libmisoundfx.so"/>
<library name="v4a_re" path="libv4a_re.so"/>
<!--DOLBY DAP-->
<library name="dap" path="libhwdap.so"/>
<!--DOLBY END-->
Expand Down Expand Up @@ -130,7 +131,8 @@
<effect name="voice_helper" library="volume_listener" uuid="0ace5c08-0590-11e5-ae9e-0025b32654a0"/>
<effect name="notification_helper" library="volume_listener" uuid="0b776dde-0590-11e5-81ba-0025b32654a0"/>
<effect name="audiosphere" library="audiosphere" uuid="184e62ab-2d19-4364-9d1b-c0a40733866c"/>
<effect name="misoundfx" library="misoundfx" uuid="5b8e36a5-144a-4c38-b1d7-0002a5d5c51b"/>
<effect name="misoundfx" library="misoundfx" uuid="5b8e36a5-144a-4c38-b1d7-0002a5d5c51b"/>
<effect name="v4a_standard_re" library="v4a_re" uuid="90380da3-8536-4744-a6a3-5731970e640f"/>
<!--DOLBY DAP-->
<effect name="dap" library="dap" uuid="9d4921da-8225-4f29-aefa-39537a04bcaa"/>
<!--DOLBY END-->
Expand Down
6 changes: 6 additions & 0 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -602,3 +602,9 @@ PRODUCT_BOOT_JARS += \

# Vendor
$(call inherit-product, vendor/xiaomi/garnet/garnet-vendor.mk)

# Inherit BCR
$(call inherit-product, vendor/bcr/bcr.mk)

# Viper
$(call inherit-product-if-exists, packages/apps/ViPER4AndroidFX/config.mk)
5 changes: 5 additions & 0 deletions sepolicy/vendor/audioserver.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
hal_client_domain(audioserver, hal_dms)
get_prop(audioserver, vendor_audio_prop)

allow audioserver unlabeled:file { read write open getattr };
allow hal_audio_default hal_audio_default:process { execmem };

0 comments on commit 6b54e3c

Please sign in to comment.