Retrieve 'corrupt' files from mobile


If you ever receive files, such as JPG files, that you cannot open with error (0x2f 0x39) that means the files are encoded in BASE64. You need to decode them.


On Linux:

# 1. Check the file type (expected: ASCII test)
file sourceFileToDecode.JPG       

# 2. Convert
perl -MMIME::Base64 -ne 'print decode_base64($_)' < sourceFileToDecode.txt > out


Sources: