A shell script to synchronise iTunes music and other data between macOS and Android
This simple shell script allows a user with a macOS computer to synchronise their iTunes library and playlists to an Android device. It is able to track changes to your library and playlists such as additions and deletions.
Android Debug Bridge
Python 3
Java VM
adb-sync
itunesexport.jar
scala-library.jar
- Ensure USB debugging is enabled on your Android device
- Plug Android device into an available USB port
- The script should be set as an executable. If not, then chmod +x android-sync
- There are many ways to execute the program:
- Open a terminal window, navigate to the directory you installed and type: ./android-sync
- Move the executable and dependencies to /usr/local/bin and launch by typing android-sync in a terminal
- Double clicking android-sync in Finder (or create an alias and place on your desktop)
- Open a terminal window, navigate to the directory you installed and type: ./android-sync
- By design, this script requires USB debugging enabled under Developer Options in Android Settings. There is no way around this.
- The storage path is fixed to an external mounted device in the
/storage
directory. As such, this will only work on devices with Android 6.0 and higher. adb-sync.py
cannot detect music files that have been updated with lyrics as this does not change the checksum of the files.- There is currently no way to filter the music library, it will synchronise every song have in iTunes.
- At this stage, there is not support for playlist filtering, however
itunesexport.jar
does support it and may be implemented at a later date. - This has not been tested on an unrooted Android device so I cannot comment on whether this script will work. However, there is no reason why it shouldn't.
- There is no implemented function that checks if there is enough free space on an SD card, so they're may be undocumented issues if a library larger than the external storage is transferred over.
This utility uses the following modules:
- adb-sync.py, a python implementation of the adb push -sync feature but with more granular control over synchronisation of files
- itunesexport.jar, a java program that parses the iTunes Library.xml into .m3u playlists