Created
October 31, 2025 19:38
-
-
Save SmallJoker/0e40174f1f6a495cc955cf96ccc38775 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # This is a script to update the CA certs on your Android smartphone. | |
| # Tested on Android 6. | |
| # 1. Have a look at https://azimut.github.io/blog/adbfun.html | |
| # 2. download the CA certs (pem) files to data/local/tmp/ | |
| # 3. Fill in the "files" variable below with the needed certs | |
| # e.g. 'grep -r "Not Before: " | grep "201" | grep -oE "[0-9a-f]+\.pem' | |
| # 4. Copy this script to your phone: | |
| # adb push android_ca_cert_updater.sh /data/local/tmp/ | |
| # 5. Clicky click on OK | |
| files=$(cat <<EOF | |
| ffa7f1eb | |
| fd08c599 | |
| ....... | |
| EOF | |
| ) | |
| while read -r fn; do | |
| if [ -z "$fn" ]; then | |
| continue | |
| fi | |
| echo "$fn" | |
| am start -n com.android.certinstaller/.CertInstallerMain -a android.intent.action.VIEW -t application/x-x509-ca-cert -d "file:///data/local/tmp/$fn.pem" | |
| sleep 0.2 | |
| input text "$fn" | |
| sleep 1 | |
| # Tap OK here | |
| done <<< "$files" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment