It began when I accidentally formatted the internal storage with TWRP.
Now the OS can't mount the internal storage and the
/storge/emulated/0 directory is missing but when I go to settings -> storage and usb I can see that the internal storage is still there.
I can access my files through
/data/media but the apps can't find the directory which is missing from
I flashed my stock kitkat ROM and it is able to detect and mount it (mounted at
/storage/sdcard0) apps can access it as well
What can I do, I flashed multiple ROMs (both cyanogen and AOSP based but they can't find it!)