Skip to content

Commit

Permalink
change structure
Browse files Browse the repository at this point in the history
  • Loading branch information
chengyujia committed Jan 15, 2024
1 parent 7bb7c45 commit 66e5fdc
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 26 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ jobs:

- name: build dist
run: |
git submodule init && git submodule update
./dist.sh
UPDATE_BINARY_URL="https://raw.githubusercontent.com/topjohnwu/Magisk/master/scripts/module_installer.sh"
curl "${UPDATE_BINARY_URL}" > ./META-INF/com/google/android/update-binary
echo "#MAGISK" > ./META-INF/com/google/android/updater-script
VERSION=$(sed -ne "s/version=\(.*\)/\1/gp" ./module.prop)
NAME=$(sed -ne "s/id=\(.*\)/\1/gp" ./module.prop)
rm -f ${NAME}-${VERSION}.zip
zip -r ${NAME}-${VERSION}.zip META-INF system module.prop post-fs-data.sh
ls -la
- name: create release
Expand Down
Empty file removed .gitmodules
Empty file.
33 changes: 33 additions & 0 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/sbin/sh

#################
# Initialization
#################

umask 022

# echo before loading util_functions
ui_print() { echo "$1"; }

require_new_magisk() {
ui_print "*******************************"
ui_print " Please install Magisk v20.4+! "
ui_print "*******************************"
exit 1
}

#########################
# Load util_functions.sh
#########################

OUTFD=$2
ZIPFILE=$3

mount /data 2>/dev/null

[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
. /data/adb/magisk/util_functions.sh
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk

install_module
exit 0
1 change: 1 addition & 0 deletions META-INF/com/google/android/updater-script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#MAGISK
16 changes: 0 additions & 16 deletions dist.sh

This file was deleted.

4 changes: 2 additions & 2 deletions module/module.prop → module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=custom-certificates
name=Custom Certificates
version=v2.2
versionCode=35
version=v2.3
versionCode=38
author=YujiaCheng1996
description=A Magisk module which adds custom certificates to the system trust store.
updateJson=https://raw.githubusercontent.com/YujiaCheng1996/custom-certificates/master/update.json
2 changes: 0 additions & 2 deletions module/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions module/post-fs-data.sh → post-fs-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ if [ -d /apex/com.android.conscrypt/cacerts ]; then
set_context /apex/com.android.conscrypt/cacerts /data/local/tmp/all-ca-copy

# Mount directory inside APEX and remove temporary one.
CERTS_NUM="$(ls -1 /data/local/tmp/all-ca-copy | wc -l)"
if [ "$CERTS_NUM" -gt 15 ]; then
mount --bind /data/local/tmp/all-ca-copy /apex/com.android.conscrypt/cacerts
else
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "v2.2",
"versionCode": 35,
"zipUrl": "https://github.com/YujiaCheng1996/custom-certificates/releases/download/v2.2/custom-certificates-v2.2.zip",
"changelog": "https://github.com/YujiaCheng1996/custom-certificates/releases/tag/v2.2"
"version": "v2.3",
"versionCode": 38,
"zipUrl": "https://github.com/YujiaCheng1996/custom-certificates/releases/download/v2.3/custom-certificates-v2.3.zip",
"changelog": "https://github.com/YujiaCheng1996/custom-certificates/releases/tag/v2.3"
}

0 comments on commit 66e5fdc

Please sign in to comment.