Wednesday, November 12, 2014

Fix samsung error: E:failed to mount / efs (Invalid argument)

I got a Samsung Galaxy Note 8 GT-N5100 with error E:failed to mount / efs (Invalid argument) whenever I run a wipe cache or wipe factory in recovery. I did stuck in a samsung logo. This looping is a common nightmare for a Samsung devices.

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 :

adb shell
su
dd if=/dev/block/mmcblk0p3 of=/sdcard/efs.img
mke2fs /dev/block/mmcblk0p3
mkdir /efs
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
5) Reboot

Alternative solution by using Terminal Emulator.
1) Install “Terminal Emulator“
2) Type :

su
rm /efs/FactoryApp/keystr
rm /efs/FactoryApp/factorymode
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
reboot


References:
http://forum.xda-developers.com/showthread.php?t=2430202
http://zidroid.com/how-to-fix-failed-to-mount-efs-for-galaxy-s3-gt-i9300/
http://zidroid.com/how-to-exit-factory-mode-for-samsung-galaxy-devices/
http://www.digitalreborn.com/fix-samsung-galaxy-unable-mount-efs/

2 comments:

  1. You saved my tablet! First part of the tutorial helped without any additional steps. Want to donate! =)

    ReplyDelete