ViRb3 / magisk-frida

🔐 Run frida-server on boot with Magisk, always up-to-date
956 stars 130 forks source link

Configure remote listening #17

Open Numenorean opened 3 years ago

Numenorean commented 3 years ago

As i know, by default, frida listens on the localhost but not on 0.0.0.0. How can i do it manually?

Manouchehri commented 2 years ago

To add to this, it would be handy if we could provide configuration to allow TLS connections with a user-provided token (maybe generate a random one and write it to a file owned and readable only be root).

kafroc commented 2 years ago

I implemented magisk-Frida remote debugging by performing the following steps.

Step1: adb login android, and get root shell. cmder λ adb shell
sagit:/ $ su

Step2: find the main directory of magisk-frida, and cd into it.
sagit:/ # cd /data/adb/modules/magisk-frida
sagit:/data/adb/modules/magisk-frida # ls
module.prop service.sh system

Step3: edit service.sh, change "frida-server" to "frida-server -l 0.0.0.0:27042"
sagit:/data/adb/modules/magisk-frida # cat service.sh

#!/system/bin/sh                                           
......                                            

# restart on crash                                         
while true; do                                             
    frida-server -l 0.0.0.0:27042    # change this line, from "frida-server" to "frida-server -l 0.0.0.0:27042"       
    sleep 1                                                
done        
Horjer commented 7 months ago

Before installing MagiskFrida.zip from the releases, you can customize the startup configuration of frida-server by modifying the /common/service.sh file within the MagiskFrida.zip archive.

# restart on crash
while true; do
    frida-server -l 0.0.0.0:27042
    sleep 1
done