This commit is contained in:
Halhadus 2024-12-12 11:03:31 +03:00
parent 9dd8e921ac
commit 21f617d625
10 changed files with 99 additions and 2 deletions

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
.gitattributes export-ignore
.gitignore export-ignore

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/*.zip

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

View file

@ -1,2 +0,0 @@
# localwrapped-magiskmodule

15
customization.sh Executable file
View file

@ -0,0 +1,15 @@
SKIPMOUNT=false
LATESTARTSERVICE=true
print_modname() {
ui_print "Local Wrapped 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/localwrapped 0 0 0755
}

6
module.prop Normal file
View file

@ -0,0 +1,6 @@
id=localwrapped
name=Local Wrapped Magisk Module
version=1.2
versionCode=120
author=Halhadus (https://halhadus.rocks)
description=Magisk Module for Local Wrapped

21
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
/system/bin/localwrapped >> /data/local/tmp/localwrapped.log 2>&1
sleep 5
done
EOF

BIN
system/bin/localwrapped Normal file

Binary file not shown.