All Projects → DusanMadar → Pysyncdroid

DusanMadar / Pysyncdroid

Licence: mit
A simple way to synchronize an Android device connected to a Linux PC via MTP over USB

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pysyncdroid

Anki Sync Server
Self-hosted Anki sync server
Stars: ✭ 352 (+6940%)
Mutual labels:  sync
Browser
🌍 Take back your privacy with Dot Browser, the privacy-conscious web browser that protects you from being tracked and monitored online.
Stars: ✭ 475 (+9400%)
Mutual labels:  sync
Seam
Seamless CloudKit Sync with CoreData
Stars: ✭ 659 (+13080%)
Mutual labels:  sync
Rump
Hot sync two Redis servers using dumps.
Stars: ✭ 382 (+7540%)
Mutual labels:  sync
Dstask
Single binary terminal-based TODO manager with git-based sync + markdown notes per task
Stars: ✭ 431 (+8520%)
Mutual labels:  sync
Ffsubsync
Automagically synchronize subtitles with video.
Stars: ✭ 5,167 (+103240%)
Mutual labels:  sync
Jellyfin Kodi
Jellyfin Plugin for Kodi
Stars: ✭ 332 (+6540%)
Mutual labels:  sync
Zephyr
Effortlessly synchronize UserDefaults over iCloud.
Stars: ✭ 722 (+14340%)
Mutual labels:  sync
Tbsync
[Thunderbird Add-On] Central user interface to manage cloud accounts and to synchronize their contact, task and calendar information with Thunderbird
Stars: ✭ 441 (+8720%)
Mutual labels:  sync
Weibo Picture Store
🖼 新浪微博图床 Chrome/Firefox 扩展,支持同步到微相册
Stars: ✭ 624 (+12380%)
Mutual labels:  sync
Vscode Syncing
⚡️ VSCode Extension - Sync all of your VSCode settings across multiple devices.
Stars: ✭ 395 (+7800%)
Mutual labels:  sync
Fitbit Googlefit
Export Fitbit data to Google Fit. Unlike the alternatives such as fitnessyncer.com, this offers very fine intraday granularity (every minute/second data).
Stars: ✭ 409 (+8080%)
Mutual labels:  sync
Git Ftp
Uses Git to upload only changed files to FTP servers.
Stars: ✭ 5,104 (+101980%)
Mutual labels:  sync
Code Settings Sync
🌴💪 Synchronize your Visual Studio Code Settings Across Multiple Machines using GitHub GIST 💪🌴
Stars: ✭ 3,754 (+74980%)
Mutual labels:  sync
Org Noter
Emacs document annotator, using Org-mode
Stars: ✭ 671 (+13320%)
Mutual labels:  sync
Rojo
Rojo enables Roblox developers to use professional-grade software engineering tools
Stars: ✭ 338 (+6660%)
Mutual labels:  sync
Sparkleshare
Share and collaborate by syncing with any Git repository instantly. Linux, macOS, and Windows.
Stars: ✭ 4,661 (+93120%)
Mutual labels:  sync
Monstache
a go daemon that syncs MongoDB to Elasticsearch in realtime
Stars: ✭ 736 (+14620%)
Mutual labels:  sync
Rclone
"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Yandex Files
Stars: ✭ 30,541 (+610720%)
Mutual labels:  sync
Malsync
Integrates MyAnimeList/AniList/Kitsu/Simkl into various sites, with auto episode tracking.
Stars: ✭ 572 (+11340%)
Mutual labels:  sync

Build Status Coverage Status PyPI version Code style: black

PySyncDroid

PySyncDroid is a Python 3 powered CLI tool providing a simple way to synchronize an Android device connected to a Linux PC via MTP over USB.

No special setup is required for the Android device.

Installation

pip install pysyncdroid

System requirements

PySyncDroid leverages lsusb, gvfs, mtp and readlink.

lsusb

Make sure you have lsusb installed on your computer as it is used to discover USB connected devices.

gvfs

Here is a list of gvfs related packages I have installed on my system (Ubuntu 14.04 64b):

[email protected]:~$ dpkg --get-selections | grep gvfs
gvfs:amd64             install
gvfs-backends          install
gvfs-bin               install
gvfs-common            install
gvfs-daemons           install
gvfs-fuse              install
gvfs-libs:amd64        install

Utilities as:

  • gvfs-ls
  • gvfs-cp
  • gvfs-rm
  • gvfs-mkdir
  • gvfs-mount

must be present on your system and executable from the terminal.

mtp

Here is a list of mtp related packages I have installed on my system (Ubuntu 14.04 64b):

[email protected]:~$ dpkg --get-selections | grep mtp
libmtp-common          install
libmtp-runtime         install
libmtp9:amd64          install

Usage

  1. Connect your Android device with an USB cable to your computer
  2. Unlock your device to notify the computer about its presence
    • unlock is conducted only once and it is not necessary that the device stays unlocked during the synchronizing process
    • Developer Options don't have to be enabled on the device
  3. Make sure the device is connected as a Media device (MTP)
    • you should now be able to see your device in computer file manager
  4. Synchronize using PySyncDroid

Examples

For more details about how to use PySyncDroid and what options are available

[email protected]:~/Desktop$ pysyncdroid -h

Synchronize contents of the Rock directory from computer to the device (vendor and model names are case insensitive)

[email protected]:~/Desktop$ pysyncdroid -V samsung -M gt-i9300 -s ~/Music/Rock -d Card/Music/Rock

Synchronize contents of the Music directory from the device to computer, removing unmatched files (i.e. files, which are present only on computer, but not on the device) and overwriting existing files. Also, display what is going on (notice the -v flag). Child directories are automaticaly created in the destination directory (~/Music, in this case) as necessary.

[email protected]:~$ pysyncdroid -ov -V samsung -M gt-i9300 -s Phone/Music -d Music -u remove

Provide a mapping file (see src2dest_example.txt for the file structure) if you need to synchronize more than a single directory.

[email protected]:~/Desktop$ pysyncdroid -V samsung -M gt-i9300 -f /home/dm/Desktop/src2dest_example.txt -v

Device not found error

If you keep getting the following error message Device "<vendor> <model>" not found make sure the device is connected to the computer and you can access it via file manager. Run lsusb and check the output for desired vendor or model names. For example, I get the following string for my Samsung Galaxy SIII Bus 001 Device 011: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-I9300 Phone [Galaxy S III], GT-P7500 [Galaxy Tab 10.1] and therefore I use PySyncDroid as pysyncdroid -V samsung -M gt-i9300.

Limitations & known issues

  • source and destination must be a path to a directory
  • single file synchronization is not supported
  • device path must be a relative path starting with one of the device directories visible in the computer file manager, e.g.:
    • Card/Music
    • Phone/DCIM
    • Tablet/Download

Sync from computer to device

If the sync process takes a bit longer (10+ minutes), it's very likely that you will get an error like: The name :<name> was not provided by any .service files or Message did not receive a reply (timeout by message bus).

It seems like the device drops the MTP connection after a certain amount of time/certaing amount of data transfered. Resetting USB connection (remove and plug the cable back to your computer) and unlocking the device again will reconnect it so you can re-run the last pysyncdroid command. It will continue to sync where it left off (assuming you are not using the -o flag).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].