Category Archives: bittrorrent

Mobile music briefcase using BitTorrent Sync

Streaming, cloud, social, …. Nice stuff! But, what if your behind a firewall and have to rely on the local storage on your mobile device? I was thinking on how to solve this situation, a listen later briefcase.

Use Case

  • You want to select music files to listen to on a device.
  • Costs, Security, and bandwidth limitations preclude streaming.
  • Security will not allow use of thumb drives and other ‘attachable’ devices.
  • You should be able to delete these files.
  • Removing them should not delete the original files.
  • These files should be quickly and securely transferred.

This approach is just a modern version of the “CD storage case” we used in the old days to store some tunes for the long drives.

Solution
One way of implementing this is using BitTorrent Sync (BTSync). Basically we create a “briefcase” folder where we will drop copies of what we want to listen to later. To make this easier to follow, I’ll use the origin as being a Desktop PC. We also create a folder on our mobile devices that will be synchronized with the other folder. BTSync will handle the process of keeping these folders in sync. And, since BTSync is so fast, the sync will happen as the files are dropped on the briefcase folder.

    PC                          Device
+--------+     +---------+     +-----+
| Music  | === |Briefcase| ~~~ |Music|
+--------+     +---------+     +-----+

Though mobile example is used here, the device could be anything, even an automobile with advanced music system. While it is parked in front of home, it could be “charging” on some tunes.

How to setup
1. Of course, you have to first have BTSync installed on both the PC and the mobile devices.
2. Then on your PC run BTSync and choose “Add folder”.
3. Click ‘Generate’ button to generate a secret key.
4. Click ‘Browse’ to navigate to the folder to use as the Briefcase. (I used “Music-BTSync” as the name).
5. On mobile devices create a folder that you want to use as the listen later storage. (I created a “Music-BTSync” on my external SDCard).
5a This folder must be accessible to your mobile music player application.
6. On your mobile device run BitTorrent Sync and choose ‘Add Sync folder’.
7. Use the folder created above.
8. Now we have to get the secret read only key from the PC to the mobile device.
8a. On the PC, share the “Briefcase” folder. By using the mobile option, you can generate a QRcode.
8b. On mobile device, scan or enter that key.
9. On the mobile device, on BTSync’s list “MY SYNC”, the new folder should be listed (mine was music-BTSync).
10. Click the settings sprocket to the right of it.
11. Check on “Automatic sync”

Testing
Loading: Just copy an mp3 into the Briefcase folder on the PC. It should immediately be copied to the mobile device. With a File app on the device you should be able to see it in the sync folder.
Deleting on PC: Delete the file from the Briefcase folder on PC. It should be deleted automatically on the device.
Deleting on Mobile: Load another file on PC, it gets copied. Now delete that file on the mobile device only. It should remain on the PC. This is because of the use of the ‘Read only’ secret key. To change this behavior, do the sharing using a regular secret key.

Listening
This where the problems start. The ability to access and automatically refresh a changed folder varies among portable music player apps. Some like Google Music Player, for example, doesn’t even expose the concept of file folders and other nice to know configuration settings. Poweramp is better in this regard, with some prodding it recognized the new synced files. Still looking for a player that will behave with this sync process.

Alternatives
Various music apps have ways of using caching to store music. They also have various sync capabilities. However, these could be difficult to use in this scenario. Plus, the various parties are trying to monetize content, so optimizing the use of your private music collection is not a great concern.

Does it work?
This morning I put gigabytes of music on a folder on my PC, BTSync synced it to my phone. Now I’m listening to Black Sabbath and Barry White at work. How cool and eclectic is that?

Notes
Microsoft Windows used to have a Briefcase feature. It was removed in Windows 8. This was a limited two-way file synchronization process. With BTSync, there can be many folders in sync. For example, multiple mobile devices can sync to the same PC or home folder.

Tested on
Galaxy Note version 1
Android 4.1.2
BitTorrent Sync v1.3.21.0

Windows 7 64bit
BitTorrent Sync 1.3.94

Related links

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

BitTorrent sync: Unable to start updater process

On Windows 7, an attempt to automatically update BitTorrent Sync (BTSync) fails.

Occurrence
On the BTSync application one receives a notice that there is a newer version, and then clicks on the Update button.
A warning popup windows is displayed:

Unable to start updater process! Please download the newest version manually on ....
Failed to launch exe  C:\Users\.....AppData\Local\...\utt57AC.tmp.exe

Background
When this happens you may find an entry in the Windows Event Viewer management tool. Here is a snippet of the information in the log entry:

Log Name:      Application
Source:        Microsoft-Windows-SoftwareRestrictionPolicies
Level:         Warning
Description:   Access to C:\Users\...\AppData\Local\Temp\utt57AC.tmp.exe has been restricted by your Administrator by location with policy rule ... placed on path C:\Users\...\AppData\Local\*\*.exe.

Fixes?
Add an exception to the Local Security Policy on the computer?
Nope. Many attack programs like the CryptoLocker Ransomware infection use the AppData\Local file path as temporary storage locations.

Manually install the new version?
Download the latest version manually from the BitTorrent Sync web site and install. It does keep any previous configurations.

Related Information

At Cryptolocker: How to avoid getting infected and what to do if you are, there is good advise regarding use of the “hide file extensions of known programs” setting in Windows; users are making it easier for malware authors:

The virus is, of course, an executable attachment, but interestingly the icon representing the executable is a PDF file. With Windows’ hidden extensions feature, the sender simply adds “.pdf” to the end of the file (Windows hides the .exe) and the unwitting user is fooled into thinking the attachment is a harmless PDF file from a trusted sender. It is, of course, anything but harmless.

Links

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.