Fix setup detection, DNS fallback, and NVIDIA config (#44, #45, #46)#47
Merged
Conversation
…RL, SSH package (#37, #38) - Fix Ctrl+Arrow/Home/End/PgUp/PgDn sending raw sequences instead of xterm Ctrl-modified variants (e.g. \x1b[1;5A for Ctrl+Up) - Make gateway dashboard URL clickable (opens WebDashboardScreen) with primary color + underline styling and open_in_new icon button - Add "Configure" quick action card running `openclaw configure` in terminal - Add OpenSSH as optional package (apt-get install openssh-client openssh-server) Co-Authored-By: Mithun Gowda B <[email protected]>
- Add AiProvider data model with 7 built-in providers (Anthropic, OpenAI, Google Gemini, OpenRouter, NVIDIA NIM, DeepSeek, xAI) - Add ProviderConfigService to read/write provider config in openclaw.json using Node.js safe-merge pattern - Add ProvidersScreen listing all providers with Active/Configured badges - Add ProviderDetailScreen with API key form and model dropdown - Add SshService for sshd lifecycle (start/stop, password, IP discovery) - Add SshScreen with service control, password management, and connection info with copyable ssh commands - Add AI Providers and SSH Access cards to dashboard Co-Authored-By: Mithun Gowda B <[email protected]>
After upgrading to v1.7.3, Android may clear the app's files directory. writeResolvConf() only created the config/ directory but other required directories (tmp/, home/, lib/, proc/sys fakes) were missing, causing proot bind-mount failures. Call setupDirectories() instead of a bare mkdirs() so the entire directory tree is recreated before writing resolv.conf. Also use the two-argument File constructor for correctness. Fixes #40 Co-Authored-By: Mithun Gowda B <[email protected]>
On a normal app launch (setup already complete), setupDirs was never called. If Android cleared the files directory after an upgrade, the config/ directory was missing when writeResolv ran. Now both init() and start() call setupDirs() first, matching the bootstrap flow. The Kotlin-side writeResolvConf() also calls setupDirectories() internally as a safety net. Co-Authored-By: Mithun Gowda B <[email protected]>
#40) setupDirectories() also runs setupLibtalloc() and setupFakeSysdata() which can fail during first-time setup when rootfs hasn't been extracted yet. writeResolvConf() only needs the config/ directory to exist. The Dart-side gateway_service.dart still calls setupDirs() before writeResolv() for the upgrade/restart case where directories may have been cleared by Android. Co-Authored-By: Mithun Gowda B <[email protected]>
After an app update, Android may clear all files. The background GatewayService only called writeResolvConf() which creates config/ dir, but proot also needs tmp/, home/, lib/libtalloc.so.2, and proc/sys fakes for bind mounts. Now setupDirectories() runs before writeResolvConf() in the Android service, matching the Dart-side fix in gateway_service.dart. All paths now covered: - First-time setup: bootstrap calls setupDirs then writeResolv - App open (Dart): init/start call setupDirs then writeResolv - Background service (Kotlin): setupDirectories then writeResolvConf - writeResolvConf itself: mkdirs config dir as safety net Co-Authored-By: Mithun Gowda B <[email protected]>
The previous implementation used single-shot runInProot() which can't run daemons — proot uses --kill-on-exit so sshd dies when the command finishes. Also pgrep/hostname -I don't work reliably inside proot. Changes: - Add SshForegroundService.kt: runs sshd -D (foreground mode) in a persistent proot process with wake lock and notification - Add native bridge methods: startSshd, stopSshd, isSshdRunning, getSshdPort, getDeviceIps, setRootPassword - getDeviceIps uses Android NetworkInterface (not proot hostname -I) - setRootPassword runs chpasswd via processManager.runInProotSync - Register SshForegroundService in AndroidManifest.xml - Rewrite ssh_service.dart to use native methods - Update ssh_screen.dart to fetch IPs from Android Co-Authored-By: Mithun Gowda B <[email protected]>
CTRL/ALT toolbar buttons only worked with other toolbar buttons (arrows, etc.), not with soft keyboard input. Keyboard chars went directly through terminal.onOutput → pty.write(), bypassing the toolbar's modifier state. Fix: Share CTRL/ALT state via ValueNotifier between toolbar and screen. The onOutput handler now checks if modifiers are active and transforms keyboard input (e.g., Ctrl+C sends byte 0x03). Both terminal_screen.dart and configure_screen.dart are fixed. Co-Authored-By: Mithun Gowda B <[email protected]>
… imports Add ctrlNotifier/altNotifier to TerminalToolbar usage in onboarding_screen.dart and package_install_screen.dart (build errors). Remove unnecessary dart:typed_data imports (already provided by package:flutter/services.dart). Co-Authored-By: Mithun Gowda B <[email protected]>
) - writeResolvConf() now uses context.filesDir (Android-guaranteed path) instead of the String configDir which could point to a cleared directory - gateway_service init() wraps writeResolv() in try-catch since it's non-critical when gateway is already running Co-Authored-By: Mithun Gowda B <[email protected]>
Previously these only ran when the gateway was already running. After an app update, the gateway is not running but Android may have cleared the files directory. Moving setupDirs/writeResolv before the isGatewayRunning check ensures resolv.conf always exists before any terminal or gateway operation. Co-Authored-By: Mithun Gowda B <[email protected]>
getProotShellConfig() is called by all screens before starting proot (terminal, configure, onboarding, package install). Adding setupDirs and writeResolv here guarantees resolv.conf exists regardless of which screen the user opens first after an app update. Co-Authored-By: Mithun Gowda B <[email protected]>
The splash screen is the first screen on every app open — reinstall, update, or normal launch. Running setupDirs + writeResolv here guarantees the files exist before any screen can use proot. Co-Authored-By: Mithun Gowda B <[email protected]>
…onf fix - Bump version to 1.8.0 (pubspec.yaml, constants.dart) - Update CHANGELOG with all new features and bug fixes - Update README with new features, file structure, and OpenSSH package Co-Authored-By: Mithun Gowda B <[email protected]>
- writeResolvConf() now has a try/catch fallback: tries context.filesDir first, falls back to string-based configDir path - gateway_service start() wraps setupDirs + writeResolv in individual try-catches so failures don't prevent gateway from starting (the GatewayService.kt foreground service also creates these files) Co-Authored-By: Mithun Gowda B <[email protected]>
Co-Authored-By: Mithun Gowda B <[email protected]>
Co-Authored-By: Mithun Gowda B <[email protected]>
Wrap both calls in try-catch in GatewayService.kt and SshForegroundService.kt so the gateway/SSH process still starts even if directory setup fails. GatewayService now logs warnings if setup fails for debugging. Co-Authored-By: Mithun Gowda B <[email protected]>
The Kotlin writeResolv method channel silently fails in some cases. Added direct Dart file creation as fallback in both splash_screen and terminal_service (getProotShellConfig). Uses dart:io Directory and File APIs to create config/resolv.conf directly, bypassing the method channel entirely. Co-Authored-By: Mithun Gowda B <[email protected]>
bootstrap_service setupDirs/writeResolv were not wrapped in try-catch, so the entire setup failed if writeResolv threw. Added try-catch and Dart dart:io fallback to create resolv.conf directly. Co-Authored-By: Mithun Gowda B <[email protected]>
…40) Every screen and service now has 3 layers of defense: 1. NativeBridge.setupDirs() — Kotlin method channel 2. NativeBridge.writeResolv() — Kotlin method channel 3. dart:io File/Directory — direct Dart fallback Applied to: terminal, configure, onboarding, package_install screens and gateway_service init + start. Co-Authored-By: Mithun Gowda B <[email protected]>
These workflows check Node.js lint/test/audit which is not relevant to the Flutter app. Only the flutter-build workflow is needed. Co-Authored-By: Mithun Gowda B <[email protected]>
- Comment on PRs with build status, version, and direct artifact links - Update existing bot comment instead of spamming new ones - Comment on build failure with link to logs - Add build summary table with file sizes to Actions step summary - Add pull-requests: write permission for PR comments Co-Authored-By: Mithun Gowda B <[email protected]>
- Use fast filesystem check for openclaw in getInstallStatus() with proot exec fallback at 30s timeout (#44) - Add inline resolv.conf creation in GatewayService before proot starts (#45) - Update NVIDIA NIM default models, add custom model input field (#46) - Add direct file-write fallback for provider config save (#46) Co-Authored-By: Mithun Gowda B <[email protected]>
Co-Authored-By: Mithun Gowda B <[email protected]>
Build SuccessfulVersion: Download APKs
Built from e64816a by GitHub Actions |
New ScreenshotService utility captures visible terminal content as high-res PNG via RepaintBoundary. Camera icon added to AppBar on Terminal, Onboarding, Configure, Package Install, and Logs screens. Images saved to app-specific external storage. Co-Authored-By: Mithun Gowda B <[email protected]>
Add ensureResolvConf() in ProcessManager.commonProotFlags() — the single chokepoint for ALL proot operations (install, gateway, sync). This means resolv.conf is verified/created before every bind-mount, regardless of which screen or service triggers proot. Also add inline resolv.conf fallback to SshForegroundService for parity with GatewayService. Co-Authored-By: Mithun Gowda B <[email protected]>
ensureResolvConf() now writes to both locations: 1. $configDir/resolv.conf — used by proot --bind mount (primary) 2. $rootfsDir/etc/resolv.conf — fallback if bind-mount fails This ensures DNS works regardless of how proot handles the bind. Co-Authored-By: Mithun Gowda B <[email protected]>
…point (#45) - BootstrapManager.writeResolvConf() now writes to rootfs/ubuntu/etc/resolv.conf - MainActivity.configureFlutterEngine() ensures dirs + resolv.conf on app start - GatewayService.kt and SshForegroundService.kt inline fallbacks write to rootfs - All Dart-side fallbacks (splash, terminal, onboarding, configure, package_install, gateway_service, bootstrap_service, terminal_service) write to rootfs /etc/ - Survives APK updates: dirs + resolv.conf recreated on every engine init
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getInstallStatus()now uses a fast filesystem check for openclaw/node instead of proot exec (which times out on first login due to dpkg triggers). Falls back to proot exec with 30s timeout and login shell.resolv.confcreation inGatewayService.ktusing plain Java I/O, ensuring DNS config always exists before proot starts.llama-3.3-70b,deepseek-r1), added "Custom..." option in model dropdown with free-text input, and added direct file-write fallback for provider config save when proot/DNS is unavailable.Test plan
node lib/index.js status— should detect openclaw without spawning proot[INFO] resolv.conf created (inline fallback)appears in logs when file is missingkimi-k2.5, save — verify config persistsCloses #44, #45, #46