yashsingh1/xdaforums huggingface dataset:
[ONE Original Android Development] djha53k:
Strange, I did it same way as you did... and I have no prob... Rebooted couple times already - no issue.
[ONE Original Android Development] knuspertante:
Try a reflash of the recovery
[ONE Original Android Development] Ok_Kaleidoscope5109:
Just an FYI, I was on CM11 with 0913 nightly and I did a TWRP Backup (2.8.0.1 official).

I then flashed to something older to test if a bug still existed in an older version as part of investigation for a bug reported on JIRA. Then when I was done, I did a TWRP restore of the 0913 nightly that I backed up and when I rebooted, IMEI, was gone. EFS was lost :(
[ONE Original Android Development] Sheeezy:
I stil can't understand why the EFS backup option was canceled ?
[ONE Original Android Development] chrmhoffmann:
Latest release works for me with encrypted data. Thanks!!!
[ONE Original Android Development] MrMarkEdward:
You can get it on the unofficial build.
[ONE Original Android Development] Ok_Kaleidoscope5109:
Detailed thread here: http://xdaforums.com/oneplus-one/help/lots-efs-imei-t2877328

But I flashed the unofficial 2.7.1.0 recovery and was able to restore the backup I made in 2.8.0.1. Upon doing so I was able to get WiFi and Bluetooth working. But no mobile connectivity.

Rebooting loses everything. I'm very confused.

TWRP Backup Log: https://mega.co.nz/#!bdpjUDrA!Yl5BvDB8BA03L-1Mkv3WlVYAP7N7yAmuxAjHjH_r4oI
[ONE Original Android Development] Krunk83:
So it looks like restoring old nandroids will cause this? I guess I should flash the older version. Why did they get rid of the EFS backup?
[ONE Original Android Development] Krunk83:
I can't seem to get this to work on terminal emulator. It says permission denied or command doesn't exist.
[ONE Original Android Development] Vonnegut:
That means you aren't rooted or you didn't run the su command before the dd command.

Anyway Timmaaa is going to update his thread http://xdaforums.com/oneplus-one/general/guides-bacon-timmaaas-how-to-guides-t2839471 with a flashable script. Stay tuned.
[ONE Original Android Development] Krunk83:
I did use the su command. Then I typed the script.

Edit: Never mind I got it thanks.

Sent from The One+ One
[ONE Original Android Development] playya:
did your su permission pop up?
[ONE Original Android Development] Vonnegut:
:good:
[ONE Original Android Development] Krunk83:
It did once I enabled root in dev settings.

Sent from The One+ One
[ONE Original Android Development] MrMarkEdward:
You can backup efs to phone and desktop using this OnePlus One ToolKit 1.2.3

As you can see from screnshot you get modemst1.bin modemst2.bin and efs.img
[ONE Original Android Development] RBwai:
I use 2.8.0.1 and when I try to connect with PC (Windows7), nothing happens. I try with mount every option, but no use. Any help, please?
[ONE Original Android Development] zephiK:
EFS backup was never in official TWRP, it was a feature of unofficial TWRP. But yeah it would make sense to include EFS backup into the official TWRP.
[ONE Original Android Development] om22:
It´s defenitely possible in the official nexus 5 twrp don´t know why it hasn´t made it´s way to the opo.
[ONE Original Android Development] Krunk83:
Thanks, I got it once I got root enabled for terminal.
[ONE Original Android Development] tdamocles:
If I'm correct the official version sometimes tries to restore st1 even though it didn't have the option to save it. Don't let it restore st1. You will corrupt your efs. Use the unofficial twrp to save efs and let it restore st1 and st2(both efs) .
[ONE Original Android Development] Ok_Kaleidoscope5109:
That's what I'm thinking. The official version seems to restore st1 even though its never in the backup screen. Why?

Also the st1 that it did backup is a 1.5mb file so its not like it failed to back it up and then tries to restore it. Its not a random file too. I'm not sure how it got backed up in the first place?
[ONE Original Android Development] tdamocles:
That st1 corrupts efs immediately if flashed back. I've done it twice. I've restored with saved st1 and st2 and the fastboot command.
[ONE Original Android Development] playya:
Are you saying you did it twice with 2.8.0.1 or just in general
[ONE Original Android Development] tdamocles:
With the official twrp I have hastily restored that nasty st1 with resulting efs corruption. Use the unofficial twrp with efs backup and you won't have the problem with st1.
[ONE Original Android Development] playya:
Did the new twrp cause the problem or are you just saying what to do
[ONE Original Android Development] Ok_Kaleidoscope5109:
I think I've seen st1 as a checkbox for restore on not only 2.8.0.1 but also 2.7.1.0.

I would caution anyone that sees modemst1 in the restore options to NOT restore that on the official TWRP. And before ever doing any backup and restores on TWRP, make sure you backup your modemst1 and modemst2 partitions onto your computer or somewhere safe. That way if you do indeed click the wrong button in TWRP you're at least covered right?

Meanwhile [MENTION=912474]Dees_Troy[/MENTION] I would suggest you look into these options and maybe either safeproofing TWRP so that users can't easily brick their phone. I did a experiment where I flashed the stock image to wipe everything and reset my bootloader, modem, system, recovery partitions. Then I flashed 2.8.0.1 and tried to restore my old backup. The modemst1 button is checked by default, and given that its checked by default, I likely figured it was safe to do so in an official version of TWRP. That was where I went wrong and my IMEI is now gone.
[ONE Original Android Development] katinatez:
You are not correct. TWRP flags are set this way to invoke a backup with multiple partitions, that's why you only see the st1 as a checkbox. You are correct about checking to see inside the backup file making sure you have modemst1 and modemst2 partitions before restoring.

Maybe this code will help you understand the efs backup.

/modem_st1 emmc /dev/block/platform/msm_sdcc.1/by-name/modemst1 flags=backup=1;display=EFS
/modem_st2 emmc /dev/block/platform/msm_sdcc.1/by-name/modemst2 flags=backup=1;subpartitionof=/modem_st1

More resources to understand

http://xdaforums.com/showthread.php?t=1943625
[ONE Original Android Development] Ok_Kaleidoscope5109:
Aren't the modemstx files 1.5mb each? I only see modemst1 in my case. And if it successfully backed up modemst1, why would flashing it back corrupt the IMEI?

I think theoretically a proper modemst1 backup should restore just fine and not cause any corruption, but clearly something is going on. I'm not even sure how modemst1 was backed up in my case given that a fresh CM11 ROM flash didn't trigger the backup nor did it show up in the restore. Other users have reported similar experiences backing up CM11S and do not see modemst1 in their restore options. With that said its still worth cautioning users given that I'm not the only one who has seen IMEI corruption upon restoring the modemst1.
[ONE Original Android Development] katinatez:
Yes the files are about that size, when I backup efs on my personal build recovery it creates 2 backups 1)modemst1 2)modemst2. And the whole backup size of my efs file is about 3 mb or 3.1 mb.

Maybe that's why your IMEI was corrupted, only restoring 1 partion of 2.
[ONE Original Android Development] Ok_Kaleidoscope5109:
Yeah it makes sense the unofficial one that has EFS backup backs up both st1 and st2.

However st1 and st2 should never be modified anyway in ROM flashing and restoring. I used the official copy of TWRP 2.8.0.1, so I'm still not understanding why st1 was backed up to begin with and why st2 was not either. And 2.8.0.1 isn't supposed to backup either partition. Furthermore if other users are reporting that modemst1 sometimes becomes a restore option, it may be worth looking at how the backup was created and what triggers the backup to be created. Its clearly causing me and others some IMEI issues, which is why for now I advise all users not to just simply restore modemst1 in their TWRP restore unless they for sure already have IMEI corruption issues.

But the thing regarding restoring st1 is that even if I only restore 1 of the 2, modemst2 should've never been messed up to begin with. Its likely the modemst1 backup was done improperly or the restore was done improperly. Had it been a proper backup, it wouldn't matter if TWRP is restoring it or not. My phone shouldn't screw up.
[ONE Original Android Development] dlhxr:
The Unofficial TWRP 2.7.1.0 here backup and restore these two parititon correctly.

http://xdaforums.com/oneplus-one/development/recovery-unofficial-twrp-2-7-1-0-t2815247

And most roms don't modify these two partition.

But in fact, I find that Color OS does actually modify these two partitions! That's why we can use color os to restore IMEI and other information when efs corrupts.
[ONE Original Android Development] tdamocles:
I corrupted my EFS about a week after I purchased the phone. I think I can trace that problem back to the official TWRP. I do remember that ST1 option being ticked in TWRP.. I got the efs back by using the coloros method the first time. The method to save st1 and st2 for fastboot flash is in one of these twrp threads.. I would suggest anyone to extract them before using the official version of twrp or one could just untick st1.
[ONE Original Android Development] Krunk83:
Just did this as this as and immediately saved copies to my drive.

Sent from The One+ One
[ONE Original Android Development] Vonnegut:
Modemst1&2 have the very same size. That is 1.536KB. If the backup has been moved to Windows, it'll show a different size 'cause Microsoft thinks that 1MB=1.000KB. So the size will be 1.536*(1024/1000)=1.572,864.

Finally, after dumping the 2 partitions with this script http://www.mediafire.com/download/5r4ljo4vwpt0642/My_backup.zip (which creates a directory in the internal storage named Mybackup), you'll see in the recovery log still another size, 'cause is counted in bytes. That'll be 1.536*1024=1.572.864 bytes
[ONE Original Android Development] playya:
Q - does the my backup zip file simply back it up to the Internal HD as img files or does it back it up to a flashable zip file similar to the one in the N5 forum. I saw a post in the unofficial thread http://xdaforums.com/showpost.php?p=55503146&postcount=88

I have already done my backup a while ago but curious as I have friends who are terrified of adb and a zip to backup to a zip would be simple for them... TIA
[ONE Original Android Development] katinatez:
deleted
[ONE Original Android Development] Vonnegut:
That can be done quite easily since i don't even have to write the main script...it's already there.

I'll make the .zip later tonite
[ONE Original Android Development] Ok_Kaleidoscope5109:
Yikes. I hope the official TWRP is updated so users can avoid this.

For now should I assume my phone is toasted then?
[ONE Original Android Development] tdamocles:
Yes.

---------- Post added at 07:08 PM ---------- Previous post was at 06:59 PM ----------

Have you tried to install coloros? It restored my partitions.
[ONE Original Android Development] Ok_Kaleidoscope5109:
Tried ColorOS. No dice.
[ONE Original Android Development] Vonnegut:
Done --> http://www.mediafire.com/download/767dk34l2npc285/OPO_Backup_EFS.zip

I cleaned up a bit the script and added selinux permission but the credit still goes to [MENTION=2684188]autoprime[/MENTION]

The OPO_Backup_EFS.zip creates a directory named EFS_Backup in the internal storage containing both the raw image of modemst1&2 and a flashable .zip to restore them.

Anyway, the other script backups more than just modemst1&2..read chapter 11 here --> http://xdaforums.com/showpost.php?p=54640979&postcount=1
[ONE Original Android Development] playya:
These are the two main files I see that need to be restored when IMEI goes bad. This is a great start and should make it easy for everyone to use maybe [MENTION=4153349]timmaaa[/MENTION] could add it to his list. I am sending from Tapatalk so I hope I got his name right
[ONE Original Android Development] Natakranta:
The above and the text from Parcel Motel saying my 1+1 is ready for collection in deposit box next to my home. What a great day!

Happiness :D
[ONE Original Android Development] IIMaxII:
A user on the OnePlus forums told me in a thread that to backup EFS properly you need to do the following...Is this in the new script?

Post 1:

dd if=/dev/block/mmcblk0p10 of=/sdcard/modemst1.bin bs=512

dd if=/dev/block/mmcblk0p11 of=/sdcard/modemst2.bin bs=512

dd if=/dev/block/mmcblk0p15 of=/sdcard/efs.img bs=4096

people also seem to forget EFS is useless without these backups

dd if=/dev/block/mmcblk0p12 of=/sdcard/oppodycnvbk

dd if=/dev/block/mmcblk0p13 of=/sdcard/oppostanvbk

Post 2:

you need EFS.img as well modemst1 modemst2 is not enough

Post 3:

IMEI backups are also hidden in these partitions. which phone will check for

dd if=/dev/block/mmcblk0p19 of=/sdcard/PARTITION_BKP/fsc

dd if=/dev/block/mmcblk0p18 of=/sdcard/PARTITION_BKP/fsg

dd if=/dev/block/mmcblk0p29 of=/sdcard/PARTITION_BKP/grow

dd if=/dev/block/mmcblk0p21 of=/sdcard/PARTITION_BKP/misc

dd if=/dev/block/mmcblk0p1 of=/sdcard/PARTITION_BKP/modem

dd if=/dev/block/mmcblk0p10 of=/sdcard/PARTITION_BKP/modemst1

dd if=/dev/block/mmcblk0p11 of=/sdcard/PARTITION_BKP/modemst2

dd if=/dev/block/mmcblk0p12 of=/sdcard/PARTITION_BKP/oppodycnvbk

dd if=/dev/block/mmcblk0p13 of=/sdcard/PARTITION_BKP/oppostanvbk

dd if=/dev/block/mmcblk0p9 of=/sdcard/PARTITION_BKP/pad
[ONE Original Android Development] katinatez:
Link to source, please
[ONE Original Android Development] Vonnegut:
I just did what i've been asked for. I also pointed ppl like you to chapter 11 of the Timmaaa guide http://xdaforums.com/showpost.php?p=54640979&postcount=1 (but nobody seems to read it) and i also wrote that the script linked there makes a full backup of all the partition but those with an asterisk on the right side (though it is not listed, the script backups even mmcblk0p29).

As for the mmcblk0p15 block its name is persist and not EFS. As stated in chapter 11 of the ultimate guide that nobody cares to read ( :) ), persist is an EXT4 partition (=writable partition) which contains some setting for sensors, wi-fi, bluetooth and stuff like that...but not the IMEI. Just open your favorite file manager and check for yourself!

As for all of other partitions, noone knows exactly what is stored into in them, except your friend who think they spread the IMEI everywhere :)

P.S. Mmm, under persist/data/app_g there are 3 misterious file which could be related to the IMEI tho. Anyway, as i wrote many times, what's wrong in having a full backup?
[ONE Original Android Development] playya:
as an fyi - I read it
[ONE Original Android Development] IIMaxII:
https://forums.oneplus.net/threads/anyone-successful-in-backup-the-efs-imei.91986/#post-5247921

---------- Post added at 05:06 PM ---------- Previous post was at 05:03 PM ----------

People like me... Mate, I read your guide. But I asked a question because someone else had told me that backing up those two is simply not enough, and your post didn't go into detail about those particular things he mentioned. It was just a question.
[ONE Original Android Development] Vonnegut:
English is not my natural born language. I see your point and i apologize but with writing "ppl like you" i meant "ppl who wants more than that and should be looking for the other script"

As for you, frankly speaking, i made a stupid script for backing up everything and i even went so far to put the link in the very same post you did quote. If you wanted more than modemst1&2, you already had it..that was the meaning.

Then again, that could be misunderstood..but (again), frankly speaking, what was the most likely meaning of "ppl like you" when someone reply to someone asking for everything? Think about it.

There was no offense in my reply, i just emphasized that what you were looking for was already in the very post you quoted.

Read it again and you'll agree that I also pointed ppl like you to chapter 11 of the Timmaaa guide was referring to anyone looking for a full backup.
[ONE Original Android Development] IIMaxII:
No harm no foul play. :) I was just wondering for educational purposes, not to actually backup. I was confused why the EFS would be stored like that if this guy was right.
[ONE Original Android Development] Ok_Kaleidoscope5109:
So I find it interesting that a combination of restoring my TWRP backup (minus modemst1) and wiping factory reset from TWRP can get me a boot with Wifi and BT working. Cellular does NOT work. But as always after a reboot its gone!!!

Why does that happen? I'm accepting that this phone is toast and I cannot get cellular working ever as the IMEI is probably lost, but why does WiFi work and then completely die out after a reboot?

Is there any way I can at least keep the WiFi so I can use this as a glorified iPod touch?
[ONE Original Android Development] playya:
Just throwing this out there but the version of ColorOS was it the same as the one most used successfully or was it a newer version that you used. Just thinking that it may be a specific one that has the magic. Sorry just throwing stuff out there in hopes something sticks and works for you
[ONE Original Android Development] Ok_Kaleidoscope5109:
Yeah. Color OS 1.20 right?
[ONE Original Android Development] playya:
Sorry not sure which one I did not check that. just want to make sure you at least try everything since at this point nothing has worked. Too many success stories out there for us not to figure something out
[ONE Original Android Development] Ok_Kaleidoscope5109:
Yeah I feel like I tried everything. I flashed ColorOS 120, reflashed modemst1 and modemst2 that I pulled off the phone earlier this week.

If those are corrupted already then I'm reflashing corrupted stuff, so no harm. Its already harmed. If they're good, then they should technically work, but i get no connectivity. Fell asleep at my desk and the phone died.

Recharging now and maybe I'll try a few more things this weekend.
[ONE Original Android Development] SenK9:
Just confirming that full-device encryption now works flawlessly on TWRP 2.8.0.1. Great work team.

https://github.com/TeamWin/Team-Win-Recovery-Project/issues/291
[ONE Original Android Development] provolinoo:
any flashable zip version? I know how to do that but I can't at moment

thanks a lot in advance
[ONE Original Android Development] feeq13:
Can anyone please make a .zip
[ONE Original Android Development] zephiK:
Just use Flashify and flash TWRP 2.8.01 using flashify.

Find it on play store.
[ONE Original Android Development] chikimonke:
Because I'm feeling nice [emoji2]

https://play.google.com/store/apps/details?id=com.cgollner.flashify
[ONE Original Android Development] lewmur:
Restore

I just installed the latest TWRP touch version and did a full backup, and one of just the data, to the external SD. If I use TWRP file manager to read the card, both backups are there under /TWRP/Backups. But when I attempt a restore nothing shows on the card. The tablet is a Galaxy Note 10.1 2014 Wifi only.
[ONE Original Android Development] chikimonke:
This is the thread for the OnePlus One.
[ONE Original Android Development] geowolf1000:
little confused

finally does latest version backup efs partition files?
[ONE Original Android Development] zephiK:
Nope. Use the unofficial version for EFS backup. You can find it in the android development forums.
[ONE Original Android Development] pgflying:
the 2.0.8.2 is come out you can update
[ONE Original Android Development] Natakranta:
Would you mind posting a link?

I don't see it there:

http://techerrata.com/browse/twrp2/bacon
[ONE Original Android Development] chikimonke:
I see no mention of 2.8.0.2 anywhere for any device, not sure what he's talking about.
[ONE Original Android Development] marhensa:
cant charge on recovery, is that normal?

Transmited via Bacon 1+
[ONE Original Android Development] Vonnegut:
I've updated the script and removed the quoted one.

http://www.mediafire.com/download/igph50efr3ha9fb/OPO_Backup_EFS_2.0.zip

Why that? Because finally i had the chance to see with my very own eyes what happens while doing usual stuffs with TWRP.

Read this post --> http://xdaforums.com/showpost.php?p=55606339&postcount=49

The persist partition is an EXT4 sector collecting all of the settings for time, radio, wi-fi, sensors, GPS and bluetooth.

It's located right after the system partition, so my guess is that when the TWRP bug pop up, it just go over it.

So from now on, if you just make a switch of ROMs and find out that the radio etc etc doesn't work anymore after booting, just flash the backup .zip.

See ya all, Vonnegut
[ONE Original Android Development] MrMarkEdward:
I am not finding the backup at all from v2. It creates the backup folder but folder is empty.
[ONE Original Android Development] tdamocles:
+1
[ONE Original Android Development] Vonnegut:
Which recovery have you installed?

(Philz, TWRP)
[ONE Original Android Development] MrMarkEdward:
TWRP 2.8.0.1 Unofficial
[ONE Original Android Development] Ok_Kaleidoscope5109:
Thanks a bajillion!
[ONE Original Android Development] Vonnegut:
I'm still using 2.7.1.1 but i just booted up the latest unofficial release http://xdaforums.com/showpost.php?p=55697993&postcount=129

It works just fine.

Please check that out and provide me a log.
[ONE Original Android Development] MrMarkEdward:
Yes now that one worked just fine.:good:
[ONE Original Android Development] mavblues:
Why does TWRP Manager app still show 2.7.1.1 as the latest version?
[ONE Original Android Development] Natakranta:
Hi, thanks a million for your work on efs backup.

I made a backup using your first version. Lucky me I didn't have to use it so far.

Do you advise to take new efs backup with your new version? What's the difference actually? Does the v.2 add a backup of the persistent partition which v.1 did not?
[ONE Original Android Development] Vonnegut:
My pleasure Nata (and i thank you back for all of your post)

As you already spot, this backup will add the persisit partition along with the modemst1&2.

I think it's useful to have a backup script which automatically makes a flashable restore zip. That might be very helpful when facing some of most common situations i've seen out there.

Anyway, i made my point here http://xdaforums.com/showpost.php?p=55693065&postcount=79

I strongly invite anyone to make a full backup (that means backing all of the partition of the main block which aren't already covered by the official CM zip).
[ONE Original Android Development] nneves:
Hi

Flashed your last EFS backup with unofficial twrp 2.8.0.1 and it only create the backup folder in the sdcard. The folder is empty.

Using CM11 from 28/09

---------- Post added at 11:10 AM ---------- Previous post was at 10:42 AM ----------

Updated to the last unofficial and problem solved.

Thanks for this script.
[ONE Original Android Development] playya:
Funny I am on the latest but still only getting folder
[ONE Original Android Development] nneves:
Official or unofficial?
[ONE Original Android Development] :
No problems at all.

Created folder with all needed files.

Latest cm nightly and latest official twrp.
[ONE Original Android Development] stewa2jm:
I'm getting password error messages when trying to decrypt on 2.8.0.1 twrp. Is there a fix for this anywhere? I cannot seem to find an answer. Thanks.

Also, does anyone have the link to the information about this being a hardware issue? I'd like to read that.
[ONE Original Android Development] katinatez:
I believe the folder is empty because I did not declare the persist partition on unofficial twrp 2.8.0.1 fstab.

I believe if I just add the persist partition into fstab, script will work after that.
[ONE Original Android Development] Tunasty:
Which version

So I'm about to flash a custom rom, (yes i know finally taking this step lol) but want to make a full backup of my current setup, i.e Stock rom with custom kernel. Which version of 2.8.0.1 should I be using? Official or unofficial?

Thanks!
[ONE Original Android Development] Natakranta:
Each of them can do it.
[ONE Original Android Development] qetuol:
anyone, who could not flash full cm11s rom via 2.8, try 2.7.0.0. it worked for me.