There is a fix for this error. Follow this steps:
Ready a ROM(I use Pac Man ROM) in your microSD and insert into device.
1) Download and flash official firmware for your phone using Odin.
2) Root and flash custom recovery(I use TWRP) using Odin
3) Install ADB on your computer(Usually by installing Samsung USB driver)
4) Boot into recovery mode(hold up+power button)
5) Connect phone to PC via USB Cable
6) In recovery mode Choose “mount and storage > mount /system”(In TWRP, just tick the 'system')
7) At PC, open ADB command window and type :
dd if=/dev/block/mmcblk0p3 of=/sdcard/efs.img
mount -t ext4 /dev/block/mmcblk0p3 /efs
DON'T REBOOT YET, Now /efs is mounted don't unmount it.
Do a factory reset
Install your new rom, It should install without any errors
Boot your phone, After it boots your signal notification most likely will be gray and internet or calls may not work. To fix just install gapps and it will be fixed.
If you don't have phone, try this:
Go back into recovery and get adb access. Then run this command:
sumke2fs /dev/block/mmcblk0p3mkdir /efsmount -t ext4 /dev/block/mmcblk0p3 /efsdd if=/sdcard/efs.img of=/dev/block/mmcblk0p3 bs=4096reboot
This command will create a generic EFS files on your device.
Now normally your device will reboot and it should pass Samsung logo.
Your device might display a screen with a yellow text (FactoryMode)
If your device display a annoying transparency black background which contains some info about your device (PDA, Phone, CSC, H/W, Camera, …) in yellow text … and lock screen is not working, mean that your device is in factory mode.
“Factory Mode” is enabled if the EFS partition is corrupted because of installing custom ROMs, bad Mods or downgrading your current system version or after you succeeded in fixing the EFS partition.
Follow this step to exit FactoryMode:
1) Install root browser
2) Go to Local > / Device > efs > FactoryApp and open factorymode as text in “ES Note Editor”
3) Change it from OFF to ON and save it
4) Open keystr as text in “ES Note Editor”, change it from OFF to ON and save it
Alternative solution by using Terminal Emulator.
1) Install “Terminal Emulator“
2) Type :
echo -n ON >> /efs/FactoryApp/keystr
echo -n ON >> /efs/FactoryApp/factorymode
chown 1000.1000 /efs/FactoryApp/keystr
chown 1000.1000 /efs/FactoryApp/factorymode
chmod 0744 /efs/FactoryApp/keystr
chmod 0744 /efs/FactoryApp/factorymode