Offline and Air-Gapped Distribution
Certain operational sectors (defense, secured trading floors, rural branch banks lacking persistent Internet connectivity, maritime vessels, mining concessions) require software updates to execute in strictly air-gapped or low-bandwidth environments.
TkushPatch includes capabilities to export, transport, and deploy OTA patches without demanding active online connections to the centralized control plane.
1. Air-Gapped Deployment Architecture
- Connected Hub: Download signed patch bundles and metadata from the Web Console.
- Secure Transfer: Relay packages through authorized encrypted removable storage or private network.
- Isolated Edge: Serve packages from a local intranet relay or directly to devices.
2. Manual Artifact Export from the Web Console
To construct an offline update bundle:
- Authenticate to the TkushPatch web console (
/releases). - Open the release inspector pane (
ReleaseDetailInspectorPane). - Inside the contextual action menu (
PatchActionMenu), select Download Binary Artifact:- The browser downloads the compressed differential file (e.g.,
patch_v1.0.0_1.vmcode).
- The browser downloads the compressed differential file (e.g.,
- Download the corresponding manifest record containing:
- Target SHA-256 digest (
targetSha256Hash). - Base64 RSA digital signature digital signature.
- Public key in public signing key format representation.
- Target SHA-256 digest (
3. Local Patch Injection via the Mobile SDK
The Flutter SDK tk_ota_push exposes a dedicated API method to apply a differential payload stored directly on the handset's local filesystem (transferred via USB cable, secure SD card, or local Bluetooth/Wi-Fi share):
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:tk_ota_push/tk_ota_push.dart';
Future<void> applyOfflinePatch(String vmcodeFilePath, String signatureBase64) async {
final patchFile = File(vmcodeFilePath);
if (!await patchFile.exists()) {
throw Exception("The specified patch artifact does not exist on local storage.");
}
// Execute local application with strict cryptographic verification
final result = await TkOtaPush.applyPatchFromFile(
patchFile: patchFile,
signatureBase64: signatureBase64,
);
if (result.isSuccess) {
debugPrint("✅ Offline patch successfully applied!");
// Restart application to mount the new binary into the AOT runtime
await TkOtaPush.restartApp();
} else {
debugPrint("❌ Offline application failed: ${result.errorMessage}");
}
}
[!IMPORTANT] Even during offline execution, the native Rust engine strictly refuses to execute any file whose RSA signature or SHA-256 digest fails verification. The integrity chain of custody is absolute and independent of network reachability.
4. Local Branch Office Caching Relays
In remote branch offices cut off from the wide-area corporate WAN but possessing a local Wi-Fi LAN:
- Stage
.vmcodedifferential files and apatches.jsonmanifest onto a local micro-server (e.g. lightweight Nginx on a branch POS or Raspberry Pi). - Configure application bootstrap to target the local fallback proxy:
await TkOtaPush.initialize(
overrideEndpoint: "http://192.168.1.100:8080/ota-cache",
); - When field branch employees connect to the internal branch Wi-Fi in the morning, handsets retrieve updates locally from the office server without consuming satellite or cellular bandwidth.