AFAIK this is not possible, but maybe some custom ROMs allow it through some hacky stuff, so correct me on that if I'm wrong, but....
There's an app called DriveDroid - It's primarily used to boot your PC from an Image-/ISO-File that's stored on your android, but you can also use it for what you're after. It needs root.
Once you open the app, hit the menu button and go to Create blank image
.
This is from their page about a tutorial on how to make a bootable partition, you can choose any name here and any size you want your removable media to have. Leave MBR unchecked.
Once you created the image, you can tap on it in the app's main screen and choose the first option to make the image mountable as a writable USB drive. After that, plug the phone onto your PC, it will detect an unformatted drive.
On Windows, you can simply hit "Format" in the popup it should show, asking if you want to format the drive. FAT32 will work fine as partition type.
On Linux, find out the drive letter using the lsblk
command and then run mkfs.fat -F 32 /dev/sdX1
(replacing sdX1
with the drive letter and partition number of your drivedroid image) to format it. (Or use GParted for example as GUI application)
After that you can copy/move/whatever files on there as you wish, as if it was a normal USB drive, and your TV should detect it just like that.