Skip to content

Commit

Permalink
feat: 添加移动用户证书到系统,保留手动计算证书名称
Browse files Browse the repository at this point in the history
  • Loading branch information
ys1231 committed Mar 21, 2023
1 parent ea24a7a commit adddf00
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
http://www.zhuoyue360.com/crack/60.html
https://topjohnwu.github.io/Magisk/guides.html#boot-scripts
https://github.com/Magisk-Modules-Repo/movecert

1. 添加原本的移动系统证书的功能
2. 附带下面的自己计算证书名更好的支持系统证书
# 使用方法
1. 导出抓包软件证书 转换 证书为 pem 格式
2. `adb shell "mkdir -p /data/local/tmp/crt"`
3. 获取证书hash
3. 获取证书hash

```shell
#openssl版本在1.0以上的版本的执行下面这一句---------------------
Expand Down
12 changes: 7 additions & 5 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@


init_install(){
# ui_print "*******************************"
# ui_print " Move Certificates "
# ui_print " by iyue "
# ui_print "*******************************"
ui_print " by iyue "
ui_print " by iyue "
# ui_print "delete Placeholder file"
rm -f $MODPATH/system/etc/security/cacerts/placeholder
set_perm_recursive $MODPATH 0 0 0755 0644
ui_print "1. 移动用户证书到系统证书"
ui_print "2. 把/data/local/tmp/crt
目录下的证书移动到系统证书如果已存在会覆盖!"
}

# Output installation information
Expand Down
7 changes: 3 additions & 4 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
id=MoveCertificate
name=MoveCertificate
version=v1.2
versionCode=3
version=v1.3
versionCode=4
author=iyue
description=support android7+ Move certificate.
updateJson=http://ys1231.cn:81/movecert/movecrturl.json
description=support android7+ move certificate.
5 changes: 2 additions & 3 deletions post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
#

MODDIR=${0%/*}
ui_print "delete Placeholder file"
mv -f /data/misc/user/0/cacerts-added/* $MODDIR/system/etc/security/cacerts/
mv -f /data/local/tmp/crt/* $MODDIR/system/etc/security/cacerts/
rm $MODPATH/system/etc/security/cacerts/placeholder
chown -R 0:0 $MODDIR/system/etc/security/cacerts

[ "$(getenforce)" = "Enforcing" ] || exit 0
Expand All @@ -32,4 +31,4 @@ if [ -n "$selinux_context" ] && [ "$selinux_context" != "?" ]; then
chcon -R $selinux_context $MODDIR/system/etc/security/cacerts
else
chcon -R $default_selinux_context $MODDIR/system/etc/security/cacerts
fi
fi

0 comments on commit adddf00

Please sign in to comment.