From 7d31b9fc98873bc800090fbaafe5bca1f948e109 Mon Sep 17 00:00:00 2001 From: Ken Gannon Date: Wed, 3 May 2023 22:46:06 -0400 Subject: [PATCH] yay --- build.py | 1 + module.prop.gold | 4 ++-- post-fs-data.sh | 13 +++++++------ system/bin/yayplaceholderyay | 1 + 4 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 system/bin/yayplaceholderyay diff --git a/build.py b/build.py index df14205..980ac29 100644 --- a/build.py +++ b/build.py @@ -82,6 +82,7 @@ def getLastGithubRelease(yayrepoyay): zip_object.write('./META-INF/com/google/android/update-binary') zip_object.write('./META-INF/com/google/android/updater-script') zip_object.write('./system/etc/security/cacerts/yayplaceholderyay') + zip_object.write('./system/bin/yayplaceholderyay') zip_object.write('./module.prop') zip_object.write('./post-fs-data.sh') zip_object.write('./service.sh') \ No newline at end of file diff --git a/module.prop.gold b/module.prop.gold index ac1296a..d02cb0a 100644 --- a/module.prop.gold +++ b/module.prop.gold @@ -1,6 +1,6 @@ id=YayPentestMagiskModuleYay name=YayPentestMagiskModuleYay -version=1.0 -versionCode=1 +version=1.1 +versionCode=2 author=Yogehi description=Magisk Module to configure a device specifically for pentesting \ No newline at end of file diff --git a/post-fs-data.sh b/post-fs-data.sh index d29c8e5..cbbef59 100644 --- a/post-fs-data.sh +++ b/post-fs-data.sh @@ -22,9 +22,11 @@ rm $MODDIR/system/etc/security/cacerts/yayplaceholderyay # put frida-server on device +ARCH=$(/data/adb/magisk/busybox arch) + case $ARCH in - arm64) YayArchYay=$ARCH;; - arm) YayArchYay=$ARCH;; + aarch64) YayArchYay=arm64;; + aarch32) YayArchYay=arm;; x64) YayArchYay=x86_64;; x86) YayArchYay=$ARCH;; *) YayArchYay=yayunsupportedyay;; @@ -34,16 +36,15 @@ if [ $YayArchYay = "yayunsupportedyay" ]; then ui_print "[-] Unsupported architecture, Frida will not work" ui_print "[-] Manually download and run frida-server from https://github.com/frida/frida/releases" else - YayTargetDirYay="$MODPATH/system/bin" + YayTargetDirYay="$MODDIR/system/bin" YayUnzipYay="/data/adb/magisk/busybox unzip" YayXzYay="/data/adb/magisk/busybox xz" - mkdir -p "$YayTargetDirYay" - $YayUnzipYay -qq -o "$ZIPFILE" "files/frida-server-$YayArchYay.xz" -j -d "$YayTargetDirYay" + cp -f $MODDIR/files/frida-server-$YayArchYay.xz "$YayTargetDirYay" $YayXzYay -d "$YayTargetDirYay/frida-server-$YayArchYay.xz" mv "$YayTargetDirYay/frida-server-$YayArchYay" "$YayTargetDirYay/frida-server" - set_perm $YayTargetDirYay/frida-server 0 2000 0755 u:object_r:system_file:s0 + chmod 755 $YayTargetDirYay/frida-server fi \ No newline at end of file diff --git a/system/bin/yayplaceholderyay b/system/bin/yayplaceholderyay new file mode 100644 index 0000000..deb5795 --- /dev/null +++ b/system/bin/yayplaceholderyay @@ -0,0 +1 @@ +yayplaceholderyay \ No newline at end of file