-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
小米12 澎湃os不能生效 #4
Comments
确实,我也遇到了 k60 hyperos |
嗨皮os估计是魔改了什么导致bash脚本无效,不过有root的可以直接吧.0文件放到/apex/com.android.conscrypt/cacerts目录下,然后权限改成664重启手机就好了,如果有人懂bash脚本的话可以试试改一下针对hyperos的 |
是修改这个目录权限吗
|
不知道,我只是装了模块后再把上面说的操作一遍,因为我不太懂bash脚本所以也不知道是哪一步出现了问题,反正最终的结果就是脚本没有把文件放进去,自己手动放了成功可以用了 |
我发现一件事,我能够把文件放进去不是靠这个模块,而是新小黄鸟的模块,这是它的脚本 #!/system/bin/sh
exec > /data/local/tmp/CustomCACert.log
exec 2>&1
set -x
MODDIR=${0%/*}
set_context() {
[ "$(getenforce)" = "Enforcing" ] || return 0
default_selinux_context=u:object_r:system_file:s0
selinux_context=$(ls -Zd $1 | awk '{print $1}')
if [ -n "$selinux_context" ] && [ "$selinux_context" != "?" ]; then
chcon -R $selinux_context $2
else
chcon -R $default_selinux_context $2
fi
}
chown -R 0:0 ${MODDIR}/system/etc/security/cacerts
set_context /system/etc/security/cacerts ${MODDIR}/system/etc/security/cacerts
# Android 14 support
# Since Magisk ignore /apex for module file injections, use non-Magisk way
if [ -d /apex/com.android.conscrypt/cacerts ]; then
# Clone directory into tmpfs
rm -f /data/local/tmp/sys-ca-copy
mkdir -p /data/local/tmp/sys-ca-copy
mount -t tmpfs tmpfs /data/local/tmp/sys-ca-copy
cp -f /apex/com.android.conscrypt/cacerts/* /data/local/tmp/sys-ca-copy/
# Do the same as in Magisk module
cp -f ${MODDIR}/system/etc/security/cacerts/* /data/local/tmp/sys-ca-copy
chown -R 0:0 /data/local/tmp/sys-ca-copy
set_context /apex/com.android.conscrypt/cacerts /data/local/tmp/sys-ca-copy
# Mount directory inside APEX if it is valid, and remove temporary one.
CERTS_NUM="$(ls -1 /data/local/tmp/sys-ca-copy | wc -l)"
if [ "$CERTS_NUM" -gt 10 ]; then
mount --bind /data/local/tmp/sys-ca-copy /apex/com.android.conscrypt/cacerts
for pid in 1 $(pgrep zygote) $(pgrep zygote64); do
nsenter --mount=/proc/${pid}/ns/mnt -- \
mount --bind /data/local/tmp/sys-ca-copy /apex/com.android.conscrypt/cacerts
done
else
echo "Cancelling replacing CA storage due to safety"
fi
umount /data/local/tmp/sys-ca-copy
rmdir /data/local/tmp/sys-ca-copy
fi
|
怎么弄? |
已经修复 |
已经合并,大家可以试下最新的好使步 |
小米hyperos(安卓14),正式版和开发版都不能正常安装证书,system/etc/security/cacerts目录已经有证书了,apex下没有,系统设置没有识别证书。试了很多个模块都不行,包括这个:https://github.com/ys1231/MoveCertificate
The text was updated successfully, but these errors were encountered: