move trusty dump from gs201 to gs-common

Bug: 244504232
Test: adb bugreport
Change-Id: I0c286f5e98d5a9c5497f7f89dcd58a8dc0c2b572
This commit is contained in:
Adam Shih 2022-09-19 11:27:15 +08:00
parent f1dc313270
commit d76d46457d
6 changed files with 24 additions and 0 deletions

10
trusty/Android.bp Normal file
View File

@ -0,0 +1,10 @@
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
sh_binary {
name: "dump_trusty.sh",
src: "dump_trusty.sh",
vendor: true,
sub_dir: "dump",
}

3
trusty/dump_trusty.sh Normal file
View File

@ -0,0 +1,3 @@
#!/vendor/bin/sh
echo "--- Trusty TEE0 Logs ---"
cat /dev/trusty-log0

View File

@ -0,0 +1 @@
type trusty_log_device, dev_type;

View File

@ -0,0 +1,4 @@
pixel_bugreport(dump_trusty)
allow dump_trusty trusty_log_device:chr_file r_file_perms;
allow dump_trusty vendor_toolbox_exec:file execute_no_trans;

View File

@ -0,0 +1,3 @@
/vendor/bin/dump/dump_trusty\.sh u:object_r:dump_trusty_exec:s0
/dev/trusty-log0 u:object_r:trusty_log_device:s0

3
trusty/trusty.mk Normal file
View File

@ -0,0 +1,3 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/trusty/sepolicy
PRODUCT_PACKAGES += dump_trusty.sh