Frida: Failed to enumerate applications: unable to connect to remote frida-server: closed

Created on 10 Jan 2016  路  21Comments  路  Source: frida/frida

Following this tutorial: http://www.frida.re/docs/android/

I get the error from running the command frida-ps -U

I have a rooted Droid 4 running 4.1.2

I don't even know what the heck frida-server is, because I pushed it to my phone but it doesn't look like an APK or anything.

Most helpful comment

No worries. That example will work great with an emulator, but for a rooted device you probably want to copy the binary to the device just like in those instructions, and then do something like:

$ adb shell
# su
# /data/local/tmp/frida-server &

All 21 comments

It's a daemon that you need to start manually. Is frida-server running as root?

I don't even know how to run frida-server whatsoever. I was following the instructions

$ curl -O https://build.frida.re/frida/android/arm/bin/frida-server
$ adb push frida-server /data/local/tmp/
$ adb shell "chmod 755 /data/local/tmp/frida-server"
$ adb shell "/data/local/tmp/frida-server &"

Is the last command running frida-server? I do have a rooted phone, but I don't know how to start frida-server as root.

Sorry for my ignorance

No worries. That example will work great with an emulator, but for a rooted device you probably want to copy the binary to the device just like in those instructions, and then do something like:

$ adb shell
# su
# /data/local/tmp/frida-server &

Thank you!

Running "frida-ps -U -i open com.android.chrome" gave me an error that permission was denied, or something similar, and after running "sudo sysctl kernel.yama.ptrace_scope=0" now Chrome just closes every time I try to attach to it.

Is this still reproducible with Frida 6.2.1?

@oleavr With your most recent version of Frida, running on my rooted DROID 4 (Android 4.1.2), when trying to run:

frida-trace -U -i open com.android.chrome

I get the output:

Failed to start tracing: the connection is closed
Stopping...

It causes the app to close on my phone. This happens for nearly every app I attempt to attach to, except a few boring looking system apps like "zygote"

Hi @oleavr @xteraflopx

I hit the same thing on Android. I got the Process IDs listing perfectly on iOS but not on Android. I was using 6.2.4 version of Frida.

I manually adb shelled into my device. Elevated myself to root. Went into the same directory you mentioned; /data/local/tmp/ I made sure the Frida Server was chmod 755.

I can see the Frida server is running. But it is the only process that is being listed. I have multiple apps open.

Thoughts?

PS (I can attach to a PID on iOS, without issue).

Hi,

I am facing the same issue. I am successfully able to run frida-server on my rooted android device (6.0.1, arm), however, when I try to run: "frida-ps -U", I get only one process listed, viz the frida-server process itself and when I run: "frida-ps -R, I get the message - "unable to connect to remote frida-server"

Frida version on my host is 7.1.0 and frida-server version on my phone is 7.0.11

Any solution to this, yet?

Also running "frida-ps -Uai open com.android.chrome" gives an error stating "java API not available"

Hello,
I'm having the same issue, i have a rooted phone, cydia and struff installed, upgraded to the last version of frida (/usr/sbin/frida-server --version shows: 7.2.15)

Everytime i try to connect to the device via USB i get the message:
"Failed to enumerate applications: unable to connect to remote frida-server"

I've checked the apple systemd logs, and found that the frida-server is crashing everytime i try a connection.
I've attached a crashreport for you guys to check.

Thanks, and great work on frida
(crashreport from /Library/Logs/CrashReporter/frida-server_2016-07-27-104012_Flips-iPhone.ips)

frida-crash.txt

Same error here :/

@filipesam Please try 7.2.24. This issue should be resolved.

Thanks, for the update, it's working now in the iphone
Thanks, and keep up the great work!

I tired the frida-server (v8.2.2) on my Acer S500 phone. The Apps crash while i tried to attached it by frida-trace -R ..com.supercell.clashroyale., the crash message is shown in below.

from __future__ import print_function
import frida
import sys

session = frida.get_remote_device().attach("com.supercell.clashroyale")
print(session.enumerate_modules())

crash.txt

I have the same problem with frida 8.2.3 on a rooted android phone. :/
I can start the server just fine and it keeps running, but I cannot connect to it

Model: GT-I9100
Android-version: 4.1.2
Kernel version: 3.0.31-Siyah-s2-v6.0b4+

@oleavr I got this error when trying to list processes of Android x86 running in VirtualBox (bridged adapter network) on a Linux host with a command like frida-ps -H 10.0.0.110. The solution was to give the local network IP address of Android (or 0.0.0.0) to frida-server with -l parameter so it will listen on it. It looks like a bug since the server should listen on its own IP address by default.
Related: https://github.com/frida/frida/issues/582

Hi,
@oleavr I was setting up Frida-server on the android rooted device and do all these steps
$ adb push frida-server /data/local/tmp/
$ adb shell "chmod 755 /data/local/tmp/frida-server"
$ adb shell "/data/local/tmp/frida-server &"

C:U###sP###AAppDataLocalAndroidSdkplatform-tools>adb shell /data/local/tmp/frida-server &
/system/bin/sh: /data/local/tmp/frida-server: can't execute: Is a directory

and also the following

C:U###sP###AAppDataLocalAndroidSdkplatform-tools>adb shell
shell@kenzo:/ $ su
root@kenzo:/ # /data/local/tmp/frida-server &
[1] 6687
root@kenzo:/ # sush: /data/local/tmp/frida-server: can't execute: Is a directory

Please let me know how to solve this.

Regards,
Imran

@imran209 here is the command I used to start frida-server: adb shell "su 0 /data/local/tmp/frida-server -l 0.0.0.0" &.
Maybe you also need to do chmod +x frida-server before executing it.
Link to your issue for reference: https://github.com/frida/frida/issues/1269

@imran209 here is the command I used to start frida-server: adb shell "su 0 /data/local/tmp/frida-server -l 0.0.0.0" &.
Maybe you also need to do chmod +x frida-server before executing it.
Link to your issue for reference: #1269

@baptx I tried the command which you shared but now worked, same above error msg.

when i run frida-ps -U it returns:
# frida-ps -U Failed to enumerate processes: this feature requires an iOS Developer Disk Image to be mounted; run Xcode briefly or use ideviceimagemounter to mount one manually
i started fridaserver using root@vbox86p:/data/local/tmp # ./frida-server-32 &
[1] 2547

any help? i'm using emulator with android 6. frida server 12.10.4

Hi,
@oleavr I was setting up Frida-server on the android rooted device and do all these steps
$ adb push frida-server /data/local/tmp/
$ adb shell "chmod 755 /data/local/tmp/frida-server"
$ adb shell "/data/local/tmp/frida-server &"

C:U###sP###AAppDataLocalAndroidSdkplatform-tools>adb shell /data/local/tmp/frida-server &
/system/bin/sh: /data/local/tmp/frida-server: can't execute: Is a directory

and also the following

C:U###sP###AAppDataLocalAndroidSdkplatform-tools>adb shell
shell@kenzo:/ $ su
root@kenzo:/ # /data/local/tmp/frida-server &
[1] 6687
root@kenzo:/ # sush: /data/local/tmp/frida-server: can't execute: Is a directory

Please let me know how to solve this.

Regards,
Imran

Hi锛孻ou can go to releases, search 'frida-server' by keyword, and download to the corresponding compressed package. If you download a not 'frida-server', an error of can't execute: is a directory will appear.

Note that there are many not 'frida-server' packages under releases

Was this page helpful?
0 / 5 - 0 ratings