bootstat: enhance last reboot reason property with file backing
Helps with support of recovery and rollback boot reason history, by also using /metadata/bootstat/persist.sys.boot.reason to file the reboot reason. For now, label this file metadata_bootstat_file. Test: manual Bug: 129007837 Change-Id: Id1d21c404067414847bef14a0c43f70cafe1a3e2
This commit is contained in:
parent
1d896ff5e5
commit
79f9ca6789
@ -118,6 +118,7 @@
|
|||||||
mediaswcodec_tmpfs
|
mediaswcodec_tmpfs
|
||||||
mediaextractor_update_service
|
mediaextractor_update_service
|
||||||
mediaprovider_tmpfs
|
mediaprovider_tmpfs
|
||||||
|
metadata_bootstat_file
|
||||||
metadata_file
|
metadata_file
|
||||||
mnt_product_file
|
mnt_product_file
|
||||||
mnt_vendor_file
|
mnt_vendor_file
|
||||||
|
@ -107,6 +107,7 @@
|
|||||||
mediaswcodec
|
mediaswcodec
|
||||||
mediaswcodec_exec
|
mediaswcodec_exec
|
||||||
mediaswcodec_tmpfs
|
mediaswcodec_tmpfs
|
||||||
|
metadata_bootstat_file
|
||||||
metadata_file
|
metadata_file
|
||||||
mnt_product_file
|
mnt_product_file
|
||||||
mnt_vendor_file
|
mnt_vendor_file
|
||||||
|
@ -98,6 +98,7 @@
|
|||||||
mediaswcodec
|
mediaswcodec
|
||||||
mediaswcodec_exec
|
mediaswcodec_exec
|
||||||
mediaswcodec_tmpfs
|
mediaswcodec_tmpfs
|
||||||
|
metadata_bootstat_file
|
||||||
mnt_product_file
|
mnt_product_file
|
||||||
network_stack
|
network_stack
|
||||||
network_stack_service
|
network_stack_service
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
light_service
|
light_service
|
||||||
linker_prop
|
linker_prop
|
||||||
linkerconfig_file
|
linkerconfig_file
|
||||||
|
metadata_bootstat_file
|
||||||
mnt_pass_through_file
|
mnt_pass_through_file
|
||||||
mock_ota_prop
|
mock_ota_prop
|
||||||
module_sdkextensions_prop
|
module_sdkextensions_prop
|
||||||
|
@ -697,6 +697,7 @@
|
|||||||
/metadata/gsi/ota(/.*)? u:object_r:ota_metadata_file:s0
|
/metadata/gsi/ota(/.*)? u:object_r:ota_metadata_file:s0
|
||||||
/metadata/password_slots(/.*)? u:object_r:password_slot_metadata_file:s0
|
/metadata/password_slots(/.*)? u:object_r:password_slot_metadata_file:s0
|
||||||
/metadata/ota(/.*)? u:object_r:ota_metadata_file:s0
|
/metadata/ota(/.*)? u:object_r:ota_metadata_file:s0
|
||||||
|
/metadata/bootstat(/.*)? u:object_r:metadata_bootstat_file:s0
|
||||||
|
|
||||||
#############################
|
#############################
|
||||||
# asec containers
|
# asec containers
|
||||||
|
@ -15,6 +15,9 @@ get_prop(bootstat, boottime_prop)
|
|||||||
set_prop(bootstat, bootloader_boot_reason_prop)
|
set_prop(bootstat, bootloader_boot_reason_prop)
|
||||||
set_prop(bootstat, system_boot_reason_prop)
|
set_prop(bootstat, system_boot_reason_prop)
|
||||||
set_prop(bootstat, last_boot_reason_prop)
|
set_prop(bootstat, last_boot_reason_prop)
|
||||||
|
allow bootstat metadata_file:dir search;
|
||||||
|
allow bootstat metadata_bootstat_file:dir rw_dir_perms;
|
||||||
|
allow bootstat metadata_bootstat_file:file create_file_perms;
|
||||||
|
|
||||||
# ToDo: TBI move access for the following to a system health HAL
|
# ToDo: TBI move access for the following to a system health HAL
|
||||||
|
|
||||||
|
@ -230,6 +230,8 @@ type password_slot_metadata_file, file_type;
|
|||||||
type apex_metadata_file, file_type;
|
type apex_metadata_file, file_type;
|
||||||
# libsnapshot files within /metadata
|
# libsnapshot files within /metadata
|
||||||
type ota_metadata_file, file_type;
|
type ota_metadata_file, file_type;
|
||||||
|
# property files within /metadata/bootstat
|
||||||
|
type metadata_bootstat_file, file_type;
|
||||||
|
|
||||||
# Type for /dev/cpu_variant:.*.
|
# Type for /dev/cpu_variant:.*.
|
||||||
type dev_cpu_variant, file_type;
|
type dev_cpu_variant, file_type;
|
||||||
|
@ -566,6 +566,8 @@ allow init vendor_shell_exec:file execute;
|
|||||||
# Metadata setup
|
# Metadata setup
|
||||||
allow init vold_metadata_file:dir create_dir_perms;
|
allow init vold_metadata_file:dir create_dir_perms;
|
||||||
allow init vold_metadata_file:file getattr;
|
allow init vold_metadata_file:file getattr;
|
||||||
|
allow init metadata_bootstat_file:dir create_dir_perms;
|
||||||
|
allow init metadata_bootstat_file:file w_file_perms;
|
||||||
|
|
||||||
# Allow init to touch PSI monitors
|
# Allow init to touch PSI monitors
|
||||||
allow init proc_pressure_mem:file { rw_file_perms setattr };
|
allow init proc_pressure_mem:file { rw_file_perms setattr };
|
||||||
|
Loading…
Reference in New Issue
Block a user