Commit c0aa391
authored
refactor: self-contained install functions in first-boot.sh (#50)
Each install (gapps, root, arm_translation) is now responsible for its
own reboot + wait + done-marker sequence, in that order. The marker is
only written once adbd has come back, so a container killed mid-reboot
won't leave a "marked done but not applied" state.
- Drop the needs_reboot() helper; the reboot decision is now local to
each install function instead of crossing function boundaries.
- Collapse the duplicate first-boot / post-first-boot branches in main
into one path — only AVD creation is conditional on /data/.first-boot-done.
- install_gapps and install_arm_translation now end with
'adb reboot; adb wait-for-device; touch .<addon>-done', so they are
safe to invoke standalone after the initial first boot when a flag is
flipped on a previously initialized container.
One extra AVD reboot occurs in the rare case where both GAPPS and
ARM_TRANSLATION are enabled in the same pass (~25s), traded for the
cleaner per-function encapsulation.1 parent 00f37c6 commit c0aa391
1 file changed
Lines changed: 12 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
| |||
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
151 | 142 | | |
152 | 143 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
161 | 149 | | |
162 | 150 | | |
163 | 151 | | |
| |||
0 commit comments