RE env for inspecting APKs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
496 B

  1. #!/bin/bash
  2. #
  3. printf "Copying mitm cert to root certs on Android...\n\n"
  4. mkdir -p certs_mitm
  5. cd ./certs_mitm
  6. cp -v ~/.mitmproxy/mitmproxy-ca-cert.cer .
  7. hashed_name=`openssl x509 -inform PEM -subject_hash_old -in mitmproxy-ca-cert.cer | head -1` && cp mitmproxy-ca-cert.cer $hashed_name.0
  8. adb remount
  9. adb push $hashed_name.0 /etc/security/cacerts/
  10. adb shell chmod 644 /etc/security/cacerts/$hashed_name.0
  11. adb reboot
  12. printf "\nFinished copying mitm cert to system certs on Android\n\n"