Initial
This commit is contained in:
parent
9dd8e921ac
commit
21f617d625
10 changed files with 99 additions and 2 deletions
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.gitattributes export-ignore
|
||||||
|
.gitignore export-ignore
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/*.zip
|
33
META-INF/com/google/android/update-binary
Normal file
33
META-INF/com/google/android/update-binary
Normal 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
|
1
META-INF/com/google/android/updater-script
Normal file
1
META-INF/com/google/android/updater-script
Normal file
|
@ -0,0 +1 @@
|
||||||
|
#MAGISK
|
20
Makefile
Normal file
20
Makefile
Normal 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
|
|
@ -1,2 +0,0 @@
|
||||||
# localwrapped-magiskmodule
|
|
||||||
|
|
15
customization.sh
Executable file
15
customization.sh
Executable 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
6
module.prop
Normal 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
21
service.sh
Normal 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
BIN
system/bin/localwrapped
Normal file
Binary file not shown.
Loading…
Reference in a new issue