From 1eb3394e9c9ea0d19abf195a60ccbe1c28dd8388 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Tue, 10 May 2022 03:37:18 +0900 Subject: [PATCH] add apex-ready event after post-fs-data Since apexd.status=ready is system-only property, we need a similar or equivalent event or property which non-system APEXes can use to define 'on' trigger actions. Note that services can be started without its own trigger actions by setting 'class'. For example, 'hal'-class services are started 'on boot' automatically. Bug: 202731768 Test: atest CtsInitTestCases Test: atest CtsBluetoothTestCases (cuttlefish's bt apex defines 'on' actions in the APEX config) Change-Id: I6eb62ba8d6e350add2ebafe7da06fcaa57d825ff --- rootdir/init.rc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rootdir/init.rc b/rootdir/init.rc index 8d8da5eda..975fcc0ae 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -538,6 +538,10 @@ on late-init # /data, which in turn can only be loaded when system properties are present. trigger post-fs-data + # APEXes are ready to use. apex-ready is a public trigger similar to apexd.status=ready which + # is a system-private property. + trigger apex-ready + # Should be before netd, but after apex, properties and logging is available. trigger load_bpf_programs @@ -1302,6 +1306,7 @@ on userspace-reboot-fs-remount on userspace-reboot-resume trigger userspace-reboot-fs-remount trigger post-fs-data + trigger apex-ready trigger zygote-start trigger early-boot trigger boot