Sync music library with android using dolphin

currently the process is tedious and time consuming—delete the entire library from the phone, then copy the entire library back over to the phone.

the goal is to mirror the music library from the PC to the Music folder on the Android phone so that when changes are made to the files/folders on the PC they will be “mirrored” on the phone by adding or deleting files/folders (or renaming) as needed whenever i do the sync.

when i plug the phone into the USB port, the system tray asks to open the device in the file manager and there, dolphin shows the device as

mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9/

in this state i can drag and drop NEW files/folders to the phone without issue but if try to drag over something that already exists i get the error that just says it cannot create the folder… this forces me to delete the existing folder on the phone so it can write to the mtp: address.

another approach (w/limited success) is to use KDE-Connect

when i go to KDE-connect on the PC and choose “browse files” for my phoen, it will open a new tab with the address of kdeconnect://some_long_ass_number.

in this situation i CAN drag folders over that already exist and it WILL give the conflict dialog box where i can choose “Write into” and that works to copy the files over, but it will still make duplicates rather than rename/replace a file, so it’s not really a “mirror” in they way that rsync works.

also tried using either backintime or the KDE backup utillity to try and create a mirror as an archive, but neither of them will recognize the mtp: or kdeconnect: address as a destination for the backup.

also tried the freefilesync and while i can see the Android device listed in the file browser, when i choose it, i get the error “unable to open the mtp device”

is there something obvious that i’m missing?

is anyone else able to do this without issue?

kinfo

Operating System: Kubuntu 24.04
KDE Plasma Version: 5.27.12
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13
Kernel Version: 6.17.0-20-generic (64-bit)
Graphics Platform: X11
Processors: 28 × Intel® Core™ i7-14700K
Memory: 62.5 GiB of RAM
Graphics Processor: AMD Radeon RX 6800

edit: additional info

also installed are:

go-mtpfs
jmtpfs

is there another package i should be using?

Maybe syncthing / syncthing-fork can do what you need?

that looks like a lot more than i need, but may be where i end up (sort a KDE-Connect on steroids when it comes to file transfer).

  • it uses the network, where i just want a USB solution that works only when connected.

  • it seems to require an ongoing service installed and running on both devices all the time

i’ve found the adb package (Android Debug Bridge) on the kubuntu repositories, but despite having a sync command, it does not actually delete files like rsync does, it only copies which i can just do from dolphin thru KDE-connect.

i found a sync script for using adb but despite using rsync on a local copy, it does not enforce the changes on the android device, it only copies …. which again, i can just do with dolphin.

also found this

but it seem doughy and will not install using the pip install BetterADBSync command shown in the README, and i am unwilling to use the --break-system-packages option.

On the setup I use (“Syncthing-Fork” app on the Android side and “SyncThingy” Flatpak on the Linux side), you can set both applications not to auto-start, and just run them when you need them if you prefer it like that.

i’m gonna mark this as i’ve been playing with it and while quite complex it is getting the job done.

i would probably be happier if this were a feature of kde connect or if the github rewrite of adb were to make it into the official repositories.

but syncthing does what i need, thanks.