Snap for 12034474 from 2fa3c6b55d to mainline-tzdata6-release

Change-Id: Ic93ac2ce74d764000c2a1840e53cd203edde8f14
This commit is contained in:
Android Build Coastguard Worker 2024-07-01 08:38:35 +00:00
commit a547a6fcf1
13 changed files with 194 additions and 53 deletions

View file

@ -1,30 +0,0 @@
#
# Copyright (C) 2011 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: Everything listed here will be built on ALL platforms,
# including x86, the universal, and the SDK. Modules must be uniquely
# named (liblights.panda), and must build everywhere, or limit themselves
# to only building on ARM if they include assembly. Individual makefiles
# are responsible for having their own logic, for fine-grained control.
LOCAL_PATH := $(call my-dir)
# if some modules are built directly from this directory (not subdirectories),
# their rules should be written here.
ifeq ($(USES_DEVICE_GOOGLE_ZUMA),true)
include $(call first-makefiles-under,$(LOCAL_PATH))
endif

38
CopyEfsTest/Android.bp Normal file
View file

@ -0,0 +1,38 @@
// Copyright (C) 2024 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_zuma_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",
}

View file

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2024 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>

View file

@ -0,0 +1,84 @@
/*
* Copyright (C) 2024 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.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");
}
private void testDumpF2FS(String name) throws Exception {
getDevice().executeShellV2Command(String.format("cp /dev/block/by-name/%s /data/local/tmp/efs_test/%s.img", name, name));
CommandResult r = getDevice().executeShellV2Command(String.format("dump.f2fs -rfPo /data/local/tmp/efs_test/dump /data/local/tmp/efs_test/%s.img", name));
assertEquals(r.getExitCode().intValue(), 0);
r = getDevice().executeShellV2Command(String.format("mount -r /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name));
assertEquals(r.getExitCode().intValue(), 0);
assertEquals("", getDevice().executeShellCommand("diff -rq /data/local/tmp/efs_test/mnt /data/local/tmp/efs_test/dump"));
// Remove timestamps at positions 6 and 7, because ls on device does not support --time-style
// Remove totals because on disk block usage may change depending on filesystem
String ls_cmd = "ls -alLnR /data/local/tmp/efs_test/%s | awk {\'$6=\"\";$7=\"\";if ($1 != \"total\"){print $0'}";
String mnt_ls = getDevice().executeShellCommand(String.format(ls_cmd, "mnt"));
String dump_ls = getDevice().executeShellCommand(String.format(ls_cmd, "dump"));
assertEquals(mnt_ls, dump_ls);
getDevice().executeShellCommand("umount -r /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 -r /data/local/tmp/efs_test/mnt");
getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test");
}
}

View file

@ -6,25 +6,19 @@ service copy_efs_files_to_data /vendor/bin/copy_efs_files_to_data
oneshot
disabled
on post-fs-data && property:ro.boot.flash.locked=0 && property:ro.fstype.data=ext4
on post-fs-data && property:ro.boot.hardware.cpu.pagesize=16384
mkdir /data/vendor/copied 0775 radio system
restorecon_recursive /data/vendor/copied
exec_start copy_efs_files_to_data
mount_all /vendor/etc/fstab.efs.from_data
restorecon_recursive /mnt/vendor/efs
restorecon_recursive /mnt/vendor/efs_backup
restorecon_recursive /mnt/vendor/modem_userdata
restorecon_recursive /mnt/vendor/persist
restorecon_recursive /data/vendor/ss
setprop ro.vendor.persist.status mounted
on post-fs-data && property:ro.boot.flash.locked=0 && property:ro.fstype.data=f2fs
mount_all /vendor/etc/fstab.efs
mount_all /vendor/etc/fstab.persist
on early-init && property:ro.boot.hardware.cpu.pagesize=4096
mount_all /vendor/etc/fstab.persist --early
setprop ro.vendor.persist.status mounted
on post-fs-data && property:ro.boot.flash.locked=1
mount_all /vendor/etc/fstab.efs
mount_all /vendor/etc/fstab.persist
setprop ro.vendor.persist.status mounted
on late-fs && property:ro.boot.hardware.cpu.pagesize=4096
mount_all /vendor/etc/fstab.efs --early

View file

@ -1,4 +1,6 @@
on post-fs-data
mount_all /vendor/etc/fstab.efs
mount_all /vendor/etc/fstab.persist
on early-init
mount_all /vendor/etc/fstab.persist --early
setprop ro.vendor.persist.status mounted
on late-fs
mount_all /vendor/etc/fstab.efs --early

View file

@ -1,4 +1,12 @@
on property:ro.vendor.persist.status=mounted
# for modem related functions
restorecon_recursive /mnt/vendor/efs
chown radio system /mnt/vendor/efs
restorecon_recursive /mnt/vendor/efs_backup
chown radio system /mnt/vendor/efs_backup
restorecon_recursive /mnt/vendor/modem_userdata
chown radio system /mnt/vendor/modem_userdata
# for battery defender
mkdir /mnt/vendor/persist/battery 0700 system system
@ -23,6 +31,7 @@ on property:ro.vendor.persist.status=mounted
mkdir /mnt/vendor/persist/data/tz 0700 system system
mkdir /mnt/vendor/persist/touch 0770 system system
on property:ro.fstype.data=* && property:ro.vendor.persist.status=mounted
# Proxy for Secure Storage
mkdir /data/vendor/rebootescrow 0770 hsm hsm
mkdir /data/vendor/ss 0770 root system

View file

@ -257,6 +257,7 @@ on init
chown system system /sys/class/power_supply/wireless/device/version
chown system system /sys/class/power_supply/wireless/device/features
chown system system /sys/class/power_supply/wireless/device/authtype
chown system system /sys/class/power_supply/wireless/device/authstart
# Adaptive charge
chown system system /sys/class/power_supply/battery/charge_deadline
@ -605,12 +606,6 @@ on property:persist.vendor.radio.no_modem_board=1
on fs
mount_all --early
restorecon_recursive /mnt/vendor/efs
chown radio system /mnt/vendor/efs
restorecon_recursive /mnt/vendor/efs_backup
chown radio system /mnt/vendor/efs_backup
restorecon_recursive /mnt/vendor/modem_userdata
chown radio system /mnt/vendor/modem_userdata
# Mount modem partition
mount_all /vendor/etc/fstab.modem --early

View file

@ -26,6 +26,7 @@ include device/google/gs-common/storage/storage.mk
include device/google/gs-common/thermal/dump/thermal.mk
include device/google/gs-common/thermal/thermal_hal/device.mk
include device/google/gs-common/performance/perf.mk
include device/google/gs-common/power/power.mk
include device/google/gs-common/pixel_metrics/pixel_metrics.mk
include device/google/gs-common/soc/freq.mk
include device/google/gs-common/gps/dump/log.mk
@ -43,6 +44,7 @@ include device/google/gs-common/misc_writer/misc_writer.mk
include device/google/gs-common/gyotaku_app/gyotaku.mk
include device/google/gs-common/bootctrl/bootctrl_aidl.mk
include device/google/gs-common/betterbug/betterbug.mk
include device/google/gs-common/fingerprint/fingerprint.mk
include device/google/zuma/dumpstate/item.mk
@ -360,7 +362,7 @@ PRODUCT_COPY_FILES += \
device/google/zuma/conf/init.zuma.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.rc \
device/google/zuma/conf/init.persist.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.persist.rc
ifeq (true,$(PRODUCT_16K_DEVELOPER_OPTION))
ifeq (true,$(filter $(PRODUCT_BOOTS_16K) $(PRODUCT_16K_DEVELOPER_OPTION),true))
PRODUCT_COPY_FILES += \
device/google/zuma/conf/init.efs.16k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.efs.rc \
device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.efs.from_data:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.efs.from_data \

View file

@ -114,7 +114,7 @@
</hal>
<hal format="aidl" optional="true">
<name>com.google.hardware.pixel.display</name>
<version>11-12</version>
<version>12</version>
<interface>
<name>IDisplay</name>
<instance>default</instance>

View file

@ -130,7 +130,8 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = {
"/sys/devices/platform/hdcp/hdcp1_success_count",
"/sys/devices/platform/hdcp/hdcp1_fail_count",
"/sys/devices/platform/hdcp/hdcp0_count",
}
},
.SpeakerVersionPath = "/sys/devices/platform/audiometrics/speaker_version"
};
const struct UeventListener::UeventPaths ueventPaths = {

View file

@ -602,6 +602,11 @@ ScopedAStatus Usb::switchRole(const string& in_portName, const PortRole& in_role
fp = fopen(filename.c_str(), "w");
if (fp != NULL) {
int ret = fputs(convertRoletoString(in_role).c_str(), fp);
if (ret == EAGAIN) {
ALOGI("role switch busy, retry in %d ms", ROLE_SWAP_RETRY_MS);
std::this_thread::sleep_for(std::chrono::milliseconds(ROLE_SWAP_RETRY_MS));
ret = fputs(convertRoletoString(in_role).c_str(), fp);
}
fclose(fp);
if ((ret != EOF) && ReadFileToString(filename, &written)) {
written = Trim(written);

View file

@ -79,6 +79,7 @@ constexpr char kGadgetName[] = "11210000.dwc3";
#define DISPLAYPORT_IRQ_HPD_COUNT_CHECK 3
#define DISPLAYPORT_POLL_WAIT_MS 100
#define ROLE_SWAP_RETRY_MS 700
#define SVID_DISPLAYPORT "ff01"
#define SVID_THUNDERBOLT "8087"