sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.33k stars 840 forks source link

Objection error message in non-rooted android device #476

Closed ganesh2183 closed 1 month ago

ganesh2183 commented 3 years ago

OS: Windows 10 Python version: 3.8.2 Frida version: 15.0.9

Patched android apk for Non-rooted android. Trying to connect to non-rooted android device using objection. Unable to connect to android device, how to solve this issue.

16278828406077073580405835093822

nivzye commented 3 years ago

Hey, this is due to a recent change in Frida. A workaround is to find the process ID (PID) when launching the app using frida-ps -U, then use that PID and use it with objection like this; objection --gadget PID explore

hope this helps :)

ganesh2183 commented 3 years ago

Thanks for your reply.

Once patched apk installed into non-rooted android device. When i run frida-ps -U command, I m seeing only "waiting for USB device to appear..." It is not showing any PIDs, why??

How to solve this.

nivzye commented 3 years ago

Are you using a physical device or emulator?

nivzye commented 3 years ago

can you adb into the device? adb shell

ganesh2183 commented 3 years ago

I m using real device and able to run adb shell command.

ganesh2183 commented 3 years ago

Hi, any update on this issue.

leonjza commented 3 years ago

@ganesh2183 I'll suggest you try and get just the vanilla frida command working and connected to your app first.

ganesh2183 commented 3 years ago

What is vanilla Frida command to check it is working.

Pls need your help

ganesh2183 commented 2 years ago

@ganesh2183 I'll suggest you try and get just the vanilla frida command working and connected to your app first.

@leonjza Tried Frida command, it is working as expected with Android emulator. With frida-ps -Uia command it list all process running in emulator.

But when try with non rooted android device (real device) , we are getting the above error message as 'device not found'.

Please help me to solve this.

ganesh2183 commented 2 years ago

@leonjza Could you help to resolve this issue.

leonjza commented 2 years ago

Sorry, I don't really know what is wrong. If frida-ps is not working for you on a real device, then objection probably wont either.

The best I can do now is to tell you that this is the function call that is of interest in case you want to spend some time debugging.

sky281998 commented 2 years ago

Upgrade frida to the latest version Upgrade frida tools Patch the APK with the latest frida gadget Once installed -> open the APK -> frida-ps -U (get the PID) -> Use the PID to open the APK (objection --gadget "PID" explore)

Not sure why I'm not able to open it through the package name. but this surely helped me.

Give a heads up if that works for you too

IPMegladon commented 1 month ago

Stale issue, feel free to reopen.