Mac app shrinks when copied to USB I have a Mac app that is 443,245,675 bytes.

When I copy it to a flash drive, the copied version is only 443,239,527 bytes and the app package becomes invalid (spctl -a fails).

This difference (6148 bytes) is the size of a .DS_Store file exactly, but none seems to exist in the app package. My hidden files are visible and I've looked using ls -l — there's no .DS_Store file there.

What's going on here and how do I fix it so my app doesn't become invalidated every time it's copied? Note that the app still runs even though spctl fails. That said, should I even worry about this?
Your thumb drive is likely formatted as FAT32 (or just FAT if older).

Copying the app to something that isn't formatted as Mac OS Extended, probably resulted in the loss of things like file owner, permissions, etc, that may have been needed to run/validate it with the system.

Either consider


Packaging it as a .dmg, or
If this is something you might need often, you could reformat the thumb drive as HFS+ (after backing up anything important on it).  Consider copying the app file with the flag to preserve settings:

cp -p source_file target_thumb_drive