Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 3.18 KB

File metadata and controls

71 lines (52 loc) · 3.18 KB

中文 | Türkçe

A Magisk/KernelSU/APatch module for moving user certificates to system certificates. Supports Android 7-16. If your phone has an official image, you might need this module. If you compile your own ROM, you can either build it in or manually move it using remount.

Usage

  1. After exporting the certificate, simply push it to your phone and install it normally through system settings, then restart. No format conversion needed.
  2. Can be used with appproxy VPN proxy tool.

Manual Certificate Installation to System Certificate Directory

  • This method will overwrite existing certificates, designed for multiple computers and built-in certificates
  • Normally, this scenario is not needed.
  1. If the certificate has been moved before or built into the source code, you'll find that direct installation through the system doesn't actually install the certificate. This scenario needs to be preserved.

  2. Export the packet capture software certificate and convert it to pem format

  3. Get the certificate hash

# For pem certificates (Android system uses der, so the moved certificate needs to be converted to der)
## 1. Calculate hash
### For OpenSSL versions above 1.0
openssl x509 -inform PEM -subject_hash_old -in cacert.pem
### For OpenSSL versions below 1.0
openssl x509 -inform PEM -subject_hash -in cacert.pem
## 2. Convert to der
openssl x509 -in cacert.pem -outform der -out cacert.der
mv cacert.der 02e06844.0

# For der certificates
## 1. First convert to pem to calculate hash
openssl x509 -in cacert.der -inform der -outform pem -out cacert.pem
openssl x509 -inform PEM -subject_hash_old -in cacert.pem
## 1.1 Or directly calculate der
openssl x509 -in cacert.der -inform der -subject_hash_old -noout
## 2. Rename certificate to hash.0
mv cacert.der 02e06844.0
# Or directly extract the certificate from the user directory after phone installation, no need to worry about calculation and format conversion.

20221109212126575

  1. Manually rename the certificate file (before conversion) to 02e06844.0, or coexist as 02e06844.1
  2. adb push 02e06844.0 /data/local/tmp/cert/
  3. After pushing the certificate to the phone, restart to take effect.

MoveCertificate web

  • A web page for the MoveCertificate module to display the list of installed certificates.
  • It can also view detailed information about certificates installed by the module.
  • Long press to delete installed certificates.

Test Results

2024-02-19_01.27.27

Star History

Star History Chart

References: