[DEV] Recover of EFS without Backup - Galaxy Note II General

Hi Folks,
well i've just managed to recover a Galaxy S3 /EFS without JTAG and without ANY backup other than a dd of the damaged EFS partition which is /dev/block/mmcblk0p3
I am looking for other users with the following conditions
you must have a copy of you efs partition before any modifications , eg. as soon as you efs went wrong you dd'ed /dev/block/mmcblk0p3 and kept a copy before trying anything else. If you worked on the /efs before or select efs clear in oding then this wont work.
I am not going to post the solution yet, it requires more research but it's a possible solution, may even transfer to other devices with exynos and a /efs partition.
Possible ways to confirm efs damage
1. system stays on Galaxy s3 logo and does not show animated boot logo
2. cwm wont mount /efs
3. e3 recovery wont list csc files
if the above is the same as here then let me know.
No PM's please, i want to keep the work public.
darkspr1te
Sorry MODS, please move to Samsung Galaxy SIII , general, miss-post i was tired

darkspr1te said:
Hi Folks,
well i've just managed to recover a Galaxy S3 /EFS without JTAG and without ANY backup other than a dd of the damaged EFS partition which is /dev/block/mmcblk0p3
I am looking for other users with the following conditions
you must have a copy of you efs partition before any modifications , eg. as soon as you efs went wrong you dd'ed /dev/block/mmcblk0p3 and kept a copy before trying anything else. If you worked on the /efs before or select efs clear in oding then this wont work.
I am not going to post the solution yet, it requires more research but it's a possible solution, may even transfer to other devices with exynos and a /efs partition.
Possible ways to confirm efs damage
1. system stays on Galaxy s3 logo and does not show animated boot logo
2. cwm wont mount /efs
3. e3 recovery wont list csc files
if the above is the same as here then let me know.
No PM's please, i want to keep the work public.
darkspr1te
Sorry MODS, please move to Samsung Galaxy SIII , general, miss-post i was tired
Click to expand...
Click to collapse
hi this same problem has happened to me on my s4.
i have all your above listed problems.
However i do have a backup of my efs folder.
please help, thanks

I'm curious with the solution..
Cause many people had problem with efs and not having efs backup...
Sent from my GT-N7100 using xda app-developers app

starscream0 said:
hi this same problem has happened to me on my s4.
i have all your above listed problems.
However i do have a backup of my efs folder.
please help, thanks
Click to expand...
Click to collapse
I've only just got my first bricked S4 in yesterday and only completed it's screen replacement today. The screen is only damged due to owner giving up on it and litting it sit on his desk util something was dropped on it.
Anyway, my point of this is I am not ready to do S4 debrick as I 'am still working on S3.
The key behind my 'possible' recovery method is my solution involves searching for certain MAGIC's in the /EFS backup and also knowing exactly where in the efs image data would be.
For example, key areas of a EFS are in the same sector of the memory each time when looking at a mmcblk0p3 backup image,
i will use mac address as a example.
in the 5 so far efs backups i've examined the mac address is at offset 0x30000, so even if you cannot read the actual efs partition and using fsck on the mmcblk0p3 fail, my part one trick involves just going to 0x30000 and reading the data back. without the efs file system being involved. The same trick i used to recovery the blown boot sector and partition table of the SHV-E160L.
the second trick is to look for keywords within the backup img, example lets say the IMEI always had 0xAA 0xAA 0xAA before it, and the data required was 400 byte, we simply look for 0xAA 0xAA 0xAA in the file and copy it and the next 400 bytes.
the final trick I wont release yet, jumping the gun (as people do) will result in a JTAG brick, it's not perfect, its not a one click solution that we all want, but it's early days yet, but the method does work, i've 5 sammy's in front of me to prove it.
My rep in the Korean galaxy note section should prove I am not threading for likes too
Final note, Its a work in progress and I am using the forum to post my thoughts and look for Guinea pigs and attract other developers to documents the Samsung /efs system.
I am aware that parts are hashed and encrypted, the goal is not decrypting it but to recover the information to revive the device.
I am expecting users to share their /EFS backups with me, but I will not share those files with others to protect the users IMEI,
my issue is i don't have enough differing /efs files to build a bigger picture, what if the file locations was just luck ?
oh, if anyone has a copy of testdisk for arm, please share, i am fighting to get it to compile for arm-eabi-none- grrrrrr.
darkspr1te

Another note: I've not taken into account fragmentation of data in my above post, i was keeping that out of it for now, but i am aware of the EXT2/3 file table setup, how nodes can be split up.

Related

Make sure to backup your efs partition!

I just wanted to share a story of woe and redemption so that it doesn't happen to you.
As background, I had sim unlocked my phone using helroz's method a while back, and my phone has been working fine from team whiskey's early days till now. Recently, I was flashing my phone as most of us do. I noted that after flashing the dead horse kernel, my market was not working properly, so I decided to odin back to JFD. From there, I flashed Bionix, but afterward, noted that I wasn't getting any cell reception. After some investigation and several odins, I looked at my software info and found that my baseband was unknown. I flashed back to JFD however, and it worked fine. In fact, this was the only rom where the cell worked. The phone otherwise was functioning flawlessly, including wifi.
Further investigation showed that this has happened to others, and anecdotally, people have fixed it by odining over and over or doing some magic with their sim card. I did just that but to no avail. After some thinking, it occurred to me that maybe my /efs data was bad, so I took a look. Hitting *#06# showed the generic samsung IMEI while in JFD (it did not work in other versions as the baseband was not working), not my normal IMEI. That's odd. I still had the backup from trying to sim unlock it months ago. I tried to overwrite the /efs folder w/ my own, but I could not write it due to 'not enough space.'
Further investigation showed that indeed, my efs partition had been borked, and so I could not write data to it (I could copy however). The only way to fix this is by flashing/odin'ing a new partition. This only works if you have a backup, which I didn't. Basically, I had a fancy media player at this point.
I went ahead and looked on craigslist and found a vibrant w/ a broken screen, figuring I could swap out the guts. I immediately backed up the /efs folder and partition of the broken phone, just in case. On a whim, I tried to flash the efs partition from the broken phone to my phone. Lo and behold, the baseband came back. I was now able to write to that partition, so overwrote the /efs folder w/ my backup from before. My IMEI came back afterwards, and so now, I have 2 functioning vibrants. I'm not sure what data is stored in /dev/block/stl3, but I do know I was able to fix my phone using another phone's data. They both work w/ my sim, though I am unsure if they can connect simultaneously using different sims or if they are somehow cloned, but the IMEIs are different for sure.
The moral of the story is that this phone is nigh unbrickable and even when it doesn't boot, you can always try the jig. The only part of the phone you can't fix w/ a routine odin it seems, is the efs partition, so I would encourage everyone to make a backup and keep it safe. This is not done standard as an initiation into rooting and roms and such, but it should be. Normally, odin'ing a rom does not write to this area, but even w/o screwing with this, frequent flashing and odins can apparently corrupt it, leaving you high and dry. With this backup and odin, you could probably fix your phone from any jam.
Here are the relevant threads on how to do this:
http://forum.xda-developers.com/showthread.php?t=882039
http://forum.xda-developers.com/showthread.php?t=859914
Keep those backups safe!
Thank you for sharing ur experience, I recently noticed that my data speeds have gone down after unlocking my vibrant using the method you mentioned above.Damn, I get edge speeds when I am on a HSPA network. Dunno whats the problem,called up simple mobile,am not data throttled.Sigh..
Sent from my SGH-T959 using XDA App
man this is scary, but your phone still works at JFD right?
Sent from my SGH-T959 using XDA App
It didn't for a while. Now, both phones are fully functional. I had a copy of the /efs folder of my old phone, but not an image of the partition. The problem is, when the partition gets screwed, you can't write to it, making the /efs useless.
That's why I'm trying to get people to make the backup. It takes a few minutes, but can be a lifesaver. I do believe you can flash a foreign stl3 partition and overwrite the /efs like I did, but unless you had a friend, no one would share it w/ you as it contains their imei info. Better to just back up your own. And if you lose your /efs, game over.
How exactly do you back up a partition?
Very cool of you to post this up. Is there any reason to back up your efs partition if you have no reason to unlock?
<---backing it up anyway.
It's not the unlocking. It seems that over time, some people (such as myself) screwed up the efs partition by just flashing/odin'ing various roms. It shouldn't happen, but it does. Consider that no roms write to the stl3 layer, yet mine was working one day, then one odin later, it didn't. I'm sure the number of people this happens to is quite small, but when it happens, it happens. It's like a 6 mb backup which isn't that big of a deal.
It's better to be safe than sorry.
I did an experiment on my Galaxy Tab, that I move the /efs folder to memory card.
Soon I found the reception goes way worse (at least 10dBm less) and the serial number changed to 00000000, then I immediately copied (restore) the folder and everything was back to normal.
I tried to examine the files with hex editor but I found nothing spectular.
vnamee said:
It's not the unlocking. It seems that over time, some people (such as myself) screwed up the efs partition by just flashing/odin'ing various roms. It shouldn't happen, but it does. Consider that no roms write to the stl3 layer, yet mine was working one day, then one odin later, it didn't. I'm sure the number of people this happens to is quite small, but when it happens, it happens. It's like a 6 mb backup which isn't that big of a deal.
Click to expand...
Click to collapse
That's really weird. I've never really looked into the occurrence because I always assumed it was isolated only to those that did some weird hacking in an attempt to unlock, or to those that were developing and found themselves doing some nasty, nasty things.
I just created efs_dev-block-st13.img and efs-backup.tar.gz so hopefully I'm all safe and sound now.
Thanks again! Once I get beyond GPS stuff I find myself clueless.
draikz said:
How exactly do you back up a partition?
Click to expand...
Click to collapse
You need to read the two links in the OP and download adb. You also need root and busybox.
all you need is to root your phone, such as w/ superoneclick which will put busybox on there. Then all you need is adb.exe.
Open up a command prompt where adb.exe is located. You can adb su or just go adb shell and then su.
The only commands you need are:
cat /dev/block/stl3 > /sdcard/stl3.bin (backs up sector management layer of partition)
cat /dev/block/bml3 > /sdcard/bml3.bin (backs up block management layer of partition)
tar zcvf /sdcard/efs-backup.tar.gz /efs (tars /efs folder)
cp stl3.bin efs.rfs (just makes copy of stl3.bin to new name efs.rfs)
tar -cf efs.tar efs.rfs (makes an odin flashable tar of partition)
I kept a copy of stl3.bin, bml3.bin, efs-backup.tar, and efs.tar.
vnamee said:
all you need is to root your phone, such as w/ superoneclick which will put busybox on there. Then all you need is adb.exe.
Open up a command prompt where adb.exe is located. You can adb su or just go adb shell and then su.
The only commands you need are:
cat /dev/block/stl3 > /sdcard/stl3.bin (backs up sector management layer of partition)
cat /dev/block/bml3 > /sdcard/bml3.bin (backs up block management layer of partition)
tar zcvf /sdcard/efs-backup.tar.gz /efs (tars /efs folder)
cp stl3.bin efs.rfs (just makes copy of stl3.bin to new name efs.rfs)
tar -cf efs.tar efs.rfs (makes an odin flashable tar of partition)
I kept a copy of stl3.bin, bml3.bin, efs-backup.tar, and efs.tar.
Click to expand...
Click to collapse
I've got backups of stl3.bin, bml3.bin and efs-backup.tar.gz
When I try to make the partition an odin flashable tar it tells me: "No such file or directory".
You have to cd into the directory, or else it should be:
cp /sdcard/stl3.bin /sdcard/efs.rfs (just makes copy of stl3.bin to new name efs.rfs)
tar -cf /sdcard/efs.tar /sdcard/efs.rfs (makes an odin flashable tar of partition)
This is kind of old news, but nevertheless important.
Months ago in the Q&A section there were two threads about the importance of the EFS, and how a corrupted nv_data.bin and EFS can cause many problems including losing the ability to use a different carriers sim, yet nobody paid attention to those threads, but I thought the info was vital.
Would using ROM Manager and backing up your current rom, also backup the /efs?
vnamee said:
You have to cd into the directory, or else it should be:
cp /sdcard/stl3.bin /sdcard/efs.rfs (just makes copy of stl3.bin to new name efs.rfs)
tar -cf /sdcard/efs.tar /sdcard/efs.rfs (makes an odin flashable tar of partition)
Click to expand...
Click to collapse
Yeah, I did. I'll do it again and post up exactly what I type and put in. Maybe it's just operator error.
Here ya go.
It might have been operator error because that time I watched efs.tar get written to /sdcard
It should be efs.rfs, not efs/rfs. It's a file, not a directory.
SamsungVibrant said:
Would using ROM Manager and backing up your current rom, also backup the /efs?
Click to expand...
Click to collapse
Nandroid does not back up the /efs partition, at least not that I can tell. All those files in the backup folder are of the various partitions, and efs partition is not part of it.
The reason I made this thread to begin with is because when I had this problem, I looked high and low, and found scant info. In the future, if someone else has this problem, this will come up in a search and won't have some lame magical fix that may or may not work.
vnamee said:
It should be efs.rfs, not efs/rfs. It's a file, not a directory.
Click to expand...
Click to collapse
Pinky slip!!! For whatever reason, it took 3 tries but I finally got it to backup. Thanks for the help! I would never think to back this stuff up. Everyone does Nandroid's like crazy, which is good, but losing this stuff is losing your phone!
Excellent write-up vnamee thank you..........

[GUIDE] Backup your /efs folder before flashing any ROM (IMPORTANT!)

Hi everyone!
The reason why I post this threat is that there is no clearly mention about the /efs folder in the rooting/how-to guides in here. In my opinion, it's the MOST IMPORTANT thing to know for all Samsung devices with Android OS before flashing any custom ROM. There is a really good threat posted in Original Android Development by Rawat, which I'm going to quote right here. Unfortunately, it's not a sticky threat so it's gone somewhere deeper in the forums.
I really beg you for a sticky of this thread, or Rawats to prevent all new users of damaging their phones.
My point is: many of you can agree, the /efs folder is very sensitive. If it get corrupted and you have no backup of it, well.. let's just say it's nearly impossible to get you phone working again. It contains your IMEI number and some other important things! There have been some situations when it get corrupted after flashing some ROMs. Without a backup, your IMEI is gone. The only way to get your phone working again is to send it back to Samsung Service.
Here is the guide, originally posted by Rawat! Thank you very much:
This guide is based on a guide by Candanga on the i9000 forums, and some commands from supercurio
Please hit thanks on their posts and show them some love for the write up.
-----------------------------------------------------------------------------------------------------------------------
I’ve compiled a quick guide to instruct how to make a copy of the /efs folder. I’ve found in many threads suggestions about backing up this folder but the methods itself are very general. Most of the times they suggest to “root and copy the folder” with Root Explorer or similar, but usually it’s not that easy or it just doesn't work for everyone.
This guide ASUMES you have read this Excellent Guide by Darkstrikerfirst:
H E R E <-- Make sure to read the ADB Guide.
I recommend doing this with a Mobile just taken out of the box or with any Official ROM of its Service Provider. If you have already Flashed your phone with another ROM but its working fine, then you can use that /efs also.
Why the /efs folder?
This is a very sensitive system folder that contains Phone-specific information such as the IMEI (encrypted in the nv_data.bin), wireless devices MAC addresses, product code (also in the nv_data.bin), and much more. Often users trying to change product codes or trying to unlock the mobile will end up corrupting data in this location.
Why back it up?
Well, let’s resume it saying that backing-up this little folder will keep you away from Samsung service centres.
***WARNING: I take no responsibility to any damage caused by the methods cited and/or written here. Their sole purpose is to back-up data and not to alter in any way the integrity of the original files of the mobile***
What you will need:
* Rooted SGS II to get permissions as a SU (Super User) and perform the backup
* I would suggest learning a little about the terminal commands used (in case you are not familiar with them), as it’s better to know what you are doing rather than typing strings like a little chimp without knowing what they are; if you are a little lazy, then you have a good chance bricking your mobile. <- Busybox Commands(or Google them)
* Terminal Emulator by Jack Palevich (available from the market) <-Terminal Emulator or use ADB which is included in the SDK Development Tools
The standard prompt of terminal (adb) is a $ sign. Once you enter “SU” it will become a # Sign.
***NOTE: Make sure to keep an eye on the screen of your SGS II during this process, because it may request SU permissions [currently doesn't on CF-root]; else, you will get an error (just if it’s the first time). In Terminal Emulator you will need to reset the app after granting permissions cause it usually freezes***
*Remember: to use ADB you need to enable USB DEBUGGING under Applications/Development in your SGS II.
Here are 3 methods, I recommend that you do both Clean and RAW.
Basic, unix permissions lost :
Code:
su
busybox cp -a /efs /sdcard/efs/
Clean :
Code:
su
busybox tar zcvf /sdcard/efs/efs-backup.tar.gz /efs
After this, you will end up with the file efs-backup.tar.gz in your INTERNAL SDCARD in sdcard/efs/, which is a “tarball” or a ZIP of the /efs folder. That file is your backup. You can expand it with Winrar.
You can also back up the mmcblk0p1 (where /efs is stored) under /dev/block which can greatly support in recovering your IMEI in case of a screw-up:
RAW :
Code:
su
cat /dev/block/mmcblk0p1 > /sdcard/efs/efs_dev-block-mmcblk0p1.img
alternative
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/efs/efs_dev-block-mmcblk0p1.img
Same thing, the target is the INTERNAL SDCARD in sdcard/efs/, so go ahead and copy the file.
--------------------------------------
original thread by Rawat @ xda: click here
matee89 said:
Without a backup, your IMEI is gone. The only way to get your phone working again is to send it back to Samsung Service.
Click to expand...
Click to collapse
Not 100% true, there are other ways, for example I know how to generate valid nv_data files.
matee89 said:
RAW :
Code:
su
cat /dev/block/mmcblk0p1 > /sdcard/efs/efs_dev-block-mmcblk0p1.img
Same thing, the target is the INTERNAL SDCARD in sdcard/efs/, so go ahead and copy the file.
Click to expand...
Click to collapse
I think using dd is better than cat, I dont know why but I have a feeling cat could do some character conversion in some circumstances, so :-
dd if=/dev/block/mmcblk0p1 of=/sdcard/efs/efs_dev-block-mmcblk0p1.img
or better still do both, cannot have too many backups
Thanks for info Odia! Well, the backup is still important. Saves a lot of time for newbies, so i think that this guide should be sticky. Everyone can see it clearly then
There is already a thread about this...
rawat thread
And there's an app on the way apparently..
app thread
Yes, but this thread is not sticky. If you at least read a little part of mine post you should see that I quoted Hawats thread and put a link to it. My point is that this should be more visible for everyone. To be honest, it should be sticky like the rooting guides and other how to's, because it can give you serious problems with the device when files inside /efs get corrupted. Myself I haven't know about the purpose of /efs since yesterday, because it wasn't clearly mentioned in here. Just want to help other newcomers to Samsung devices.
This app will do exacly the same thing like you will do right now following this guide. It's not released yet, so this guide should be used meanwhile.
matee89 said:
Thanks for info Odia! Well, the backup is still important. Saves a lot of time for newbies, so i think that this guide should be sticky. Everyone can see it clearly then
Click to expand...
Click to collapse
Sure the backup is important, is why I added some input to your thread about using the dd command to make double sure the backup taken was valid.
Can an admin or mod make Rawat's thread sticky pls?
Okay, shall edit and post the alternative backup method with dd comand instead of cat.
Would be great with sticky. I don't think that majority of people who's flashing ROM's know how important this folder is. From what I've heard the nandroid backup in CWM recovery does not backup the /efs so it's needed to be done manually.
before using this comands you should use mkdir /sdcard/efs if you don't want to get an error
I made clean, raw and dd back up. Now I have two files of 20 MB each and one of 28Kb is it ok?
Yes, it seems okay. I saved my efs backup files on my PC as well in case something happens to the internal sdcard storage.
Thank you for that. I will backup mine tonight.
Thank you got the backup with my Note
Re: mp1806
Probably some of the ROMs that you flashed had an automatic backup script included, so you already got a working efs backup on your sd card. If you want to be completly sure if the backup is correct, you can make it manually by following the steps in my first post. Later you can even copy your backup to your PC if you like to.
There is three or four apps by now that aid you in creating EFS backups.
Most have been mentioned in the other (older) EFS backup thread.
It's one app i forgot the name of, EFS-Pro that works from your computer and my own one (see sig).
If you search for "efs backup" on the market you will find "Nitrality" (or however it's spelled, forgot the exact name right now) and my one.
Mine also offers an option to check the EFS backup if it's OK or corrupted, so can be really sure to have a good one when the check succeeds.
Point beeing:
No real need to tinker on the shell anymore
Great Thanks for this
Hi, I am using the RAW method on my Galaxy Note, rooted, but I keep getting a file not found error. Anyone able to help? I got the su and the prompt changed correctly, but after:
cat /dev/block/mmcblk0p1 > /sdcard/efs/efs_dev-block-mmcblk0p1.img
It just says file not found. What am I doing wrong?
Another way is to use ktool made by Hellcat to backup your efs and even restore.
http://forum.xda-developers.com/showthread.php?t=1314719&highlight=ktool
Anyone knows if this tool is as good as command line way?
(nvm)
Odia said:
Not 100% true, there are other ways, for example I know how to generate valid nv_data files.
Click to expand...
Click to collapse
Can you please let me know how to generate it? I HAVE LOST THE EFS FILES ON MY PHONE!
Samsung Tool
Samsung Tool is the easiest and more safe method
how do you restore it?

EFS IMEI Backup?

I have root my S4 and will make a backup from efs/imei but EFS Professional not working with the S4. How can i backup efs?
is it so hard to get a copy of ur EFS folder to safe place ?
You can use TWRP recovery to get a EFS backup
Gesendet von meinem GT-I9505 mit Tapatalk 2
You can back up a whole partition with Terminal Emulator from Play Store.
This is example made for I9505 ONLY!!!!
For I9500 use mmcblk0p3 and efs.img instead!!!
Download it , and run it, then type:
Code:
su
dd if=/dev/block/mmcblk0p10 of=/mnt/sdcard/efs.img.ext4
and it will dump whole partition into one file efs.img.ext4 on your internal SD card
or
Code:
su
dd if=/dev/block/mmcblk0p10 of=/mnt/extSdCard/efs.img.ext4
to save it on external SD.
If something goes wrong and you need to restore it:
Code:
su
dd if=/mnt/sdcard/efs.img.ext4 of=/dev/block/mmcblk0p10
or
Code:
su
dd if=/mnt/extSdCard/efs.img.ext4 of=/dev/block/mmcblk0p10
Keep it safe and enjoy
djembey said:
You can back up a whole partition with Terminal Emulator from Play Store.
Download it , and run it, then type:
Code:
su
dd if=/dev/block/mmcblk0p10 of=/mnt/sdcard/efs.img
and it will dump whole partition into one file efs.img on your internal SD card
or
Code:
su
dd if=/dev/block/mmcblk0p10 of=/mnt/extSdCard/efs.img
to save it on external SD.
If something goes wrong and you need to restore it:
Code:
su
dd if=/mnt/sdcard/efs.img of=/dev/block/mmcblk0p10
or
Code:
su
dd if=/mnt/extSdCard/efs.img of=/dev/block/mmcblk0p10
Keep it safe and enjoy
Click to expand...
Click to collapse
With all respect to your post, I would like to warn people that this is not working for all the models/devices. Although it might look fine when executing the commands, it might not have made a backup of EFS, but of something else... What I know for sure is that it will not work for atleast the international i9505-model of the S4, as the partition layout is different.
In my post below, more details are given on this partition id.
http://forum.xda-developers.com/showthread.php?t=2276599
While executing your commands does not affect the device, it does not always give the people a backup they expect it to be, depending on their device/model. In my case you are able to verify which 'mmcblk' is actually efs on your device. It also gives a TAR backup as option.
Mr_Q said:
With all respect to your post, I would like to warn people that this is not working for all the models/devices. Although it might look fine when executing the commands, it might not have made a backup of EFS, but of something else... What I know for sure is that it will not work for atleast the international i9505-model of the S4, as the partition layout is different.
In my post below, more details are given on this partition id.
http://forum.xda-developers.com/showthread.php?t=2276599
While executing your commands does not affect the device, it does not always give the people a backup they expect it to be, depending on their device/model. In my case you are able to verify which 'mmcblk' is actually efs on your device. It also gives a TAR backup as option.
Click to expand...
Click to collapse
Mate... I've added that it is for I9505!!!!
I9500 have EFS located @ mmcblk0p3...........
thanks
I used GS2 repair from play store. It went through the usual process and I can see the back up file on the sd card. Can anybody more qualified confirm if this app works on S4?
Sent from my GT-I9505 using xda premium
djembey said:
Mate... I've added that it is for I9505!!!!
I9500 have EFS located @ mmcblk0p3...........
thanks
Click to expand...
Click to collapse
Great. You are right, in my case it's mmcblk0p10 as well, as mentioned correctly in my guide already.
Thank you for updating.
HANDSY said:
I used GS2 repair from play store. It went through the usual process and I can see the back up file on the sd card. Can anybody more qualified confirm if this app works on S4?
Sent from my GT-I9505 using xda premium
Click to expand...
Click to collapse
The best thing is to check it with the developer. I do not know what file has been created, although I expect it to be a raw copy using dd. The best thing is to do it manually. Or by the instructions given by djembey, or by the more detailed step-by-step instructions in the thread of my previous post here.
Hey, I managed to backup the EFS folder. Is there any way to modify the backup file and restore it after the modification? I want to change the IMEI number but unfortunately I have no box / cables available to do so. There must be a solution?! I am currently living in Turkey and they restrict western mobile phone usage for foreign people.
thanks a lot
cheers,
ralf
,
ralfa1234 said:
Hey, I managed to backup the EFS folder. Is there any way to modify the backup file and restore it after the modification? I want to change the IMEI number but unfortunately I have no box / cables available to do so. There must be a solution?! I am currently living in Turkey and they restrict western mobile phone usage for foreign people.
thanks a lot
cheers,
ralf
Click to expand...
Click to collapse
Same here with me
i9505 imei null
please can somebody help me,what ever I try not working.Unfortynately everything working,but always show imei null and not have baseband,of course and network too.I am install with Odin few different fabrics roms or how you call that.Last is this one with 4 files inside
I9505XXUGNG8_I9505OXXGNG2_I9505XXUGNG8_HOME.tar.Everything going fine,but havent imei like on start.I am also try few different things with EFS_Professional.but cannot fix my problem.Also I am try to erase EFS,but folder cannot erase,just files inside,and trying other one downloaded from net,but not going.Every time after reboot,EFS be back automatics,Can you help me ,please
If I am write inside EFS folder must be a file nv_data.bin ,I dot have that.Have lots of,but dont see that.I have inside few folders,like imei and etc.. And inside imei folder I have mps_code.dat.I am hope somebody can understand my problem.Can somebody sent to me that file,and can I take from other phone.Is that my solution,or what.HELP PLEASE
this is in function to my i9505,but not help me to solve problem.Somehow I not have file nv_data.bin on my phone in efs folder,and backup and restore not help me.Please do you no some solutions?

Failed EFS restore

Ok, I'm officially in trouble. I have a SM-G900F rooted with towelroot, SuperSu and BusyBox installed. I tried flashing with Mobile Odin Pro the latest NG2 firmware to keep root and not trip Knox. It failed twice (or three times), both times I was able to restore the original firmware with desktop Odin (http://forum.xda-developers.com/galaxy-s5/help/mobile-odin-pro-4-20-issues-t2834671).
Then something strange happened: I noticed that on 4G I had only data but no signal bars (http://forum.xda-developers.com/galaxy-s5/help/help-4g-data-signal-bars-t2837031). Then I had problems connecting to Wifi and a message appeared telling me I am in "Factory Mode" and some things are limited.
It was clear that my EFS partition is corrupted. I installed Root Explorer and there is nothing in my EFS folder (still I can use the phone in 2G/3G/4G for data and 2G/3G for calls but no Wifi).
I have 2 backups for EFS: one is made using Samsung Tools (http://forum.xda-developers.com/galaxy-s3/development/efs-samsung-tool-universal-support-t2602325) and it's an efs.img file, the other is made using some EFS backup tool and it's just a copy of exactly what was in EFS folder (a few folders and files). I tried using Samsung Tools to restore the backup but no luck. When I restart the phone, EFS folder is still empty.
I rebooted in recovery mode and it said "failed to mount /efs". That's probably why Samsung Tools can't do it's job but I'm not sure. At this moment I'm not sure of anything. I think that someone with some knowledge (knowledge that unfortunately I'm missing) can help me fix this.
I really need for some help, so any ideas are welcomed.
Thank's,
Mihai Raducan
..
fffft said:
No TWRP backup, huh? How did I know that was going to be the case? 10 demerits. Okay, you seem to have been on the right track in recognizing that your EFS partition was unmounted and therefore inaccessible in recovery mode.. but you didn't mount it? You didn't give us much detail to work with, but assuming that you have a custom recovery like TWRP, you could go to the advanced /mount menu and check the mount EFS partition. Or if you don't have that option for some reason, mount it yourself e.g.
.
Click to expand...
Click to collapse
It's only stock recovery, no TWRP or CWM.
I didn't mount the EFS partition before because I didn't know how. I'll follow your guide and report back.
Regarding the exact copy of EFS (efs.img): It's done with Samsung Tools but never had a chance to test it, so... I don't know. But let's take it one at a time. First problem: mount efs partition.
PS: My Windows laptop is playing tricks on me so it's going to take a while to reinstall Windows, adb, etc. But I'll be back.
Thank's.
..
Ok, I installed Adb, phone is recognized.
The first line of code
Code:
# ls -al /dev/block/platform/msm_sdcc.1/by-name
gave me a list with the location of efs (and more). EFS is at dev/block/mmcblk0p12.
The second line of code
Code:
# /sbin/mount /dev/block/mmcblk0p12 /efs
gives me : tmp-mksh: /sbin/mount: not found
Am I missing something?
is img of /efs partition enough for restore?
here, it says, that we need to have 3 partitions for full restore..??..: http://forum.xda-developers.com/showthread.php?t=2737448
dd if=/dev/block/mmcblk0p12 of=/mnt/sdcard/efs.img.ext4
dd if=/dev/block/mmcblk0p13 of=/mnt/sdcard/modemst1.bin
dd if=/dev/block/mmcblk0p14 of=/mnt/sdcard/modemst2.bin
but Samsung tool only makes efs.img..??.. who is right who is wrong?
..
fffft said:
Personally, if an EFS backup program made an image (.img} file and it was the same size as your EFS partition I'm sure that it was an exact copy and try writing it back. It's unlikely to make anything worse. But don't blame me if it somehow goes wrong. I'm just describing an option of last resort and commenting on what I would do with my own phone.
You can check the size of your EFS partition with the cat command (EFS should be partition 12)
Code:
$ su
# cat /proc/partitions
.
Click to expand...
Click to collapse
I checked the size of my efs.img and the size of the partition with the command you gave me. They are both 14MB but on a closer look, adb shows 14336 and Windows reports 14680kb. So I don't know....
fffft said:
You're using ADB instead of a terminal emulator app which is a new variable. There are a lot of ADB variants around and I have no idea what your command interpreter (mksh) or you have done with the shell environment.. which may require syntax adjustments.
Not found implies that the /system partition isn't mounted. But it could also be an ADB syntax quirk, path or symlink error, a typo or.. well, could be a lot of things. Perhaps try the syntax below. Or run the command from a terminal emulator instead of ADB shell.
Code:
$ su
# adb shell mount /system
# adb shell mount /efs
.
Click to expand...
Click to collapse
I installed Android Terminal Emulator and Shell Terminal Emulator (PlayStore) but I got the same thing. What's strange is that in both of them when I run the command "adb devices" they both give me nothing while in adb shell on desktop I get a number (as it should).
I understand that the syntax is for a specific terminal emulator. Tell me please what is that terminal emulator (that you know syntax is correct) so I can try with that one.
..
fffft said:
Try this terminal emulator app.
If you have continued difficulties, you should describe step by step what you are doing. In exhaustive detail or as close as you can get to that. Then someone in the forum will have a good basis to see where you are going astray. Or alternately where I made a typo or whatever the impediment turns out to be.
.
Click to expand...
Click to collapse
This is one the apps I tried with.
I'm describing step by step what I do. What I start with: SM-G900F rooted with towelroot, stock recovery, SuperSU and BusyBox installed, Knox 0x0.
I download and install https://play.google.com/store/apps/details?id=jackpal.androidterm.
Using this app:
Code:
su
and it changes to [email protected]:/#
I enter:
Code:
# ls -al /dev/block/platform/msm_sdcc.1/by-name
and it gives me a list with paths to different things. EFS apears to be at /dev/block/mmcblk0p12
I enter
Code:
# /sbin/mount /dev/block/mmcblk0p12 /efs
and it says: "tmp-mksh: /sbin/mount: not found"
When I try
Code:
adb devices
it gives me no number.
I attached a file where you can see what I did.
One more thing: when I enter (stock) recovery, every time it says "Installing system update" for about 20 seconds and then enters recovery where it says "failed to mount/efs : invalid argument". The CSC part is apparently ok.
..
It doesn't work. From ADB it says "mkdir failed for /efs, File already exists".
And from terminal emulator, (with busybox) it asks for an argument (pic atached).
Is there any way of using Odin to fix this, because it seems that nothing works.
fffft said:
Who is right about what? You didn't give much of a context for your question. The OP said that his EFS was corrupt, so we have been talking about EFS which is self contained in partition 12 or exported as efs.img.
Click to expand...
Click to collapse
i thought there could be more to the problem, not just /efs partition, since he said it was clear to him, and not beeing 100% fact..
..
Thank's for your time. I'm flashing now the original firmware (so I can start fresh) and I'll document every step I take. I'll report back.
Ok, I tried flashing the original firmware (ANE2) and this time I can't even get pass the Samsung authentication screen (the first time you boot your phone and asks for language, Google account, etc), It asks me for the Samsung account and password that this phone was registered with) and it tries for a couple of minutes to verify the credentials (on data network) then it fails saying it is a network error.
I tried wipe cache/factory reset (from recovery) and reinstall a different firmware. Same thing. It seems now it's really messed up.
As mentioned earlier, we did not expect a firmware image to fix your EFS. And the EFS is critical to normal phone operation.
The purpose of stock firmware is so that your phone is stable, reduce variables that might interfere and facilitate fixing your EFS. So I'm not why you apparently expected it to be an outright fix in and of itself?
Having installed the stock firmware should help you achieve your remaining goals. Now you need to decide if you are going to install a custom recovery or not. A custom recovery will increment your Knox flag if it isn't already. That affects very little, but it's your decision. It may affect the private mode feature or warranty claims, however many carriers don't care about Knox and E.U. legislation bars Samsung from invalidating a warranty unless they can demonstrate that root damaged your phone.
Whether or not you install a custom recovery, you will want to try writing your 14 MB EFS backup image to your phone. I believe that you'd find it easier to do so with a custom recovery. But it can be done with a stock one too, you will just have to deal with a bit more syntax in the latter case.
.
fffft said:
As mentioned earlier, we did not expect a firmware image to fix your EFS. And the EFS is critical to normal phone operation.
The purpose of stock firmware is so that your phone is stable, reduce variables that might interfere and facilitate fixing your EFS. So I'm not why you apparently expected it to be an outright fix in and of itself?
Having installed the stock firmware should help you achieve your remaining goals. Now you need to decide if you are going to install a custom recovery or not. A custom recovery will increment your Knox flag if it isn't already. That affects very little, but it's your decision. It may affect the private mode feature or warranty claims, however many carriers don't care about Knox and E.U. legislation bars Samsung from invalidating a warranty unless they can demonstrate that root damaged your phone.
Whether or not you install a custom recovery, you will want to try writing your 14 MB EFS backup image to your phone. I believe that you'd find it easier to do so with a custom recovery. But it can be done with a stock one too, you will just have to deal with a bit more syntax in the latter case.
.
Click to expand...
Click to collapse
I didn't expect to fix the problem, I wanted a fresh start so I can try again the adb/terminal emulator commands. But what I didn't expect was not being able to, basically, start the phone. When you first start a new phone (or after a factory reset) it asks you language, Wifi, Google account and, in my case, for a Samsung account that this phone was paired with.
If I try to connect to a Wifi network the phone reboots itself. If not, it tries via data connection. Google credentials are ok but when it tries to verify Samsung credentials it gets stuck saying that it's a network problem and it doesn't go futher. So I get stuck at this point, between booting and actually being able to use the phone. I can't install anything, I can't receive or make phone calls (like before). I can't go to USB debugging so ADB doesn't see the phone.
I don't want to install a custom recovery because my Knox is 0x0 and my warranty is intact. I live in EU but in this case, it's clear that root access is what got me in trouble and brought the phone in this state. Actually not root access got me in trouble, but what I did with root access
raducanmihai said:
I didn't expect to fix the problem, I wanted a fresh start so I can try again the adb/terminal emulator commands. But what I didn't expect was not being able to, basically, start the phone. When you first start a new phone (or after a factory reset) it asks you language, Wifi, Google account and, in my case, for a Samsung account that this phone was paired with.
If I try to connect to a Wifi network the phone reboots itself. If not, it tries via data connection. Google credentials are ok but when it tries to verify Samsung credentials it gets stuck saying that it's a network problem and it doesn't go futher. So I get stuck at this point, between booting and actually being able to use the phone. I can't install anything, I can't receive or make phone calls (like before). I can't go to USB debugging so ADB doesn't see the phone.
I don't want to install a custom recovery because my Knox is 0x0 and my warranty is intact. I live in EU but in this case, it's clear that root access is what got me in trouble and brought the phone in this state. Actually not root access got me in trouble, but what I did with root access
Click to expand...
Click to collapse
The only way to get your phone to work again and gain access to networks/wifi is by installing a new motherboard if you can`t restore the old EFS folder somehow.
Next time try this method to backup and restore your EFS folder http://forum.xda-developers.com/showthread.php?t=2737448 if you are rooted.
raducanmihai said:
I didn't expect to fix the problem, I wanted a fresh start
Click to expand...
Click to collapse
Sorry that you found it a surprise.. but if reinstalling the stock firmware eliminated your phones problems, that would make it a solution, whereas it's a stepping stone. I did try to explain this earlier, where I told you that installing the firmware would not fix your EFS. And the EFS is essential to normal phone operation.
Regardless of the surprise, you are now on a better footing to finish fixing your phone. But for clarity, your problem started when your EFS got corrupted somehow. And your EFS needs to be restored before the problem will be resolved.
On the positive side, you appear to have a EFS backup, even if the backup app won't easily restore it to you phone. If you stick with it.. you just have some minor hurdles remaining - syntax or whatever - in getting your 14 MB EFS backup restored (written) to your EFS partition.
If you want that done painlessly, then pack a case of beer and your phone into a box and ship it to me. And I'll return it fixed. As it seems unlikely that you'd do that though.. then try to provide as much info as you can here and someone will try to help you finish fixing your phone in this thread.
.

please help help G900F ( Dead )

Hi
I have a problem i get this error : E:failed to mount /efs (Invalid argument)
and the /efs file is empty there is nothing there what do i have to do please help
and the other message i get is ( Factory mode is on )
and sometimes it register the network after some hours it got no service and after flash i got back my network it hapend many times.
Please help.
Click to expand...
Click to collapse
The Phone is Dead now !! anyone can help please
habab said:
Hi
I have a problem i get this error : E:failed to mount /efs (Invalid argument)
and the /efs file is empty there is nothing there what do i have to do please help
and the other message i get is ( Factory mode is on )
and sometimes it register the network after some hours it got no service and after flash i got back my network it hapend many times.
Please help.
Click to expand...
Click to collapse
Read this thread.
vndnguyen said:
Read this thread.
Click to expand...
Click to collapse
i didn't understand this
2- Create a file with a name 'factorymode' on the sdcard, open it, input 'ON' and then save it. Navigate to the efs folder, create the folder with a name 'FactoryApp' (case sensitive). Finally move the file 'factorymode' you have created above to that folder. Reboot the phone to see if the problem still persists?
vndnguyen said:
Read this thread.
Click to expand...
Click to collapse
i have tried that thread still have same problem .
Any help !?!?
..
fffft said:
I'm sure that you find this frustrating. However we are not psychic. Unless you tell us what led up to this and in particular, a step by step, detailed description of what you have tried, how can we discern going on?
What led up to this situation? What exactly have you tried? Step by step, in detail. What exactly is in your /efs folder? Did you create the /efs/FactoryApp/factorymode file as was suggested earlier? Do you have a backup of your /efs partition? Is reactivation lock disabled?
If you actually created the file in the manner described and it didn't succeed and barring something novel in a description of your situation the next step is probably to mount the /efs partition from recovery mode, format it, recreate the /efs folder, remount and reboot so that the efs is rebuilt. But before you do any of that, give us a better description of your situation.
.
Click to expand...
Click to collapse
Hi , i Downloaded a efs backup app and i just pressed on restore before i press on backup , after that the /efs file is empty . i tried to make ( /efs/FactoryApp/factorymode ) with this app : root browser but that didn't work...
i have tried to Flash with many stock room from sammobile but the /efs file still empty .
after reboot i have to connect to Wifi every time i reboot the phone and some time i have Network and some time nott .
..
yes i have backup of the efs ,
the app that i am using just named Root browser with black android pirate icon
.
i maked the directory ( FactoryApp ) then ( file factorymode on the root ) then moved it on FactoryApp , after reboot i find the file emptey again !
and i used this app ( http://forum.xda-developers.com/galaxy-s3/development/efs-samsung-tool-universal-support-t2602325 ) for backup
..
1. i am sorry, my English is so bad !!
2. day 1 , i Downloaded the app Samsung tool and then maked a backup of EFS on External SD-Card ,
3. I maked restore and i had removed the SD-card
4. after that i didn't know that the efs file was damaged , i just installed an room from sammobile ( G900FXXU1ANG9_G900FNEE1ANG5_NEE ) , after the installation was done the phone started but i got an warning massage that says , FactoryMode is on and the wifi was off and only emergency call , i rebooted the phone the wifi was till of but i got back my Network after that i tried many firmware from sammobile
5. o searched on xda and find that it can be the efs but when opened the /efs it was empty.
6. i have the efs-backup on my sd i tried to restore it but nothing happened .
7. i tested that ( Opened this app : https://play.google.com/store/apps/details?id=com.jrummy.root.browserfree ) maked /efs/FactoryApp/ and then file factorymode , ON ) but it can't be moved to FactoryApp when i move or copy it to the folder it is nott there , After rebooting the phone even the FactoryApp directory is deleted .
in my sdcard i found only this ( samsung tool/efs.img )
i tried to make this again
directory ( FactoryApp ) then ( file factorymode on the root ) then moved it on FactoryApp
Click to expand...
Click to collapse
After reastart phone screen is just black !! but the pc is finding it !!! now the phone is dead
..
No i can't boot to anything !! it is just black screen .
No i can't boot to anything !! it is just black screen .
please help me with that.
vndnguyen said:
Read this thread.
Click to expand...
Click to collapse
fffft said:
I'm sure that you find this frustrating. However we are not psychic. Unless you tell us what led up to this and in particular, a step by step, detailed description of what you have tried, how can we discern going on?
What led up to this situation? What exactly have you tried? Step by step, in detail. What exactly is in your /efs folder? Did you create the /efs/FactoryApp/factorymode file as was suggested earlier? Do you have a backup of your /efs partition? Is reactivation lock disabled?
If you actually created the file in the manner described and it didn't succeed and barring something novel in a description of your situation the next step is probably to mount the /efs partition from recovery mode, format it, recreate the /efs folder, remount and reboot so that the efs is rebuilt. But before you do any of that, give us a better description of your situation.
.
Click to expand...
Click to collapse
fffft said:
No problem and your patience is appreciated.
Nothing anomalous is showing up in those details so I think we can safely assume that accidentally pressing the restore button rather than backup button simply corrupted your efs partition. All of those questions were aimed at confirming that with certainty, but I understand that this is a lot of work and frustrating for you too. So we'll proceed on that basis.
An efs.img file is an uncompressed efs backup. So try restoring that with your efs program. I have no idea if it is a valid (working) backup, but you aren't going to cause any further harm by trying to restore it. If that works, great and you're done. If not, then we'll go on to rebuild your efs instead.
To rebuild your efs partition we need a custom recovery. So a few last questions.
You are rooted, correct?
Did you use Towel root or CF-autoroot? (I am trying to discern if you have super su /busybox installed)
Are you able to boot to recovery mode (home + power up + power)?
Do you have a custom recovery installed e.g. TWRP or CWM?
If you can answer yes to all four questions, then go ahead and run the following efs repair script. If not, then you'll need to install a custom recovery first. If you're already rooted but don't have TWRP, then it's just a matter of flashing TWRP with Odin from download mode.
In any event, once you have a custom recovery in place you can run this recovery script.
Download the script here. Copy it to your external SD card. Then boot to recovery mode and install the flashable zip file "Brick_Loop_FIX_afterRestoringBackup.zip" that you copied to your Ext SD card.
Then reboot. If you still have any issues, reboot a second time, then let us know if your phone is working properly again.
Credit to Backachu, I believe for saving me the work of having to write a script for you or describe how to enter the commands manually.
The script comes from this thread. http://forum.xda-developers.com/showthread.php?p=47014662
As an aside, there is a minor mystery there. This comes from a Note 3 thread so when I went to modify it to work with your S5, I found that it was already set up for the S5 rather than the Note 3.. so why it is that way in a Note 3 thread is a mystery. Go figure. But I did check and you can use it the way it is.
.
---------- Post added at 07:43 AM ---------- Previous post was at 07:36 AM ----------
I'm not sure what you mean by "dead". If you can boot to recovery & download mode, don't worry about it for now. Otherwise please elaborate.
.
Click to expand...
Click to collapse
..
fffft said:
Don't panic. I'm sure that we can address the new issue, whatever it is.
I need a little information to determine how to fix it.
I understood that your screen is black after you rebooted. What do you mean by the PC can find it. What message do you see on the PC.. the normal USB message when you connect your phone or something else? If something else, what is the exact message from the PC?
Also please do the following
Disconnect the USB cable and remove your battery from your phone for ten seconds. Then replace the battery.
Now press and keep holding the home button. Then press and hold the volume down button as well, then lastly the power button. Keep holding all three until the phone starts (about ten seconds).
Let me know if you do or don't get to the download mode screen when you do that.
If you don't, try it a second time, just in case you weren't continously holding all three keys to get into download mode.
If you still don't, then we want to ensure that the Kies program is not running (if you have Kies on your computer). Then try going to download mode again in the same manner as above, then plug the phone into your computer with the USB cable and start the Odin 3.09 program and tell me what you see on the Odin screen.
.
Click to expand...
Click to collapse
When i plug it in i get a news USB device named : ZUES Flash Device .
i have tried to Hold Home + Volume - + Power nothing happen.
Odin don't find it , and kies program is not running.
..

Categories

Resources