Skip to content

Instantly share code, notes, and snippets.

@floyd-fuh
Created June 27, 2022 13:18
Show Gist options
  • Save floyd-fuh/7a7d4c4aa0d479a1562feb962a579448 to your computer and use it in GitHub Desktop.
Save floyd-fuh/7a7d4c4aa0d479a1562feb962a579448 to your computer and use it in GitHub Desktop.
# see https://httptoolkit.tech/blog/chrome-android-certificate-transparency/
# put your Burp cacert.der in the current working directory!
FINGERPRINT=`openssl x509 -in cacert.der -inform der -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64`
echo "chrome --ignore-certificate-errors-spki-list=$FINGERPRINT" > chrome.sh
adb push chrome.sh /data/local/tmp/chrome.sh
adb shell su -c cp /data/local/tmp/chrome.sh /data/local/chrome-command-line
adb shell su -c cp /data/local/tmp/chrome.sh /data/local/android-webview-command-line
adb shell su -c cp /data/local/tmp/chrome.sh /data/local/webview-command-line
adb shell su -c cp /data/local/tmp/chrome.sh /data/local/content-shell-command-line
adb shell su -c chmod 555 /data/local/chrome-command-line
adb shell su -c chmod 555 /data/local/android-webview-command-line
adb shell su -c chmod 555 /data/local/webview-command-line
adb shell su -c chmod 555 /data/local/content-shell-command-line
adb shell su -c cp /data/local/tmp/chrome.sh /data/local/tmp/chrome-command-line
adb shell su -c cp /data/local/tmp/chrome.sh /data/local/tmp/android-webview-command-line
adb shell su -c cp /data/local/tmp/chrome.sh /data/local/tmp/webview-command-line
adb shell su -c cp /data/local/tmp/chrome.sh /data/local/tmp/content-shell-command-line
adb shell su -c chmod 555 /data/local/tmp/chrome-command-line
adb shell su -c chmod 555 /data/local/tmp/android-webview-command-line
adb shell su -c chmod 555 /data/local/tmp/webview-command-line
adb shell su -c chmod 555 /data/local/tmp/content-shell-command-line
adb shell am force-stop com.android.chrome
#adb shell am start -a "android.intent.action.VIEW" -d "chrome://version" --es "com.android.browser.application_id" "com.android.chrome"
#adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main -d "chrome://version"
@truong0vanchien
Copy link

Hi thanks floyd. I get chrome worked.

@JelmerDeHen
Copy link

JelmerDeHen commented Oct 25, 2022

Nice, I have created a Magisk module to fix this problem.

https://github.com/JelmerDeHen/MagiskBypassCertificateTransparencyError

The README.md also outlines steps for if you have root but no Magisk like you did. You need to also configure debug_app to com.android.chrome on user build variants.

adb shell su -c settings put global debug_app com.android.chrome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment