You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Portal client ignores the foreground Android user (content calls hit user 0; state falls back to uiautomator) #554
With a secondary Android user in the foreground (multi-user device, e.g. user 10), PortalClient in mobilerun_core_local (0.6.3, transport/android/portal_client.py) runs its content-provider commands without --user:
The Portal probe then fails and state falls back to uiautomator dump, which on a screen with playing video (TikTok's
For You feed) never goes idle (ERROR: could not get idle state.), so every get_state attempt fails with uiautomator output did not contain XML and the run stalls at step 1. Keyboard input through the Portal
(keyboard/input) goes to the wrong user the same way.
Expected
Portal calls address the foreground user's Portal (the one whose accessibility service sees the screen).
Repro
Device with a second user (id 10), Portal installed and its accessibility service on in that user.
adb shell am switch-user 10, open an app with autoplaying video.
Run any task with portal_mode: auto, use_tcp: false.
Fix we run locally
At connect(), read am get-current-user; when it is not 0, add --user <id> to every content query / content insert the client sends. User 0 behaviour is unchanged. The content helpers in driver/android/portal.py (overlay offset, visibility, ping) have the same gap.
Activity