Snap for 12587146 from 6a2ff60cdf to 25Q1-release

Change-Id: I160412d97490985e2fee569efdb513ae5537a65e
This commit is contained in:
Android Build Coastguard Worker 2024-10-31 23:02:36 +00:00
commit ca94d03179
7 changed files with 55 additions and 0 deletions

20
dump_chip_info/Android.bp Normal file
View file

@ -0,0 +1,20 @@
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_binary {
name: "dump_chip_info",
srcs: ["dump_chip_info.cpp"],
cflags: [
"-Wall",
"-Wextra",
"-Werror",
],
shared_libs: [
"libbase",
"libdump",
"liblog",
],
vendor: true,
relative_install_path: "dump",
}

View file

@ -0,0 +1,3 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/dump_chip_info/sepolicy
PRODUCT_PACKAGES += dump_chip_info

View file

@ -0,0 +1,24 @@
/*
* Copyright 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.
*/
#include <dump/pixel_dump.h>
#include <android-base/file.h>
int main() {
dumpFileContent("ap_rom_patch_ver", "/sys/devices/system/goog-chip-info/ap_rom_patch_ver");
dumpFileContent("gpcm_asic_id", "/sys/devices/system/goog-chip-info/gpcm_asic_id");
return 0;
}

View file

@ -0,0 +1,3 @@
#
pixel_bugreport(dump_chip_info)
allow dump_chip_info sysfs_chip_info:file r_file_perms;

View file

@ -0,0 +1,2 @@
#
type sysfs_chip_info, sysfs_type, fs_type;

View file

@ -0,0 +1 @@
/vendor/bin/dump/dump_chip_info u:object_r:dump_chip_info_exec:s0

View file

@ -0,0 +1,2 @@
genfscon sysfs /devices/system/goog-chip-info/ap_rom_patch_ver u:object_r:sysfs_chip_info:s0
genfscon sysfs /devices/system/goog-chip-info/gpcm_asic_id u:object_r:sysfs_chip_info:s0