This commit is contained in:
Nehemiah of Zebulun 2023-11-23 20:34:51 -05:00
parent f1f99918b0
commit 12ba48106e
43 changed files with 587 additions and 303 deletions

View File

@ -1,293 +0,0 @@
diff --git a/services/audiopolicy/config/audio_policy_configuration.xml b/services/audiopolicy/config/audio_policy_configuration.xml
index b28381b32d..218cdf8e8f 100644
--- a/services/audiopolicy/config/audio_policy_configuration.xml
+++ b/services/audiopolicy/config/audio_policy_configuration.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!-- Copyright (C) 2019 The Android Open Source Project
+<!-- Copyright (c) 2016-2017, 2020, The Linux Foundation. All rights reserved
+ Not a Contribution.
+-->
+<!-- Copyright (C) 2015 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.
@@ -13,12 +16,11 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” -->
<!-- Global configuration Decalaration -->
- <globalConfiguration speaker_drc_enabled="true"/>
+ <globalConfiguration speaker_drc_enabled="true" call_screen_mode_supported="true"/>
<!-- Modules section:
@@ -44,168 +46,165 @@
-->
<modules>
<!-- Primary Audio HAL -->
- <module name="primary" halVersion="3.0">
+ <module name="primary" halVersion="2.0">
<attachedDevices>
+ <item>Earpiece</item>
<item>Speaker</item>
+ <item>Telephony Tx</item>
<item>Built-In Mic</item>
<item>Built-In Back Mic</item>
+ <item>FM Tuner</item>
+ <item>Telephony Rx</item>
</attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts>
- <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_PRIMARY">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_RAW">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
- <mixPort name="deep_buffer" role="source"
- flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ <mixPort name="deep_buffer" role="source" flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
- <mixPort name="compressed_offload" role="source"
- flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
- <profile name="" format="AUDIO_FORMAT_MP3"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
- <profile name="" format="AUDIO_FORMAT_AAC"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
- <profile name="" format="AUDIO_FORMAT_AAC_LC"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <mixPort name="direct_pcm" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ </mixPort>
+ <mixPort name="compressed_offload" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
+ <profile name="" format="AUDIO_FORMAT_MP3" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_FLAC" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_ALAC" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ <profile name="" format="AUDIO_FORMAT_APE" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_LC" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_HE_V1" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_HE_V2" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_WMA" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ <profile name="" format="AUDIO_FORMAT_WMA_PRO" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+ <profile name="" format="AUDIO_FORMAT_VORBIS" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_ADTS_LC" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_ADTS_HE_V1" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_AAC_ADTS_HE_V2" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000" channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
</mixPort>
<mixPort name="voice_tx" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="voip_rx" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
+
<mixPort name="primary input" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ </mixPort>
+ <mixPort name="incall_music_uplink" role="source" flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
+ <mixPort name="surround_sound" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" 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_INDEX_MASK_3,AUDIO_CHANNEL_INDEX_MASK_4,AUDIO_CHANNEL_IN_5POINT1,AUDIO_CHANNEL_INDEX_MASK_6"/>
</mixPort>
<mixPort name="voice_rx" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
+
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
<devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</devicePort>
<devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER" address="">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
- <gains>
- <gain name="gain_1" mode="AUDIO_GAIN_MODE_JOINT"
- minValueMB="-8400"
- maxValueMB="4000"
- defaultValueMB="0"
- stepValueMB="100"/>
- </gains>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="Line" type="AUDIO_DEVICE_OUT_LINE" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</devicePort>
<devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</devicePort>
<devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
+ </devicePort>
+ <devicePort tagName="HDMI" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
+ </devicePort>
+ <devicePort tagName="Proxy" type="AUDIO_DEVICE_OUT_PROXY" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
+ </devicePort>
+ <devicePort tagName="FM" type="AUDIO_DEVICE_OUT_FM" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
</devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ </devicePort>
+ <devicePort tagName="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</devicePort>
<devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
- channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
</devicePort>
<devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</devicePort>
<devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
- samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</devicePort>
</devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink -->
<routes>
- <route type="mix" sink="Earpiece"
- sources="primary output,deep_buffer,BT SCO Headset Mic"/>
- <route type="mix" sink="Speaker"
- sources="primary output,deep_buffer,compressed_offload,BT SCO Headset Mic,Telephony Rx"/>
- <route type="mix" sink="Wired Headset"
- sources="primary output,deep_buffer,compressed_offload,BT SCO Headset Mic,Telephony Rx"/>
- <route type="mix" sink="Wired Headphones"
- sources="primary output,deep_buffer,compressed_offload,BT SCO Headset Mic,Telephony Rx"/>
- <route type="mix" sink="primary input"
- sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic"/>
- <route type="mix" sink="Telephony Tx"
- sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic, voice_tx"/>
- <route type="mix" sink="voice_rx"
- sources="Telephony Rx"/>
+ <route type="mix" sink="Earpiece" sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
+ <route type="mix" sink="Speaker" sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
+ <route type="mix" sink="Wired Headset" sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
+ <route type="mix" sink="Wired Headphones" sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
+ <route type="mix" sink="Line" sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
+ <route type="mix" sink="HDMI" sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload"/>
+ <route type="mix" sink="Proxy" sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload"/>
+ <route type="mix" sink="Telephony Tx" sources="voice_tx,incall_music_uplink"/>
+ <route type="mix" sink="FM" sources="primary output"/>
+ <route type="mix" sink="BT SCO" sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
+ <route type="mix" sink="BT SCO Headset" sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
+ <route type="mix" sink="BT SCO Car Kit" sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
+ <route type="mix" sink="Telephony Tx" sources="voice_tx"/>
+ <route type="mix" sink="primary input" sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,FM Tuner"/>
+ <route type="mix" sink="surround_sound" sources="Built-In Mic,Built-In Back Mic"/>
+ <route type="mix" sink="voice_rx" sources="Telephony Rx"/>
</routes>
</module>
- <!-- A2dp Input Audio HAL -->
- <xi:include href="a2dp_in_audio_policy_configuration.xml"/>
+ <!-- A2dp Audio HAL -->
+ <xi:include href="/vendor/etc/a2dp_audio_policy_configuration.xml"/>
<!-- Usb Audio HAL -->
- <xi:include href="usb_audio_policy_configuration.xml"/>
+ <xi:include href="/vendor/etc/usb_audio_policy_configuration.xml"/>
<!-- Remote Submix Audio HAL -->
- <xi:include href="r_submix_audio_policy_configuration.xml"/>
-
- <!-- Bluetooth Audio HAL -->
- <xi:include href="bluetooth_audio_policy_configuration.xml"/>
-
- <!-- MSD Audio HAL (optional) -->
- <xi:include href="msd_audio_policy_configuration.xml"/>
+ <xi:include href="/vendor/etc/r_submix_audio_policy_configuration.xml"/>
</modules>
<!-- End of Modules section -->
- <!-- Volume section:
- IMPORTANT NOTE: Volume tables have been moved to engine configuration.
- Keep it here for legacy.
- Engine will fallback on these files if none are provided by engine.
- -->
+ <!-- Volume section -->
- <xi:include href="audio_policy_volumes.xml"/>
- <xi:include href="default_volume_tables.xml"/>
+ <xi:include href="/vendor/etc/audio_policy_volumes.xml"/>
+ <xi:include href="/vendor/etc/default_volume_tables.xml"/>
<!-- End of Volume section -->
- <!-- Surround Sound configuration -->
-
- <xi:include href="surround_sound_configuration_5_0.xml"/>
-
- <!-- End of Surround Sound configuration -->
-
</audioPolicyConfiguration>

View File

@ -36,7 +36,7 @@ PRODUCT_PACKAGE_OVERLAYS += device/wephone/duoqin/overlay
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
device/wephone/duoqin/wephone.rc:vendor/etc/init/wephone.rc \ device/wephone/duoqin/wephone.rc:vendor/etc/init/wephone.rc \
device/wephone/duoqin/wephone-boot.sh:vendor/bin/wephone-boot.sh device/wephone/duoqin/wephone.sh:vendor/bin/wephone.sh
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
device/wephone/duoqin/files/mtk-kpd.idc:$(TARGET_COPY_OUT_SYSTEM)/usr/idc/mtk-kpd.idc \ device/wephone/duoqin/files/mtk-kpd.idc:$(TARGET_COPY_OUT_SYSTEM)/usr/idc/mtk-kpd.idc \

View File

@ -0,0 +1,25 @@
diff --git a/res/layout/search_container_all_apps.xml b/res/layout/search_container_all_apps.xml
index e1646ba43..850d86ccc 100644
--- a/res/layout/search_container_all_apps.xml
+++ b/res/layout/search_container_all_apps.xml
@@ -34,4 +34,5 @@
android:singleLine="true"
android:textColor="?android:attr/textColorSecondary"
android:textColorHint="@drawable/all_apps_search_hint"
- android:textSize="16sp" />
\ No newline at end of file
+ android:textSize="16sp"
+ android:visibility="gone" />
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 88a9abaf8..d4a65f05b 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -52,7 +52,7 @@ public final class FeatureFlags {
* Enable moving the QSB on the 0th screen of the workspace. This is not a configuration feature
* and should be modified at a project level.
*/
- public static final boolean QSB_ON_FIRST_SCREEN = true;
+ public static final boolean QSB_ON_FIRST_SCREEN = false;
/**
* Feature flag to handle define config changes dynamically instead of killing the process.

10
duoqin/sepolicy/asus.te Normal file
View File

@ -0,0 +1,10 @@
allow cameraserver phhsu_exec:file rx_file_perms;
type asus_motor_device, file_type;
allow cameraserver asus_motor_device:chr_file { open read write ioctl };
allowxperm cameraserver asus_motor_device:chr_file ioctl { 0x4d02 };
type vendor_sysfs_graphics, file_type;
allow platform_app vendor_sysfs_graphics:dir r_dir_perms;
allow platform_app vendor_sysfs_graphics:file r_file_perms;

View File

@ -0,0 +1,4 @@
type sysfs_board_properties, fs_type, sysfs_type;
allow system_server sysfs_board_properties:dir search;
allow system_server sysfs_board_properties:file r_file_perms;

View File

@ -0,0 +1,3 @@
#11-14 21:15:02.748 477 477 I auditd : type=1400 audit(0.0:104): avc: denied { search } for comm="BootAnimation" name="dri" dev="tmpfs" ino=1108 scontext=u:r:bootanim:s0 tcontext=u:object_r:gpu_device:s0 tclass=dir permissive=0
#Seen on some MTK devices
allow bootanim gpu_device:dir r_dir_perms;

View File

@ -0,0 +1,15 @@
# Allow charger to write to sysfs_backlight_attr (only for huawei)
attribute sysfs_backlight_attr;
allow charger sysfs_backlight_attr:file rw_file_perms;
# Allow charger to write to sysfs_led_attr (only for huawei)
# attribute sysfs_led_attr;
# allow charger sysfs_led_attr:file rw_file_perms;
# Allow charger to read and write to sysfs_power
allow charger sysfs_power:file rw_file_perms;
allow charger sysfs_power:dir r_dir_perms;
allow charger sysfs_power:lnk_file read;
# The system charger can write powerctl properties
set_prop(charger, powerctl_prop)

View File

@ -1 +1,22 @@
/vendor/bin/wephone-boot.sh u:object_r:wephone_exec:s0 /system/bin/phh-su u:object_r:phhsu_exec:s0
/system/bin/vndk-detect u:object_r:vndk_detect_exec:s0
/system/etc/usb_audio_policy_configuration.xml u:object_r:vendor_configs_file:s0
/system/bin/rw-system.sh u:object_r:phhsu_exec:s0
/system/bin/phh-on-boot.sh u:object_r:phhsu_exec:s0
/system/bin/phh-on-data.sh u:object_r:phhsu_exec:s0
/system/bin/wephone.sh u:object_r:phhsu_exec:s0
/system/bin/asus-motor u:object_r:phhsu_exec:s0
/system/bin/xiaomi-touch u:object_r:phhsu_exec:s0
/bt_firmware(/.*)? u:object_r:bt_firmware_file:s0
/sec_storage(/.*)? u:object_r:teecd_data_file:s0
/dev/dsm u:object_r:dmd_device:s0
/system/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.oppo.compat u:object_r:hal_fingerprint_oppo_compat_exec:s0
/system/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.oplus.compat u:object_r:hal_fingerprint_oppo_compat_exec:s0
/efs u:object_r:efs_file:s0
/dev/smcinvoke u:object_r:smcinvoke_device:s0
/system/bin/hw/android\.hardware\.bluetooth\.audio-service-system u:object_r:hal_audio_sysbta_exec:s0

View File

@ -0,0 +1 @@
genfscon sysfs /board_properties u:object_r:sysfs_board_properties:s0

10
duoqin/sepolicy/hal.te Normal file
View File

@ -0,0 +1,10 @@
type hal_fingerprint_oppo_compat, domain;
hal_client_domain(hal_fingerprint_oppo_compat, hal_fingerprint)
hal_server_domain(hal_fingerprint_oppo_compat, hal_fingerprint)
type hal_fingerprint_oppo_compat_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_fingerprint_oppo_compat)
type hal_fingerprint_oppo, domain;
allow hal_fingerprint_oppo vendor_default_prop:property_service { set };

View File

@ -0,0 +1,4 @@
type hal_aguiledbelt_hwservice, hwservice_manager_type;
allow system_app hal_aguiledbelt_hwservice:hwservice_manager { find };
type hal_aguiledbelt, domain;
allow system_app hal_aguiledbelt:binder { call };

View File

@ -0,0 +1,10 @@
type hal_audio_sysbta, domain, coredomain;
hal_server_domain(hal_audio_sysbta, hal_audio)
type hal_audio_sysbta_exec, exec_type, system_file_type, file_type;
init_daemon_domain(hal_audio_sysbta)
hal_client_domain(hal_audio_sysbta, hal_allocator)
# allow audioserver to call hal_audio dump with its own fd to retrieve status
allow hal_audio_sysbta audioserver:fifo_file write;

View File

@ -0,0 +1 @@
allow priv_app overlay_service:service_manager find;

View File

@ -0,0 +1,4 @@
type hostapd, domain;
allow hostapd wifi_data_file:dir create_dir_perms;
allow hostapd wifi_data_file:file create_file_perms;

37
duoqin/sepolicy/huawei.te Normal file
View File

@ -0,0 +1,37 @@
allow ueventd proc:file r_file_perms;
permissive ueventd;
type teecd_data_file, file_type;
type dmd_device, file_type;
allow hal_fingerprint_server dmd_device:chr_file rw_file_perms;
allow hal_fingerprint_server sysfs:file rw_file_perms;
allow tee hal_fingerprint_default:process { getattr };
allow tee teecd_data_file:dir { search read write create getattr add_name open };
allow tee teecd_data_file:file { read write create getattr open };
allow tee system_data_file:dir { getattr };
type oeminfo_nvm, domain;
type oeminfo_nvm_device, file_type;
allowxperm oeminfo_nvm oeminfo_nvm_device:blk_file ioctl { 0x1260 };
allow charger rootfs:file { ioctl read getattr lock map execute entrypoint open };
# This is use exclusively for init to relabel /dev/selinux from tmpfs to device
allow kernel tmpfs:{ dir file } relabelfrom;
allow kernel device:{ dir file } relabelto;
# system/core/init/mount_handler.cpp likes to browse all /sys/block/xxx, so let it do so...
type sys_block_sdd, file_type;
allow init { sysfs sys_block_sdd }:dir r_dir_perms;
allow init { sysfs sys_block_sdd }:file r_file_perms;
allow init { sysfs sys_block_sdd }:lnk_file read;
allowxperm vendor_init { teecd_data_file }:dir ioctl {
FS_IOC_GET_ENCRYPTION_POLICY
FS_IOC_SET_ENCRYPTION_POLICY
};
# Fixes boot issue in EMUI 9 P20 lite
type sys_block_mmcblk0, file_type;
allow init sys_block_mmcblk0:lnk_file read;
allow init sysfs_zram:lnk_file read;

13
duoqin/sepolicy/init.te Normal file
View File

@ -0,0 +1,13 @@
#This is in Android 8.0, but not 8.1
domain_trans(init, rootfs, adbd)
#This is used on Huawei devices to f2fs data partition
allow init userdata_block_device:blk_file relabelto;
allow init userdata_block_device:lnk_file relabelto;
allow vendor_init vendor_init:capability { sys_module };
allow init system_file:lnk_file create_file_perms;
#fix adb in some cases
allow init adbd_exec:lnk_file read;

View File

@ -0,0 +1,8 @@
#Access to fake keymaster SPL/Android version props
get_prop(hal_keymaster, default_prop);
get_prop(tee, default_prop);
get_prop(hal_keymaster, system_prop);
get_prop(hal_gatekeeper, system_prop);

View File

@ -0,0 +1,3 @@
allow keystore domain:process getattr;
allow keystore domain:dir r_dir_perms;
allow keystore domain:file r_file_perms;

View File

@ -0,0 +1,4 @@
type sysfs_tp, file_type;
#Allow treble_app access to /sys/devices/virtual/touch/tp_dev/gesture_on
allow system_app sysfs_tp:file rw_file_perms;

1
duoqin/sepolicy/lmkd.te Normal file
View File

@ -0,0 +1 @@
allow lmkd self:capability sys_ptrace;

View File

@ -0,0 +1,29 @@
type hal_graphics_allocator_default, domain;
type proc_ged, file_type;
allowxperm domain proc_ged:file ioctl { 0x6700-0x67ff };
allow init mnt_product_file:dir mounton;
type mtk_hal_audio, domain;
typeattribute mtk_hal_audio hal_broadcastradio_client;
type mtk_hal_power, domain;
allow mtk_hal_power system_data_root_file:file create_file_perms;
allow zygote ashmem_device:chr_file execute;
attribute hal_mms_server;
binder_call({appdomain -isolated_app}, hal_mms_server)
binder_call(hal_mms_server, {appdomain -isolated_app})
type mtk_hal_mms_hwservice, hwservice_manager_type;
allow { appdomain -isolated_app } mtk_hal_mms_hwservice:hwservice_manager find;
#denied { read } for comm="tkuinit" name="u:object_r:default_prop:s0" dev="tmpfs" ino=2029 scontext=u:r:tkcore:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=1
#denied { open } for comm="tkuinit" path="/dev/__properties__/u:object_r:default_prop:s0" dev="tmpfs" ino=2029 scontext=u:r:tkcore:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=1
#denied { getattr } for comm="tkuinit" path="/dev/__properties__/u:object_r:default_prop:s0" dev="tmpfs" ino=2029 scontext=u:r:tkcore:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=1
type tkcore, domain;
permissive tkcore;
allow platform_app sysfs_leds:dir r_dir_perms;
allow platform_app sysfs_leds:file r_file_perms;

4
duoqin/sepolicy/nubia.te Normal file
View File

@ -0,0 +1,4 @@
# Shoulder buttons/triggers
type sensitivity_sysfs, file_type;
allow shell sensitivity_sysfs:file rw_file_perms;
allow system_app sensitivity_sysfs:file rw_file_perms;

10
duoqin/sepolicy/oppo.te Normal file
View File

@ -0,0 +1,10 @@
type sysfs_usb_supply, file_type;
allow system_app sysfs_usb_supply:file rw_file_perms;
type hal_fingerprint_oplus, domain;
allow hal_fingerprint_oplus vendor_default_prop:property_service set;
get_prop(hal_fingerprint_oplus, default_prop);
get_prop(system_server, vendor_default_prop);

17
duoqin/sepolicy/phh.te Normal file
View File

@ -0,0 +1,17 @@
type phhota_dev, dev_type;
typeattribute phhota_dev mlstrustedobject;
allow phhsu_daemon phhota_dev:blk_file rw_file_perms;
allow system_app phhota_dev:blk_file rw_file_perms;
allow kernel phhsu_daemon:fd use;
allow phhsu_daemon gsi_data_file:file ioctl;
allowxperm phhsu_daemon gsi_data_file:file ioctl { 0x660b };
allow phhsu_daemon loop_device:blk_file ioctl;
allowxperm phhsu_daemon loop_device:blk_file ioctl { 0x4c00 };
allow phhsu_daemon userdata_block_device:blk_file ioctl;
allowxperm phhsu_daemon userdata_block_device:blk_file ioctl { 0x1278 0x127a };
allow kernel gsi_data_file:file rw_file_perms;

View File

@ -0,0 +1,2 @@
persist.sys.sf.hs_mode u:object_r:sf_hs_mode_prop:s0
hwc.exynos.vsync_mode u:object_r:vendor_hwc_prop:s0

View File

@ -0,0 +1,22 @@
type qcrilam_app, domain;
app_domain(qcrilam_app)
# Needed to get access to /data/data/me.phh.qcrilam
# Only getattr and search are requested since qcrilam does not write to its own directory
# /data/data/me.phh.qcrilam only has two empty subdirs
dontaudit qcrilam_app app_data_file:dir { getattr search };
# Access services that should be available to all apps
allow qcrilam_app app_api_service:service_manager find;
# Find media.audio_flinger
allow qcrilam_app audioserver_service:service_manager find;
# Find isub
allow qcrilam_app radio_service:service_manager find;
# Find the vendor.qti.hardware.radio.am::IQcRilAudio HIDL service
# And grant binder access to the host (`rild`)
hal_client_domain(qcrilam_app, hal_telephony)
allow qcrilam_app cgroup:file w_file_perms;

View File

@ -0,0 +1,32 @@
type bt_firmware_file, file_type;
type rild, domain;
#me.phh.treble.qti.audio is system-signed
allow system_app hal_telephony_hwservice:hwservice_manager { find };
allow { rild system_app } { rild system_app }:binder { call transfer };
#Pixel 1
type vnd_qcril_audio_hwservice, hwservice_manager_type;
allow system_app vnd_qcril_audio_hwservice:hwservice_manager { find };
#Pixel 2
type vnd_qcrilhook_hwservice, hwservice_manager_type;
allow system_app vnd_qcrilhook_hwservice:hwservice_manager { find };
#OP6
allow system_app hal_telephony_hwservice:hwservice_manager { find };
# cf https://github.com/phhusson/treble_experimentations/issues/131
# SELinux : avc: denied { add } for interface=android.hardware.tetheroffload.control::IOffloadControl pid=15220 scontext=u:r:ipacm:s0 tcontext=u:object_r:hal_tetheroffload_hwservice:s0 tclass=hwservice_manager permissive=0
type ipacm, hwservice_manager_type;
allow ipacm hal_tetheroffload_hwservice:hwservice_manager { add };
type rpmb_device, file_type;
allow tee rpmb_device:blk_file rw_file_perms;
allowxperm tee rpmb_device:blk_file ioctl { 0xb300-0xbfff };
attribute smcinvoke_device_29_0;
type smcinvoke_device, dev_type;
typeattribute smcinvoke_device smcinvoke_device_29_0;
get_prop(rild, default_prop);

View File

@ -0,0 +1,22 @@
type boot_prop, property_type;
set_prop(system_server, boot_prop);
type hal_graphics_composer_default, domain;
type sf_hs_mode_prop, property_type;
get_prop(hal_graphics_composer_default, sf_hs_mode_prop);
type vendor_hwc_prop, property_type;
get_prop(hal_graphics_composer_default, vendor_hwc_prop);
type sysfs_vnswap, file_type;
allow init sysfs_vnswap:{file lnk_file } r_file_perms;
allow kernel { mac_perms_file hwservice_contexts_file property_contexts_file service_contexts_file seapp_contexts_file file_contexts_file }:file relabelto;
allow kernel tmpfs:file relabelfrom;
type sysfs_ski_display_writable, file_type;
allow platform_app sysfs_ski_display_writable:file r_file_perms;

View File

@ -0,0 +1 @@
user=_app seinfo=platform name=me.phh.qcrilam domain=qcrilam_app type=app_data_file

View File

@ -0,0 +1 @@
type qcrilam_service, service_manager_type;

View File

@ -0,0 +1,16 @@
qti.ims.ext u:object_r:radio_service:s0
# SPRD IMS
ims_ex u:object_r:radio_service:s0
ims_ut_ex u:object_r:radio_service:s0
ims_doze_manager u:object_r:radio_service:s0
irit u:object_r:radio_service:s0
# MTK IMS
mwis u:object_r:radio_service:s0
mtkIms u:object_r:radio_service:s0
# Audio AIDL interface
android.hardware.bluetooth.audio.IBluetoothAudioProviderFactory/sysbta u:object_r:hal_audio_service:s0
# QcRilAm
me.phh.qcrilam u:object_r:qcrilam_service:s0

151
duoqin/sepolicy/su.te Normal file
View File

@ -0,0 +1,151 @@
type phhsu_daemon, domain, mlstrustedsubject;
type phhsu_exec, exec_type, file_type;
type phhsu_daemon_tmpfs, file_type;
typeattribute phhsu_daemon coredomain;
permissive phhsu_daemon;
tmpfs_domain(phhsu_daemon);
domain_auto_trans(init, phhsu_exec, phhsu_daemon);
file_type_auto_trans(phhsu_daemon, device, phhsu_daemon);
allow { appdomain shell } phhsu_daemon:unix_stream_socket { connectto write read };
allow { appdomain shell } phhsu_daemon:sock_file { write read };
allow { appdomain shell } phhsu_exec:file { getattr read open execute execute_no_trans };
create_pty(shell)
allowxperm shell devpts:chr_file ioctl { TCSETSF TCGETS unpriv_tty_ioctls };
allowxperm { phhsu_daemon untrusted_app untrusted_app_27 } untrusted_app_all_devpts:chr_file ioctl { TCSETSF TCGETS unpriv_tty_ioctls };
allow servicemanager phhsu_daemon:dir { search read };
allow servicemanager phhsu_daemon:file { open read };
allow servicemanager phhsu_daemon:process { getattr };
allow servicemanager phhsu_daemon:binder { call transfer };
typeattribute phhsu_daemon mlstrustedobject;
typeattribute phhsu_daemon mlstrustedsubject;
allow shell su_exec:file getattr;
typeattribute su mlstrustedsubject;
allow phhsu_daemon { system_api_service app_api_service system_server_service }:service_manager find;
allow system_server phhsu_daemon:fifo_file { read write getattr };
allow system_server phhsu_daemon:fd use;
allow system_server phhsu_daemon:binder { call transfer };
allow system_server shell_devpts:chr_file { read write };
# Add su to various domains
net_domain(phhsu_daemon)
hwbinder_use(phhsu_daemon)
allow domain untrusted_app_all_devpts:chr_file { getattr read write };
allow phhsu_daemon untrusted_app_all_devpts:chr_file { getattr read write open ioctl };
allow phhsu_daemon untrusted_app_all:fifo_file { getattr read write open ioctl };
allow phhsu_daemon zygote_exec:file { execute read open execute_no_trans getattr };
allow appdomain phhsu_daemon:dir { search };
allow phhsu_daemon self:global_capability_class_set { sys_resource sys_ptrace };
allow phhsu_daemon self:dir rw_dir_perms;
allow phhsu_daemon self:file { rwx_file_perms create rename setattr unlink };
allow phhsu_daemon self:lnk_file { r_file_perms execmod };
allow phhsu_daemon adbd_exec:file { getattr read };
allow phhsu_daemon { rootfs same_process_hal_file system_file tmpfs }:file { mounton getattr };
allow phhsu_daemon self:capability { sys_admin chown setuid setgid net_raw dac_override dac_read_search kill fowner mknod };
allow phhsu_daemon self:capability2 { syslog };
allow phhsu_daemon shell_exec:file rx_file_perms;
allow phhsu_daemon system_file:file { rx_file_perms entrypoint };
allow phhsu_daemon kmsg_device:chr_file { ioctl w_file_perms };
allow phhsu_daemon toolbox_exec:file rx_file_perms;
allow phhsu_daemon system_block_device:{ lnk_file file } r_file_perms;
allow { phhsu_daemon shell } domain:dir rw_dir_perms;
allow { phhsu_daemon shell } domain:file rw_file_perms;
allow { phhsu_daemon shell } domain:lnk_file rw_file_perms;
allow { phhsu_daemon shell } rootfs:file { rwx_file_perms create rename setattr unlink };
allow { phhsu_daemon shell } rootfs:dir rw_dir_perms;
allow phhsu_daemon asec_apk_file:dir rw_dir_perms;
allow phhsu_daemon shell_devpts:chr_file rw_file_perms;
allow phhsu_daemon app_data_file:dir rw_dir_perms;
allow phhsu_daemon app_data_file:file { rwx_file_perms create rename setattr unlink };
allow phhsu_daemon dalvikcache_data_file:dir rw_dir_perms;
allow phhsu_daemon dalvikcache_data_file:file { rwx_file_perms create rename setattr unlink };
allow phhsu_daemon dalvikcache_data_file:lnk_file { r_file_perms execmod };
allow phhsu_daemon system_data_file:file { rwx_file_perms create rename setattr unlink };
allow phhsu_daemon system_data_file:dir rw_dir_perms;
allow phhsu_daemon system_data_file:file { rwx_file_perms create rename setattr unlink };
allow phhsu_daemon system_file:dir rw_dir_perms;
allow phhsu_daemon system_file:file { rwx_file_perms create rename setattr unlink };
allow phhsu_daemon init:unix_stream_socket { connectto };
allow phhsu_daemon self:process { ptrace setexec execmem setfscreate };
allow phhsu_daemon app_data_file:file { rwx_file_perms create rename setattr unlink };
allow phhsu_daemon app_data_file:dir rw_dir_perms;
allow phhsu_daemon ashmem_device:chr_file { execute };
allow phhsu_daemon dex2oat_exec:file rx_file_perms;
allow phhsu_daemon phhsu_daemon_tmpfs:file rwx_file_perms;
allow phhsu_daemon { proc_type dev_type exec_type file_type sysfs_type fs_type phhsu_daemon }:file { rwx_file_perms create mounton setattr getattr relabelto relabelfrom unlink rename };
allow phhsu_daemon { proc_type dev_type exec_type file_type sysfs_type fs_type phhsu_daemon }:lnk_file { rw_file_perms create mounton setattr getattr relabelto relabelfrom unlink rename};
allow phhsu_daemon { proc_type dev_type exec_type file_type sysfs_type fs_type phhsu_daemon }:dir { rw_dir_perms create mounton setattr getattr relabelto relabelfrom unlink rename};
allow phhsu_daemon { proc_type dev_type exec_type file_type sysfs_type fs_type phhsu_daemon }:chr_file { rwx_file_perms unlink rename ioctl};
allow phhsu_daemon { proc_type dev_type exec_type file_type sysfs_type fs_type phhsu_daemon }:blk_file { rw_file_perms create unlink rename ioctl};
allow phhsu_daemon device:file rwx_file_perms;
allow phhsu_daemon device:dir rw_dir_perms;
allow phhsu_daemon domain:process { ptrace signal signull getattr };
allow phhsu_daemon selinuxfs:file rwx_file_perms;
allow domain phhsu_daemon:process { sigchld };
allow phhsu_daemon domain:binder { call transfer };
allow phhsu_daemon kernel:system { syslog_read syslog_mod };
allow phhsu_daemon kernel:security { setenforce compute_av };
allow phhsu_daemon domain:unix_stream_socket { getattr };
allow phhsu_daemon logdr_socket:sock_file write;
allow phhsu_daemon logd:unix_stream_socket connectto;
allow phhsu_daemon property_type:property_service { set };
allow phhsu_daemon property_socket:sock_file { write };
allow phhsu_daemon property_type:file rw_file_perms;
allow phhsu_daemon { hwservicemanager hwservice_manager_type }:hwservice_manager { list add find };
allow phhsu_daemon domain:unix_dgram_socket rw_socket_perms;
allow phhsu_daemon tombstoned_intercept_socket:sock_file { write };
allow phhsu_daemon tombstoned:unix_stream_socket { connectto };
allow phhsu_daemon { property_data_file data_file_type tmpfs }:file create_file_perms;
allow phhsu_daemon { property_data_file data_file_type tmpfs }:dir create_dir_perms;
allow phhsu_daemon { tmpfs fs_type }:filesystem { mount remount unmount associate };
allow phhsu_daemon phhsu_daemon:file relabelfrom;
allow phhsu_daemon properties_device:dir { map };
allow phhsu_daemon { tmpfs }:dir { mounton };
allow phhsu_daemon { file_type shell_data_file system_file}:file { relabelto relabelfrom} ;
allow phhsu_daemon domain:fd { use };
allow phhsu_daemon domain:unix_stream_socket { connectto ioctl getattr getopt read write shutdown };
allow phhsu_daemon self:netlink_kobject_uevent_socket create_socket_perms;
allow phhsu_daemon self:{ netlink_tcpdiag_socket } { create_socket_perms nlmsg_write nlmsg_read };
allow phhsu_daemon self:{ netlink_selinux_socket } { create_socket_perms };
allow phhsu_daemon file_type:file create_file_perms;
allow phhsu_daemon file_type:dir create_dir_perms;
allow phhsu_daemon domain:process { transition };
# 05-09 00:05:30.149 18450 18450 W lprename: type=1400 audit(0.0:40923): avc: denied { ioctl } for path="/dev/block/sda25" dev="tmpfs" ino=19441 ioctlcmd=0x1278 scontext=u:r:phhsu_daemon:s0 tcontext=u:object_r:super_block_device:s0 tclass=blk_file permissive=0
# 06-06 12:59:53.775 30150 30150 I auditd : type=1400 audit(0.0:35585): avc: denied { ioctl } for comm="blockdev" path="/dev/block/dm-3" dev="tmpfs" ino=12687 ioctlcmd=0x125d scontext=u:r:phhsu_daemon:s0 tcontext=u:object_r:dm_device:s0 tclass=blk_file permissive=0
allowxperm phhsu_daemon { file_type block_device }:blk_file ioctl { 0-0xffff };
allowxperm phhsu_daemon { system_block_device super_block_device dm_device }:blk_file ioctl { 0x1278-0x127a 0x125d };

View File

@ -0,0 +1,45 @@
allow system_app hal_wifi_hostapd_hwservice:hwservice_manager { add find };
allow system_app hidl_base_hwservice:hwservice_manager { add };
allow system_app wifi_data_file:dir create_dir_perms;
allow system_app wifi_data_file:file create_file_perms;
allow system_app sysfs_batteryinfo:file rw_file_perms;
type vendor_camera_prop, property_type;
set_prop(system_app, vendor_camera_prop);
type camera_prop, property_type;
set_prop(system_app, camera_prop);
type hal_ext_fingerprint_hwservice, hwservice_manager_type;
allow system_app hal_ext_fingerprint_hwservice:hwservice_manager { find };
type hal_fingerprint_default, domain;
allow system_app hal_fingerprint_default:binder { call };
allow system_app sysfs_power:dir r_dir_perms;
allow system_app sysfs_power:file rw_file_perms;
allow system_app sysfs_power:lnk_file read;
type default_hisi_hwservice, hwservice_manager_type;
allow system_app default_hisi_hwservice:hwservice_manager { find };
type hal_tp_default, domain;
allow system_app hal_tp_default:binder { call };
#cam2api
allow system_app vendor_default_prop:property_service { set };
set_prop(system_app, default_prop);
#set_prop(system_app, exported3_default_prop);
set_prop(system_app, telephony_config_prop);
type mtk_hal_rild_hwservice, hwservice_manager_type;
allow system_app mtk_hal_rild_hwservice:hwservice_manager { find};
type mtk_vilte_support_prop, property_type;
allow system_app mtk_vilte_support_prop:property_service set;
type hal_gesturewake_hwservice, hwservice_manager_type;
type hal_gesturewake_default, domain;
allow system_app hal_gesturewake_hwservice:hwservice_manager { find };
allow system_app hal_gesturewake_default:binder { call transfer };
allow hal_gesturewake_default system_app:binder { call transfer };

View File

@ -0,0 +1,27 @@
type vndk_detect, coredomain, domain;
type vndk_detect_exec, exec_type, file_type;
init_daemon_domain(vndk_detect);
allow vndk_detect sepolicy_file:file r_file_perms;
set_prop(vndk_detect,system_prop);
set_prop(vndk_detect,debug_prop);
allow vndk_detect shell_exec:file rx_file_perms;
allow vndk_detect toolbox_exec:file rx_file_perms;
#/system/bin/grep
allow vndk_detect system_file:file rx_file_perms;
#mount -o bind /system/bin/adbd /sbin/adbd
allow vndk_detect adbd_exec:file { getattr read };
allow vndk_detect rootfs:file { mounton getattr };
allow vndk_detect self:capability { sys_admin };
#mount -o bind /system/etc/usb_audio_policy_configuration.xml /vendor/etc/usb_audio_policy_configuration.xml
allow init vendor_configs_file:file { getattr mounton };
#/sys/module/five
allow vndk_detect sysfs:file r_file_perms;
allow vndk_detect sysfs:dir r_dir_perms;
#/proc/filesystems
allow vndk_detect proc_filesystems:file r_file_perms;

2
duoqin/sepolicy/vold.te Normal file
View File

@ -0,0 +1,2 @@
allow vold system_data_file:lnk_file { unlink };
allow mediaextractor sdcard_type:file read;

View File

@ -1,3 +0,0 @@
# wephone service
type wephone, domain;
type wephone_exec, exec_type, vendor_file_type, file_type;

12
duoqin/sepolicy/xiaomi.te Normal file
View File

@ -0,0 +1,12 @@
type vendor_sysfs_displayfeature, domain, mlstrustedobject;
allow platform_app vendor_sysfs_displayfeature:dir search;
allow platform_app vendor_sysfs_displayfeature:file write;
allow platform_app vendor_sysfs_displayfeature:file open;
allow platform_app vendor_sysfs_displayfeature:file getattr;
type sysfs_tp_fodstatus, property_type;
allow shell sysfs_tp_fodstatus:file getattr;
allow shell vendor_sysfs_displayfeature:dir search;

11
duoqin/su/Android.mk Normal file
View File

@ -0,0 +1,11 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := su
LOCAL_MODULE := phh-su
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_INIT_RC := su.rc
include $(BUILD_PREBUILT)

BIN
duoqin/su/su Executable file

Binary file not shown.

2
duoqin/su/su.rc Normal file
View File

@ -0,0 +1,2 @@
service sudaemon /system/bin/phh-su --daemon
class main

View File

@ -1,3 +0,0 @@
#!/system/bin/sh
touch /mnt/wephone_script

View File

@ -1,2 +1,2 @@
on early-boot on post-fs
exec - root -- /vendor/bin/wephone-boot.sh exec - root -- /system/bin/wephone.sh

3
duoqin/wephone.sh Executable file
View File

@ -0,0 +1,3 @@
#!/system/bin/sh
touch /mnt/banana