Skip to content

Can't run Drozer commands unless the app is in focus #478

@logosred

Description

@logosred

Hello, I'm running into an issue with Drozer.

2025-05-31.18-07-41.mp4

If the Drozer agent app isn't in focus on the device, most of the commands I run from the Drozer console (like starting activities) don't do anything, no errors, just nothing happens.

But if I bring the Drozer app to the foreground first (i.e., open it manually and leave it on screen), then the same commands work fine.

I tested the same actions using ADB, and ADB can launch those activities even when Drozer is in the background. I recorded a video showing this side-by-side and will attach it here.

Is this expected behavior due to Android background execution restrictions? Is there a recommended workaround for this (maybe running a foreground service or something similar)?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions