Skip to content

Commit

Permalink
new
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurora-Nasa-1 committed Oct 20, 2024
1 parent cc52d79 commit 5a99509
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 24 deletions.
30 changes: 13 additions & 17 deletions custom_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,29 @@
#此脚本继承了默认脚本和设置脚本的变量和函数,可以直接调用

#可以自定义变量运行以下函数
#重置获取zip文件索引函数reset_index
#初始化zip文件路径函数initialize_zip_files "路径"
#获取下一个zip文件路径的函数get_next_zip_file
#依次安装单个模块install_zip_files
#遍历安装$ZIPLIST下的模块initialize_install
#循环不必多说,请自行添加
#运行修补补丁patches_install

#运行遍历修补补丁patches_install
###################################
#安装单个模块例
#zip_file是模块zip文件路径
#zip_file="/path/to/zip_file"
#Installer
#因为代码遗留问题所以你不能直接调用Installer函数

#Installer "path/to/module.zip"
#调用兼容模式
#Installer_Compatibility_mode "path/to/module.zip"
###################################
#补丁模块例

#模块补丁存储的目录
PATCHMOD="patches/modules"
#请创建~/patches/modules/文件夹

#补丁模块的路径一般是/data/adb/modules_update/

#parent_path=$(dirname "$(dirname "$MODPATH")")
#cp -r "$PATCHDATA"/* /"$parent_path"

#如果想补丁模块,请删除上面两行的#号
#cp -r "$MODPATH/$PATCHMOD"/* "$SECURE_DIR/modules_update/"

#如果想补丁模块,请删除上面一行的#号
#补丁模块的路径一般是/data/adb/modules_update/
#补丁规则:将~/patches/modules/目录下的文件复制到data/adb/modules_update/下
#所以请在~/patches/modules/目录下创建与安装模块id相同的文件夹,并将需要补丁的文件放入该文件夹中

#补丁已安装模块例
#cp -r "$MODPATH/$PATCHMOD"/* "$SECURE_DIR/modules/"

#请勿在此脚本使用exit和abort函数
14 changes: 9 additions & 5 deletions customize.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
if [ ! -f "$MODPATH/settings.sh" ]; then
abort "NOTFOUND FILE!!!(settings.sh)"
abort "Error: notfound file!!!(settings.sh)"
else
. "$MODPATH/settings.sh"
fi
ui_print "---AURORA Installer---"
ui_print "---AuroraNasa Installer---"
########################
version_check() {
if [[ $KSU_VER_CODE != "" ]] && [[ $KSU_VER_CODE -lt $ksu_min_version || $KSU_KERNEL_VER_CODE -lt $ksu_min_kernel_version ]]; then
Expand Down Expand Up @@ -32,7 +32,7 @@ Aurora_Installer() {
elif [ -z "$KSU" ] && [ -z "$APATCH" ] && [ -n "$MAGISK_VER_CODE" ]; then
magisk --install-module "$1"
else
abort "Error, please upgrade the root plan or change the root plan"
abort "Error: please upgrade the root plan or change the root plan"
fi
}
Installer() {
Expand Down Expand Up @@ -71,8 +71,11 @@ patches_install() {
apk_found=0
for apk_file in "$MODPATH"/"$PATCHAPK"/*.apk; do
if [ -f "$apk_file" ]; then
install "$apk_file"
apk_found=1
if pm install "$apk_file"; then
apk_found=1
else
ui_print "Failed to install $apk_file"
fi
fi
done
if [ $apk_found -eq 0 ]; then
Expand Down Expand Up @@ -101,3 +104,4 @@ initialize_install
patches_install
CustomShell
delete_temp_files
info
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=AuroraNasa_Installer
name=高自定义度的自动化模块安装和配置模块
version=V0.2.0
versionCode=21
version=V0.2.1
versionCode=22
author=AuroraNasa
description=重启后此模块会自动删除,请勿干扰
Empty file removed remove
Empty file.
6 changes: 6 additions & 0 deletions settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ ksu_min_kernel_version="11847"
apatch_min_version="10657"
#安卓API最小版本
ANDROID_API="30"

MAKER="AuroraNasa"
info () {
ui_print "$MAKER"
#在此写入您要模块安装完成后输出的信息
}

0 comments on commit 5a99509

Please sign in to comment.