Frida server doesn’t work in anbox emulator

Bug #2043979 reported by Demis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Anbox Cloud
Triaged
High
Gary.Wang

Bug Description

Hi,

I prepared an addon to install frida server into my anbox emuator with this architecture:

ANBOX IMAGE: jammy:android12:amd64
ARCHITECTURE: x86_64

I launch a new container and I expose adb (-s +adb) and frida server port(with adb forward command) but some commands works correctly ex.: frida-ps, instead frida command to spawn an application doesn’t work.

this is the command that i run from my host(local):
frida -H 127.0.0.1:27042 --debug -t 5 -f com.whatsapp

this is the command result:
____
/ _ | Frida 16.0.19 - A world-class dynamic instrumentation toolkit
| ( _ | |
> _ | Commands:
/_ / |_| help -> Displays the help system
. . . . object? -> Display information about ‘object’
. . . . exit/quit -> Exit
. . . .
. . . . More info at https://frida.re/docs/home/
. . . .
. . . . Connected to 127.0.0.1:27042 (id=socket@127.0.0.1:27042)
Failed to spawn: unexpectedly timed out while waiting for app to launch

So, I received always timeout error, and i see that target app(whatsapp in this case) starts correctly in anbox emulator.

There aren’t frida error in logcat logs.

I try also an android 12 created with android studio and frida server works correctly, so the problem is only on ANBOX android 12

This is the topic link that I've already open on "https://discourse.ubuntu.com/":
https://discourse.ubuntu.com/t/frida-server-doesnt-work-in-anbox-emulator/38969

Thanks a lot,
Bye,
Demis.

Revision history for this message
Simon Fels (morphis) wrote :

Thanks a lot Demis!

We will take a look and update here with our findings.

Changed in anbox-cloud:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.20.1
Simon Fels (morphis)
Changed in anbox-cloud:
assignee: nobody → Gary.Wang (gary-wzl77)
Revision history for this message
Gary.Wang (gary-wzl77) wrote :

Hey Demis,
  Regarding Anbox, as Android is running within a nested LXC container, it appears that Frida doesn't handle this case well, leading to a timeout error because the correct PID is not found.
  As suggested in the following thread, could you please give the workaround a try and check if it resolves the issue?

  https://discourse.ubuntu.com/t/frida-server-doesnt-work-in-anbox-emulator/38969/2?u=gary-wzl77

  Thanks.

Gary

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.