EFS Backup from device (without PC) [Update 11Feb14] - Galaxy Note II Android Development

EFS Backup from device (without PC)
Why we need EFS backup ?
EFS folder contains some important and some basic info related to our device identity like Wi-Fi address, Bluetooth MAC address and the very main IMEI address (nv_data.bin).
Now if this EFS partition accidently corrupted then your phone’s IMEI number will get erased and you can not make voice call further. This kind of damage is often not accepted by the service center of your respected handset’s company.
Here your backup can only be savior for you
You needs device rooted, Here is guide how to root N7100.
NEW METHOD (Updated 11Feb14)
Install this app and select backup/Restore that's it. (keep USB debugging ON). Also read play store description.
Dr.Ketan EFS Tool N7100
Video guide
OLD METHOD
Backup EFS
1.Install Terminal emulator
2.Open it, you will get ***@android:/$
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
3.Now typebelow said command and enter
Code:
su
it will ask superSU permission, grant it (it will ask only if your superSU setting - default permission is set to 'prompt', if you have set to 'grant' it will not ask)
4.you will have now this
[email protected]:/ # (this # symbol suggest it got root access)
5.Now type below mentioned command (case sensitive) and enter (to make this step easy from device, i have attached 5.txt (5i for backup to Int sd card) file at end, just open and select text. later you can paste to emulator to avoid spell mistake)
Code:
dd if=/dev/block/mmcblk0p3 of=/storage/extSdCard/efs.img bs=4096
In case you don't have ExtSdCard and want to make backup to Int Sdcard then command should be like this
Code:
dd if=/dev/block/mmcblk0p3 of=/storage/sdcard/efs.img bs=4096
6.After successfull backup you will find msg as seen below in image, as well you can see 20MB file efs.img on Ext SD card
Now copy efs.img from Ext Sd card to safer place on pC/Laptop/media/online so you can find whenever you need it.
Restore
Make sure you have efs.img which you have got with backup, placed on Ext Sd card
Repeat step 1-4 as said above, and in step 5 you have to give below said command to restore it.(you can copy below command by opening R.txt file (Ri.txt for restoring from int SD )attached at end to avoid spell mistake)
Code:
dd if=/storage/extSdCard/efs.img of=/dev/block/mmcblk0p3 bs=4096
In case you restoring from IntSd card then command should be like this
Code:
dd if=/storage/sdcard/efs.img of=/dev/block/mmcblk0p3 bs=4096
- Reboot device
FOR SOME ROMs like AOSP mounting point is different, so in case above command doesn't work then you need to know mount point. for this do following
Follow first 4 step said above to make backup (upto grant SU permission)
then Type
Code:
ls /storage
This will show mounting point of storage on your device like below shown image.
Here storage mounting point is
extSdCard for Ext SD card
sdcard0 for Int Sd card
So make changes in command accroeding your storage mount point.
Edit 28June13 : Just to report, today i have lost IMEI and got chance to restore with above said method and it work like charm.
Click to expand...
Click to collapse

With all respect for ur great work and effort, but I learned from u last time u helped me...I found the easiest way for the efs story...every phone I use, directly after rooting I install root explorer copy the efs folder to my pc and ext-sdcard...no matter what happened to the phone I just paste the folder back to its place and restart the phonw...and thats it, or u have objection about it? Please let me know
Sent from my GT-N7100 using XDA Premium HD app

That's not good idea, when you copy folder with explorer it will messup permission.
Sent from my GT-N7100 using xda premium

dr.ketan said:
That's not good idea, when you copy folder with explorer it will messup permission.
Sent from my GT-N7100 using xda premium
Click to expand...
Click to collapse
agree
via《t4p4t41k》

in trouble !
dr.ketan said:
That's not good idea, when you copy folder with explorer it will messup permission.
Sent from my GT-N7100 using xda premium
Click to expand...
Click to collapse
Hi there
I am in New Zealand, recently rooted with your help and installed PhilzCWM. Also on your advice, I backed up my EFS.
My problem: just today I realised I cannot send text, or make phone call. I am on X-Note ROM from 3-4 days ago. I am very sure that after installation, I had normal Mobile connectivity and was surprised to I didn't. Not sure if my EFS became corrupted, or other ROM setting is wrong.
My SERVICE STATE says Out of Service
My Mobile NETWORK STATE says disconnected.
My phone number says UNKNOWN
What's weird is
My IMEI lists a long number, assumed correct
So if my EFS partition is corrupted I assume I wouldn't see any IMEI at all.
Far as I know my SIM is activated (I am on a company plan & coworker's phones are normal)
Just now I restored my stock nandroid and .... same thing! No service. So I doubt it's even a modem problem.
Guys I'm screwed, any tips what settings to check etc??

OK update:
I sucked it up and decided to try restoring the EFS image I had earlier created. Mate, it worked! I have network service now.
Thanks to DrKetan. It was only because I read his advice to backup my EFS...and his advice how to restore. Very helpful bloke.
Thanks.

I flashed a ROM yesterday and my imei changed luckily I'd copied the full efs folder to my ext_SD so I just copy and pasted it back and that worked for me once I restarted.
Sent from my GT-N7100 using xda premium

Dr.Ketan thank you for the lovely Guide . I did a backup as per your instructions. I would like to know about the aroma installer which offers a backup option when installing a Rom.I have a backup of the Same . I note that there are two files which is only 268 kb & 40 kb respectively.My question- Does this backup help & if it helps how do we restore it (backup done during aroma installer)
Sent from my GT-N7100 using xda app-developers app

Here said method backup complete partition that's why size is big.
There may be option available in aroma, i have never tried aroma.
Sent from my GT-N7100 using xda premium

I too had the same problem, I then remembered that I had backed up my efs using this method. Thank You Dr.Ketan
Sent from my GT-N7100 using xda premium

I lost a lovely Galaxy Note 2 to a corrupt EFS before I even knew that such a thing could happen to a flasher of roms.
I probably have the most backed up EFS of all time, since that horrific incident.I never knew about this way , I was just using EFS proffesional, but you best be sure so I have used this method too, and uploaded the backup to Dropbox.
Many thanks dr.ketan, so many peoples saviour.
And any one who is thinking, EFS thing won't happen to me....BEWARE!!!
AND JUST DO IT!!!

You guys put back life to this thread, probably I forget even about this thread.
Sent from my GT-N7100 using xda premium

dr.ketan said:
You guys put back life to this thread, probably I forget even about this thread.
Sent from my GT-N7100 using xda premium
Click to expand...
Click to collapse
I came from a Nexus S phone, and flashed a lot of stuff over the years. But never once did the topic of EFS/IMEI come up. It was simply not an issue discussed in that device's XDA forums. So when I upgraded to the Note and joined these forums, I assumed I knew most of the important stuff.
I read your EFS thread and thought....hmm imagine if I ended up with a bricked phone or unusable in some way....I would be mad at myself and out of $$...so I did the backup. Far out, I am fortunate to have done so. People like you do exist in other forums - very helpful and unselfish with their time and expertise; XDA is based on the spirit of such people. Major props to you!

cannot open for read: No such file or directory
dr.ketan said:
EFS Backup from device (without PC)
Why we need EFS backup ?
EFS folder contains some important and some basic info related to our device identity like Wi-Fi address, Bluetooth MAC address and the very main IMEI address (nv_data.bin).
Now if this EFS partition accidently corrupted then your phone’s IMEI number will get erased and you can not make voice call further. This kind of damage is often not accepted by the service center of your respected handset’s company.
Here your backup can only be savior for you
You needs device rooted, Here is guide how to root N7100.
Backup EFS
1.Install Terminal emulator
2.Open it, you will get ***@android:/$
3.Now typebelow said command and enter
Code:
su
it will ask superSU permission, grant it (it will ask only if your superSU setting - default permission is set to 'prompt', if you have set to 'grant' it will not ask)
4.you will have now this
[email protected]:/ # (this # symbol suggest it got root access)
5.Now type below mentioned command (case sensitive) and enter
Code:
dd if=/dev/block/mmcblk0p3 of=/storage/extSdCard/efs.img bs=4096
6.After successfull backup you will find msg as seen below in image, as well you can see 20MB file efs.img on Ext SD card
Now copy efs.img from Ext Sd card to safer place on pC/Laptop/media/online so you can find whenever you need it.
Restore
Make sure you have efs.img which you have got with backup, placed on Ext Sd card
Repeat step 1-4 as said above, and in step 5 you have to give below said command to restore it.
Code:
dd if=/storage/extSdCard/efs.img of=/dev/block/mmcblk0p3 bs=4096
- Reboot device
Click to expand...
Click to collapse
Hi @dr.ketan!
i cant remember if i had backed up my efs.
but just in case, i tried this steps.
i got this message after following the backing up procedure in terminal emulator:
cannot open for read: No such file or directory
what should i do?
im using note 2 n7100.
thank you.

tongueinamow said:
Hi @dr.ketan!
i cant remember if i had backed up my efs.
but just in case, i tried this steps.
i got this message after following the backing up procedure in terminal emulator:
cannot open for read: No such file or directory
what should i do?
im using note 2 n7100.
thank you.
Click to expand...
Click to collapse
Got the same message.. im presuming you must have wrote it wrong. make sure its exactly the way dr ketan has posted. after 2 tries i was succesfull.

Is this method better than doing a nandrod back up using the recovery? Thanks!

tongueinamow said:
Hi @dr.ketan!
i cant remember if i had backed up my efs.
but just in case, i tried this steps.
i got this message after following the backing up procedure in terminal emulator:
cannot open for read: No such file or directory
what should i do?
im using note 2 n7100.
thank you.
Click to expand...
Click to collapse
gnikolakis said:
Got the same message.. im presuming you must have wrote it wrong. make sure its exactly the way dr ketan has posted. after 2 tries i was succesfull.
Click to expand...
Click to collapse
Correct there should be something wrong
rq005 said:
Is this method better than doing a nandrod back up using the recovery? Thanks!
Click to expand...
Click to collapse
Both are different things
Sent from my GT-N7100 using xda premium

gnikolakis said:
Got the same message.. im presuming you must have wrote it wrong. make sure its exactly the way dr ketan has posted. after 2 tries i was succesfull.
Click to expand...
Click to collapse
What you are most likely getting wrong, when no file found or whatever, is,
dd if=/dev/block/mmcblk0p3 of=/storage/extSdCard/efs.img bs=4096
THE BIT AFTER mmcb is NOT a ONE its an L ...so l:cyclops:

dr.ketan said:
Correct there should be something wrong
Both are different things
Sent from my GT-N7100 using xda premium
Click to expand...
Click to collapse
Can you be more specific? I recovered once my EFS using TWRP and worked fine... Maybe you can explain what's so different about. Thanks!

gnikolakis said:
make sure its exactly the way dr ketan has posted.
Click to expand...
Click to collapse
I was putting the S and C from sdcard in small letters and i was getting the same message,now i'm set.

Related

[REF] How to unlock SGS 4G or Vibrant 4G (IMEI Problems fixed)[Updated 11-19-11]

PLEASE KEEP POSTS ON TOPIC.
This method works on my Vibrant 4G. Please email me if it doesn't work on your Vibrant 4G or SGS 4G.
PRO App also works on Vibrant 4G/SGS 4G for anyone who doesn't feel comfortable with a hex editor
Please note the same information used to develop the app is in the guide for free... the app just makes it easier
ALL METHODS FOR NEWER PHONES REQUIRE ROOT... PLEASE GO GET ROOT ON YOUR PHONE AND THEN COME BACK.
Oh and BTW... I cannot be held responsible for anything that happens to your phone.... EVER!
Before you start... if you don't have root you WILL need it.
tooter1 reports an alternate method. Please tell me if this works for you.
BTW please note the importance of a BACKUP!!!!
tooter1 said:
My UPDATE:
I did just like the OP stated and, it messed up my IMEI number. Glad I had a backup of the file.
So I went back into the HEX editor (I used HxD editor) and looked where I did the the change and noticed to the right side there were a series of numbers that started at row 41460 and ended on row 41470.
It was an 8 digit series started with 75 ending in 13, something like this 75382313. I was sure it had something to do with the unlock code but, didn't have a different SIM to check.
I sold the phone and, the guy said he had to get it unlocked so he could use it with O2 network (I think).
I text him later that day to ask if he got the phone unlocked, he said no, the place wanted $45 to SIM unlock it.
I told him to try the number listed above and it "SIM UNLOCKED" the phone. He called me back and thanked me many times for saving him $45.
Hope this helps someone else and not mess with the IMEI number!!!!
Click to expand...
Click to collapse
IMEI Restore Method
All you need to do is restore your backup nv_data.bin and delete the md5. Even the unlocked file will work as long as you delete the .md5
Code:
su
cp /sdcard/nv_data.bin /efs/root/afs/settings/nv_data.bin
rm /efs/root/afs/settings/nv_data.bin.md5
Step 1. - Retrieve nv_data.bin file
Check locks... go to phone and enter *#7465625#
use "adb shell" or a terminal emulator to get a terminal prompt and run the following commands
Code:
su
cat /efs/root/afs/settings/nv_data.bin >> /sdcard/nv_data.bin
Step 2. - Edit nv_data.bin file
mount the internal SD Card on your computer
make a backup copy of the nv_data.bin file on your computer
using your favorite HEX editor open the nv_data.bin on the sdcard
jump to address 0x1469
you should see a string like this
ff ff 01 00 00 00 00
there are 5 different types of locks in 5 different bytes
the FF bytes should be left alone
the first byte after the FF is the network lock
the next byte is the network subset lock
the next byte is the sp lock
the next byte is the cp lock
the last byte appears to be a data lock.
Change any 0x01 to 0x00 (or 0x00 to 0x01 to lock for warranty)
save and close file
unmount SD Card
Step 3. - Replace nv_data.bin file
I want to say it again so no one misses it MAKE SURE YOU HAVE A BACKUP OF YOUR NV_DATA.BIN FILE BEFORE YOU CONTINUE!!!!!
use "adb shell" or a terminal emulator to get a terminal prompt and run the following commands
Code:
su
rm /efs/root/afs/settings/nv_data.bin
cat /sdcard/nv_data.bin >> /efs/root/afs/settings/nv_data.bin
rm /efs/root/afs/settings/nv_data.bin.md5
chmod 755 /efs/root/afs/settings/nv_data.bin
chown radio.radio /efs/root/afs/settings/nv_data.bin || chown 1001.1001 /efs/root/afs/settings/nv_data.bin
reboot
your phone is now unlocked... enjoy
[OPTIONAL] Use the PRO app [OPTIONAL]
Please note that this step is ONLY here for people that are not comfortable using a Hex editor.
Search "Vibrant unlock" in the market or scan the QR code:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Install and run app
press menu
press Unlock Phone
Select phone
allow root
at this point if you get an error code make SURE you mount your internal SD card on your computer and backup the nv_data.bin.orig file that is there.
press unlock
restart and your phone is now unlocked
to lock your phone for warranty
press lock instead of unlock
restart your phone, remove root, and take your phone in for warranty
To restore your IMEI try this.....
Code:
su
rm /efs/root/afs/settings/nv_data.bin
busybox cp /sdcard/nv_data.bin.orig /efs/root/afs/settings/
rm /efs/root/afs/settings/nv_data.bin.md5
chmod 755 /efs/root/afs/settings/nv_data.bin
chown radio.radio /efs/root/afs/settings/nv_data.bin || chown 1001.1001 /efs/root/afs/settings/nv_data.bin
reboot
LEGAL NOTES (because information should be free for all):
YOU MAY NOT, BY ANY MEANS, USE THIS SOLUTION/CODE OR PART OF IT FOR COMMERCIAL PURPOSES.
DO NOT USE THIS EXTRACTION METHOD COMMERCIALLY
PLEASE give credit (and donations if you can) to everyone listed on the original thread here
For those of you that have donated THANKS! (You know who you are...)
dagentooboy said:
This method works on my Vibrant 4G. Please email me if it doesn't work on your Vibrant 4G or SGS 4G.
NEW - PRO app should unlock any version of SGS for $5
Please note the same information used to develop the app is in the guide for free... the app just makes it easier
ALL METHODS FOR NEWER PHONES REQUIRE ROOT... PLEASE GO GET ROOT ON YOUR PHONE AND THEN COME BACK.
Oh and BTW... I cannot be held responsible for anything that happens to your phone.... EVER!
Before you start... if you don't have root you WILL need it.
Step 1. – Download PRO app (optional)
Check locks... go to phone and enter *#7465625#
Search "Vibrant unlock pro" in the market or scan the QR code:
Install and run app
press menu
press Unlock Phone
Select Phone
allow root
at this point if you get an error code make SURE you mount your internal SD card on your computer and backup the nv_data.bin.orig file that is there.
press unlock
restart and your phone is now unlocked
to lock your phone for warranty
press lock instead of unlock
restart your phone, remove root, and take your phone in for warranty
Step 2. - Retrieve nv_data.bin file
use "adb shell" or a terminal emulator to get a terminal prompt and run the following commands
Code:
su
cat /efs/root/afs/settings/nv_data.bin >> /sdcard/nv_data.bin
Step 3. - Edit nv_data.bin file
mount the internal SD Card on your computer
make a backup copy of the nv_data.bin file on your computer
using your favorite HEX editor open the nv_data.bin on the sdcard
jump to address 0x1469
you should see a string like this
ff ff 01 00 00 00 00
there are 5 different types of locks in 5 different bytes
the FF bytes should be left alone
the first byte after the FF is the network lock
the next byte is the network subset lock
the next byte is the sp lock
the next byte is the cp lock
the last byte appears to be a data lock.
Change any 0x01 to 0x00 (or 0x00 to 0x01 to lock for warranty)
save and close file
unmount SD Card
Step 4. - Replace nv_data.bin file
I want to say it again so no one misses it MAKE SURE YOU HAVE A BACKUP OF YOUR NV_DATA.BIN FILE BEFORE YOU CONTINUE!!!!!
use "adb shell" or a terminal emulator to get a terminal prompt and run the following commands
Code:
su
rm /efs/root/afs/settings/nv_data.bin
cat /sdcard/nv_data.bin >> /efs/root/afs/settings/nv_data.bin
chmod 755 /efs/root/afs/settings/nv_data.bin
chown radio.radio /efs/root/afs/settings/nv_data.bin || chown 1001.1001 /efs/root/afs/settings/nv_data.bin
reboot
your phone is now unlocked... enjoy
LEGAL NOTES (because information should be free for all):
YOU MAY NOT, BY ANY MEANS, USE THIS SOLUTION/CODE OR PART OF IT FOR COMMERCIAL PURPOSES.
DO NOT USE THIS EXTRACTION METHOD COMMERCIALLY
PLEASE give credit (and donations if you can) to everyone listed on the original thread here
For those of you that have donated THANKS! (You know who you are... you paid for my developer account so I could post the app)
Click to expand...
Click to collapse
It said it worked when I ran the program but I have no way of knowing because I don't have a ATT sim to check. I thought unlock required to enter in a 8 digit number? Never mind. It works. Just put in a chip and it recognized the number in about phone. It was boost mobile though so i could not call. Should work fine ATT takes over Tmobile.
^ Did you unlock this will running CM7? Can you do me a favor and check to see if your IMEI changed at all?
Menu->Settings->About Phone->Status->IMEI
Thanks.
matt310 said:
^ Did you unlock this will running CM7? Can you do me a favor and check to see if your IMEI changed at all?
Menu->Settings->About Phone->Status->IMEI
Thanks.
Click to expand...
Click to collapse
I haven't seen anything about CM7 on the Vibrant 4G..... I will search and see if I can test it.
Can anyone confirm if this device supports At&t 3g after being unlocked like the vibrant does? I know out didn't list the bands but neither did the vibrant...
That would future proof this device for tmo customers as far as hspa is concerned.
I love how all the orig credits were removed. Gotta love open source thieves
There is another thread about unlocking the sgs4g. It was free just get hex editor trial. Thats what I did. My phone is unlocked.
There is a thread where you can offer a paid software . Please post there.
http://forum.xda-developers.com/forumdisplay.php?f=993.
Thread closed.
Thread re-open since the OP will release a free version for xda members.
Thread has been re-written to conform to forum rules. All credits are still listed in the linked thread.
I want to make sure it is clear. ALL the information used to make the app is in the guide. If you are comfortable with a hex editor please use the guide. Let's keep this thread for questions about unlocking the Vibrant/SGS 4G.
The code doesn't work. Says invalid mmi code.
Serious_Beans said:
The code doesn't work. Says invalid mmi code.
Click to expand...
Click to collapse
What code? I am not sure what you are talking about.
I got the pro version from the market. Works
Sent from my SGH-T959V using XDA Premium App
I followed the guide about two weeks ago to unlock my father in law's SGS4G which he had just bought used. He was able to put his AT&T SIM in and it recognized it and worked flawlessly on AT&T 3G.
Only issue he had was with the GPS, he wasn't happen with how long it took to lock via GPS only, and location based services helped but he said the dot moved off the make... TL;DR but he was happen with it being unlocked and working great on AT&T.
joedeveloper said:
I followed the guide about two weeks ago to unlock my father in law's SGS4G which he had just bought used. He was able to put his AT&T SIM in and it recognized it and worked flawlessly on AT&T 3G.
Only issue he had was with the GPS, he wasn't happen with how long it took to lock via GPS only, and location based services helped but he said the dot moved off the make... TL;DR but he was happen with it being unlocked and working great on AT&T.
Click to expand...
Click to collapse
I am not sure what could cause GPS problems. Except that Samsung Galaxy S phones have been plagued with GPS problems since day one. Let me know if you figure out a fix.
I unlocked mine just yesterday anf gps actually locked pretty fast playing with maps and nav
Sent from my SGH-T959V using XDA Premium App
elry567 said:
I unlocked mine just yesterday anf gps actually locked pretty fast playing with maps and nav
Sent from my SGH-T959V using XDA Premium App
Click to expand...
Click to collapse
Maybe KD1 has some GPS fixes in it? Mine seems to work fine too.
I remember with my old Vibrant, I had an issue trying to unlock where the IMEI number changed and it messed up the available apps in the market. Will the unlock app jack with that?
chris071404 said:
I remember with my old Vibrant, I had an issue trying to unlock where the IMEI number changed and it messed up the available apps in the market. Will the unlock app jack with that?
Click to expand...
Click to collapse
So far I haven't heard of anyone having that problem... if something does happen... well that's why we make backups
awesomeness...
so simple...
just followed every step closely and now i have network lock off phone...
thanks alot...

Files can't be deleted any more

Hi,
I hope it is o.k. to post this question in the Xoom forum!?
In the download folder of my Motorola Xoom there are several files that I can't delete any more.
These files are pdf- and/or mp3-files that originally had a German umlaut in their file name. By copying/pasting these files into the download directory, they were somehow damaged. Now, the filenames are showing some strange characters and the file sizes are 0 kB.
As soon as I try to delete one of those files, my Xoom shows a message, that the file can't be deleted.
I already tried out to use several different file explorers which didn't work.
Unfortunately, even "MyPhoneExplorer" can't delete the files by connecting the Xoom to the PC. There, the files don't show up.
Renaming of the files doesn't work either and overwriting the files using a new file with the same name also doesn't work.
Can somebody of you help me with this problem?
How can I get rid of these 0kB files?
Thanks a lot!
Its perfectly OK to ask questions, no problem this is to be a source of information. It should however be in the Q&A section. That said
You can try to delete the file using "android terminal emulator" app
In there enter the following command substituting the file name for whatever u r trying to delete
Code:
rm /sdcard/yourfilename.whatever
If that does not work and u r rooted you can try the same command after have superuser permission. Do this
Open terminal and enter
Code:
su
Press enter after that and allow superuser, then enter the same command above.
Attached is a screen shot of what it should look like
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my Galaxy Nexus using Tapatalk 2
runandhide05 said:
Its perfectly OK to ask questions, no problem this is to be a source of information. It should however be in the Q&A section. That said
You can try to delete the file using "android terminal emulator" app
In there enter the following command substituting the file name for whatever u r trying to delete
Code:
rm /sdcard/yourfilename.whatever
If that does not work and u r rooted you can try the same command after have superuser permission. Do this
Open terminal and enter
Code:
su
Press enter after that and allow superuser, then enter the same command above.
Attached is a screen shot of what it should look like
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Thanks for your idea! ...unfortunately it doesn't work
Problem seems to be the filename. It was corrupted while unpacking files from a packed archive. The original filename contained several so called"umlaute" (German special characters) which the system on the Xoom obviously can't handle correctly. These "umlaute" characters were replaced by some other curious characters during extraction.
Example: "11. ڵoԠ(ڢer-unter-ober-Գterreicher).mp3" is the filename after unpacking the file. Before, it was " 11. Üuoö (Über-unter-ober-österreicher).mp3"
As soon as I try to remove the file, a message appears, telling me that there is no such file. At the same time, the terminal shows the corrupted filename, but suppressing the corrupted characters.
No chance to delete :crying:
I hope, I could explain it so that you can understand what happens (or what doesn't happen). Any further ideas?
Thanks a lot!
PS: corrupted files are not only mp3 but also some pdf and doc files. All of them show up with a size of 0Byte on the Xoom, while the original file size is shown as soon as I connect the Xoom to my PC using MyPhoneExplorer (which, btw, also isn't able to delete)
deb10042 said:
Thanks for your idea! ...unfortunately it doesn't work
Problem seems to be the filename. It was corrupted while unpacking files from a packed archive. The original filename contained several so called"umlaute" (German special characters) which the system on the Xoom obviously can't handle correctly. These "umlaute" characters were replaced by some other curious characters during extraction.
Example: "11. ڵoԠ(ڢer-unter-ober-Գterreicher).mp3" is the filename after unpacking the file. Before, it was " 11. Üuoö (Über-unter-ober-österreicher).mp3"
As soon as I try to remove the file, a message appears, telling me that there is no such file. At the same time, the terminal shows the corrupted filename, but suppressing the corrupted characters.
No chance to delete :crying:
I hope, I could explain it so that you can understand what happens (or what doesn't happen). Any further ideas?
Thanks a lot!
PS: corrupted files are not only mp3 but also some pdf and doc files. All of them show up with a size of 0Byte on the Xoom, while the original file size is shown as soon as I connect the Xoom to my PC using MyPhoneExplorer (which, btw, also isn't able to delete)
Click to expand...
Click to collapse
Are the files located in a directory by them selves? If so u can try to remove the directory itself
Sent from my Galaxy Nexus using Tapatalk 2
runandhide05 said:
Are the files located in a directory by them selves? If so u can try to remove the directory itself
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Some of them are, others not. It makes no difference. If I try to delete an entire directory, containing one of those corrupted files, the whole directory can't be deleted. Anyway, "normal" files (uncorrupted) in the relevant directory can be removed individually... except those 0-Byte-files
No more ideas? ....anyone?
I can't believe, that it should really be impossible to delete corrupted files
Are u rooted? I just had the same problem. Simple boot into twrp and delete thru the built in file manager
Sent from my Galaxy Nexus using Tapatalk 2
runandhide05 said:
Are u rooted? I just had the same problem. Simple boot into twrp and delete thru the built in file manager
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Yes, I am rooted. but I have CWM on my Xoom. I found the thread about TWRP in the Nexus section. will it also work for the Motorola Xoom?
Can I install it instead of CWM without loosing all my apps and data?
Thanks!
deb10042 said:
Yes, I am rooted. but I have CWM on my Xoom. I found the thread about TWRP in the Nexus section. will it also work for the Motorola Xoom?
Can I install it instead of CWM without loosing all my apps and data?
Thanks!
Click to expand...
Click to collapse
Look at my signature, its twrp for our xoom
Sent from my Galaxy Nexus using Tapatalk 2
when using the terminal rm command you need to escape special characters ( i.e spaces, parenthese etc ) with a backslash or put the file name in quotes. so you file name in question can be removed by
Code:
rm 11.\ Üuoö\ \(Über-unter-ober-österreicher\).mp3
or
Code:
rm "11. Üuoö (Über-unter-ober-österreicher).mp3"
you can also do wildcard deletion based on fragements of the file name i.e
Code:
rm 11*.mp3
will delete all files that start with 11 with the mp3 externsion or you could start with a wildcard so a named example_file_name.txt can be deleted using
Code:
rm *file*.txt
obviously that will delete ALL files that have the word file in the filename and an extension of .txt so BE CAREFUL WHEN USING WILDCARDS but you get the idea ( hopefully )
If that doesn't delete them then you've got problems.
---------- Post added at 01:06 PM ---------- Previous post was at 12:54 PM ----------
A little tip, If you're not from the old school you won't know that it best to avoid spaces and special characters in filenames especially as your transferring between different filesystem types, obviously unicode characters are kinda inevitable if that's you native language but a demestorated here there's not 100% support for it, mostly due to westernized developers not taking into account internationalization!
TRIVIA: Early versions of MSDOS only allowed eight characters for a filename with a 3 characters extension. Imagine working with those constraints!
I had the same problem. The only solution is:
Install TWRP http://forum.xda-developers.com/showthread.php?t=1782235
Reboot in recovery. Explore the files and delete whatever you want..
he e
trevd said:
when using the terminal rm command you need to escape special characters ( i.e spaces, parenthese etc ) with a backslash or put the file name in quotes. so you file name in question can be removed by
Code:
rm 11.\ Üuoö\ \(Über-unter-ober-österreicher\).mp3
or
Code:
rm "11. Üuoö (Über-unter-ober-österreicher).mp3"
you can also do wildcard deletion based on fragements of the file name i.e
Code:
rm 11*.mp3
will delete all files that start with 11 with the mp3 externsion or you could start with a wildcard so a named example_file_name.txt can be deleted using
Code:
rm *file*.txt
obviously that will delete ALL files that have the word file in the filename and an extension of .txt so BE CAREFUL WHEN USING WILDCARDS but you get the idea ( hopefully )
If that doesn't delete them then you've got problems.
---------- Post added at 01:06 PM ---------- Previous post was at 12:54 PM ----------
A little tip, If you're not from the old school you won't know that it best to avoid spaces and special characters in filenames especially as your transferring between different filesystem types, obviously unicode characters are kinda inevitable if that's you native language but a demestorated here there's not 100% support for it, mostly due to westernized developers not taking into account internationalization!
TRIVIA: Early versions of MSDOS only allowed eight characters for a filename with a 3 characters extension. Imagine working with those constraints!
Click to expand...
Click to collapse
Thanks, but it doesn't work. No matter if I use the backslash- or the paranthesis method, the emulator always tells me that it could not deleze as there is no such file or directory.
deb10042 said:
he e
Thanks, but it doesn't work. No matter if I use the backslash- or the paranthesis method, the emulator always tells me that it could not deleze as there is no such file or directory.
Click to expand...
Click to collapse
Just use TWRP if your unlocked. It will take care of it. ( see link in my sig)
Success!!
runandhide05 said:
Just use TWRP if your unlocked. It will take care of it. ( see link in my sig)
Click to expand...
Click to collapse
Finally, I gathered all my courage and installed TWRP over my old CWM Recovery without doing any backups
And...yes, it did the trick!!
I was able to delete all the corrupted files and folders and everything else is still in place :good:
Thanks for your good help!
deb10042 said:
Finally, I gathered all my courage and installed TWRP over my old CWM Recovery without doing any backups
And...yes, it did the trick!!
I was able to delete all the corrupted files and folders and everything else is still in place :good:
Thanks for your good help!
Click to expand...
Click to collapse
Glad you got it working! Now would be a good time to make a backup with twrp because cwm backups will not work with twrp and vice versa
runandhide05 said:
Glad you got it working! Now would be a good time to make a backup with twrp because cwm backups will not work with twrp and vice versa
Click to expand...
Click to collapse
Oups! :cyclops:
Thanks, that was really a good hint! Didn't know that and will do it at once after coming home this evening
Will it be difficult, to go back to CWM? ...just in case...

Evaluation to restore IMEI

Hi Member :fingers-crossed:
Again, the wave of lost of imei seen coming back.
there are still have alot of SL lost the imei and baseband.
Tried hard to find away to repair it, but since....that's not way without the back up still....
At the mean time wait for the beta of CM10.1 or maybe CM10.2, i go back to GB again. Yeah.. it is boring.. so i playing with EFS partition again.
HAH. this time, i get a new info...it is been along time trying to find our what is BML3 about and what is the relationship with STL3, our EFS partition.
i get to know that from I9000 thread, that seen BML3 is about the "mother" of STL3. (sorry for the bad english, i'm not cursing)
why i said that ? cause i do a test on it.
My Test on BML3
1. dd out the BML3 partition. i read the image using Hex Editor, i found the word of nv_data.bin and nv.log inside it.
2. (do not know why i did this), than i dd back the image into the BML3 partition. than my STL3 corrupted, or it can said as it is gone from partition list.
3. so, it cant be mount by the phone.
4. so, you have not imei and baseband
So, if you still haven't doing any flashing of the STL3 or EFS folder from the blank tar templet using odin or any why to put the image in, it is still have possibility that the nv_data.bin or .nv_data.bak still usable. so dd it out and keep safe.
Still remember? i have backup my stl3 partition, so i flash back it using Heimdall-frontend. (Odin not able to flash the dd image, you have to tar it in linux into Odin flash able.)
why i using flashing instead of dd it back, cause i tried, but it fail, cause the STL3 is not mounted.
So, i suspect the lost of imei is not STL3 or EFS folder corrupted, it is the BML3 some how lost link or bad block.
I attach my generic imei of the BML3 and STL3 image
you can try as below method.
AGAIN....STANDARD DISCLAIMER....
Code:
** YOU HAVE TO KNOW WHAT YOU ARE DOING.
** THERE ARE RISK TO YOUR PHONE WHAT EVER YOU TRYING TO FLASH WHAT EVER IN IT.
** IF YOUR POINTING THE FINGER AT ME BECAUSE YOU CHOOSE TO DO IT
** I WILL LOLLLLLLLLLLLLLLLL AT YOU
OK, the instruction
Code:
i'm using Ubuntu as OS and Heimdall and Heimdall-Frontend to flash.
install Heimdall command, and install Heimdall-Frontend for the UI
Download the attachment, and rename it.
1. in adb shell, dd out the BML3 and STL3 for backup
Code:
dd if=/dev/block/bml3 of=/sdcard/bml3.img
dd if=/dev/blcok/stl3 of=/sdcard/stl3.img
2. using my copy of BML3.img, dd it back
Code:
dd if=/sdcard/bml3.img of=/dev/block/bml3
than reboot
3. after the reboot, reboot into download mode, flashing my STL3.img using heimdall-frontend
a. open terminal, key heimdall-frontend
b. in the UI, go to Utilities tab, click Detact Device, makesure the device is detacted.
c. go to Flash tab, in pit, put in the Pit File, untick the repartition
d. Partition, click add than at the Partition Detail, Partition name, choose EFS
e. in File, put in the STL3.img file
f. than Start, wait few min, the phone will reboot it self.
4. after that, you will get generic imei.(atleast i get it)
So now, tried to flash you own STL3 image from just now you dd out.
if you are lucky, you will get back the imei, and if you are very lucky, you will have my imei.(but i think the possibility is very low)
Have fun tying..
~~Old Post~~
CORRECTION
Actually the EFS Pro work great for the Restoring the EFS image, :good:
it is just the stl3 or efs partition did not mounted so the app show error
the correct step to use EFS Pro as follow
1. flash to stock with RFS file system.
2. flash CF-ROOT kernel to root the phone (optional, due to odin flash not need rooted)
3. flash the efs.tar to mount back efs folder
You get back the efs partitional and generic imei
Ahh.. by the way, after flashing the efs.tar, the bluethoot and wifi mac will changed follow the original phone which output the efs.rfs
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi Guys, today I was so boring, so I get my phone efs partition corrupted. YES, I corrupted it purposely.
few item need to prepare
1. your efs backup (nv_data.bak or original nv_data.bin)
2. odin 1.85 only, odin 3.04 got problem
3. stock Froyo and Gb
4. CF-root kernel (i use Bam kernel, thanks to XDA_BAM)
5. efs.tar download herethanks to celica7
6. EFS Pro
Of Couse I have the efs backup.
That’s how I corrupted. I mean the efs folder...
* Flash a stock firmware with EFS clear tick! (Odin 1.85) DXKE1 * everything goes normally.
* Still I having the IMEI. Due to the backup still there
* So, continue to screw it up, flash to GB 2.3.4 DXKP9 and root it with Bam kernel 14fix. Use RE to delete all efs file.
* Still get the generic imei
* still not enough corrupted, continue to screw it, flash again stock firmware dxkp9 with efs clear, but generic imei still there
* flash again bam kernel to root.
* Than do dd if=/sdcard/efs_backup.img of=/dev/block/stl3 to restore the backup efs image.
* Still get the generic imei
* try corrupt it with EFS Pro (sorry dude), just due to the tool having function of format efs folder. But it format efs fail
* chown the efs folder to root, and reboot
* still the system changes it back to radio. (ogh, so hard to corrupt it)
* ok, flash back to stock froyo, and see.
* All right, now I have blank imei or unknown imei
* due to lazy to fine root procedure for Froyo base, I continue to flash GB
* Odin flash pass, but phone boot into 3e recovery and show;
E: failed to mount /efs (invalid argument)
E: check_selective_file:Can't mount /efs
Multi-csc applied failed (NICE:victory:!!)
OK, now time to restore imei :fingers-crossed:
* flash bam kernel to root.
* after flash bam kernel, imei show 004999010640000, it supposed to show unknown imei, due to efs partition is not mounted.
* who care. continue to restore imei using EFS Pro (failed)
* try restore imei with backup img by EFS Pro (FAILED!!):crying:
* NOW, try others method from XDA
* flash efs.tar with ODIN to get back efs mounted
* delete every in the efs folder.(the generic imei file)
* copy your nv_data.bak to efs folder and rename to nv_data.bin
* chmod 700 nv_data.bin
* chown radio nv_data.bin
* chgrp radio nv_data.bin
* reboot
* Guess what next ? I get the imei back
Really nice tutorial buddy But most of the people are not able to restore IMEI because they dont have IMEI backup. I am really looking for such a tutorial where IMEI can be restored without IMEI backup.
its a useful experiment and can help many of us
nice guide
vishal24387 said:
Really nice tutorial buddy But most of the people are not able to restore IMEI because they dont have IMEI backup. I am really looking for such a tutorial where IMEI can be restored without IMEI backup.
Click to expand...
Click to collapse
Yeah it need backup to restore.
But some members did have initially but srew it more worst than lost the last chance to restore.
Most of tham is flashing failed. So the nv_data.bak is still safe. However cant mount stl3, so restoring failed. No even efs pro can restored when stl3 cant mount.
So flashing efs.tar on odin pda is the most imp step. Afthe mounted the efs folder than you have alot of way to restore.
Sent from my GT-I9003 using Tapatalk 2
good guide, very useful to others but to me no luck my IMEI and Baseband is till unknown. im hoping i can borrow nandroid backup for i9003 so i can restore it and repair the IMEI using z3x box
arjun08 said:
good guide, very useful to others but to me no luck my IMEI and Baseband is till unknown. im hoping i can borrow nandroid backup for i9003 so i can restore it and repair the IMEI using z3x box
Click to expand...
Click to collapse
@arjun08
what is the condition of your nv_data.bak or nv_data.bin? is it still the original ?
if yes, im sure this way can help. did you try ?
chongns said:
@arjun08
what is the condition of your nv_data.bak or nv_data.bin? is it still the original ?
if yes, im sure this way can help. did you try ?
Click to expand...
Click to collapse
.nv_core.bak 10/12/2012
.nv_core.bak.md5 10/12/2012
.nv_data.bak 10/12/2012
.nv_data.bak.md5 10/12/2012
.nv_state 11/27/2010
the phone lost its IMEI in november 2012 the .nv files was dated in october 2012 i don't know if it is the original files.
what is the nv_data.bin date?
try below cmd in adb and post the screen out put
adb shell
su
df
to see is your efs folder mounted
edit: something happening on 27/Nov, cause your nv_state changed.
it is very high change to get back imei. backup all those file incase you need to try and error.
you need to do is mount back your efs folder using efs.tar flash unsing odin 1.85
1. flash back to stock file system, just the pit and xxkpe
2. root it with cf-root kernel
3. flash efs.tar
4. install what ever root file manager.
5. check efs folder owner and group, should be radio system in GB stock
6. delete all file in efs folder (including nv_data.bak)
7. copy and rename nv_data.bak (from your backup) to nv_data.bin and set owner and group to radio radio in efs folder
8. set permission to rwx------
9. reboot
Sent from my Galaxy Nexus using Tapatalk 2
chongns said:
what is the nv_data.bin date?
try below cmd in adb and post the screen out put
adb shell
su
df
to see is your efs folder mounted
edit: something happening on 27/Nov, cause your nv_state changed.
it is very high change to get back imei. backup all those file incase you need to try and error.
you need to do is mount back your efs folder using efs.tar flash unsing odin 1.85
1. flash back to stock file system, just the pit and xxkpe
2. root it with cf-root kernel
3. flash efs.tar
4. install what ever root file manager.
5. check efs folder owner and group, should be radio system in GB stock
6. delete all file in efs folder (including nv_data.bak)
7. copy and rename nv_data.bak (from your backup) to nv_data.bin and set owner and group to radio radio in efs folder
8. set permission to rwx------
9. reboot
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
nv_data.bin 10/12/2012
done steps 1-4
confusing im not a pro in this kind of thing,i didn't understand 5, 7 and 8
5. how should i check efs folder owner and group
7. how should i do this, set owner and group to radio radio in efs folder
8. set permission to rwx------ how to change this.. for now i saw rwxrwx--x in efs
arjun08 said:
nv_data.bin 10/12/2012
done steps 1-4
confusing im not a pro in this kind of thing,i didn't understand 5, 7 and 8
5. how should i check efs folder owner and group
7. how should i do this, set owner and group to radio radio in efs folder
8. set permission to rwx------ how to change this.. for now i saw rwxrwx--x in efs
Click to expand...
Click to collapse
you have done step 1 to 4 , did you backup the old nv_data.bak and nv_data.bin
ok, if you have backup the old efs file before you flash efs.tar, than
you can use the terminal type
ls -l
than,
assuming you have root your phone (if not flash cf-root first)
use root explorer to delete all the file in efs folder
copy the original nv_data.bak (the bak file before you flash efs.tar) into the folder and rename it to nv_data.bin
in terminal type below command
su
cd efs
ls -l
chmod 700 nv_data.bin
chown radio nv_data.bin
chgrp radio nv_data.bin
reboot
chongns said:
you have done step 1 to 4 , did you backup the old nv_data.bak and nv_data.bin
ok, if you have backup the old efs file before you flash efs.tar, than
you can use the terminal type
ls -l
than,
assuming you have root your phone (if not flash cf-root first)
use root explorer to delete all the file in efs folder
copy the original nv_data.bak (the bak file before you flash efs.tar) into the folder and rename it to nv_data.bin
in terminal type below command
su
cd efs
ls -l
chmod 700 nv_data.bin
chown radio nv_data.bin
chgrp radio nv_data.bin
reboot
Click to expand...
Click to collapse
im almost done but when i type this
chgrp radio nv_data.bin ------ chgrp: not found
this is the only error i got
try type
chown 1001:radio nv_data.bin
or
chown radio.radio nv_data.bin
Sent from my GT-I9003 using Tapatalk 2
done all, no luck didnt get my IMEI back
i wonder if i put other efs backup from other person the same phone i9003 will that works?
if he or she willing to share with you
Sent from my GT-I9003 using Tapatalk 2
I really dont get it. Err!
Sent from my GT-I9003 using xda premium
Under03Ground said:
I really dont get it. Err!
Sent from my GT-I9003 using xda premium
Click to expand...
Click to collapse
@Under03
check you efs partition in mounted, do the below step in adb shell.
df >/sdcard/df.txt
ls -a -l efs >/sdcard.efs.txt
mount >/sdcard/mount.txt
cat /proc/partitions >/sdcard/cat.txt
noted:
df to show you mounted partition
ls to list out the efs file (including the hidden file)
mount to show all the mount point
cat is to show all the partition list. (efs partition is stl3)
the > text file, it out the result of the command to text file so you can forward it to me to have alook.
attach or forward me the text in reply.
could anyone help me out. my imei n baseband show unknown . i have a very old efs back up taken from efs pro which is nearly 1 gb.i tried restoring it but of no use help me guyzzz.....:crying:
sebastiand95 said:
could anyone help me out. my imei n baseband show unknown . i have a very old efs back up taken from efs pro which is nearly 1 gb.i tried restoring it but of no use help me guyzzz.....:crying:
Click to expand...
Click to collapse
Efs backup size is 6mb. You maybe have wrong backup
Sent from my Galaxy Nexus using Tapatalk 2
chongns said:
Efs backup size is 6mb. You maybe have wrong backup
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
but it is under the name efs backup
@ chongns
Hey buddy I think you were working on creating IMEI using some genuine IMEI. Any progress related to it??

[IMP] [SCRIPTS] IMEI backup scripts for MOTO G /E(all variants) Rooted.

This script creates backup of partitions related to IMEI number. If you have not unlocked your boot-loader then you do not have to worry, you're safe. But read this in case you root someday!
DISCLAIMER:
I am not responsible for any damage caused to your device in any manner, you should be careful while doing anything. Before you proceed please read everything.
DESCRIPTION
The IMEI number is like an identifier to your cellphone for network operators. The phones will not be able to communicate in case IMEI is lost. The IMEI number is generally stored in PDS partition of the EMMC but the Moto g is an exception, there is no physical EFS partition so NV-Items are inaccessible for manipulation which means backing up PDS partition only will not make any sense.
The EFS is created on the fly: the modem reads HOB and DHOB partitions and after manipulations it creates a EFS file-system which is isolated from rest of the system. The modem finds the baseband, MEID, IMEI etc. and reports it to the OS.
The DHOB partition is encrypted and the key used is a PBKFD2 derived key for which the details like passkey, salt and iterations are unknown. HOB partition is XML-formatted and contains encrypted base64 text items. The secret is yet to be discovered.
Reference
http://forum.xda-developers.com/moto-g/help/info-moto-g-imei0-t2925970/post62064474#post62064474
http://forum.xda-developers.com/showthread.php?t=2640677
What does the script do?
This script simply creates the dumps of HOB, DHOB, FSC and PDS partition.
REQUIREMENTS:
A rooted phone is bare minimum and rest depends upon the method you choose. Download the archive one is for Linux and other is for Windows.
Choose any one.
FROM PHONE:-
1. Download and install any “Terminal Emulator” application from App store.
2. Type su and press enter to have superuser privileges.
3. Run these commands one-by-one.
HTML:
su
mkdir /sdcard0/imei_backup
dd if=/dev/block/platform/msm_sdcc.1/by-name/hob" of=/sdcard0/imei_backup/hob.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/dhob" of=/sdcard0/imei_backup/dhob.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/fsc" of=/sdcard0/imei_backup/fsc.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/pds" of=/sdcard0/imei_backup/pds.img
4. Copy imei_backup from the top folder of internal storage or SD-card.
FROM PC:-
1. Enable ROOT for both apps and adb from developer options.
2. Open cmd or terminal hange current location to folder imei_linux or imei_windows extracted from archive.
3. Run the below commands from cmd or terminal.
Windows
Make sure you have Motorola drivers installed (Motorola device manager).
HTML:
imei_backup.bat
Linux
Superuser privileges are necessary.
HTML:
sudo bash imei_backup.sh
or
su -C 'bash imei_backup.sh'
4. Once finished save imei_backup folder to someplace safe. The folder sits in the same folder the commands are run and in phone's internal storage or SD card.
FOR RESTORATION
1. Copy imei_backup folder to /sdcard (both internal or SD-Card in case you are not sure)
2. Open terminal emulator on phone and run these commands, all of them do not miss any. Run all of them twice to be sure.
HTML:
dd if=/sdcard0/imei_backup/hob.img of=/dev/block/platform/msm_sdcc.1/by-name/hob"
dd if=/sdcard0/imei_backup/dhob.img of=/dev/block/platform/msm_sdcc.1/by-name/dhob"
dd if=/sdcard0/imei_backup/fsc.img of=/dev/block/platform/msm_sdcc.1/by-name/fsc"
dd if=/sdcard0/imei_backup/pds.img of=/dev/block/platform/msm_sdcc.1/by-name/pds"
4. Reboot your phone.
How to keep IMEI safe:
1. Do not use incompatible Roms or firmware.
2. Never run these commands.
Don't even try, I have screwed my phone already. Misspelled for safety.
HTML:
Fast-boot erasee all (Don't)
Fast-boot erasee recovery (Don't)
Fast-boot erasee HOB (Don't)
Fast-boot erasee DHOB (Don't)[/COLOR]
Fast-boot erasee earth (Please Don't)
Run any of these commands and your phone turn into a tablet forever.
3. Create backup of the partitions i mentioned using one of the methods.
FAQS:-
Does it work on Dual-Sim or CDMA ?
Yes, it works. It just creates partition dumps, nothing more nothing less. It should work on Moto G (1st and 2nd gen) all variants and Moto E (1st and 2nd).
Is it safe to share my imei_backup folder if anyone asks?
Yes, the content is encrypted and there is no chance of manipulation of IMEI, the NV-ITEMS are written after verification. No two phones can have same IMEI. If it was possible then I wouldn't be so mad or worried or you would not be reading this. The best he could achieve is base-band change and signal but IMEI stays zero. No Cheating!
I have PDS partition backup, why should I care about this?
The PDS partition alone is no good for recovery, there are other partitions which help phone get a working cellular and valid IMEI number, those partition are HOB and DHOB. You can create backup through terminal emulator.
Why should I believe you?
I am a victim and did research on this for like 30 days. I do have a clear idea of what the problem really is. Please refer to mentioned threads for more information.
I have lost my IMEI because of “fast-boot erase all” command, can I get my IMEI back?
Sorry! But there is no working solution at the moment. All you can do right now is either buy a new motherboard or a spare phone to do work. The cure has not been found till now and hopes are really low unless some guy with good cryptography knowledge comes to rescue. So far i only know the problem
Very useful, thanks. Just want to add my experience - actually I did run "fast-boot erasee recovery" once in the past and did lost IMEI, but it was possible to recover it in an easy way. But those other commands seem to be really catastrophic indeed (though I haven´t tried them )
Here´s the original story: http://forum.xda-developers.com/showthread.php?p=52648789
drfr said:
Very useful, thanks. Just want to add my experience - actually I did run "fast-boot erasee recovery" once in the past and did lost IMEI, but it was possible to recover it in an easy way. But those other commands seem to be really catastrophic indeed (though I haven´t tried them )
Here´s the original story: http://forum.xda-developers.com/showthread.php?p=52648789
Click to expand...
Click to collapse
It is always better to be safe than sorry. The thing is if you lose hob and dhob partitions, you are doomed. I am glad to know that your phone is intact.
Script works well - thanks for this.
Well I'm here to ask something related to the problems issued in this thread.
I got a XT1032 with IMEI fully written but, for some reasons I still don't know, the damn phone does not "read" the signal. The bars just stay empty and nothing, not even a full original firmware restore, seems to help.
Now I wonder if the problem is in a non-working modem partition, but I'd see that problem solved when I fully flashed the stock FW.
Is there any solution? I also tried to flash all the european (I'm italian) basebands known to mankind and nothing happens.
Dionysus2389 said:
Well I'm here to ask something related to the problems issued in this thread.
I got a XT1032 with IMEI fully written but, for some reasons I still don't know, the damn phone does not "read" the signal. The bars just stay empty and nothing, not even a full original firmware restore, seems to help.
Now I wonder if the problem is in a non-working modem partition, but I'd see that problem solved when I fully flashed the stock FW.
Is there any solution? I also tried to flash all the european (I'm italian) basebands known to mankind and nothing happens.
Click to expand...
Click to collapse
When you dial *#06# do you see your IMEI number?
PuLKit4xd said:
When you dial *#06# do you see your IMEI number?
Click to expand...
Click to collapse
Yep, the IMEI is there as it is in the phone info. That's why I can't figure out what the heck is wrong with it. I also tried to flash any baseband and still no signal.
Dionysus2389 said:
Well I'm here to ask something related to the problems issued in this thread.
I got a XT1032 with IMEI fully written but, for some reasons I still don't know, the damn phone does not "read" the signal. The bars just stay empty and nothing, not even a full original firmware restore, seems to help.
Now I wonder if the problem is in a non-working modem partition, but I'd see that problem solved when I fully flashed the stock FW.
Is there any solution? I also tried to flash all the european (I'm italian) basebands known to mankind and nothing happens.
Click to expand...
Click to collapse
PuLKit4xd said:
When you dial *#06# do you see your IMEI number?
Click to expand...
Click to collapse
Dionysus2389 said:
Yep, the IMEI is there as it is in the phone info. That's why I can't figure out what the heck is wrong with it. I also tried to flash any baseband and still no signal.
Click to expand...
Click to collapse
Aaaaan then I managed to fix everything. Simply, kitkat european firmwares have some issues with basebands, so I wipe everything and flash via mfastboot the 5.0.2 brazillian stock firmware. Everything is flawless now!
Hi all, thanks for this huge piece of info, very usefull, but i need from you if you have the backup of the files for XT1540 (moto g3 4g).
Cheers
PuLKit4xd said:
This script creates backup of partitions related to IMEI number. If you have not unlocked your boot-loader then you do not have to worry, you're safe. But read this in case you root someday!
DISCLAIMER:
I am not responsible for any damage caused to your device in any manner, you should be careful while doing anything. Before you proceed please read everything.
DESCRIPTION
The IMEI number is like an identifier to your cellphone for network operators. The phones will not be able to communicate in case IMEI is lost. The IMEI number is generally stored in PDS partition of the EMMC but the Moto g is an exception, there is no physical EFS partition so NV-Items are inaccessible for manipulation which means backing up PDS partition only will not make any sense.
The EFS is created on the fly: the modem reads HOB and DHOB partitions and after manipulations it creates a EFS file-system which is isolated from rest of the system. The modem finds the baseband, MEID, IMEI etc. and reports it to the OS.
The DHOB partition is encrypted and the key used is a PBKFD2 derived key for which the details like passkey, salt and iterations are unknown. HOB partition is XML-formatted and contains encrypted base64 text items. The secret is yet to be discovered.
Reference
http://forum.xda-developers.com/moto-g/help/info-moto-g-imei0-t2925970/post62064474#post62064474
http://forum.xda-developers.com/showthread.php?t=2640677
What does the script do?
This script simply creates the dumps of HOB, DHOB, FSC and PDS partition.
REQUIREMENTS:
A rooted phone is bare minimum and rest depends upon the method you choose. Download the archive one is for Linux and other is for Windows.
Choose any one.
FROM PHONE:-
1. Download and install any “Terminal Emulator” application from App store.
2. Type su and press enter to have superuser privileges.
3. Run these commands one-by-one.
HTML:
su
mkdir /sdcard0/imei_backup
dd if=/dev/block/platform/msm_sdcc.1/by-name/hob" of=/sdcard0/imei_backup/hob.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/dhob" of=/sdcard0/imei_backup/dhob.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/fsc" of=/sdcard0/imei_backup/fsc.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/pds" of=/sdcard0/imei_backup/pds.img
4. Copy imei_backup from the top folder of internal storage or SD-card.
FROM PC:-
1. Enable ROOT for both apps and adb from developer options.
2. Open cmd or terminal hange current location to folder imei_linux or imei_windows extracted from archive.
3. Run the below commands from cmd or terminal.
Windows
Make sure you have Motorola drivers installed (Motorola device manager).
HTML:
imei_backup.bat
Linux
Superuser privileges are necessary.
HTML:
sudo bash imei_backup.sh
or
su -C 'bash imei_backup.sh'
4. Once finished save imei_backup folder to someplace safe. The folder sits in the same folder the commands are run and in phone's internal storage or SD card.
FOR RESTORATION
1. Copy imei_backup folder to /sdcard (both internal or SD-Card in case you are not sure)
2. Open terminal emulator on phone and run these commands, all of them do not miss any. Run all of them twice to be sure.
HTML:
dd if=/sdcard0/imei_backup/hob.img of=/dev/block/platform/msm_sdcc.1/by-name/hob"
dd if=/sdcard0/imei_backup/dhob.img of=/dev/block/platform/msm_sdcc.1/by-name/dhob"
dd if=/sdcard0/imei_backup/fsc.img of=/dev/block/platform/msm_sdcc.1/by-name/fsc"
dd if=/sdcard0/imei_backup/pds.img of=/dev/block/platform/msm_sdcc.1/by-name/pds"
4. Reboot your phone.
How to keep IMEI safe:
1. Do not use incompatible Roms or firmware.
2. Never run these commands.
Don't even try, I have screwed my phone already. Misspelled for safety.
HTML:
Fast-boot erasee all (Don't)
Fast-boot erasee recovery (Don't)
Fast-boot erasee HOB (Don't)
Fast-boot erasee DHOB (Don't)[/COLOR]
Fast-boot erasee earth (Please Don't)
Run any of these commands and your phone turn into a tablet forever.
3. Create backup of the partitions i mentioned using one of the methods.
FAQS:-
Does it work on Dual-Sim or CDMA ?
Yes, it works. It just creates partition dumps, nothing more nothing less. It should work on Moto G (1st and 2nd gen) all variants and Moto E (1st and 2nd).
Is it safe to share my imei_backup folder if anyone asks?
Yes, the content is encrypted and there is no chance of manipulation of IMEI, the NV-ITEMS are written after verification. No two phones can have same IMEI. If it was possible then I wouldn't be so mad or worried or you would not be reading this. The best he could achieve is base-band change and signal but IMEI stays zero. No Cheating!
I have PDS partition backup, why should I care about this?
The PDS partition alone is no good for recovery, there are other partitions which help phone get a working cellular and valid IMEI number, those partition are HOB and DHOB. You can create backup through terminal emulator.
Why should I believe you?
I am a victim and did research on this for like 30 days. I do have a clear idea of what the problem really is. Please refer to mentioned threads for more information.
I have lost my IMEI because of “fast-boot erase all” command, can I get my IMEI back?
Sorry! But there is no working solution at the moment. All you can do right now is either buy a new motherboard or a spare phone to do work. The cure has not been found till now and hopes are really low unless some guy with good cryptography knowledge comes to rescue. So far i only know the problem
Click to expand...
Click to collapse
Need help!!
It does not work for me. whenever any command with /sdcard is written, it replies "/sdcard/hob.img :File or directory not found."
Please help.
Thanks in advance : )

[GUIDE] Backup persist partition (save wifi mac, bluetooth mac, sensors data)

Hello guys, this guide is for creating backup of persist partion which is holding important data about sensors, wifi + bluetooth data, imei and other stuff.
Before installing any other custom room, this is best thing to do, lot of custom roms rewrites persist partition with different data than your mobile devices has, you will have problem with calling(missing imei), problems with Wifi and other stuff, i think you get it...
REQUIRED TOOLS:
Code:
[URL="https://drive.google.com/open?id=1LW1CM6gLT9wRyy950rC6GmWAzEbcyfzE"]PersistBackupTool[/URL]
Follow this steps:
Code:
1. Root your device, this is pretty much easy guide: [URL="https://forum.xda-developers.com/mi-a1/how-to/root-mi-a1-oreo-8-0-disabling-ota-magisk-t3728654"]LINK[/URL]
2. After rooting your device, enable Developer options (Go to settings >> System >> About phone >> tap Build number 7 times)
3. Enable usb debugging, go to Settings >> System >> Developer options >> and enable USB debugging
4. Run PersistBackup.bat and wait
5. Your persist partition will be saved in Backup folder.
ENJOY!!!
When I lauch the PersistBackup.exe it tells me "This program was made with an Unlicensed compiler. Please buy the PRO version to distribute your exe. " And then it closes when you press any key.
I guess you missed this in your last compile
VolpeXDA said:
When I lauch the PersistBackup.exe it tells me "This program was made with an Unlicensed compiler. Please buy the PRO version to distribute your exe. " And then it closes when you press any key.
I guess you missed this in your last compile
Click to expand...
Click to collapse
Damn, thanks for the info, will fix it soon!
Does it do the same as the following adb commands?
Code:
adb shell "su -c dd if=/dev/block/mmcblk0p27 of=/sdcard/Download/persistbackup.img"
adb pull /sdcard/Download/persistbackup.img
oreo27 said:
Does it do the same as the following adb commands?
Code:
adb shell "su -c dd if=/dev/block/mmcblk0p27 of=/sdcard/Download/persistbackup.img"
adb pull /sdcard/Download/persistbackup.img
Click to expand...
Click to collapse
Yes it is the same
VolpeXDA said:
When I lauch the PersistBackup.exe it tells me "This program was made with an Unlicensed compiler. Please buy the PRO version to distribute your exe. " And then it closes when you press any key.
I guess you missed this in your last compile
Click to expand...
Click to collapse
Fixed, thanks again for the info!
pulja9 said:
Yes it is the same
Click to expand...
Click to collapse
Cool. I think you'll want to update the OP though. As far as I know, the IMEI data is stored on the modemst1 and modemst2 partitions.
(EDITED, check the end)
First, I've tried with the "adb" commands, but I get "Permission Denied".
So, I decided to try the tool, which still gives me a "Permission Denied", but still prints a sucess message at the end "Persist partition has been successfully backed up! Partition has been saved in Backup folder!"
Not sure if it's my mistake. I'm rooted + USB_debugging.
EDIT:
OK, I've read that for adb "su" to work, you need to have device unlocked, with screen on, and grant permission.
Turns out Magisk was rejecting root permissions to Perfdump automatically.
Should work now. Nevertheless, perhaps you could check why it prints that backup worked when permission was denied. Someone could be fooled there =D
Finally: Thanks for the app
ok, this do the backup! but how to restore it?
jucaftp said:
(EDITED, check the end)
First, I've tried with the "adb" commands, but I get "Permission Denied".
So, I decided to try the tool, which still gives me a "Permission Denied", but still prints a sucess message at the end "Persist partition has been successfully backed up! Partition has been saved in Backup folder!"
Not sure if it's my mistake. I'm rooted + USB_debugging.
EDIT:
OK, I've read that for adb "su" to work, you need to have device unlocked, with screen on, and grant permission.
Turns out Magisk was rejecting root permissions to Perfdump automatically.
Should work now. Nevertheless, perhaps you could check why it prints that backup worked when permission was denied. Someone could be fooled there =D
Finally: Thanks for the app
Click to expand...
Click to collapse
riccetto80 said:
ok, this do the backup! but how to restore it?
Click to expand...
Click to collapse
I will create this week improved tool with gui, and it will have backup, restore and maybe root option.
Suspicious EXE from a junior member.
Why is it not just a script?
pulja9 said:
I will create this week improved tool with gui, and it will have backup, restore and maybe root option.
Click to expand...
Click to collapse
soo this is really work if my mac, bt wiped with rr .,, or i just need to place that original file or i need to flash stock rom and place this backup file
How can I locate the Backup folder to also backup the /persist files in another folder/device?
how to restore?
Sir, can you please help me , i totally messed up my phone , mac address -unavailable, Bluetooth- unavailable , how to get back all , i m on RR latest build , i want to back to stock . Please help me if possible .
pulja9 said:
Hello guys, this guide is for creating backup of persist partion which is holding important data about sensors, wifi + bluetooth data, imei and other stuff.
Before installing any other custom room, this is best thing to do, lot of custom roms rewrites persist partition with different data than your mobile devices has, you will have problem with calling(missing imei), problems with Wifi and other stuff, i think you get it...
REQUIRED TOOLS:
Code:
[URL="https://drive.google.com/open?id=1LW1CM6gLT9wRyy950rC6GmWAzEbcyfzE"]PersistBackupTool[/URL]
Follow this steps:
Code:
1. Root your device, this is pretty much easy guide: [URL="https://forum.xda-developers.com/mi-a1/how-to/root-mi-a1-oreo-8-0-disabling-ota-magisk-t3728654"]LINK[/URL]
2. After rooting your device, enable Developer options (Go to settings >> System >> About phone >> tap Build number 7 times)
3. Enable usb debugging, go to Settings >> System >> Developer options >> and enable USB debugging
4. Run PersistBackup.bat and wait
5. Your persist partition will be saved in Backup folder.
ENJOY!!!
Click to expand...
Click to collapse
Lots of thanks @devs you guys are really awesome
where is my backup? i not found that
I have tried the setup procedure that was in op, however it comes up and says not recognised, can I have a step by step procedure eg do I have to go to EDL mode.
Thanks
enricogrim said:
Hello,
I see that this tool creates a .img file. Can I restore using TWRP?
thank you
Click to expand...
Click to collapse
I don't think so
TWRP recognize ISO as a recovery
I think it's dangerous because backup don't have any instructions for twrp to tell it where recover it, on which partition
Correct me if I'm wrong
Sent from my Mi A1 using Tapatalk
Does anyone know how to restore a backup?
Can we use fastboot? Or tool have restore option?

Categories

Resources