BackupTheEFS » History » Version 4
  Denis 'GNUtoo'  Carikli, 05/11/2019 09:09 PM 
  i9300: update intructions to use the recovery
| 1 | 1 | Denis 'GNUtoo' Carikli | h1. How to backup the EFS  | 
|---|---|---|---|
| 2 | |||
| 3 | h1. Introduction  | 
||
| 4 | |||
| 5 | Many devices supported by Replicant have a partition with the modem data (IMEI, etc) which is called EFS.  | 
||
| 6 | |||
| 7 | It's a good idea to do a backup of this partition, to make it easier to restore it if it becomes corrupted, as "it can sometimes happen with Replicant":https://redmine.replicant.us/issues/1869.  | 
||
| 8 | |||
| 9 | Only the following devices that are supported by Replicant have a modem data partition (EFS):  | 
||
| 10 | * Galaxy S 2 (I9100)  | 
||
| 11 | * Galaxy S 3 (I9300)  | 
||
| 12 | * Galaxy S 3 4G (I9305)  | 
||
| 13 | * Galaxy Nexus (I9250)  | 
||
| 14 | * Galaxy Note (N7000)  | 
||
| 15 | * Galaxy Note 2 (N7100)  | 
||
| 16 | * Galaxy Tab 2 7.0 (P3100)  | 
||
| 17 | * Galaxy Tab 2 10.1 (P5100)  | 
||
| 18 | * Galaxy Note 8.0 (N5100)  | 
||
| 19 | |||
| 20 | If you have a device that is not mentioned in the list above, it most probably doesn't have a modem data partition, so you don't need to make a backup.  | 
||
| 21 | |||
| 22 | h2. Instructions  | 
||
| 23 | |||
| 24 | 2 | Denis 'GNUtoo' Carikli | We will backup the modem partition from the Replicant recovery.  | 
| 25 | |||
| 26 | This is to make sure that the modem data partition is not being modified when we are doing the backup.  | 
||
| 27 | |||
| 28 | h3. Enable root access through adb in Replicant  | 
||
| 29 | |||
| 30 | 1 | Denis 'GNUtoo' Carikli | First make sure that you have adb setup correctly and that it gives you a root shell on the device by following the wiki page that explains how to [[ADB|install adb and get a root shell]] on your device.  | 
| 31 | |||
| 32 | 2 | Denis 'GNUtoo' Carikli | This will enable you to also be able to get a root shell in the recovery.  | 
| 33 | 1 | Denis 'GNUtoo' Carikli | |
| 34 | 2 | Denis 'GNUtoo' Carikli | h3. Reboot in the recovery  | 
| 35 | |||
| 36 | Once this is done you need to reboot in the Replicant recovery.  | 
||
| 37 | |||
| 38 | This is to make sure that the modem data partition is not being modified when we are doing the backup.  | 
||
| 39 | |||
| 40 | To do that:  | 
||
| 41 | 1. Make sure that your device is booted under Replicant.  | 
||
| 42 | 2. Press the power button until a menu appears  | 
||
| 43 | 3. Press "Reboot"  | 
||
| 44 | 4. Select "Recovery" and then press "ok"  | 
||
| 45 | 5. The device will then reboot to the Replicant recovery  | 
||
| 46 | |||
| 47 | h3. Enable root access through adb in the recovery  | 
||
| 48 | |||
| 49 | 3 | Denis 'GNUtoo' Carikli | In order to get a root shell in the recovery you need to do the following:  | 
| 50 | 2 | Denis 'GNUtoo' Carikli | 1. Select Advanced  | 
| 51 | 1 | Denis 'GNUtoo' Carikli | 2. Select "Mount /system"  | 
| 52 | 3 | Denis 'GNUtoo' Carikli | 3. Press the back key to get back to the general menu  | 
| 53 | 1 | Denis 'GNUtoo' Carikli | |
| 54 | 3 | Denis 'GNUtoo' Carikli | Note that on certain devices, "the system partition is already mounted":https://redmine.replicant.us/issues/1934 so you might already be able to get a root shell without mounting the system partition again.  | 
| 55 | |||
| 56 | In any case it's still best to follow the instructions above to make sure that the system partition is mounted on your device.  | 
||
| 57 | |||
| 58 | 2 | Denis 'GNUtoo' Carikli | h3. Backup the modem data partition on your computer  | 
| 59 | |||
| 60 | 1 | Denis 'GNUtoo' Carikli | For the Galaxy SIII (I9300), run the following commands to do that:  | 
| 61 | <pre>  | 
||
| 62 | mkdir backup_efs  | 
||
| 63 | cd backup_efs  | 
||
| 64 | 4 | Denis 'GNUtoo' Carikli | adb shell "mkdir /efs"  | 
| 65 | adb shell "mount /dev/block/platform/*/by-name/EFS /efs"  | 
||
| 66 | 1 | Denis 'GNUtoo' Carikli | adb pull /efs/ efs  | 
| 67 | 4 | Denis 'GNUtoo' Carikli | adb shell "umount /efs"  | 
| 68 | 1 | Denis 'GNUtoo' Carikli | adb shell "cat /dev/block/platform/*/by-name/EFS" > EFS.img  | 
| 69 | </pre>  | 
||
| 70 | |||
| 71 | For the Galaxy Nexus (I9250), run the following commands to do that:  | 
||
| 72 | <pre>  | 
||
| 73 | mkdir backup_efs  | 
||
| 74 | cd backup_efs  | 
||
| 75 | adb pull /factory/ factory  | 
||
| 76 | adb shell "cat /dev/block/platform/*/*/by-name/efs" > efs.img  | 
||
| 77 | </pre>  | 
||
| 78 | |||
| 79 | This will create a copy of the contents of /efs in the backup_efs directory. It will also backup the full partition.  | 
||
| 80 | Keep these files around as a backup in case anything goes wrong.  | 
||
| 81 | 3 | Denis 'GNUtoo' Carikli | |
| 82 | h3. Reboot in Replicant  | 
||
| 83 | |||
| 84 | Once the backup is done, you can then reboot in Replicant. To do that:  | 
||
| 85 | 1. Select "Reboot system now"  | 
||
| 86 | 2. Your device will then reboot in Replicant.  |