Wrapping the tools you already have
Rudra Narayan Panda ·
lazymobile is a terminal dashboard for mobile development: iOS simulators, Android emulators, connected phones, their logs, and Expo builds in one screen. It is one Go binary that calls xcrun, adb, emulator and eas. Its device logic started in devices.nvim, the same idea as a Neovim plugin, and was ported to Go.
Wrapping existing tools sounds easy. The work is in what those tools do not promise: stable output, one process id per app, and a place where a release build's print() goes. Here are the parts that took thought.
the output changes under you
lazymobile does not link to any Apple or Android library. It runs the tool and parses what comes back, so the parser is the contract. simctl alone has two generations of output. Modern versions report isAvailable as a boolean. Older ones report an availability string. Runtime keys changed too, from names like iOS 12.1 to SimRuntime.iOS-18-2. Both are read:
func available(isAvailable *bool, availability *string) bool {
if isAvailable != nil {
return *isAvailable
}
return availability == nil || *availability == "(available)"
}
devicectl, which lists physical iPhones, moved its fields under properties in Xcode 27 and reports versions as an object with a stringValue. The parser reads the new layout first and falls back to the old one. One more rule: each device entry is decoded on its own, so one malformed entry cannot hide the rest of the list.
following an Android app across restarts
adb logcat prints a process id on every line. Filter on one pid and the log goes quiet the moment the app restarts, because the new process has a new pid. lazymobile keeps a set of pids for the package instead, and fills it from two places:
adb shell pidof <package>, asked once before streaming starts and then every 2 seconds. Asking first means the earlier lines of an app that is already running are not dropped for arriving before its pid is known.- The
Start proc <pid>:<package>line that Android logs when it launches the process, which the filter reads from the stream itself.
func (f *AppFilter) Accept(line Line) bool {
if m := f.start.FindStringSubmatch(line.Text); m != nil {
f.pids[m[1]] = true
return true
}
if line.PID != "" && f.pids[line.PID] {
return true
}
return strings.Contains(line.Text, f.pkg)
}
The last line keeps anything that names the package, so crash reports and system messages about your app stay in view even when they come from another process.
the release build that prints nothing
On iOS, a release app's print() and NSLog output goes to its standard output, and only the tool that launched the app sees that. Open the system log for a release build and you will not find it. So alongside the system log, lazymobile offers to launch the app itself and show its output. On a simulator that is simctl launch --console-pty. A pseudo-terminal keeps the app's output line-buffered, so lines arrive as they are printed and not in a late burst. On a phone it is devicectl device process launch --console.
treat the arguments as untrusted
A dashboard that builds command lines from names on a screen needs rules about what reaches the shell.
adb shelljoins its arguments into one command line for the device's shell, so an app id is checked against a plain pattern (letters, digits, dots, underscores, dashes) before it gets there. An iOS process name goes into a log predicate, so it gets the same check.- Erase, delete and wipe always ask first, and real phones are never booted, erased or deleted.
- The Expo builds pane does not run
easuntil you press enter in it, becauseeasruns your project's own configuration code and uses your Expo login. Starting a build shows the exact command and asks first, and a profile with "prod" in its name must be typed out. - Log lines are stripped of terminal control sequences before they are drawn, since a log line should not be able to move your cursor. Saved logs are readable only by you, because logs can hold tokens and personal data.
what I have and have not tested
The README keeps a status table, and I would rather say it here than let you find out. Tested on real hardware or real tools:
- iOS simulators on Xcode 27.2: list, boot, shut down, install an app and both kinds of logs, with a real React Native app.
- Android emulator boot, shut down and logcat, and a real Android phone.
- An iPhone, listed over USB.
- The Expo builds pane: listing, details, and downloading and installing builds, with eas-cli 24.7 and a real Expo project.
Tested with fake tools only:
- An iPhone's logs and
idevicesyslog. - Starting and cancelling Expo builds.
Fake tools are how most of the suite runs in CI, on Ubuntu and macOS. They prove the parsing and the flow, not that a real device agrees.
try it
brew install 0xrnp/tap/lazymobile
lazymobile doctor
lazymobile doctor says what is missing and how to install it. If something fails, the issue form asks for its output. The Neovim version is devices.nvim.