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

Can frida be used in python to wait for Android app spawn ? #240

Open
a2t2 opened this issue Feb 7, 2024 · 0 comments
Open

Can frida be used in python to wait for Android app spawn ? #240

a2t2 opened this issue Feb 7, 2024 · 0 comments

Comments

@a2t2
Copy link

a2t2 commented Feb 7, 2024

In frida-trace there is a -W option that can be used to await spawn, i.e. one can specify API filter with -j flag for a Android APK and use -W to have frida wait for the app to be started.

In python, I see the following APIs:

class Device:

  1. device.spawn(package name) and device.resume(pid) --> spawn process to attachable state, resume process from attachable state
  2. device.attach(pid) --> attach to a process to give session

class Session:

  1. session.create_script() --> create a new script

So based on the above, it appears the app has to be started before JS scripts can be added to monitor APIs.

My questions are as follows:

  1. How is attachable state defined ? Does it mean process has started executing ?
  2. Is there a way in python to match behavior of the -W flag, i.e. mention which scripts need to be loaded before app process is started, and then start the app process ?
  3. Does spawn / resume by default starts the main activity of the specified app ?
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

1 participant