Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

[Mac] How to Format USB into 2 Partitions for DashCam and Music

This site may earn commission on affiliate links.
Any time you move files onto a disk (even one formatted Fat32) on a Mac also includes a hidden file with each file visible file. There may be a way to get rid of them on a Mac, but I found it easiest to stick the drive in a PC and just delete those extra files.

Prior to my M3, I had a Ford Taurus Limited (really liked that car) and had thrown 7500 or so songs on a USB drive to have in my car. I had a lot of issues with hanging titles. Once I deleted the hidden files on my PC, it eliminated the hanging issues. (I can't recall if I had issues with songs ending early.)

I have yet to get a drive installed in my M3, so I can't comment further.
 
Any time you move files onto a disk (even one formatted Fat32) on a Mac also includes a hidden file with each file visible file.
This isn't true - are you thinking of Linux or the android file system? While there are a small number of hidden files in each directory on a mac, there isn't the one on one hidden files that linux or android have (those are tiny one byte files anyway). And those tiny extra files don't make a difference in how the USB audio system works, if they're there or not.
 
This isn't true - are you thinking of Linux or the android file system? While there are a small number of hidden files in each directory on a mac, there isn't the one on one hidden files that linux or android have (those are tiny one byte files anyway). And those tiny extra files don't make a difference in how the USB audio system works, if they're there or not.
Not Linux or Android. I format the drive on my Mac, copied the files over and then inserted into the Taurus. The Sony system showed I had over 12,000 files. When I played, I would frequently get songs that wouldn't play. After putting up with this for a couple of months, I pulled the drive, inserted into my Windows PC at work and manually removed the hidden files. After that, I never had a single hang up.

It may have just been a short-coming of the Sony system in the car (which was otherwise awesome).
 
On MacOs, assuming your USB stick is disk2:
diskutil partitionDisk disk2 2 GPT FAT32 TESLACAM 90% FAT32 MUSIC 10%

List your disks using: diskutil list

However we found the music would occasionally hesitate, probably when the TeslaCam was writing, so we went back to having separate sticks for music and teslacam.
We use splitters on each USB port to provide one full USB port (for the stick) and one charging-only port (for our phones).
 
Not Linux or Android. I format the drive on my Mac, copied the files over and then inserted into the Taurus. The Sony system showed I had over 12,000 files. When I played, I would frequently get songs that wouldn't play. After putting up with this for a couple of months, I pulled the drive, inserted into my Windows PC at work and manually removed the hidden files. After that, I never had a single hang up.

It may have just been a short-coming of the Sony system in the car (which was otherwise awesome).

I think the Mac file system is the culprit. I've had the same experience with a thumb drive on my 2016 Miata (I don't get my new Tesla for a few more days). When you add music to a thumb drive using a Mac, the filing system apparently adds a "hidden" duplicate for every file, Duplicates have a "." added at the beginning of the file names (eg: "music.mp3" is duplicated as ".music.mp3"), but apparently have no actual content. This must be useful for Finder, but your car audio system tries to play the duplicate files along with the originals. When a duplicate is the active track, there's just silence. You have to advance to a non-duplicate file.

Putting the thumb drive back in the Mac, the duplicates (".music.mp3") aren't visible in Finder. But plug into a PC and you'll see both the original and the duplicated files in Windows Explorer. Delete the files starting with "." (on the PC) and the thumb drive should work fine back in the car. Assuming the problem is an artifact of the Mac file system, using a PC seems to be one possible solution.
 
Last edited:
I think the Mac file system is the culprit.

But plug into a PC and you'll see both the original and the duplicated files in Windows Explorer. Delete the files starting with "." (on the PC) and the thumb drive should work fine back in the car. Assuming the problem is an artifact of the Mac file system, using a PC seems to be one possible solution.
That is the culprit and that is exactly how I fixed it.

There are ways to delete them without having to take the flash drive to a PC, but since I have access to both platforms, I just do it that way out of laziness.
 
I think the Mac file system is the culprit. I've had the same experience with a thumb drive on my 2016 Miata (I don't get my new Tesla for a few more days). When you add music to a thumb drive using a Mac, the filing system apparently adds a "hidden" duplicate for every file, Duplicates have a "." added at the beginning of the file names (eg: "music.mp3" is duplicated as ".music.mp3"), but apparently have no actual content. This must be useful for Finder, but your car audio system tries to play the duplicate files along with the originals. When a duplicate is the active track, there's just silence. You have to advance to a non-duplicate file.

Putting the thumb drive back in the Mac, the duplicates (".music.mp3") aren't visible in Finder. But plug into a PC and you'll see both the original and the duplicated files in Windows Explorer. Delete the files starting with "." (on the PC) and the thumb drive should work fine back in the car. Assuming the problem is an artifact of the Mac file system, using a PC seems to be one possible solution.
No, again, it's not a mac causing these files. Trust me, I know all about hidden files and the mac OS. Quite likely your miata had a similar system to the other person's taurus. What other car's audio systems do to the files it encounters on a usb stick can be mysterious, but it's unrelated to what a tesla does. It wasn't a mac that added all those extra files. I don't even know why this misinformation is being brought up in this thread, it's completely unrelated to this subject.

Edit: I suspect that what you guys are ACTUALLY seeing is the result of the file system your Taurus and Miata are using internally - quite a few portable audio file systems are based on the android platform, which does use an internal tracking system that adds a tiny hidden file for each file it encounters, so you end up with these tremendous collections of extra hidden files if you're adding and deleting files often to a disk. I've seen this on occasion with various DAPs. Again, this isn't a result of using a mac - if you use Pathfinder (a full featured mac finder alternative) or any other method of checking out what hidden files are present after moving files to a fresh disk, you'll see this is the case.
 
Last edited:
It IS the MacOS creating these files.

No, it isn't. It's easy to prove to yourself that it isn't: Load up a usb drive with music files on a mac. Then look at that drive either with Path Finder, or with hidden files made visible in finder by using "defaults write com.apple.finder AppleShowAllFiles YES" in the terminal. See all the hidden files? No, because there aren't any besides the .ds_Store one. Then take that drive over to a windows machine, and load it, check for hidden files - same thing, there aren't any. Then, take that drive and play it in your taurus or whatever, and then look for the hidden files on either computer - there they are! So, where did they come from? Not from the mac, that's for sure.

Then how do you explain why there are so many conversations about how to remove these files and prevent them from being created? I've been working on Macs long enough to know what they do.

This is really apples and oranges. The mac isn't creating hidden files that impede the model 3 audio system in any way, and the OS the tesla uses (linux) also doesn't create hidden files, so I don't know why you've gone off on this tangent anyway. This is a thread about how how to format and partition a drive for music and dashcam/sentry use, I don't see how your argument about nonexistent hidden files has anything to do with it.

Here's a constructive suggestion - get a USB drive of some sort. Flash drive, SD card and reader, ssd drive, it doesn't matter. Follow the instructions from the first post in this thread, and then put some music files on the music partition, and set up dashcam to use the other one. See how it works. If you do it right, it'll work fine, you won't even have to worry about hidden files, imaginary or not. From the FWIW department - I use a sandisk extreme SSD, and have the music partition formatted as ext4, which is the native format the tesla file system uses, which works a bit faster than fat32 for music. I also use a mac to transfer music back and forth between this drive and my computer, and even checked it for hidden files today earlier (there weren't any).

Edit: if you're still paranoid about the scary hidden files, you can eliminate them easily for removeable devices on a mac by using Eject for Windows - Eject for Windows - I use this for programming ARM devices that use embedded memory that don't get along well with DS_Store files and such. I've never bothered using it for tesla music drives as they work fine without it.
 
Last edited:
No, it isn't. It's easy to prove to yourself that it isn't: Load up a usb drive with music files on a mac. Then look at that drive either with Path Finder, or with hidden files made visible in finder by using "defaults write com.apple.finder AppleShowAllFiles YES" in the terminal. See all the hidden files? No, because there aren't any besides the .ds_Store one. Then take that drive over to a windows machine, and load it, check for hidden files - same thing, there aren't any. Then, take that drive and play it in your taurus or whatever, and then look for the hidden files on either computer - there they are! So, where did they come from? Not from the mac, that's for sure.
My friend, you do not know of what you speak.

I took a thumb drive, inserted into my MacBook Pro (running Mojave) and using Apples Disk utility, erased and formatted for Fat32 (MS-DOS (Fat)) for a fresh new drive. I then copied five random music files onto the drive (different formats).

I next brought the drive to work and inserted into my Windows machine (running Windows 10). Note that this disk went straight from the Mac to the PC - not inserted anywhere along the way (I no longer have the Taurus). When the folder opened, I went to the View menu and clicked to show Hidden Files. Below is the screen shot (interestingly, it didn't create a hidden version of the .WAV file).

If you read back, I started by saying that these hidden files MIGHT be causing the issues the OP was experiencing - I never said it WAS. The Tesla may not care about these files: I was merely offering up a possible solution.

Hidden_Files.PNG
 

Attachments

  • upload_2019-9-18_17-42-40.png
    upload_2019-9-18_17-42-40.png
    27.3 KB · Views: 31
Actually, I have mentioned that the mac creates a few small hidden files, several times in fact. But not the "hidden file with each file visible file" as you originally confusingly stated. Actually I'm surprised you didn't get a .trashes file also, they're pretty prevalent. And those hidden files don't cause any problems, as you can easily determine yourself. You can throw all kinds of extra non-music files into a music folder and the tesla will simply work around them, hidden or not.

But what do you mean by the "the issues the OP was experiencing" - this thread is about how to format a drive on a mac, the OP isn't having a problem, and no-one else was reporting a problem. Were you responding to someone else? Or maybe to the wrong thread?
 
Sorry for the 4-year thread bump lol, but some might end up here curious about the extra MacOS files.

You can remove them using the MacOS Terminal like this:

Code:
xattr -r -d com.apple.quarantine /Volumes/MEDIA

or replace "/Volumes/MEDIA" with the name of your USB partition.

The technical explanation: the extra files contain an attribute "com.apple.quarantine" to indicate the file may not necessarily be trusted, so you might get a "are you sure?" type of prompt the first time you open it on a Mac. The "xattr" command deletes this attribute ("-d com.apple.quarantine") from everything below the specified folder ("-r" = recursive). For files with no other attributes, the extra "dot file" will be removed.

The attribute is added when a file is copied to removable storage, so you only need to do this after copying files to the USB stick. This behavior cannot be disabled for this specific use case.*

I don't know if these extra files might be harmful or cause any of the reported issues, but they do nothing for your Tesla.





* You can completely disable the Quarantine behavior for your Mac like this:

Code:
sudo defaults write com.apple.LaunchServices LSQuarantine -bool NO

or by selecting "Allow Apps Downloaded From: Anywhere" in the "Security and Privacy" Control Panel, but this applies to everything systemwide and may leave you more vulnerable. It is not recommended.
 
  • Helpful
Reactions: KennethS