fingerprint: Enable HIDL fingerprint status flag am: 93073646f4 am: dc7447ee3a
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/16003384
Change-Id: I77a96a69f2bb48bbe65c47a647374a1d5d707af7
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
index ae34f85..d0d6279 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -363,7 +363,7 @@
# NeuralNetworks
GPU_SOURCE_PRESENT := $(wildcard vendor/arm/mali/valhall)
GPU_PREBUILD_PRESENT := $(wildcard vendor/google_devices/gs101/prebuilts/gpu/libs)
-ifneq "$(or $(GPU_SOURCE_PRESENT),$(GPU_PREBUILD_PRESENT))" ""
+ifneq (,$(strip $(GPU_SOURCE_PRESENT) $(GPU_PREBUILD_PRESENT)))
ARMNN_COMPUTE_CL_ENABLE := 1
else
ARMNN_COMPUTE_CL_ENABLE := 0
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..4d9cf6e
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,2 @@
+per-file powerhint.json = wvw@google.com,joaodias@google.com,jenhaochen@google.com,rkganesh@google.com,jychen@google.com
+per-file powerhint.json = wvw@google.com,joaodias@google.com,jenhaochen@google.com,rkganesh@google.com,jychen@google.com
diff --git a/bluetooth/bluetooth.mk b/bluetooth/bluetooth.mk
new file mode 100644
index 0000000..f203610
--- /dev/null
+++ b/bluetooth/bluetooth.mk
@@ -0,0 +1,4 @@
+PRODUCT_PACKAGES += \
+ android.hardware.bluetooth@1.1-service.bcmbtlinux
+
+BOARD_SEPOLICY_DIRS += device/google/gs101-sepolicy/bluetooth
diff --git a/device.mk b/device.mk
index 3f288ce..18d8d23 100644
--- a/device.mk
+++ b/device.mk
@@ -274,7 +274,7 @@
# Contexthub HAL
PRODUCT_PACKAGES += \
- android.hardware.contexthub@1.2-service.generic
+ android.hardware.contexthub-service.generic
# CHRE tools
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
@@ -345,6 +345,15 @@
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml
# Sensors
+ifneq (,$(filter citron tangor, $(TARGET_PRODUCT)))
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \
+ frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \
+ frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \
+ frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml\
+ frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \
+ frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml
+else
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \
frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \
@@ -355,6 +364,7 @@
frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \
frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \
frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml
+endif
# Add sensor HAL 2.1 product packages
PRODUCT_PACKAGES += android.hardware.sensors@2.1-service.multihal
@@ -766,7 +776,9 @@
endif
# GPS HAL
+ifeq (,$(filter tangor citron,$(subst _, ,$(TARGET_PRODUCT))))
include device/google/gs101/gnss/device-gnss.mk
+endif
# Trusty (KM, GK, Storage)
$(call inherit-product, system/core/trusty/trusty-storage.mk)
@@ -787,10 +799,7 @@
PRODUCT_PROPERTY_OVERRIDES += \
ro.frp.pst=/dev/block/by-name/frp
-# Bluetooth HAL
-PRODUCT_PACKAGES += \
- android.hardware.bluetooth@1.1-service.bcmbtlinux \
- bt_vendor.conf
+# Bluetooth
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml
@@ -860,7 +869,6 @@
PRODUCT_PACKAGES += ShannonIms
$(call inherit-product-if-exists, vendor/samsung_slsi/telephony/shannon-iwlan/device-vendor.mk)
-include device/google/gs101/telephony/pktrouter.mk
#RCS Test Messaging App
PRODUCT_PACKAGES_DEBUG += \
@@ -1062,6 +1070,8 @@
# pKVM
ifeq ($(TARGET_PKVM_ENABLED),true)
$(call inherit-product, packages/modules/Virtualization/apex/product_packages.mk)
+ PRODUCT_BUILD_PVMFW_IMAGE := true
+ PRODUCT_PACKAGES += pkvm_enabler
endif
# Enable watchdog timeout loop breaker.
@@ -1080,10 +1090,6 @@
suspend.short_suspend_backoff_enabled=true \
suspend.max_sleep_time_millis=40000
-# (b/183612348): Enable skia reduceOpsTaskSplitting
-PRODUCT_PROPERTY_OVERRIDES += \
- renderthread.skia.reduceopstasksplitting=true
-
# Enable Incremental on the device
PRODUCT_PROPERTY_OVERRIDES += \
ro.incremental.enable=true
@@ -1097,6 +1103,9 @@
# Telephony
include device/google/gs101/telephony/user.mk
+# Wifi ext
+include hardware/google/pixel/wifi_ext/device.mk
+
# Battery Stats Viewer
PRODUCT_PACKAGES_DEBUG += BatteryStatsViewer
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp
index 1acd28a..bd148bb 100644
--- a/dumpstate/DumpstateDevice.cpp
+++ b/dumpstate/DumpstateDevice.cpp
@@ -347,6 +347,9 @@
DumpFileToFd(fd, "maxfg_base", "/dev/logbuffer_maxfg_base_monitor");
DumpFileToFd(fd, "maxfg_flip", "/dev/logbuffer_maxfg_flip_monitor");
}
+ if (!stat("/sys/class/power_supply/dock", &buffer)) {
+ DumpFileToFd(fd, "Power supply property dock", "/sys/class/power_supply/dock/uevent");
+ }
if (!stat("/dev/logbuffer_tcpm", &buffer)) {
DumpFileToFd(fd, "Logbuffer TCPM", "/dev/logbuffer_tcpm");
diff --git a/edgetpu/OWNERS b/edgetpu/OWNERS
new file mode 100644
index 0000000..9eb92a9
--- /dev/null
+++ b/edgetpu/OWNERS
@@ -0,0 +1,6 @@
+# Devs who work on EdgeTPU on Android.
+hsuy@google.com
+yuchicheng@google.com
+iayara@google.com
+qinyiyan@google.com
+macwang@google.com
\ No newline at end of file
diff --git a/gnss/47765/Android.bp b/gnss/47765/Android.bp
index f4a2902..4843b23 100644
--- a/gnss/47765/Android.bp
+++ b/gnss/47765/Android.bp
@@ -42,7 +42,7 @@
"android.hardware.gnss@2.1",
"android.hardware.gnss.measurement_corrections@1.0",
"android.hardware.gnss.visibility_control@1.0",
- "android.hardware.gnss-V1-ndk_platform",
+ "android.hardware.gnss-V1-ndk",
"libhardware",
"libc++",
"libc",
diff --git a/pixelstats/pixelstats-vendor.gs101.rc b/pixelstats/pixelstats-vendor.gs101.rc
index 98af5fc..d324b6a 100644
--- a/pixelstats/pixelstats-vendor.gs101.rc
+++ b/pixelstats/pixelstats-vendor.gs101.rc
@@ -1,5 +1,5 @@
on property:sys.boot_completed=1
- start vendor.pixelstats_vendor
+ start vendor.pixelstats_vendor
service vendor.pixelstats_vendor /vendor/bin/pixelstats-vendor
class hal
diff --git a/pkvm/Android.bp b/pkvm/Android.bp
new file mode 100644
index 0000000..dba9601
--- /dev/null
+++ b/pkvm/Android.bp
@@ -0,0 +1,31 @@
+// 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.
+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/gs101:device_google_gs101_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: [
+ "//device/google/gs101:device_google_gs101_license",
+ ],
+}
+
+cc_binary {
+ name: "pkvm_enabler",
+ vendor: true,
+ init_rc: ["pkvm_enabler.gs101.rc"],
+ srcs: ["pkvm_enabler.c"],
+ shared_libs: ["liblog"],
+}
diff --git a/pkvm/pkvm_enabler.c b/pkvm/pkvm_enabler.c
new file mode 100644
index 0000000..cb14ba6
--- /dev/null
+++ b/pkvm/pkvm_enabler.c
@@ -0,0 +1,75 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "pkvm_enabler"
+
+#include <errno.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#include <log/log.h>
+
+#define KVM_DEVICE "/dev/kvm"
+#define MISC_WRITER "/vendor/bin/misc_writer"
+
+int main() {
+ char *newargv[] = { MISC_WRITER, "--set-enable-pkvm", NULL };
+ char *newenvp[] = { NULL };
+ pid_t pid;
+ int ret, wstatus;
+
+ /* Check whether KVM device exists. */
+ ret = access(KVM_DEVICE, F_OK);
+
+ /* If KVM device exists, return SUCCESS to continue booting. */
+ if (ret == 0) {
+ exit(EXIT_SUCCESS);
+ }
+
+ if (ret != -ENOENT) {
+ ALOGW("Unexpected error from access(): %d", ret);
+ }
+
+ /*
+ * If KVM device does not exist, run misc_writer and return FAILURE
+ * to force a reboot.
+ */
+ pid = fork();
+ if (pid == -1) {
+ ALOGE("Could not fork: %d", errno);
+ exit(EXIT_FAILURE);
+ }
+
+ if (pid == 0) {
+ execve(MISC_WRITER, newargv, newenvp);
+ ALOGE("Could not execute " MISC_WRITER ": %d", errno);
+ _exit(EXIT_FAILURE);
+ }
+
+ waitpid(pid, &wstatus, 0);
+ if (WIFEXITED(wstatus)) {
+ ret = WEXITSTATUS(wstatus);
+ if (ret) {
+ ALOGE(MISC_WRITER " exit status: %d", ret);
+ }
+ } else {
+ ALOGE(MISC_WRITER " terminated unexpectedly: %d", wstatus);
+ }
+
+ exit(EXIT_FAILURE);
+}
diff --git a/pkvm/pkvm_enabler.gs101.rc b/pkvm/pkvm_enabler.gs101.rc
new file mode 100644
index 0000000..6f329d3
--- /dev/null
+++ b/pkvm/pkvm_enabler.gs101.rc
@@ -0,0 +1,5 @@
+service pkvm_enabler /vendor/bin/pkvm_enabler
+ reboot_on_failure reboot,pkvm-not-enabled
+
+on early-init
+ exec_start pkvm_enabler
\ No newline at end of file
diff --git a/powerstats/Gs101CommonDataProviders.cpp b/powerstats/Gs101CommonDataProviders.cpp
index e156b7b..98cdb85 100644
--- a/powerstats/Gs101CommonDataProviders.cpp
+++ b/powerstats/Gs101CommonDataProviders.cpp
@@ -613,7 +613,7 @@
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndAttrConsumer(p,
EnergyConsumerType::OTHER, "TPU", {"S10M_VDD_TPU"},
- {{UID_TIME_IN_STATE, "/sys/class/edgetpu/abrolhos/device/tpu_usage"}},
+ {{UID_TIME_IN_STATE, "/sys/class/edgetpu/edgetpu-soc/device/tpu_usage"}},
stateCoeffs));
}
diff --git a/usb/Android.bp b/usb/Android.bp
index 40454af..5aafe14 100644
--- a/usb/Android.bp
+++ b/usb/Android.bp
@@ -51,7 +51,7 @@
"android.hardware.thermal@1.0",
"android.hardware.thermal@2.0",
"libcutils",
- "android.frameworks.stats-V1-ndk_platform",
+ "android.frameworks.stats-V1-ndk",
"pixelatoms-cpp",
"libbinder_ndk",
],
@@ -60,7 +60,7 @@
"libpixelstats",
],
export_shared_lib_headers: [
- "android.frameworks.stats-V1-ndk_platform",
+ "android.frameworks.stats-V1-ndk",
"pixelatoms-cpp",
],
proprietary: true,
diff --git a/vendor_dlkm.blocklist b/vendor_dlkm.blocklist
index b259ab6..4f7b6fd 100644
--- a/vendor_dlkm.blocklist
+++ b/vendor_dlkm.blocklist
@@ -1,4 +1,5 @@
blocklist bcmdhd43752
+blocklist synadhd43752
blocklist bcmdhd4389
blocklist cl_dsp
blocklist drv2624