Failed to attach (to spawn) android process - Python frida

I want to connect to a running process and use JS script. But when trying to execute the command: frida -U -l script.js -f com.android.app an error occurs:

    / _  |   Frida 12.6.5 - A world-class dynamic instrumentation toolkit
   | (_| |
    > _  |   Commands:
   /_/ |_|       help      -> Displays the help system
   . . . .       object?   -> Display information about 'object'
   . . . .       exit/quit -> Exit
   . . . .
   . . . .   More info at http://www.frida.re/docs/home/
Failed to spawn: unable to find application with identifier 'com.android.app'

At the same time, the application finishes its work and crashes. The peculiarity is that the application has no Activity with the intent-filter parameter "Launch". Why does Frida restart the application? Why does the running process end? What do i do?

Asked Apr 29 '22 03:04
avatar sdroider
sdroider

3 Answer:

same here, i have even downgraded frida-server to 12.2.27 macedonians% frida -U -l /home/kira/Desktop/frida.js --no-paus -f com.twitter.com __ / _ | Frida 12.2.27 - A world-class dynamic instrumentation toolkit | (_| |

_ | Commands: // || help -> Displays the help system . . . . object? -> Display information about 'object' . . . . exit/quit -> Exit . . . . . . . . More info at http://www.frida.re/docs/home/ Failed to spawn: unable to find application with identifier 'com.twitter.com' macedonians%

1
Answered Mar 06 '20 at 04:25
avatar  of levionessa
levionessa

You might have more than one USB device plugged in. Check with frida-ls-devices, and specify -D <device-id> instead of -U to pick a specific one. Use frida-ps -D <id> -ai to list installed apps and make sure com.android.app is in that list. Also make sure you're running the latest Frida while doing this. (Many Android-related fixes happened in recent releases.)

1
Answered Mar 06 '20 at 15:28
avatar  of oleavr
oleavr

#oleavr, It is not Okay " Error message is Failed to spawn: unable to find application with identifier com.android.app"

1
Answered Apr 29 '22 at 03:04
avatar  of Lwin Moe
Lwin Moe