nowsecure / r2frida

Radare2 and Frida better together.
MIT License
1.18k stars 121 forks source link

Support Package Name Attaching #328

Closed apkunpacker closed 3 years ago

apkunpacker commented 3 years ago

Frida server on localhost and random port - ./frida-server -l 127.0.0.1:1234

and in another Terminal -

$ r2 frida://attach/remote/127.0.0.1:1234/com.whatsapp
Process not found
[r] Cannot open 'frida://attach/remote/127.0.0.1:1234/com.whatsapp'

while

r2 frida://attach/remote/127.0.0.1:1234/whatsapp

works fine. may be this is related to issue https://github.com/nowsecure/r2frida/commit/bd6803e1f672d770e1c3da0ffbb2b35646359211

enovella commented 3 years ago

Can you please try this? Do you need to adb forward the TCP port?

$ r2 frida://attach/connect/127.0.0.1:1234/com.whatsapp
apkunpacker commented 3 years ago

Can you please try this?

$ r2 frida://attach/connect/127.0.0.1:1234/com.whatsapp

Process not found [r] Cannot open 'frida://attach/connect/127.0.0.1:1234/com.whatsapp'

oleavr commented 3 years ago

@apkunpacker The process name is typically different from the package name. This was among the breaking changes in Frida 15. (It's now consistent with the behavior on iOS.)

as0ler commented 3 years ago

com.whatsapp is the package name. You should use launch or spawn in the r2frida command line to make it work:

Screenshot 2021-08-19 at 19 22 30
apkunpacker commented 3 years ago

com.whatsapp is the package name. You should use launch or spawn in the r2frida command line to make it work:

Screenshot 2021-08-19 at 19 22 30

launch and spawn working with package name but attaching not working

as0ler commented 3 years ago

Why do you need package name with Attach? Is there any use case not already covered?