fix: use /system/bin/sh for chmod to fix iperf3 binary permission on Android
CI / Analyze & Test (push) Failing after 31s

- The original chmod call used Process.run('chmod', ...) which fails on Android
  because chmod is not available in the app sandbox PATH
- /system/bin/sh is always present on Android and can execute chmod on the
  extracted binary, setting executable permissions before the first run
This commit is contained in:
2026-08-24 10:22:16 +09:00
parent dc41c82d43
commit 369e42d06a
@@ -30,8 +30,11 @@ class Iperf3BinaryPathProvider {
final file = File('${binaryDir.path}/iperf3'); final file = File('${binaryDir.path}/iperf3');
await file.writeAsBytes(bytes.buffer.asUint8List()); await file.writeAsBytes(bytes.buffer.asUint8List());
// chmod +x the binary // chmod +x the binary — /system/bin/sh is always present on Android
await Process.run('chmod', ['+x', file.path]); await Process.run(
'/system/bin/sh',
['-c', 'chmod +x "\$1"', '_', file.path],
);
_cachedPath = file.path; _cachedPath = file.path;
} }