Snap for 13025264 from 3f842350d7
to mainline-tzdata6-release
Change-Id: Iea561daccd5edf37d16abe72bd7312abfbdeaad2
This commit is contained in:
commit
fb8021ba67
53 changed files with 578 additions and 61 deletions
22
16kb/16kb.mk
Normal file
22
16kb/16kb.mk
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#
|
||||||
|
# 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
|
13
16kb/Android.bp
Normal file
13
16kb/Android.bp
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
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,
|
||||||
|
}
|
38
16kb/CopyEfsTest/Android.bp
Normal file
38
16kb/CopyEfsTest/Android.bp
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
// 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",
|
||||||
|
}
|
40
16kb/CopyEfsTest/AndroidTest.xml
Normal file
40
16kb/CopyEfsTest/AndroidTest.xml
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright (C) 2025 The Android Open Source Project
|
||||||
|
~
|
||||||
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
~ you may not use this file except in compliance with the License.
|
||||||
|
~ You may obtain a copy of the License at
|
||||||
|
~
|
||||||
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
~
|
||||||
|
~ Unless required by applicable law or agreed to in writing, software
|
||||||
|
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
~ See the License for the specific language governing permissions and
|
||||||
|
~ limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<configuration description="Runs 16K developer option test.">
|
||||||
|
<option name="test-suite-tag" value="apct"/>
|
||||||
|
|
||||||
|
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
|
||||||
|
<option name="force-root" value="true" />
|
||||||
|
</target_preparer>
|
||||||
|
|
||||||
|
<test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
|
||||||
|
<option name="jar" value="CopyEfsTest.jar" />
|
||||||
|
</test>
|
||||||
|
|
||||||
|
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
|
||||||
|
<!-- Unlock screen -->
|
||||||
|
<option name="run-command" value="input keyevent KEYCODE_WAKEUP" />
|
||||||
|
<!-- Dismiss keyguard, in case it's set as "Swipe to unlock" -->
|
||||||
|
<option name="run-command" value="wm dismiss-keyguard" />
|
||||||
|
<!-- Collapse notifications -->
|
||||||
|
<option name="run-command" value="cmd statusbar collapse" />
|
||||||
|
<!-- dismiss all system dialogs before launch test -->
|
||||||
|
<option name="run-command" value="am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS" />
|
||||||
|
</target_preparer>
|
||||||
|
|
||||||
|
</configuration>
|
130
16kb/CopyEfsTest/src/com/android/test/CopyEfsTest.java
Normal file
130
16kb/CopyEfsTest/src/com/android/test/CopyEfsTest.java
Normal file
|
@ -0,0 +1,130 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2025 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.android.test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
import static org.junit.Assume.assumeTrue;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.After;
|
||||||
|
|
||||||
|
import android.platform.test.annotations.AppModeFull;
|
||||||
|
|
||||||
|
import com.android.tradefed.device.DeviceNotAvailableException;
|
||||||
|
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
|
||||||
|
import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
|
||||||
|
import com.android.tradefed.testtype.junit4.DeviceTestRunOptions;
|
||||||
|
import com.android.tradefed.util.CommandResult;
|
||||||
|
import com.android.tradefed.util.RunUtil;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.StringReader;
|
||||||
|
|
||||||
|
@RunWith(DeviceJUnit4ClassRunner.class)
|
||||||
|
public class CopyEfsTest extends BaseHostJUnit4Test {
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setUp() throws Exception {
|
||||||
|
getDevice().enableAdbRoot();
|
||||||
|
|
||||||
|
getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test");
|
||||||
|
getDevice().executeShellCommand("mkdir -p /data/local/tmp/efs_test/mnt");
|
||||||
|
getDevice().executeShellCommand("mkdir -p /data/local/tmp/efs_test/dump");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@AppModeFull
|
||||||
|
public void copyEfsTest() throws Exception {
|
||||||
|
assumeTrue(getDevice().executeShellCommand("getconf PAGESIZE").trim().equals("4096"));
|
||||||
|
|
||||||
|
testDumpF2FS("efs");
|
||||||
|
testDumpF2FS("efs_backup");
|
||||||
|
testDumpF2FS("modem_userdata");
|
||||||
|
testDumpF2FS("persist");
|
||||||
|
}
|
||||||
|
|
||||||
|
private CommandResult RunAndCheckAdbCmd(String cmd) throws DeviceNotAvailableException {
|
||||||
|
CommandResult r = getDevice().executeShellV2Command(cmd);
|
||||||
|
assertEquals("Failed to run " + cmd, Integer.valueOf(0), r.getExitCode());
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove timestamps because ls on device does not support --time-style.
|
||||||
|
// Format is [permissions] [links] [uid] [gid] [size] time [name/symlink]
|
||||||
|
// time may vary greatly in formatting
|
||||||
|
// symlinks will be of the form a -> b
|
||||||
|
// So we can check for -> in the second to last spot to determine what position the timestamp ends at
|
||||||
|
// Remove totals because on disk block usage may change depending on filesystem
|
||||||
|
private String removeTimestamps(String input) {
|
||||||
|
StringBuilder output = new StringBuilder();
|
||||||
|
for (String line : input.split("\n")) {
|
||||||
|
String[] tokens = line.split("(?<![\\\\])\\s+");
|
||||||
|
if (tokens[0].equals("total"))
|
||||||
|
continue;
|
||||||
|
if (tokens.length < 3) {
|
||||||
|
output.append(line + "\n");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
int name_offset = 1;
|
||||||
|
if (tokens[tokens.length - 2].equals("->"))
|
||||||
|
name_offset = 3;
|
||||||
|
for (int i=0; i<tokens.length; i++) {
|
||||||
|
if (i >= 5 && i < tokens.length - name_offset)
|
||||||
|
continue;
|
||||||
|
if (i != 0)
|
||||||
|
output.append(" ");
|
||||||
|
output.append(tokens[i]);
|
||||||
|
}
|
||||||
|
output.append("\n");
|
||||||
|
}
|
||||||
|
return output.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void testDumpF2FS(String name) throws Exception {
|
||||||
|
RunAndCheckAdbCmd(String.format("cp /dev/block/by-name/%s /data/local/tmp/efs_test/%s.img", name, name));
|
||||||
|
|
||||||
|
// The device was mounted r/w. To get a clean image, we run fsck, and then mount to allow mount time fixes to happen.
|
||||||
|
// We can then dump and mount read only to ensure the contents should be the same.
|
||||||
|
RunAndCheckAdbCmd(String.format("fsck.f2fs -f /data/local/tmp/efs_test/%s.img", name));
|
||||||
|
RunAndCheckAdbCmd(String.format("mount /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name));
|
||||||
|
RunAndCheckAdbCmd("umount /data/local/tmp/efs_test/mnt");
|
||||||
|
|
||||||
|
RunAndCheckAdbCmd(String.format("dump.f2fs -rfPLo /data/local/tmp/efs_test/dump /data/local/tmp/efs_test/%s.img", name));
|
||||||
|
RunAndCheckAdbCmd(String.format("mount -r /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name));
|
||||||
|
|
||||||
|
CommandResult r = RunAndCheckAdbCmd("diff -rq --no-dereference /data/local/tmp/efs_test/mnt /data/local/tmp/efs_test/dump");
|
||||||
|
assertEquals(r.getStdout(), "");
|
||||||
|
|
||||||
|
String ls_cmd = "cd /data/local/tmp/efs_test/%s;ls -AlnR .";
|
||||||
|
CommandResult mnt_ls = RunAndCheckAdbCmd(String.format(ls_cmd, "mnt"));
|
||||||
|
CommandResult dump_ls = RunAndCheckAdbCmd(String.format(ls_cmd, "dump"));
|
||||||
|
assertEquals(removeTimestamps(mnt_ls.getStdout()), removeTimestamps(dump_ls.getStdout()));
|
||||||
|
|
||||||
|
getDevice().executeShellCommand("umount /data/local/tmp/efs_test/mnt");
|
||||||
|
getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test/dump/*");
|
||||||
|
getDevice().executeShellCommand("rm /data/local/tmp/efs_test/" + name + ".img");
|
||||||
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void tearDown() throws Exception {
|
||||||
|
getDevice().executeShellCommand("umount /data/local/tmp/efs_test/mnt");
|
||||||
|
getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test");
|
||||||
|
}
|
||||||
|
}
|
39
16kb/copy_efs_files_to_data.sh
Normal file
39
16kb/copy_efs_files_to_data.sh
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
#!/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
|
9
astd/astd.mk
Normal file
9
astd/astd.mk
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# This module is only for factory targets, please include this makefile
|
||||||
|
# with check:
|
||||||
|
#
|
||||||
|
# ifneq ($(filter factory_%,$(TARGET_PRODUCT)),)
|
||||||
|
# include device/google/gs-common/astd/astd.mk
|
||||||
|
# endif
|
||||||
|
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += device/google/gs-common/astd/sepolicy
|
||||||
|
|
||||||
|
PRODUCT_PACKAGES_DEBUG += astd
|
10
astd/sepolicy/astd.te
Normal file
10
astd/sepolicy/astd.te
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# astd service
|
||||||
|
type astd, domain;
|
||||||
|
type astd_exec, exec_type, file_type, system_file_type;
|
||||||
|
|
||||||
|
typeattribute astd coredomain;
|
||||||
|
|
||||||
|
userdebug_or_eng(`
|
||||||
|
init_daemon_domain(astd)
|
||||||
|
')
|
||||||
|
|
3
astd/sepolicy/file_contexts
Normal file
3
astd/sepolicy/file_contexts
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/system_ext/bin/astc u:object_r:astd_exec:s0
|
||||||
|
/system_ext/bin/astd u:object_r:astd_exec:s0
|
||||||
|
|
|
@ -4,7 +4,7 @@ PRODUCT_PACKAGES += \
|
||||||
android.hardware.bluetooth.finder-V1-ndk.so \
|
android.hardware.bluetooth.finder-V1-ndk.so \
|
||||||
android.hardware.bluetooth.ranging-V1-ndk.so \
|
android.hardware.bluetooth.ranging-V1-ndk.so \
|
||||||
android.hardware.bluetooth-service.bcmbtlinux \
|
android.hardware.bluetooth-service.bcmbtlinux \
|
||||||
vendor.google.bluetooth_ext-V1-ndk.so \
|
vendor.google.bluetooth_ext-V3-ndk.so \
|
||||||
bt_vendor.conf \
|
bt_vendor.conf \
|
||||||
android.hardware.bluetooth.prebuilt.xml \
|
android.hardware.bluetooth.prebuilt.xml \
|
||||||
android.hardware.bluetooth_le.prebuilt.xml
|
android.hardware.bluetooth_le.prebuilt.xml
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<compatibility-matrix version="1.0" type="framework">
|
<compatibility-matrix version="1.0" type="framework">
|
||||||
<hal format="aidl" optional="true">
|
<hal format="aidl" optional="true">
|
||||||
<name>vendor.google.bluetooth_ext</name>
|
<name>vendor.google.bluetooth_ext</name>
|
||||||
<version>1</version>
|
<version>1-3</version>
|
||||||
<interface>
|
<interface>
|
||||||
<name>IBluetoothFinder</name>
|
<name>IBluetoothFinder</name>
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</hal>
|
</hal>
|
||||||
<hal format="aidl">
|
<hal format="aidl">
|
||||||
<name>vendor.google.bluetooth_ext</name>
|
<name>vendor.google.bluetooth_ext</name>
|
||||||
<version>1</version>
|
<version>3</version>
|
||||||
<fqname>IBTChannelAvoidance/default</fqname>
|
<fqname>IBTChannelAvoidance/default</fqname>
|
||||||
<fqname>IBluetoothCcc/default</fqname>
|
<fqname>IBluetoothCcc/default</fqname>
|
||||||
<fqname>IBluetoothEwp/default</fqname>
|
<fqname>IBluetoothEwp/default</fqname>
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
int main() {
|
int main() {
|
||||||
setbuf(stdout, NULL);
|
setbuf(stdout, NULL);
|
||||||
dumpFileContent("CRTC-0 status", "/sys/kernel/debug/dri/0/crtc-0/status");
|
dumpFileContent("CRTC-0 status", "/sys/kernel/debug/dri/0/crtc-0/status");
|
||||||
|
dumpFileContent("DRM State", "/sys/kernel/debug/dri/0/state");
|
||||||
runCommand("libdisplaycolor", "/vendor/bin/dumpsys displaycolor -v");
|
runCommand("libdisplaycolor", "/vendor/bin/dumpsys displaycolor -v");
|
||||||
|
|
||||||
dumpFileContent("Primary panel name", "/sys/class/drm/card0/device/primary-panel/panel_name");
|
dumpFileContent("Primary panel name", "/sys/class/drm/card0/device/primary-panel/panel_name");
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
genfscon debugfs /dri/0/crtc- u:object_r:vendor_dri_debugfs:s0
|
genfscon debugfs /dri/0/crtc- u:object_r:vendor_dri_debugfs:s0
|
||||||
|
genfscon debugfs /dri/0/state u:object_r:vendor_dri_debugfs:s0
|
||||||
genfscon sysfs /module/drm/parameters/debug u:object_r:sysfs_display:s0
|
genfscon sysfs /module/drm/parameters/debug u:object_r:sysfs_display:s0
|
||||||
|
|
3
gcam_app/sepolicy/vendor/debug_camera_app.te
vendored
3
gcam_app/sepolicy/vendor/debug_camera_app.te
vendored
|
@ -12,5 +12,8 @@ userdebug_or_eng(`
|
||||||
|
|
||||||
# Allows GCA_Eng & GCA-Next to access the hw_jpeg /dev/video12.
|
# Allows GCA_Eng & GCA-Next to access the hw_jpeg /dev/video12.
|
||||||
# allow debug_camera_app hw_jpg_device:chr_file rw_file_perms;
|
# allow debug_camera_app hw_jpg_device:chr_file rw_file_perms;
|
||||||
|
|
||||||
|
# Allows tachyon_service to communicate with GCA-Eng via binder.
|
||||||
|
binder_call(edgetpu_tachyon_server, debug_camera_app);
|
||||||
')
|
')
|
||||||
|
|
||||||
|
|
|
@ -11,3 +11,5 @@ allow google_camera_app edgetpu_device:chr_file { read write ioctl };
|
||||||
# Allows GCA to access the hw_jpeg /dev/video12.
|
# Allows GCA to access the hw_jpeg /dev/video12.
|
||||||
#allow google_camera_app hw_jpg_device:chr_file rw_file_perms;
|
#allow google_camera_app hw_jpg_device:chr_file rw_file_perms;
|
||||||
|
|
||||||
|
# Allows tachyon service to communicate with google_camera_app via binder.
|
||||||
|
binder_call(edgetpu_tachyon_server, google_camera_app);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
service vendor.dumpstate-default /vendor/bin/hw/android.hardware.dumpstate-service
|
service vendor.dumpstate-default /vendor/bin/hw/android.hardware.dumpstate-service
|
||||||
class hal
|
class hal
|
||||||
user system
|
user system
|
||||||
group system shell
|
group system shell readtracefs
|
||||||
interface aidl android.hardware.dumpstate.IDumpstateDevice/default
|
interface aidl android.hardware.dumpstate.IDumpstateDevice/default
|
||||||
|
|
|
@ -118,6 +118,46 @@ void dumpLogsAscending(const char* SrcDir, const char* DestDir, int limit, const
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void deleteRecursively(const char* dest_dir) {
|
||||||
|
struct dirent **dirent_list;
|
||||||
|
int num_entries = scandir(dest_dir, &dirent_list, 0, alphasort);
|
||||||
|
if (num_entries < 0) {
|
||||||
|
printf("Unable to scan dir: %s.\n", dest_dir);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < num_entries; i++) {
|
||||||
|
char path[1024];
|
||||||
|
snprintf(path, sizeof(path), "%s/%s", dest_dir, dirent_list[i]->d_name);
|
||||||
|
|
||||||
|
if (strcmp(dirent_list[i]->d_name, ".") == 0 || strcmp(dirent_list[i]->d_name, "..") == 0) {
|
||||||
|
free(dirent_list[i]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct stat statbuf;
|
||||||
|
if (stat(path, &statbuf) == 0) {
|
||||||
|
if (S_ISDIR(statbuf.st_mode)) {
|
||||||
|
deleteRecursively(path);
|
||||||
|
} else {
|
||||||
|
printf("Delete %s\n", path);
|
||||||
|
if (unlink(path) != 0) {
|
||||||
|
printf("Unable to delete file: %s\n", path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
printf("Unable to get file status: %s\n", path);
|
||||||
|
}
|
||||||
|
free(dirent_list[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
free(dirent_list);
|
||||||
|
|
||||||
|
if (rmdir(dest_dir) != 0) {
|
||||||
|
printf("Unable to delete directory: %s\n", dest_dir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
if(!::android::base::GetBoolProperty("vendor.gps.aol.enabled", false)) {
|
if(!::android::base::GetBoolProperty("vendor.gps.aol.enabled", false)) {
|
||||||
printf("vendor.gps.aol.enabled is false. gps logging is not running.\n");
|
printf("vendor.gps.aol.enabled is false. gps logging is not running.\n");
|
||||||
|
@ -125,6 +165,12 @@ int main() {
|
||||||
}
|
}
|
||||||
int maxFileNum = ::android::base::GetIntProperty(GPS_LOG_NUMBER_PROPERTY, 20);
|
int maxFileNum = ::android::base::GetIntProperty(GPS_LOG_NUMBER_PROPERTY, 20);
|
||||||
std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "gps");
|
std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "gps");
|
||||||
|
|
||||||
|
struct stat statbuf;
|
||||||
|
if (stat(outputDir.c_str(), &statbuf) == 0) {
|
||||||
|
printf("Directory %s already exists, delete\n", outputDir.c_str());
|
||||||
|
deleteRecursively(outputDir.c_str());
|
||||||
|
}
|
||||||
if (mkdir(outputDir.c_str(), 0777) == -1) {
|
if (mkdir(outputDir.c_str(), 0777) == -1) {
|
||||||
printf("Unable to create folder: %s\n", outputDir.c_str());
|
printf("Unable to create folder: %s\n", outputDir.c_str());
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -10,7 +10,6 @@ cc_binary {
|
||||||
"-Wall",
|
"-Wall",
|
||||||
"-Wextra",
|
"-Wextra",
|
||||||
"-Werror",
|
"-Werror",
|
||||||
"-pedantic",
|
|
||||||
],
|
],
|
||||||
shared_libs: [
|
shared_libs: [
|
||||||
"libdump",
|
"libdump",
|
||||||
|
|
|
@ -1,11 +1,19 @@
|
||||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/input/gia/sepolicy
|
# When not AOSP target
|
||||||
|
ifeq (,$(filter aosp_%, $(TARGET_PRODUCT)))
|
||||||
|
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/input/gia/sepolicy
|
||||||
|
|
||||||
PRODUCT_PACKAGES += gia
|
# When not factory target
|
||||||
PRODUCT_PACKAGES += com.google.input.gia.giaservicemanager
|
ifeq (,$(filter factory_%, $(TARGET_PRODUCT)))
|
||||||
|
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/input/gia/sepolicy-pixelsystemservice
|
||||||
|
endif
|
||||||
|
|
||||||
PRODUCT_SOONG_NAMESPACES += vendor/google/interfaces
|
PRODUCT_PACKAGES += gia
|
||||||
PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core
|
PRODUCT_PACKAGES += com.google.input.gia.giaservicemanager
|
||||||
PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core-servicemanager
|
|
||||||
|
|
||||||
DEVICE_MANIFEST_FILE += device/google/gs-common/input/gia/aidl/manifest.xml
|
PRODUCT_SOONG_NAMESPACES += vendor/google/interfaces
|
||||||
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/input/gia/aidl/compatibility_matrix.xml
|
PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core
|
||||||
|
PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core-servicemanager
|
||||||
|
|
||||||
|
DEVICE_MANIFEST_FILE += device/google/gs-common/input/gia/aidl/manifest.xml
|
||||||
|
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/input/gia/aidl/compatibility_matrix.xml
|
||||||
|
endif
|
||||||
|
|
8
input/gia/sepolicy-pixelsystemservice/gia.te
Normal file
8
input/gia/sepolicy-pixelsystemservice/gia.te
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# SEPolicies to be configured only if and only if Pixel System Service exists on the device
|
||||||
|
|
||||||
|
# allow pixelsystemservice_app to communicate with gia
|
||||||
|
binder_use(pixelsystemservice_app)
|
||||||
|
hal_client_domain(pixelsystemservice_app, hal_gia)
|
||||||
|
|
||||||
|
# allow gia to execute callback for pixelsystemservice_app
|
||||||
|
binder_call(gia, pixelsystemservice_app)
|
|
@ -17,9 +17,6 @@ hal_server_domain(gia, hal_gia)
|
||||||
allow gia sysfs_touch_gti:dir r_dir_perms;
|
allow gia sysfs_touch_gti:dir r_dir_perms;
|
||||||
allow gia sysfs_touch_gti:file rw_file_perms;
|
allow gia sysfs_touch_gti:file rw_file_perms;
|
||||||
|
|
||||||
# allow pixelsystemservice_app to communicate with gia
|
# allow gia for collecting device stats
|
||||||
binder_use(pixelsystemservice_app)
|
allow gia fwk_stats_service:service_manager find;
|
||||||
hal_client_domain(pixelsystemservice_app, hal_gia)
|
binder_call(gia, stats_service_server);
|
||||||
|
|
||||||
# allow gia to execute callback for pixelsystemservice_app
|
|
||||||
binder_call(gia, pixelsystemservice_app)
|
|
||||||
|
|
|
@ -8,3 +8,4 @@ service insmod_sh /vendor/bin/insmod.sh /vendor/etc/init.common.cfg
|
||||||
group root system
|
group root system
|
||||||
disabled
|
disabled
|
||||||
oneshot
|
oneshot
|
||||||
|
file /dev/kmsg w
|
||||||
|
|
|
@ -52,10 +52,10 @@ if [ $# -eq 1 ]; then
|
||||||
else
|
else
|
||||||
# Set property even if there is no insmod config
|
# Set property even if there is no insmod config
|
||||||
# to unblock early-boot trigger
|
# to unblock early-boot trigger
|
||||||
setprop vendor.common.modules.ready
|
setprop vendor.common.modules.ready 1
|
||||||
setprop vendor.device.modules.ready
|
setprop vendor.device.modules.ready 1
|
||||||
setprop vendor.all.modules.ready
|
setprop vendor.all.modules.ready 1
|
||||||
setprop vendor.all.devices.ready
|
setprop vendor.all.devices.ready 1
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -12,3 +12,6 @@ allow insmod-sh vendor_toolbox_exec:file execute_no_trans;
|
||||||
set_prop(insmod-sh, vendor_device_prop)
|
set_prop(insmod-sh, vendor_device_prop)
|
||||||
|
|
||||||
dontaudit insmod-sh proc_cmdline:file r_file_perms;
|
dontaudit insmod-sh proc_cmdline:file r_file_perms;
|
||||||
|
|
||||||
|
# Allow modprobe to log to kmsg.
|
||||||
|
allow insmod-sh kmsg_device:chr_file w_file_perms;
|
||||||
|
|
4
nfc/sepolicy_st21nfc/hal_nfc_default.te
Normal file
4
nfc/sepolicy_st21nfc/hal_nfc_default.te
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# HAL NFC property
|
||||||
|
set_prop(hal_nfc_default, vendor_secure_element_prop)
|
||||||
|
set_prop(hal_nfc_default, vendor_nfc_prop)
|
||||||
|
set_prop(hal_nfc_default, vendor_nfc_antenna_prop)
|
4
nfc/sepolicy_st21nfc/property.te
Normal file
4
nfc/sepolicy_st21nfc/property.te
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# NFC
|
||||||
|
vendor_internal_prop(vendor_nfc_prop)
|
||||||
|
vendor_restricted_prop(vendor_nfc_antenna_prop)
|
||||||
|
|
4
nfc/sepolicy_st21nfc/property_contexts
Normal file
4
nfc/sepolicy_st21nfc/property_contexts
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# NFC
|
||||||
|
persist.vendor.nfc. u:object_r:vendor_nfc_prop:s0
|
||||||
|
persist.vendor.nfc.antenna. u:object_r:vendor_nfc_antenna_prop:s0
|
||||||
|
|
5
nfc/sepolicy_st21nfc/untrusted_app.te
Normal file
5
nfc/sepolicy_st21nfc/untrusted_app.te
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# NFC
|
||||||
|
userdebug_or_eng(
|
||||||
|
get_prop(untrusted_app, vendor_nfc_antenna_prop)
|
||||||
|
)
|
||||||
|
|
2
nfc/sepolicy_st21nfc/vendor_init.te
Normal file
2
nfc/sepolicy_st21nfc/vendor_init.te
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# NFC vendor property
|
||||||
|
set_prop(vendor_init, vendor_nfc_prop)
|
|
@ -186,3 +186,85 @@ on init
|
||||||
write /sys/devices/system/cpu/cpu6/cpufreq/sched_pixel/down_rate_limit_us 500
|
write /sys/devices/system/cpu/cpu6/cpufreq/sched_pixel/down_rate_limit_us 500
|
||||||
write /sys/devices/system/cpu/cpu7/cpufreq/sched_pixel/down_rate_limit_us 500
|
write /sys/devices/system/cpu/cpu7/cpufreq/sched_pixel/down_rate_limit_us 500
|
||||||
write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/down_rate_limit_us 500
|
write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/down_rate_limit_us 500
|
||||||
|
|
||||||
|
# Default rampup multiplier setup
|
||||||
|
write /proc/vendor_sched/groups/bg/rampup_multiplier 0
|
||||||
|
write /proc/vendor_sched/groups/cam/rampup_multiplier 1
|
||||||
|
write /proc/vendor_sched/groups/cam_power/rampup_multiplier 1
|
||||||
|
write /proc/vendor_sched/groups/dex2oat/rampup_multiplier 0
|
||||||
|
write /proc/vendor_sched/groups/fg/rampup_multiplier 1
|
||||||
|
write /proc/vendor_sched/groups/fg_wi/rampup_multiplier 1
|
||||||
|
write /proc/vendor_sched/groups/nnapi/rampup_multiplier 0
|
||||||
|
write /proc/vendor_sched/groups/ota/rampup_multiplier 0
|
||||||
|
write /proc/vendor_sched/groups/rt/rampup_multiplier 0
|
||||||
|
write /proc/vendor_sched/groups/sf/rampup_multiplier 1
|
||||||
|
write /proc/vendor_sched/groups/sys/rampup_multiplier 0
|
||||||
|
write /proc/vendor_sched/groups/sys_bg/rampup_multiplier 0
|
||||||
|
write /proc/vendor_sched/groups/ta/rampup_multiplier 1
|
||||||
|
write /proc/vendor_sched/adpf_rampup_multiplier 4
|
||||||
|
|
||||||
|
# Default util_est setup
|
||||||
|
write /proc/vendor_sched/groups/bg/disable_util_est 1
|
||||||
|
write /proc/vendor_sched/groups/cam/disable_util_est 0
|
||||||
|
write /proc/vendor_sched/groups/cam_power/disable_util_est 0
|
||||||
|
write /proc/vendor_sched/groups/dex2oat/disable_util_est 1
|
||||||
|
write /proc/vendor_sched/groups/fg/disable_util_est 0
|
||||||
|
write /proc/vendor_sched/groups/fg_wi/disable_util_est 0
|
||||||
|
write /proc/vendor_sched/groups/nnapi/disable_util_est 1
|
||||||
|
write /proc/vendor_sched/groups/ota/disable_util_est 1
|
||||||
|
write /proc/vendor_sched/groups/rt/disable_util_est 1
|
||||||
|
write /proc/vendor_sched/groups/sf/disable_util_est 0
|
||||||
|
write /proc/vendor_sched/groups/sys/disable_util_est 1
|
||||||
|
write /proc/vendor_sched/groups/sys_bg/disable_util_est 1
|
||||||
|
write /proc/vendor_sched/groups/ta/disable_util_est 0
|
||||||
|
|
||||||
|
# RT uclamp setting
|
||||||
|
write /proc/sys/kernel/sched_util_clamp_min_rt_default 0
|
||||||
|
|
||||||
|
write /proc/vendor_sched/groups/cam/prefer_idle 1
|
||||||
|
write /proc/vendor_sched/groups/cam/uclamp_min 1
|
||||||
|
|
||||||
|
chown system system /dev/cpuset/cgroup.procs
|
||||||
|
|
||||||
|
# Add a boost for NNAPI HAL
|
||||||
|
write /proc/vendor_sched/groups/nnapi/prefer_idle 0
|
||||||
|
write /proc/vendor_sched/groups/nnapi/uclamp_min 512
|
||||||
|
|
||||||
|
on property:sys.boot_completed=1
|
||||||
|
|
||||||
|
# Setup scheduler parameters
|
||||||
|
write /proc/vendor_sched/min_granularity_ns 1000000
|
||||||
|
write /proc/vendor_sched/latency_ns 8000000
|
||||||
|
write /proc/vendor_sched/max_load_balance_interval 1
|
||||||
|
write /proc/vendor_sched/enable_hrtick 1
|
||||||
|
|
||||||
|
# Setup final cpu.uclamp
|
||||||
|
write /proc/vendor_sched/groups/ta/uclamp_min 1
|
||||||
|
write /proc/vendor_sched/groups/fg/uclamp_min 0
|
||||||
|
write /proc/vendor_sched/groups/sys/prefer_idle 0
|
||||||
|
|
||||||
|
# Set ug group
|
||||||
|
write /proc/vendor_sched/groups/bg/ug 0
|
||||||
|
write /proc/vendor_sched/groups/sys_bg/ug 0
|
||||||
|
write /proc/vendor_sched/groups/ota/ug 0
|
||||||
|
write /proc/vendor_sched/groups/dex2oat/ug 1
|
||||||
|
write /proc/vendor_sched/groups/ta/ug 1
|
||||||
|
|
||||||
|
# Set bg group throttle
|
||||||
|
write /proc/vendor_sched/ug_bg_group_throttle ${persist.device_config.vendor_system_native.ug_bg_group_throttle:-308}
|
||||||
|
|
||||||
|
# Disable PMU freq limit
|
||||||
|
write /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/pmu_limit_enable 1
|
||||||
|
write /sys/devices/system/cpu/cpufreq/policy1/sched_pixel/pmu_limit_enable 1
|
||||||
|
write /sys/devices/system/cpu/cpufreq/policy2/sched_pixel/pmu_limit_enable 1
|
||||||
|
write /sys/devices/system/cpu/cpufreq/policy3/sched_pixel/pmu_limit_enable 1
|
||||||
|
write /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/pmu_limit_enable 1
|
||||||
|
write /sys/devices/system/cpu/cpufreq/policy5/sched_pixel/pmu_limit_enable 1
|
||||||
|
write /sys/devices/system/cpu/cpufreq/policy6/sched_pixel/pmu_limit_enable 1
|
||||||
|
write /sys/devices/system/cpu/cpufreq/policy7/sched_pixel/pmu_limit_enable 1
|
||||||
|
write /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/pmu_limit_enable 1
|
||||||
|
write /proc/vendor_sched/pmu_poll_enable 0
|
||||||
|
|
||||||
|
# Set priority task name and boost value
|
||||||
|
write /proc/vendor_sched/priority_task_name "ExoPlayer:Place"
|
||||||
|
write /proc/vendor_sched/priority_task_boost_value 742
|
||||||
|
|
4
pixelstats/pixelstats.mk
Normal file
4
pixelstats/pixelstats.mk
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Reliability reporting
|
||||||
|
PRODUCT_PACKAGES += pixelstats-vendor
|
||||||
|
|
||||||
|
BOARD_SEPOLICY_DIRS += device/google/gs-common/pixelstats/sepolicy
|
|
@ -9,6 +9,10 @@ userdebug_or_eng(`
|
||||||
|
|
||||||
allow ramdump_app app_api_service:service_manager find;
|
allow ramdump_app app_api_service:service_manager find;
|
||||||
|
|
||||||
|
# For Firebase Analytics
|
||||||
|
allow ramdump_app privapp_data_file:file x_file_perms;
|
||||||
|
allow ramdump_app privapp_data_file:lnk_file r_file_perms;
|
||||||
|
|
||||||
allow ramdump_app ramdump_vendor_data_file:file create_file_perms;
|
allow ramdump_app ramdump_vendor_data_file:file create_file_perms;
|
||||||
allow ramdump_app ramdump_vendor_data_file:dir create_dir_perms;
|
allow ramdump_app ramdump_vendor_data_file:dir create_dir_perms;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#define F2FS_FSCK_TIME_PROPERTY "ro.boottime.init.fsck.data"
|
#define F2FS_FSCK_TIME_PROPERTY "ro.boottime.init.fsck.data"
|
||||||
#define F2FS_MNT_TIME_PROPERTY "ro.boottime.init.mount.data"
|
#define F2FS_MNT_TIME_PROPERTY "ro.boottime.init.mount.data"
|
||||||
#define BOOTDEVICE_PROPERTY "ro.boot.bootdevice"
|
|
||||||
#define BUILD_TYPE_PROPERTY "ro.build.type"
|
#define BUILD_TYPE_PROPERTY "ro.build.type"
|
||||||
|
|
||||||
void read_buffer(int buf_id, int total_len, const char* path)
|
void read_buffer(int buf_id, int total_len, const char* path)
|
||||||
|
@ -68,11 +67,31 @@ int main() {
|
||||||
int mnt_time = android::base::GetIntProperty(F2FS_MNT_TIME_PROPERTY, 0);
|
int mnt_time = android::base::GetIntProperty(F2FS_MNT_TIME_PROPERTY, 0);
|
||||||
printf("--- F2FS - checkpoint=disable time (ms) ---\n%d\n\n", mnt_time);
|
printf("--- F2FS - checkpoint=disable time (ms) ---\n%d\n\n", mnt_time);
|
||||||
|
|
||||||
|
const std::string f2fs_proc_path("/proc/fs/f2fs/");
|
||||||
|
std::unique_ptr<DIR, decltype(&closedir)> procdir(
|
||||||
|
opendir(f2fs_proc_path.c_str()), closedir);
|
||||||
|
if (procdir) {
|
||||||
|
dirent *proc_entry;
|
||||||
|
while ((proc_entry = readdir(procdir.get())) != nullptr) {
|
||||||
|
std::string proc_name(proc_entry->d_name);
|
||||||
|
if (proc_name == "." || proc_name == ".." ||
|
||||||
|
strncmp(proc_name.c_str(), "dm-", 3))
|
||||||
|
continue;
|
||||||
|
dumpFileContent(("F2FS - " + proc_name).c_str(),
|
||||||
|
(f2fs_proc_path + proc_name + "/disk_map").c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//UFS
|
//UFS
|
||||||
dumpFileContent("UFS model", "/sys/block/sda/device/model");
|
dumpFileContent("UFS model", "/sys/block/sda/device/model");
|
||||||
dumpFileContent("UFS rev", "/sys/block/sda/device/rev");
|
dumpFileContent("UFS rev", "/sys/block/sda/device/rev");
|
||||||
dumpFileContent("UFS size", "/sys/block/sda/size");
|
dumpFileContent("UFS size", "/sys/block/sda/size");
|
||||||
|
|
||||||
|
dumpFileContent("UFS phy version",
|
||||||
|
"/dev/sys/block/bootdevice/pixel/phy_version");
|
||||||
|
dumpFileContent("UFS phy release_date",
|
||||||
|
"/dev/sys/block/bootdevice/pixel/phy_release_date");
|
||||||
|
|
||||||
dumpFileContent("UFS Slow IO Read",
|
dumpFileContent("UFS Slow IO Read",
|
||||||
"/dev/sys/block/bootdevice/slowio_read_cnt");
|
"/dev/sys/block/bootdevice/slowio_read_cnt");
|
||||||
dumpFileContent("UFS Slow IO Write",
|
dumpFileContent("UFS Slow IO Write",
|
||||||
|
@ -90,24 +109,10 @@ int main() {
|
||||||
if (statdir) {
|
if (statdir) {
|
||||||
dirent *stat_entry;
|
dirent *stat_entry;
|
||||||
while ((stat_entry = readdir(statdir.get())) != nullptr) {
|
while ((stat_entry = readdir(statdir.get())) != nullptr) {
|
||||||
std::string ufs_err_stats_path(stat_entry->d_name);
|
std::string stat_name(stat_entry->d_name);
|
||||||
if (!strcmp(ufs_err_stats_path.c_str(), ".")
|
if (stat_name == "." || stat_name == "..") continue;
|
||||||
|| !strcmp(ufs_err_stats_path.c_str(), ".."))
|
dumpFileContent(stat_name.c_str(),
|
||||||
continue;
|
(ufs_err_stats_path + stat_name).c_str());
|
||||||
std::string bootdevice = android::base::GetProperty(
|
|
||||||
BOOTDEVICE_PROPERTY, "");
|
|
||||||
std::string err_stat_path = "/sys/devices/platform/";
|
|
||||||
err_stat_path.append(bootdevice.c_str());
|
|
||||||
err_stat_path.append("/err_stats/");
|
|
||||||
err_stat_path.append(ufs_err_stats_path.c_str());
|
|
||||||
std::ifstream err_stat_file(err_stat_path);
|
|
||||||
if (err_stat_file.is_open()) {
|
|
||||||
std::string err_stat_atom;
|
|
||||||
err_stat_file >> err_stat_atom;
|
|
||||||
printf("%s:%s\n", ufs_err_stats_path.c_str(),
|
|
||||||
err_stat_atom.c_str());
|
|
||||||
err_stat_file.close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,10 @@ pixel_bugreport(dump_storage)
|
||||||
# adb bugreport
|
# adb bugreport
|
||||||
allow dump_storage sysfs_scsi_devices_0000:dir r_dir_perms;
|
allow dump_storage sysfs_scsi_devices_0000:dir r_dir_perms;
|
||||||
allow dump_storage sysfs_scsi_devices_0000:file r_file_perms;
|
allow dump_storage sysfs_scsi_devices_0000:file r_file_perms;
|
||||||
|
allow dump_storage sysfs:file r_file_perms;
|
||||||
|
|
||||||
|
allow dump_storage proc_f2fs:dir r_dir_perms;
|
||||||
|
allow dump_storage proc_f2fs:file r_file_perms;
|
||||||
|
|
||||||
# adb bugreport
|
# adb bugreport
|
||||||
userdebug_or_eng(`
|
userdebug_or_eng(`
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# init
|
# init
|
||||||
allow init sysfs_scsi_devices_0000:file w_file_perms;
|
allow init sysfs_scsi_devices_0000:file w_file_perms;
|
||||||
|
allow init userdata_exp_block_device:blk_file write;
|
||||||
dontaudit init intelligence_data_file:dir mounton;
|
allow init intelligence_data_file:dir mounton;
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# for intelligence service
|
# for intelligence service
|
||||||
|
|
||||||
allow kernel userdata_exp_block_device:blk_file read;
|
allow kernel userdata_exp_block_device:blk_file { read write };
|
||||||
|
|
|
@ -10,8 +10,9 @@ service storage_intelligence /vendor/bin/storage_intelligence.sh
|
||||||
|
|
||||||
on boot && property:persist.vendor.intelligence=on
|
on boot && property:persist.vendor.intelligence=on
|
||||||
mkdir /data/vendor/intelligence 0770 vendor_intelligence vendor_intelligence
|
mkdir /data/vendor/intelligence 0770 vendor_intelligence vendor_intelligence
|
||||||
|
mount f2fs loop@/dev/block/by-name/userdata_exp.ai /data/vendor/intelligence rw
|
||||||
restorecon_recursive /data/vendor/intelligence
|
restorecon_recursive /data/vendor/intelligence
|
||||||
mount f2fs loop@/dev/block/by-name/userdata_exp.ai /data/vendor/intelligence ro
|
mount f2fs /data/vendor/intelligence /data/vendor/intelligence remount ro
|
||||||
start storage_intelligence
|
start storage_intelligence
|
||||||
|
|
||||||
on boot && property:persist.vendor.intelligence=off
|
on boot && property:persist.vendor.intelligence=off
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#!/vendor/bin/sh
|
#!/vendor/bin/sh
|
||||||
#
|
#
|
||||||
# The script belongs to the feature of UFS FFU via OTA: go/p23-ffu-ota
|
# The script belongs to the feature of AI preload feature, go/gemini-package
|
||||||
# Its purpose is to copy the corresponding firmware into partition for UFS FFU.
|
|
||||||
|
|
||||||
|
|
||||||
property="persist.vendor.intelligence"
|
property="persist.vendor.intelligence"
|
||||||
partition="/dev/block/by-name/userdata_exp.ai"
|
partition="/dev/block/by-name/userdata_exp.ai"
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
genfscon sysfs /devices/virtual/thermal u:object_r:sysfs_thermal:s0
|
genfscon sysfs /devices/virtual/thermal u:object_r:sysfs_thermal:s0
|
||||||
|
genfscon sysfs /devices/virtual/powercap u:object_r:sysfs_thermal:s0
|
||||||
genfscon sysfs /class/thermal u:object_r:sysfs_thermal:s0
|
genfscon sysfs /class/thermal u:object_r:sysfs_thermal:s0
|
||||||
|
genfscon sysfs /class/powercap u:object_r:sysfs_thermal:s0
|
||||||
genfscon debugfs /gs101-thermal u:object_r:debugfs_thermal:s0
|
genfscon debugfs /gs101-thermal u:object_r:debugfs_thermal:s0
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<compatibility-matrix version="1.0" type="framework">
|
<compatibility-matrix version="1.0" type="framework">
|
||||||
<hal format="aidl" optional="true">
|
<hal format="aidl" optional="true">
|
||||||
<name>com.google.input</name>
|
<name>com.google.input</name>
|
||||||
<version>2-4</version>
|
<version>2-5</version>
|
||||||
<interface>
|
<interface>
|
||||||
<name>ITouchContextService</name>
|
<name>ITouchContextService</name>
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
|
|
|
@ -1,15 +1,23 @@
|
||||||
<compatibility-matrix version="1.0" type="framework">
|
<compatibility-matrix version="1.0" type="framework">
|
||||||
<hal format="aidl" optional="true">
|
<hal format="aidl" optional="true">
|
||||||
<name>com.google.input</name>
|
<name>com.google.input</name>
|
||||||
<version>2-4</version>
|
<version>2-5</version>
|
||||||
<interface>
|
<interface>
|
||||||
<name>ITouchContextService</name>
|
<name>ITouchContextService</name>
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
</interface>
|
</interface>
|
||||||
</hal>
|
</hal>
|
||||||
|
<hal format="aidl" optional="true">
|
||||||
|
<name>com.google.input</name>
|
||||||
|
<version>5</version>
|
||||||
|
<interface>
|
||||||
|
<name>ITwoshayNotificationService</name>
|
||||||
|
<instance>default</instance>
|
||||||
|
</interface>
|
||||||
|
</hal>
|
||||||
<hal format="aidl" optional="true">
|
<hal format="aidl" optional="true">
|
||||||
<name>com.google.input.algos.gril</name>
|
<name>com.google.input.algos.gril</name>
|
||||||
<version>2-4</version>
|
<version>2-5</version>
|
||||||
<interface>
|
<interface>
|
||||||
<name>IGrilAntennaTuningService</name>
|
<name>IGrilAntennaTuningService</name>
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
|
@ -17,7 +25,7 @@
|
||||||
</hal>
|
</hal>
|
||||||
<hal format="aidl" optional="true">
|
<hal format="aidl" optional="true">
|
||||||
<name>com.google.input.algos.spd</name>
|
<name>com.google.input.algos.spd</name>
|
||||||
<version>2-4</version>
|
<version>2-5</version>
|
||||||
<interface>
|
<interface>
|
||||||
<name>IScreenProtectorDetectorService</name>
|
<name>IScreenProtectorDetectorService</name>
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<manifest version="1.0" type="device">
|
<manifest version="1.0" type="device">
|
||||||
<hal format="aidl">
|
<hal format="aidl">
|
||||||
<name>com.google.input</name>
|
<name>com.google.input</name>
|
||||||
<version>4</version>
|
<version>5</version>
|
||||||
<interface>
|
<interface>
|
||||||
<name>ITouchContextService</name>
|
<name>ITouchContextService</name>
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
|
|
|
@ -1,15 +1,23 @@
|
||||||
<manifest version="1.0" type="device">
|
<manifest version="1.0" type="device">
|
||||||
<hal format="aidl">
|
<hal format="aidl">
|
||||||
<name>com.google.input</name>
|
<name>com.google.input</name>
|
||||||
<version>4</version>
|
<version>5</version>
|
||||||
<interface>
|
<interface>
|
||||||
<name>ITouchContextService</name>
|
<name>ITouchContextService</name>
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
</interface>
|
</interface>
|
||||||
</hal>
|
</hal>
|
||||||
|
<hal format="aidl">
|
||||||
|
<name>com.google.input</name>
|
||||||
|
<version>5</version>
|
||||||
|
<interface>
|
||||||
|
<name>ITwoshayNotificationService</name>
|
||||||
|
<instance>default</instance>
|
||||||
|
</interface>
|
||||||
|
</hal>
|
||||||
<hal format="aidl">
|
<hal format="aidl">
|
||||||
<name>com.google.input.algos.gril</name>
|
<name>com.google.input.algos.gril</name>
|
||||||
<version>4</version>
|
<version>5</version>
|
||||||
<interface>
|
<interface>
|
||||||
<name>IGrilAntennaTuningService</name>
|
<name>IGrilAntennaTuningService</name>
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
|
@ -17,7 +25,7 @@
|
||||||
</hal>
|
</hal>
|
||||||
<hal format="aidl">
|
<hal format="aidl">
|
||||||
<name>com.google.input.algos.spd</name>
|
<name>com.google.input.algos.spd</name>
|
||||||
<version>4</version>
|
<version>5</version>
|
||||||
<interface>
|
<interface>
|
||||||
<name>IScreenProtectorDetectorService</name>
|
<name>IScreenProtectorDetectorService</name>
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
allow platform_app gril_antenna_tuning_service:service_manager find;
|
allow platform_app gril_antenna_tuning_service:service_manager find;
|
||||||
allow platform_app screen_protector_detector_service:service_manager find;
|
allow platform_app screen_protector_detector_service:service_manager find;
|
||||||
allow platform_app touch_context_service:service_manager find;
|
allow platform_app touch_context_service:service_manager find;
|
||||||
|
allow platform_app twoshay_notification_service:service_manager find;
|
||||||
binder_call(platform_app, twoshay)
|
binder_call(platform_app, twoshay)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
type gril_antenna_tuning_service, service_manager_type, hal_service_type;
|
type gril_antenna_tuning_service, service_manager_type, hal_service_type;
|
||||||
type screen_protector_detector_service, service_manager_type, hal_service_type;
|
type screen_protector_detector_service, service_manager_type, hal_service_type;
|
||||||
type touch_context_service, service_manager_type, hal_service_type;
|
type touch_context_service, service_manager_type, hal_service_type;
|
||||||
|
type twoshay_notification_service, service_manager_type, hal_service_type;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
com.google.input.ITouchContextService/default u:object_r:touch_context_service:s0
|
com.google.input.ITouchContextService/default u:object_r:touch_context_service:s0
|
||||||
|
com.google.input.ITwoshayNotificationService/default u:object_r:twoshay_notification_service:s0
|
||||||
com.google.input.algos.gril.IGrilAntennaTuningService/default u:object_r:gril_antenna_tuning_service:s0
|
com.google.input.algos.gril.IGrilAntennaTuningService/default u:object_r:gril_antenna_tuning_service:s0
|
||||||
com.google.input.algos.spd.IScreenProtectorDetectorService/default u:object_r:screen_protector_detector_service:s0
|
com.google.input.algos.spd.IScreenProtectorDetectorService/default u:object_r:screen_protector_detector_service:s0
|
||||||
|
|
|
@ -10,6 +10,7 @@ binder_use(twoshay)
|
||||||
add_service(twoshay, gril_antenna_tuning_service)
|
add_service(twoshay, gril_antenna_tuning_service)
|
||||||
add_service(twoshay, screen_protector_detector_service)
|
add_service(twoshay, screen_protector_detector_service)
|
||||||
add_service(twoshay, touch_context_service)
|
add_service(twoshay, touch_context_service)
|
||||||
|
add_service(twoshay, twoshay_notification_service)
|
||||||
|
|
||||||
binder_call(twoshay, platform_app)
|
binder_call(twoshay, platform_app)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<compatibility-matrix version="1.0" type="framework">
|
<compatibility-matrix version="1.0" type="framework">
|
||||||
<hal format="aidl" optional="true">
|
<hal format="aidl" optional="true">
|
||||||
<name>vendor.google.wireless_charger</name>
|
<name>vendor.google.wireless_charger</name>
|
||||||
<version>1-2</version>
|
<version>1-3</version>
|
||||||
<interface>
|
<interface>
|
||||||
<name>IWirelessCharger</name>
|
<name>IWirelessCharger</name>
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
|
# wlc permission for googlebattery
|
||||||
r_dir_file(hal_googlebattery, sysfs_wlc)
|
r_dir_file(hal_googlebattery, sysfs_wlc)
|
||||||
allow hal_googlebattery sysfs_wlc:file rw_file_perms;
|
allow hal_googlebattery sysfs_wlc:file rw_file_perms;
|
||||||
|
set_prop(hal_googlebattery, vendor_wlcservice_prop)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# wlcservice hal type and permission
|
||||||
type hal_wlcservice, domain;
|
type hal_wlcservice, domain;
|
||||||
type hal_wlcservice_exec, exec_type, vendor_file_type, file_type;
|
type hal_wlcservice_exec, exec_type, vendor_file_type, file_type;
|
||||||
|
|
||||||
|
@ -8,7 +9,7 @@ allow hal_wlcservice vendor_wlc_file:file create_file_perms;
|
||||||
allow hal_wlcservice hal_wireless_charger_service:service_manager find;
|
allow hal_wlcservice hal_wireless_charger_service:service_manager find;
|
||||||
allow hal_wlcservice kmsg_device:chr_file { getattr w_file_perms };
|
allow hal_wlcservice kmsg_device:chr_file { getattr w_file_perms };
|
||||||
|
|
||||||
get_prop(hal_wlcservice, vendor_wlcservice_test_prop)
|
set_prop(hal_wlcservice, vendor_wlcservice_prop)
|
||||||
|
|
||||||
binder_call(hal_wlcservice, servicemanager)
|
binder_call(hal_wlcservice, servicemanager)
|
||||||
add_service(hal_wlcservice, hal_wlcservice_service)
|
add_service(hal_wlcservice, hal_wlcservice_service)
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
vendor_internal_prop(vendor_wlcservice_test_prop)
|
# wlcservice property
|
||||||
|
vendor_internal_prop(vendor_wlcservice_prop)
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
vendor.wlcservice.test.authentication u:object_r:vendor_wlcservice_test_prop:s0 exact bool
|
vendor.wlcservice.test.authentication u:object_r:vendor_wlcservice_prop:s0 exact bool
|
||||||
|
vendor.wlcservice.fwupdate.tx u:object_r:vendor_wlcservice_prop:s0 exact enum 0 1 2 3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue