Snap for 12872597 from 7bc11b8bba
to mainline-tzdata6-release
Change-Id: I15371109b930e9427a27967d1d0699dc52183ff8
This commit is contained in:
commit
87077ce11a
168 changed files with 1428 additions and 149 deletions
|
@ -13,6 +13,11 @@ PRODUCT_COPY_FILES += \
|
|||
device/google/gs-common/aoc/conf/init.aoc.daemon.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.aoc.rc
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard vendor/google/whitechapel/aoc/aocx/aidl/aocx/framework_compatibility_matrix.xml),)
|
||||
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += \
|
||||
vendor/google/whitechapel/aoc/aocx/aidl/aocx/framework_compatibility_matrix.xml
|
||||
endif
|
||||
|
||||
# AoC debug support
|
||||
PRODUCT_PACKAGES_DEBUG += \
|
||||
aocdump \
|
||||
|
|
|
@ -1 +1 @@
|
|||
aocx.IAocx u:object_r:aocx:s0
|
||||
aocx.IAocx/default u:object_r:aocx:s0
|
||||
|
|
|
@ -16,7 +16,11 @@ PRODUCT_PACKAGES += \
|
|||
libhapticgeneratoraidl \
|
||||
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/aidl
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hdmi_audio
|
||||
ifeq ($(AUDIO_USE_DPTX_SEPOLICY),true)
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hdmi_audio/dptx
|
||||
else
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hdmi_audio/drmdp
|
||||
endif
|
||||
|
||||
include device/google/gs-common/audio/common.mk
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<compatibility-matrix version="1.0" type="framework">
|
||||
<hal format="aidl">
|
||||
<name>vendor.google.whitechapel.audio.extension</name>
|
||||
<version>4</version>
|
||||
<version>4-5</version>
|
||||
<interface>
|
||||
<name>IAudioExtension</name>
|
||||
<instance>default</instance>
|
||||
|
|
|
@ -42,7 +42,7 @@ PRODUCT_PACKAGES += \
|
|||
endif
|
||||
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hidl
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hdmi_audio
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hdmi_audio/drmdp
|
||||
|
||||
include device/google/gs-common/audio/common.mk
|
||||
|
||||
|
|
1
audio/sepolicy/hdmi_audio/dptx/genfs_contexts
Normal file
1
audio/sepolicy/hdmi_audio/dptx/genfs_contexts
Normal file
|
@ -0,0 +1 @@
|
|||
genfscon sysfs /devices/platform/dwc_dptx-audio/extcon/hdmi_audio u:object_r:sysfs_extcon:s0
|
|
@ -26,5 +26,9 @@
|
|||
<name>IBluetoothEwp</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IBluetoothCco</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</compatibility-matrix>
|
||||
|
|
|
@ -23,5 +23,6 @@
|
|||
<fqname>IBluetoothExt/default</fqname>
|
||||
<fqname>IBluetoothFinder/default</fqname>
|
||||
<fqname>IBluetoothSar/default</fqname>
|
||||
<fqname>IBluetoothCco/default</fqname>
|
||||
</hal>
|
||||
</manifest>
|
||||
|
|
|
@ -5,3 +5,4 @@ vendor.google.bluetooth_ext.IBluetoothCcc/default u:o
|
|||
vendor.google.bluetooth_ext.IBluetoothEwp/default u:object_r:hal_bluetooth_coexistence_service:s0
|
||||
vendor.google.bluetooth_ext.IBluetoothExt/default u:object_r:hal_bluetooth_coexistence_service:s0
|
||||
vendor.google.bluetooth_ext.IBluetoothFinder/default u:object_r:hal_bluetooth_coexistence_service:s0
|
||||
vendor.google.bluetooth_ext.IBluetoothCco/default u:object_r:hal_bluetooth_coexistence_service:s0
|
||||
|
|
|
@ -34,3 +34,35 @@ prebuilt_etc {
|
|||
src: "com.google.pixel.camera.concurrent_foldable_dual_front.xml",
|
||||
sub_dir: "permissions",
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "libg3a_standalone_gabc_rc",
|
||||
vendor: true,
|
||||
proprietary: true,
|
||||
init_rc: ["libg3a_gabc.rc"],
|
||||
src: "libg3a_gabc.rc",
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "libg3a_standalone_gaf_rc",
|
||||
vendor: true,
|
||||
proprietary: true,
|
||||
init_rc: ["libg3a_gaf.rc"],
|
||||
src: "libg3a_gaf.rc",
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "libg3a_standalone_ghawb_rc",
|
||||
vendor: true,
|
||||
proprietary: true,
|
||||
init_rc: ["libg3a_ghawb.rc"],
|
||||
src: "libg3a_ghawb.rc",
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "vendor-apex-allowlist-lyric.xml",
|
||||
src: "vendor-apex-allowlist-lyric.xml",
|
||||
vendor: true,
|
||||
sub_dir: "sysconfig",
|
||||
filename_from_src: true,
|
||||
}
|
||||
|
|
28
camera/libg3a_gabc.rc
Normal file
28
camera/libg3a_gabc.rc
Normal file
|
@ -0,0 +1,28 @@
|
|||
# override default log levels.
|
||||
on boot
|
||||
setprop log.tag.GABC E
|
||||
|
||||
# backward-compatible system props.
|
||||
on property:persist.vendor.camera.gabc.debug_level=0
|
||||
setprop log.tag.GABC S
|
||||
|
||||
on property:persist.vendor.camera.gabc.debug_level=1
|
||||
setprop log.tag.GABC V
|
||||
|
||||
on property:persist.vendor.camera.gabc.debug_level=2
|
||||
setprop log.tag.GABC V
|
||||
|
||||
on property:persist.vendor.camera.gabc.debug_level=3
|
||||
setprop log.tag.GABC D
|
||||
|
||||
on property:persist.vendor.camera.gabc.debug_level=4
|
||||
setprop log.tag.GABC I
|
||||
|
||||
on property:persist.vendor.camera.gabc.debug_level=5
|
||||
setprop log.tag.GABC W
|
||||
|
||||
on property:persist.vendor.camera.gabc.debug_level=6
|
||||
setprop log.tag.GABC E
|
||||
|
||||
on property:persist.vendor.camera.gabc.debug_level=7
|
||||
setprop log.tag.GABC A
|
83
camera/libg3a_gaf.rc
Normal file
83
camera/libg3a_gaf.rc
Normal file
|
@ -0,0 +1,83 @@
|
|||
# override default log levels.
|
||||
on boot
|
||||
setprop log.tag.GAF E
|
||||
|
||||
# backward-compatible system props.
|
||||
on property:persist.vendor.camera.af.debug_level=0
|
||||
setprop log.tag.GAF S
|
||||
|
||||
on property:persist.vendor.camera.af.debug_level=1
|
||||
setprop log.tag.GAF V
|
||||
|
||||
on property:persist.vendor.camera.af.debug_level=2
|
||||
setprop log.tag.GAF V
|
||||
|
||||
on property:persist.vendor.camera.af.debug_level=3
|
||||
setprop log.tag.GAF D
|
||||
|
||||
on property:persist.vendor.camera.af.debug_level=4
|
||||
setprop log.tag.GAF I
|
||||
|
||||
on property:persist.vendor.camera.af.debug_level=5
|
||||
setprop log.tag.GAF W
|
||||
|
||||
on property:persist.vendor.camera.af.debug_level=6
|
||||
setprop log.tag.GAF E
|
||||
|
||||
on property:persist.vendor.camera.af.debug_level=7
|
||||
setprop log.tag.GAF A
|
||||
|
||||
on property:persist.vendor.camera.af.video_debug_enable=2
|
||||
setprop vendor.camera.3a.log_level 1
|
||||
setprop log.tag.3a.gcrd.af.parser.input V
|
||||
setprop log.tag.3a.gcrd.af.parser.output V
|
||||
setprop log.tag.3a.gcrd.af.processor V
|
||||
setprop log.tag.3a.gcrd.af.engine V
|
||||
setprop log.tag.3a.gcrd.dtm V
|
||||
|
||||
on property:persist.vendor.camera.af.video_debug_enable=0
|
||||
setprop vendor.camera.3a.log_level 6
|
||||
setprop log.tag.3a.gcrd.af.parser.input E
|
||||
setprop log.tag.3a.gcrd.af.parser.output E
|
||||
setprop log.tag.3a.gcrd.af.processor E
|
||||
setprop log.tag.3a.gcrd.af.engine E
|
||||
setprop log.tag.3a.gcrd.dtm E
|
||||
|
||||
on property:persist.vendor.camera.af.default_focus_only=false
|
||||
setprop persist.vendor.camera.af.ignore_ctrl_focus_region false
|
||||
setprop persist.vendor.camera.af.ignore_face 0
|
||||
setprop persist.vendor.camera.af.force_saliency_consumption ""
|
||||
|
||||
on property:persist.vendor.camera.af.default_focus_only=true
|
||||
setprop persist.vendor.camera.af.ignore_ctrl_focus_region true
|
||||
setprop persist.vendor.camera.af.ignore_face 1
|
||||
setprop persist.vendor.camera.af.force_saliency_consumption false
|
||||
|
||||
# Reset every related properties
|
||||
on property:persist.vendor.camera.af.standalone_searchlet=reset
|
||||
setprop persist.vendor.camera.af.ignore_pd \"\"
|
||||
setprop persist.vendor.camera.af.ignore_tof \"\"
|
||||
setprop persist.vendor.camera.af.ignore_cdaf \"\"
|
||||
setprop persist.vendor.camera.af.ignore_gyro \"\"
|
||||
setprop persist.vendor.camera.af.ignore_3a \"\"
|
||||
setprop vendor.camera.debug.enable_saliency \"\"
|
||||
|
||||
# Standalone framework: PDAF
|
||||
on property:persist.vendor.camera.af.standalone_searchlet=pdaf
|
||||
setprop persist.vendor.camera.af.ignore_tof 1
|
||||
setprop persist.vendor.camera.af.ignore_gyro 1
|
||||
setprop persist.vendor.camera.af.ignore_3a 1
|
||||
setprop vendor.camera.debug.enable_saliency 0
|
||||
|
||||
# Standalone framework: LDAF
|
||||
on property:persist.vendor.camera.af.standalone_searchlet=ldaf
|
||||
setprop persist.vendor.camera.af.ignore_pd 7
|
||||
setprop persist.vendor.camera.af.ignore_gyro 1
|
||||
setprop persist.vendor.camera.af.ignore_3a 1
|
||||
setprop vendor.camera.debug.enable_saliency 0
|
||||
|
||||
# Standalone framework: CDAF
|
||||
on property:persist.vendor.camera.af.standalone_searchlet=cdaf
|
||||
setprop persist.vendor.camera.af.ignore_pd 7
|
||||
setprop persist.vendor.camera.af.ignore_tof 1
|
||||
setprop vendor.camera.debug.enable_saliency 0
|
28
camera/libg3a_ghawb.rc
Normal file
28
camera/libg3a_ghawb.rc
Normal file
|
@ -0,0 +1,28 @@
|
|||
# override default log levels.
|
||||
on boot
|
||||
setprop log.tag.GHAWB E
|
||||
|
||||
# backward-compatible system props.
|
||||
on property:persist.vendor.camera.ghawb.debug_level=0
|
||||
setprop log.tag.GHAWB S
|
||||
|
||||
on property:persist.vendor.camera.ghawb.debug_level=1
|
||||
setprop log.tag.GHAWB V
|
||||
|
||||
on property:persist.vendor.camera.ghawb.debug_level=2
|
||||
setprop log.tag.GHAWB V
|
||||
|
||||
on property:persist.vendor.camera.ghawb.debug_level=3
|
||||
setprop log.tag.GHAWB D
|
||||
|
||||
on property:persist.vendor.camera.ghawb.debug_level=4
|
||||
setprop log.tag.GHAWB I
|
||||
|
||||
on property:persist.vendor.camera.ghawb.debug_level=5
|
||||
setprop log.tag.GHAWB W
|
||||
|
||||
on property:persist.vendor.camera.ghawb.debug_level=6
|
||||
setprop log.tag.GHAWB E
|
||||
|
||||
on property:persist.vendor.camera.ghawb.debug_level=7
|
||||
setprop log.tag.GHAWB A
|
|
@ -20,8 +20,20 @@ endif
|
|||
# All shipping releases will switch to prebuilts (trunk+)
|
||||
# if this condition is not true, then build from source.
|
||||
|
||||
ifneq ($(RELEASE_PIXEL_CAMERA_ENABLE_PREBUILT),true)
|
||||
# Fallback if the prebuilts directory does not exist, then we must
|
||||
# build from source no matter what, so we log a warning
|
||||
ifeq ($(RELEASE_PIXEL_CAMERA_ENABLE_PREBUILT),true)
|
||||
ifeq ($(wildcard vendor/google/services/LyricCameraHAL/prebuilt),)
|
||||
$(warning Lyric prebuilt directory is missing, it will be built from source)
|
||||
BUILD_LYRIC_FROM_SOURCE := true
|
||||
else
|
||||
BUILD_LYRIC_FROM_SOURCE := false
|
||||
endif
|
||||
else
|
||||
BUILD_LYRIC_FROM_SOURCE := true
|
||||
endif # RELEASE_PIXEL_CAMERA_ENABLE_PREBUILT
|
||||
|
||||
ifeq ($(BUILD_LYRIC_FROM_SOURCE),true)
|
||||
PRODUCT_SOONG_NAMESPACES += \
|
||||
vendor/google/camera \
|
||||
vendor/google/camera/google_3a/libs_v4 \
|
||||
|
@ -37,11 +49,7 @@ PRODUCT_SOONG_NAMESPACES += \
|
|||
vendor/google/camera/google_3a/libs_v4/gAF \
|
||||
vendor/google/camera/google_3a/libs_v4/gafd \
|
||||
vendor/google/camera/google_3a/libs_v4/gHAWB/native_coverage
|
||||
|
||||
# Calibration tool for debug builds
|
||||
PRODUCT_PACKAGES_DEBUG += tarasque_test
|
||||
PRODUCT_PACKAGES_DEBUG += ProtoCalibGenerator
|
||||
endif # RELEASE_PIXEL_CAMERA_ENABLE_PREBUILT check
|
||||
endif # BUILD_LYRIC_FROM_SOURCE
|
||||
|
||||
# Init-time log settings for Google 3A
|
||||
PRODUCT_PACKAGES += libg3a_standalone_gabc_rc
|
||||
|
@ -50,6 +58,7 @@ PRODUCT_PACKAGES += libg3a_standalone_ghawb_rc
|
|||
|
||||
# Vendor APEX which contains the camera HAL
|
||||
PRODUCT_PACKAGES += com.google.pixel.camera.hal
|
||||
PRODUCT_PACKAGES += venodr-apex-allowlist-lyric.xml
|
||||
PRODUCT_PACKAGES += init.camera.set-interrupts-ownership
|
||||
PRODUCT_PACKAGES += lyric_preview_dis_xml
|
||||
|
||||
|
@ -61,3 +70,7 @@ DEVICE_MATRIX_FILE += \
|
|||
|
||||
# sepolicy dir is added in dump.mk.
|
||||
# Make doesn't deduplicate sepolicy dirs, so including it here causes build errors.
|
||||
|
||||
# Calibration tools for debug builds
|
||||
PRODUCT_PACKAGES_DEBUG += tarasque_test
|
||||
PRODUCT_PACKAGES_DEBUG += ProtoCalibGenerator
|
||||
|
|
|
@ -44,3 +44,13 @@ Example:
|
|||
$(call soong_config_set,google3a_config,target_device,oriole)
|
||||
```
|
||||
A mixture of `camera_hardware` and `tuning_product` used by 3A.
|
||||
|
||||
## `radioext_interface_type`
|
||||
|
||||
Example:
|
||||
```
|
||||
$(call soong_config_set,lyric,radioext_interface_type,aidl)
|
||||
```
|
||||
Specifies which interface type to use in the RadioExt client when communicating
|
||||
with the RadioExt service. The possible values are "hidl" and "aidl".
|
||||
Devices launching with Android 15 no longer support HIDL.
|
||||
|
|
9
camera/vendor-apex-allowlist-lyric.xml
Normal file
9
camera/vendor-apex-allowlist-lyric.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
This XML file declares the vendor apex package names eligible for installation.
|
||||
-->
|
||||
|
||||
<config>
|
||||
<allowed-vendor-apex package="com.google.pixel.camera.hal" installerPackage="com.google.android.GoogleCamera" />
|
||||
</config>
|
|
@ -1,27 +1,32 @@
|
|||
PIXEL_PREBUILT_SYMLINK_PATH=$(OUT_DIR)/pixel
|
||||
$(shell rm -rf pixel_current_*)
|
||||
$(shell rm -rf $(PIXEL_PREBUILT_SYMLINK_PATH)/pixel_current_*)
|
||||
$(shell mkdir -p $(PIXEL_PREBUILT_SYMLINK_PATH))
|
||||
|
||||
# Create symlink for bootloader
|
||||
$(shell rm -f "pixel_current_bootloader")
|
||||
ifdef BOOTLOADER_FILE_PATH
|
||||
$(shell ln -sf ${BOOTLOADER_FILE_PATH} "pixel_current_bootloader")
|
||||
$(shell ln -sf ../../${BOOTLOADER_FILE_PATH} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_bootloader")
|
||||
else ifdef BOOTLOADER_RADIO_FILE_PATH
|
||||
$(shell ln -sf ${BOOTLOADER_RADIO_FILE_PATH} "pixel_current_bootloader")
|
||||
$(shell ln -sf ../../${BOOTLOADER_RADIO_FILE_PATH} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_bootloader")
|
||||
endif
|
||||
|
||||
# Create symlink for kernel
|
||||
$(shell rm -f "pixel_current_kernel")
|
||||
ifdef TARGET_KERNEL_DIR
|
||||
$(shell ln -sf ${TARGET_KERNEL_DIR} "pixel_current_kernel")
|
||||
$(shell ln -sf ../../${TARGET_KERNEL_DIR} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_kernel")
|
||||
endif
|
||||
|
||||
# Create symlink for radio
|
||||
$(shell rm -f "pixel_current_radio")
|
||||
ifdef RADIO_FILE_PATH
|
||||
$(shell ln -sf ${RADIO_FILE_PATH} "pixel_current_radio")
|
||||
$(shell ln -sf ../../${RADIO_FILE_PATH} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_radio")
|
||||
else ifdef BOOTLOADER_RADIO_FILE_PATH
|
||||
$(shell ln -sf ${BOOTLOADER_RADIO_FILE_PATH} "pixel_current_radio")
|
||||
$(shell ln -sf ../../${BOOTLOADER_RADIO_FILE_PATH} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_radio")
|
||||
endif
|
||||
|
||||
# Create symlink for radiocfg
|
||||
$(shell rm -f "pixel_current_radiocfg")
|
||||
ifdef SRC_MDM_CFG_DIR
|
||||
$(shell ln -sf ${SRC_MDM_CFG_DIR} "pixel_current_radiocfg")
|
||||
$(shell ln -sf ../../${SRC_MDM_CFG_DIR} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_radiocfg")
|
||||
endif
|
||||
|
|
|
@ -35,3 +35,6 @@ allow hal_contexthub_default self:global_capability2_class_set block_suspend;
|
|||
|
||||
# Allow binder calls with clients
|
||||
binder_call(hal_contexthub_default, hal_sensors_default)
|
||||
|
||||
# Allow access for AoC properties.
|
||||
get_prop(hal_contexthub_default, vendor_aoc_prop)
|
||||
|
|
|
@ -4,14 +4,14 @@ package {
|
|||
|
||||
sh_binary {
|
||||
name: "dump_display_userdebug.sh",
|
||||
src: "dump_display_userdebug.sh",
|
||||
src: "common/dump_display_userdebug.sh",
|
||||
vendor: true,
|
||||
sub_dir: "dump",
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "dump_display",
|
||||
srcs: ["dump_display.cpp"],
|
||||
name: "dump_exynos_display",
|
||||
srcs: ["exynos/dump_display.cpp"],
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
|
@ -26,8 +26,8 @@ cc_binary {
|
|||
}
|
||||
|
||||
cc_binary {
|
||||
name: "dump_second_display",
|
||||
srcs: ["dump_second_display.cpp"],
|
||||
name: "dump_exynos_second_display",
|
||||
srcs: ["exynos/dump_second_display.cpp"],
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
|
@ -40,3 +40,33 @@ cc_binary {
|
|||
relative_install_path: "dump",
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "dump_pixel_display",
|
||||
srcs: ["pixel/dump_display.cpp"],
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libdump",
|
||||
],
|
||||
vendor: true,
|
||||
relative_install_path: "dump",
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "dump_pixel_second_display",
|
||||
srcs: ["pixel/dump_second_display.cpp"],
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
],
|
||||
shared_libs: [
|
||||
"libdump",
|
||||
],
|
||||
vendor: true,
|
||||
relative_install_path: "dump",
|
||||
}
|
||||
|
|
4
display/dump_exynos_display.mk
Normal file
4
display/dump_exynos_display.mk
Normal file
|
@ -0,0 +1,4 @@
|
|||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy/exynos
|
||||
|
||||
PRODUCT_PACKAGES_DEBUG += dump_display_userdebug.sh
|
||||
PRODUCT_PACKAGES += dump_exynos_display
|
3
display/dump_exynos_second_display.mk
Normal file
3
display/dump_exynos_second_display.mk
Normal file
|
@ -0,0 +1,3 @@
|
|||
PRODUCT_PACKAGES += dump_exynos_second_display
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy_second_display/exynos
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy/pixel
|
||||
|
||||
PRODUCT_PACKAGES_DEBUG += dump_display_userdebug.sh
|
||||
PRODUCT_PACKAGES += dump_display
|
||||
PRODUCT_PACKAGES += dump_pixel_display
|
3
display/dump_pixel_second_display.mk
Normal file
3
display/dump_pixel_second_display.mk
Normal file
|
@ -0,0 +1,3 @@
|
|||
PRODUCT_PACKAGES += dump_pixel_second_display
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy_second_display/pixel
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
PRODUCT_PACKAGES += dump_second_display
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy_second_display
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
int main() {
|
||||
setbuf(stdout, NULL);
|
||||
dumpFileContent("DECON-0 counters /sys/class/drm/card0/device/decon0/counters", "/sys/class/drm/card0/device/decon0/counters");
|
||||
dumpFileContent("DECON-0 counters", "/sys/class/drm/card0/device/decon0/counters");
|
||||
dumpFileContent("CRTC-0 event log", "/sys/kernel/debug/dri/0/crtc-0/event");
|
||||
runCommand("libdisplaycolor", "/vendor/bin/dumpsys displaycolor -v");
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
#include <dump/pixel_dump.h>
|
||||
|
||||
int main() {
|
||||
dumpFileContent("DECON-1 counters /sys/class/drm/card0/device/decon1/counters", "/sys/class/drm/card0/device/decon1/counters");
|
||||
dumpFileContent("DECON-1 counters", "/sys/class/drm/card0/device/decon1/counters");
|
||||
dumpFileContent("CRTC-1 event log", "/sys/kernel/debug/dri/0/crtc-1/event");
|
||||
|
||||
dumpFileContent("Secondary panel name", "/sys/class/drm/card0/device/secondary-panel/panel_name");
|
29
display/pixel/dump_display.cpp
Normal file
29
display/pixel/dump_display.cpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright 2022 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() {
|
||||
setbuf(stdout, NULL);
|
||||
dumpFileContent("CRTC-0 status", "/sys/kernel/debug/dri/0/crtc-0/status");
|
||||
runCommand("libdisplaycolor", "/vendor/bin/dumpsys displaycolor -v");
|
||||
|
||||
dumpFileContent("Primary panel name", "/sys/class/drm/card0/device/primary-panel/panel_name");
|
||||
dumpFileContent("Primary panel extra info", "/sys/class/drm/card0/device/primary-panel/panel_extinfo");
|
||||
dumpFileContent("Primary panel power Vreg", "/sys/class/drm/card0/device/primary-panel/panel_pwr_vreg");
|
||||
dumpFileContent("Primary panel power mode register", "/sys/class/drm/card0/device/primary-panel/power_mode");
|
||||
return 0;
|
||||
}
|
25
display/pixel/dump_second_display.cpp
Normal file
25
display/pixel/dump_second_display.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2022 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>
|
||||
|
||||
int main() {
|
||||
dumpFileContent("CRTC-1 status", "/sys/kernel/debug/dri/0/crtc-1/status");
|
||||
|
||||
dumpFileContent("Secondary panel name", "/sys/class/drm/card0/device/secondary-panel/panel_name");
|
||||
dumpFileContent("Secondary panel extra info", "/sys/class/drm/card0/device/secondary-panel/panel_extinfo");
|
||||
dumpFileContent("Secondary panel power mode register", "/sys/class/drm/card0/device/secondary-panel/power_mode");
|
||||
return 0;
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
# Display (dump for bugreport)
|
||||
pixel_bugreport(dump_display)
|
||||
|
||||
allow dump_display sysfs_display:file r_file_perms;
|
||||
allow dump_display vendor_displaycolor_service:service_manager find;
|
||||
binder_call(dump_display, hal_graphics_composer_default)
|
||||
allow dump_display vendor_dumpsys:file execute_no_trans;
|
||||
allow dump_display vendor_shell_exec:file execute_no_trans;
|
||||
|
||||
userdebug_or_eng(`
|
||||
allow dump_display vendor_dri_debugfs:dir r_dir_perms;
|
||||
allow dump_display vendor_dri_debugfs:file r_file_perms;
|
||||
')
|
||||
vndbinder_use(dump_display)
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
# Display eng/userdebug (dump for bugreport)
|
||||
pixel_bugreport(dump_display_userdebug)
|
||||
|
||||
userdebug_or_eng(`
|
||||
allow dump_display_userdebug vendor_toolbox_exec:file execute_no_trans;
|
||||
allow dump_display_userdebug vendor_log_file:dir search;
|
||||
allow dump_display_userdebug vendor_hwc_log_file:dir r_dir_perms;
|
||||
allow dump_display_userdebug vendor_hwc_log_file:file r_file_perms;
|
||||
allow dump_display_userdebug debugfs_tracing_instances:dir search;
|
||||
allow dump_display_userdebug debugfs_tracing_instances:file r_file_perms;
|
||||
')
|
15
display/sepolicy/exynos/dump_display.te
Normal file
15
display/sepolicy/exynos/dump_display.te
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Display (dump for bugreport)
|
||||
pixel_bugreport(dump_exynos_display)
|
||||
|
||||
allow dump_exynos_display sysfs_display:file r_file_perms;
|
||||
allow dump_exynos_display vendor_displaycolor_service:service_manager find;
|
||||
binder_call(dump_exynos_display, hal_graphics_composer_default)
|
||||
allow dump_exynos_display vendor_dumpsys:file execute_no_trans;
|
||||
allow dump_exynos_display vendor_shell_exec:file execute_no_trans;
|
||||
|
||||
userdebug_or_eng(`
|
||||
allow dump_exynos_display vendor_dri_debugfs:dir r_dir_perms;
|
||||
allow dump_exynos_display vendor_dri_debugfs:file r_file_perms;
|
||||
')
|
||||
vndbinder_use(dump_exynos_display)
|
||||
|
11
display/sepolicy/exynos/dump_display_userdebug.te
Normal file
11
display/sepolicy/exynos/dump_display_userdebug.te
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Display eng/userdebug (dump for bugreport)
|
||||
pixel_bugreport(dump_exynos_display_userdebug)
|
||||
|
||||
userdebug_or_eng(`
|
||||
allow dump_exynos_display_userdebug vendor_toolbox_exec:file execute_no_trans;
|
||||
allow dump_exynos_display_userdebug vendor_log_file:dir search;
|
||||
allow dump_exynos_display_userdebug vendor_hwc_log_file:dir r_dir_perms;
|
||||
allow dump_exynos_display_userdebug vendor_hwc_log_file:file r_file_perms;
|
||||
allow dump_exynos_display_userdebug debugfs_tracing_instances:dir search;
|
||||
allow dump_exynos_display_userdebug debugfs_tracing_instances:file r_file_perms;
|
||||
')
|
5
display/sepolicy/exynos/file_contexts
Normal file
5
display/sepolicy/exynos/file_contexts
Normal file
|
@ -0,0 +1,5 @@
|
|||
/vendor/bin/dump/dump_display_userdebug\.sh u:object_r:dump_exynos_display_userdebug_exec:s0
|
||||
/vendor/bin/dump/dump_exynos_display u:object_r:dump_exynos_display_exec:s0
|
||||
|
||||
/data/vendor/log/hwc(/.*)? u:object_r:vendor_hwc_log_file:s0
|
||||
|
3
display/sepolicy/exynos/hal_graphics_composer_default.te
Normal file
3
display/sepolicy/exynos/hal_graphics_composer_default.te
Normal file
|
@ -0,0 +1,3 @@
|
|||
allow hal_graphics_composer_default dump_exynos_display:fifo_file { append write };
|
||||
allow hal_graphics_composer_default dump_exynos_display:fd use;
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
allow hal_graphics_composer_default dump_display:fifo_file { append write };
|
||||
allow hal_graphics_composer_default dump_display:fd use;
|
||||
|
15
display/sepolicy/pixel/dump_display.te
Normal file
15
display/sepolicy/pixel/dump_display.te
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Display (dump for bugreport)
|
||||
pixel_bugreport(dump_pixel_display)
|
||||
|
||||
allow dump_pixel_display sysfs_display:file r_file_perms;
|
||||
allow dump_pixel_display vendor_displaycolor_service:service_manager find;
|
||||
binder_call(dump_pixel_display, hal_graphics_composer_default)
|
||||
allow dump_pixel_display vendor_dumpsys:file execute_no_trans;
|
||||
allow dump_pixel_display vendor_shell_exec:file execute_no_trans;
|
||||
|
||||
userdebug_or_eng(`
|
||||
allow dump_pixel_display vendor_dri_debugfs:dir r_dir_perms;
|
||||
allow dump_pixel_display vendor_dri_debugfs:file r_file_perms;
|
||||
')
|
||||
vndbinder_use(dump_pixel_display)
|
||||
|
11
display/sepolicy/pixel/dump_display_userdebug.te
Normal file
11
display/sepolicy/pixel/dump_display_userdebug.te
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Display eng/userdebug (dump for bugreport)
|
||||
pixel_bugreport(dump_pixel_display_userdebug)
|
||||
|
||||
userdebug_or_eng(`
|
||||
allow dump_pixel_display_userdebug vendor_toolbox_exec:file execute_no_trans;
|
||||
allow dump_pixel_display_userdebug vendor_log_file:dir search;
|
||||
allow dump_pixel_display_userdebug vendor_hwc_log_file:dir r_dir_perms;
|
||||
allow dump_pixel_display_userdebug vendor_hwc_log_file:file r_file_perms;
|
||||
allow dump_pixel_display_userdebug debugfs_tracing_instances:dir search;
|
||||
allow dump_pixel_display_userdebug debugfs_tracing_instances:file r_file_perms;
|
||||
')
|
3
display/sepolicy/pixel/file.te
Normal file
3
display/sepolicy/pixel/file.te
Normal file
|
@ -0,0 +1,3 @@
|
|||
type vendor_hwc_log_file, file_type, data_file_type;
|
||||
type vendor_dri_debugfs, fs_type, debugfs_type;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/vendor/bin/dump/dump_display_userdebug\.sh u:object_r:dump_display_userdebug_exec:s0
|
||||
/vendor/bin/dump/dump_display u:object_r:dump_display_exec:s0
|
||||
/vendor/bin/dump/dump_display_userdebug\.sh u:object_r:dump_pixel_display_userdebug_exec:s0
|
||||
/vendor/bin/dump/dump_pixel_display u:object_r:dump_pixel_display_exec:s0
|
||||
|
||||
/data/vendor/log/hwc(/.*)? u:object_r:vendor_hwc_log_file:s0
|
||||
|
3
display/sepolicy/pixel/genfs_contexts
Normal file
3
display/sepolicy/pixel/genfs_contexts
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
genfscon debugfs /dri/0/crtc- u:object_r:vendor_dri_debugfs:s0
|
||||
genfscon sysfs /module/drm/parameters/debug u:object_r:sysfs_display:s0
|
3
display/sepolicy/pixel/hal_graphics_composer_default.te
Normal file
3
display/sepolicy/pixel/hal_graphics_composer_default.te
Normal file
|
@ -0,0 +1,3 @@
|
|||
allow hal_graphics_composer_default dump_pixel_display:fifo_file { append write };
|
||||
allow hal_graphics_composer_default dump_pixel_display:fd use;
|
||||
|
2
display/sepolicy/pixel/vndservice.te
Normal file
2
display/sepolicy/pixel/vndservice.te
Normal file
|
@ -0,0 +1,2 @@
|
|||
type vendor_displaycolor_service, vndservice_manager_type;
|
||||
|
2
display/sepolicy/pixel/vndservice_contexts
Normal file
2
display/sepolicy/pixel/vndservice_contexts
Normal file
|
@ -0,0 +1,2 @@
|
|||
displaycolor u:object_r:vendor_displaycolor_service:s0
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
pixel_bugreport(dump_second_display)
|
||||
|
||||
allow dump_second_display sysfs_display:file r_file_perms;
|
||||
|
||||
userdebug_or_eng(`
|
||||
allow dump_second_display vendor_dri_debugfs:dir r_dir_perms;
|
||||
allow dump_second_display vendor_dri_debugfs:file r_file_perms;
|
||||
')
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
pixel_bugreport(dump_exynos_second_display)
|
||||
|
||||
allow dump_exynos_second_display sysfs_display:file r_file_perms;
|
||||
|
||||
userdebug_or_eng(`
|
||||
allow dump_exynos_second_display vendor_dri_debugfs:dir r_dir_perms;
|
||||
allow dump_exynos_second_display vendor_dri_debugfs:file r_file_perms;
|
||||
')
|
||||
|
2
display/sepolicy_second_display/exynos/file_contexts
Normal file
2
display/sepolicy_second_display/exynos/file_contexts
Normal file
|
@ -0,0 +1,2 @@
|
|||
/vendor/bin/dump/dump_exynos_second_display u:object_r:dump_exynos_second_display_exec:s0
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
/vendor/bin/dump/dump_second_display u:object_r:dump_second_display_exec:s0
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
pixel_bugreport(dump_pixel_second_display)
|
||||
|
||||
allow dump_pixel_second_display sysfs_display:file r_file_perms;
|
||||
|
||||
userdebug_or_eng(`
|
||||
allow dump_pixel_second_display vendor_dri_debugfs:dir r_dir_perms;
|
||||
allow dump_pixel_second_display vendor_dri_debugfs:file r_file_perms;
|
||||
')
|
||||
|
2
display/sepolicy_second_display/pixel/file_contexts
Normal file
2
display/sepolicy_second_display/pixel/file_contexts
Normal file
|
@ -0,0 +1,2 @@
|
|||
/vendor/bin/dump/dump_pixel_second_display u:object_r:dump_pixel_second_display_exec:s0
|
||||
|
|
@ -19,6 +19,10 @@
|
|||
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");
|
||||
dumpFileContent("device_table", "/sys/devices/system/goog-chip-info/device_table");
|
||||
dumpFileContent("dvfs_table", "/sys/devices/system/goog-chip-info/dvfs_table");
|
||||
dumpFileContent("hw_feature_table", "/sys/devices/system/goog-chip-info/hw_feature_table");
|
||||
dumpFileContent("ids_table", "/sys/devices/system/goog-chip-info/ids_table");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
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
|
||||
genfscon sysfs /devices/system/goog-chip-info/device_table u:object_r:sysfs_chip_info:s0
|
||||
genfscon sysfs /devices/system/goog-chip-info/dvfs_table u:object_r:sysfs_chip_info:s0
|
||||
genfscon sysfs /devices/system/goog-chip-info/hw_feature_table u:object_r:sysfs_chip_info:s0
|
||||
genfscon sysfs /devices/system/goog-chip-info/ids_table u:object_r:sysfs_chip_info:s0
|
||||
|
|
|
@ -42,7 +42,7 @@ allow edgetpu_tachyon_server proc_version:file r_file_perms;
|
|||
|
||||
# Allow Tachyon service to send trace packets to Perfetto with SELinux enabled
|
||||
# under userdebug builds.
|
||||
userdebug_or_eng(`perfetto_producer(edgetpu_tachyon_server)')
|
||||
perfetto_producer(edgetpu_tachyon_server)
|
||||
|
||||
# Allow Tachyon service to read tflite DarwiNN delegate properties
|
||||
get_prop(edgetpu_tachyon_server, vendor_tflite_delegate_prop)
|
||||
|
@ -65,6 +65,4 @@ userdebug_or_eng(`
|
|||
')
|
||||
|
||||
# For shell level testing
|
||||
userdebug_or_eng(`
|
||||
binder_call(edgetpu_tachyon_server, shell);
|
||||
')
|
||||
binder_call(edgetpu_tachyon_server, shell);
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
## Configuration for eSIM bootstrap
|
||||
|
||||
# Enable eSIM bootstrap by default
|
||||
PRODUCT_PRODUCT_PROPERTIES += setupwizard.feature.provisioning_profile_mode=true
|
||||
|
||||
# init.rc and sepolcy to conditionally disable eSIM bootstrap
|
||||
PRODUCT_PACKAGES += init.esim-gs.rc
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/esim/sepolicy/vendor
|
||||
# system_ext
|
||||
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += device/google/gs-common/esim/sepolicy/system_ext/public
|
||||
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += device/google/gs-common/esim/sepolicy/system_ext/private
|
||||
|
|
|
@ -24,4 +24,4 @@ get_prop(euiccpixel_app, dck_prop)
|
|||
|
||||
# b/265286368 framework UI rendering properties and file access
|
||||
dontaudit euiccpixel_app default_prop:file { read };
|
||||
dontaudit euiccpixel_app sysfs_gpu_uevent:file { read open getattr };
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
# type for gpu uevent
|
||||
type sysfs_gpu_uevent, sysfs_type, fs_type;
|
|
@ -1 +0,0 @@
|
|||
genfscon sysfs /devices/platform/34f00000.gpu0/uevent u:object_r:sysfs_gpu_uevent:s0
|
2
fingerprint/sepolicy/service_contexts
Normal file
2
fingerprint/sepolicy/service_contexts
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Fingerprint HAL extension
|
||||
vendor.goodix.hardware.biometrics.fingerprint.IGoodixFingerprintDaemon/default u:object_r:hal_fingerprint_service:s0
|
|
@ -1,28 +1,16 @@
|
|||
# GCANext and GCAEng.
|
||||
# b/363018500
|
||||
typeattribute debug_camera_app coredomain;
|
||||
|
||||
userdebug_or_eng(`
|
||||
app_domain(debug_camera_app)
|
||||
net_domain(debug_camera_app)
|
||||
|
||||
allow debug_camera_app activity_service:service_manager find;
|
||||
allow debug_camera_app activity_task_service:service_manager find;
|
||||
allow debug_camera_app app_api_service:service_manager find;
|
||||
allow debug_camera_app audioserver_service:service_manager find;
|
||||
allow debug_camera_app batterystats_service:service_manager find;
|
||||
allow debug_camera_app cameraserver_service:service_manager find;
|
||||
allow debug_camera_app device_policy_service:service_manager find;
|
||||
allow debug_camera_app device_state_service:service_manager find;
|
||||
allow debug_camera_app gpu_service:service_manager find;
|
||||
allow debug_camera_app mediaextractor_service:service_manager find;
|
||||
allow debug_camera_app mediametrics_service:service_manager find;
|
||||
allow debug_camera_app mediaserver_service:service_manager find;
|
||||
allow debug_camera_app powerstats_service:service_manager find;
|
||||
allow debug_camera_app sensorservice_service:service_manager find;
|
||||
allow debug_camera_app thermal_service:service_manager find;
|
||||
allow debug_camera_app trust_service:service_manager find;
|
||||
allow debug_camera_app vibrator_manager_service:service_manager find;
|
||||
allow debug_camera_app virtual_device_native_service:service_manager find;
|
||||
|
||||
# Allows GCA_Eng & GCA-Next to access the PowerHAL.
|
||||
hal_client_domain(debug_camera_app, hal_power)
|
||||
|
|
|
@ -3,12 +3,12 @@ typeattribute google_camera_app coredomain;
|
|||
app_domain(google_camera_app)
|
||||
net_domain(google_camera_app)
|
||||
|
||||
#allow google_camera_app app_api_service:service_manager find;
|
||||
#allow google_camera_app audioserver_service:service_manager find;
|
||||
#allow google_camera_app cameraserver_service:service_manager find;
|
||||
#allow google_camera_app mediaextractor_service:service_manager find;
|
||||
#allow google_camera_app mediametrics_service:service_manager find;
|
||||
#allow google_camera_app mediaserver_service:service_manager find;
|
||||
allow google_camera_app app_api_service:service_manager find;
|
||||
allow google_camera_app audioserver_service:service_manager find;
|
||||
allow google_camera_app cameraserver_service:service_manager find;
|
||||
allow google_camera_app mediaextractor_service:service_manager find;
|
||||
allow google_camera_app mediametrics_service:service_manager find;
|
||||
allow google_camera_app mediaserver_service:service_manager find;
|
||||
|
||||
# Allows GCA to access the PowerHAL.
|
||||
hal_client_domain(google_camera_app, hal_power)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# GCARelease and GCADogfood.
|
||||
|
||||
# Allows GCA to acccess the GXP device & properties.
|
||||
#allow google_camera_app gxp_device:chr_file rw_file_perms;
|
||||
allow google_camera_app gxp_device:chr_file rw_file_perms;
|
||||
get_prop(google_camera_app, vendor_gxp_prop)
|
||||
|
||||
# Allows GCA to find and access the EdgeTPU.
|
||||
#allow google_camera_app edgetpu_app_service:service_manager find;
|
||||
#allow google_camera_app edgetpu_device:chr_file { getattr read write ioctl map };
|
||||
allow google_camera_app edgetpu_app_service:service_manager find;
|
||||
allow google_camera_app edgetpu_device:chr_file { read write ioctl };
|
||||
|
||||
# Allows GCA to access the hw_jpeg /dev/video12.
|
||||
#allow google_camera_app hw_jpg_device:chr_file rw_file_perms;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <android-base/properties.h>
|
||||
#include <dirent.h>
|
||||
#include <dump/pixel_dump.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
@ -38,8 +39,9 @@ static void copyDirectory(const std::string &source,
|
|||
if (dir == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mkdir(outputDir.c_str(), 0777) == -1) {
|
||||
struct stat st;
|
||||
if (!(stat(outputDir.c_str(), &st) == 0 && S_ISDIR(st.st_mode)) &&
|
||||
mkdir(outputDir.c_str(), 0777) == -1) {
|
||||
closedir(dir);
|
||||
return;
|
||||
}
|
||||
|
@ -53,8 +55,6 @@ static void copyDirectory(const std::string &source,
|
|||
|
||||
std::string sourcePath = source + "/" + entryName;
|
||||
std::string destPath = outputDir + "/" + entryName;
|
||||
|
||||
struct stat st;
|
||||
if (stat(sourcePath.c_str(), &st) == 0) {
|
||||
if (S_ISDIR(st.st_mode))
|
||||
copyDirectory(sourcePath, destPath);
|
||||
|
@ -66,6 +66,58 @@ static void copyDirectory(const std::string &source,
|
|||
return;
|
||||
}
|
||||
|
||||
int compareFileExtensions(const struct dirent **a, const struct dirent **b) {
|
||||
int num_a, num_b;
|
||||
sscanf((*a)->d_name, "rawbinlog.out.%d", &num_a);
|
||||
sscanf((*b)->d_name, "rawbinlog.out.%d", &num_b);
|
||||
|
||||
return num_a - num_b;
|
||||
}
|
||||
|
||||
void dumpLogsAscending(const char* SrcDir, const char* DestDir, int limit, const char* prefix) {
|
||||
|
||||
struct dirent **dirent_list = NULL;
|
||||
int num_entries = scandir(SrcDir, &dirent_list, 0, (int (*)(const struct dirent **, const struct dirent **)) alphasort);
|
||||
if (!dirent_list) {
|
||||
printf("Unable to scan dir: %s.\n", SrcDir);
|
||||
return;
|
||||
} else if (num_entries <= 0) {
|
||||
printf("No file is found.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (access(DestDir, R_OK)) {
|
||||
printf("Unable to find folder: %s\n", DestDir);
|
||||
return;
|
||||
}
|
||||
|
||||
qsort(dirent_list, num_entries, sizeof(struct dirent *), (int (*)(const void *, const void *)) compareFileExtensions);
|
||||
|
||||
int copiedFiles = 0;
|
||||
|
||||
for (int i = 0 ; i < num_entries; i++) {
|
||||
|
||||
if (0 != strncmp(dirent_list[i]->d_name, prefix, strlen(prefix))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((copiedFiles >= limit) && (limit != -1)) {
|
||||
printf("Skipped %s\n", dirent_list[i]->d_name);
|
||||
continue;
|
||||
}
|
||||
|
||||
copiedFiles++;
|
||||
copyFile(concatenatePath(SrcDir, dirent_list[i]->d_name).c_str(), concatenatePath(DestDir, dirent_list[i]->d_name).c_str());
|
||||
}
|
||||
|
||||
while (num_entries--) {
|
||||
free(dirent_list[num_entries]);
|
||||
}
|
||||
|
||||
free(dirent_list);
|
||||
return;
|
||||
}
|
||||
|
||||
int main() {
|
||||
if(!::android::base::GetBoolProperty("vendor.gps.aol.enabled", false)) {
|
||||
printf("vendor.gps.aol.enabled is false. gps logging is not running.\n");
|
||||
|
@ -74,20 +126,32 @@ int main() {
|
|||
int maxFileNum = ::android::base::GetIntProperty(GPS_LOG_NUMBER_PROPERTY, 20);
|
||||
std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "gps");
|
||||
if (mkdir(outputDir.c_str(), 0777) == -1) {
|
||||
printf("Unable to create folder: %s\n", outputDir.c_str());
|
||||
return 0;
|
||||
printf("Unable to create folder: %s\n", outputDir.c_str());
|
||||
return 0;
|
||||
}
|
||||
if (!::android::base::GetBoolProperty("vendor.gps.aol.collect.thinmd",
|
||||
false)) {
|
||||
printf("vendor.gps.aol.collect.thinmd is false. Collecting fils as "
|
||||
"legacy Pixel.\n");
|
||||
dumpLogs(GPS_TMP_LOG_DIRECTORY, outputDir.c_str(), 1, GPS_LOG_PREFIX);
|
||||
dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), 3, GPS_MCU_LOG_PREFIX);
|
||||
dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), maxFileNum,
|
||||
GPS_LOG_PREFIX);
|
||||
dumpLogs(GPS_MALLOC_LOG_DIRECTORY, outputDir.c_str(), 1,
|
||||
GPS_MALLOC_LOG_PREFIX);
|
||||
dumpLogsAscending(GPS_LOG_DIRECTORY, outputDir.c_str(), 5,
|
||||
GPS_RAWLOG_PREFIX);
|
||||
dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), 18,
|
||||
GPS_MEMDUMP_LOG_PREFIX);
|
||||
} else {
|
||||
printf("vendor.gps.aol.collect.thinmd is true. Collecting fils as thin "
|
||||
"modem.\n");
|
||||
copyDirectory(GPS_LOG_DIRECTORY, outputDir.c_str());
|
||||
}
|
||||
|
||||
dumpLogs(GPS_TMP_LOG_DIRECTORY, outputDir.c_str(), 1, GPS_LOG_PREFIX);
|
||||
dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), 3, GPS_MCU_LOG_PREFIX);
|
||||
dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), maxFileNum, GPS_LOG_PREFIX);
|
||||
dumpLogs(GPS_MALLOC_LOG_DIRECTORY, outputDir.c_str(), 1, GPS_MALLOC_LOG_PREFIX);
|
||||
if (access(GPS_VENDOR_CHIP_INFO, F_OK) == 0) {
|
||||
copyFile(GPS_VENDOR_CHIP_INFO, concatenatePath(outputDir.c_str(), "chip.info").c_str());
|
||||
copyFile(GPS_VENDOR_CHIP_INFO,
|
||||
concatenatePath(outputDir.c_str(), "chip.info").c_str());
|
||||
}
|
||||
dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), maxFileNum, GPS_RAWLOG_PREFIX);
|
||||
dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), 18, GPS_MEMDUMP_LOG_PREFIX);
|
||||
copyDirectory(GPS_RESOURCE_DIRECTORY, concatenatePath(outputDir.c_str(), "resource"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,3 +24,6 @@ allow hal_gnss_pixel vendor_gps_file:fifo_file create_file_perms;
|
|||
# Allow access ssrdump information
|
||||
allow hal_gnss_pixel sscoredump_vendor_data_crashinfo_file:file r_file_perms;
|
||||
allow hal_gnss_pixel sscoredump_vendor_data_crashinfo_file:dir r_dir_perms;
|
||||
|
||||
# Allow pixel gnss access vendor_gps_file
|
||||
allow hal_gnss_pixel vendor_gps_file:file create_file_perms;
|
||||
|
|
10
gril/aidl/2.1/compatibility_matrix.xml
Normal file
10
gril/aidl/2.1/compatibility_matrix.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<compatibility-matrix version="1.0" type="framework">
|
||||
<hal format="aidl" optional="true">
|
||||
<name>vendor.google.radio_ext</name>
|
||||
<version>3</version>
|
||||
<interface>
|
||||
<name>IRadioExt</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</compatibility-matrix>
|
4
gril/aidl/2.1/gril_aidl.mk
Normal file
4
gril/aidl/2.1/gril_aidl.mk
Normal file
|
@ -0,0 +1,4 @@
|
|||
PRODUCT_PACKAGES += vendor.google.radioext@1.0-service
|
||||
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/gril/aidl/2.1/compatibility_matrix.xml
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/gril/aidl/2.1/sepolicy
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/gril/common/sepolicy
|
1
gril/aidl/2.1/sepolicy/file_contexts
Normal file
1
gril/aidl/2.1/sepolicy/file_contexts
Normal file
|
@ -0,0 +1 @@
|
|||
/vendor/bin/hw/vendor\.google\.radioext@1\.0-service u:object_r:hal_aidl_radio_ext_exec:s0
|
4
gril/aidl/2.1/sepolicy/grilservice_app.te
Normal file
4
gril/aidl/2.1/sepolicy/grilservice_app.te
Normal file
|
@ -0,0 +1,4 @@
|
|||
# allow grilservice_app to find hal_radio_ext_service
|
||||
allow grilservice_app hal_radio_ext_service:service_manager find;
|
||||
binder_call(grilservice_app, hal_aidl_radio_ext)
|
||||
binder_call(grilservice_app, twoshay)
|
36
gril/aidl/2.1/sepolicy/hal_aidl_radio_ext.te
Normal file
36
gril/aidl/2.1/sepolicy/hal_aidl_radio_ext.te
Normal file
|
@ -0,0 +1,36 @@
|
|||
# hal_aidl_radio_ext domain
|
||||
type hal_aidl_radio_ext, domain;
|
||||
type hal_aidl_radio_ext_exec, vendor_file_type, exec_type, file_type;
|
||||
|
||||
init_daemon_domain(hal_aidl_radio_ext)
|
||||
|
||||
get_prop(hal_aidl_radio_ext, hwservicemanager_prop)
|
||||
get_prop(hal_aidl_radio_ext, telephony_modemtype_prop)
|
||||
set_prop(hal_aidl_radio_ext, vendor_gril_prop)
|
||||
|
||||
binder_call(hal_aidl_radio_ext, servicemanager)
|
||||
binder_call(hal_aidl_radio_ext, grilservice_app)
|
||||
binder_call(hal_aidl_radio_ext, hal_bluetooth_btlinux)
|
||||
|
||||
add_service(hal_aidl_radio_ext, hal_radio_ext_service)
|
||||
|
||||
# RW /dev/oem_ipc0
|
||||
allow hal_aidl_radio_ext radio_device:chr_file rw_file_perms;
|
||||
|
||||
# RW MIPI Freq files
|
||||
allow hal_aidl_radio_ext radio_vendor_data_file:dir create_dir_perms;
|
||||
allow hal_aidl_radio_ext radio_vendor_data_file:file create_file_perms;
|
||||
|
||||
# Bluetooth
|
||||
allow hal_aidl_radio_ext hal_bluetooth_coexistence_hwservice:hwservice_manager find;
|
||||
allow hal_aidl_radio_ext hal_bluetooth_coexistence_service:service_manager find;
|
||||
|
||||
# Allow access to the backlight driver to set ssc_mode
|
||||
allow hal_aidl_radio_ext sysfs_leds:dir search;
|
||||
allow hal_aidl_radio_ext sysfs_leds:file rw_file_perms;
|
||||
|
||||
# legacy/zuma/vendor
|
||||
allow hal_aidl_radio_ext sysfs_display:file rw_file_perms;
|
||||
|
||||
# Allow access to read display port info
|
||||
allow hal_aidl_radio_ext sysfs:file r_file_perms;
|
2
gril/aidl/2.1/sepolicy/hal_camera_default.te
Normal file
2
gril/aidl/2.1/sepolicy/hal_camera_default.te
Normal file
|
@ -0,0 +1,2 @@
|
|||
# allow hal_camera_default to binder call hal_aidl_radio_ext
|
||||
binder_call(hal_camera_default, hal_aidl_radio_ext);
|
2
gril/aidl/2.1/sepolicy/twoshay.te
Normal file
2
gril/aidl/2.1/sepolicy/twoshay.te
Normal file
|
@ -0,0 +1,2 @@
|
|||
# allow twoshay to binder call hal_aidl_radio_ext
|
||||
binder_call(twoshay, hal_aidl_radio_ext)
|
|
@ -2,3 +2,5 @@
|
|||
allow grilservice_app hal_radio_ext_service:service_manager find;
|
||||
# allow grilservice_app to binder call hal_radioext_default
|
||||
binder_call(grilservice_app, hal_radioext_default)
|
||||
# allow grilservice_app to binder call twoshay
|
||||
binder_call(grilservice_app, twoshay)
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# Allow Tachyon service to access the GXP device and read GXP properties.
|
||||
allow edgetpu_tachyon_server gxp_device:chr_file rw_file_perms;
|
||||
get_prop(edgetpu_tachyon_server, vendor_gxp_prop)
|
||||
|
||||
# Allow tachyon service to log to stats service for reporting metrics.
|
||||
allow edgetpu_tachyon_server fwk_stats_service:service_manager find;
|
||||
binder_call(edgetpu_tachyon_server, system_server);
|
||||
|
|
10
input/gia/aidl/compatibility_matrix.xml
Normal file
10
input/gia/aidl/compatibility_matrix.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<compatibility-matrix type="framework" version="1.0">
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.input.gia.core</name>
|
||||
<interface>
|
||||
<name>IGiaService</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<version>1</version>
|
||||
</hal>
|
||||
</compatibility-matrix>
|
10
input/gia/aidl/manifest.xml
Normal file
10
input/gia/aidl/manifest.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<manifest type="device" version="1.0">
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.input.gia.core</name>
|
||||
<interface>
|
||||
<name>IGiaService</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<version>1</version>
|
||||
</hal>
|
||||
</manifest>
|
11
input/gia/gia.mk
Normal file
11
input/gia/gia.mk
Normal file
|
@ -0,0 +1,11 @@
|
|||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/input/gia/sepolicy
|
||||
|
||||
PRODUCT_PACKAGES += gia
|
||||
PRODUCT_PACKAGES += com.google.input.gia.giaservicemanager
|
||||
|
||||
PRODUCT_SOONG_NAMESPACES += vendor/google/interfaces
|
||||
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
|
2
input/gia/sepolicy/attributes
Normal file
2
input/gia/sepolicy/attributes
Normal file
|
@ -0,0 +1,2 @@
|
|||
# This macro produces: define hal_gia, hal_gia_client, hal_gia_server
|
||||
hal_attribute(gia)
|
2
input/gia/sepolicy/file_contexts
Normal file
2
input/gia/sepolicy/file_contexts
Normal file
|
@ -0,0 +1,2 @@
|
|||
# chmod +x in SEPolicy language
|
||||
/vendor/bin/gia u:object_r:gia_exec:s0
|
25
input/gia/sepolicy/gia.te
Normal file
25
input/gia/sepolicy/gia.te
Normal file
|
@ -0,0 +1,25 @@
|
|||
# SEPolicies for GIA (Google Input interface Abstraction layer)
|
||||
type gia, domain;
|
||||
type gia_exec, exec_type, vendor_file_type, file_type;
|
||||
|
||||
# Macro transferring gia_exec to the gia domain
|
||||
init_daemon_domain(gia)
|
||||
|
||||
# let this domain use the hal service
|
||||
hal_client_domain(gia, hal_gia)
|
||||
# allow binder communication with service_manager
|
||||
binder_use(gia)
|
||||
|
||||
# let this domain serve the hal service
|
||||
hal_server_domain(gia, hal_gia)
|
||||
|
||||
# allow gia for accessing touch related system file-nodes
|
||||
allow gia sysfs_touch_gti:dir r_dir_perms;
|
||||
allow gia sysfs_touch_gti:file rw_file_perms;
|
||||
|
||||
# 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)
|
8
input/gia/sepolicy/hal_gia.te
Normal file
8
input/gia/sepolicy/hal_gia.te
Normal file
|
@ -0,0 +1,8 @@
|
|||
# allow binder connection from client to server
|
||||
binder_call(hal_gia_client, hal_gia_server)
|
||||
|
||||
# allow client to find the service & allow server to register the service
|
||||
hal_attribute_service(hal_gia, hal_gia_service)
|
||||
|
||||
# allow binder communication from server to service_manager
|
||||
binder_use(hal_gia_server)
|
2
input/gia/sepolicy/service.te
Normal file
2
input/gia/sepolicy/service.te
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Declares GIA related services
|
||||
type hal_gia_service, hal_service_type, protected_service, service_manager_type;
|
2
input/gia/sepolicy/service_contexts
Normal file
2
input/gia/sepolicy/service_contexts
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Attaches GIA services to the cooresponding SEPolicy group
|
||||
com.google.input.gia.core.IGiaService/default u:object_r:hal_gia_service:s0
|
21
interrupts/Android.bp
Normal file
21
interrupts/Android.bp
Normal file
|
@ -0,0 +1,21 @@
|
|||
package {
|
||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "dump_interrupts_traces",
|
||||
srcs: ["traces/dump_interrupts_traces.cpp"],
|
||||
init_rc: ["init.interrupts.rc"],
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libdump",
|
||||
"liblog",
|
||||
],
|
||||
vendor: true,
|
||||
relative_install_path: "dump",
|
||||
}
|
22
interrupts/init.interrupts.rc
Normal file
22
interrupts/init.interrupts.rc
Normal file
|
@ -0,0 +1,22 @@
|
|||
on init
|
||||
# With permissions 666, trace was not captured in the bugreport.
|
||||
# Apply relaxed permissions.
|
||||
chmod 777 /sys/kernel/tracing/instances/irq_gia_google
|
||||
chmod 777 /sys/kernel/tracing/instances/irq_gia_google/trace
|
||||
chown system system /sys/kernel/tracing/instances/irq_gia_google
|
||||
chown system system /sys/kernel/tracing/instances/irq_gia_google/trace
|
||||
|
||||
# There are some very high frequency IRQ events happening all the time. Tracing
|
||||
# them is not absolute necessity, but a flood of them is noise for more interesting
|
||||
# events that we want to capture. All these high frequency IRQs have virq < 11.
|
||||
write /sys/kernel/tracing/instances/irq_gia_google/events/irq/filter "irq > 11"
|
||||
|
||||
# Keep the buffer size small. This size is practically enough for debug purpose.
|
||||
# Having low size helps because this entire buffer gets dumped in bugreport.
|
||||
# Having a large size can impact bugreport size and time it takes to pack/unpack.
|
||||
write /sys/kernel/tracing/instances/irq_gia_google/buffer_size_kb 16
|
||||
|
||||
# Reduce some GIA events from interrupt handler
|
||||
write /sys/kernel/tracing/instances/irq_gia_google/events/irq_gia/gia_get_power/enable 0
|
||||
write /sys/kernel/tracing/instances/irq_gia_google/events/irq_gia/gia_put_power/enable 0
|
||||
write /sys/kernel/tracing/instances/irq_gia_google/events/irq_gia/gia_irq_eoi/enable 0
|
3
interrupts/interrupts.mk
Normal file
3
interrupts/interrupts.mk
Normal file
|
@ -0,0 +1,3 @@
|
|||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/interrupts/traces/sepolicy
|
||||
|
||||
PRODUCT_PACKAGES += dump_interrupts_traces
|
30
interrupts/traces/dump_interrupts_traces.cpp
Normal file
30
interrupts/traces/dump_interrupts_traces.cpp
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* 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() {
|
||||
std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "interrupts");
|
||||
if (mkdir(outputDir.c_str(), 0777) == -1) {
|
||||
printf("Unable to create folder: %s\n", outputDir.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
copyFile("/sys/kernel/tracing/instances/irq_gia_google/trace",
|
||||
concatenatePath(outputDir.c_str(), "interrupts_trace").c_str());
|
||||
|
||||
return 0;
|
||||
}
|
7
interrupts/traces/sepolicy/dump_interrupts_traces.te
Normal file
7
interrupts/traces/sepolicy/dump_interrupts_traces.te
Normal file
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
pixel_bugreport(dump_interrupts_traces)
|
||||
|
||||
allow dump_interrupts_traces radio_vendor_data_file:dir { search add_name create write };
|
||||
allow dump_interrupts_traces radio_vendor_data_file:file { getattr create write open };
|
||||
allow dump_interrupts_traces debugfs_tracing_instances:dir search;
|
||||
allow dump_interrupts_traces tracefs_instances_interrupts:file { getattr read open };
|
2
interrupts/traces/sepolicy/file.te
Normal file
2
interrupts/traces/sepolicy/file.te
Normal file
|
@ -0,0 +1,2 @@
|
|||
#
|
||||
type tracefs_instances_interrupts, sysfs_type, fs_type;
|
1
interrupts/traces/sepolicy/file_contexts
Normal file
1
interrupts/traces/sepolicy/file_contexts
Normal file
|
@ -0,0 +1 @@
|
|||
/vendor/bin/dump/dump_interrupts_traces u:object_r:dump_interrupts_traces_exec:s0
|
1
interrupts/traces/sepolicy/genfs_contexts
Normal file
1
interrupts/traces/sepolicy/genfs_contexts
Normal file
|
@ -0,0 +1 @@
|
|||
genfscon tracefs /instances/irq_gia_google/trace u:object_r:tracefs_instances_interrupts:s0
|
21
mailbox/Android.bp
Normal file
21
mailbox/Android.bp
Normal file
|
@ -0,0 +1,21 @@
|
|||
package {
|
||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "dump_mailbox",
|
||||
srcs: ["dump/dump_mailbox.cpp"],
|
||||
init_rc: ["init.mailbox.rc"],
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libdump",
|
||||
"liblog",
|
||||
],
|
||||
vendor: true,
|
||||
relative_install_path: "dump",
|
||||
}
|
32
mailbox/dump/dump_mailbox.cpp
Normal file
32
mailbox/dump/dump_mailbox.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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() {
|
||||
std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "mailbox");
|
||||
if (mkdir(outputDir.c_str(), 0777) == -1) {
|
||||
printf("Unable to create folder: %s\n", outputDir.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
copyFile("/sys/kernel/tracing/instances/goog_cpm_mailbox/trace",
|
||||
concatenatePath(outputDir.c_str(), "goog_cpm_mailbox_trace").c_str());
|
||||
copyFile("/sys/kernel/tracing/instances/goog_nq_mailbox/trace",
|
||||
concatenatePath(outputDir.c_str(), "goog_nq_mailbox_trace").c_str());
|
||||
|
||||
return 0;
|
||||
}
|
7
mailbox/dump/sepolicy/dump_mailbox.te
Normal file
7
mailbox/dump/sepolicy/dump_mailbox.te
Normal file
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
pixel_bugreport(dump_mailbox)
|
||||
allow dump_mailbox radio_vendor_data_file:dir create_dir_perms;
|
||||
allow dump_mailbox radio_vendor_data_file:file create_file_perms;
|
||||
allow dump_mailbox debugfs_tracing_instances:file r_file_perms;
|
||||
allow dump_mailbox debugfs_tracing_instances:dir search;
|
||||
allow dump_mailbox debugfs_tracing_instances_mailbox:file r_file_perms;
|
2
mailbox/dump/sepolicy/file.te
Normal file
2
mailbox/dump/sepolicy/file.te
Normal file
|
@ -0,0 +1,2 @@
|
|||
#
|
||||
type debugfs_tracing_instances_mailbox, sysfs_type, fs_type;
|
1
mailbox/dump/sepolicy/file_contexts
Normal file
1
mailbox/dump/sepolicy/file_contexts
Normal file
|
@ -0,0 +1 @@
|
|||
/vendor/bin/dump/dump_mailbox u:object_r:dump_mailbox_exec:s0
|
2
mailbox/dump/sepolicy/genfs_contexts
Normal file
2
mailbox/dump/sepolicy/genfs_contexts
Normal file
|
@ -0,0 +1,2 @@
|
|||
genfscon tracefs /instances/goog_cpm_mailbox/trace u:object_r:debugfs_tracing_instances_mailbox:s0
|
||||
genfscon tracefs /instances/goog_nq_mailbox/trace u:object_r:debugfs_tracing_instances_mailbox:s0
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue