How to install HttpCanary Certificate on Android 11 Without Root

Viewed 24300

i want to install the CA certificate which required to use HttpCanary, but my phone says that i can't install in app also i don't know where the CA file that i install. So it needs root to solve that problem. Is there an any way to install without root? Thank You for your answers, sorry for may bad english.

1 Answers

Android 11 (or at least my LineageOS 18.1) is a pain, since all certificates must be installed directly from the Settings App, but HttpCanary doesn't give you the raw certificate file.

I found a Chinese post and followed it with the help of Google Translator.

this is the CA file, you can name it HttpCanary.pem and install the it directly from [Settings > Security > Encryption & Credentials > Install a certificate > CA certificate] but the certificate will only be User Trusted, to make it System Trusted you WILL need root access.

[ROOT REQUIRED FOR THE FOLLOWING STEPS]
To install the certificate and make it System Trusted + make HttpCanary detect it, all you need to do is run these commands using ADB from a computer (The connected phone must have USB Debugging turned on):

adb shell
su
mount -o rw,remount /
cp -f /data/data/com.guoshi.httpcanary/cache/HttpCanary.pem /system/etc/security/cacerts/87bc3517.0
chmod 644 /system/etc/security/cacerts/87bc3517.0
touch /data/data/com.guoshi.httpcanary/cache/HttpCanary.jks
chmod 600 /data/data/com.guoshi.httpcanary/cache/HttpCanary.jks
Related