From 81e9b693532b8daedb69f7710fdda2d157b40890 Mon Sep 17 00:00:00 2001 From: Eduardo Novella Date: Mon, 9 Dec 2024 16:23:33 +0100 Subject: [PATCH 1/9] New template Magisk v20.4+/APatch/KernelSU --- .../META-INF/com/google/android/update-binary | 154 +----------------- base/action.sh | 32 ++++ base/common/post-fs-data.sh | 9 - base/common/service.sh | 20 --- base/common/system.prop | 3 - base/{install.sh => customize.sh} | 37 ++++- base/post-fs-data.sh | 8 + base/service.sh | 17 ++ base/utils.sh | 45 +++++ build.py | 6 +- 10 files changed, 141 insertions(+), 190 deletions(-) create mode 100644 base/action.sh delete mode 100644 base/common/post-fs-data.sh delete mode 100644 base/common/service.sh delete mode 100644 base/common/system.prop rename base/{install.sh => customize.sh} (89%) create mode 100644 base/post-fs-data.sh create mode 100644 base/service.sh create mode 100644 base/utils.sh diff --git a/base/META-INF/com/google/android/update-binary b/base/META-INF/com/google/android/update-binary index 29240cd..ea4889e 100644 --- a/base/META-INF/com/google/android/update-binary +++ b/base/META-INF/com/google/android/update-binary @@ -6,168 +6,28 @@ umask 022 -# Global vars -TMPDIR=/dev/tmp -PERSISTDIR=/sbin/.magisk/mirror/persist - -rm -rf $TMPDIR 2>/dev/null -mkdir -p $TMPDIR - # echo before loading util_functions ui_print() { echo "$1"; } require_new_magisk() { ui_print "*******************************" - ui_print " Please install Magisk v19.0+! " + ui_print " Please install Magisk v20.4+! " ui_print "*******************************" exit 1 } -is_legacy_script() { - unzip -l "$ZIPFILE" install.sh | grep -q install.sh - return $? -} - -print_modname() { - local len - len=`echo -n $MODNAME | wc -c` - len=$((len + 2)) - local pounds=`printf "%${len}s" | tr ' ' '*'` - ui_print "$pounds" - ui_print " $MODNAME " - ui_print "$pounds" - ui_print "*******************" - ui_print " Powered by Magisk " - ui_print "*******************" -} - -############## -# Environment -############## +######################### +# Load util_functions.sh +######################### OUTFD=$2 ZIPFILE=$3 mount /data 2>/dev/null -# Load utility functions [ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk . /data/adb/magisk/util_functions.sh -[ $MAGISK_VER_CODE -gt 18100 ] || require_new_magisk - -# Preperation for flashable zips -setup_flashable - -# Mount partitions -mount_partitions - -# Detect version and architecture -api_level_arch_detect - -# Setup busybox and binaries -$BOOTMODE && boot_actions || recovery_actions - -############## -# Preparation -############## - -# Extract prop file -unzip -o "$ZIPFILE" module.prop -d $TMPDIR >&2 -[ ! -f $TMPDIR/module.prop ] && abort "! Unable to extract zip file!" - -$BOOTMODE && MODDIRNAME=modules_update || MODDIRNAME=modules -MODULEROOT=$NVBASE/$MODDIRNAME -MODID=`grep_prop id $TMPDIR/module.prop` -MODPATH=$MODULEROOT/$MODID -MODNAME=`grep_prop name $TMPDIR/module.prop` - -# Create mod paths -rm -rf $MODPATH 2>/dev/null -mkdir -p $MODPATH - -########## -# Install -########## - -if is_legacy_script; then - unzip -oj "$ZIPFILE" module.prop install.sh uninstall.sh 'common/*' -d $TMPDIR >&2 - - # Load install script - . $TMPDIR/install.sh - - # Callbacks - print_modname - on_install - - # Custom uninstaller - [ -f $TMPDIR/uninstall.sh ] && cp -af $TMPDIR/uninstall.sh $MODPATH/uninstall.sh - - # Skip mount - $SKIPMOUNT && touch $MODPATH/skip_mount - - # prop file - $PROPFILE && cp -af $TMPDIR/system.prop $MODPATH/system.prop - - # Module info - cp -af $TMPDIR/module.prop $MODPATH/module.prop - - # post-fs-data scripts - $POSTFSDATA && cp -af $TMPDIR/post-fs-data.sh $MODPATH/post-fs-data.sh - - # service scripts - $LATESTARTSERVICE && cp -af $TMPDIR/service.sh $MODPATH/service.sh - - ui_print "- Setting permissions" - set_permissions -else - print_modname - - unzip -o "$ZIPFILE" customize.sh -d $MODPATH >&2 - - if ! grep -q '^SKIPUNZIP=1$' $MODPATH/customize.sh 2>/dev/null; then - ui_print "- Extracting module files" - unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >&2 - - # Default permissions - set_perm_recursive $MODPATH 0 0 0755 0644 - fi - - # Load customization script - [ -f $MODPATH/customize.sh ] && . $MODPATH/customize.sh -fi - -# Handle replace folders -for TARGET in $REPLACE; do - ui_print "- Replace target: $TARGET" - mktouch $MODPATH$TARGET/.replace -done - -if $BOOTMODE; then - # Update info for Magisk Manager - mktouch $NVBASE/modules/$MODID/update - cp -af $MODPATH/module.prop $NVBASE/modules/$MODID/module.prop -fi - -# Copy over custom sepolicy rules -if [ -f $MODPATH/sepolicy.rule -a -e $PERSISTDIR ]; then - ui_print "- Installing custom sepolicy patch" - PERSISTMOD=$PERSISTDIR/magisk/$MODID - mkdir -p $PERSISTMOD - cp -af $MODPATH/sepolicy.rule $PERSISTMOD/sepolicy.rule -fi - -# Remove stuffs that don't belong to modules -rm -rf \ -$MODPATH/system/placeholder $MODPATH/customize.sh \ -$MODPATH/README.md $MODPATH/.git* 2>/dev/null - -############## -# Finalizing -############## - -cd / -$BOOTMODE || recovery_cleanup -rm -rf $TMPDIR +[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk -ui_print "- Done" -exit 0 +install_module +exit 0 \ No newline at end of file diff --git a/base/action.sh b/base/action.sh new file mode 100644 index 0000000..659bdc5 --- /dev/null +++ b/base/action.sh @@ -0,0 +1,32 @@ +#!/system/bin/sh +MODPATH=${0%/*} +PATH=$PATH:/data/adb/ap/bin:/data/adb/magisk:/data/adb/ksu/bin + +# log +exec 2> $MODPATH/logs/action.log +set -x + +. $MODPATH/utils.sh + +[ -f $MODPATH/disable ] && { + echo "[-] Frida-server is already disable. Please re-enable & reboot" + string="description=Run frida-server on boot: ❌ (failed)" + sed -i "s/^description=.*/$string/g" $MODPATH/module.prop + sleep 1 + exit 0 +} + +result="$(busybox pgrep 'frida-server')" +if [ $result -gt 0 ]; then + echo "[-] Killing frida-server..." + busybox kill -9 $result +else + echo "[-] Frida server relaunching..." + frida-server -D +fi + +sleep 1 + +check_frida_is_up + +#EOF diff --git a/base/common/post-fs-data.sh b/base/common/post-fs-data.sh deleted file mode 100644 index a347e4c..0000000 --- a/base/common/post-fs-data.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/system/bin/sh -# Do NOT assume where your module will be located. -# ALWAYS use $MODDIR if you need to know where this script -# and module is placed. -# This will make sure your module will still work -# if Magisk change its mount point in the future -MODDIR=${0%/*} - -# This script will be executed in post-fs-data mode diff --git a/base/common/service.sh b/base/common/service.sh deleted file mode 100644 index 1010f8a..0000000 --- a/base/common/service.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/system/bin/sh -# Do NOT assume where your module will be located. -# ALWAYS use $MODDIR if you need to know where this script -# and module is placed. -# This will make sure your module will still work -# if Magisk change its mount point in the future -MODDIR=${0%/*} - -# This script will be executed in late_start service mode - -# wait for boot to complete -while [ "$(getprop sys.boot_completed)" != 1 ]; do - sleep 1 -done - -# ensure boot has actually completed -sleep 5 - -# restart on crash -frida-server -D diff --git a/base/common/system.prop b/base/common/system.prop deleted file mode 100644 index 3d42789..0000000 --- a/base/common/system.prop +++ /dev/null @@ -1,3 +0,0 @@ -# This file will be read by resetprop -# Example: Change dpi -# ro.sf.lcd_density=320 diff --git a/base/install.sh b/base/customize.sh similarity index 89% rename from base/install.sh rename to base/customize.sh index b7107e1..67f8cbb 100644 --- a/base/install.sh +++ b/base/customize.sh @@ -1,3 +1,4 @@ +#!/bin/sh ########################################################################################## # # Magisk Module Installer Script @@ -119,12 +120,21 @@ REPLACE=" # Enable boot scripts by setting the flags in the config section above. ########################################################################################## -# Set what you want to display when installing your module +[ ! -d $MODPATH/logs ] && mkdir -p $MODPATH/logs + +# log +exec 2> $MODPATH/logs/custom.log +set -x +# keep Magisk's forced module installer backend involvement minimal (must end without ";") +# SKIPUNZIP=1 + +# Set what you want to display when installing your module print_modname() { ui_print " " ui_print " ********************************************" - ui_print " * Magisk-/KernelSU-Frida *" + ui_print " * Magisk/KernelSU/APatch *" + ui_print " * Frida *" ui_print " ********************************************" ui_print " " } @@ -143,16 +153,16 @@ on_install() { ui_print "- Detected architecture: $F_ARCH" if [ "$BOOTMODE" ] && [ "$KSU" ]; then - ui_print "- Installing from KernelSU app" + ui_print "- Installing from KernelSU" ui_print "- KernelSU version: $KSU_KERNEL_VER_CODE (kernel) + $KSU_VER_CODE (ksud)" UNZIP="/data/adb/ksu/bin/busybox unzip" elif [ "$BOOTMODE" ] && [ "$APATCH" ]; then - ui_print "- Installing from APatch app" + ui_print "- Installing from APatch" ui_print "- APatch version: $APATCH_VER_CODE. Magisk version: $MAGISK_VER_CODE" UNZIP="/data/adb/ap/bin/busybox unzip" elif [ "$BOOTMODE" ] && [ "$MAGISK_VER_CODE" ]; then - ui_print "- Installing from Magisk app" - ui_print "- Magisk version: $MAGISK_VER_CODE" + ui_print "- Installing from Magisk" + ui_print "- Magisk version: $MAGISK_VER_CODE ($MAGISK_VER)" UNZIP="/data/adb/magisk/busybox unzip" else ui_print "*********************************************************" @@ -161,7 +171,7 @@ on_install() { abort "*********************************************************" fi - ui_print "- Extracting module files" + ui_print "- Unzipping module files..." F_TARGETDIR="$MODPATH/system/bin" mkdir -p "$F_TARGETDIR" chcon -R u:object_r:system_file:s0 "$F_TARGETDIR" @@ -169,6 +179,8 @@ fi $UNZIP -qq -o "$ZIPFILE" "files/frida-server-$F_ARCH" -j -d "$F_TARGETDIR" mv "$F_TARGETDIR/frida-server-$F_ARCH" "$F_TARGETDIR/frida-server" + + [ ! -d $MODPATH/logs ] && mkdir -p $MODPATH/logs } # Only some special files require specific permissions @@ -183,4 +195,13 @@ set_permissions() { set_perm $MODPATH/system/bin/frida-server 0 2000 0755 u:object_r:system_file:s0 } -# You can add more functions to assist your custom script code +print_modname +on_install +set_permissions + +[ -f $MODPATH/disable ] && { + string="description=Run frida-server on boot: ❌ (failed)" + sed -i "s/^description=.*/$string/g" $MODPATH/module.prop +} + +#EOF \ No newline at end of file diff --git a/base/post-fs-data.sh b/base/post-fs-data.sh new file mode 100644 index 0000000..b253705 --- /dev/null +++ b/base/post-fs-data.sh @@ -0,0 +1,8 @@ +MODPATH=${0%/*} + +# This script will be executed in post-fs-data mode +# log +exec 2> $MODPATH/logs/post-fs-data.log +set -x + +#EOF \ No newline at end of file diff --git a/base/service.sh b/base/service.sh new file mode 100644 index 0000000..b792e7d --- /dev/null +++ b/base/service.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# This script will be executed in late_start service mode +MODPATH=${0%/*} + +# log +exec 2> $MODPATH/logs/service.log +set -x + +. $MODPATH/utils.sh || exit $? + +wait_for_boot + +frida-server -D + +check_frida_is_up + + diff --git a/base/utils.sh b/base/utils.sh new file mode 100644 index 0000000..001484f --- /dev/null +++ b/base/utils.sh @@ -0,0 +1,45 @@ +#!/bin/sh +MODPATH=${0%/*} +PATH=$PATH:/data/adb/ap/bin:/data/adb/magisk:/data/adb/ksu/bin + +# log +exec 2> $MODPATH/logs/utils.log +set -x + +function check_frida_is_up() { + timeout=5 + counter=0 + + while [ $counter -lt $timeout ]; do + local result="$(busybox pgrep 'frida-server')" + if [ $result -gt 0 ]; then + echo "[-] Frida server is listening" + string="description=Run frida-server on boot: ✅ (active)" + break + else + sleep 1 + echo "[-] Frida server checking status: $counter" + counter=$((counter + 1)) + fi + done + + if [ $counter -ge $timeout ]; then + string="description=Run frida-server on boot: ❌ (failed)" + fi + + sed -i "s/^description=.*/$string/g" $MODPATH/module.prop +} + +wait_for_boot() { + while true; do + local result="$(getprop sys.boot_completed)" + if [ $? -ne 0 ]; then + exit 1 + elif [ "$result" = "1" ]; then + break + fi + sleep 3 + done +} + +#EOF diff --git a/build.py b/build.py index e15817d..16cf5ab 100644 --- a/build.py +++ b/build.py @@ -58,8 +58,8 @@ def create_module_prop(path: Path, project_tag: str): version={project_tag} versionCode={project_tag.replace(".", "").replace("-", "")} author=ViRb3 & enovella -description=Run frida-server on boot -updateJson=https://github.com/ViRb3/magisk-frida/releases/latest/download/updater.json""" +updateJson=https://github.com/ViRb3/magisk-frida/releases/latest/download/updater.json +description=Run frida-server on boot""" with open(path.joinpath("module.prop"), "w", newline="\n") as f: f.write(module_prop) @@ -91,7 +91,7 @@ def fill_module(arch: str, frida_tag: str, project_tag: str): def create_updater_json(project_tag: str): logger.info("Creating updater.json") - + updater ={ "version": project_tag, "versionCode": int(project_tag.replace(".", "").replace("-", "")), From 1cbc37a391195df1f4d5bb02c16c14b6da5e77ea Mon Sep 17 00:00:00 2001 From: Eduardo Novella Date: Mon, 9 Dec 2024 16:30:44 +0100 Subject: [PATCH 2/9] add EOF in service.sh --- base/service.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/service.sh b/base/service.sh index b792e7d..fdf3419 100644 --- a/base/service.sh +++ b/base/service.sh @@ -14,4 +14,4 @@ frida-server -D check_frida_is_up - +#EOF From c260404ca8c1d971d03c93a326399cebb9735fe3 Mon Sep 17 00:00:00 2001 From: Eduardo Novella Date: Mon, 9 Dec 2024 16:33:03 +0100 Subject: [PATCH 3/9] Fix indentation in action.sh --- base/action.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/action.sh b/base/action.sh index 659bdc5..17def9d 100644 --- a/base/action.sh +++ b/base/action.sh @@ -9,10 +9,10 @@ set -x . $MODPATH/utils.sh [ -f $MODPATH/disable ] && { - echo "[-] Frida-server is already disable. Please re-enable & reboot" + echo "[-] Frida-server is already disable. Please re-enable & reboot" string="description=Run frida-server on boot: ❌ (failed)" sed -i "s/^description=.*/$string/g" $MODPATH/module.prop - sleep 1 + sleep 1 exit 0 } From ee713c6ea1e1fe9c2bcf26f64762721262138fd7 Mon Sep 17 00:00:00 2001 From: Eduardo Novella Date: Mon, 9 Dec 2024 18:54:19 +0100 Subject: [PATCH 4/9] Simplify UI messages --- base/action.sh | 6 +++--- base/utils.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base/action.sh b/base/action.sh index 17def9d..1319e42 100644 --- a/base/action.sh +++ b/base/action.sh @@ -18,14 +18,14 @@ set -x result="$(busybox pgrep 'frida-server')" if [ $result -gt 0 ]; then - echo "[-] Killing frida-server..." + echo "[-] Stopping Frida-server..." busybox kill -9 $result else - echo "[-] Frida server relaunching..." + echo "[-] Starting Frida server..." frida-server -D fi -sleep 1 +sleep 2 check_frida_is_up diff --git a/base/utils.sh b/base/utils.sh index 001484f..a454862 100644 --- a/base/utils.sh +++ b/base/utils.sh @@ -7,7 +7,7 @@ exec 2> $MODPATH/logs/utils.log set -x function check_frida_is_up() { - timeout=5 + timeout=4 counter=0 while [ $counter -lt $timeout ]; do From 5dc042dc38819d61fe39866b75052b85fb7606bd Mon Sep 17 00:00:00 2001 From: Eduardo Novella Date: Mon, 9 Dec 2024 19:01:53 +0100 Subject: [PATCH 5/9] =?UTF-8?q?Add=20emoticons=20when=20frida=20is=20up=20?= =?UTF-8?q?=F0=9F=98=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/utils.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/utils.sh b/base/utils.sh index a454862..b07375c 100644 --- a/base/utils.sh +++ b/base/utils.sh @@ -13,12 +13,12 @@ function check_frida_is_up() { while [ $counter -lt $timeout ]; do local result="$(busybox pgrep 'frida-server')" if [ $result -gt 0 ]; then - echo "[-] Frida server is listening" + echo "[-] Frida-server is running... 😜" string="description=Run frida-server on boot: ✅ (active)" break else sleep 1 - echo "[-] Frida server checking status: $counter" + echo "[-] Checking Frida-server status: $counter" counter=$((counter + 1)) fi done From c4f54c142f4de258e41855e8f3862fa020480565 Mon Sep 17 00:00:00 2001 From: Eduardo Novella Date: Mon, 9 Dec 2024 19:07:03 +0100 Subject: [PATCH 6/9] =?UTF-8?q?Add=20emoticons=20when=20frida=20is=20up=20?= =?UTF-8?q?=F0=9F=92=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/utils.sh b/base/utils.sh index b07375c..12ffe6c 100644 --- a/base/utils.sh +++ b/base/utils.sh @@ -13,7 +13,7 @@ function check_frida_is_up() { while [ $counter -lt $timeout ]; do local result="$(busybox pgrep 'frida-server')" if [ $result -gt 0 ]; then - echo "[-] Frida-server is running... 😜" + echo "[-] Frida-server is running... 💉😜" string="description=Run frida-server on boot: ✅ (active)" break else From 54a413b1728da4ad5e6befc23a8046fa50efe34d Mon Sep 17 00:00:00 2001 From: Eduardo Novella Date: Mon, 9 Dec 2024 20:30:55 +0100 Subject: [PATCH 7/9] Add timeout as argument in utils.sh --- base/action.sh | 6 +++--- base/utils.sh | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/base/action.sh b/base/action.sh index 1319e42..04854af 100644 --- a/base/action.sh +++ b/base/action.sh @@ -9,7 +9,7 @@ set -x . $MODPATH/utils.sh [ -f $MODPATH/disable ] && { - echo "[-] Frida-server is already disable. Please re-enable & reboot" + echo "[-] Frida-server is disable" string="description=Run frida-server on boot: ❌ (failed)" sed -i "s/^description=.*/$string/g" $MODPATH/module.prop sleep 1 @@ -25,8 +25,8 @@ else frida-server -D fi -sleep 2 +sleep 1 -check_frida_is_up +check_frida_is_up 1 #EOF diff --git a/base/utils.sh b/base/utils.sh index 12ffe6c..3a0d5d2 100644 --- a/base/utils.sh +++ b/base/utils.sh @@ -7,7 +7,7 @@ exec 2> $MODPATH/logs/utils.log set -x function check_frida_is_up() { - timeout=4 + [ ! -z "$1" ] && timeout="$1" || timeout=5 counter=0 while [ $counter -lt $timeout ]; do @@ -15,6 +15,7 @@ function check_frida_is_up() { if [ $result -gt 0 ]; then echo "[-] Frida-server is running... 💉😜" string="description=Run frida-server on boot: ✅ (active)" + sleep 1.5 break else sleep 1 From 37de94c47a3e5fb9a3cd9fe59175092a958aed75 Mon Sep 17 00:00:00 2001 From: Eduardo Novella Date: Mon, 9 Dec 2024 20:37:44 +0100 Subject: [PATCH 8/9] Tweak timing for better visual messaging aspects --- base/utils.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/base/utils.sh b/base/utils.sh index 3a0d5d2..d1f4332 100644 --- a/base/utils.sh +++ b/base/utils.sh @@ -7,7 +7,7 @@ exec 2> $MODPATH/logs/utils.log set -x function check_frida_is_up() { - [ ! -z "$1" ] && timeout="$1" || timeout=5 + [ ! -z "$1" ] && timeout="$1" || timeout=4 counter=0 while [ $counter -lt $timeout ]; do @@ -15,13 +15,12 @@ function check_frida_is_up() { if [ $result -gt 0 ]; then echo "[-] Frida-server is running... 💉😜" string="description=Run frida-server on boot: ✅ (active)" - sleep 1.5 break else - sleep 1 echo "[-] Checking Frida-server status: $counter" counter=$((counter + 1)) fi + sleep 1.5 done if [ $counter -ge $timeout ]; then From 74c81001e4fb265d36607f9fc8b6edb34f0de0c1 Mon Sep 17 00:00:00 2001 From: Eduardo Novella Date: Mon, 9 Dec 2024 22:12:37 +0100 Subject: [PATCH 9/9] Include PATH in customize to simplify unzip command --- base/customize.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/base/customize.sh b/base/customize.sh index 67f8cbb..007d4df 100644 --- a/base/customize.sh +++ b/base/customize.sh @@ -126,6 +126,8 @@ REPLACE=" exec 2> $MODPATH/logs/custom.log set -x +PATH=$PATH:/data/adb/ap/bin:/data/adb/magisk:/data/adb/ksu/bin + # keep Magisk's forced module installer backend involvement minimal (must end without ";") # SKIPUNZIP=1 @@ -155,15 +157,12 @@ on_install() { if [ "$BOOTMODE" ] && [ "$KSU" ]; then ui_print "- Installing from KernelSU" ui_print "- KernelSU version: $KSU_KERNEL_VER_CODE (kernel) + $KSU_VER_CODE (ksud)" - UNZIP="/data/adb/ksu/bin/busybox unzip" elif [ "$BOOTMODE" ] && [ "$APATCH" ]; then ui_print "- Installing from APatch" ui_print "- APatch version: $APATCH_VER_CODE. Magisk version: $MAGISK_VER_CODE" - UNZIP="/data/adb/ap/bin/busybox unzip" elif [ "$BOOTMODE" ] && [ "$MAGISK_VER_CODE" ]; then ui_print "- Installing from Magisk" ui_print "- Magisk version: $MAGISK_VER_CODE ($MAGISK_VER)" - UNZIP="/data/adb/magisk/busybox unzip" else ui_print "*********************************************************" ui_print "! Install from recovery is not supported" @@ -177,10 +176,8 @@ fi chcon -R u:object_r:system_file:s0 "$F_TARGETDIR" chmod -R 755 "$F_TARGETDIR" - $UNZIP -qq -o "$ZIPFILE" "files/frida-server-$F_ARCH" -j -d "$F_TARGETDIR" + busybox unzip -qq -o "$ZIPFILE" "files/frida-server-$F_ARCH" -j -d "$F_TARGETDIR" mv "$F_TARGETDIR/frida-server-$F_ARCH" "$F_TARGETDIR/frida-server" - - [ ! -d $MODPATH/logs ] && mkdir -p $MODPATH/logs } # Only some special files require specific permissions