Compare commits

...
Sign in to create a new pull request.

9 commits

15 changed files with 155 additions and 49 deletions

View file

@ -22,38 +22,4 @@ LOCAL_PATH := $(call my-dir)
ifeq ($(TARGET_DEVICE),mondrianlte)
include $(call all-subdir-makefiles,$(LOCAL_PATH))
include $(CLEAR_VARS)
ISDBT_IMAGES := \
isdbtmm.b00 isdbtmm.b01 isdbtmm.b02 isdbtmm.b03 isdbtmm.mdt
ISDBT_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/firmware/,$(notdir $(ISDBT_IMAGES)))
$(ISDBT_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "isdbt firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(ISDBT_SYMLINKS)
WCNSS_IMAGES := \
wcnss.b00 wcnss.b01 wcnss.b02 wcnss.b04 wcnss.b06 \
wcnss.b07 wcnss.b08 wcnss.b09 wcnss.mdt
WCNSS_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/firmware/,$(notdir $(WCNSS_IMAGES)))
$(WCNSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "wcnss firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(WCNSS_SYMLINKS)
# Create a link for the WCNSS config file, which ends up as a writable
# version in /data/misc/wifi
$(shell mkdir -p $(TARGET_OUT)/etc/firmware/wlan/prima; \
ln -sf /data/misc/wifi/WCNSS_qcom_cfg.ini \
$(TARGET_OUT)/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini)
endif

View file

@ -20,11 +20,14 @@ include device/samsung/mondrianwifi/BoardConfig.mk
DEVICE_MANIFEST_FILE += device/samsung/mondrianlte/manifest.xml
# Legacy BLOB Support
TARGET_PROCESS_SDK_VERSION_OVERRIDE += \
/system/vendor/bin/hw/rild=27
TARGET_LD_SHIM_LIBS += \
/system/vendor/lib/libril-qc-qmi-1.so|libshim_ril.so
# Properties
TARGET_SYSTEM_PROP += device/samsung/mondrianlte/system.prop
# SELinux
BOARD_VENDOR_SEPOLICY_DIRS += device/samsung/mondrianlte/sepolicy/vendor
# inherit from the proprietary version
include vendor/samsung/mondrianlte/BoardConfigVendor.mk

View file

@ -188,8 +188,8 @@
</module>
<!-- A2dp Audio HAL -->
<xi:include href="/vendor/etc/a2dp_audio_policy_configuration.xml"/>
<!-- Bluetooth Audio HAL -->
<xi:include href="/vendor/etc/bluetooth_audio_policy_configuration_7_0.xml"/>
<!-- Usb Audio HAL -->
<xi:include href="/vendor/etc/usb_audio_policy_configuration.xml"/>

View file

@ -19,7 +19,7 @@
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
$(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
$(LOCAL_PATH)/audio/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
$(LOCAL_PATH)/audio/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml
# Overlays
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
@ -29,6 +29,18 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.telephony.cdma.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.cdma.xml \
frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml
# Ramdisk
PRODUCT_PACKAGES += \
qmuxd.rc \
netmgrd.rc
# Radio
PRODUCT_PACKAGES += \
libsecnativefeature \
libcnefeatureconfig \
librmnetctl \
libshim_ril
# Get non-open-source specific aspects
$(call inherit-product, vendor/samsung/mondrianlte/mondrianlte-vendor.mk)

17
libshims/Android.mk Normal file
View file

@ -0,0 +1,17 @@
#
# Copyright (C) 2017 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include $(call first-makefiles-under,$(call my-dir))

View file

@ -0,0 +1,14 @@
//
// Copyright (C) 2022 The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//
cc_library_shared {
srcs: ["libshim_ril.c"],
shared_libs: [
"libaudioclient",
],
name: "libshim_ril",
compile_multilib: "32",
vendor: true,
}

View file

@ -0,0 +1,10 @@
//
// Copyright (C) 2022 The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//
void* _ZN7android11AudioSystem16addErrorCallbackEPFviE(void *cb);
void _ZN7android11AudioSystem16setErrorCallbackEPFviE(void *cb) {
_ZN7android11AudioSystem16addErrorCallbackEPFviE(cb);
}

View file

@ -1,4 +1,4 @@
<manifest version="1.0" type="device" target-level="legacy">
<manifest version="1.0" type="device">
<hal format="hidl">
<name>android.hardware.radio</name>
<transport>hwbinder</transport>

View file

@ -8,7 +8,7 @@
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
@ -19,11 +19,47 @@
-->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
for different hardware and product builds. -->
<resources>
<!-- The RadioAccessFamilies supported by the device.
Empty is viewed as "all". Only used on devices which
don't support RIL_REQUEST_GET_RADIO_CAPABILITY
format is UMTS|LTE|... -->
Empty is viewed as "all". Only used on devices which
don't support RIL_REQUEST_GET_RADIO_CAPABILITY
format is UMTS|LTE|... -->
<string translatable="false" name="config_radio_access_family">GSM|WCDMA|LTE</string>
<!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx],
[associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
<!-- the 5th element "resore-time" indicates the number of milliseconds to delay
before automatically restore the default connection. Set -1 if the connection
does not require auto-restore. -->
<!-- the 6th element indicates boot-time dependency-met value. -->
<string-array translatable="false" name="networkAttributes">
<item>"wifi,1,1,1,-1,true"</item>
<item>"mobile,0,0,0,-1,true"</item>
<item>"mobile_mms,2,0,2,180000,true"</item>
<item>"mobile_supl,3,0,2,60000,true"</item>
<item>"mobile_dun,4,0,2,60000,true"</item>
<item>"mobile_hipri,5,0,3,60000,true"</item>
<item>"mobile_bluetooth,7,7,2,-1,true"</item>
<item>"wifi_p2p,13,1,0,-1,true"</item>
<item>"ethernet,9,9,9,-1,true"</item>
</string-array>
<!-- An Array of "[ConnectivityManager connectionType],
[# simultaneous connection types]" -->
<string-array translatable="false" name="radioAttributes">
<item>"1,1"</item>
<item>"0,1"</item>
<item>"7,1"</item>
<item>"9,1"</item>
</string-array>
<!-- This device does allow sms service. -->
<bool name="config_sms_capable">true</bool>
<!-- Flag indicating whether the current device allows data.
If true, this means that the device supports data connectivity through
the telephony network.
This can be overridden to false for devices that support voice and/or sms . -->
<bool name="config_mobile_data_capable">true</bool>
</resources>

13
rootdir/Android.bp Normal file
View file

@ -0,0 +1,13 @@
prebuilt_etc {
name: "qmuxd.rc",
src: "etc/qmuxd.rc",
sub_dir: "init",
vendor: true,
}
prebuilt_etc {
name: "netmgrd.rc",
src: "etc/netmgrd.rc",
sub_dir: "init",
vendor: true,
}

4
rootdir/etc/netmgrd.rc Normal file
View file

@ -0,0 +1,4 @@
service vendor.netmgrd /vendor/bin/netmgrd
class core
user root
group radio readproc system wakelock oem_2950

4
rootdir/etc/qmuxd.rc Normal file
View file

@ -0,0 +1,4 @@
service vendor.qmuxd /vendor/bin/qmuxd
class core
user radio
group radio audio bluetooth gps oem_2950 log

2
sepolicy/vendor/netmgrd.te vendored Normal file
View file

@ -0,0 +1,2 @@
get_prop(netmgrd, radio_prop)
get_prop(netmgrd, default_prop)

17
sepolicy/vendor/rild.te vendored Normal file
View file

@ -0,0 +1,17 @@
set_prop(rild, net_radio_prop)
set_prop(rild, radio_prop)
set_prop(rild, system_prop)
get_prop(rild, default_prop)
get_prop(rild, vendor_rild_libpath_prop)
allow rild alarm_device:chr_file rw_file_perms;
allow rild radio_data_file:dir rw_dir_perms;
allow rild radio_data_file:file create_file_perms;
allow rild radio_data_file:lnk_file read;
allow rild proc_net:file w_file_perms;
allow rild proc_qtaguid_stat:file r_file_perms;
allow rild sysfs_sec_key:file rw_file_perms;
allow rild radio_core_data_file:file { create_file_perms open rw_file_perms getattr ioctl lock unlink };
allow rild radio_core_data_file:dir { search open remove_name add_name rw_dir_perms };

View file

@ -1,12 +1,20 @@
# Radio
persist.radio.apm_sim_not_pwdn=1
persist.data.netmgrd.qos.enable=true
persist.data.qmi.adb_logmask=0
persist.qcril.disable_retry=true
rild.libpath=/system/vendor/lib/libril-qc-qmi-1.so
ro.use_data_netmgrd=true
persist.radio.apm_sim_not_pwdn=1
persist.telephony.oosisdc=false
persist.vendor.radio.enableadvancedscan=false
persist.vendor.radio.mt_sms_ack=30
persist.vendor.radio.rat_on=combine
ril.subscription.types=NV,RUIM
ro.baseband.arch=msm
ro.data.large_tcp_window_size=true
ro.ril.def.agps.mode=1
ro.ril.hsupa.category=6
ro.ril.telephony.mqanelements=5
ro.telephony.default_network=9
ro.radio.noril=no
ro.telephony.call_ring.multiple=0
ro.vendor.use_data_netmgrd=true
telephony.lteOnGsmDevice=1
vendor.rild.libpath=/vendor/lib/libril-qc-qmi-1.so