File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -306,11 +306,12 @@ export async function injectSystemCertificate(
306
306
# First we get the Zygote process(es), which launch each app
307
307
ZYGOTE_PID=$(pidof zygote || true)
308
308
ZYGOTE64_PID=$(pidof zygote64 || true)
309
- # N.b. some devices appear to have both!
309
+ Z_PIDS="$ZYGOTE_PID $ZYGOTE64_PID"
310
+ # N.b. some devices appear to have both, some have >1 of each (!)
310
311
311
312
# Apps inherit the Zygote's mounts at startup, so we inject here to ensure all newly
312
313
# started apps will see these certs straight away:
313
- for Z_PID in "$ZYGOTE_PID" "$ZYGOTE64_PID" ; do
314
+ for Z_PID in $Z_PIDS ; do
314
315
if [ -n "$Z_PID" ]; then
315
316
nsenter --mount=/proc/$Z_PID/ns/mnt -- \
316
317
/bin/mount --bind /system/etc/security/cacerts /apex/com.android.conscrypt/cacerts
@@ -323,7 +324,7 @@ export async function injectSystemCertificate(
323
324
324
325
# Get the PID of every process whose parent is one of the Zygotes:
325
326
APP_PIDS=$(
326
- echo "$ZYGOTE_PID $ZYGOTE64_PID" | \
327
+ echo $Z_PIDS | \
327
328
xargs -n1 ps -o 'PID' -P | \
328
329
grep -v PID
329
330
)
You can’t perform that action at this time.
0 commit comments