We are running rsync in daemon mode on our android tablets in order to sync many GBs of media files between the tablets and our server.
We have tablets running android api19 and tablets running android api23.
The process works perfectly on api19 but fails on api23.
We are using a USB connection to sync the tablets (not wifi), with TCP being port forwarded by adb.
On api19 adb can only forward a port from a computer to an android device, it can't forward a port from an android device to a computer and that's why the tablets are running rsync in daemon mode instead of client mode.
(The connection must be initiated on the computer not the tablet).
Anway our problem is caused by the changes to sdcard writing permissions in api23.
rsync fails with various errors but a typical error is:
We then often see a lot of 0 byte files on the tablet, android has started to write a new file to sdcard but failed.
Our rsyncd.conf file reads:
I've tried setting gid to root as well as sdcard_rw but the sync still fails.
Our b4a app - the app that starts the rsync daemon - starts the daemon as root and has the WRTIE_EXTERNAL_STORAGE permission.
Our rsync android binary is also compatible with api23's new Position Independant Executable policy.
I've spent hours trawling through search results looking for a solution but nothing so far has worked.
Has anyone managed to run rsync on an android api23 device and successfully written to the device's external storage?
Can anyone suggest where the problem is?
Thanks.
We have tablets running android api19 and tablets running android api23.
The process works perfectly on api19 but fails on api23.
We are using a USB connection to sync the tablets (not wifi), with TCP being port forwarded by adb.
On api19 adb can only forward a port from a computer to an android device, it can't forward a port from an android device to a computer and that's why the tablets are running rsync in daemon mode instead of client mode.
(The connection must be initiated on the computer not the tablet).
Anway our problem is caused by the changes to sdcard writing permissions in api23.
rsync fails with various errors but a typical error is:
rsync: read error: Connection reset by peer (104)
rsync error: error in socket IO (code 10) at io.c(785) [sender=3.1.2]
We then often see a lot of 0 byte files on the tablet, android has started to write a new file to sdcard but failed.
Our rsyncd.conf file reads:
address = 127.0.0.1
gid = sdcard_rw
list = yes
lock file = <PATH_RSYNC_INTERNAL>/rsyncd.lock
log file = <PATH_RSYNC_INTERNAL>/rsyncd.log
max connections = 6
pid file = <PATH_RSYNC_INTERNAL>/rsyncd.pid
read only = no
# strict modes = false
timeout = 300
uid = root
[sdcard]
comment = sdcard
path = <PATH_SDCARD>
I've tried setting gid to root as well as sdcard_rw but the sync still fails.
Our b4a app - the app that starts the rsync daemon - starts the daemon as root and has the WRTIE_EXTERNAL_STORAGE permission.
Our rsync android binary is also compatible with api23's new Position Independant Executable policy.
I've spent hours trawling through search results looking for a solution but nothing so far has worked.
Has anyone managed to run rsync on an android api23 device and successfully written to the device's external storage?
Can anyone suggest where the problem is?
Thanks.