v1.7.3: Fix DNS reliability, add snapshot backup & storage access#36
Merged
v1.7.3: Fix DNS reliability, add snapshot backup & storage access#36
Conversation
Owner
mithun50
commented
Feb 27, 2026
- Fix Connection error #34: Write resolv.conf before every gateway start (Flutter + Android foreground service) so DNS never breaks from cache clearing
- Fix Mismatched Version number in flutter_app/lib/constants.dart #35: Sync version strings across constants.dart, pubspec.yaml, package.json, and lib/index.js to 1.7.3
- Fix Snapshot #27: Add config snapshot export/import under Settings > Maintenance, with dashboard quick action card
- Add Termux-style storage access: request MANAGE_EXTERNAL_STORAGE, bind-mount /sdcard into proot, save snapshots to /sdcard/Download/
- Bump version to 1.7.3+10
- Fix #34: Write resolv.conf before every gateway start (Flutter + Android foreground service) so DNS never breaks from cache clearing - Fix #35: Sync version strings across constants.dart, pubspec.yaml, package.json, and lib/index.js to 1.7.3 - Fix #27: Add config snapshot export/import under Settings > Maintenance, with dashboard quick action card - Add Termux-style storage access: request MANAGE_EXTERNAL_STORAGE, bind-mount /sdcard into proot, save snapshots to /sdcard/Download/ - Bump version to 1.7.3+10 Co-Authored-By: Mithun Gowda B <mithungowda.b7411@gmail.com>
Add tools namespace and tools:replace="android:maxSdkVersion" on WRITE_EXTERNAL_STORAGE to override the camera library's maxSdkVersion=28 with our maxSdkVersion=29. Co-Authored-By: Mithun Gowda B <mithungowda.b7411@gmail.com>
…roperly - Bind the whole /storage directory (not just /storage/emulated/0) so Android's FUSE symlinks and sub-mounts resolve correctly inside proot - Check Environment.isExternalStorageManager() on Android 11+ instead of just canRead(), which returns true even without actual file access - Create /sdcard symlink inside rootfs pointing to /storage/emulated/0 - Bind both /storage:/storage and /storage/emulated/0:/sdcard for maximum compatibility (matches Termux proot-distro behavior) Co-Authored-By: Mithun Gowda B <mithungowda.b7411@gmail.com>
Automatically prompts for "All files access" (Android 11+) or READ/WRITE_EXTERNAL_STORAGE (older) when the app starts, so /sdcard is accessible in proot without needing to manually go to Settings. Co-Authored-By: Mithun Gowda B <mithungowda.b7411@gmail.com>
The terminal builds its own proot args in Dart (terminal_service.dart) separately from ProcessManager.kt. Added /storage and /sdcard bind mounts to buildProotArgs() so the terminal shell also has access to shared storage when permission is granted. Co-Authored-By: Mithun Gowda B <mithungowda.b7411@gmail.com>
6 tasks
mithun50
added a commit
that referenced
this pull request
Mar 1, 2026
…onf fix (#36-#40) (#42) * Fix Ctrl key for arrows/special keys, add Configure menu, clickable URL, 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 <mithungowda.b7411@gmail.com> * Add multi-provider AI model selection and SSH remote access - 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 <mithungowda.b7411@gmail.com> * Fix resolv.conf ENOENT after app upgrade (#40) 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 <mithungowda.b7411@gmail.com> * Call setupDirs before writeResolv in gateway init and start (#40) 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 <mithungowda.b7411@gmail.com> * Fix writeResolvConf: only mkdirs config dir, not full setupDirectories (#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 <mithungowda.b7411@gmail.com> * Call setupDirectories in GatewayService before proot starts (#40) 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 <mithungowda.b7411@gmail.com> * Rewrite SSH to use native foreground service for persistent sshd 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 <mithungowda.b7411@gmail.com> * Fix Ctrl key for soft keyboard input in terminal and configure screens 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 <mithungowda.b7411@gmail.com> * Fix Ctrl key in onboarding and package install screens, remove unused 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 <mithungowda.b7411@gmail.com> * Fix resolv.conf ENOENT: use context.filesDir, make init() resilient (#40) - 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 <mithungowda.b7411@gmail.com> * Run setupDirs + writeResolv unconditionally on app open (#40) 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 <mithungowda.b7411@gmail.com> * Ensure dirs + resolv.conf exist before every proot operation (#40) 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 <mithungowda.b7411@gmail.com> * Ensure dirs + resolv.conf on every app launch via splash screen (#40) 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 <mithungowda.b7411@gmail.com> * v1.8.0: AI Providers, SSH Access, Ctrl keys, Configure menu, resolv.conf 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 <mithungowda.b7411@gmail.com>
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.