Unfuckup 8
authorivanmeler <i_ivan@windowslive.com>
Fri, 10 Sep 2021 16:14:16 +0000 (16:14 +0000)
committerivanmeler <i_ivan@windowslive.com>
Fri, 10 Sep 2021 16:14:16 +0000 (16:14 +0000)
13 files changed:
BoardConfigCommon.mk
bluetooth/libbt_vndcfg.txt
configs/audio/audio_policy_configuration.xml
device-common.mk
manifest.xml
overlay/frameworks/base/core/res/res/values/config.xml
proprietary-files.txt
ramdisk/etc/init.samsung.rc
rro_overlays/TetheringOverlay/Android.bp [new file with mode: 0644]
rro_overlays/TetheringOverlay/AndroidManifest.xml [new file with mode: 0644]
rro_overlays/TetheringOverlay/res/values/config.xml [new file with mode: 0644]
rro_overlays/WifiOverlay/res/values/config.xml
system_prop.mk

index d8e5f1fdb58866dca9dcd1934f6a7c70e3cd88a9..f77f16fa4e61454eb8373f80ebef5998bb5cdeff 100644 (file)
@@ -56,6 +56,7 @@ DEXPREOPT_GENERATE_APEX_IMAGE := true
 
 # Extracted with libbootimg
 BOARD_CUSTOM_BOOTIMG := true
+TARGET_KERNEL_ADDITIONAL_FLAGS := HOSTCFLAGS="-fuse-ld=lld -Wno-unused-command-line-argument"
 BOARD_CUSTOM_BOOTIMG_MK := hardware/samsung/mkbootimg.mk
 BOARD_MKBOOTIMG_ARGS := --kernel_offset 0x00008000 --ramdisk_offset 0x01000000 --tags_offset 0x00000100
 BOARD_KERNEL_BASE := 0x10000000
index 64a3aa82349dd1b053f73464311669475c0d44de..5efc426dffb7d787255c1880d36265126c9be021 100644 (file)
@@ -1,4 +1,5 @@
 BLUETOOTH_UART_DEVICE_PORT = "/dev/ttySAC1"
+BTHW_FW_EXTENDED_CONFIGURATION = TRUE
 FW_PATCHFILE_LOCATION = "/vendor/firmware"
 FW_PATCH_SETTLEMENT_DELAY_MS = 100
 UART_TARGET_BAUD_RATE = 921600
index 08a613387e6f38412dd8c2067ea409c3ba0cbe92..5901d8669d6c3ae096909bec12b079215c730320 100644 (file)
                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
                 </devicePort>
+                <devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink">
+                </devicePort>
+                <devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink">
+                </devicePort>
 
                 <!-- input devices declaration, i.e. source DEVICE PORT -->
                 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
                              samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
                              channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
                 </devicePort>
-
+                <devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
+                </devicePort>
+                <devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
+                </devicePort>
             </devicePorts>
 
             <routes>
                        sources="primary-out,fast"/>
                 <route sink="Bt Sco Car Kit" type="mix"
                        sources="primary-out,fast"/>
+                <route type="mix" sink="USB Device Out"
+                       sources="primary-out,fast" />
+                <route type="mix" sink="USB Headset Out"
+                       sources="primary-out,fast" />
 
                 <route sink="primary-in" type="mix"
-                       sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,Bt Sco Headset Mic,Voice Call Mic,FM Mic"/>
+                       sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,Bt Sco Headset Mic,Voice Call Mic,FM Mic,USB Device In,USB Headset In"/>
 
             </routes>
         </module>
         <xi:include href="a2dp_audio_policy_configuration.xml"/>
 
         <!-- Usb Audio HAL -->
-        <xi:include href="usb_audio_policy_configuration.xml"/>
+        <!--xi:include href="usb_audio_policy_configuration.xml"/-->
+        <!-- Usb Audio HAL -->
+        <module name="usb" halVersion="2.0">
+            <mixPorts>
+                <mixPort name="usb_accessory output" role="source">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </mixPort>
+            </mixPorts>
+            <devicePorts>
+                <devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </devicePort>
+            </devicePorts>
+            <routes>
+                <route type="mix" sink="USB Host Out"
+                       sources="usb_accessory output"/>
+            </routes>
+        </module>
 
         <!-- Remote Submix Audio HAL -->
         <xi:include href="r_submix_audio_policy_configuration.xml"/>
index 755d2d3ad19f89da67d16217252cdc7199446c34..ff64fb3920432df423d2eac1350b3ae6dee2ff71 100644 (file)
@@ -181,7 +181,7 @@ PRODUCT_PACKAGES += \
     NfcNci \
     Tag \
     com.android.nfc_extras \
-    libclang_rt.ubsan_standalone-aarch64-android
+    android.hardware.nfc@1.2-service.samsung
 
 # Power
 PRODUCT_PACKAGES += \
@@ -328,6 +328,7 @@ PRODUCT_PACKAGES += \
     wifilogd \
     wlutil \
     libwpa_client \
+    TetheringConfigOverlay \
     wpa_supplicant \
     wpa_supplicant.conf \
     android.hardware.wifi@1.0-service \
index 0242979f66d2d18bb788772f056205d19e0796f4..52db021f34512c50d8597c66b3afddd88fdbe394 100644 (file)
             <instance>default</instance>
         </interface>
     </hal>
-    <hal format="hidl">
-        <name>android.hardware.nfc</name>
-        <transport>hwbinder</transport>
-        <version>1.1</version>
-        <interface>
-            <name>INfc</name>
-            <instance>default</instance>
-        </interface>
-    </hal>
     <hal format="hidl">
         <name>android.hardware.power</name>
         <transport>hwbinder</transport>
             <instance>default</instance>
         </interface>
     </hal>
-    <hal format="hidl">
-        <name>vendor.samsung.hardware.nfc</name>
-        <transport>hwbinder</transport>
-        <version>1.1</version>
-        <interface>
-            <name>ISecNfc</name>
-            <instance>default</instance>
-        </interface>
-    </hal>
     <hal format="hidl">
         <name>vendor.samsung.hardware.radio</name>
         <transport>hwbinder</transport>
index 35c15f7d9ed6e184e732b87bc23b7cfb68eec136..fcd30923124b972aa892b8b62fe59d746ffbba09 100644 (file)
         <item>"7,1"</item>
     </string-array>
 
-    <!-- List of regexpressions describing the interface (if any) that represent tetherable
-         USB interfaces.  If the device doesn't want to support tething over USB this should
-         be empty.  An example would be "usb.*" -->
-    <string-array translatable="false" name="config_tether_usb_regexs">
-        <item>rndis\\d</item>
-    </string-array>
-
     <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
          autodetected from the Configuration. -->
     <bool name="config_showNavigationBar">true</bool>
 
-    <!-- List of regexpressions describing the interface (if any) that represent tetherable
-         Wifi interfaces.  If the device doesn't want to support tethering over Wifi this
-         should be empty.  An example would be "softap.*" -->
-    <string-array translatable="false" name="config_tether_wifi_regexs">
-        <item>"wlan0"</item>
-        <item>"swlan0"</item>
-        <item>"softap.*"</item>
-    </string-array>
-
-    <!-- List of regexpressions describing the interface (if any) that represent tetherable
-         bluetooth interfaces.  If the device doesn't want to support tethering over bluetooth this
-         should be empty. -->
-    <string-array translatable="false" name="config_tether_bluetooth_regexs">
-        <item>bt-pan</item>
-    </string-array>
-
-    <!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
-    <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
-    <!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
-    <integer-array translatable="false" name="config_tether_upstream_types">
-        <item>0</item>
-        <item>1</item>
-        <item>5</item>
-        <item>7</item>
-    </integer-array>
-
     <!-- The default iface on which to monitor data use -->
     <string name="config_datause_iface" translatable="false">rmnet4</string>
 
@@ -242,11 +209,6 @@ Add a comment to this line
     <!-- Permit doze mode to operate -->
     <bool name="config_enableAutoPowerModes">true</bool>
 
-    <!-- Allow screen mirroring/miracast -->
-    <bool name="config_enableWifiDisplay">true</bool>
-    <!-- Our gralloc has support for protected buffers -->
-    <bool name="config_wifiDisplaySupportsProtectedBuffers">true</bool>
-
     <!-- Our modem doesn't support this query yet -->
     <string name="config_radio_access_family">GSM|WCDMA|LTE</string>
 
index e855f3867ef69b99d2aa2cc106e77c30389ee7a4..950bc2c63317424533b9d543573cadc3601eff8b 100644 (file)
@@ -233,13 +233,6 @@ vendor/lib64/libMcClient.so
 
 # NFC
 etc/libnfc-nci.conf
-etc/nfc_key
-etc/nfcee_access.xml
-lib64/android.hardware.nfc@1.0.so
-lib64/android.hardware.nfc@1.1.so
-lib64/vendor.samsung.hardware.nfc@1.1.so
-vendor/bin/hw/sec.android.hardware.nfc@1.1-service
-vendor/etc/init/sec.android.hardware.nfc@1.1-service.rc
 vendor/etc/libnfc-sec-vendor.conf
 vendor/etc/nfc/SGP/sec_s3nrn82_rfreg.bin
 vendor/etc/nfc/sec_s3nrn82_rfreg.bin
index e2fad04ddcadc682edfb26f61dbc8736f764dfd8..495747dc6b4acb53ad69e39b6b63db633436287d 100644 (file)
@@ -268,12 +268,8 @@ on post-fs-data
     mkdir /efs/sec_efs/nfc 0700 nfc nfc
     mkdir /efs/nfc 0700 nfc nfc
 
-    # NFC KEY
+    # NFC: create data/vendor/nfc for nv storage
     mkdir /data/vendor/nfc 0770 nfc nfc
-    mkdir /data/nfc_log 0750 nfc system
-    copy /system/etc/nfc_key /data/nfc/Key
-    chmod 660 /data/nfc/Key
-    chown nfc nfc /data/nfc/Key
 
     # TAD
     mkdir /data/tad 0770 system system
diff --git a/rro_overlays/TetheringOverlay/Android.bp b/rro_overlays/TetheringOverlay/Android.bp
new file mode 100644 (file)
index 0000000..4c0b325
--- /dev/null
@@ -0,0 +1,6 @@
+runtime_resource_overlay {
+    name: "TetheringConfigOverlay",
+    theme: "TetheringConfigOverlay",
+    sdk_version: "current",
+    product_specific: true
+}
diff --git a/rro_overlays/TetheringOverlay/AndroidManifest.xml b/rro_overlays/TetheringOverlay/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..b349a84
--- /dev/null
@@ -0,0 +1,11 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.networkstack.tethering.samsung_universal8890"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <application android:hasCode="false" />
+    <overlay
+      android:targetPackage="com.android.networkstack.tethering"
+      android:targetName="TetheringConfig"
+      android:isStatic="true"
+      android:priority="0"/>
+</manifest>
diff --git a/rro_overlays/TetheringOverlay/res/values/config.xml b/rro_overlays/TetheringOverlay/res/values/config.xml
new file mode 100644 (file)
index 0000000..a5b8794
--- /dev/null
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2020, The Android Open Source 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- List of regexpressions describing the interface (if any) that represent tetherable
+         USB interfaces.  If the device doesn't want to support tething over USB this should
+         be empty.  An example would be "usb.*" -->
+    <string-array translatable="false" name="config_tether_usb_regexs">
+        <item>rndis\\d</item>
+    </string-array>
+
+    <!-- List of regexpressions describing the interface (if any) that represent tetherable
+         Wifi interfaces.  If the device doesn't want to support tethering over Wifi this
+         should be empty.  An example would be "softap.*" -->
+    <string-array translatable="false" name="config_tether_wifi_regexs">
+        <item>"wlan\\d"</item>
+        <item>"swlan0"</item>
+    </string-array>
+
+    <!-- List of regexpressions describing the interface (if any) that represent tetherable
+         bluetooth interfaces.  If the device doesn't want to support tethering over bluetooth this
+         should be empty. -->
+    <string-array translatable="false" name="config_tether_bluetooth_regexs">
+        <item>bt-pan</item>
+    </string-array>
+
+    <!-- List of regexpressions describing the interface (if any) that represent tetherable
+         Wifi P2P interfaces.  If the device doesn't want to support tethering over Wifi P2p this
+         should be empty.  An example would be "p2p-p2p.*" -->
+    <string-array translatable="false" name="config_tether_wifi_p2p_regexs">
+        <item>"p2p\\d"</item>
+    </string-array>
+
+    <!-- Use the BPF offload for tethering when the kernel has support. True by default.
+         If the device doesn't want to support tether BPF offload, this should be false.
+         Note that this setting could be overridden by device config.
+    -->
+    <bool translatable="false" name="config_tether_enable_bpf_offload">false</bool>
+</resources>
index 5a9ca48600ea721d8aacd9e55fcbb7a49ca2c059..c08aaab8ef8d1ca791f1bd3301bd5152a21086c1 100644 (file)
@@ -52,5 +52,8 @@
     <integer translatable="false" name="config_wifi_operating_voltage_mv">3600</integer>
 
     <!-- Default access point SSID used for tethering -->
-    <string name="wifi_tether_configure_ssid_default" translatable="false">Samsung Galaxy S7</string>    
+    <string name="wifi_tether_configure_ssid_default" translatable="false">Samsung Galaxy</string>    
+
+    <!-- Enable WPA2 to WPA3 auto-upgrade -->
+    <bool translatable="false" name="config_wifiSaeUpgradeEnabled">false</bool>
 </resources>
index fd119f07f037f2d134e64c49fdb7d89b8b1fa136..7995dac9d8666561295b6a91d8b45a155f41bc73 100644 (file)
@@ -83,7 +83,8 @@ PRODUCT_PROPERTY_OVERRIDES += \
 # Wifi
 PRODUCT_PROPERTY_OVERRIDES += \
     wifi.direct.interface=p2p-dev-wlan0 \
-    persist.debug.wfd.enable=1
+    persist.debug.wfd.enable=1 \
+    ro.vendor.wfdsupport=1
 
 # Configstore
 PRODUCT_PROPERTY_OVERRIDES += \
@@ -92,3 +93,8 @@ PRODUCT_PROPERTY_OVERRIDES += \
 # HWC
 PRODUCT_PROPERTY_OVERRIDES += \
     debug.sf.disable_hwc=1
+
+# Telephony
+PRODUCT_PRODUCT_PROPERTIES += \
+    ro.telephony.default_network=10,10
+