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

fallback pid lookup when application list is empty #176

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,16 @@ def open_target_app(device, name_or_bundleid):
display_name = application.name
bundle_identifier = application.identifier

if not pid:
try:
process = device.get_process(name_or_bundleid)
pid = process.pid
display_name = process.name
bundle_identifier = name_for_bundleid
except frida.ProcessNotFoundError:
display_name = name_or_bundleid
bundle_identifier = name_or_bundleid

try:
if not pid:
pid = device.spawn([bundle_identifier])
Expand Down