-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support KernelSU / Apatch & fix broken Frida server launch #46
Conversation
enovella
commented
Jan 27, 2024
@ViRb3 for viz |
Will take a look the next few days, sorry been very busy. |
Understand, the Chinese New Year is busy. |
@enovella Why does the auto restart loop not work for you? I see no reason why it wouldn't work. |
It doesn't work in any of my devices (7-8 laying around). Frida is simply not available after boot with the while-true loop. |
@ViRb3 Any plans to review this PR? Otherwise, I can create a fork and continue adding changes over there. Let me know. |
@enovella Sorry, meant to test myself but got side tracked. I just pulled out my OnePlus 5T running Elixir OS 2.1 (Android 12L), Magisk 27.0, MagiskFrida 16.2.1. It works perfectly as I can debug applications from my computer over USB, and I can also see the process inside a shell in the phone: $ adb shell
OnePlus5T:/ $ pgrep -l frida
3938 frida-server What exact setup did you test across your devices? I honestly find it very strange for the daemonization to work and regular blocking mode not. |
这个PR会继续跟进不?期待能支持kernelsu |
bump |
looking forward to it supporting KernelSU. |
Can all of you please let me know whether the current MagiskFrida with auto restart loop works for you, and you are able to debug apps on your phone using Frida on your PC? I am happy to merge this PR but I want to figure out the problem @enovella is experiencing. |
I already mentioned several times that this auto-restart loop didn't work for me. The phone didn't respond to Frida upon booting and this was tested in so many devices. The idea is to use the flag to daemonize Frida ( |
Yeah, I know it doesn't work for you, but it works for me this is the confusing part. So I am asking other people, apart from you and me, to test as well and we can get a better picture. I don't want to make changes without fully understanding them. There's no reason why daemonizing or not should make a difference. If you have a theory, I am happy to hear it. |
Yeah,this pr is work for me!Nokia 6.1plus,pixel OS
…---Original---
From: ***@***.***>
Date: Fri, May 24, 2024 21:03 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [ViRb3/magisk-frida] Support KernelSU & fix broken Frida serverlaunch (PR #46)
Yeah, I know it doesn't work for you, but it works for me this is the confusing part. So I am asking other people, apart from you and me, to test as well and we can get a better picture. I don't want to make changes without fully understanding them.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
@liangjaden can you test the latest official magisk-frida release, not this PR? Link: https://github.com/ViRb3/magisk-frida/releases/download/16.2.5-1/MagiskFrida-16.2.5-1.zip |
Maybe next week, because the phone is
In the company
…---Original---
From: ***@***.***>
Date: Fri, May 24, 2024 21:12 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [ViRb3/magisk-frida] Support KernelSU & fix broken Frida serverlaunch (PR #46)
@liangjaden can you test the latest official magisk-frida release, not this PR? Link: https://github.com/ViRb3/magisk-frida/releases/download/16.2.5-1/MagiskFrida-16.2.5-1.zip
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@enovella His problem can be solved by ending the server process once, and the loop can also work normally |
@ViRb3 After testing, the latest version is working on my phone |
But this would be ugly, wouldn't it? |
This is a probability problem. Sometimes it won't happen, as long as it works,My mobile phone models are pixel3xl and pixel6. |
@enovel unfortunately I only have one device at hand. The stable version of this package has used the loop for over a year and you're the first person to say it doesn't work, so I am just very confused why. I really want to get to the bottom of this before making any changes. I will try to run a different ROM over the next few days, also I'll also try an emulator. For anyone reading this ticket, please also test and let me know. |
@ViRb3 In this case, you can merge the PR with changes and leave your loop until we find a working 100% solution for everyone. Is my PR working on your device? |
@ViRb3 any news? |
@enovella I tried your module but does not seem to work on my Pixel 7 (Android 14, Kernel Patch 0.10.7, Apatch 10763) Following that the extraction just seems to fail for me... The zip file contains the frida server
but its not extracted into the correct folder:
Apologies if thats an obious error, by magisk / Ksu expiriece is limited.... Let me know if I can help somehow |
Does it work Frida and KSU in your device without using this module? |
I didn't test Apatch or Android 14/15 btw |
Can you describe which is the env variable and busybox PATH to have the case? |
Ah, that makes alot of sense, I just read the docs on APatch and ajusted your script and it all works. I will create a PR later today to your repo :) |
https://github.com/bmax121/APatch/blob/main/scripts/update_script.sh#L31 ############
# Detection
############
if echo $APATCH_VER | grep -q '\.'; then
PRETTY_VER=$APATCH_VER
else
PRETTY_VER="$APATCH_VER($APATCH_VER_CODE)"
fi
print_title "APATCH $PRETTY_VER Installer"
is_mounted /data || mount /data || is_mounted /cache || mount /cache
mount_partitions
check_data
get_flags
find_boot_image
[ -z $BOOTIMAGE ] && abort "! Unable to detect target image"
ui_print "- Target image: $BOOTIMAGE" |
@ViRb3 |
If you want to merge this into your branch we can make an effort getting this all merged :) |
panther:/sdcard/Download $ cat APatch_install_log_2024-07-02-17-33-29.log
_ ____ _ _
/ \ | _ \ __ _| |_ ___| |__
/ _ \ | |_) / _` | __/ __| '_ \
/ ___ \| __/ (_| | || (__| | | |
/_/ \_\_| \__,_|\__\___|_| |_|
- Preparing image
- Module size: 253.51 MB
e2fsck 1.46.6 (1-Feb-2023)
- Estimated minimum size of the filesystem: 75214
e2fsck 1.46.6 (1-Feb-2023)
- Target image size: 598.97 MB
resize2fs 1.46.6 (1-Feb-2023)
The filesystem is already 585953 (1k) blocks long. Nothing to do!
e2fsck 1.46.6 (1-Feb-2023)
- Mounting image
Source path is not read-only
- Current boot slot: _a
- Device is system-as-root
Archive: /data/user/0/me.bmax.apatch/cache/module.zip
inflating: module.prop
Archive: /data/user/0/me.bmax.apatch/cache/module.zip
inflating: module.prop
inflating: install.sh
inflating: post-fs-data.sh
inflating: system.prop
inflating: service.sh
********************************************
* Magisk-/KernelSU-Frida *
********************************************
- Detected architecture: arm64
- Installing from APatch app
- APatch version: 10763. Magisk version: 27000
- Extracting module files
- Setting permissions
- Done |
Added Apatch support
else | ||
ui_print "*********************************************************" | ||
ui_print "! Install from recovery is not supported" | ||
ui_print "! Please install from KernelSU or Magisk app" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xE0-rng Do you want to specify something about Apatch?
@@ -124,7 +124,7 @@ REPLACE=" | |||
print_modname() { | |||
ui_print " " | |||
ui_print " ********************************************" | |||
ui_print " * MagiskFrida *" | |||
ui_print " * Magisk-/KernelSU-Frida *" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xE0-rng something about Apatch
UNZIP="/data/adb/ksu/bin/busybox unzip" | ||
elif [ "$BOOTMODE" ] && [ "$APATCH" ]; then | ||
ui_print "- Installing from APatch app" | ||
ui_print "- APatch version: $APATCH_VER_CODE. Magisk version: $MAGISK_VER_CODE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xE0-rng this line isn't right, is it?
- Does
$MAGISK_VER_CODE
exist on Apatch? - Could we use this combo?
"$APATCH_VER($APATCH_VER_CODE)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's available (as seen on the output above). Thanks for the feedback, I will give it a look when I have some free time :)
@ViRb3 Thinking of closing this PR and creating my own fork with my changes to support KernelSU, APatch and proper boot on more devices. Is this what you want too? This PR is taking ages to be verified. |
Sorry @enovella, I didn't mean to drag this for so long, just thought I'd have free time to dig into it but still haven't. I'd be happy to archive this repo in favor of yours, but it has a build hook set up with Frida and apparently very good Google SEO, so it would be a pain to migrate. Let's do this - from now on I will merge your PRs with just a code review, and if users report any issues, we can always revert. Apologies again for dragging this so long, let's hope this new approach works out for the best! |