Restoring efs backup - Galaxy S II Q&A, Help & Troubleshooting

I need help restoring my efs backup i've all ready deleted the two .bin (nv_data.bin and nv_data.bin.md5) files and changed the two .bak into .bin nv_data.bak and nv_data.bak.md5) turned it back into a .tar.gz and put it back on my phone in a folder called efs_backup on my internal sd card. I then typed this into teminal emulator (adb shell*suumount /efsmke2fs /dev/block/mmcblk0p1mount -w -t ext4 /dev/block/mmcblk0p1 /efsbusybox tar zxvf /sdcard/efs-backup.tar.gz -C /) what am I doing wrong???

Related

[FIXED] Urgent help, how to restore \efs to get lost IMEI ? "Input/output error"

[FIXED] Urgent help, how to restore \efs to get lost IMEI ? "Input/output error"
Greeting,
Tonight I flashed a custom kernel to my phone, just\ lost the Singal and my phone show no sim card inserted!.
anyway, i figure it out that... the IMEI lost.
in \efs there's no nv_data.bin file!!
So i went to restore the \efs.
but something not right here!
Hope someone can help here.
i tried these commands but no chance tel now!.
here to restore nv_data.bin
Code:
su
# cp /sdcard/nv_data.bin /efs/nv_data.bin
cp /sdcard/nv_data.bin /efs/nv_data.bin
[COLOR="red"]cp: can't stat '/efs/nv_data.bin': Input/output error[/COLOR]
and here to restore \efs
Code:
# busybox tar zxvf /sdcard/efs/efs-backup.tar.gz -C /
busybox tar zxvf /sdcard/efs/efs-backup.tar.gz -C /
efs/
efs/cryptprop_rebootMode
[COLOR="Red"]tar: can't remove old file efs/cryptprop_rebootMode: Read-only file system[/COLOR]
#
tried to flash back to many FW but no chance,
now i'm in KF1 rooted.
tried root explorer to copy the files but \efs is read only can can't not be changed!.
Hi.
Sounds like your /efs is mounted read-only, try re-mounting for rw access:
Code:
su
mount -o rw,remount /dev/block/mmcblk0p1 /efs
(either via adb or terminal app running on the phone itself)
and then try to copy the files back again.
If it doesn't want to work from a running system, you can also try it in recovery mode (given you have a recovery that allows you a root shell) - you have to use adb in that case ("adb shell", get a root shell ("rootsh" when you're using CF-Root) and then the above).
Maybe the actual FS on the EFS partition is corrupted, so as a very last resort maybe formatting it and then restoring the full backup might work.
here's what i got
Code:
su
# mount -o rw,remount /dev/block/mmcblk0p1 /efs
mount -o rw,remount /dev/block/mmcblk0p1 /efs
# cp /sdcard/nv_data.bin /efs/nv_data.bin
cp /sdcard/nv_data.bin /efs/nv_data.bin
cp: can't stat '/efs/nv_data.bin': Input/output error
will trey via recovery,
but,, how to format it ?
It's one of the mkfs commands, but at first glance I could only find the ext2 version of it - /efs is (like everything else of the internal partitions on the SGS2) ext4....
Maybe someone else can shed some light if either mkfs.ext2 can be used, or how else to format it ext4.
Also, you should use tar to write back your backup, to keep the proper permissions.
Now i see no nv_data.bin in the /efs
and I couldn't copy the file, it's read only, even with the mount!
I think this is the only solution for me.
Some have restored efs/IMEI by flashing a stock firmware .
jje
Ah, also found this command:
Code:
make_ext4fs
but I have no idea about its parameters....
Yeah, try flashing a stock FW, maybe one of the "_user_low" ones, AFAIK they clean out a bit more stuff....
I got this
Code:
su
# ls
ls
acct fota.rc res
app-cache init sbin
cache init.goldfish.rc sdcard
config init.rc sys
d init.smdkc210.rc system
data init_kernel_only.rc tmp
dbdata lib ueventd.goldfish.rc
default.prop lpm.rc ueventd.rc
dev mnt ueventd.smdkc210.rc
efs proc vendor
etc recovery.rc
# cd efs
cd efs
# ls
ls
[COLOR="Red"]ls: ./nv_data.bin: I/O error
ls: ./nv.log: I/O error
ls: ./nv_data.bin.md5: I/O error
ls: ./dmp: I/O error[/COLOR]
cryptprop_applied_result cryptprop_securewipedata
cryptprop_onetimeboot edk_p
cryptprop_persist.sys.language imei
cryptprop_persist.sys.timezone redata.bin
cryptprop_rebootMode
#
hope this help ?
FIXED...
here's the full Solution http://forum.xda-developers.com/showthread.php?p=15666725#post15666725

[Q] No service, no IMEI, no IMSI problem..

Hi! I installed Toolbox Rom, I wanted to change the boot animation (animation I've successfully changed) but I noticed that I have access to the network. I found some instructions for repair, but none helped. whenever I want to copy the backup of the EFS system have their own copies. when I delete the EFS there now appears old EFS system has generated. Can you please somehow fix it? Thank you. (sorry for my English, I do not know good English and translate through Google traslator)
Try this:
in adb shell, i ran
Code:
su
busybox tar zcvf /sdcard/efs/efs-backup.tar.gz /efs
i then downloaded 7-zip, used it to open the .tar file
i deleted the corrupt files;
nv_data.bin
nv_data.bin.md5
i then renamed;
.nv_data.bak > nv_data.bin
.nv_data.bak.md5 > nv_data.bin.md5
after closing and saving the changes, i then went back to adb shell and ran
Code:
su
umount /efs
mke2fs /dev/block/mmcblk0p1
mount -w -t ext4 /dev/block/mmcblk0p1 /efs
busybox tar zxvf /sdcard/efs-backup.tar.gz -C /
reboot
and voila! i was prompted to select my network provider, check status and all my IMEI, IMEI SV and other info was back to normal!
Thanks to @dickie2007
how to use adb shell? you do not have any instructions on how to proceed step by step? sorry.. i am a lame..
http://forum.xda-developers.com/showthread.php?t=502010
Thank you. I made it through the terminal emulator. network to find me, to be called from the can. IMEI 004999010640000 I and my IMEI SV 01 Does it matter?
sorry I do not understand you
phone is ok, but my imei is: 004999010640000. is this okay?
i dont know your imei, possible it is
i have original IMEI on the box: 358XXX...
repeat the procedure, may help you.
I had the same problem, this link is me helped
http://forum.xda-developers.com/showthread.php?t=1300071

[Q] Is /sdacard part of /data in 4.2.2? (Data recovery help)

My phone is a gs4, but this most likely pertains to any device running 4.2.2. On every other phone I have owned (with CWM recovery) when I did a factory reset, it left my (internal) SD card contents intact. I wasn't thinking and did a factory reset and deleted everything.
As you all know reformatting a hard drive doesn't actually wipe the drive. From the looks of things the internal sd card is part of /data. So I took data's block device and did the following from ADB shell
I'm not looking up the exact paths but I believe I determined the block device to use by looking at "busybox df -h"s output
Code:
dd if=/dev/*--PATH-TO-mmblk-WHICH-DATA-IS-ON/ of=/cache/img1.img bs=1M count=1024
tar cvzf /cache/img1.tar.gz /cache/img1.img
*Copy img*.tar.gz to network share on my comp with ES file explorer
rm -f /cache/img*
dd if=/dev/*--PATH-TO-mmblk-WHICH-DATA-IS-ON/ of=/cache/img2.img bs=1M count=1024 offset=1024
tar cvzf /cache/img2.tar.gz /cache/img1.img
*Copy img*.tar.gz to network share on my comp with ES file explorer
rm -f /cache/img*
dd if=/dev/*--PATH-TO-mmblk-WHICH-DATA-IS-ON/ of=/cache/img3.img bs=1M count=1024 offset=2048
tar cvzf /cache/img3.tar.gz /cache/img1.img
*Copy img*.tar.gz to network share on my comp with ES file explorer
rm -f /cache/img*
,
.
.
I did this with all 12 or so GB of /data/. I then opened these up in a hex editor and searched for known strings in my saved data (contents of messages from SMS backup & restore). I was unable to find my data. As far as texts are concerned I was able to find raw texts on my current device (not before I reset),
My question is, is the internal sd card on a different partiton than /data/?

[Q] EFS directory lost after flashing from Stock 2.3.6 to CM10.2

Hi,
I have the Galaxy Player 4.0 YP-G1
I followed the description on this thread :
http://forum.xda-developers.com/showthread.php?t=2386992
But unfortunatly, after flash, my efs directory was empty (only "lost+found" directory inside)
I search in the forum and find that it was better to flash from 2.3.6 to CM9 and after CM10.2, so too late for me !!
I found also that I should simply copy my backup of efs directory to /efs so I do this :
adb shell
su
umount /efs
mount -o remount,rw rootfs /
cd /sdcard/backup/efs
cp -r * /efs
dd if=/sdcard/backup/efs.rfs of=/dev/block/mmcblk0p1
mount -o remount,ro rootfs /
The files were successfully copied but when I reboot, the directory /efs was again empty !!!
Of course, I make some backup :
Nandroid backup of my 2.3.6 before flash to CM10.2
backup of efs directory in /sdcard/backup/efs/ (automatically when I flash CM10.2)
backup of efs directory in a file efs.rfs (when I was on 2.3.6)
What do you recommand me to recover my efs directory ?
Restore my nandroid backup 2.3.6
Re-flash to 2.3.6 with Odin according to this thread (is my efs directory will be regenerated ?):
http://forum.xda-developers.com/showthread.php?t=1531850
Or other things ?
Thank you very much for your precious help !
I like this forum, very helpful
I moved my request here :
http://forum.xda-developers.com/showpost.php?p=50035359&postcount=231
Thanks for your help.

[SOLVED] GT-P7100 Problem. Efs folder is restored, but after reboot it is again empty

Efs partition on my tablet Samsung GT-P7100 (Tab 10.1v) damaged. Now I have IMEI - Unknown and Baseband - Unknown. I too have a file backup efs_backup.tar.gz, which made early in the program GalaxSimUnlock. I restored my efs partition perfectly using this backup file efs_backup.tar.gz and program GalaxSimUnlock. I see correct IMEI and Baseband values. But after reboot my tablet efs folder is empty again and I have again my IMEI - Unknown and Baseband - Unknown. Can anyone help me with this problem please?
Problem solved. I restored efs partition from backup manually using programs Android Terminal Emulator and BusyBox and my old backup file efs_backup.tar.gz which I put previously in a tablet on sdcard in the GalaxSimUnloclk folder:
su
umount /efs
mke2fs /dev/block/mmcblk0p1
mount -w -t ext4 /dev/block/mmcblk0p1 /efs
busybox tar zxvf /sdcard/GalaxSimUnlock/efs_backup.tar.gz -C
After that I see correct IMEI and Baseband values and it does not get lost anymore after reboot the tablet.
Thanks

Categories

Resources