From 1320668c5291d9053ee3c6ac84e0ed0b7c92584d Mon Sep 17 00:00:00 2001 From: Artur Satayev Date: Tue, 23 Feb 2021 18:57:58 +0000 Subject: [PATCH] Exec_start derive_classpath on post-fs-data. The service parses and merges configs from multiple partitions, defines *CLASSPATH environ variables' values and writes them to file, for init to export. See go/updatable-classpath for more details. Bug: 180105615 Test: manual Change-Id: I60c539a8fef4d690f47704e896f67949ec49db60 --- rootdir/init.rc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index 0e1e98b84..d1e6ee2b8 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -881,9 +881,12 @@ on post-fs-data wait_for_prop apexd.status activated perform_apex_config - # Export *CLASSPATH variables from /etc/classpath - # TODO(b/180105615): export from the generated file instead. - load_exports /etc/classpath + # Define and export *CLASSPATH variables + mkdir /data/system/environ 0700 system system + # Must start before 'odsign', as odsign depends on *CLASSPATH variables + exec_start derive_classpath + load_exports /data/system/environ/classpath + rm /data/system/environ/classpath # Special-case /data/media/obb per b/64566063 mkdir /data/media 0770 media_rw media_rw encryption=None @@ -899,6 +902,7 @@ on post-fs-data # Start the on-device signing daemon, and wait for it to finish, to ensure # ART artifacts are generated if needed. + # Must start after 'derive_classpath' to have *CLASSPATH variables set. exec_start odsign # After apexes are mounted, tell keymaster early boot has ended, so it will