Skip to content
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

GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 're.frida.HostSession' on object at path /re/frida/HostSession #8

Closed
hackappcom opened this issue Nov 26, 2014 · 6 comments

Comments

@hackappcom
Copy link

After successful compilation, I try to find and run frida-ps (android server already launched and ports are forwarded) according this manual http://www.frida.re/docs/android/

And get this (I've checked permissions twice :) :

afx237@bright ~/frida> find | grep frida-ps
./frida-python/src/frida-ps.in
./build/tmp-linux-x86_64/frida-python3.4/src/frida-ps
./build/tmp-linux-x86_64/frida-python2.7/src/frida-ps
./build/frida-linux-x86_64/bin/frida-ps
afx237@bright ~/frida> ./build/frida-linux-x86_64/bin/frida-ps


Failed to load the Frida native extension: dynamic module does not define init function (init_frida)
Please ensure that the extension was compiled for Python 2.7.


Traceback (most recent call last):
File "./build/frida-linux-x86_64/bin/frida-ps", line 9, in
frida.ps.main()
File "/home/afx237/frida/build/frida-linux-x86_64/lib/python3.4/site-packages/frida/ps.py", line 58, in main
app.run()
File "/home/afx237/frida/build/frida-linux-x86_64/lib/python3.4/site-packages/frida/application.py", line 57, in run
mgr = frida.get_device_manager()
File "/home/afx237/frida/build/frida-linux-x86_64/lib/python3.4/site-packages/frida/init.py", line 43, in get_device_manager
raise ex
ImportError: dynamic module does not define init function (init_frida)

@oleavr
Copy link
Member

oleavr commented Nov 26, 2014

This sounds like a mix-up of Python 2.x vs 3.x – are you using Python 3.x with the 3.x extension you compiled?

@oleavr
Copy link
Member

oleavr commented Nov 27, 2014

Ahh yes, frida-ps and the other CLI tools installed by frida-python, pick up the default python:
#!/usr/bin/env python
So in the above output you seem to have the frida-python extension for python 3.x in your PYTHONPATH, and /usr/bin/env python presumably resolves to python 2.x.

@hackappcom
Copy link
Author

Thanks, I've figured out with python (package manager in ARCH changes all python-related symlinks to Python3).

Right now,

  1. I've started server on android device
  2. performed adb port forward (according to manual)
  3. performed easy_install
  4. downloaded scripts from ospy.org/frida/linux/lib/python2.7/site-packages/frida
  5. ...and when I run python ps.py -R

Failed to enumerate processes: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 're.frida.HostSession' on object at path /re/frida/HostSession

Any ideas what am I doing wrong ?)

@hackappcom
Copy link
Author

Android:

Linux localhost 3.4.0-cyanogenmod-g2bac6fc #1 SMP PREEMPT Wed Oct 8 06:00:13 PDT 2014 armv7l GNU/Linux

SAMSUNG GALAXY GT-19190

@hackappcom hackappcom changed the title Failed to load the Frida native extension: dynamic module does not define init function GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 're.frida.HostSession' on object at path /re/frida/HostSession Nov 28, 2014
@oleavr
Copy link
Member

oleavr commented Dec 1, 2014

Aha. I see what's going on here. This is my fault. The latest Frida release didn't produce a new Android binary, and turns out there's a compatibility issue that prevents the latest release from communicating with older frida-server binaries. If you redownload frida-server for Android, this issue should now be resolved.

@hackappcom
Copy link
Author

Now it works ! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants