Snap for 12587146 from 6a2ff60cdf
to 25Q1-release
Change-Id: I160412d97490985e2fee569efdb513ae5537a65e
This commit is contained in:
commit
ca94d03179
7 changed files with 55 additions and 0 deletions
20
dump_chip_info/Android.bp
Normal file
20
dump_chip_info/Android.bp
Normal 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",
|
||||||
|
}
|
3
dump_chip_info/chip_info.mk
Normal file
3
dump_chip_info/chip_info.mk
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/dump_chip_info/sepolicy
|
||||||
|
|
||||||
|
PRODUCT_PACKAGES += dump_chip_info
|
24
dump_chip_info/dump_chip_info.cpp
Normal file
24
dump_chip_info/dump_chip_info.cpp
Normal 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;
|
||||||
|
}
|
3
dump_chip_info/sepolicy/dump_chip_info.te
Normal file
3
dump_chip_info/sepolicy/dump_chip_info.te
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#
|
||||||
|
pixel_bugreport(dump_chip_info)
|
||||||
|
allow dump_chip_info sysfs_chip_info:file r_file_perms;
|
2
dump_chip_info/sepolicy/file.te
Normal file
2
dump_chip_info/sepolicy/file.te
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#
|
||||||
|
type sysfs_chip_info, sysfs_type, fs_type;
|
1
dump_chip_info/sepolicy/file_contexts
Normal file
1
dump_chip_info/sepolicy/file_contexts
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/vendor/bin/dump/dump_chip_info u:object_r:dump_chip_info_exec:s0
|
2
dump_chip_info/sepolicy/genfs_contexts
Normal file
2
dump_chip_info/sepolicy/genfs_contexts
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue