How to enable USB mass storage feature on newer android phones As a Linux user , it sometimes gets to tedious to get MTP working.So I want back  the USB mass storage feature. The main reason is that my TV doesn't support MTP. I used to watch movies and videos from my old android device via USB mass storage on my TV but can't do that with MTP anymore. I am also ready to root my phone or install a custom rom.
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.