diff --git a/16kb/16kb.mk b/16kb/16kb.mk
deleted file mode 100644
index 96bfd89..0000000
--- a/16kb/16kb.mk
+++ /dev/null
@@ -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
diff --git a/16kb/Android.bp b/16kb/Android.bp
deleted file mode 100644
index e9bd6ac..0000000
--- a/16kb/Android.bp
+++ /dev/null
@@ -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,
-}
diff --git a/16kb/CopyEfsTest/Android.bp b/16kb/CopyEfsTest/Android.bp
deleted file mode 100644
index e599215..0000000
--- a/16kb/CopyEfsTest/Android.bp
+++ /dev/null
@@ -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",
-}
diff --git a/16kb/CopyEfsTest/AndroidTest.xml b/16kb/CopyEfsTest/AndroidTest.xml
deleted file mode 100644
index 2b18b04..0000000
--- a/16kb/CopyEfsTest/AndroidTest.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/16kb/CopyEfsTest/src/com/android/test/CopyEfsTest.java b/16kb/CopyEfsTest/src/com/android/test/CopyEfsTest.java
deleted file mode 100644
index 0f87513..0000000
--- a/16kb/CopyEfsTest/src/com/android/test/CopyEfsTest.java
+++ /dev/null
@@ -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("(?"))
- name_offset = 3;
- for (int i=0; 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");
- }
-}
diff --git a/16kb/copy_efs_files_to_data.sh b/16kb/copy_efs_files_to_data.sh
deleted file mode 100644
index e1d2204..0000000
--- a/16kb/copy_efs_files_to_data.sh
+++ /dev/null
@@ -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
diff --git a/Android.bp b/Android.bp
index 52a1055..6515b74 100644
--- a/Android.bp
+++ b/Android.bp
@@ -18,26 +18,11 @@ package {
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 {
name: "device_google_gs-common_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
- "SPDX-license-identifier-BSD",
],
license_text: [
"NOTICE",
diff --git a/FSTAB_OWNERS b/FSTAB_OWNERS
deleted file mode 100644
index 18093a0..0000000
--- a/FSTAB_OWNERS
+++ /dev/null
@@ -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
diff --git a/MK_OWNERS b/MK_OWNERS
deleted file mode 100644
index 67af9f7..0000000
--- a/MK_OWNERS
+++ /dev/null
@@ -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
diff --git a/OWNERS b/OWNERS
deleted file mode 100644
index 57ca40f..0000000
--- a/OWNERS
+++ /dev/null
@@ -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
diff --git a/README.txt b/README.txt
deleted file mode 100644
index b279bda..0000000
--- a/README.txt
+++ /dev/null
@@ -1 +0,0 @@
-Please refer to go/pixel-recycle to modularize your code in this space.
diff --git a/aoc/Android.bp b/aoc/Android.bp
deleted file mode 100644
index 7af2424..0000000
--- a/aoc/Android.bp
+++ /dev/null
@@ -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",
-}
diff --git a/aoc/aoc.mk b/aoc/aoc.mk
deleted file mode 100644
index 210bd45..0000000
--- a/aoc/aoc.mk
+++ /dev/null
@@ -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
diff --git a/aoc/conf/init.aoc.daemon.rc b/aoc/conf/init.aoc.daemon.rc
deleted file mode 100644
index 1cf204e..0000000
--- a/aoc/conf/init.aoc.daemon.rc
+++ /dev/null
@@ -1 +0,0 @@
-# AoC firmware will be loaded by Daemon
\ No newline at end of file
diff --git a/aoc/dump_aoc.cpp b/aoc/dump_aoc.cpp
deleted file mode 100644
index baf056e..0000000
--- a/aoc/dump_aoc.cpp
+++ /dev/null
@@ -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
-#include
-
-// 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;
-}
diff --git a/aoc/sepolicy/aocd.te b/aoc/sepolicy/aocd.te
deleted file mode 100644
index 464e46b..0000000
--- a/aoc/sepolicy/aocd.te
+++ /dev/null
@@ -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)
\ No newline at end of file
diff --git a/aoc/sepolicy/aocdump.te b/aoc/sepolicy/aocdump.te
deleted file mode 100644
index 0801ec0..0000000
--- a/aoc/sepolicy/aocdump.te
+++ /dev/null
@@ -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 };
-')
diff --git a/aoc/sepolicy/aocxd.te b/aoc/sepolicy/aocxd.te
deleted file mode 100644
index 2eedf48..0000000
--- a/aoc/sepolicy/aocxd.te
+++ /dev/null
@@ -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;
diff --git a/aoc/sepolicy/device.te b/aoc/sepolicy/device.te
deleted file mode 100644
index fbee004..0000000
--- a/aoc/sepolicy/device.te
+++ /dev/null
@@ -1,3 +0,0 @@
-# AOC device
-type aoc_device, dev_type;
-
diff --git a/aoc/sepolicy/dump_aoc.te b/aoc/sepolicy/dump_aoc.te
deleted file mode 100644
index 0731da4..0000000
--- a/aoc/sepolicy/dump_aoc.te
+++ /dev/null
@@ -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;
-
diff --git a/aoc/sepolicy/dumpstate.te b/aoc/sepolicy/dumpstate.te
deleted file mode 100644
index 5b89fe1..0000000
--- a/aoc/sepolicy/dumpstate.te
+++ /dev/null
@@ -1,2 +0,0 @@
-# Allow dumpstate to talk to aocxd over binder
-binder_call(dumpstate, aocxd)
diff --git a/aoc/sepolicy/file.te b/aoc/sepolicy/file.te
deleted file mode 100644
index 0b853db..0000000
--- a/aoc/sepolicy/file.te
+++ /dev/null
@@ -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;
diff --git a/aoc/sepolicy/file_contexts b/aoc/sepolicy/file_contexts
deleted file mode 100644
index 778de0c..0000000
--- a/aoc/sepolicy/file_contexts
+++ /dev/null
@@ -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
-
diff --git a/aoc/sepolicy/property.te b/aoc/sepolicy/property.te
deleted file mode 100644
index e6d715b..0000000
--- a/aoc/sepolicy/property.te
+++ /dev/null
@@ -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)
diff --git a/aoc/sepolicy/property_contexts b/aoc/sepolicy/property_contexts
deleted file mode 100644
index 475272a..0000000
--- a/aoc/sepolicy/property_contexts
+++ /dev/null
@@ -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
\ No newline at end of file
diff --git a/aoc/sepolicy/service.te b/aoc/sepolicy/service.te
deleted file mode 100644
index 502b28d..0000000
--- a/aoc/sepolicy/service.te
+++ /dev/null
@@ -1 +0,0 @@
-type aocx, service_manager_type;
diff --git a/aoc/sepolicy/service_contexts b/aoc/sepolicy/service_contexts
deleted file mode 100644
index 80346c8..0000000
--- a/aoc/sepolicy/service_contexts
+++ /dev/null
@@ -1 +0,0 @@
-aocx.IAocx/default u:object_r:aocx:s0
diff --git a/audio/aidl.mk b/audio/aidl.mk
deleted file mode 100644
index 016f33b..0000000
--- a/audio/aidl.mk
+++ /dev/null
@@ -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)
diff --git a/audio/aidl/device_framework_matrix_product.xml b/audio/aidl/device_framework_matrix_product.xml
deleted file mode 100644
index ce9250f..0000000
--- a/audio/aidl/device_framework_matrix_product.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- vendor.google.whitechapel.audio.extension
- 4-6
-
- IAudioExtension
- default
-
-
-
diff --git a/audio/aidl/manifest.xml b/audio/aidl/manifest.xml
deleted file mode 100644
index daeb1c4..0000000
--- a/audio/aidl/manifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/audio/common.mk b/audio/common.mk
deleted file mode 100644
index c034a68..0000000
--- a/audio/common.mk
+++ /dev/null
@@ -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))
diff --git a/audio/hidl/device_framework_matrix_product.xml b/audio/hidl/device_framework_matrix_product.xml
deleted file mode 100644
index 3005497..0000000
--- a/audio/hidl/device_framework_matrix_product.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
- vendor.google.whitechapel.audio.audioext
- 4.0
-
- IAudioExt
- default
-
-
-
- vendor.google.audiometricext
- 1.0
-
- IAudioMetricExt
- default
-
-
-
diff --git a/audio/hidl/device_framework_matrix_product_gs101.xml b/audio/hidl/device_framework_matrix_product_gs101.xml
deleted file mode 100644
index e1bd62a..0000000
--- a/audio/hidl/device_framework_matrix_product_gs101.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
- vendor.google.whitechapel.audio.audioext
- 4.0
-
- IAudioExt
- default
-
-
-
- vendor.google.audiometricext
- 1.0
-
- IAudioMetricExt
- default
-
-
-
diff --git a/audio/hidl/manifest.xml b/audio/hidl/manifest.xml
deleted file mode 100644
index a8d4979..0000000
--- a/audio/hidl/manifest.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
- android.hardware.audio
- hwbinder
- 7.1
-
- IDevicesFactory
- default
-
-
-
- android.hardware.audio.effect
- hwbinder
- 7.0
-
- IEffectsFactory
- default
-
-
-
- android.hardware.soundtrigger
- hwbinder
- 2.3
-
- ISoundTriggerHw
- default
-
-
-
- vendor.google.whitechapel.audio.audioext
- hwbinder
- 4.0
-
- IAudioExt
- default
-
-
-
- vendor.google.audiometricext
- hwbinder
- 1.0
-
- IAudioMetricExt
- default
-
-
-
diff --git a/audio/hidl/manifest_gs101.xml b/audio/hidl/manifest_gs101.xml
deleted file mode 100644
index c2fba61..0000000
--- a/audio/hidl/manifest_gs101.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
- android.hardware.audio
- hwbinder
- 7.1
-
- IDevicesFactory
- default
-
-
-
- android.hardware.audio.effect
- hwbinder
- 7.0
-
- IEffectsFactory
- default
-
-
-
- android.hardware.soundtrigger
- hwbinder
- 2.3
-
- ISoundTriggerHw
- default
-
-
-
- vendor.google.whitechapel.audio.audioext
- hwbinder
- 4.0
-
- IAudioExt
- default
-
-
-
- vendor.google.audiometricext
- hwbinder
- 1.0
-
- IAudioMetricExt
- default
-
-
-
diff --git a/audio/hidl/manifest_gs101_64.xml b/audio/hidl/manifest_gs101_64.xml
deleted file mode 100644
index 0022cea..0000000
--- a/audio/hidl/manifest_gs101_64.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
- android.hardware.audio
- hwbinder
- 7.1
-
- IDevicesFactory
- default
-
-
-
- android.hardware.audio.effect
- hwbinder
- 7.0
-
- IEffectsFactory
- default
-
-
-
- android.hardware.soundtrigger
- hwbinder
- 2.3
-
- ISoundTriggerHw
- default
-
-
-
- vendor.google.whitechapel.audio.audioext
- hwbinder
- 4.0
-
- IAudioExt
- default
-
-
-
- vendor.google.audiometricext
- hwbinder
- 1.0
-
- IAudioMetricExt
- default
-
-
-
diff --git a/audio/hidl_gs101.mk b/audio/hidl_gs101.mk
deleted file mode 100644
index 713bb43..0000000
--- a/audio/hidl_gs101.mk
+++ /dev/null
@@ -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
diff --git a/audio/hidl_gs201.mk b/audio/hidl_gs201.mk
deleted file mode 100644
index 920b4f2..0000000
--- a/audio/hidl_gs201.mk
+++ /dev/null
@@ -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
diff --git a/audio/sepolicy/aidl/file_contexts b/audio/sepolicy/aidl/file_contexts
deleted file mode 100644
index 3f3390e..0000000
--- a/audio/sepolicy/aidl/file_contexts
+++ /dev/null
@@ -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
diff --git a/audio/sepolicy/aidl/hal_audio_default.te b/audio/sepolicy/aidl/hal_audio_default.te
deleted file mode 100644
index 1ae90c7..0000000
--- a/audio/sepolicy/aidl/hal_audio_default.te
+++ /dev/null
@@ -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)
diff --git a/audio/sepolicy/aidl/hal_sensors_default.te b/audio/sepolicy/aidl/hal_sensors_default.te
deleted file mode 100644
index ca738ea..0000000
--- a/audio/sepolicy/aidl/hal_sensors_default.te
+++ /dev/null
@@ -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;
diff --git a/audio/sepolicy/aidl/parser_service.te b/audio/sepolicy/aidl/parser_service.te
deleted file mode 100644
index bce6d49..0000000
--- a/audio/sepolicy/aidl/parser_service.te
+++ /dev/null
@@ -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;
diff --git a/audio/sepolicy/aidl/radio.te b/audio/sepolicy/aidl/radio.te
deleted file mode 100644
index dcd8458..0000000
--- a/audio/sepolicy/aidl/radio.te
+++ /dev/null
@@ -1,2 +0,0 @@
-allow radio hal_audio_ext_service:service_manager find;
-binder_call(radio, hal_audio_default)
diff --git a/audio/sepolicy/aidl/rild.te b/audio/sepolicy/aidl/rild.te
deleted file mode 100644
index 218a69d..0000000
--- a/audio/sepolicy/aidl/rild.te
+++ /dev/null
@@ -1 +0,0 @@
-allow rild hal_audio_ext_service:service_manager find;
diff --git a/audio/sepolicy/aidl/service.te b/audio/sepolicy/aidl/service.te
deleted file mode 100644
index d931f16..0000000
--- a/audio/sepolicy/aidl/service.te
+++ /dev/null
@@ -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;
\ No newline at end of file
diff --git a/audio/sepolicy/aidl/service_contexts b/audio/sepolicy/aidl/service_contexts
deleted file mode 100644
index 7a7d61d..0000000
--- a/audio/sepolicy/aidl/service_contexts
+++ /dev/null
@@ -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
\ No newline at end of file
diff --git a/audio/sepolicy/common/device.te b/audio/sepolicy/common/device.te
deleted file mode 100644
index b4e77e5..0000000
--- a/audio/sepolicy/common/device.te
+++ /dev/null
@@ -1,2 +0,0 @@
-# AMCS device
-type amcs_device, dev_type;
diff --git a/audio/sepolicy/common/file.te b/audio/sepolicy/common/file.te
deleted file mode 100644
index 353ab9f..0000000
--- a/audio/sepolicy/common/file.te
+++ /dev/null
@@ -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;
diff --git a/audio/sepolicy/common/file_contexts b/audio/sepolicy/common/file_contexts
deleted file mode 100644
index 1480861..0000000
--- a/audio/sepolicy/common/file_contexts
+++ /dev/null
@@ -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
diff --git a/audio/sepolicy/common/genfs_contexts b/audio/sepolicy/common/genfs_contexts
deleted file mode 100644
index c4a3120..0000000
--- a/audio/sepolicy/common/genfs_contexts
+++ /dev/null
@@ -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
diff --git a/audio/sepolicy/common/hal_audio_default.te b/audio/sepolicy/common/hal_audio_default.te
deleted file mode 100644
index e917b73..0000000
--- a/audio/sepolicy/common/hal_audio_default.te
+++ /dev/null
@@ -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);
diff --git a/audio/sepolicy/common/hal_audiometricext_default.te b/audio/sepolicy/common/hal_audiometricext_default.te
deleted file mode 100644
index 5358eac..0000000
--- a/audio/sepolicy/common/hal_audiometricext_default.te
+++ /dev/null
@@ -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);
diff --git a/audio/sepolicy/common/hwservice.te b/audio/sepolicy/common/hwservice.te
deleted file mode 100644
index 0809453..0000000
--- a/audio/sepolicy/common/hwservice.te
+++ /dev/null
@@ -1,2 +0,0 @@
-# AudioMetric
-type hal_audiometricext_hwservice, hwservice_manager_type;
diff --git a/audio/sepolicy/common/hwservice_contexts b/audio/sepolicy/common/hwservice_contexts
deleted file mode 100644
index 85c05e5..0000000
--- a/audio/sepolicy/common/hwservice_contexts
+++ /dev/null
@@ -1,3 +0,0 @@
-# Audio
-vendor.google.audiometricext::IAudioMetricExt u:object_r:hal_audiometricext_hwservice:s0
-
diff --git a/audio/sepolicy/common/property.te b/audio/sepolicy/common/property.te
deleted file mode 100644
index 2287b84..0000000
--- a/audio/sepolicy/common/property.te
+++ /dev/null
@@ -1,5 +0,0 @@
-# Audio
-vendor_internal_prop(vendor_audio_prop)
-
-# The property for Audio App
-vendor_restricted_prop(vendor_audio_prop_restricted)
diff --git a/audio/sepolicy/common/property_contexts b/audio/sepolicy/common/property_contexts
deleted file mode 100644
index 9f88e55..0000000
--- a/audio/sepolicy/common/property_contexts
+++ /dev/null
@@ -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
diff --git a/audio/sepolicy/common/rild.te b/audio/sepolicy/common/rild.te
deleted file mode 100644
index fe86848..0000000
--- a/audio/sepolicy/common/rild.te
+++ /dev/null
@@ -1 +0,0 @@
-get_prop(rild, vendor_audio_prop);
diff --git a/audio/sepolicy/common/vendor_init.te b/audio/sepolicy/common/vendor_init.te
deleted file mode 100644
index 1562d45..0000000
--- a/audio/sepolicy/common/vendor_init.te
+++ /dev/null
@@ -1,5 +0,0 @@
-# Audio property
-set_prop(vendor_init, vendor_audio_prop)
-
-# Audio App property
-set_prop(vendor_init, vendor_audio_prop_restricted)
diff --git a/audio/sepolicy/hdmi_audio/dptx/genfs_contexts b/audio/sepolicy/hdmi_audio/dptx/genfs_contexts
deleted file mode 100644
index 64803be..0000000
--- a/audio/sepolicy/hdmi_audio/dptx/genfs_contexts
+++ /dev/null
@@ -1 +0,0 @@
-genfscon sysfs /devices/platform/dwc_dptx-audio/extcon/hdmi_audio u:object_r:sysfs_extcon:s0
diff --git a/audio/sepolicy/hdmi_audio/drmdp/genfs_contexts b/audio/sepolicy/hdmi_audio/drmdp/genfs_contexts
deleted file mode 100644
index eb7e1cf..0000000
--- a/audio/sepolicy/hdmi_audio/drmdp/genfs_contexts
+++ /dev/null
@@ -1 +0,0 @@
-genfscon sysfs /devices/platform/drmdp-adma/extcon/hdmi_audio u:object_r:sysfs_extcon:s0
diff --git a/audio/sepolicy/hidl/hal_audio_default.te b/audio/sepolicy/hidl/hal_audio_default.te
deleted file mode 100644
index bdc3bf9..0000000
--- a/audio/sepolicy/hidl/hal_audio_default.te
+++ /dev/null
@@ -1,3 +0,0 @@
-hwbinder_use(hal_audio_default)
-
-add_hwservice(hal_audio_default, hal_audio_ext_hwservice)
diff --git a/audio/sepolicy/hidl/hwservice.te b/audio/sepolicy/hidl/hwservice.te
deleted file mode 100644
index 15aaaf7..0000000
--- a/audio/sepolicy/hidl/hwservice.te
+++ /dev/null
@@ -1,2 +0,0 @@
-# Audio
-type hal_audio_ext_hwservice, hwservice_manager_type;
diff --git a/audio/sepolicy/hidl/hwservice_contexts b/audio/sepolicy/hidl/hwservice_contexts
deleted file mode 100644
index 8eadd21..0000000
--- a/audio/sepolicy/hidl/hwservice_contexts
+++ /dev/null
@@ -1,2 +0,0 @@
-# Audio
-vendor.google.whitechapel.audio.audioext::IAudioExt u:object_r:hal_audio_ext_hwservice:s0
diff --git a/audio/sepolicy/hidl/radio.te b/audio/sepolicy/hidl/radio.te
deleted file mode 100644
index 43585cd..0000000
--- a/audio/sepolicy/hidl/radio.te
+++ /dev/null
@@ -1,2 +0,0 @@
-allow radio hal_audio_ext_hwservice:hwservice_manager find;
-binder_call(radio, hal_audio_default)
diff --git a/audio/sepolicy/hidl/rild.te b/audio/sepolicy/hidl/rild.te
deleted file mode 100644
index 378d26c..0000000
--- a/audio/sepolicy/hidl/rild.te
+++ /dev/null
@@ -1 +0,0 @@
-allow rild hal_audio_ext_hwservice:hwservice_manager find;
diff --git a/battery_mitigation/bcl.mk b/battery_mitigation/bcl.mk
deleted file mode 100644
index 54d8bfc..0000000
--- a/battery_mitigation/bcl.mk
+++ /dev/null
@@ -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
diff --git a/battery_mitigation/compatibility_matrix.xml b/battery_mitigation/compatibility_matrix.xml
deleted file mode 100644
index 7e3d88e..0000000
--- a/battery_mitigation/compatibility_matrix.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- vendor.google.battery_mitigation
- 1
-
- IBatteryMitigation
- default
-
-
-
diff --git a/battery_mitigation/sepolicy/system_ext/private/brownout_detection_app.te b/battery_mitigation/sepolicy/system_ext/private/brownout_detection_app.te
deleted file mode 100644
index c342cbf..0000000
--- a/battery_mitigation/sepolicy/system_ext/private/brownout_detection_app.te
+++ /dev/null
@@ -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;
-')
diff --git a/battery_mitigation/sepolicy/system_ext/private/seapp_contexts b/battery_mitigation/sepolicy/system_ext/private/seapp_contexts
deleted file mode 100644
index 7e5d883..0000000
--- a/battery_mitigation/sepolicy/system_ext/private/seapp_contexts
+++ /dev/null
@@ -1,2 +0,0 @@
-# BrownoutDetection
-user=_app isPrivApp=true name=com.google.android.brownoutdetection domain=brownout_detection_app type=app_data_file levelFrom=all
diff --git a/battery_mitigation/sepolicy/system_ext/public/brownout_detection_app.te b/battery_mitigation/sepolicy/system_ext/public/brownout_detection_app.te
deleted file mode 100644
index 7eec57a..0000000
--- a/battery_mitigation/sepolicy/system_ext/public/brownout_detection_app.te
+++ /dev/null
@@ -1 +0,0 @@
-type brownout_detection_app, domain;
diff --git a/battery_mitigation/sepolicy/vendor/battery_mitigation.te b/battery_mitigation/sepolicy/vendor/battery_mitigation.te
deleted file mode 100644
index 30b314c..0000000
--- a/battery_mitigation/sepolicy/vendor/battery_mitigation.te
+++ /dev/null
@@ -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)
diff --git a/battery_mitigation/sepolicy/vendor/brownout_detection_app.te b/battery_mitigation/sepolicy/vendor/brownout_detection_app.te
deleted file mode 100644
index e2c602f..0000000
--- a/battery_mitigation/sepolicy/vendor/brownout_detection_app.te
+++ /dev/null
@@ -1,3 +0,0 @@
-userdebug_or_eng(`
- get_prop(brownout_detection_app, vendor_brownout_reason_prop)
-')
diff --git a/battery_mitigation/sepolicy/vendor/dumpstate.te b/battery_mitigation/sepolicy/vendor/dumpstate.te
deleted file mode 100644
index b3bb1d4..0000000
--- a/battery_mitigation/sepolicy/vendor/dumpstate.te
+++ /dev/null
@@ -1,3 +0,0 @@
-# To call battery_mitigation hal
-allow dumpstate hal_battery_mitigation_service:service_manager find;
-binder_call(dumpstate, battery_mitigation);
diff --git a/battery_mitigation/sepolicy/vendor/file.te b/battery_mitigation/sepolicy/vendor/file.te
deleted file mode 100644
index 06bedad..0000000
--- a/battery_mitigation/sepolicy/vendor/file.te
+++ /dev/null
@@ -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;
diff --git a/battery_mitigation/sepolicy/vendor/file_contexts b/battery_mitigation/sepolicy/vendor/file_contexts
deleted file mode 100644
index 2e88ba0..0000000
--- a/battery_mitigation/sepolicy/vendor/file_contexts
+++ /dev/null
@@ -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
diff --git a/battery_mitigation/sepolicy/vendor/genfs_contexts b/battery_mitigation/sepolicy/vendor/genfs_contexts
deleted file mode 100644
index 66d63dd..0000000
--- a/battery_mitigation/sepolicy/vendor/genfs_contexts
+++ /dev/null
@@ -1 +0,0 @@
-genfscon sysfs /devices/virtual/pmic/mitigation u:object_r:sysfs_bcl:s0
diff --git a/battery_mitigation/sepolicy/vendor/property.te b/battery_mitigation/sepolicy/vendor/property.te
deleted file mode 100644
index 3dfa12e..0000000
--- a/battery_mitigation/sepolicy/vendor/property.te
+++ /dev/null
@@ -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)
diff --git a/battery_mitigation/sepolicy/vendor/property_contexts b/battery_mitigation/sepolicy/vendor/property_contexts
deleted file mode 100644
index d5d538a..0000000
--- a/battery_mitigation/sepolicy/vendor/property_contexts
+++ /dev/null
@@ -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
diff --git a/battery_mitigation/sepolicy/vendor/service.te b/battery_mitigation/sepolicy/vendor/service.te
deleted file mode 100644
index f0c7e9d..0000000
--- a/battery_mitigation/sepolicy/vendor/service.te
+++ /dev/null
@@ -1 +0,0 @@
-type hal_battery_mitigation_service, hal_service_type, service_manager_type;
diff --git a/battery_mitigation/sepolicy/vendor/service_contexts b/battery_mitigation/sepolicy/vendor/service_contexts
deleted file mode 100644
index 472259e..0000000
--- a/battery_mitigation/sepolicy/vendor/service_contexts
+++ /dev/null
@@ -1 +0,0 @@
-vendor.google.battery_mitigation.IBatteryMitigation/default u:object_r:hal_battery_mitigation_service:s0
diff --git a/battery_mitigation/sepolicy/vendor/vendor_init.te b/battery_mitigation/sepolicy/vendor/vendor_init.te
deleted file mode 100644
index d53053f..0000000
--- a/battery_mitigation/sepolicy/vendor/vendor_init.te
+++ /dev/null
@@ -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)
diff --git a/bcmbt/bluetooth.mk b/bcmbt/bluetooth.mk
deleted file mode 100644
index 1896cf6..0000000
--- a/bcmbt/bluetooth.mk
+++ /dev/null
@@ -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
diff --git a/bcmbt/compatibility_matrix.xml b/bcmbt/compatibility_matrix.xml
deleted file mode 100644
index 47928f4..0000000
--- a/bcmbt/compatibility_matrix.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
- vendor.google.bluetooth_ext
- 1-3
-
- IBluetoothFinder
- default
-
-
- IBluetoothCcc
- default
-
-
- IBTChannelAvoidance
- default
-
-
- IBluetoothSar
- default
-
-
- IBluetoothExt
- default
-
-
- IBluetoothEwp
- default
-
-
- IBluetoothCco
- default
-
-
-
diff --git a/bcmbt/dump/dumplog.mk b/bcmbt/dump/dumplog.mk
deleted file mode 100644
index 9c4a8e7..0000000
--- a/bcmbt/dump/dumplog.mk
+++ /dev/null
@@ -1 +0,0 @@
-BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/bcmbt/dump/sepolicy/
diff --git a/bcmbt/dump/sepolicy/dump_bcmbt.te b/bcmbt/dump/sepolicy/dump_bcmbt.te
deleted file mode 100644
index 8fa76b8..0000000
--- a/bcmbt/dump/sepolicy/dump_bcmbt.te
+++ /dev/null
@@ -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;
-')
diff --git a/bcmbt/dump/sepolicy/file_contexts b/bcmbt/dump/sepolicy/file_contexts
deleted file mode 100644
index e3f0df6..0000000
--- a/bcmbt/dump/sepolicy/file_contexts
+++ /dev/null
@@ -1 +0,0 @@
-/vendor/bin/dump/dump_bcmbt u:object_r:dump_bcmbt_exec:s0
diff --git a/bcmbt/manifest_bluetooth.xml b/bcmbt/manifest_bluetooth.xml
deleted file mode 100644
index 7a7c5f1..0000000
--- a/bcmbt/manifest_bluetooth.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
- android.hardware.bluetooth
- 1
- IBluetoothHci/default
-
-
- android.hardware.bluetooth.finder
- 1
- IBluetoothFinder/default
-
-
- android.hardware.bluetooth.ranging
- 1
- IBluetoothChannelSounding/default
-
-
- vendor.google.bluetooth_ext
- 2
- IBTChannelAvoidance/default
- IBluetoothCcc/default
- IBluetoothEwp/default
- IBluetoothExt/default
- IBluetoothFinder/default
- IBluetoothSar/default
- IBluetoothCco/default
-
-
diff --git a/bcmbt/sepolicy/device.te b/bcmbt/sepolicy/device.te
deleted file mode 100644
index a256332..0000000
--- a/bcmbt/sepolicy/device.te
+++ /dev/null
@@ -1,3 +0,0 @@
-# Bt Wifi Coexistence device
-type wb_coexistence_dev, dev_type;
-
diff --git a/bcmbt/sepolicy/file_contexts b/bcmbt/sepolicy/file_contexts
deleted file mode 100644
index e7aac6a..0000000
--- a/bcmbt/sepolicy/file_contexts
+++ /dev/null
@@ -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
-
diff --git a/bcmbt/sepolicy/genfs_contexts b/bcmbt/sepolicy/genfs_contexts
deleted file mode 100644
index 607e146..0000000
--- a/bcmbt/sepolicy/genfs_contexts
+++ /dev/null
@@ -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
-
diff --git a/bcmbt/sepolicy/hal_bluetooth_btlinux.te b/bcmbt/sepolicy/hal_bluetooth_btlinux.te
deleted file mode 100644
index 263f689..0000000
--- a/bcmbt/sepolicy/hal_bluetooth_btlinux.te
+++ /dev/null
@@ -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;
-')
diff --git a/bcmbt/sepolicy/hwservice.te b/bcmbt/sepolicy/hwservice.te
deleted file mode 100644
index 5e36cd0..0000000
--- a/bcmbt/sepolicy/hwservice.te
+++ /dev/null
@@ -1,3 +0,0 @@
-# Bluetooth HAL extension
-type hal_bluetooth_coexistence_hwservice, hwservice_manager_type, vendor_hwservice_type;
-
diff --git a/bcmbt/sepolicy/hwservice_contexts b/bcmbt/sepolicy/hwservice_contexts
deleted file mode 100644
index 8480b4e..0000000
--- a/bcmbt/sepolicy/hwservice_contexts
+++ /dev/null
@@ -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
diff --git a/bcmbt/sepolicy/service.te b/bcmbt/sepolicy/service.te
deleted file mode 100644
index b8403da..0000000
--- a/bcmbt/sepolicy/service.te
+++ /dev/null
@@ -1,2 +0,0 @@
-# Bluetooth HAL extension
-type hal_bluetooth_coexistence_service, hal_service_type, service_manager_type;
diff --git a/bcmbt/sepolicy/service_contexts b/bcmbt/sepolicy/service_contexts
deleted file mode 100644
index e91eb1e..0000000
--- a/bcmbt/sepolicy/service_contexts
+++ /dev/null
@@ -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
diff --git a/betterbug/betterbug.mk b/betterbug/betterbug.mk
deleted file mode 100644
index adfde01..0000000
--- a/betterbug/betterbug.mk
+++ /dev/null
@@ -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
diff --git a/betterbug/sepolicy/product/private/better_bug_app.te b/betterbug/sepolicy/product/private/better_bug_app.te
deleted file mode 100644
index 26e0565..0000000
--- a/betterbug/sepolicy/product/private/better_bug_app.te
+++ /dev/null
@@ -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)
diff --git a/betterbug/sepolicy/product/private/seapp_contexts b/betterbug/sepolicy/product/private/seapp_contexts
deleted file mode 100644
index 77fe3e1..0000000
--- a/betterbug/sepolicy/product/private/seapp_contexts
+++ /dev/null
@@ -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
diff --git a/betterbug/sepolicy/product/public/better_bug_app.te b/betterbug/sepolicy/product/public/better_bug_app.te
deleted file mode 100644
index 9a14782..0000000
--- a/betterbug/sepolicy/product/public/better_bug_app.te
+++ /dev/null
@@ -1 +0,0 @@
-type better_bug_app, domain;
diff --git a/bluetooth/bluetooth.mk b/bluetooth/bluetooth.mk
deleted file mode 100644
index c0f043a..0000000
--- a/bluetooth/bluetooth.mk
+++ /dev/null
@@ -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
diff --git a/bluetooth/compatibility_matrix.xml b/bluetooth/compatibility_matrix.xml
deleted file mode 100644
index 65b0c6d..0000000
--- a/bluetooth/compatibility_matrix.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
- vendor.google.bluetooth_ext
- 1
-
- IBluetoothFinder
- default
-
-
- IBluetoothCcc
- default
-
-
- IBTChannelAvoidance
- default
-
-
- IBluetoothSar
- default
-
-
- IBluetoothExt
- default
-
-
- IBluetoothEwp
- default
-
-
-
diff --git a/bluetooth/dump/dumplog.mk b/bluetooth/dump/dumplog.mk
deleted file mode 100644
index 2f1944e..0000000
--- a/bluetooth/dump/dumplog.mk
+++ /dev/null
@@ -1 +0,0 @@
-BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/bluetooth/dump/sepolicy/
diff --git a/bluetooth/dump/sepolicy/dump.te b/bluetooth/dump/sepolicy/dump.te
deleted file mode 100644
index fdd123e..0000000
--- a/bluetooth/dump/sepolicy/dump.te
+++ /dev/null
@@ -1,12 +0,0 @@
-# pixel bluetooth common hal service
-pixel_bugreport(dump_bt)
-
-allow hal_dumpstate_default vendor_bt_data_file:dir { open read search };
-allow hal_dumpstate_default vendor_bt_data_file:file read;
-allow dump_bt radio_vendor_data_file:dir create_dir_perms;
-allow dump_bt radio_vendor_data_file:file create_file_perms;
-allow dump_bt vendor_bt_data_file:dir r_dir_perms;
-allow dump_bt vendor_bt_data_file:file r_file_perms;
-allow dump_bt sscoredump_vendor_data_crashinfo_file:dir search;
-allow dump_bt sscoredump_vendor_data_coredump_file:dir r_dir_perms;
-allow dump_bt sscoredump_vendor_data_coredump_file:file r_file_perms;
diff --git a/bluetooth/dump/sepolicy/file_contexts b/bluetooth/dump/sepolicy/file_contexts
deleted file mode 100644
index da28d10..0000000
--- a/bluetooth/dump/sepolicy/file_contexts
+++ /dev/null
@@ -1,2 +0,0 @@
-# bt common hal dump_bt service
-/vendor/bin/dump/dump_bt u:object_r:dump_bt_exec:s0
diff --git a/bluetooth/manifest_bluetooth.xml b/bluetooth/manifest_bluetooth.xml
deleted file mode 100644
index a72f1c9..0000000
--- a/bluetooth/manifest_bluetooth.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
- android.hardware.bluetooth
- 1
- IBluetoothHci/default
-
-
- android.hardware.bluetooth.finder
- 1
- IBluetoothFinder/default
-
-
- android.hardware.bluetooth.ranging
- 1
- IBluetoothChannelSounding/default
-
-
- vendor.google.bluetooth_ext
- 1
- IBTChannelAvoidance/default
- IBluetoothCcc/default
- IBluetoothEwp/default
- IBluetoothExt/default
- IBluetoothFinder/default
- IBluetoothSar/default
-
-
diff --git a/bluetooth/sepolicy/device.te b/bluetooth/sepolicy/device.te
deleted file mode 100644
index a256332..0000000
--- a/bluetooth/sepolicy/device.te
+++ /dev/null
@@ -1,3 +0,0 @@
-# Bt Wifi Coexistence device
-type wb_coexistence_dev, dev_type;
-
diff --git a/bluetooth/sepolicy/file_contexts b/bluetooth/sepolicy/file_contexts
deleted file mode 100644
index e7c2617..0000000
--- a/bluetooth/sepolicy/file_contexts
+++ /dev/null
@@ -1,6 +0,0 @@
-# Bluetooth
-/vendor/bin/hw/android\.hardware\.bluetooth-service\.pixel 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
-
diff --git a/bluetooth/sepolicy/genfs_contexts b/bluetooth/sepolicy/genfs_contexts
deleted file mode 100644
index 899041b..0000000
--- a/bluetooth/sepolicy/genfs_contexts
+++ /dev/null
@@ -1,8 +0,0 @@
-# Bluetooth pin control device node
-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
-
diff --git a/bluetooth/sepolicy/hal_bluetooth_btlinux.te b/bluetooth/sepolicy/hal_bluetooth_btlinux.te
deleted file mode 100644
index 0c85cb0..0000000
--- a/bluetooth/sepolicy/hal_bluetooth_btlinux.te
+++ /dev/null
@@ -1,19 +0,0 @@
-# coexistence device file node
-add_hwservice(hal_bluetooth_btlinux, hal_bluetooth_coexistence_hwservice);
-add_service(hal_bluetooth_btlinux, hal_bluetooth_coexistence_service);
-allow hal_bluetooth_btlinux wb_coexistence_dev:chr_file rw_file_perms;
-
-# power stats
-allow hal_bluetooth_btlinux hal_power_stats_vendor_service:service_manager find;
-binder_call(hal_bluetooth_btlinux, hal_power_stats_default)
-
-# bt firmware dump
-allow hal_bluetooth_btlinux aconfig_storage_metadata_file:dir search;
-allow hal_bluetooth_btlinux sscoredump_vendor_data_crashinfo_file:dir rw_dir_perms;
-allow hal_bluetooth_btlinux sscoredump_vendor_data_crashinfo_file:file rw_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;
-')
diff --git a/bluetooth/sepolicy/hwservice.te b/bluetooth/sepolicy/hwservice.te
deleted file mode 100644
index 5e36cd0..0000000
--- a/bluetooth/sepolicy/hwservice.te
+++ /dev/null
@@ -1,3 +0,0 @@
-# Bluetooth HAL extension
-type hal_bluetooth_coexistence_hwservice, hwservice_manager_type, vendor_hwservice_type;
-
diff --git a/bluetooth/sepolicy/hwservice_contexts b/bluetooth/sepolicy/hwservice_contexts
deleted file mode 100644
index 8480b4e..0000000
--- a/bluetooth/sepolicy/hwservice_contexts
+++ /dev/null
@@ -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
diff --git a/bluetooth/sepolicy/service.te b/bluetooth/sepolicy/service.te
deleted file mode 100644
index b8403da..0000000
--- a/bluetooth/sepolicy/service.te
+++ /dev/null
@@ -1,2 +0,0 @@
-# Bluetooth HAL extension
-type hal_bluetooth_coexistence_service, hal_service_type, service_manager_type;
diff --git a/bluetooth/sepolicy/service_contexts b/bluetooth/sepolicy/service_contexts
deleted file mode 100644
index 4aecc90..0000000
--- a/bluetooth/sepolicy/service_contexts
+++ /dev/null
@@ -1,7 +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
diff --git a/bootctrl/1.2/Android.bp b/bootctrl/1.2/Android.bp
deleted file mode 100644
index ad0b0e1..0000000
--- a/bootctrl/1.2/Android.bp
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// Copyright (C) 2020 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-soong_namespace {
- imports: [
- "hardware/google/pixel",
- ],
-}
-
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "//device/google/gs-common:device_google_gs-common_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: [
- "//device/google/gs-common:device_google_gs-common_license",
- ],
-}
-
-cc_binary {
- name: "android.hardware.boot@1.2-service-pixel",
- defaults: ["hidl_defaults"],
- relative_install_path: "hw",
- vendor: true,
- init_rc: ["android.hardware.boot@1.2-service-pixel.rc"],
- srcs: [
- "BootControl.cpp",
- "GptUtils.cpp",
- "service.cpp"
- ],
- shared_libs: [
- "libbase",
- "liblog",
- "libhidlbase",
- "libutils",
- "libcutils",
- "libz",
- "libtrusty",
- "android.hardware.boot@1.0",
- "android.hardware.boot@1.1",
- "android.hardware.boot@1.2",
- ],
- static_libs: [
- "libboot_control",
- "libbootloader_message_vendor",
- "libfstab",
- ],
-}
-
-cc_library {
- name: "android.hardware.boot@1.2-impl-pixel",
- stem: "android.hardware.boot@1.0-impl-1.2-impl-pixel",
- recovery: true,
- srcs: [
- "BootControl.cpp",
- "GptUtils.cpp",
- ],
- relative_install_path: "hw",
- shared_libs: [
- "libbase",
- "liblog",
- "libhidlbase",
- "libutils",
- "libcutils",
- "libz",
- "libtrusty",
- "android.hardware.boot@1.0",
- "android.hardware.boot@1.1",
- "android.hardware.boot@1.2",
- ],
- static_libs: [
- "libboot_control",
- "libbootloader_message_vendor",
- "libfstab",
- ],
-}
diff --git a/bootctrl/1.2/BootControl.cpp b/bootctrl/1.2/BootControl.cpp
deleted file mode 100644
index 54764a0..0000000
--- a/bootctrl/1.2/BootControl.cpp
+++ /dev/null
@@ -1,526 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "bootcontrolhal"
-
-#include "BootControl.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "DevInfo.h"
-#include "GptUtils.h"
-
-namespace android {
-namespace hardware {
-namespace boot {
-namespace V1_2 {
-namespace implementation {
-
-using android::bootable::GetMiscVirtualAbMergeStatus;
-using android::bootable::InitMiscVirtualAbMessageIfNeeded;
-using android::bootable::SetMiscVirtualAbMergeStatus;
-using android::hardware::boot::V1_0::BoolResult;
-using android::hardware::boot::V1_0::CommandResult;
-using android::hardware::boot::V1_1::MergeStatus;
-
-namespace {
-
-// clang-format off
-
-#define BOOT_A_PATH "/dev/block/by-name/boot_a"
-#define BOOT_B_PATH "/dev/block/by-name/boot_b"
-#define DEVINFO_PATH "/dev/block/by-name/devinfo"
-
-#define BLOW_AR_PATH "/sys/kernel/boot_control/blow_ar"
-
-// slot flags
-#define AB_ATTR_PRIORITY_SHIFT 52
-#define AB_ATTR_PRIORITY_MASK (3UL << AB_ATTR_PRIORITY_SHIFT)
-#define AB_ATTR_ACTIVE_SHIFT 54
-#define AB_ATTR_ACTIVE (1UL << AB_ATTR_ACTIVE_SHIFT)
-#define AB_ATTR_RETRY_COUNT_SHIFT (55)
-#define AB_ATTR_RETRY_COUNT_MASK (7UL << AB_ATTR_RETRY_COUNT_SHIFT)
-#define AB_ATTR_SUCCESSFUL (1UL << 58)
-#define AB_ATTR_UNBOOTABLE (1UL << 59)
-
-#define AB_ATTR_MAX_PRIORITY 3UL
-#define AB_ATTR_MAX_RETRY_COUNT 3UL
-
-// clang-format on
-
-static std::string getDevPath(uint32_t slot) {
- char real_path[PATH_MAX];
-
- const char *path = slot == 0 ? BOOT_A_PATH : BOOT_B_PATH;
-
- int ret = readlink(path, real_path, sizeof real_path);
- if (ret < 0) {
- ALOGE("readlink failed for boot device %s\n", strerror(errno));
- return std::string();
- }
-
- std::string dp(real_path);
- // extract /dev/sda.. part
- return dp.substr(0, sizeof "/dev/block/sdX" - 1);
-}
-
-static bool isSlotFlagSet(uint32_t slot, uint64_t flag) {
- std::string dev_path = getDevPath(slot);
- if (dev_path.empty()) {
- ALOGI("Could not get device path for slot %d\n", slot);
- return false;
- }
-
- GptUtils gpt(dev_path);
- if (gpt.Load()) {
- ALOGI("failed to load gpt data\n");
- return false;
- }
-
- gpt_entry *e = gpt.GetPartitionEntry(slot ? "boot_b" : "boot_a");
- if (e == nullptr) {
- ALOGI("failed to get gpt entry\n");
- return false;
- }
-
- return !!(e->attr & flag);
-}
-
-static bool setSlotFlag(uint32_t slot, uint64_t flag) {
- std::string dev_path = getDevPath(slot);
- if (dev_path.empty()) {
- ALOGI("Could not get device path for slot %d\n", slot);
- return false;
- }
-
- GptUtils gpt(dev_path);
- if (gpt.Load()) {
- ALOGI("failed to load gpt data\n");
- return false;
- }
-
- gpt_entry *e = gpt.GetPartitionEntry(slot ? "boot_b" : "boot_a");
- if (e == nullptr) {
- ALOGI("failed to get gpt entry\n");
- return false;
- }
-
- e->attr |= flag;
- gpt.Sync();
-
- return true;
-}
-
-static bool is_devinfo_valid;
-static bool is_devinfo_initialized;
-static std::mutex devinfo_lock;
-static devinfo_t devinfo;
-
-static bool isDevInfoValid() {
- const std::lock_guard lock(devinfo_lock);
-
- if (is_devinfo_initialized) {
- return is_devinfo_valid;
- }
-
- is_devinfo_initialized = true;
-
- android::base::unique_fd fd(open(DEVINFO_PATH, O_RDONLY));
- android::base::ReadFully(fd, &devinfo, sizeof devinfo);
-
- if (devinfo.magic != DEVINFO_MAGIC) {
- return is_devinfo_valid;
- }
-
- uint32_t version = ((uint32_t)devinfo.ver_major << 16) | devinfo.ver_minor;
- // only version 3.3+ supports A/B data
- if (version >= 0x0003'0003) {
- is_devinfo_valid = true;
- }
-
- return is_devinfo_valid;
-}
-
-static bool DevInfoSync() {
- if (!isDevInfoValid()) {
- return false;
- }
-
- android::base::unique_fd fd(open(DEVINFO_PATH, O_WRONLY | O_DSYNC));
- return android::base::WriteFully(fd, &devinfo, sizeof devinfo);
-}
-
-static void DevInfoInitSlot(devinfo_ab_slot_data_t &slot_data) {
- slot_data.retry_count = AB_ATTR_MAX_RETRY_COUNT;
- slot_data.unbootable = 0;
- slot_data.successful = 0;
- slot_data.active = 1;
- slot_data.fastboot_ok = 0;
-}
-
-static int blow_otp_AR(bool secure) {
- static const char *dev_name = "/dev/trusty-ipc-dev0";
- static const char *otp_name = "com.android.trusty.otp_manager.tidl";
- int fd = 1, ret = 0;
- uint32_t cmd = secure? OTP_CMD_write_antirbk_secure_ap : OTP_CMD_write_antirbk_non_secure_ap;
- fd = tipc_connect(dev_name, otp_name);
- if (fd < 0) {
- ALOGI("Failed to connect to OTP_MGR ns TA - is it missing?\n");
- ret = -1;
- return ret;
- }
-
- struct otp_mgr_req_base req = {
- .command = cmd,
- .resp_payload_size = 0,
- };
- struct iovec iov[] = {
- {
- .iov_base = &req,
- .iov_len = sizeof(req),
- },
- };
-
- int rc = tipc_send(fd, iov, 1, NULL, 0);
- if (rc != sizeof(req)) {
- ALOGI("Send fail! %x\n", rc);
- return rc;
- }
-
- struct otp_mgr_rsp_base resp;
- rc = read(fd, &resp, sizeof(resp));
- if (rc < 0) {
- ALOGI("Read fail! %x\n", rc);
- return rc;
- }
-
- if (rc < sizeof(resp)) {
- ALOGI("Not enough data! %x\n", rc);
- return -EIO;
- }
-
- if (resp.command != (cmd | OTP_RESP_BIT)) {
- ALOGI("Wrong command! %x\n", resp.command);
- return -EINVAL;
- }
-
- if (resp.result != 0) {
- fprintf(stderr, "AR writing error! %x\n", resp.result);
- return -EINVAL;
- }
-
- tipc_close(fd);
- return 0;
-}
-
-static bool blowAR_zuma() {
- int ret = blow_otp_AR(true);
- if (ret) {
- ALOGI("Blow secure anti-rollback OTP failed");
- return false;
- }
-
- ret = blow_otp_AR(false);
- if (ret) {
- ALOGI("Blow non-secure anti-rollback OTP failed");
- return false;
- }
-
- return true;
-}
-
-static bool blowAR_gs101() {
- android::base::unique_fd fd(open(BLOW_AR_PATH, O_WRONLY | O_DSYNC));
- return android::base::WriteStringToFd("1", fd);
-}
-
-static bool blowAR() {
- const auto& platform = ::android::base::GetProperty("ro.boot.hardware.platform", "");
-
- if (platform == "gs101") {
- return blowAR_gs101();
- } else if (platform == "gs201" || platform == "zuma" || platform == "zumapro") {
- return blowAR_zuma();
- }
-
- return false;
-}
-
-} // namespace
-
-// Methods from ::android::hardware::boot::V1_0::IBootControl follow.
-Return BootControl::getNumberSlots() {
- uint32_t slots = 0;
-
- if (access(BOOT_A_PATH, F_OK) == 0)
- slots++;
-
- if (access(BOOT_B_PATH, F_OK) == 0)
- slots++;
-
- return slots;
-}
-
-Return BootControl::getCurrentSlot() {
- char suffix[PROPERTY_VALUE_MAX];
- property_get("ro.boot.slot_suffix", suffix, "_a");
- return std::string(suffix) == "_b" ? 1 : 0;
-}
-
-Return BootControl::markBootSuccessful(markBootSuccessful_cb _hidl_cb) {
- if (getNumberSlots() == 0) {
- // no slots, just return true otherwise Android keeps trying
- _hidl_cb({true, ""});
- return Void();
- }
-
- bool ret;
- if (isDevInfoValid()) {
- auto const slot = getCurrentSlot();
- devinfo.ab_data.slots[slot].successful = 1;
- ret = DevInfoSync();
- } else {
- ret = setSlotFlag(getCurrentSlot(), AB_ATTR_SUCCESSFUL);
- }
-
- if (!ret) {
- _hidl_cb({false, "Failed to set successful flag"});
- return Void();
- }
-
- if (!blowAR()) {
- ALOGE("Failed to blow anti-rollback counter");
- // Ignore the error, since ABL will re-trigger it on reboot
- }
-
- _hidl_cb({true, ""});
- return Void();
-}
-
-Return BootControl::setActiveBootSlot(uint32_t slot, setActiveBootSlot_cb _hidl_cb) {
- if (slot >= 2) {
- _hidl_cb({false, "Invalid slot"});
- return Void();
- }
-
- if (isDevInfoValid()) {
- auto &active_slot_data = devinfo.ab_data.slots[slot];
- auto &inactive_slot_data = devinfo.ab_data.slots[!slot];
-
- inactive_slot_data.active = 0;
- DevInfoInitSlot(active_slot_data);
-
- if (!DevInfoSync()) {
- _hidl_cb({false, "Could not update DevInfo data"});
- return Void();
- }
- } else {
- std::string dev_path = getDevPath(slot);
- if (dev_path.empty()) {
- _hidl_cb({false, "Could not get device path for slot"});
- return Void();
- }
-
- GptUtils gpt(dev_path);
- if (gpt.Load()) {
- _hidl_cb({false, "failed to load gpt data"});
- return Void();
- }
-
- gpt_entry *active_entry = gpt.GetPartitionEntry(slot == 0 ? "boot_a" : "boot_b");
- gpt_entry *inactive_entry = gpt.GetPartitionEntry(slot == 0 ? "boot_b" : "boot_a");
- if (active_entry == nullptr || inactive_entry == nullptr) {
- _hidl_cb({false, "failed to get entries for boot partitions"});
- return Void();
- }
-
- ALOGV("slot active attributes %lx\n", active_entry->attr);
- ALOGV("slot inactive attributes %lx\n", inactive_entry->attr);
-
- // update attributes for active and inactive
- inactive_entry->attr &= ~AB_ATTR_ACTIVE;
- active_entry->attr = AB_ATTR_ACTIVE | (AB_ATTR_MAX_PRIORITY << AB_ATTR_PRIORITY_SHIFT) |
- (AB_ATTR_MAX_RETRY_COUNT << AB_ATTR_RETRY_COUNT_SHIFT);
- }
-
- char boot_dev[PROPERTY_VALUE_MAX];
- property_get("ro.boot.bootdevice", boot_dev, "");
- if (boot_dev[0] == '\0') {
- ALOGI("failed to get ro.boot.bootdevice. try ro.boot.boot_devices\n");
- property_get("ro.boot.boot_devices", boot_dev, "");
- if (boot_dev[0] == '\0') {
- _hidl_cb({false, "invalid ro.boot.bootdevice and ro.boot.boot_devices prop"});
- return Void();
- }
- }
-
- std::string boot_lun_path =
- std::string("/sys/devices/platform/") + boot_dev + "/pixel/boot_lun_enabled";
- int fd = open(boot_lun_path.c_str(), O_RDWR | O_DSYNC);
- if (fd < 0) {
- // Try old path for kernels < 5.4
- // TODO: remove once kernel 4.19 support is deprecated
- std::string boot_lun_path =
- std::string("/sys/devices/platform/") + boot_dev + "/attributes/boot_lun_enabled";
- fd = open(boot_lun_path.c_str(), O_RDWR | O_DSYNC);
- if (fd < 0) {
- _hidl_cb({false, "failed to open ufs attr boot_lun_enabled"});
- return Void();
- }
- }
-
- //
- // bBootLunEn
- // 0x1 => Boot LU A = enabled, Boot LU B = disable
- // 0x2 => Boot LU A = disable, Boot LU B = enabled
- //
- int ret = android::base::WriteStringToFd(slot == 0 ? "1" : "2", fd);
- close(fd);
- if (ret < 0) {
- _hidl_cb({false, "faied to write boot_lun_enabled attribute"});
- return Void();
- }
-
- _hidl_cb({true, ""});
- return Void();
-}
-
-Return BootControl::setSlotAsUnbootable(uint32_t slot, setSlotAsUnbootable_cb _hidl_cb) {
- if (slot >= 2) {
- _hidl_cb({false, "Invalid slot"});
- return Void();
- }
-
- if (isDevInfoValid()) {
- auto &slot_data = devinfo.ab_data.slots[slot];
- slot_data.unbootable = 1;
- if (!DevInfoSync()) {
- _hidl_cb({false, "Could not update DevInfo data"});
- return Void();
- }
- } else {
- std::string dev_path = getDevPath(slot);
- if (dev_path.empty()) {
- _hidl_cb({false, "Could not get device path for slot"});
- return Void();
- }
-
- GptUtils gpt(dev_path);
- gpt.Load();
-
- gpt_entry *e = gpt.GetPartitionEntry(slot ? "boot_b" : "boot_a");
- e->attr |= AB_ATTR_UNBOOTABLE;
-
- gpt.Sync();
- }
-
- _hidl_cb({true, ""});
- return Void();
-}
-
-Return<::android::hardware::boot::V1_0::BoolResult> BootControl::isSlotBootable(uint32_t slot) {
- if (getNumberSlots() == 0)
- return BoolResult::FALSE;
- if (slot >= getNumberSlots())
- return BoolResult::INVALID_SLOT;
-
- bool unbootable;
- if (isDevInfoValid()) {
- auto &slot_data = devinfo.ab_data.slots[slot];
- unbootable = !!slot_data.unbootable;
- } else {
- unbootable = isSlotFlagSet(slot, AB_ATTR_UNBOOTABLE);
- }
-
- return unbootable ? BoolResult::FALSE : BoolResult::TRUE;
-}
-
-Return<::android::hardware::boot::V1_0::BoolResult> BootControl::isSlotMarkedSuccessful(
- uint32_t slot) {
- if (getNumberSlots() == 0) {
- // just return true so that we don't we another call trying to mark it as successful
- // when there is no slots
- return BoolResult::TRUE;
- }
- if (slot >= getNumberSlots())
- return BoolResult::INVALID_SLOT;
-
- bool successful;
- if (isDevInfoValid()) {
- auto &slot_data = devinfo.ab_data.slots[slot];
- successful = !!slot_data.successful;
- } else {
- successful = isSlotFlagSet(slot, AB_ATTR_SUCCESSFUL);
- }
-
- return successful ? BoolResult::TRUE : BoolResult::FALSE;
-}
-
-Return BootControl::getSuffix(uint32_t slot, getSuffix_cb _hidl_cb) {
- _hidl_cb(slot == 0 ? "_a" : slot == 1 ? "_b" : "");
- return Void();
-}
-
-// Methods from ::android::hardware::boot::V1_1::IBootControl follow.
-bool BootControl::Init() {
- return InitMiscVirtualAbMessageIfNeeded();
-}
-
-Return BootControl::setSnapshotMergeStatus(
- ::android::hardware::boot::V1_1::MergeStatus status) {
- return SetMiscVirtualAbMergeStatus(getCurrentSlot(), status);
-}
-
-Return<::android::hardware::boot::V1_1::MergeStatus> BootControl::getSnapshotMergeStatus() {
- MergeStatus status;
- if (!GetMiscVirtualAbMergeStatus(getCurrentSlot(), &status)) {
- return MergeStatus::UNKNOWN;
- }
- return status;
-}
-
-// Methods from ::android::hardware::boot::V1_2::IBootControl follow.
-Return BootControl::getActiveBootSlot() {
- if (getNumberSlots() == 0)
- return 0;
-
- if (isDevInfoValid())
- return devinfo.ab_data.slots[1].active ? 1 : 0;
- return isSlotFlagSet(1, AB_ATTR_ACTIVE) ? 1 : 0;
-}
-
-// Methods from ::android::hidl::base::V1_0::IBase follow.
-
-IBootControl *HIDL_FETCH_IBootControl(const char * /* name */) {
- auto module = new BootControl();
-
- module->Init();
-
- return module;
-}
-
-} // namespace implementation
-} // namespace V1_2
-} // namespace boot
-} // namespace hardware
-} // namespace android
diff --git a/bootctrl/1.2/BootControl.h b/bootctrl/1.2/BootControl.h
deleted file mode 100644
index 45b7efa..0000000
--- a/bootctrl/1.2/BootControl.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include
-#include
-#include
-
-namespace android {
-namespace hardware {
-namespace boot {
-namespace V1_2 {
-namespace implementation {
-
-using ::android::sp;
-using ::android::hardware::hidl_array;
-using ::android::hardware::hidl_memory;
-using ::android::hardware::hidl_string;
-using ::android::hardware::hidl_vec;
-using ::android::hardware::Return;
-using ::android::hardware::Void;
-
-struct BootControl : public IBootControl {
- bool Init();
-
- // Methods from ::android::hardware::boot::V1_0::IBootControl follow.
- Return getNumberSlots() override;
- Return getCurrentSlot() override;
- Return markBootSuccessful(markBootSuccessful_cb _hidl_cb) override;
- Return setActiveBootSlot(uint32_t slot, setActiveBootSlot_cb _hidl_cb) override;
- Return setSlotAsUnbootable(uint32_t slot, setSlotAsUnbootable_cb _hidl_cb) override;
- Return<::android::hardware::boot::V1_0::BoolResult> isSlotBootable(uint32_t slot) override;
- Return<::android::hardware::boot::V1_0::BoolResult> isSlotMarkedSuccessful(
- uint32_t slot) override;
- Return getSuffix(uint32_t slot, getSuffix_cb _hidl_cb) override;
-
- // Methods from ::android::hardware::boot::V1_1::IBootControl follow.
- Return setSnapshotMergeStatus(
- ::android::hardware::boot::V1_1::MergeStatus status) override;
- Return<::android::hardware::boot::V1_1::MergeStatus> getSnapshotMergeStatus() override;
-
- // Methods from ::android::hardware::boot::V1_2::IBootControl follow.
- Return getActiveBootSlot() override;
-
- // Methods from ::android::hidl::base::V1_0::IBase follow.
-};
-
-// FIXME: most likely delete, this is only for passthrough implementations
-extern "C" IBootControl *HIDL_FETCH_IBootControl(const char *name);
-
-enum otpmgr_command : uint32_t {
- OTP_REQ_SHIFT = 1,
- OTP_RESP_BIT = 1,
- OTP_CMD_write_antirbk_non_secure_ap = (7 << OTP_REQ_SHIFT),
- OTP_CMD_write_antirbk_secure_ap = (8 << OTP_REQ_SHIFT),
-};
-
-struct otp_mgr_req_base {
- uint32_t command;
- uint32_t resp_payload_size;
- uint8_t handle;
-}__packed;
-
-struct otp_mgr_rsp_base {
- uint32_t command;
- uint32_t resp_payload_size;
- int result;
-}__packed;
-
-} // namespace implementation
-} // namespace V1_2
-} // namespace boot
-} // namespace hardware
-} // namespace android
diff --git a/bootctrl/1.2/DevInfo.h b/bootctrl/1.2/DevInfo.h
deleted file mode 100644
index a09a83a..0000000
--- a/bootctrl/1.2/DevInfo.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2021 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.
- */
-
-#pragma once
-
-namespace android {
-namespace hardware {
-namespace boot {
-namespace V1_2 {
-namespace implementation {
-
-//
-// definitions taken from ABL code
-//
-
-constexpr uint32_t DEVINFO_MAGIC = 0x49564544;
-constexpr size_t DEVINFO_AB_SLOT_COUNT = 2;
-
-struct devinfo_ab_slot_data_t {
- uint8_t retry_count;
- uint8_t unbootable : 1;
- uint8_t successful : 1;
- uint8_t active : 1;
- uint8_t fastboot_ok : 1;
- uint8_t : 4;
- uint8_t unused[2];
-} __attribute__((packed));
-
-typedef struct {
- devinfo_ab_slot_data_t slots[DEVINFO_AB_SLOT_COUNT];
-} __attribute__((packed)) devinfo_ab_data_t;
-
-struct devinfo_t {
- uint32_t magic;
- uint16_t ver_major;
- uint16_t ver_minor;
- uint8_t unused[40];
- devinfo_ab_data_t ab_data;
- uint8_t unused1[72]; // use remaining up to complete 128 bytes
-} __attribute__((packed));
-
-static_assert(sizeof(devinfo_t) == 128, "invalid devinfo struct size");
-
-} // namespace implementation
-} // namespace V1_2
-} // namespace boot
-} // namespace hardware
-} // namespace android
diff --git a/bootctrl/1.2/GptUtils.cpp b/bootctrl/1.2/GptUtils.cpp
deleted file mode 100644
index 25088e7..0000000
--- a/bootctrl/1.2/GptUtils.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#define LOG_TAG "bootcontrolhal"
-
-#include "GptUtils.h"
-
-#include
-#include
-#include
-#include
-#include
-
-namespace android {
-namespace hardware {
-namespace boot {
-namespace V1_2 {
-namespace implementation {
-
-namespace {
-
-static int ValidateGptHeader(gpt_header *gpt) {
- if (gpt->signature != GPT_SIGNATURE) {
- ALOGE("invalid gpt signature 0x%lx\n", gpt->signature);
- return -1;
- }
-
- if (gpt->header_size != sizeof(gpt_header)) {
- ALOGE("invalid gpt header size %u\n", gpt->header_size);
- return -1;
- }
-
- if (gpt->entry_size != sizeof(gpt_entry)) {
- ALOGE("invalid gpt entry size %u\n", gpt->entry_size);
- return -1;
- }
-
- return 0;
-}
-
-} // namespace
-
-GptUtils::GptUtils(const std::string dev_path) : dev_path(dev_path), fd(0) {}
-
-int GptUtils::Load(void) {
- fd = open(dev_path.c_str(), O_RDWR);
- if (fd < 0) {
- ALOGE("failed to open block dev %s, %d\n", dev_path.c_str(), errno);
- return -1;
- }
-
- int ret = ioctl(fd, BLKSSZGET, &block_size);
- if (ret < 0) {
- ALOGE("failed to get block size %d\n", errno);
- return -1;
- }
-
- // read primary header
- lseek64(fd, block_size, SEEK_SET);
- ret = read(fd, &gpt_primary, sizeof gpt_primary);
- if (ret < 0) {
- ALOGE("failed to read gpt primary header %d\n", errno);
- return -1;
- }
-
- if (ValidateGptHeader(&gpt_primary)) {
- ALOGE("error validating gpt header\n");
- return -1;
- }
-
- // read partition entries
- entry_array.resize(gpt_primary.entry_count);
- uint32_t entries_size = gpt_primary.entry_size * gpt_primary.entry_count;
- lseek64(fd, block_size * gpt_primary.start_lba, SEEK_SET);
- ret = read(fd, entry_array.data(), entries_size);
- if (ret < 0) {
- ALOGE("failed to read gpt partition entries %d\n", errno);
- return -1;
- }
-
- // read gpt back header
- lseek64(fd, block_size * gpt_primary.backup_lba, SEEK_SET);
- ret = read(fd, &gpt_backup, sizeof gpt_backup);
- if (ret < 0) {
- ALOGE("failed to read gpt backup header %d\n", errno);
- return -1;
- }
-
- if (ValidateGptHeader(&gpt_backup)) {
- ALOGW("error validating gpt backup\n"); // just warn about it, not fail
- }
-
- // Create map
- auto get_name = [](const uint16_t *efi_name) {
- char name[37] = {};
- for (int i = 0; efi_name[i] && i < sizeof name - 1; ++i) name[i] = efi_name[i];
- return std::string(name);
- };
-
- for (auto const &e : entry_array) {
- if (e.name[0] == 0)
- break; // stop at the first partition with no name
- std::string s = get_name(e.name);
- entries[s] = const_cast(&e);
- }
-
- return 0;
-}
-
-gpt_entry *GptUtils::GetPartitionEntry(std::string name) {
- return entries.find(name) != entries.end() ? entries[name] : nullptr;
-}
-
-int GptUtils::Sync(void) {
- if (!fd)
- return -1;
-
- // calculate crc and check if we need to update gpt
- gpt_primary.entries_crc32 = crc32(0, reinterpret_cast(entry_array.data()),
- entry_array.size() * sizeof(gpt_entry));
-
- // save old crc
- uint32_t crc = gpt_primary.crc32;
- gpt_primary.crc32 = 0;
-
- gpt_primary.crc32 = crc32(0, reinterpret_cast(&gpt_primary), sizeof gpt_primary);
- if (crc == gpt_primary.crc32)
- return 0; // nothing to do (no changes)
-
- ALOGI("updating GPT\n");
-
- lseek64(fd, block_size * gpt_primary.current_lba, SEEK_SET);
- int ret = write(fd, &gpt_primary, sizeof gpt_primary);
- if (ret < 0) {
- ALOGE("failed to write gpt primary header %d\n", errno);
- return -1;
- }
-
- lseek64(fd, block_size * gpt_primary.start_lba, SEEK_SET);
- ret = write(fd, entry_array.data(), entry_array.size() * sizeof(gpt_entry));
- if (ret < 0) {
- ALOGE("failed to write gpt partition entries %d\n", errno);
- return -1;
- }
-
- // update GPT backup entries and backup
- lseek64(fd, block_size * gpt_backup.start_lba, SEEK_SET);
- ret = write(fd, entry_array.data(), entry_array.size() * sizeof(gpt_entry));
- if (ret < 0) {
- ALOGE("failed to write gpt backup partition entries %d\n", errno);
- return -1;
- }
-
- gpt_backup.entries_crc32 = gpt_primary.entries_crc32;
- gpt_backup.crc32 = 0;
- gpt_backup.crc32 = crc32(0, reinterpret_cast(&gpt_backup), sizeof gpt_backup);
- lseek64(fd, block_size * gpt_primary.backup_lba, SEEK_SET);
- ret = write(fd, &gpt_backup, sizeof gpt_backup);
- if (ret < 0) {
- ALOGE("failed to write gpt backup header %d\n", errno);
- return -1;
- }
-
- fsync(fd);
-
- return 0;
-}
-
-GptUtils::~GptUtils() {
- if (fd) {
- Sync();
- close(fd);
- }
-}
-
-} // namespace implementation
-} // namespace V1_2
-} // namespace boot
-} // namespace hardware
-} // namespace android
diff --git a/bootctrl/1.2/GptUtils.h b/bootctrl/1.2/GptUtils.h
deleted file mode 100644
index a2bed33..0000000
--- a/bootctrl/1.2/GptUtils.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#pragma once
-
-#include