EFS IMEI Backup? - Galaxy S 4 Q&A, Help & Troubleshooting

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?

Related

Restoring a dd backup with Odin (A fix for a badly broken EFS)

I was reading rotohammer's post about an easy on-device backup method (using dd) that can restore data at a bit more of a lower level (Odin) than a nandroid backup. (EFS partitions, etc.)
It's possible to get your EFS partition in such a state that the /dev/block/bml3 and /dev/block/stl3 devices are no longer exposed on the device at all. This results in such nice behavior as the Cellular portion of the device not functioning at all. Providing you made a dd backup of all bml and stl devices (i.e. you have a backup of stl3 specifically,) you can recover from this situation.
Odin can recognize any file defined in the .pit file, when they are flashed to the PDA slot in a .tar, and place them in their proper partitions. One benefit to this is that if you get the EFS partition to a place where the device nodes aren't exposed to the OS anymore, you can restore it to working functionality.
These are the possible filenames that Odin recognizes: (from 512.pit, other .pits may have differing partition schemes.)
Code:
ries.pit
efs.rfs (this is the file we are going to restore to fix a broken EFS with a dd backup)
sbl.bin
param.lfs
zImage (kernel and recovery)
factoryfs.rfs
dbdata.rfs
cache.rfs
modem.bin
Any of these files are flashable by Odin3 1.7 if you place them in a .tar and put in the PDA slot.
rotohammer's post details which device matches up with which filename, in this case what we want to do is name the /dev/block/stl3 backup efs.rfs, and add it to a tar file (efs.tar) then flash it.
Assuming you have adb installed, and the stl3.bin file in the current folder:
adb push stl3.bin /sdcard/efs.rfs
adb shell
$ su
#
# cd /sdcard
# tar -cf efs.tar efs.rfs
# exit
$ exit
adb pull /sdcard/efs.tar
Now, get into download mode, open odin, stick efs.tar in PDA slot, and press start. Bam! EFS fixed
Note that in normal conditions you won't need a backup this extreme (copies of the files inside will be ok) but i've seen a number of users who have gotten their phones into this state (and did it myself during testing!) - This works with all the partitions you back up with dd that have support in your .pit file.
I've also used this to make an odin backup of my ROM, and flash it back later. This way you can have a pre-lagfixed ROM, for example
Dedicated to cerjam
how to obtain stl3 and bml3
in adb
adb shell
su (allow the root access)
cat /dev/block/stl3 > /sdcard/stl3.bak
cat /dev/block/bml3 > /sdcard/bml3.bak
rename .bak by .bin
sorry for my english.
Da_G said:
I was reading rotohammer's post
I've also used this to make an odin backup of my ROM, and flash it back later. This way you can have a pre-lagfixed ROM, for example
Dedicated to cerjam
Click to expand...
Click to collapse
How can I make ODIN back of my ROM, a little guide would help. Thanks in advance for your response.
trip007in said:
How can I make ODIN back of my ROM, a little guide would help. Thanks in advance for your response.
Click to expand...
Click to collapse
hi please use the search button , you will easily find how to , this is a 5 month old thread ....
Gonna go out on a limb and assume they are using search, hence the 5 month old post bump.
whiteguypl said:
Gonna go out on a limb and assume they are using search, hence the 5 month old post bump.
Click to expand...
Click to collapse
I dunno how they used it but htere s a 2 weeks old post by darky in the i9000 section .
can someone upload efs.rfs?efs.tar?
i screwd mine and i dont have backup
Every device has there own efs folder (IMEI and stuf).
So if you don't have a backup I don't know what to tell you...
thats not nv_data.bin or imei and product code stuffi want efs partition structure
wich come from stl3.bin
This thread may be almost a year old, but it just saved my Infuse.
Once again it just proves that if you serach, read, try and search, read and try somemore, you can find the answers.
Truckerglenn said:
This thread may be almost a year old, but it just saved my Infuse.
Once again it just proves that if you serach, read, try and search, read and try somemore, you can find the answers.
Click to expand...
Click to collapse
Someone gets it lolz .
Sent from my SAMSUNG-SGH-I897 using xda premium
moeinf said:
thats not nv_data.bin or imei and product code stuffi want efs partition structure
wich come from stl3.bin
Click to expand...
Click to collapse
Sorry im late...but adamoutler was going to post a blank efs partition in another thread . Dont know what happenwd to it tho.
Sent from my SAMSUNG-SGH-I897 using xda premium
Da_G said:
I was reading rotohammer's post about an easy on-device backup method (using dd) that can restore data at a bit more of a lower level (Odin) than a nandroid backup. (EFS partitions, etc.)
It's possible to get your EFS partition in such a state that the /dev/block/bml3 and /dev/block/stl3 devices are no longer exposed on the device at all. This results in such nice behavior as the Cellular portion of the device not functioning at all. Providing you made a dd backup of all bml and stl devices (i.e. you have a backup of stl3 specifically,) you can recover from this situation.
Odin can recognize any file defined in the .pit file, when they are flashed to the PDA slot in a .tar, and place them in their proper partitions. One benefit to this is that if you get the EFS partition to a place where the device nodes aren't exposed to the OS anymore, you can restore it to working functionality.
These are the possible filenames that Odin recognizes: (from 512.pit, other .pits may have differing partition schemes.)
Code:
ries.pit
efs.rfs (this is the file we are going to restore to fix a broken EFS with a dd backup)
sbl.bin
param.lfs
zImage (kernel and recovery)
factoryfs.rfs
dbdata.rfs
cache.rfs
modem.bin
Any of these files are flashable by Odin3 1.7 if you place them in a .tar and put in the PDA slot.
rotohammer's post details which device matches up with which filename, in this case what we want to do is name the /dev/block/stl3 backup efs.rfs, and add it to a tar file (efs.tar) then flash it.
Assuming you have adb installed, and the stl3.bin file in the current folder:
adb push stl3.bin /sdcard/efs.rfs
adb shell
$ su
#
# cd /sdcard
# tar -cf efs.tar efs.rfs
# exit
$ exit
adb pull /sdcard/efs.tar
Now, get into download mode, open odin, stick efs.tar in PDA slot, and press start. Bam! EFS fixed
Note that in normal conditions you won't need a backup this extreme (copies of the files inside will be ok) but i've seen a number of users who have gotten their phones into this state (and did it myself during testing!) - This works with all the partitions you back up with dd that have support in your .pit file.
I've also used this to make an odin backup of my ROM, and flash it back later. This way you can have a pre-lagfixed ROM, for example
Dedicated to cerjam
Click to expand...
Click to collapse
If I could Ill kiss you! Thank you it really did the trick!

[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?

How backup and restore imei

So, you will need YOUR WORKING phone, root and terminal emulator
For backup open emulator and write:
su
(your phone will ask you for root acces)
dd if=dev/block/mmcblk0p3 of=removable/MicroSD/mmcblk0p3.img
dd if=dev/block/mmcblk0p5 of=removable/MicroSD/mmcblk0p5.img
(MicroSD is name of my cd card, so if your sdcard name is storage you will use this command: ...of=removable/storage/mmcblk0p3.img or mmcblk0p5.img)
-now you have your imei restored in your sdcard
For restore:
you will need YOUR i say again YOUR backuped mmcblk, of you will use ANOTHER mmcblk0p3 you will get fake imei (some like 0004488xxxx) and your calling will never work.
so, open again terminal:
su
(your phone will ask you for root acces)
dd if=removable/MicroSD/mmcblk0p3.img of =dev/block/mmcblk0p3
dd if=removable/MicroSD/mmcblk0p5.img of =dev/block/mmcblk0p5
(MicroSD is name of my cd card, so if your sdcard name is storage you will use this command: dd if=removable/storage/mmcblk0p3.img or mmcblk0p5.img.....)
now restart phone , and open dialer y will see for some secund "actualising database of contacts"
then press *#06*
you will see your imei
this works !! i sayed beacuse after instal tanks alfa AOSP 5.0 i got "fake" imei, but thanks got i have backuped my imei so i restored them i its work
IF THIS INSTRUCTION WILL NOT WORK
1) you have propably motherboard broblem i have them too, and repair is very expensive ( more then 100 euros), so pls control your dev/block/ ind try found mmcblk0p3 or mmcblk0p5 if you have it in dev/block/ i have bad masege for you , you will need new motherboard, but good massage is then you didnt lost your imei in fact:
2)you used bad mmcblk0p3 or mmcblk0p5
3)you have propably mistake in proses
I hope it will help you.
and sorry for my english i hope then y understand me
kihope12 said:
So, you will need YOUR WORKING phone, root and terminal emulator
For backup open emulator and write:
su
(your phone will ask you for root acces)
dd if=dev/block/mmcblk0p3 of=removable/MicroSD/mmcblk0p3.img
dd if=dev/block/mmcblk0p5 of=removable/MicroSD/mmcblk0p5.img
(MicroSD is name of my cd card, so if your sdcard name is storage you will use this command: ...of=removable/storage/mmcblk0p3.img or mmcblk0p5.img)
-now you have your imei restored in your sdcard
For restore:
you will need YOUR i say again YOUR backuped mmcblk, of you will use ANOTHER mmcblk0p3 you will get fake imei (some like 0004488xxxx) and your calling will never work.
so, open again terminal:
su
(your phone will ask you for root acces)
dd if=removable/MicroSD/mmcblk0p3.img of =dev/block/mmcblk0p3
dd if=removable/MicroSD/mmcblk0p5.img of =dev/block/mmcblk0p5
(MicroSD is name of my cd card, so if your sdcard name is storage you will use this command: dd if=removable/storage/mmcblk0p3.img or mmcblk0p5.img.....)
now restart phone , and open dialer y will see for some secund "actualising database of contacts"
then press *#06*
you will see your imei
this works !! i sayed beacuse after instal tanks alfa AOSP 5.0 i got "fake" imei, but thanks got i have backuped my imei so i restored them i its work
IF THIS INSTRUCTION WILL NOT WORK
1) you have propably "second" problem with imei i have them too, so pls control your dev/block/ ind try found mmcblk0p3 or mmcblk0p5 if you have it in dev/block/ i have bad masege for you , a dont now how fix it, but good massage is then you didnt lost your imei in fact:
2)you used bad mmcblk0p3 or mmcblk0p5
3)you have propably mistake in proses
I hope it will help you.
and sorry for my english i hope then y understand me
Click to expand...
Click to collapse
my phone tried. but wont work. imei still null and camera is not found.
could you please attach mmcblk0p3.img?
kevin mitnick said:
my phone tried. but wont work. imei still null and camera is not found.
could you please attach mmcblk0p3.img?
Click to expand...
Click to collapse
sorry, you must use mmcblk from your phone with working imei you cant use mmcblk from another mobile
now you must sent phone to asus service center i do it now too (another prob. )
i think then theyaren very expensive
The two files are... then my phone null imei number is a motherboard problem?
kihope12 said:
So, you will need YOUR WORKING phone, root and terminal emulator
For backup open emulator and write:
su
(your phone will ask you for root acces)
dd if=dev/block/mmcblk0p3 of=removable/MicroSD/mmcblk0p3.img
dd if=dev/block/mmcblk0p5 of=removable/MicroSD/mmcblk0p5.img
(MicroSD is name of my cd card, so if your sdcard name is storage you will use this command: ...of=removable/storage/mmcblk0p3.img or mmcblk0p5.img)
-now you have your imei restored in your sdcard
For restore:
you will need YOUR i say again YOUR backuped mmcblk, of you will use ANOTHER mmcblk0p3 you will get fake imei (some like 0004488xxxx) and your calling will never work.
so, open again terminal:
su
(your phone will ask you for root acces)
dd if=removable/MicroSD/mmcblk0p3.img of =dev/block/mmcblk0p3
dd if=removable/MicroSD/mmcblk0p5.img of =dev/block/mmcblk0p5
(MicroSD is name of my cd card, so if your sdcard name is storage you will use this command: dd if=removable/storage/mmcblk0p3.img or mmcblk0p5.img.....)
now restart phone , and open dialer y will see for some secund "actualising database of contacts"
then press *#06*
you will see your imei
this works !! i sayed beacuse after instal tanks alfa AOSP 5.0 i got "fake" imei, but thanks got i have backuped my imei so i restored them i its work
IF THIS INSTRUCTION WILL NOT WORK
1) you have propably motherboard broblem i have them too, and repair is very expensive ( more then 100 euros), so pls control your dev/block/ ind try found mmcblk0p3 or mmcblk0p5 if you have it in dev/block/ i have bad masege for you , you will need new motherboard, but good massage is then you didnt lost your imei in fact:
2)you used bad mmcblk0p3 or mmcblk0p5
3)you have propably mistake in proses
I hope it will help you.
and sorry for my english i hope then y understand me
Click to expand...
Click to collapse
akirarima said:
The two files are... then my phone null imei number is a motherboard problem?
Click to expand...
Click to collapse
if you dont have backup of your imei only service center can help you , an d it isn cheap...
If anyone is facing this problem then Download Firmware from Asus site. Make sure it's same sku and variant, flash or sideload or install it from sd card method. After installation, power off and charge ur phone for 5-6 hours. Boot into phone let it Complete the boot process.. Check ur IMEI it would be fix.
Regards
Sent from my ASUS_T00F using Tapatalk
no it does not help
herecomesmaggi said:
If anyone is facing this problem then Download Firmware from Asus site. Make sure it's same sku and variant, flash or sideload or install it from sd card method. After installation, power off and charge ur phone for 5-6 hours. Boot into phone let it Complete the boot process.. Check ur IMEI it would be fix.
Regards
Sent from my ASUS_T00F using Tapatalk
Click to expand...
Click to collapse
using this method is not fixing imei issue
Harshatxda said:
using this method is not fixing imei issue
Click to expand...
Click to collapse
Now there are other quick methods to rewrite imei. Please check guide thread. This thread is old. Use search instead.
Regards.
Hello maggi,
I lost IMEI of my two phones during twrp restore. One is at a local shop. It will be really good if you can guide me. Cz i am searching from 3 days but could not get any proper solution. Kindly suggest something
HUMBLE request
herecomesmaggi said:
Now there are other quick methods to rewrite imei. Please check guide thread. This thread is old. Use search instead.
Regards.
Click to expand...
Click to collapse
hello maggi,
i humbly request you to please provide me the lnk for faster IMEI flashing because i am searching for same since past two months but i am not getting the particular right link, please provide the exact link you are mentioning. it will be highly appreciated.
Harshatxda said:
hello maggi,
i humbly request you to please provide me the lnk for faster IMEI flashing because i am searching for same since past two months but i am not getting the particular right link, please provide the exact link you are mentioning. it will be highly appreciated.
Click to expand...
Click to collapse
Hello,
Follow this link.. This method works every time. And I must also warn u, the imei gets null whenever we downgrade from custom firmware, it's a bug.
https://forum.xda-developers.com/zenfone-5/help/rewrite-imei-null-00049-zenfone-5-t3389046
Yes, this is old you should folow link what herecomesmaggi post here.

[needed]persist backup of moto g5 plus which is not bricked yet

Hey guys as you know that we are able to get back volte successfully in Moto g5 plus by restoring PERSIST BACKUP.
So I think MAYBE persist partition got corrupted during flashing back stock.
But that backup is from MOTO G4 PLUS ,and some user facing a problem that whenever they reboot volte and imei again gone,and Everytime they have to restore efs (maybe because of that persist partition)so I am requesting you ,can someone please pull out persist backup of STOCK MOTO G5 PLUS WITH WORKING VOLTE (OR G5 PLUS WHICH IS NOT BRICKED YET).
I AM ATTACHING A TWRP FOR TAKING BACKUP WHICH IS MADE BY DEVELOPER.
SO YOU HAVE TO JUST GO IN TO BACKUP AND TAKE BACKUP OF PERSIST PARTITION
You can download twrp from below link.
https://potterroms.ddns.net/TWRP/twrp-3.2.1-1-potter_persist.img
I am not responsible for any brick/damage caused during you taking backu
Alright, so I got a Persist backup using the partition backup & restore app. I don't use VoLTE, but my IMEI hasn't become zero. I'm on Oreo. It's saved as a .img file. If this is helpful I'll upload the file. @akshu2697
thedr34m13 said:
Alright, so I got a Persist backup using the partition backup & restore app. I don't use VoLTE, but my IMEI hasn't become zero. I'm on Oreo. It's saved as a .img file. If this is helpful I'll upload the file. @akshu2697
Click to expand...
Click to collapse
I would definitely love to give it a go. I've had to restore my EFS every reboot since I tried installing Pixel Experience. I'd love to not have to remember anymore!
telegram @bcraw
thedr34m13 said:
Alright, so I got a Persist backup using the partition backup & restore app. I don't use VoLTE, but my IMEI hasn't become zero. I'm on Oreo. It's saved as a .img file. If this is helpful I'll upload the file. @akshu2697
Click to expand...
Click to collapse
Yes,it will be helpful,can you please upload that file.?
akshu2697 said:
Yes,it will be helpful,can you please upload that file.?
Click to expand...
Click to collapse
There you go.
thedr34m13 said:
There you go.
Click to expand...
Click to collapse
i will try ,
thank you so much brother
akshu2697 said:
i will try ,
thank you so much brother
Click to expand...
Click to collapse
No problem. Happy to help. If there's a way to get a better backup, tell me and I'll try.
thedr34m13 said:
No problem. Happy to help. If there's a way to get a better backup, tell me and I'll try.
Click to expand...
Click to collapse
sorry brother ,
i tried your backup,but this backup isn't working,
we need twrp persist backup as i have posted on the thread of volte.
akshu2697 said:
sorry brother ,
i tried your backup,but this backup isn't working,
we need twrp persist backup as i have posted on the thread of volte.
Click to expand...
Click to collapse
Not sure how to backup persist in twrp. Couldn't find instructions anywhere. If you find instructions, tell me and I'll upload the backup.
thedr34m13 said:
Not sure how to backup persist in twrp. Couldn't find instructions anywhere. If you find instructions, tell me and I'll upload the backup.
Click to expand...
Click to collapse
sure,i'll do
DELETED
With a lot of research, I was able to dump the persist partition using adb. My dump will do no good, as I have only been able to get persist back by OP's method. We need someone to dump who has not flashed an oreo rom. Ok, that being said, here is how.
Make sure your phone is rooted.
Make sure usb debugging is enabled.
Boot phone into recovery.
Open adb with phone connected to pc.
Code:
adb devices
You should see your device listed.
Code:
adb shell
You should get ~# and something like a backward arrow [6N. That was mine yours may differ. If you have ~$ instead of ~# you are not rooted properly. If you used magisk you may have to add the sudo module.
Code:
ls -al /dev/block/platform/soc/7824900.sdhci/by-name
This will give you a list of all partitions. Look through them and find one described as persist. Mine was this:
Code:
lrwxrwxrwx 1 root root 21 Jan 1970 persist -> /dev/block/mmcblk0p30
We are interested in the address /dev/block/mmcblk0p30.
We need to type in
Code:
dd if=/yourMountingPoint of=/yourDestination/partitionType
where /yourMounting point is the persist address, if like mine /dev/block/mmcblk0p30. /your destination will be where you want to save it, and partition type should be persist.img.
My command was this
Code:
dd if=/dev/block/mmcblk0p30 of=/external_sd/persist.img
This will give us a proper persist .img file.
Here it is.
I clean flash stock rom (potter_NPNS25.137-93-4) before getting the persist file, was on crDroid 7.1 before. I don't know if volte is working because we don't have it on my country, but I never flashed Oreo before and never lost imei or 4g/lte, so it should be fine.
Hope it helps us and use at your own risk.
https://drive.google.com/drive/folders/1bqdxheka3jKG76AXdEExIdhG81D3agLM
[email protected] said:
With a lot of research, I was able to dump the persist partition using adb. My dump will do no good, as I have only been able to get persist back by OP's method. We need someone to dump who has not flashed an oreo rom. Ok, that being said, here is how.
Make sure your phone is rooted.
Make sure usb debugging is enabled.
Boot phone into recovery.
Open adb with phone connected to pc.
Code:
adb devices
You should see your device listed.
Code:
adb shell
You should get ~# and something like a backward arrow [6N. That was mine yours may differ. If you have ~$ instead of ~# you are not rooted properly. If you used magisk you may have to add the sudo module.
Code:
ls -al /dev/block/platform/soc/7824900.sdhci/by-name
This will give you a list of all partitions. Look through them and find one described as persist. Mine was this:
Code:
lrwxrwxrwx 1 root root 21 Jan 1970 persist -> /dev/block/mmcblk0p30
We are interested in the address /dev/block/mmcblk0p30.
We need to type in
Code:
dd if=/yourMountingPoint of=/yourDestination/partitionType
where /yourMounting point is the persist address, if like mine /dev/block/mmcblk0p30. /your destination will be where you want to save it, and partition type should be persist.img.
My command was this
Code:
dd if=/dev/block/mmcblk0p30 of=/external_sd/persist.img
This will give us a proper persist .img file.
Click to expand...
Click to collapse
How to restore this file brother.?
N1vBruno said:
Here it is.
I clean flash stock rom (potter_NPNS25.137-93-4) before getting the persist file, was on crDroid 7.1 before. I don't know if volte is working because we don't have it on my country, but I never flashed Oreo before and never lost imei or 4g/lte, so it shoud be fine.
Hope it helps us and use at your own risk.
https://drive.google.com/drive/folders/1bqdxheka3jKG76AXdEExIdhG81D3agLM
Click to expand...
Click to collapse
Thank you sooo much brother.
Thank you for your support.
akshu2697 said:
How to restore this file brother.?
Click to expand...
Click to collapse
Aren't you the OP of this? I thought you needed a way to dump the original partitions, and I provided the method with step by step to do so. I've never coded for android systems, but I'm very familiar with close cousin linux, so I suppose I could investigate and learn. However I would think whomever developed the G4 plus method could use the above dump for our phone. I guess I assumed it was you who discovered this method. I'll dig into it further when I get some time, but getting the clean persist dump was what was asked to do.
I was able to write the above persist.img file by:
1. transfer persist.img to my external_sd
2. booting into twrp
3. opening terminal
4. entering
Code:
dd if=/external_sd/persist.img of=/dev/block/mmcblk0p30
However, this placed my EMEI to 0, and I had to restore my saved efs with moto g4 + persist to get signal back. But remember, I had problem with efs every time I reboot, so my case may not be typical of those of you whose moto g4+ persist was working fine for. I would be curious if N1vBruno's persist was at the same address as mine, namely
Code:
/dev/block/mmcblk0p30
Guys who have restored their VoLTE, does your IMEI match the one that came with your phone or has it changed to something else?
I'm just being curious as I thought using someone else's persist backup would restore his IMEI to your phone, or was it efs?
Please correct me if I'm wrong.
psychopac said:
Guys who have restored their VoLTE, does your IMEI match the one that came with your phone or has it changed to something else?
I'm just being curious as I thought using someone else's persist backup would restore his IMEI to your phone, or was it efs?
Please correct me if I'm wrong.
Click to expand...
Click to collapse
It is efs.
[email protected] said:
I would be curious if N1vBruno's persist was at the same address as mine, namely
Code:
/dev/block/mmcblk0p30
Click to expand...
Click to collapse
Yes,
Code:
persist -> /dev/block/mmcblk0p30
psychopac said:
I'm just being curious as I thought using someone else's persist backup would restore his IMEI to your phone, or was it efs?
Click to expand...
Click to collapse
I hope not lol

Restore Persist.img

After a failed update and some flashing my 4G Connection is gone (sim is locked, no baseband).
Howeever I made a backup of persist.img, modemst1.img and modemst2.img months ago.
Couldn't figure out so far how to restore the files, could someone tell me how to do?
Code:
dd if=/path/to/persist.img*modemst1.img of=/path/to/persist*modemst1-partition
Thanx for the reply, so do I need to do this step 3 Times for all 3 Files?
dd if=/path/to/persist.img*modemst1.img of=/path/to/persist*modemst1-partition
would that mean then for modemst2:
dd if=/path/to/persist.img*modemst2.img of=/path/to/persist*modemst2-partition ???
Do I need another command for the persist.img too?
Sorry for asking, but I don't wanna mess up even more with my persist file.
How did you backup these partitions?
A .img file is a bit to bit copy of a partition or a drive.
Are you sure you have a backup ending with .img? That's very important for the way you restore your backup!!
If you have .img backups then you will restore them like this:
First copy your .img files to /sdcard (internal storage).
persist.img:
Code:
dd if=/sdcard/persist.img of=/dev/block/by-name/persist
modemst1.img
Code:
dd if=/sdcard/modemst1.img of=/dev/block/by-name/modemst1
modemst2.img
Code:
dd if=/sdcard/modemst2.img of=/dev/block/by-name/modemst2
Restart your device!
Thanx for the reply,
My files are definately .img files, I backed them up months ago when starting with the Custom Rom Stuff, too be (hopefully) save.
Backed them up with this 3 commands
dd if=/dev/block/mmcblk0p2 of=/sdcard/modemst1.img
dd if=/dev/block/mmcblk0p3 of=/sdcard/modemst2.img
dd if=/dev/block/mmcblk0p4 of=/sdcard/persist.img
Was long ago so I couldn't remember exactly everything in Detail.
One Question left, setting the Commands while in Bootloader, TWRP or normal in system?
Dave-C said:
Thanx for the reply,
My files are definately .img files, I backed them up months ago when starting with the Custom Rom Stuff, too be (hopefully) save.
Backed them up with this 3 commands
dd if=/dev/block/mmcblk0p2 of=/sdcard/modemst1.img
dd if=/dev/block/mmcblk0p3 of=/sdcard/modemst2.img
dd if=/dev/block/mmcblk0p4 of=/sdcard/persist.img
Was long ago so I couldn't remember exactly everything in Detail.
One Question left, setting the Commands while in Bootloader, TWRP or normal in system?
Click to expand...
Click to collapse
Are you sure you backed up mmcblk0p2/3/4?? Because these partitions are definitively not the persist or modemst ones! If you execute the commands above you will override your partitions with the wrong data!!
WoKoschekk said:
Are you sure you backed up mmcblk0p2/3/4?? Because these partitions are definitively not the persist or modemst ones! If you execute the commands above you will override your partitions with the wrong data!!
Click to expand...
Click to collapse
Yes backed up with these 3 Commands, found them somewhere in this board.
Had these commands saved on my PC, so definately used them but probably good that I didn't used them yet.
Howeever, I also have a TWRP Backup with EFS and persist files (efs1.emmc.win, efs2emmc.win, persist.ext4.win).
How could I use them, simply via TWRP or better way to do this?
Can't Believe it....
After lots of flashing (Back to Stock etc.) I got my 3G/4G/Baseband Connections back!
Could you tell me the right Commands to backup the Persist/EFS/Modem Parts?
Anyways thank you so much for patiently helping me through this.
Thanx!
Use the TWRP backups. They're perfect!
Did the TWRP Backups now.
In case you know the commands for the img output, i'd still like to know.
I'd like an independent solution, since I had two TWRP Backups each with the EFS/Partition Backup, while 1 of them was somehow not working (error output).
So i'd like to be as secure as possible.
You need the dd command to create an image of each partition. The partitions on your device are numbered consecutively:
persist= /dev/block/mmcblk0p38
modemst1= /dev/block/mmcblk0p34
modemst2= /dev/block/mmcblk0p35
Open a terminal app and type:
for persist:
Code:
dd if=/dev/block/[B]mmcblk0p38[/B] of=/sdcard/persist.img
if= input file (partition)
of= output file (.img backup)
Hello, I am having the same problem but only with a backup with no IMEI. Does anyone know how to solve this? Or to merge these two backups to form one with IMEI and stable signal. The backups are encrypted I guess because nothing makes sense in them
juampapo546 said:
Hello, I am having the same problem but only with a backup with no IMEI. Does anyone know how to solve this? Or to merge these two backups to form one with IMEI and stable signal. The backups are encrypted I guess because nothing makes sense in them
Click to expand...
Click to collapse
What kind of backup do you have?? What is a backup with no IMEI?
WoKoschekk said:
What kind of backup do you have?? What is a backup with no IMEI?
Click to expand...
Click to collapse
TWRP backup of persist and efs
When I made the backup I had no IMEI but the wifi was working (I actuall made the backup after the signal drop issue)
juampapo546 said:
TWRP backup of persist and efs
When I made the backup I had no IMEI but the wifi was working (I actuall made the backup after the signal drop issue)
Click to expand...
Click to collapse
If you don't have a backup of /persist with a IMEI then you won't be able to restore it.
https://forum.xda-developers.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147
WoKoschekk said:
If you don't have a backup of /persist with a IMEI then you won't be able to restore it.
https://forum.xda-developers.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147
Click to expand...
Click to collapse
But isn't there a way to edit the backup or merge both backups I have?
(However when I erase modemst1 and 2 IMEI comes back but with the signal drop, a fix for that would also help me)
For the right understanding:
You have two different TWRP backups for /persist and /efs. The first one restores IMEI but signal is lost and the other one restores your signal without IMEI??
WoKoschekk said:
For the right understanding:
You have two different TWRP backups for /persist and /efs. The first one restores IMEI but signal is lost and the other one restores your signal without IMEI??
Click to expand...
Click to collapse
I am so sorry I answered this late, yes that is correct and I have been using my phone with WiFi only for months now
Try to merge them manually if you know the corresponding files. I've no idea how to figure them out...
TWRP won't merge your backups.

Categories

Resources