ribbons / android-rsync Goto Github PK
View Code? Open in Web Editor NEWBuild script to cross-compile rsync for Android.
License: GNU General Public License v3.0
Build script to cross-compile rsync for Android.
License: GNU General Public License v3.0
Exit code: 12
Output: rsync: [sender] Failed to exec /data/data/com.app/.ssh/id_rsa: Permission denied (13)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.3.0]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(231) [sender=3.3.0]
try {
String libDir = getReactApplicationContext().getApplicationInfo().nativeLibraryDir;
ProcessBuilder builder;
Process process;
List<String> args = new ArrayList<>();
args.add(libDir + "/librsync.so");
// args.add("-e");
// args.add("/data/data/com.app/.ssh/id_rsa"); // Tried with Custom path to SSH binary as well
args.add("-avz");
args.add("/storage/emulated/0/Pictures/Screenshots/Screenshot_2024-04-10-17-26-43-21_84d3000e3f4017145260f7618db1d683.jpg");
args.add("[email protected]:/Users/awesomedev/rsync/"); // Tried with this path as well: ~/rsync/ then error code is 14
builder = new ProcessBuilder(args);
builder.redirectErrorStream(true);
process = builder.start();
BufferedReader inputReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
BufferedReader errorReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
StringBuilder output = new StringBuilder();
StringBuilder errorOutput = new StringBuilder();
String line;
while ((line = inputReader.readLine()) != null) {
output.append(line + "\n");
}
while ((line = errorReader.readLine()) != null) {
errorOutput.append(line + "\n");
}
int exitCode = process.waitFor();
inputReader.close();
errorReader.close();
Log.d("RsyncModule", "Exit code: " + process.exitValue());
callback.invoke("Data transferred. " + "Exit code: " + exitCode + " Output: " + output.toString() + " Errors: " + errorOutput.toString());
} catch (IOException | InterruptedException e) {
Log.e("RsyncModule ", "Error executing command", e);
callback.invoke("Error executing command: " + e.getMessage());
}
Hi thanks for the lib! However it is having warnings as follows:
$ /data/local/tmp/rsync --help
WARNING: linker: /data/local/tmp/rsync: unsupported flags DT_FLAGS_1=0x8000001
rsync version 3.2.7 protocol version 31
Copyright (C) 1996-2022 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
no socketpairs, symlinks, sy
...
Thank you for your work!
This is not really a bug but i don't know where else to report this.
Is it possible that you provide a minimal code example for using your library?
Could not GET 'https://maven.pkg.github.com/ribbons/android-rsync/com/nerdoftheherd/android-rsync/3.2.7/android-rsync-3.2.7.pom'. Received status code 401 from server: Unauthorized
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.