File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -310,10 +310,11 @@ export async function injectSystemCertificate(
310
310
311
311
# Apps inherit the Zygote's mounts at startup, so we inject here to ensure all newly
312
312
# started apps will see these certs straight away:
313
- for Z_PID in "$ZYGOTE_PID $ZYGOTE64_PID"; do
314
- # We use 'echo' below to trim spaces
315
- nsenter --mount=/proc/$(echo $Z_PID)/ns/mnt -- \
316
- /bin/mount --bind /system/etc/security/cacerts /apex/com.android.conscrypt/cacerts
313
+ for Z_PID in "$ZYGOTE_PID" "$ZYGOTE64_PID"; do
314
+ if [ -n "$Z_PID" ]; then
315
+ nsenter --mount=/proc/$Z_PID/ns/mnt -- \
316
+ /bin/mount --bind /system/etc/security/cacerts /apex/com.android.conscrypt/cacerts
317
+ fi
317
318
done
318
319
319
320
echo 'Zygote APEX certificates remounted'
You can’t perform that action at this time.
0 commit comments