gs-common: Orbital strike
Change-Id: I4eda94046518808d7913d1aab421c1d1882a02bd
This commit is contained in:
22
16kb/16kb.mk
22
16kb/16kb.mk
@@ -1,22 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2025 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.
|
|
||||||
#
|
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
# WARNING: Any rule defined here automatically gets inherited for
|
|
||||||
# *BOTH* 4 KB and 16 KB targets where this file is included.
|
|
||||||
#######################################################################
|
|
||||||
|
|
||||||
PRODUCT_PACKAGES += copy_efs_files_to_data
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package {
|
|
||||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
||||||
}
|
|
||||||
|
|
||||||
// Filesystem: Copy efs/efs_backup/modem_userdata to /data partition
|
|
||||||
// so that they can be accessed under 16K mode. By default, these partitions
|
|
||||||
// are 4K F2FS , which can't be mounted under 16K mode.
|
|
||||||
// (b/293313353)
|
|
||||||
sh_binary {
|
|
||||||
name: "copy_efs_files_to_data",
|
|
||||||
src: "copy_efs_files_to_data.sh",
|
|
||||||
vendor: true,
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
// Copyright (C) 2025 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.
|
|
||||||
|
|
||||||
package {
|
|
||||||
default_applicable_licenses: ["device_google_gs-common_license"],
|
|
||||||
}
|
|
||||||
|
|
||||||
java_test_host {
|
|
||||||
name: "CopyEfsTest",
|
|
||||||
// Include all test java files
|
|
||||||
srcs: ["src/**/*.java"],
|
|
||||||
static_libs: [
|
|
||||||
"junit",
|
|
||||||
"platform-test-annotations",
|
|
||||||
"truth",
|
|
||||||
],
|
|
||||||
libs: [
|
|
||||||
"tradefed",
|
|
||||||
"compatibility-host-util",
|
|
||||||
"compatibility-tradefed",
|
|
||||||
],
|
|
||||||
test_suites: [
|
|
||||||
"device-tests",
|
|
||||||
"device-pixel-tests",
|
|
||||||
],
|
|
||||||
test_config: "AndroidTest.xml",
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
~ Copyright (C) 2025 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.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<configuration description="Runs 16K developer option test.">
|
|
||||||
<option name="test-suite-tag" value="apct"/>
|
|
||||||
|
|
||||||
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
|
|
||||||
<option name="force-root" value="true" />
|
|
||||||
</target_preparer>
|
|
||||||
|
|
||||||
<test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
|
|
||||||
<option name="jar" value="CopyEfsTest.jar" />
|
|
||||||
</test>
|
|
||||||
|
|
||||||
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
|
|
||||||
<!-- Unlock screen -->
|
|
||||||
<option name="run-command" value="input keyevent KEYCODE_WAKEUP" />
|
|
||||||
<!-- Dismiss keyguard, in case it's set as "Swipe to unlock" -->
|
|
||||||
<option name="run-command" value="wm dismiss-keyguard" />
|
|
||||||
<!-- Collapse notifications -->
|
|
||||||
<option name="run-command" value="cmd statusbar collapse" />
|
|
||||||
<!-- dismiss all system dialogs before launch test -->
|
|
||||||
<option name="run-command" value="am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS" />
|
|
||||||
</target_preparer>
|
|
||||||
|
|
||||||
</configuration>
|
|
||||||
@@ -1,130 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2025 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.android.test;
|
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
import static org.junit.Assume.assumeTrue;
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.After;
|
|
||||||
|
|
||||||
import android.platform.test.annotations.AppModeFull;
|
|
||||||
|
|
||||||
import com.android.tradefed.device.DeviceNotAvailableException;
|
|
||||||
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
|
|
||||||
import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
|
|
||||||
import com.android.tradefed.testtype.junit4.DeviceTestRunOptions;
|
|
||||||
import com.android.tradefed.util.CommandResult;
|
|
||||||
import com.android.tradefed.util.RunUtil;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.StringReader;
|
|
||||||
|
|
||||||
@RunWith(DeviceJUnit4ClassRunner.class)
|
|
||||||
public class CopyEfsTest extends BaseHostJUnit4Test {
|
|
||||||
|
|
||||||
@Before
|
|
||||||
public void setUp() throws Exception {
|
|
||||||
getDevice().enableAdbRoot();
|
|
||||||
|
|
||||||
getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test");
|
|
||||||
getDevice().executeShellCommand("mkdir -p /data/local/tmp/efs_test/mnt");
|
|
||||||
getDevice().executeShellCommand("mkdir -p /data/local/tmp/efs_test/dump");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
@AppModeFull
|
|
||||||
public void copyEfsTest() throws Exception {
|
|
||||||
assumeTrue(getDevice().executeShellCommand("getconf PAGESIZE").trim().equals("4096"));
|
|
||||||
|
|
||||||
testDumpF2FS("efs");
|
|
||||||
testDumpF2FS("efs_backup");
|
|
||||||
testDumpF2FS("modem_userdata");
|
|
||||||
testDumpF2FS("persist");
|
|
||||||
}
|
|
||||||
|
|
||||||
private CommandResult RunAndCheckAdbCmd(String cmd) throws DeviceNotAvailableException {
|
|
||||||
CommandResult r = getDevice().executeShellV2Command(cmd);
|
|
||||||
assertEquals("Failed to run " + cmd, Integer.valueOf(0), r.getExitCode());
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove timestamps because ls on device does not support --time-style.
|
|
||||||
// Format is [permissions] [links] [uid] [gid] [size] time [name/symlink]
|
|
||||||
// time may vary greatly in formatting
|
|
||||||
// symlinks will be of the form a -> b
|
|
||||||
// So we can check for -> in the second to last spot to determine what position the timestamp ends at
|
|
||||||
// Remove totals because on disk block usage may change depending on filesystem
|
|
||||||
private String removeTimestamps(String input) {
|
|
||||||
StringBuilder output = new StringBuilder();
|
|
||||||
for (String line : input.split("\n")) {
|
|
||||||
String[] tokens = line.split("(?<![\\\\])\\s+");
|
|
||||||
if (tokens[0].equals("total"))
|
|
||||||
continue;
|
|
||||||
if (tokens.length < 3) {
|
|
||||||
output.append(line + "\n");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
int name_offset = 1;
|
|
||||||
if (tokens[tokens.length - 2].equals("->"))
|
|
||||||
name_offset = 3;
|
|
||||||
for (int i=0; i<tokens.length; i++) {
|
|
||||||
if (i >= 5 && i < tokens.length - name_offset)
|
|
||||||
continue;
|
|
||||||
if (i != 0)
|
|
||||||
output.append(" ");
|
|
||||||
output.append(tokens[i]);
|
|
||||||
}
|
|
||||||
output.append("\n");
|
|
||||||
}
|
|
||||||
return output.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void testDumpF2FS(String name) throws Exception {
|
|
||||||
RunAndCheckAdbCmd(String.format("cp /dev/block/by-name/%s /data/local/tmp/efs_test/%s.img", name, name));
|
|
||||||
|
|
||||||
// The device was mounted r/w. To get a clean image, we run fsck, and then mount to allow mount time fixes to happen.
|
|
||||||
// We can then dump and mount read only to ensure the contents should be the same.
|
|
||||||
RunAndCheckAdbCmd(String.format("fsck.f2fs -f /data/local/tmp/efs_test/%s.img", name));
|
|
||||||
RunAndCheckAdbCmd(String.format("mount /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name));
|
|
||||||
RunAndCheckAdbCmd("umount /data/local/tmp/efs_test/mnt");
|
|
||||||
|
|
||||||
RunAndCheckAdbCmd(String.format("dump.f2fs -rfPLo /data/local/tmp/efs_test/dump /data/local/tmp/efs_test/%s.img", name));
|
|
||||||
RunAndCheckAdbCmd(String.format("mount -r /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name));
|
|
||||||
|
|
||||||
CommandResult r = RunAndCheckAdbCmd("diff -rq --no-dereference /data/local/tmp/efs_test/mnt /data/local/tmp/efs_test/dump");
|
|
||||||
assertEquals(r.getStdout(), "");
|
|
||||||
|
|
||||||
String ls_cmd = "cd /data/local/tmp/efs_test/%s;ls -AlnR .";
|
|
||||||
CommandResult mnt_ls = RunAndCheckAdbCmd(String.format(ls_cmd, "mnt"));
|
|
||||||
CommandResult dump_ls = RunAndCheckAdbCmd(String.format(ls_cmd, "dump"));
|
|
||||||
assertEquals(removeTimestamps(mnt_ls.getStdout()), removeTimestamps(dump_ls.getStdout()));
|
|
||||||
|
|
||||||
getDevice().executeShellCommand("umount /data/local/tmp/efs_test/mnt");
|
|
||||||
getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test/dump/*");
|
|
||||||
getDevice().executeShellCommand("rm /data/local/tmp/efs_test/" + name + ".img");
|
|
||||||
}
|
|
||||||
|
|
||||||
@After
|
|
||||||
public void tearDown() throws Exception {
|
|
||||||
getDevice().executeShellCommand("umount /data/local/tmp/efs_test/mnt");
|
|
||||||
getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
#!/vendor/bin/sh
|
|
||||||
|
|
||||||
CHECKPOINT_DIR=/data/vendor/copied
|
|
||||||
|
|
||||||
export BIN_DIR=/vendor/bin
|
|
||||||
|
|
||||||
$BIN_DIR/mkdir -p $CHECKPOINT_DIR
|
|
||||||
|
|
||||||
function copy_files_to_data()
|
|
||||||
{
|
|
||||||
block_device=$1
|
|
||||||
partition_name=$(basename $1)
|
|
||||||
mount_point=$2
|
|
||||||
tmpdir=$CHECKPOINT_DIR/$partition_name.img
|
|
||||||
build_checkpoint=$CHECKPOINT_DIR/$partition_name
|
|
||||||
if [ ! -e $build_checkpoint ]; then
|
|
||||||
$BIN_DIR/rm -rf $tmpdir
|
|
||||||
$BIN_DIR/mkdir -p $tmpdir
|
|
||||||
$BIN_DIR/dump.f2fs -rfPLo $tmpdir $block_device
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Failed to $BIN_DIR/dump.f2fs -rfPLo $tmpdir $block_device"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
$BIN_DIR/mv $tmpdir $build_checkpoint
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "mv $tmpdir $build_checkpoint"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
$BIN_DIR/fsync `dirname $build_checkpoint`
|
|
||||||
fi
|
|
||||||
echo "Successfully copied $mount_point to $build_checkpoint"
|
|
||||||
}
|
|
||||||
|
|
||||||
copy_files_to_data "/dev/block/by-name/efs" "/mnt/vendor/efs"
|
|
||||||
copy_files_to_data "/dev/block/by-name/efs_backup" "/mnt/vendor/efs_backup"
|
|
||||||
copy_files_to_data "/dev/block/by-name/modem_userdata" "/mnt/vendor/modem_userdata"
|
|
||||||
copy_files_to_data "/dev/block/by-name/persist" "/mnt/vendor/persist"
|
|
||||||
|
|
||||||
$BIN_DIR/fsync /data/vendor/copied
|
|
||||||
15
Android.bp
15
Android.bp
@@ -18,26 +18,11 @@ package {
|
|||||||
default_applicable_licenses: ["device_google_gs-common_license"],
|
default_applicable_licenses: ["device_google_gs-common_license"],
|
||||||
}
|
}
|
||||||
|
|
||||||
// Added automatically by a large-scale-change that took the approach of
|
|
||||||
// 'apply every license found to every target'. While this makes sure we respect
|
|
||||||
// every license restriction, it may not be entirely correct.
|
|
||||||
//
|
|
||||||
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
|
|
||||||
//
|
|
||||||
// Please consider splitting the single license below into multiple licenses,
|
|
||||||
// taking care not to lose any license_kind information, and overriding the
|
|
||||||
// default license using the 'licenses: [...]' property on targets as needed.
|
|
||||||
//
|
|
||||||
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
|
|
||||||
// to attach the license to, and including a comment whether the files may be
|
|
||||||
// used in the current project.
|
|
||||||
// See: http://go/android-license-faq
|
|
||||||
license {
|
license {
|
||||||
name: "device_google_gs-common_license",
|
name: "device_google_gs-common_license",
|
||||||
visibility: [":__subpackages__"],
|
visibility: [":__subpackages__"],
|
||||||
license_kinds: [
|
license_kinds: [
|
||||||
"SPDX-license-identifier-Apache-2.0",
|
"SPDX-license-identifier-Apache-2.0",
|
||||||
"SPDX-license-identifier-BSD",
|
|
||||||
],
|
],
|
||||||
license_text: [
|
license_text: [
|
||||||
"NOTICE",
|
"NOTICE",
|
||||||
|
|||||||
11
FSTAB_OWNERS
11
FSTAB_OWNERS
@@ -1,11 +0,0 @@
|
|||||||
# NOTE: CHANGE THIS FILE WITH CAUTIOUS
|
|
||||||
# - this file is referenced by other OWNERS file, e.g. device/google/*/OWNERS
|
|
||||||
# - changing this file might break the function, check go/gerrit-code-owners-syntax first
|
|
||||||
|
|
||||||
jaegeuk@google.com
|
|
||||||
huangrandall@google.com
|
|
||||||
bvanassche@google.com
|
|
||||||
daehojeong@google.com
|
|
||||||
chullee@google.com
|
|
||||||
vkon@google.com
|
|
||||||
thomasyen@google.com
|
|
||||||
20
MK_OWNERS
20
MK_OWNERS
@@ -1,20 +0,0 @@
|
|||||||
# NOTE: CHANGE THIS FILE WITH CAUTIOUS
|
|
||||||
# - this file is referenced by other OWNERS file, e.g. device/google/*/OWNERS
|
|
||||||
# - changing this file might break the function, check go/gerrit-code-owners-syntax first
|
|
||||||
#
|
|
||||||
# Makefile Review Guide for OWNERS: go/pixel-device-mk-owner-checklist
|
|
||||||
|
|
||||||
aaronding@google.com
|
|
||||||
rurumihong@google.com
|
|
||||||
adamshih@google.com
|
|
||||||
wilsonsung@google.com
|
|
||||||
cyanhsieh@google.com
|
|
||||||
cyuanjen@google.com
|
|
||||||
robinpeng@google.com
|
|
||||||
achant@google.com
|
|
||||||
etam@google.com
|
|
||||||
pattjin@google.com
|
|
||||||
bkhalife@google.com
|
|
||||||
lokeshgoel@google.com
|
|
||||||
jainne@google.com
|
|
||||||
pscovanner@google.com
|
|
||||||
5
OWNERS
5
OWNERS
@@ -1,5 +0,0 @@
|
|||||||
|
|
||||||
per-file *.te,*_contexts,te_macros,global_macros=set noparent
|
|
||||||
per-file *.te,*_contexts,te_macros,global_macros=file:/sepolicy/OWNERS
|
|
||||||
per-file *.mk,{**/,}Android.bp=set noparent
|
|
||||||
per-file *.mk,{**/,}Android.bp=file:MK_OWNERS
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Please refer to go/pixel-recycle to modularize your code in this space.
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package {
|
|
||||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
||||||
}
|
|
||||||
|
|
||||||
cc_binary {
|
|
||||||
name: "dump_aoc",
|
|
||||||
srcs: ["dump_aoc.cpp"],
|
|
||||||
cflags: [
|
|
||||||
"-Wall",
|
|
||||||
"-Wextra",
|
|
||||||
"-Werror",
|
|
||||||
],
|
|
||||||
shared_libs: [
|
|
||||||
"libbase",
|
|
||||||
"libdump",
|
|
||||||
],
|
|
||||||
vendor: true,
|
|
||||||
relative_install_path: "dump",
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/aoc/sepolicy
|
|
||||||
|
|
||||||
PRODUCT_PACKAGES += dump_aoc \
|
|
||||||
aocd \
|
|
||||||
aocxd
|
|
||||||
|
|
||||||
# If AoC Daemon is not present on this build, load firmware at boot via rc
|
|
||||||
PRODUCT_COPY_FILES += \
|
|
||||||
device/google/gs-common/aoc/conf/init.aoc.daemon.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.aoc.rc
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# AoC firmware will be loaded by Daemon
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2022 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.
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <dump/pixel_dump.h>
|
|
||||||
|
|
||||||
// Dump Aoc.
|
|
||||||
int main() {
|
|
||||||
setbuf(stdout, NULL);
|
|
||||||
runCommand("AoC Service Status", "timeout 0.1 cat /sys/devices/platform/*.aoc/services");
|
|
||||||
runCommand("AoC Restarts", "timeout 0.1 cat /sys/devices/platform/*.aoc/restart_count");
|
|
||||||
runCommand("AoC Coredumps", "timeout 0.1 cat /sys/devices/platform/*.aoc/coredump_count");
|
|
||||||
runCommand("AoC ring buf wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/ring_buffer_wakeup");
|
|
||||||
runCommand("AoC host ipc wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/host_ipc_wakeup");
|
|
||||||
runCommand("AoC usf wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/usf_wakeup");
|
|
||||||
runCommand("AoC audio wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/audio_wakeup");
|
|
||||||
runCommand("AoC logging wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/logging_wakeup");
|
|
||||||
runCommand("AoC hotword wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/hotword_wakeup");
|
|
||||||
runCommand("AoC memory exception wake", "timeout 0.1 cat /sys/devices/platform/*.aoc/control/memory_exception");
|
|
||||||
runCommand("AoC memory votes", "timeout 0.5 cat /sys/devices/platform/*.aoc/control/memory_votes_a32");
|
|
||||||
runCommand("AoC memory votes", "timeout 0.5 cat /sys/devices/platform/*.aoc/control/memory_votes_ff1");
|
|
||||||
runCommand("clean AoC buffer","echo ' ' > /dev/acd-debug; timeout 0.1 cat /dev/acd-debug");
|
|
||||||
runCommand("AoC DVFS (A32)", "echo 'dbg info -c 1 DVFSA32' > /dev/acd-debug; timeout 0.1 cat /dev/acd-debug");
|
|
||||||
runCommand("AoC DVFS (FF1)", "echo 'dbg info -c 2 DVFSFF1' > /dev/acd-debug; timeout 0.1 cat /dev/acd-debug");
|
|
||||||
runCommand("AoC Monitor Mode Status", "echo 'monitor_mode status' > /dev/acd-debug; timeout 0.1 cat /dev/acd-debug");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
type aocd, domain;
|
|
||||||
type aocd_exec, vendor_file_type, exec_type, file_type;
|
|
||||||
init_daemon_domain(aocd)
|
|
||||||
|
|
||||||
# access persist files
|
|
||||||
allow aocd mnt_vendor_file:dir search;
|
|
||||||
allow aocd persist_file:dir search;
|
|
||||||
r_dir_file(aocd, persist_aoc_file);
|
|
||||||
|
|
||||||
# sysfs operations
|
|
||||||
allow aocd sysfs_aoc:dir search;
|
|
||||||
allow aocd sysfs_aoc_firmware:file w_file_perms;
|
|
||||||
allow aocd sysfs_aoc_notifytimeout:file r_file_perms;
|
|
||||||
|
|
||||||
# dev operations
|
|
||||||
allow aocd aoc_device:chr_file rw_file_perms;
|
|
||||||
|
|
||||||
# allow inotify to watch for additions/removals from /dev
|
|
||||||
allow aocd device:dir r_dir_perms;
|
|
||||||
|
|
||||||
# set properties
|
|
||||||
set_prop(aocd, vendor_aoc_prop)
|
|
||||||
set_prop(aocd, vendor_timeout_aoc_prop)
|
|
||||||
get_prop(aocd, vendor_volte_mif_off)
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
type aocdump, domain;
|
|
||||||
type aocdump_exec, vendor_file_type, exec_type, file_type;
|
|
||||||
init_daemon_domain(aocdump)
|
|
||||||
|
|
||||||
userdebug_or_eng(`
|
|
||||||
# Permit communication with AoC
|
|
||||||
allow aocdump aoc_device:chr_file rw_file_perms;
|
|
||||||
|
|
||||||
allow aocdump radio_vendor_data_file:dir rw_dir_perms;
|
|
||||||
allow aocdump radio_vendor_data_file:file create_file_perms;
|
|
||||||
allow aocdump wifi_logging_data_file:dir create_dir_perms;
|
|
||||||
allow aocdump wifi_logging_data_file:file create_file_perms;
|
|
||||||
set_prop(aocdump, vendor_audio_prop);
|
|
||||||
r_dir_file(aocdump, proc_asound)
|
|
||||||
|
|
||||||
allow aocdump self:unix_stream_socket create_stream_socket_perms;
|
|
||||||
allow aocdump audio_vendor_data_file:sock_file { create unlink };
|
|
||||||
')
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
# aocxd server domain
|
|
||||||
type aocxd, domain;
|
|
||||||
type aocxd_exec, vendor_file_type, exec_type, file_type;
|
|
||||||
init_daemon_domain(aocxd)
|
|
||||||
|
|
||||||
# sysfs operations
|
|
||||||
allow aocxd sysfs_aoc:dir search;
|
|
||||||
|
|
||||||
# dev operations
|
|
||||||
allow aocxd aoc_device:chr_file rw_file_perms;
|
|
||||||
|
|
||||||
# allow inotify to watch for additions/removals from /dev
|
|
||||||
allow aocxd device:dir r_dir_perms;
|
|
||||||
|
|
||||||
# set properties
|
|
||||||
set_prop(aocxd, vendor_aoc_prop);
|
|
||||||
|
|
||||||
# allow binder access
|
|
||||||
vndbinder_use(aocxd);
|
|
||||||
|
|
||||||
# allow managing wakelocks
|
|
||||||
wakelock_use(aocxd);
|
|
||||||
|
|
||||||
# add aocx service to the domain
|
|
||||||
add_service(aocxd, aocx);
|
|
||||||
|
|
||||||
# allow managing thread priority
|
|
||||||
allow aocxd self:global_capability_class_set sys_nice;
|
|
||||||
|
|
||||||
allow aocxd dumpstate:fd use;
|
|
||||||
allow aocxd dumpstate:fifo_file write;
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# AOC device
|
|
||||||
type aoc_device, dev_type;
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
pixel_bugreport(dump_aoc)
|
|
||||||
allow dump_aoc sysfs_aoc:dir search;
|
|
||||||
allow dump_aoc sysfs:dir r_dir_perms;
|
|
||||||
allow dump_aoc sysfs_aoc_dumpstate:file r_file_perms;
|
|
||||||
allow dump_aoc aoc_device:chr_file rw_file_perms;
|
|
||||||
allow dump_aoc vendor_shell_exec:file execute_no_trans;
|
|
||||||
allow dump_aoc vendor_toolbox_exec:file execute_no_trans;
|
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# Allow dumpstate to talk to aocxd over binder
|
|
||||||
binder_call(dumpstate, aocxd)
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# sysfs
|
|
||||||
type sysfs_aoc_dumpstate, sysfs_type, fs_type;
|
|
||||||
type sysfs_aoc_boottime, sysfs_type, fs_type;
|
|
||||||
type sysfs_aoc_firmware, sysfs_type, fs_type;
|
|
||||||
type sysfs_aoc, sysfs_type, fs_type;
|
|
||||||
type sysfs_aoc_reset, sysfs_type, fs_type;
|
|
||||||
type sysfs_aoc_notifytimeout, sysfs_type, fs_type;
|
|
||||||
|
|
||||||
# persist
|
|
||||||
type persist_aoc_file, file_type, vendor_persist_type;
|
|
||||||
|
|
||||||
# vendor
|
|
||||||
type aoc_audio_file, file_type, vendor_file_type;
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
# AoC devices
|
|
||||||
/dev/acd-audio_output_tuning u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-audio_bulk_tx u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-audio_bulk_rx u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-audio_input_tuning u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-audio_input_bulk_tx u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-audio_input_bulk_rx u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-audio_rtp_tx u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-audio_rtp_rx u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-sound_trigger u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-hotword_notification u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-hotword_pcm u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-ambient_pcm u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-model_data u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-debug u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-audio_tap[0-9]* u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-audio_dcdoff_ref u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-com.google.umfw_stat u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-com.google.usf u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-com.google.usf.non_wake_up u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-com.google.chre u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-com.google.chre.non_wake_up u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-com.google.bt u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-com.google.bt.non_wake_up u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-logging u:object_r:aoc_device:s0
|
|
||||||
/dev/aoc u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-audio_ap_offload_rx u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-audio_ap_offload_tx u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-mel_processor u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-aocx_control u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-aocx_inject[0-9]* u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-aocx_tapout[0-9]* u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-mc_headpos u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-chre_bt_offload_ctl u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-chre_bt_offload_data_tx u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-chre_bt_offload_data_rx u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-chre_ctl u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-chre_data_tx u:object_r:aoc_device:s0
|
|
||||||
/dev/acd-chre_data_rx u:object_r:aoc_device:s0
|
|
||||||
|
|
||||||
# AoC vendor binaries
|
|
||||||
/vendor/bin/aocd u:object_r:aocd_exec:s0
|
|
||||||
/vendor/bin/aocdump u:object_r:aocdump_exec:s0
|
|
||||||
/vendor/bin/dump/dump_aoc u:object_r:dump_aoc_exec:s0
|
|
||||||
/vendor/bin/aocxd u:object_r:aocxd_exec:s0
|
|
||||||
|
|
||||||
# AoC audio files
|
|
||||||
/vendor/etc/aoc(/.*)? u:object_r:aoc_audio_file:s0
|
|
||||||
|
|
||||||
# Aoc persist files
|
|
||||||
/mnt/vendor/persist/aoc(/.*)? u:object_r:persist_aoc_file:s0
|
|
||||||
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# AoC
|
|
||||||
vendor_internal_prop(vendor_aoc_prop)
|
|
||||||
vendor_internal_prop(vendor_timeout_aoc_prop)
|
|
||||||
vendor_internal_prop(vendor_volte_mif_off)
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# AoC
|
|
||||||
vendor.aoc.firmware.version u:object_r:vendor_aoc_prop:s0
|
|
||||||
persist.vendor.aoc.status_request_timed_out u:object_r:vendor_timeout_aoc_prop:s0
|
|
||||||
persist.vendor.radio.volte_mif_off u:object_r:vendor_volte_mif_off:s0
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
type aocx, service_manager_type;
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
aocx.IAocx/default u:object_r:aocx:s0
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
|
|
||||||
DEVICE_MANIFEST_FILE += device/google/gs-common/audio/aidl/manifest.xml
|
|
||||||
|
|
||||||
# Audio HALs
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
android.hardware.audio.service-aidl.aoc \
|
|
||||||
vendor.google.whitechapel.audio.hal.parserservice \
|
|
||||||
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
libvisualizeraidl \
|
|
||||||
libbundleaidl \
|
|
||||||
libreverbaidl \
|
|
||||||
libdynamicsprocessingaidl \
|
|
||||||
libloudnessenhanceraidl \
|
|
||||||
libdownmixaidl \
|
|
||||||
libhapticgeneratoraidl \
|
|
||||||
|
|
||||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/aidl
|
|
||||||
ifeq ($(AUDIO_USE_DPTX_SEPOLICY),true)
|
|
||||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hdmi_audio/dptx
|
|
||||||
else
|
|
||||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hdmi_audio/drmdp
|
|
||||||
endif
|
|
||||||
|
|
||||||
include device/google/gs-common/audio/common.mk
|
|
||||||
|
|
||||||
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/audio/aidl/device_framework_matrix_product.xml
|
|
||||||
|
|
||||||
PRODUCT_PROPERTY_OVERRIDES += \
|
|
||||||
vendor.audio_hal.aidl.enable=true
|
|
||||||
PRODUCT_SYSTEM_EXT_PROPERTIES += \
|
|
||||||
ro.audio.ihaladaptervendorextension_enabled=true
|
|
||||||
|
|
||||||
$(call soong_config_set,pixel_audio_hal_type,aidl_build,true)
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<compatibility-matrix version="1.0" type="framework">
|
|
||||||
<hal format="aidl">
|
|
||||||
<name>vendor.google.whitechapel.audio.extension</name>
|
|
||||||
<version>4-6</version>
|
|
||||||
<interface>
|
|
||||||
<name>IAudioExtension</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
</compatibility-matrix>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<manifest version="1.0" type="device">
|
|
||||||
</manifest>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/common
|
|
||||||
|
|
||||||
#Audio Vendor libraries
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
libfvsam_prm_parser \
|
|
||||||
libmahalcontroller
|
|
||||||
|
|
||||||
ifeq ($(USE_MAM_V4_ABOVE),true)
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
libMAM_Google_Pixel_Android
|
|
||||||
else
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
libAlgFx_HiFi3z
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(call soong_config_set,aoc_audio_board,platform,$(TARGET_BOARD_PLATFORM))
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<compatibility-matrix version="1.0" type="framework">
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>vendor.google.whitechapel.audio.audioext</name>
|
|
||||||
<version>4.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IAudioExt</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>vendor.google.audiometricext</name>
|
|
||||||
<version>1.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IAudioMetricExt</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
</compatibility-matrix>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<compatibility-matrix version="1.0" type="framework" level="6">
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>vendor.google.whitechapel.audio.audioext</name>
|
|
||||||
<version>4.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IAudioExt</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>vendor.google.audiometricext</name>
|
|
||||||
<version>1.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IAudioMetricExt</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
</compatibility-matrix>
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
<manifest version="1.0" type="device">
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>android.hardware.audio</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>7.1</version>
|
|
||||||
<interface>
|
|
||||||
<name>IDevicesFactory</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>android.hardware.audio.effect</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>7.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IEffectsFactory</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>android.hardware.soundtrigger</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>2.3</version>
|
|
||||||
<interface>
|
|
||||||
<name>ISoundTriggerHw</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>vendor.google.whitechapel.audio.audioext</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>4.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IAudioExt</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>vendor.google.audiometricext</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>1.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IAudioMetricExt</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
</manifest>
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
<manifest version="1.0" type="device" target-level="6">
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>android.hardware.audio</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>7.1</version>
|
|
||||||
<interface>
|
|
||||||
<name>IDevicesFactory</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>android.hardware.audio.effect</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>7.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IEffectsFactory</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>android.hardware.soundtrigger</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>2.3</version>
|
|
||||||
<interface>
|
|
||||||
<name>ISoundTriggerHw</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>vendor.google.whitechapel.audio.audioext</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>4.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IAudioExt</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>vendor.google.audiometricext</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>1.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IAudioMetricExt</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
</manifest>
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
<manifest version="1.0" type="device" target-level="5">
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>android.hardware.audio</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>7.1</version>
|
|
||||||
<interface>
|
|
||||||
<name>IDevicesFactory</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>android.hardware.audio.effect</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>7.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IEffectsFactory</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>android.hardware.soundtrigger</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>2.3</version>
|
|
||||||
<interface>
|
|
||||||
<name>ISoundTriggerHw</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>vendor.google.whitechapel.audio.audioext</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>4.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IAudioExt</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
|
||||||
<name>vendor.google.audiometricext</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>1.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IAudioMetricExt</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
</manifest>
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
DEVICE_MANIFEST_FILE += device/google/gs-common/audio/hidl/manifest_gs101$(LOCAL_64ONLY).xml
|
|
||||||
|
|
||||||
# Audio HAL configurations
|
|
||||||
PRODUCT_COPY_FILES += \
|
|
||||||
frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration_7_0.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration_7_0.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/hearing_aid_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/hearing_aid_audio_policy_configuration_7_0.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml
|
|
||||||
|
|
||||||
# Audio HAL Server & Default Implementations
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
android.hardware.audio.service \
|
|
||||||
android.hardware.audio@7.1-impl \
|
|
||||||
android.hardware.audio.effect@7.0-impl \
|
|
||||||
android.hardware.bluetooth.audio-impl \
|
|
||||||
android.hardware.soundtrigger@2.3-impl \
|
|
||||||
vendor.google.whitechapel.audio.audioext@4.0-impl
|
|
||||||
|
|
||||||
#Audio HAL libraries
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
audio.primary.$(TARGET_BOARD_PLATFORM) \
|
|
||||||
audio.platform.aoc \
|
|
||||||
sound_trigger.primary.$(TARGET_BOARD_PLATFORM) \
|
|
||||||
audio_bt_aoc \
|
|
||||||
audio_tunnel_aoc \
|
|
||||||
aoc_aud_ext \
|
|
||||||
libaoctuningdecoder \
|
|
||||||
libaoc_waves \
|
|
||||||
liboffloadeffect \
|
|
||||||
audio_waves_aoc \
|
|
||||||
audio_fortemedia_aoc \
|
|
||||||
audio_bluenote_aoc \
|
|
||||||
audio_usb_aoc \
|
|
||||||
audio_spk_35l41 \
|
|
||||||
audio.usb.default \
|
|
||||||
audio.usbv2.default \
|
|
||||||
audio.bluetooth.default \
|
|
||||||
audio.r_submix.default \
|
|
||||||
libamcsextfile \
|
|
||||||
audio_amcs_ext \
|
|
||||||
|
|
||||||
ifeq (,$(filter aosp_%,$(TARGET_PRODUCT)))
|
|
||||||
# IAudioMetricExt HIDL
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
vendor.google.audiometricext@1.0-service-vendor
|
|
||||||
endif
|
|
||||||
|
|
||||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hidl
|
|
||||||
|
|
||||||
include device/google/gs-common/audio/common.mk
|
|
||||||
|
|
||||||
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/audio/hidl/device_framework_matrix_product_gs101.xml
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
DEVICE_MANIFEST_FILE += device/google/gs-common/audio/hidl/manifest.xml
|
|
||||||
|
|
||||||
# Audio HAL configurations
|
|
||||||
PRODUCT_COPY_FILES += \
|
|
||||||
frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration_7_0.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration_7_0.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/hearing_aid_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/hearing_aid_audio_policy_configuration_7_0.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
|
|
||||||
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml
|
|
||||||
|
|
||||||
# Audio HAL Server & Default Implementations
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
android.hardware.audio.service \
|
|
||||||
android.hardware.audio@7.1-impl \
|
|
||||||
android.hardware.audio.effect@7.0-impl \
|
|
||||||
android.hardware.soundtrigger@2.3-impl \
|
|
||||||
vendor.google.whitechapel.audio.audioext@4.0-impl \
|
|
||||||
android.hardware.bluetooth.audio-impl \
|
|
||||||
|
|
||||||
#Audio HAL libraries
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
audio.primary.$(TARGET_BOARD_PLATFORM) \
|
|
||||||
audio.platform.aoc \
|
|
||||||
audio_tunnel_aoc \
|
|
||||||
aoc_aud_ext \
|
|
||||||
libaoctuningdecoder \
|
|
||||||
liboffloadeffect \
|
|
||||||
audio_bt_aoc \
|
|
||||||
audio_waves_aoc \
|
|
||||||
audio_fortemedia_aoc \
|
|
||||||
audio_bluenote_aoc \
|
|
||||||
audio_usb_aoc \
|
|
||||||
audio_cca_aoc \
|
|
||||||
libamcsextfile \
|
|
||||||
audio_amcs_ext \
|
|
||||||
audio.usb.default \
|
|
||||||
audio.usbv2.default \
|
|
||||||
audio.bluetooth.default \
|
|
||||||
audio.r_submix.default \
|
|
||||||
audio_spk_35l41 \
|
|
||||||
sound_trigger.primary.$(TARGET_BOARD_PLATFORM)
|
|
||||||
|
|
||||||
ifeq (,$(filter aosp_%,$(TARGET_PRODUCT)))
|
|
||||||
# IAudioMetricExt HIDL
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
vendor.google.audiometricext@1.0-service-vendor
|
|
||||||
endif
|
|
||||||
|
|
||||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hidl
|
|
||||||
|
|
||||||
include device/google/gs-common/audio/common.mk
|
|
||||||
|
|
||||||
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/audio/hidl/device_framework_matrix_product.xml
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Audio Hal AIDL Service for Aoc
|
|
||||||
/vendor/bin/hw/android\.hardware\.audio\.service-aidl\.aoc u:object_r:hal_audio_default_exec:s0
|
|
||||||
/system_ext/bin/hw/vendor\.google\.whitechapel\.audio\.hal\.parserservice u:object_r:hal_audio_parameter_parser_exec:s0
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
add_service(hal_audio_default, hal_audio_ext_service)
|
|
||||||
# Allow audio-hal to register battery_mitigation service
|
|
||||||
allow hal_audio_default hal_battery_mitigation_service:service_manager find;
|
|
||||||
binder_call(hal_audio_default, battery_mitigation)
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Allow access to audio HAL.
|
|
||||||
binder_call(hal_sensors_default, hal_audio_default)
|
|
||||||
allow hal_sensors_default hal_audio_ext_service:service_manager find;
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# Define a parameter parser service
|
|
||||||
type hal_audio_parameter_parser, coredomain, domain;
|
|
||||||
type hal_audio_parameter_parser_exec, system_file_type, file_type, exec_type;
|
|
||||||
init_daemon_domain(hal_audio_parameter_parser)
|
|
||||||
|
|
||||||
# The server will serve a binder service.
|
|
||||||
binder_service(hal_audio_parameter_parser)
|
|
||||||
|
|
||||||
add_service(hal_audio_parameter_parser, hal_audio_parameter_parser_service);
|
|
||||||
|
|
||||||
binder_call(audioserver, hal_audio_parameter_parser)
|
|
||||||
binder_call(hal_audio_parameter_parser, servicemanager)
|
|
||||||
|
|
||||||
allow audioserver hal_audio_parameter_parser_service:service_manager find;
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
allow radio hal_audio_ext_service:service_manager find;
|
|
||||||
binder_call(radio, hal_audio_default)
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
allow rild hal_audio_ext_service:service_manager find;
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Audio
|
|
||||||
type hal_audio_ext_service, hal_service_type, service_manager_type;
|
|
||||||
type hal_audio_parameter_parser_service, service_manager_type;
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Audio
|
|
||||||
vendor.google.whitechapel.audio.extension.IAudioExtension/default u:object_r:hal_audio_ext_service:s0
|
|
||||||
android.media.audio.IHalAdapterVendorExtension/default u:object_r:hal_audio_parameter_parser_service:s0
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# AMCS device
|
|
||||||
type amcs_device, dev_type;
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# persist
|
|
||||||
type persist_audio_file, file_type, vendor_persist_type;
|
|
||||||
|
|
||||||
# data
|
|
||||||
type audio_vendor_data_file, file_type, data_file_type;
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# AMCS devices
|
|
||||||
/dev/amcs u:object_r:amcs_device:s0
|
|
||||||
|
|
||||||
# AMCS vendor service
|
|
||||||
/vendor/bin/hw/vendor\.google\.audiometricext@1\.0-service-vendor u:object_r:hal_audiometricext_default_exec:s0
|
|
||||||
|
|
||||||
# Audio data files
|
|
||||||
/data/vendor/audio(/.*)? u:object_r:audio_vendor_data_file:s0
|
|
||||||
|
|
||||||
# Audio presist file
|
|
||||||
/mnt/vendor/persist/audio(/.*)? u:object_r:persist_audio_file:s0
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# pixelstat_vendor
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/codec_state u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/hs_codec_state u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/speaker_impedance u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/speaker_excursion u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/speaker_heartbeat u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/speaker_temp u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/mic_broken_degrade u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/codec_crashed_counter u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/hwinfo_part_number u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/ams_rate_read_once u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/cca_rate_read_once u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/cca_count_read_once u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/pdm_state u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/waves u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/adapted_info_active_count u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/adapted_info_active_duration u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/pcm_count u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/pcm_latency u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/call_count u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/offload_effects_id u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/offload_effects_duration u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/bt_usage u:object_r:sysfs_pixelstats:s0
|
|
||||||
genfscon sysfs /devices/platform/audiometrics/speaker_version u:object_r:sysfs_pixelstats:s0
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
# allow access to folders
|
|
||||||
allow hal_audio_default audio_vendor_data_file:dir rw_dir_perms;
|
|
||||||
allow hal_audio_default audio_vendor_data_file:file create_file_perms;
|
|
||||||
|
|
||||||
r_dir_file(hal_audio_default, aoc_audio_file);
|
|
||||||
r_dir_file(hal_audio_default, mnt_vendor_file);
|
|
||||||
r_dir_file(hal_audio_default, persist_audio_file);
|
|
||||||
|
|
||||||
allow hal_audio_default persist_file:dir search;
|
|
||||||
allow hal_audio_default aoc_device:file rw_file_perms;
|
|
||||||
allow hal_audio_default aoc_device:chr_file rw_file_perms;
|
|
||||||
|
|
||||||
allow hal_audio_default amcs_device:file rw_file_perms;
|
|
||||||
allow hal_audio_default amcs_device:chr_file rw_file_perms;
|
|
||||||
allow hal_audio_default sysfs_pixelstats:file rw_file_perms;
|
|
||||||
allow hal_audio_default sysfs_extcon:dir search;
|
|
||||||
allow hal_audio_default sysfs_extcon:file r_file_perms;
|
|
||||||
allow hal_audio_default vendor_usb_debugfs:dir search;
|
|
||||||
|
|
||||||
#allow access to aoc and kernel boottime
|
|
||||||
allow hal_audio_default sysfs_aoc:dir { search };
|
|
||||||
allow hal_audio_default sysfs_aoc_boottime:file r_file_perms;
|
|
||||||
|
|
||||||
#allow access to DMABUF Heaps for AAudio API
|
|
||||||
allow hal_audio_default dmabuf_heap_device:chr_file r_file_perms;
|
|
||||||
|
|
||||||
set_prop(hal_audio_default, vendor_audio_prop);
|
|
||||||
set_prop(hal_audio_default, vendor_audio_prop_restricted);
|
|
||||||
|
|
||||||
hal_client_domain(hal_audio_default, hal_health);
|
|
||||||
hal_client_domain(hal_audio_default, hal_thermal);
|
|
||||||
allow hal_audio_default fwk_sensor_hwservice:hwservice_manager find;
|
|
||||||
|
|
||||||
hal_client_domain(hal_audio_default, hal_graphics_allocator);
|
|
||||||
|
|
||||||
userdebug_or_eng(`
|
|
||||||
allow hal_audio_default self:unix_stream_socket create_stream_socket_perms;
|
|
||||||
allow hal_audio_default audio_vendor_data_file:sock_file { create unlink };
|
|
||||||
')
|
|
||||||
|
|
||||||
wakelock_use(hal_audio_default);
|
|
||||||
|
|
||||||
vndbinder_use(hal_audio_default);
|
|
||||||
allow hal_audio_default aocx:service_manager find;
|
|
||||||
binder_call(hal_audio_default, aocxd);
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
type hal_audiometricext_default, domain;
|
|
||||||
type hal_audiometricext_default_exec, vendor_file_type, exec_type, file_type;
|
|
||||||
init_daemon_domain(hal_audiometricext_default)
|
|
||||||
|
|
||||||
allow hal_audiometricext_default amcs_device:chr_file rw_file_perms;
|
|
||||||
allow hal_audiometricext_default sysfs_pixelstats:file rw_file_perms;
|
|
||||||
|
|
||||||
get_prop(hal_audiometricext_default, vendor_audio_prop);
|
|
||||||
get_prop(hal_audiometricext_default, hwservicemanager_prop);
|
|
||||||
|
|
||||||
hwbinder_use(hal_audiometricext_default);
|
|
||||||
add_hwservice(hal_audiometricext_default, hal_audiometricext_hwservice);
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# AudioMetric
|
|
||||||
type hal_audiometricext_hwservice, hwservice_manager_type;
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Audio
|
|
||||||
vendor.google.audiometricext::IAudioMetricExt u:object_r:hal_audiometricext_hwservice:s0
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# Audio
|
|
||||||
vendor_internal_prop(vendor_audio_prop)
|
|
||||||
|
|
||||||
# The property for Audio App
|
|
||||||
vendor_restricted_prop(vendor_audio_prop_restricted)
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# for serial no
|
|
||||||
vendor.audio_hal.device.serialno u:object_r:vendor_audio_prop:s0
|
|
||||||
|
|
||||||
# for audio
|
|
||||||
vendor.audio_hal.period_multiplier u:object_r:vendor_audio_prop:s0
|
|
||||||
vendor.audiodump.enable u:object_r:vendor_audio_prop:s0
|
|
||||||
persist.vendor.audio. u:object_r:vendor_audio_prop:s0
|
|
||||||
vendor.audiodump.log.ondemand u:object_r:vendor_audio_prop:s0
|
|
||||||
vendor.audiodump.log.config u:object_r:vendor_audio_prop:s0
|
|
||||||
vendor.audiodump.output.dir u:object_r:vendor_audio_prop:s0
|
|
||||||
vendor.audiodump.encode.disable u:object_r:vendor_audio_prop:s0
|
|
||||||
vendor.audiodump.log.cca.updated u:object_r:vendor_audio_prop:s0
|
|
||||||
vendor.audiodump.cca.config u:object_r:vendor_audio_prop:s0
|
|
||||||
vendor.audio_hal.aidl.enable u:object_r:vendor_audio_prop:s0
|
|
||||||
|
|
||||||
# for audio app
|
|
||||||
persist.vendor.app.audio. u:object_r:vendor_audio_prop_restricted:s0
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
get_prop(rild, vendor_audio_prop);
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# Audio property
|
|
||||||
set_prop(vendor_init, vendor_audio_prop)
|
|
||||||
|
|
||||||
# Audio App property
|
|
||||||
set_prop(vendor_init, vendor_audio_prop_restricted)
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
genfscon sysfs /devices/platform/dwc_dptx-audio/extcon/hdmi_audio u:object_r:sysfs_extcon:s0
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
genfscon sysfs /devices/platform/drmdp-adma/extcon/hdmi_audio u:object_r:sysfs_extcon:s0
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
hwbinder_use(hal_audio_default)
|
|
||||||
|
|
||||||
add_hwservice(hal_audio_default, hal_audio_ext_hwservice)
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# Audio
|
|
||||||
type hal_audio_ext_hwservice, hwservice_manager_type;
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# Audio
|
|
||||||
vendor.google.whitechapel.audio.audioext::IAudioExt u:object_r:hal_audio_ext_hwservice:s0
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
allow radio hal_audio_ext_hwservice:hwservice_manager find;
|
|
||||||
binder_call(radio, hal_audio_default)
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
allow rild hal_audio_ext_hwservice:hwservice_manager find;
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
ifeq (,$(filter factory_%,$(TARGET_PRODUCT)))
|
|
||||||
PRODUCT_PACKAGES += battery_mitigation
|
|
||||||
endif
|
|
||||||
|
|
||||||
PRODUCT_PROPERTY_OVERRIDES += \
|
|
||||||
vendor.battery_mitigation.aidl.enable=true
|
|
||||||
|
|
||||||
PRODUCT_SOONG_NAMESPACES += device/google/gs-common/battery_mitigation
|
|
||||||
PRODUCT_PACKAGES += vendor.google.battery_mitigation-default
|
|
||||||
PRODUCT_PACKAGES += vendor.google.battery_mitigation.service_static
|
|
||||||
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/battery_mitigation/compatibility_matrix.xml
|
|
||||||
|
|
||||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/battery_mitigation/sepolicy/vendor
|
|
||||||
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += device/google/gs-common/battery_mitigation/sepolicy/system_ext/private
|
|
||||||
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += device/google/gs-common/battery_mitigation/sepolicy/system_ext/public
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<compatibility-matrix version="1.0" type="framework">
|
|
||||||
<hal format="aidl" optional="true">
|
|
||||||
<name>vendor.google.battery_mitigation</name>
|
|
||||||
<version>1</version>
|
|
||||||
<interface>
|
|
||||||
<name>IBatteryMitigation</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
</compatibility-matrix>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
typeattribute brownout_detection_app coredomain;
|
|
||||||
|
|
||||||
userdebug_or_eng(`
|
|
||||||
app_domain(brownout_detection_app)
|
|
||||||
net_domain(brownout_detection_app)
|
|
||||||
allow brownout_detection_app app_api_service:service_manager find;
|
|
||||||
allow brownout_detection_app system_api_service:service_manager find;
|
|
||||||
')
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# BrownoutDetection
|
|
||||||
user=_app isPrivApp=true name=com.google.android.brownoutdetection domain=brownout_detection_app type=app_data_file levelFrom=all
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
type brownout_detection_app, domain;
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
type battery_mitigation, domain;
|
|
||||||
type battery_mitigation_exec, exec_type, vendor_file_type, file_type;
|
|
||||||
init_daemon_domain(battery_mitigation)
|
|
||||||
get_prop(battery_mitigation, boot_status_prop)
|
|
||||||
get_prop(battery_mitigation, vendor_brownout_reason_prop)
|
|
||||||
get_prop(battery_mitigation, system_boot_reason_prop)
|
|
||||||
set_prop(battery_mitigation, vendor_mitigation_ready_prop)
|
|
||||||
set_prop(battery_mitigation, vendor_brownout_br_feasible_prop)
|
|
||||||
|
|
||||||
hal_client_domain(battery_mitigation, hal_thermal);
|
|
||||||
hal_client_domain(battery_mitigation, hal_health);
|
|
||||||
|
|
||||||
r_dir_file(battery_mitigation, sysfs_acpm_stats)
|
|
||||||
r_dir_file(battery_mitigation, sysfs_batteryinfo)
|
|
||||||
r_dir_file(battery_mitigation, sysfs_iio_devices)
|
|
||||||
r_dir_file(battery_mitigation, sysfs_gpu)
|
|
||||||
r_dir_file(battery_mitigation, sysfs_thermal)
|
|
||||||
r_dir_file(battery_mitigation, thermal_link_device)
|
|
||||||
r_dir_file(battery_mitigation, sysfs_odpm)
|
|
||||||
r_dir_file(battery_mitigation, sysfs_power_stats)
|
|
||||||
allow battery_mitigation sysfs_bcl:dir r_dir_perms;
|
|
||||||
allow battery_mitigation sysfs_bcl:file rw_file_perms;
|
|
||||||
allow battery_mitigation sysfs_bcl:lnk_file r_file_perms;
|
|
||||||
allow battery_mitigation sysfs_thermal:lnk_file r_file_perms;
|
|
||||||
allow battery_mitigation mitigation_vendor_data_file:dir rw_dir_perms;
|
|
||||||
allow battery_mitigation mitigation_vendor_data_file:file create_file_perms;
|
|
||||||
allow battery_mitigation dumpstate:fd use;
|
|
||||||
allow battery_mitigation dumpstate:fifo_file rw_file_perms;
|
|
||||||
|
|
||||||
# Allow battery_mitigation to use Binder IPC so that service manager can notify it for callbacks
|
|
||||||
binder_use(battery_mitigation)
|
|
||||||
# Allow battery_mitigation to listen brownout event by epoll_wait
|
|
||||||
wakelock_use(battery_mitigation)
|
|
||||||
# Allow battery_mitigation to run aidl service
|
|
||||||
add_service(battery_mitigation, hal_battery_mitigation_service)
|
|
||||||
# Allow battery_mitigation to run audio mitigation callback
|
|
||||||
binder_call(battery_mitigation, hal_audio_default)
|
|
||||||
binder_call(battery_mitigation, servicemanager)
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
userdebug_or_eng(`
|
|
||||||
get_prop(brownout_detection_app, vendor_brownout_reason_prop)
|
|
||||||
')
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# To call battery_mitigation hal
|
|
||||||
allow dumpstate hal_battery_mitigation_service:service_manager find;
|
|
||||||
binder_call(dumpstate, battery_mitigation);
|
|
||||||
3
battery_mitigation/sepolicy/vendor/file.te
vendored
3
battery_mitigation/sepolicy/vendor/file.te
vendored
@@ -1,3 +0,0 @@
|
|||||||
type mitigation_vendor_data_file, file_type, data_file_type;
|
|
||||||
type sysfs_bcl, sysfs_type, fs_type;
|
|
||||||
type sysfs_odpm, sysfs_type, fs_type;
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/vendor/bin/hw/battery_mitigation u:object_r:battery_mitigation_exec:s0
|
|
||||||
/data/vendor/mitigation(/.*)? u:object_r:mitigation_vendor_data_file:s0
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
genfscon sysfs /devices/virtual/pmic/mitigation u:object_r:sysfs_bcl:s0
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# Battery Mitigation
|
|
||||||
vendor_internal_prop(vendor_mitigation_ready_prop)
|
|
||||||
vendor_public_prop(vendor_brownout_reason_prop)
|
|
||||||
vendor_internal_prop(vendor_brownout_br_feasible_prop)
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# Battery Mitigation
|
|
||||||
vendor.brownout.mitigation.ready u:object_r:vendor_mitigation_ready_prop:s0
|
|
||||||
vendor.brownout_reason u:object_r:vendor_brownout_reason_prop:s0
|
|
||||||
vendor.brownout.br.feasible u:object_r:vendor_brownout_br_feasible_prop:s0
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
type hal_battery_mitigation_service, hal_service_type, service_manager_type;
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
vendor.google.battery_mitigation.IBatteryMitigation/default u:object_r:hal_battery_mitigation_service:s0
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# Battery Mitigation
|
|
||||||
set_prop(vendor_init, vendor_brownout_reason_prop)
|
|
||||||
get_prop(vendor_init, vendor_brownout_br_feasible_prop)
|
|
||||||
get_prop(vendor_init, system_boot_reason_prop)
|
|
||||||
get_prop(vendor_init, vendor_thermal_prop)
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
PRODUCT_PACKAGES += \
|
|
||||||
android.hardware.bluetooth-V1-ndk.so \
|
|
||||||
android.hardware.bluetooth.finder-V1-ndk.so \
|
|
||||||
android.hardware.bluetooth.ranging-V1-ndk.so \
|
|
||||||
android.hardware.bluetooth-service.bcmbtlinux \
|
|
||||||
vendor.google.bluetooth_ext-V3-ndk.so \
|
|
||||||
bt_vendor.conf \
|
|
||||||
android.hardware.bluetooth.prebuilt.xml \
|
|
||||||
android.hardware.bluetooth_le.prebuilt.xml
|
|
||||||
|
|
||||||
|
|
||||||
BOARD_SEPOLICY_DIRS += device/google/gs-common/bcmbt/sepolicy
|
|
||||||
BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/powerstats
|
|
||||||
|
|
||||||
DEVICE_MANIFEST_FILE += device/google/gs-common/bcmbt/manifest_bluetooth.xml
|
|
||||||
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/bcmbt/compatibility_matrix.xml
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
<compatibility-matrix version="1.0" type="framework">
|
|
||||||
<hal format="aidl" optional="true">
|
|
||||||
<name>vendor.google.bluetooth_ext</name>
|
|
||||||
<version>1-3</version>
|
|
||||||
<interface>
|
|
||||||
<name>IBluetoothFinder</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
<interface>
|
|
||||||
<name>IBluetoothCcc</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
<interface>
|
|
||||||
<name>IBTChannelAvoidance</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
<interface>
|
|
||||||
<name>IBluetoothSar</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
<interface>
|
|
||||||
<name>IBluetoothExt</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
<interface>
|
|
||||||
<name>IBluetoothEwp</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
<interface>
|
|
||||||
<name>IBluetoothCco</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
</compatibility-matrix>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/bcmbt/dump/sepolicy/
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
pixel_bugreport(dump_bcmbt)
|
|
||||||
|
|
||||||
userdebug_or_eng(`
|
|
||||||
allow dump_bcmbt radio_vendor_data_file:dir create_dir_perms;
|
|
||||||
allow dump_bcmbt radio_vendor_data_file:file create_file_perms;
|
|
||||||
allow dump_bcmbt vendor_bt_data_file:dir r_dir_perms;
|
|
||||||
allow dump_bcmbt vendor_bt_data_file:file r_file_perms;
|
|
||||||
allow dump_bcmbt sscoredump_vendor_data_coredump_file:dir r_dir_perms;
|
|
||||||
allow dump_bcmbt sscoredump_vendor_data_coredump_file:file r_file_perms;
|
|
||||||
allow dump_bcmbt sscoredump_vendor_data_crashinfo_file:dir search;
|
|
||||||
')
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/vendor/bin/dump/dump_bcmbt u:object_r:dump_bcmbt_exec:s0
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
<manifest version="1.0" type="device">
|
|
||||||
<hal format="aidl">
|
|
||||||
<name>android.hardware.bluetooth</name>
|
|
||||||
<version>1</version>
|
|
||||||
<fqname>IBluetoothHci/default</fqname>
|
|
||||||
</hal>
|
|
||||||
<hal format="aidl">
|
|
||||||
<name>android.hardware.bluetooth.finder</name>
|
|
||||||
<version>1</version>
|
|
||||||
<fqname>IBluetoothFinder/default</fqname>
|
|
||||||
</hal>
|
|
||||||
<hal format="aidl">
|
|
||||||
<name>android.hardware.bluetooth.ranging</name>
|
|
||||||
<version>1</version>
|
|
||||||
<fqname>IBluetoothChannelSounding/default</fqname>
|
|
||||||
</hal>
|
|
||||||
<hal format="aidl">
|
|
||||||
<name>vendor.google.bluetooth_ext</name>
|
|
||||||
<version>2</version>
|
|
||||||
<fqname>IBTChannelAvoidance/default</fqname>
|
|
||||||
<fqname>IBluetoothCcc/default</fqname>
|
|
||||||
<fqname>IBluetoothEwp/default</fqname>
|
|
||||||
<fqname>IBluetoothExt/default</fqname>
|
|
||||||
<fqname>IBluetoothFinder/default</fqname>
|
|
||||||
<fqname>IBluetoothSar/default</fqname>
|
|
||||||
<fqname>IBluetoothCco/default</fqname>
|
|
||||||
</hal>
|
|
||||||
</manifest>
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Bt Wifi Coexistence device
|
|
||||||
type wb_coexistence_dev, dev_type;
|
|
||||||
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# Bluetooth
|
|
||||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.bluetooth-service\.bcmbtlinux u:object_r:hal_bluetooth_btlinux_exec:s0
|
|
||||||
|
|
||||||
/dev/wbrc u:object_r:wb_coexistence_dev:s0
|
|
||||||
/dev/ttySAC16 u:object_r:hci_attach_dev:s0
|
|
||||||
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
genfscon sysfs /devices/platform/odm/odm:btbcm/rfkill/rfkill0/state u:object_r:sysfs_bluetooth_writable:s0
|
|
||||||
genfscon sysfs /devices/platform/odm/odm:btbcm/rfkill/rfkill2/state u:object_r:sysfs_bluetooth_writable:s0
|
|
||||||
genfscon proc /bluetooth/sleep/lpm u:object_r:proc_bluetooth_writable:s0
|
|
||||||
genfscon proc /bluetooth/sleep/btwrite u:object_r:proc_bluetooth_writable:s0
|
|
||||||
genfscon proc /bluetooth/sleep/btwake u:object_r:proc_bluetooth_writable:s0
|
|
||||||
genfscon proc /bluetooth/timesync u:object_r:proc_bluetooth_writable:s0
|
|
||||||
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
add_hwservice(hal_bluetooth_btlinux, hal_bluetooth_coexistence_hwservice);
|
|
||||||
add_service(hal_bluetooth_btlinux, hal_bluetooth_coexistence_service);
|
|
||||||
get_prop(hal_bluetooth_btlinux, boot_status_prop)
|
|
||||||
|
|
||||||
allow hal_bluetooth_btlinux sysfs_bluetooth_writable:file rw_file_perms;
|
|
||||||
allow hal_bluetooth_btlinux proc_bluetooth_writable:file rw_file_perms;
|
|
||||||
allow hal_bluetooth_btlinux hci_attach_dev:chr_file rw_file_perms;
|
|
||||||
allow hal_bluetooth_btlinux wb_coexistence_dev:chr_file rw_file_perms;
|
|
||||||
binder_call(hal_bluetooth_btlinux, servicemanager)
|
|
||||||
|
|
||||||
# power stats
|
|
||||||
vndbinder_use(hal_bluetooth_btlinux)
|
|
||||||
allow hal_bluetooth_btlinux hal_power_stats_vendor_service:service_manager find;
|
|
||||||
binder_call(hal_bluetooth_btlinux, hal_power_stats_default)
|
|
||||||
|
|
||||||
allow hal_bluetooth_btlinux sscoredump_vendor_data_crashinfo_file:dir create_dir_perms;
|
|
||||||
allow hal_bluetooth_btlinux sscoredump_vendor_data_crashinfo_file:file create_file_perms;
|
|
||||||
|
|
||||||
userdebug_or_eng(`
|
|
||||||
allow hal_bluetooth_btlinux sscoredump_vendor_data_coredump_file:dir create_dir_perms;
|
|
||||||
allow hal_bluetooth_btlinux sscoredump_vendor_data_coredump_file:file create_file_perms;
|
|
||||||
allow hal_bluetooth_btlinux logbuffer_device:chr_file r_file_perms;
|
|
||||||
')
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Bluetooth HAL extension
|
|
||||||
type hal_bluetooth_coexistence_hwservice, hwservice_manager_type, vendor_hwservice_type;
|
|
||||||
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# Bluetooth HAL extension
|
|
||||||
hardware.google.bluetooth.bt_channel_avoidance::IBTChannelAvoidance u:object_r:hal_bluetooth_coexistence_hwservice:s0
|
|
||||||
hardware.google.bluetooth.sar::IBluetoothSar u:object_r:hal_bluetooth_coexistence_hwservice:s0
|
|
||||||
hardware.google.bluetooth.ccc::IBluetoothCcc u:object_r:hal_bluetooth_coexistence_hwservice:s0
|
|
||||||
hardware.google.bluetooth.ewp::IBluetoothEwp u:object_r:hal_bluetooth_coexistence_hwservice:s0
|
|
||||||
hardware.google.bluetooth.ext::IBluetoothExt u:object_r:hal_bluetooth_coexistence_hwservice:s0
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# Bluetooth HAL extension
|
|
||||||
type hal_bluetooth_coexistence_service, hal_service_type, service_manager_type;
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# Bluetooth HAL extension
|
|
||||||
vendor.google.bluetooth_ext.IBTChannelAvoidance/default u:object_r:hal_bluetooth_coexistence_service:s0
|
|
||||||
vendor.google.bluetooth_ext.IBluetoothSar/default u:object_r:hal_bluetooth_coexistence_service:s0
|
|
||||||
vendor.google.bluetooth_ext.IBluetoothCcc/default u:object_r:hal_bluetooth_coexistence_service:s0
|
|
||||||
vendor.google.bluetooth_ext.IBluetoothEwp/default u:object_r:hal_bluetooth_coexistence_service:s0
|
|
||||||
vendor.google.bluetooth_ext.IBluetoothExt/default u:object_r:hal_bluetooth_coexistence_service:s0
|
|
||||||
vendor.google.bluetooth_ext.IBluetoothFinder/default u:object_r:hal_bluetooth_coexistence_service:s0
|
|
||||||
vendor.google.bluetooth_ext.IBluetoothCco/default u:object_r:hal_bluetooth_coexistence_service:s0
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# When neither AOSP nor factory targets
|
|
||||||
ifeq (,$(filter aosp_% factory_% lineage_%, $(TARGET_PRODUCT)))
|
|
||||||
PRODUCT_PACKAGES += BetterBugStub
|
|
||||||
endif
|
|
||||||
|
|
||||||
PRODUCT_PUBLIC_SEPOLICY_DIRS += device/google/gs-common/betterbug/sepolicy/product/public
|
|
||||||
PRODUCT_PRIVATE_SEPOLICY_DIRS += device/google/gs-common/betterbug/sepolicy/product/private
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
typeattribute better_bug_app coredomain;
|
|
||||||
|
|
||||||
app_domain(better_bug_app)
|
|
||||||
net_domain(better_bug_app)
|
|
||||||
|
|
||||||
allow better_bug_app app_api_service:service_manager find;
|
|
||||||
allow better_bug_app mediaserver_service:service_manager find;
|
|
||||||
allow better_bug_app radio_service:service_manager find;
|
|
||||||
allow better_bug_app system_api_service:service_manager find;
|
|
||||||
|
|
||||||
allow better_bug_app privapp_data_file:file execute;
|
|
||||||
allow better_bug_app privapp_data_file:lnk_file r_file_perms;
|
|
||||||
allow better_bug_app shell_data_file:file r_file_perms;
|
|
||||||
allow better_bug_app shell_data_file:dir r_dir_perms;
|
|
||||||
|
|
||||||
# Allow traceur to pass file descriptors through a content provider to betterbug
|
|
||||||
allow better_bug_app trace_data_file:file { getattr read };
|
|
||||||
|
|
||||||
# Allow betterbug to read profile reports generated by profcollect.
|
|
||||||
userdebug_or_eng(`
|
|
||||||
allow better_bug_app profcollectd_data_file:file r_file_perms;
|
|
||||||
')
|
|
||||||
|
|
||||||
# Allow BetterBug access to WM traces attributes
|
|
||||||
allow better_bug_app wm_trace_data_file:dir r_dir_perms;
|
|
||||||
allow better_bug_app wm_trace_data_file:file getattr;
|
|
||||||
|
|
||||||
# Allow the bug reporting frontend to read the presence and timestamp of the
|
|
||||||
# trace attached to the bugreport (but not its contents, which will go in the
|
|
||||||
# usual bugreport .zip file). This is used by the bug reporting UI to tell if
|
|
||||||
# the bugreport will contain a system trace or not while the bugreport is still
|
|
||||||
# in progress.
|
|
||||||
allow better_bug_app perfetto_traces_bugreport_data_file:dir r_dir_perms;
|
|
||||||
allow better_bug_app perfetto_traces_bugreport_data_file:file { getattr };
|
|
||||||
|
|
||||||
# Allow BetterBug to receive Perfetto traces through the framework
|
|
||||||
# (i.e. TracingServiceProxy) and sendfile them into their private
|
|
||||||
# directories for reporting when network and battery conditions are
|
|
||||||
# appropriate.
|
|
||||||
allow better_bug_app perfetto:fd use;
|
|
||||||
allow better_bug_app perfetto_traces_data_file:file { read getattr };
|
|
||||||
|
|
||||||
# Allow BetterBug to set property to start vendor.touch_dumpstate
|
|
||||||
set_prop(better_bug_app, ctl_start_prop)
|
|
||||||
|
|
||||||
# Allow BetterBug to read system boot reason
|
|
||||||
get_prop(better_bug_app, system_boot_reason_prop)
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# BetterBug
|
|
||||||
user=_app isPrivApp=true name=com.google.android.apps.internal.betterbug domain=better_bug_app type=privapp_data_file levelFrom=user
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
type better_bug_app, domain;
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
PRODUCT_PACKAGES += \
|
|
||||||
android.hardware.bluetooth-V1-ndk.so \
|
|
||||||
android.hardware.bluetooth.finder-V1-ndk.so \
|
|
||||||
android.hardware.bluetooth.ranging-V1-ndk.so \
|
|
||||||
android.hardware.bluetooth-service.pixel \
|
|
||||||
vendor.google.bluetooth_ext-V1-ndk.so \
|
|
||||||
bt_vendor.conf \
|
|
||||||
android.hardware.bluetooth.prebuilt.xml \
|
|
||||||
android.hardware.bluetooth_le.prebuilt.xml
|
|
||||||
|
|
||||||
BOARD_SEPOLICY_DIRS += device/google/gs-common/bluetooth/sepolicy
|
|
||||||
BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/powerstats
|
|
||||||
|
|
||||||
DEVICE_MANIFEST_FILE += device/google/gs-common/bluetooth/manifest_bluetooth.xml
|
|
||||||
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/bluetooth/compatibility_matrix.xml
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user