Trust Root CA in Android 7

Time: Sep. 2017

System: macOS Sierra 10.12.6

The trick is to disguise a self-signed root certs as a system cert.

Get the file name from CACert.pem

openssl x509 -inform PEM -subject_hash_old -in XXXX.pem | head -1 
// output: e.g.: abc123xxx
cp XXXX.pem abc123xxx.0

Then copy to the system's CA certs folder

adb push abc123xxx.0 /sdcard/
adb shell 
su
mount -o rw,remount /system
cp /sdcard/abc123xxx.0 /system/etc/security/cacerts/

// mount -o rw,remount /system
mount -o ro,remount /system

Reboot the phone to make sure everything works

Thanks to the ideas from this blog: https://blog.jeroenhd.nl/article/android-7-nougat-and-certificate-authorities

However I have to change the mount command for my system.

results matching ""

    No results matching ""