Last active
September 23, 2020 18:40
-
-
Save trofimovdigital/d1cc3217f9e09511f1b5714ac5b8bed9 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/bash | |
# path to PEM or CRT file | |
IN="/path-to-cert/file.crt" | |
OUT="$(openssl x509 -inform PEM -subject_hash_old -in $IN | head -1).0" | |
cat $IN > $OUT | |
openssl x509 -inform PEM -text -in $IN -out /dev/null >> $OUT | |
# adb root | |
# adb shell mount -o remount,rw /system | |
# adb shell mount -o rw,remount,rw /system | |
adb remount | |
adb push $OUT /system/etc/security/cacerts/ | |
adb shell chmod 644 /system/etc/security/cacerts/$OUT | |
adb reboot | |
rm $OUT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment