Remote adb/simctl passthrough corrupts binary stdout (exec-out screencap returns U+FFFD instead of 0x89)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- android, node.js, typescript
Research direction
Start by tracing the remote adb command path used with --url or SIMLOCK_URL, from the CLI through the worker response handling. Check where stdout is converted between bytes and text, then look for tests covering streamed command output. Done means the repro returns a PNG beginning 8950 4e47 0d0a 1a0a; the issue names no relevant source or test files.
Written by the indexing model from the issue text.
Description
What happens
When a command runs on a worker through a farm URL (simlock --url <farm-url> adb …, or with SIMLOCK_URL set), binary stdout comes back corrupted. A PNG from screencap starts with ef bf bd 50 4e 47 instead of 89 50 4e 47: the 0x89 byte has been replaced by the UTF-8 replacement character (U+FFFD). It looks as if the output is decoded as UTF-8 text somewhere on the remote path and re-encoded.
The docs use this exact command (using-devices/build-and-run.mdx):
simlock adb -s "$SERIAL" exec-out screencap -p > home.png
using-devices/run-commands.mdx says that through a gateway or farm URL the worker runs the command and "streams the output back", with no caveat about binary output.
Repro
- Lease an Android emulator through a farm URL:
simlock --url <farm-url> lease --platform android --detach --ttl 5m - Run:
simlock --url <farm-url> adb --lease <lease> exec-out screencap -p > out.png - Run
xxd out.png | head -1.
Expected: 8950 4e47 0d0a 1a0a (a valid PNG).
Actual: efbf bd50 4e47 …. The file isn't a valid image, and any other byte ≥ 0x80 is mangled the same way.
Workaround
adb shell "screencap -p /sdcard/s.png && base64 /sdcard/s.png", then decode locally.
Environment
- simlock 0.9.0 (CLI and daemon)
- macOS worker on Apple Silicon, Android emulator, API 34 and 35
- Command sent through the farm URL, so the worker runs it and streams the output back
The same likely applies to simlock simctl … io screenshot to stdout, and to any binary output streamed back from a worker. Not verified.
- Dominant language
- TypeScript
- Stars
- 730
- Forks
- 44
- Avg merge
- 15h 44m
- Merged PRs (30d)
- 378
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstackincubator/simlock
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
callstackincubator/simlock#2113 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
callstackincubator/simlock#2112 ·
Maintainers usually reply within 1 day
-
platform:ios task:ready
Difficulty 5/5 Over a week Newbie friendliness 20/100
callstackincubator/simlock#2107 ·
Maintainers usually reply within 1 day
-
platform:ios request:new
Difficulty 5/5 Over a week Newbie friendliness 28/100
callstackincubator/simlock#2106 ·
Maintainers usually reply within 1 day
-
platform:ios task:ready
Difficulty 3/5 1-2 days Newbie friendliness 76/100
callstackincubator/simlock#2105 ·
Maintainers usually reply within 1 day
All issues in callstackincubator/simlock
Similar issues
-
BUG: Backend Docker build fails due to Go version mismatchPossibly taken @Aakriti0207 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 93/100
gittuf/visualizer#203 ·
Maintainers usually reply within 2 days
-
bug 🐛
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
BaaRai/ARTEX#981 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Inbox: permission prompt (perm:) sessions appear as duplicate agents in the recipient picker and participantsPossibly taken @Djiit claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
backnotprop/plannotator#4517 ·
Maintainers usually reply within 1 day