[TOOL] Backup & Restore EFS on OnePlus 3

juliusedward

Senior Member
Aug 10, 2010
335
147
73
Backup & Restore EFS on your OnePlus 3[Root Needed]

To Backup:
1) Enable USB Debugging Settings -> Developer Options -> USB Debugging.
If Developer Options not found, go to Settings -> About Phone and tap the build number rapidly 6-7 times till a toast comes up saying 'You're now a developer' . You will now see 'Developer Options' above About Phone in settings.
2) Download the attachment, extract it to a folder, connect your phone to PC through ADB, double click on 'BACKUP EFS.bat'. When it says 'Press any key...' just press any key on your keyboard! You'll see 'modemst1.bin' & 'modemst2.bin' files in the same folder where you extracted the ZIP, make more copies and backup of it! That's your EFS!
DONE!
Backup tested on OnePlus 3 OxygenOS version 3.1.2

To Restore:
1) Connect your phone in fastboot mode to PC, place your 'modemst1.bin' & 'modemst2.bin' in the extracted folder, double click on RESTORE EFS.bat'.

DONE!

I could not find any tool so far and apps from Play store fail to create a backup for OnePlus 3. So I have re-used the tool created by @Paresh Kalinani for OnePlus One and modified it to extract for OnePlus 3.

Credits:
@Paresh Kalinani for creating this simple tool for OnePlus One
@Signor Rossi for providing the partition information
@ahmadhas for testing restore
 

Attachments

Last edited:

android_fury

Senior Member
Dec 24, 2014
131
42
28
For those running Linux, it's a lot easier

Don't even bother with the Windows tool. All it takes to backup the files is a working ADB connection and two commands:

This copies the info and creates the two files.
Code:
adb shell su -c "dd if=/dev/block/sdf1 of=/storage/self/primary/modemst1.bin bs=512"; adb shell su -c "dd if=/dev/block/sdf2 of=/storage/self/primary/modemst2.bin bs=512"
This copies the files to your current directory in the CLI.
Code:
adb pull /storage/self/primary/modemst1.bin; adb pull /storage/self/primary/modemst2.bin
I wasn't even able to get ADB to work in Windows. I installed the OP3 USB drivers, systemwide ADB/Fastboot tool, and still couldn't get it to work. I can see the phone fine in Windows, but ADB just refused to work. I then decided to inspect the BACKUP EFS.bat and RESTORE EFS.bat files to see what they were doing and it was just the two commands I posted here. If you're running Linux, don't waste your time fighting Windows to get this to work.

Restoring is the nearly the same. Run the following commands after connecting the phone via ADB.

Open a terminal in the directory where you saved the files you generated before and run this to copy them to the internal storage:
Code:
adb push modemst1.bin /storage/self/primary/modemst1.bin; adb push modemst2.bin /storage/self/primary/modemst2.bin
Then run this to flash the backups to the phone:
Code:
adb shell su -c "dd if=/storage/self/primary/modemst1.bin of=/dev/block/sdf1 bs=512"; adb shell su -c "dd if=/storage/self/primary/modemst2.bin of=/dev/block/sdf2 bs=512"

Damn, I love Linux.
 

Butit

Senior Member
Jul 2, 2016
113
39
0
Dundalk
You can also backup your efs partition using terminal emulator. The guide can be found in oneplus.net forum.

Sent from my ONEPLUS A3003 using Tapatalk
 

JumboMan

Senior Member
Aug 3, 2013
561
216
73
Pink City
You can also backup your efs partition using terminal emulator. The guide can be found in oneplus.net forum.

Sent from my ONEPLUS A3003 using Tapatalk

@Naman Bhalla also posted terminal emulator method here on xda.
To backup you don't require pc ,just run given commands in terminal...but to restore you requires pc(as per Naman bhalla thread).
I have question in my mind that if it's possible to backup then why we can't restore backup just reversing command in terminal
 

Striatum_bdr

Senior Member
May 29, 2011
4,650
2,176
253
Marseille
what you mean by official TWRP.
is it possible to restore efs backup with TWRP.. if possible then plz tell me...i would like to know how to do this
Just like you backup and restore anything in twrp.
In backup screen you have EFS choice.
Then in restore screen you select the folder containing efs backup and voila...

Trivial.
 

JumboMan

Senior Member
Aug 3, 2013
561
216
73
Pink City
Just like you backup and restore anything in twrp.
In backup screen you have EFS choice.
Then in restore screen you select the folder containing efs backup and voila...

Trivial.
I just rebooted to TWRP(Grarak's) to see is there any such option but i don't see any option to backup or restore efs backup.
Can you link TWRP that can do efs backup or restore