From ccb47c5e655e3de2dbdf7ec84db34150ea2d22bf Mon Sep 17 00:00:00 2001 From: ORG_User Date: Sun, 26 May 2024 00:56:40 +0200 Subject: [PATCH] Wiki page ssl changed with summary [[Android] added android 14 "certificate in system"] by Dan --- pages/de/server/services/ssl.txt | 40 +++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/pages/de/server/services/ssl.txt b/pages/de/server/services/ssl.txt index f913553..7b8f270 100644 --- a/pages/de/server/services/ssl.txt +++ b/pages/de/server/services/ssl.txt @@ -160,6 +160,7 @@ hashed_name=`openssl x509 -inform PEM -subject_hash_old -in rootCA.pem | head -1 ls $hashed_name.0 +**Android 13:** adb root adb shell mount -o rw,remount / @@ -169,7 +170,44 @@ adb shell chown root:root /system/etc/security/cacerts/$hashed_name.0 adb shell reboot -Du kannst auch die Magisk-Module [[https://github.com/NVISOsecurity/MagiskTrustUserCerts/releases|MagiskTrustUserCerts]] (Android 13) oder [[https://github.com/nccgroup/ConscryptTrustUserCerts|ConscryptTrustUserCerts]] (Android 14) verwenden, dass das gleiche wie oben macht. +**Android 14 (this only works until a restart):** + +adb root +adb shell mkdir -p -m 700 /data/local/tmp/cacerts +adb shell cp /apex/com.android.conscrypt/cacerts/* /data/local/tmp/cacerts/ +adb shell mount -t tmpfs tmpfs /system/etc/security/cacerts +adb shell mv /data/local/tmp/cacerts/* /system/etc/security/cacerts/ +adb push $hashed_name.0 /system/etc/security/cacerts/ +adb shell chown root:root /system/etc/security/cacerts/* +adb shell chmod 644 /system/etc/security/cacerts/* +adb shell chcon u:object_r:system_file:s0 /system/etc/security/cacerts/* +adb shell + + + +ZYGOTE_PID=$(pidof zygote || true) +ZYGOTE64_PID=$(pidof zygote64 || true) + +for Z_PID in "$ZYGOTE_PID" "$ZYGOTE64_PID"; do + if [ -n "$Z_PID" ]; then + nsenter --mount=/proc/$Z_PID/ns/mnt -- \ + /bin/mount --bind /system/etc/security/cacerts /apex/com.android.conscrypt/cacerts + fi +done + +APP_PIDS=$( + echo "$ZYGOTE_PID $ZYGOTE64_PID" | \ + xargs -n1 ps -o 'PID' -P | \ + grep -v PID +) + +for PID in $APP_PIDS; do + nsenter --mount=/proc/$PID/ns/mnt -- \ + /bin/mount --bind /system/etc/security/cacerts /apex/com.android.conscrypt/cacerts & +done + + +Du kannst auch die Magisk-Module [[https://github.com/NVISOsecurity/MagiskTrustUserCerts/releases|MagiskTrustUserCerts]] (Android 13) oder [[https://github.com/nccgroup/ConscryptTrustUserCerts|ConscryptTrustUserCerts]] (Android 14) verwenden, dass das gleiche quasi wie oben macht. === CA-Zertifikate von Drittanbietern für Firefox verwenden ===