xref: /aosp_15_r20/art/dexopt_chroot_setup/README.md (revision 795d594fd825385562da6b089ea9b2033f3abf5a)
1*795d594fSAndroid Build Coastguard Worker## dexopt_chroot_setup
2*795d594fSAndroid Build Coastguard Worker
3*795d594fSAndroid Build Coastguard Workerdexopt_chroot_setup is a component of ART Service. It sets up the chroot
4*795d594fSAndroid Build Coastguard Workerenvironment for Pre-reboot Dexopt, to dexopt apps on a best-effort basis before
5*795d594fSAndroid Build Coastguard Workerthe reboot after a Mainline update or an OTA update is downloaded, to support
6*795d594fSAndroid Build Coastguard Workerseamless updates.
7*795d594fSAndroid Build Coastguard Worker
8*795d594fSAndroid Build Coastguard WorkerIt requires elevated permissions that are not available to system_server, such
9*795d594fSAndroid Build Coastguard Workeras mounting filesystems. It publishes a binder interface that is internal to ART
10*795d594fSAndroid Build Coastguard WorkerService's Java code.
11*795d594fSAndroid Build Coastguard Worker
12*795d594fSAndroid Build Coastguard Worker### Pre-reboot Dexopt file structure
13*795d594fSAndroid Build Coastguard Worker
14*795d594fSAndroid Build Coastguard Worker#### Overview
15*795d594fSAndroid Build Coastguard Worker
16*795d594fSAndroid Build Coastguard Worker```
17*795d594fSAndroid Build Coastguard Worker/mnt/pre_reboot_dexopt
18*795d594fSAndroid Build Coastguard Worker|-- chroot
19*795d594fSAndroid Build Coastguard Worker|   |-- system_ext
20*795d594fSAndroid Build Coastguard Worker|   |-- vendor
21*795d594fSAndroid Build Coastguard Worker|   |-- product
22*795d594fSAndroid Build Coastguard Worker|   |-- data
23*795d594fSAndroid Build Coastguard Worker|   |-- mnt
24*795d594fSAndroid Build Coastguard Worker|   |   |-- expand
25*795d594fSAndroid Build Coastguard Worker|   |   `-- artd_tmp
26*795d594fSAndroid Build Coastguard Worker|   |-- dev
27*795d594fSAndroid Build Coastguard Worker|   |-- proc
28*795d594fSAndroid Build Coastguard Worker|   |-- sys
29*795d594fSAndroid Build Coastguard Worker|   |-- metadata
30*795d594fSAndroid Build Coastguard Worker|   |-- apex
31*795d594fSAndroid Build Coastguard Worker|   `-- linkerconfig
32*795d594fSAndroid Build Coastguard Worker`-- mount_tmp
33*795d594fSAndroid Build Coastguard Worker```
34*795d594fSAndroid Build Coastguard Worker
35*795d594fSAndroid Build Coastguard Worker#### `/mnt/pre_reboot_dexopt`
36*795d594fSAndroid Build Coastguard Worker
37*795d594fSAndroid Build Coastguard WorkerThe root directory for Pre-reboot Dexopt, prepared by `init`.
38*795d594fSAndroid Build Coastguard Worker
39*795d594fSAndroid Build Coastguard Worker#### `/mnt/pre_reboot_dexopt/chroot`
40*795d594fSAndroid Build Coastguard Worker
41*795d594fSAndroid Build Coastguard WorkerThe root directory of the chroot environment for Pre-reboot Dexopt. It is the
42*795d594fSAndroid Build Coastguard Workermount point of the `system` image. Created by `dexopt_chroot_setup`, and only
43*795d594fSAndroid Build Coastguard Workerexists for the duration of the Pre-reboot Dexopt.
44*795d594fSAndroid Build Coastguard Worker
45*795d594fSAndroid Build Coastguard Worker#### `/mnt/pre_reboot_dexopt/chroot/{system_ext,vendor,product}`
46*795d594fSAndroid Build Coastguard Worker
47*795d594fSAndroid Build Coastguard WorkerMount points of other readonly images.
48*795d594fSAndroid Build Coastguard Worker
49*795d594fSAndroid Build Coastguard Worker#### `/mnt/pre_reboot_dexopt/chroot/{data,mnt/expand,dev,proc,sys,metadata}`
50*795d594fSAndroid Build Coastguard Worker
51*795d594fSAndroid Build Coastguard WorkerSame as the corresponding directories outside of chroot. These are read-write
52*795d594fSAndroid Build Coastguard Workermounts.
53*795d594fSAndroid Build Coastguard Worker
54*795d594fSAndroid Build Coastguard Worker#### `/mnt/pre_reboot_dexopt/chroot/mnt/artd_tmp`
55*795d594fSAndroid Build Coastguard Worker
56*795d594fSAndroid Build Coastguard WorkerAn empty directory for storing temporary files during Pre-reboot Dexopt, managed
57*795d594fSAndroid Build Coastguard Workerby `artd`.
58*795d594fSAndroid Build Coastguard Worker
59*795d594fSAndroid Build Coastguard Worker#### `/mnt/pre_reboot_dexopt/chroot/apex`
60*795d594fSAndroid Build Coastguard Worker
61*795d594fSAndroid Build Coastguard WorkerFor holding the apex mount points used in the chroot environment, managed by
62*795d594fSAndroid Build Coastguard Worker`apexd`. Note that this is not the same as `/apex` outside of chroot.
63*795d594fSAndroid Build Coastguard Worker
64*795d594fSAndroid Build Coastguard Worker#### `/mnt/pre_reboot_dexopt/chroot/linkerconfig`
65*795d594fSAndroid Build Coastguard Worker
66*795d594fSAndroid Build Coastguard WorkerFor holding the linker config used in the chroot environment, managed by
67*795d594fSAndroid Build Coastguard Worker`linkerconfig`. Note that this is not the same as `/linkerconfig` outside of
68*795d594fSAndroid Build Coastguard Workerchroot.
69*795d594fSAndroid Build Coastguard Worker
70*795d594fSAndroid Build Coastguard Worker#### `/mnt/pre_reboot_dexopt/mount_tmp`
71*795d594fSAndroid Build Coastguard Worker
72*795d594fSAndroid Build Coastguard WorkerAn ephemeral directory used as a temporary mount point for bind-mounting
73*795d594fSAndroid Build Coastguard Workerdirectories "slave+shared".
74