ys1231 / MoveCertificate

支持Android7-14移动证书,兼容magiskv20.4+/kernelsu/APatch, Support Android7-14, compatible with magiskv20.4+/kernelsu/APatch
https://github.com/ys1231/MoveCertificate
Apache License 2.0
703 stars 80 forks source link

Read Description! #20

Closed IamLoot closed 6 months ago

IamLoot commented 6 months ago

Can you please do something that add my certificate into /system/etc/security/cacerts/ directory too. Currently it's only moving certificate to /apex/com.android.conscrypt/cacerts/

I want it to move that my custom certificates to /system/etc/security/cacerts/ this directory too. thank you

caikun233 commented 6 months ago

If you use Magisk. Look for the switch related to Systemless hosts in Magisk settings. After clicking, Magisk should create an empty module named hosts Find this directory /data/adb/modules/hosts/ and create a new directory /system/etc/security/cacerts/ in it. Then put your .0 certificate file in it and restart the device. This should work. In my Android 11 device, I created the /system/media/ path and successfully wrote the bootanimation file to the system, I think this should also apply to cacerts.

IamLoot commented 6 months ago

If you use Magisk. Look for the switch related to Systemless hosts in Magisk settings. After clicking, Magisk should create an empty module named hosts Find this directory /data/adb/modules/hosts/ and create a new directory /system/etc/security/cacerts/ in it. Then put your .0 certificate file in it and restart the device. This should work. In my Android 11 device, I created the /system/media/ path and successfully wrote the bootanimation file to the system, I think this should also apply to cacerts.

Sadly I'm on ksu. Btw Thanks, I will try that too when i switch to magisk

ys1231 commented 6 months ago

This module supports magisk and kernelsu, and its main function is to move certificates. You can modify the moving path to achieve your goal.

IamLoot commented 6 months ago

This module supports magisk and kernelsu, and its main function is to move certificates. You can modify the moving path to achieve your goal.

I added this code after line number 109 on file post-fs-data.sh

cp -u /data/local/tmp/cert/* $MODDIR/certificates

but it's doesn't work. Can you please help me

ys1231 commented 6 months ago

111 lines, 90 lines, have been processed.

IamLoot commented 6 months ago

111 lines, 90 lines, have been processed.

I've added this in _move_customcert function.

cp -f /data/local/tmp/cert/* /system/etc/security/cacerts/

But still it doesn't work 🥲 (I'm on Android 14)

ys1231 commented 6 months ago

Android14, do you still need the directory /system/etc/security/cacerts/? If you have this requirement, just delete if else, and it will be implemented.

IamLoot commented 6 months ago

Android14, do you still need the directory /system/etc/security/cacerts/? If you have this requirement, just delete if else, and it will be implemented.

It worked, thank you!