How to backup efs
I'm trying to backup my EFS partition since I heard it is possible to lose the IMEI
I want to show you how I did it and ask you guys if it was enough.
By using adb for the following steps, I started by listing all the available partitions with "df" witch gave me the following result:
$ adb shell df Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 402412 72 402340 1% /dev none 402412 8 402404 1% /sys/fs/cgroup tmpfs 402412 0 402412 0% /mnt /dev/block/mmcblk0p9 1032088 472452 559636 46% /system /dev/block/mmcblk0p7 100784 4180 96604 5% /cache /dev/block/mmcblk0p1 20144 14596 5548 73% /efs /dev/block/mmcblk0p10 3096320 312136 2784184 11% /data /dev/block/mmcblk0p12 516040 373968 142072 73% /preload /dev/block/vold/public:179_11 10483696 5656 10478040 1% /mnt/media_rw/34C8-6CDB /dev/fuse 10483696 5656 10478040 1% /mnt/runtime/default/34C8-6CDB /dev/fuse 10483696 5656 10478040 1% /mnt/runtime/read/34C8-6CDB /dev/fuse 10483696 5656 10478040 1% /mnt/runtime/write/34C8-6CDB /dev/block/vold/public:179_13 15541408 1355448 14185960 9% /mnt/media_rw/DC27-7413 /dev/fuse 15541408 1355448 14185960 9% /mnt/runtime/default/DC27-7413 /dev/fuse 15541408 1355448 14185960 9% /mnt/runtime/read/DC27-7413 /dev/fuse 15541408 1355448 14185960 9% /mnt/runtime/write/DC27-7413
I found that /efs was hold in /dev/block/mmcblk0p1 and that /mnt/media_rw/DC27-7413 was my external sd card, so I used dd to make an image of efs there:
$ adb shell dd if=/dev/block/mmcblk0p1 of=/mnt/media_rw/DC27-7413/efs_backup bs=512
Was this enough to backup my IMEI? I read in some other forums that there should be a modemfs also, but I don't see it on the list of partitions. Hopefully it didn't got missing after some issues I'm having with my phone.
RE: How to backup efs - Added by Art Os over 4 years ago
for i9300, this command give the partition table :
adb shell ls -al /dev/block/platform/dw_mmc/by-name
RE: How to backup efs - Added by Xan VFR over 4 years ago
To backup /efs partition, because I lost IMEI a couple of times, I did
adb pull /efs .
When I had to restore /efs partition I "adb pushed" efs copy in my computer into my phone.
RE: How to backup efs - Added by Fil Lupin 10 months ago
there is now a page describing how to backup EFS : https://redmine.replicant.us/projects/replicant/wiki/BackupTheEFS
However, I encountered a problem while following instructions:
$ adb shell "mount /dev/block/platform/*/by-name/EFS /efs" $ adb pull /efs/ efs /efs/: 31 files pulled. 2.6 MB/s (6353339 bytes in 2.310s) $ adb shell "umount /efs" $ adb shell "rmdir /efs" rmdir: /efs: Read-only file system $ adb shell "cat /dev/block/platform/*/by-name/EFS > /EFS.img" /system/bin/sh: can't create /EFS.img: Read-only file system
rmdir /efs does not work while mkdir /efs has worked, I wonder if it's a symptom for another issue
It works when replacing last line by adb shell "cat /dev/block/platform/*/by-name/EFS > /sdcard/EFS.img"