Skip to content

Commit 59f013f

Browse files
committed
Avoid mkdir -m too, to improve backward compat of Android ADB setup
Without this, some older devices (API 22) were failing during automated setup. That was somewhat hidden by them supporting user certificates, but still it would be better to use system certificates properly anyway.
1 parent cc854dc commit 59f013f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/interceptors/android/adb-commands.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,9 @@ export async function injectSystemCertificate(
316316
317317
# Create a separate temp directory, to hold the current certificates
318318
# Without this, when we add the mount we can't read the current certs anymore.
319-
mkdir -p -m 700 /data/local/tmp/htk-ca-copy
319+
mkdir -p /data/local/tmp/htk-ca-copy
320+
chown 700 /data/local/tmp/htk-ca-copy
321+
rm -rf /data/local/tmp/htk-ca-copy/*
320322
321323
# Copy out the existing certificates
322324
if [ -d "/apex/com.android.conscrypt/cacerts" ]; then

0 commit comments

Comments
 (0)