Project

General

Profile

BackupTheEFS » History » Revision 2

Revision 1 (Denis 'GNUtoo' Carikli, 05/11/2019 07:36 PM) → Revision 2/37 (Denis 'GNUtoo' Carikli, 05/11/2019 07:57 PM)

h1. How to backup the EFS 

 h1. Introduction 

 Many devices supported by Replicant have a partition with the modem data (IMEI, etc) which is called EFS. 

 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. 

 Only the following devices that are supported by Replicant have a modem data partition (EFS): 
 * Galaxy S 2 (I9100) 
 * Galaxy S 3 (I9300) 
 * Galaxy S 3 4G (I9305) 
 * Galaxy Nexus (I9250) 
 * Galaxy Note (N7000) 
 * Galaxy Note 2 (N7100) 
 * Galaxy Tab 2 7.0 (P3100) 
 * Galaxy Tab 2 10.1 (P5100) 
 * Galaxy Note 8.0 (N5100) 

 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. 

 h2. Instructions 

 We will backup the modem partition from the Replicant recovery. 

 This is to make sure that the modem data partition is not being modified when we are doing the backup. 

 h3. Enable root access through adb in Replicant 

 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. 

 This will enable you to also be able to get a root shell in the recovery. 

 h3. Reboot in the recovery 

 Once this is done you need to reboot in the Replicant recovery. 

 This is to make sure that the modem data partition is not being modified when we are doing the backup. 

 To do that: 
 1. Make sure that your device is booted under Replicant. 
 2. Press the power button until a menu appears 
 3. Press "Reboot" 
 4. Select "Recovery" and can then press "ok" 
 5. The device will then reboot to backup the Replicant recovery EFS. 

 h3. Enable root access through adb in the recovery 

 In the recovery: 
 1. Select Advanced 
 2. Select "Mount /system" 

 h3. Backup the modem data partition on your computer 

 For the Galaxy SIII (I9300), run the following commands to do that: 
 <pre> 
 mkdir backup_efs 
 cd backup_efs 
 adb pull /efs/ efs 
 adb shell "cat /dev/block/platform/*/by-name/EFS" > EFS.img  
 </pre> 

 For the Galaxy Nexus (I9250), run the following commands to do that: 
 <pre> 
 mkdir backup_efs 
 cd backup_efs 
 adb pull /factory/ factory 
 adb shell "cat /dev/block/platform/*/*/by-name/efs" > efs.img  
 </pre> 

 


 This will create a copy of the contents of /efs in the backup_efs directory. It will also backup the full partition. 
 Keep these files around as a backup in case anything goes wrong.