This commit is contained in:
Halhadus 2024-12-19 01:34:07 +03:00
parent 11cb7a4abc
commit d60ec051e0
12 changed files with 473 additions and 0 deletions

View file

@ -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

View file

@ -0,0 +1 @@
#MAGISK

20
magiskmodule/Makefile Normal file
View file

@ -0,0 +1,20 @@
getprop = $(shell cat module.prop | grep "^$(1)=" | head -n1 | cut -d'=' -f2)
MODNAME ?= $(call getprop,id)
MODVER ?= $(call getprop,version)
ZIP = $(MODNAME)-$(MODVER).zip
all: $(ZIP)
zip: $(ZIP)
%.zip: clean
zip -r9 $(ZIP) . -x $(MODNAME)-*.zip LICENSE .gitignore .gitattributes Makefile /.git*
clean:
rm -f *.zip
update:
curl https://raw.githubusercontent.com/topjohnwu/Magisk/master/scripts/module_installer.sh > META-INF/com/google/android/update-binary
.PHONY: all zip %.zip install clean update

15
magiskmodule/customization.sh Executable file
View file

@ -0,0 +1,15 @@
SKIPMOUNT=false
LATESTARTSERVICE=true
print_modname() {
ui_print "Local Wrapped and Music Status Combo Magisk Module"
}
MOD_EXTRACT() {
unzip -o "$ZIPFILE" -d $MODPATH >&2
}
set_permissions() {
set_perm_recursive $MODPATH 0 0 0755 0755
set_perm $MODPATH/system/bin/musiccombo 0 0 0755
}

6
magiskmodule/module.prop Normal file
View file

@ -0,0 +1,6 @@
id=musiccombo
name=Local Wrapped and Music Status Combo Magisk Module
version=1.0
versionCode=100
author=Halhadus (https://halhadus.rocks)
description=Magisk Module for Local Wrapped and Music Status

21
magiskmodule/service.sh Normal file
View file

@ -0,0 +1,21 @@
# Schedule task
nohup /bin/sh > /dev/null 2>&1 <<EOF &
wait_boot_complete()
{
until [ "x\$(getprop sys.boot_completed)" == "x1" ]
do
sleep 5
done
}
wait_boot_complete
while true
do
env MSSERVER="url" /system/bin/musiccombo >> /data/local/tmp/musiccombo.log 2>&1
sleep 5
done
EOF

Binary file not shown.