• PSA: RoundSync for automatic Rclone syncing to desktops from Android

    From Maria Sophia@mariasophia@comprehension.com to comp.mobile.android,alt.os.linux,alt.comp.os.windows-10 on Sun Jun 21 05:58:38 2026
    From Newsgroup: comp.mobile.android

    PSA: RoundSync for automatic Rclone syncing to desktops from Android

    BACKGROUND:
    Folks were having issues with FolderSync Pro on the Android ng, & when I
    looked up what it does, I realized it's similar to what RoundSync does.

    So I figured I'd hack out this UNTESTED tutorial for others to benefit. Normally I'd test all my tutorials, but SMB is a PITA for my situation.

    RoundSync is a FOSS GUI for rclone that runs entirely on Android.
    <https://f-droid.org/packages/de.felixnuesse.extract/>
    <https://github.com/newhinton/Round-Sync>

    It's billed as a "cloud file manager".
    <https://roundsync.com/>
    As it interfaces with all the major cloud providers and protocols.

    Because Rclone supports SMB natively, RoundSync inherits that power.
    Apparently Rclone is a command line tool for Linux, Windows and macOS.
    <https://rclone.org/>

    RoundSync supports dozens of protocols (SMB, SFTP, WebDAV, S3, Google
    Drive, etc.), and, since it's FOSS, it's free & open-source with no ads.
    It has a supposedly reliable background execution (if battery-whitelisted).

    Below is a pseudo tutorial for how to set up RoundSync to automate syncs.
    Bear in mind I can't test it because none of my machines have passwords. However, it should work with Windows and even way easier with Linux.

    RoundSync + SMB Sync Setup (Step-by-Step Tutorial)

    This tutorial shows how to:
    1. Add an SMB share in RoundSync
    2. Create an automated sync task
    3. Use example credentials (user=foo, pass=bar)

    Assumptions:
    a. SMB server IP: 192.168.1.10
    b. SMB share name: Shared
    c. SMB username: foo
    d. SMB password: bar
    e. Local folder to sync: /storage/emulated/0/DCIM
    f. Remote folder to sync: /Shared/PhoneBackup
    g. Sync direction: Local -> Remote (upload only)
    h. Sync schedule: Every 6 hours

    1. Install RoundSync
    Install RoundSync from F-Droid or GitHub.
    Open the app.

    2. Create an SMB Remote
    a. Open RoundSync.
    b. Tap "Remotes".
    c. Tap "Add Remote".
    d. Choose "SMB" as the remote type.
    e. Fill in the fields:

    Name: MySMB
    Host: 192.168.1.10
    Share: Shared
    Username: foo
    Password: bar

    f. Leave "Port" blank unless your server uses a nonstandard port.
    g. Tap "Save".
    h. Tap "Test Connection" to confirm it works.

    If the test succeeds, the SMB remote is ready.

    3. Create a Sync Task
    a. Go back to the main RoundSync screen.
    b. Tap "Tasks".
    c. Tap "Add Task".

    Fill in the task details:
    Task Name: DCIM_to_SMB
    Local Folder:
    /storage/emulated/0/DCIM
    Remote Folder:
    MySMB:/PhoneBackup
    Sync Direction:
    Local -> Remote (Upload only)
    Options:
    i. Overwrite: Enabled
    ii. Delete removed files: Optional
    iii. Dry run: Disabled
    Tap "Save".

    4. Set Up Automatic Scheduling
    a. Open the task you just created.
    b. Tap "Schedule".
    c. Enable "Scheduled Sync".
    d. Choose:
    Interval: Every 6 hours
    Run on WiFi only: Yes (recommended)
    Run on battery saver: No
    e. Save the schedule.

    5. Allow Background Execution (Important)
    Android aggressively kills background tasks unless you whitelist them.
    a. Open Android Settings.
    b. Go to Apps -> RoundSync -> Battery.
    c. Set "Unrestricted" or "Allow background activity".
    d. Disable battery optimization for RoundSync.
    This ensures scheduled syncs actually run.

    6. Test the Sync
    a. Open the task.
    b. Tap "Run Now".
    c. Watch the log output.
    d. Confirm files appear on the SMB share at:
    \\192.168.1.10\Shared\PhoneBackup
    If the test works, the automation should work too.

    As far as I can tell without having actually tested this, RoundSync
    will now automatically sync our chosen folder to our SMB share.

    End of Android rsync to SMB share tutorial (v0p1)

    As always, please correct where I err & add value where I omit
    as the team always knows, collectively, what individuals don't.
    --
    Usenet is a team where every player tries to move the ball forward.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Maria Sophia@mariasophia@comprehension.com to comp.mobile.android,alt.os.linux,alt.comp.os.windows-10 on Tue Jun 23 00:03:54 2026
    From Newsgroup: comp.mobile.android

    Anssi Saari wrote:
    seems to do the same thing?

    I've never heard of RoundSync before.

    I found FolderSync when I was looking for something to replace my rsync
    based backups. I also noticed FolderSync has Tasker support and it
    turned out I had even paid for Tasker maybe a decade earlier.

    So while Tasker is a horrible "automation" thing, after some trial and
    error I got a simple task going which triggers when my phone connects
    to my home wifi. It pings my file server and if that works, then it runs FolderSync to back up my photos and a few other things, using SFTP. So
    in fact it was almost zero setup in the server end, just added a
    key. That's worked for a while now and I'm happy with it.

    I like your humor.
    And your experience.

    That's what Usenet is for.
    Shared knowledge.

    Based on my lookups, FolderSync (and the payware version, Pro), are well respected ways to do cloud management (even if the cloud is SMB on a PC).

    As for Tasker being "a horrid thing", I use the free automation tools,
    Llama Automate, but I do agree with you that it's a horrible thing also.

    Tasker Automate MacroDroid automation
    <https://play.google.com/store/apps/details?id=com.llamalab.automate>
    <https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm>
    <https://play.google.com/store/apps/details?id=com.arlosoft.macrodroid>
    <https://f-droid.org/en/packages/ryey.easer/>

    It works.
    But it has a steep learning curve.

    And... every new version of Android makes everything harder to do.
    At this point, I've given up on "sync" and I just "copy" over Wi-Fi.

    This is my dumb purpose-built copy script, for example, to copy over
    today's camera photos or today's screenshots, as a quickie Wi-Fi copy.

    I don't recommend others use this script, but it does the job for me
    given I never connect the phone over USB but I access it using adb.

    Note: The scrcpy program also has a file copy mechanism, but every
    version of Android makes even that mechanism harder to do easily.

    :: adbcopy.bat
    :: First figure out locations:
    :: /sdcard/Pictures/Screenshots: No such file or directory
    :: /storage/emulated/0/Pictures/Screenshots: No such file or directory
    :: Then figure out file naming conventions
    :: adb shell ls "/storage/0CA4-352D/DCIM/Camera"
    :: 20260521_123358.jpg
    :: FORMAT=Screenshot_YYYYMMDD_HHMMSS_DESCRIPTION.jpg
    :: adb shell ls "/sdcard/Pictures/Screenshots"
    :: Screenshot_20260517_205515_Phone.jpg
    :: Screenshot_20260518_130911_WhatsApp.jpg
    :: Screenshot_20260523_183229_Pulse.jpg
    :: Screenshot_20260611_120637_Nova Launcher.jpg
    :: FORMAT=Screenshot_YYYYMMDD_HHMMSS_DESCRIPTION.jpg
    :: adb pull does not expand wildcards
    :: Wildcards must be expanded inside the shell, not by ADB
    :: v2p3 20260621 added opening the destination folder when done
    :: v2p2 20260621 added screenshot query
    :: v2p2 20260620 Fixed quoting bug in the ls command for DCIM
    :: v2p1 20260617 Added Windows to Android APK copy/install capability
    :: v2p0 20260613 Added Screenshot directory
    :: v1p9 20260528 trim trailing spaces from the destination directory input
    :: v1p8 20260528 replace destructive path truncation with targeted \r stripping
    :: v1p7 20260528 escape redirection character in the backtick loop
    :: v1p6 20260528 update to explicit external SD card path and clean output
    :: v1p5 20260528 fix linux null redirection error and stabilize loop extraction
    :: v1p4 20260528 fix 'unexpected at this time' crash,
    :: v1p3 20260528 fix crash on empty variable comparison
    :: v1p2 20260528 fix multiple-devices error and nested loop quotes
    :: v1p1 20260528 add debug for when it fails
    :: v1p0 20260528 copy images from a given date to a given location

    @echo off
    setlocal enabledelayedexpansion

    cd /d "%~dp0"
    set "ADB_EXE=c:\app\editor\android\scrcpy\adb.exe"

    :: --- DEVICE DETECTION ---
    for /f "skip=1 tokens=1" %%g in ('"%ADB_EXE%" devices') do (
    if not "%%g"=="" (
    if "!ADB_TARGET!"=="" set "ADB_TARGET=%%g"
    )
    )

    if "!ADB_TARGET!"=="" (
    echo [ERROR] No connected ADB devices found.
    pause
    exit /b
    )

    echo Targeting device: %ADB_TARGET%
    echo ----------------

    :: --- MAIN DIRECTION MENU ---
    echo Select Direction:
    echo [1] Android to Windows (Pull Images/Screenshots) [Default]
    echo [2] Windows to Android (Copy/Install APK)
    echo.
    set "CHOICE=1"
    set /p "CHOICE=Enter choice [1 or 2]: "

    if "%CHOICE%"=="2" goto :windows_to_android
    if "%CHOICE%"=="1" goto :android_to_windows
    goto :android_to_windows


    :: ROUTINE: ANDROID TO WINDOWS (ORIGINAL CODE)
    :android_to_windows
    echo.
    echo --- Running Android to Windows Pull ---

    :: --- DATE DETECTION ---
    for /f "tokens=2 delims==" %%i in ('wmic os get localdatetime /value') do set "dt=%%i"
    set "DETECTED_DATE=%dt:~0,8%"

    echo Detected Date: %DETECTED_DATE%
    set /p "USER_DATE=Press Enter to confirm, or type a different date (YYYYMMDD): "
    if "%USER_DATE%"=="" (
    set "TARGET_DATE=%DETECTED_DATE%"
    ) else (
    set "TARGET_DATE=%USER_DATE%"
    )

    echo.
    set "DEST_DIR=H:\004_upload\home\pool\assay\%TARGET_DATE%"
    set /p "USER_DIR=Enter destination directory [Default: %DEST_DIR%]: "
    if not "%USER_DIR%"=="" set "DEST_DIR=%USER_DIR%"

    :: Remove quotes
    set "DEST_DIR=%DEST_DIR:"=%"

    :: Trim trailing spaces
    :trim
    if "!DEST_DIR:~-1!"==" " (
    set "DEST_DIR=!DEST_DIR:~0,-1!"
    goto trim
    )

    if not exist "%DEST_DIR%" (
    echo Creating directory: %DEST_DIR%
    mkdir "%DEST_DIR%"
    )

    echo.
    echo What do you want to pull?
    echo [1] Camera photos (DCIM/Camera)
    echo [2] Screenshots
    set "PULL_CHOICE=1"
    set /p "PULL_CHOICE=Enter choice [1 or 2]: "

    if "%PULL_CHOICE%"=="1" goto :pull_camera
    if "%PULL_CHOICE%"=="2" goto :pull_screenshots
    goto :pull_camera

    :: PULL CAMERA (DCIM)
    :pull_camera
    echo.
    echo Pulling CAMERA images matching *%TARGET_DATE%*.jpg ...
    echo Sending files to: "%DEST_DIR%"
    echo ----------------

    for /f "usebackq delims=" %%i in (`
    %ADB_EXE% -s !ADB_TARGET! shell ls /storage/0CA4-352D/DCIM/Camera/*%TARGET_DATE%*.jpg
    `) do (
    set "FILE_PATH=%%i"
    for /f "delims=" %%r in ("!FILE_PATH!") do set "FILE_PATH=%%r"
    if not "!FILE_PATH!"=="" (
    echo Pulling: !FILE_PATH!
    "%ADB_EXE%" -s !ADB_TARGET! pull "!FILE_PATH!" "%DEST_DIR%"
    )
    )

    :: OPEN DESTINATION FOLDER
    start "" "%DEST_DIR%"

    goto :complete

    :: PULL SCREENSHOTS
    :pull_screenshots
    echo.
    echo Pulling SCREENSHOTS matching *%TARGET_DATE%*.jpg ...
    echo Sending files to: "%DEST_DIR%"
    echo ----------------

    for /f "usebackq delims=" %%i in (`
    %ADB_EXE% -s !ADB_TARGET! shell ls /sdcard/DCIM/Screenshots/*%TARGET_DATE%*.jpg
    `) do (
    set "FILE_PATH=%%i"
    for /f "delims=" %%r in ("!FILE_PATH!") do set "FILE_PATH=%%r"
    if not "!FILE_PATH!"=="" (
    echo Pulling screenshot: !FILE_PATH!
    "%ADB_EXE%" -s !ADB_TARGET! pull "!FILE_PATH!" "%DEST_DIR%"
    )
    )

    :: OPEN DESTINATION FOLDER
    start "" "%DEST_DIR%"

    goto :complete

    :: FINALIZE
    :complete
    echo Process complete
    pause

    REM end of adbcopy.bat

    Note that if this quick-and-dirty script were meant to be general use,
    I'd make it figure out the paths and file names all by itself.
    --
    Usenet is where kind-hearted well-educated people gather to exchange ideas.
    --- Synchronet 3.22a-Linux NewsLink 1.2