microdroid: init.rc: add tracefs for debug boot

Bug: 224495502
Signed-off-by: Oleg Matcovschi <omatcovschi@google.com>
Change-Id: Ie91595d9363c785497d225f7e882d4acf0d3a2bc
This commit is contained in:
Oleg Matcovschi 2022-03-14 06:29:25 -07:00
parent f933141681
commit 98739483c9
1 changed files with 10 additions and 0 deletions

View File

@ -83,6 +83,10 @@ on init
setprop ro.debuggable ${ro.boot.microdroid.debuggable:-0}
on init && property:ro.boot.microdroid.debuggable=1
# Mount tracefs (with GID=AID_READTRACEFS)
mount tracefs tracefs /sys/kernel/tracing gid=3012
on init && property:ro.boot.logd.enabled=1
# Start logd before any other services run to ensure we capture all of their logs.
start logd
@ -144,6 +148,12 @@ on post-fs
mkdir /data/misc/authfs 0700 root root
start authfs_service
on late-fs && property:ro.debuggable=1
# Ensure that tracefs has the correct permissions.
# This does not work correctly if it is called in post-fs.
chmod 0755 /sys/kernel/tracing
chmod 0755 /sys/kernel/debug/tracing
on post-fs-data
mark_post_data