yashsingh1/xdaforums huggingface dataset:
[Nexus 6P Q&A, Help & Troubleshooting] googly123:
LG G3 D858HK hard Bricked Need Help

After restore of efs my LG G3 D858HK hard bricked. No Recovery, No Bootloader, No Logo. Nothing Just Black screen now with pin short method on Qualcomm 9008 mode but no emmc detected. Please help me.
[Nexus 6P Q&A, Help & Troubleshooting] SyCoREAPER:
Read. This is in the Nexus 6P section. Not LG G3
[Nexus 6P Q&A, Help & Troubleshooting] ajgftw:
thanks for posting the typo correction, I was wondering why it wasn't working for me :P
[Nexus 6P Q&A, Help & Troubleshooting] googly123:
Where is Link?

But the Problem is same.
[Nexus 6P Q&A, Help & Troubleshooting] bzz11g:
[MENTION=4905158]bogomil4e[/MENTION]

perhaps this information will be useful for you

partition table for Nexus 5x

http://xdaforums.com/attachment.php?attachmentid=3862515&stc=1&d=1472812940

http://xdaforums.com/attachment.php?attachmentid=3862516&stc=1&d=1472812940

really looking forward to solve the problem
[Nexus 6P Q&A, Help & Troubleshooting] droid_1989:
Is this fixed in twrp-3.0.2-2 ?
[Nexus 6P Q&A, Help & Troubleshooting] SyCoREAPER:
That's what I want to know. If people simply aren't reading that 3.0.2-2 was released or if this still hasn't fixed it.
[Nexus 6P Q&A, Help & Troubleshooting] minz1:
The Galaxy J7 (J700P) also has this issue.

Source: My phone is currently at Samsung Repair.
[Nexus 6P Q&A, Help & Troubleshooting] Fe Mike:
I'm willing to wipe and dd the efs. But not sure which partition is the efs. When I cat /proc/partition there are 3 that match the same size as the efs. Mmcblk0p18, p20, and p21. Also does it matter which firmware I'm on and version of twrp. I'm currently on MTC20F stock/rooted and using twrp-3-0-2.2.
[Nexus 6P Q&A, Help & Troubleshooting] Eric214:
OK I have just 2 questions. The fixed TWRP 3.0.2-2 is going to allow people to go back and forth between MM or Nougat with out dealing with vendor images and EFS?

Also, will I be able to now do backups of Roms and restores without bootloops?
[Nexus 6P Q&A, Help & Troubleshooting] SlimSnoopOS:
You still need to flash a 6.0.1 or 7.0 vendor when switching between either OS. That's not going away. Official 7.0 vendor does not exist since there is no 7.0 factory image posted yet. You can do a backup of 7.0 boot, data, system, and vendor but a bootloop is always possible. This is software. Some people can't restore vendor on 6.0.1 when also restoring boot, system, and data. They have to leave vendor out of that restore.

Seemingly yes for the EFS and bootloops, but time will tell. Read the changelog when it's posted or see others' responses after using TWRP 3.0.2-2. Or just test it out yourself.
[Nexus 6P Q&A, Help & Troubleshooting] defcondev:
Y'all might want to post this in your devices respective forums.

Sent from my XT1095
[Nexus 6P Q&A, Help & Troubleshooting] Jaa-Yoo:
Last week i side loaded the Nougat OTA and ended up with a phone that cant read sim cards (IMEI and baseband unknown). I flashed back to stock MM but the problem remains. Reading through the forum points to my problem being a corrupted EFS and i have no backup. My phone doesn't bootloop so i can unlock and connect ADB but can also flash twrp if i need to. Would this method work to restore my EFS?
[Nexus 6P Q&A, Help & Troubleshooting] SlimSnoopOS:
The way I look at it, you have nothing to lose. Just stay unlocked if you try it
[Nexus 6P Q&A, Help & Troubleshooting] defcondev:
It might very well work; The EFS partition is unique to every phone and contains the IMEI, cellular network information, wi-fi mac address, bluetooth mac address, etc.
[Nexus 6P Q&A, Help & Troubleshooting] Jaa-Yoo:
I gave it a shot and still no change.

Does this look right?
[Nexus 6P Q&A, Help & Troubleshooting] tyea:
Didn't work for me either. I had the same output as you. I'm not sure about the exact numbers.
[Nexus 6P Q&A, Help & Troubleshooting] wishx:
I just flashed 3.0.2-2 and tried to create a new backup and got the following error:

Backing up System...
createTarFork( ) process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.

What can I do to rectify this? This is the first version I've ever had that couldn't successfully create a backup.
[Nexus 6P Q&A, Help & Troubleshooting] superchilpil:
If you understand it then why ask for an ETA?
[Nexus 6P Q&A, Help & Troubleshooting] darkobas:
if it can be fixed then its not bricked :P
[Nexus 6P Q&A, Help & Troubleshooting] ultyrunner:
Asking "if" they were planning to post an update (which they did) and asking for an ETA are two entirely different things. Would you like me to clarify what the difference is for you?
[Nexus 6P Q&A, Help & Troubleshooting] jcadduono:
I'd like to clarify some things:

The EFS restoration issue was due to a missing file name set bug during the backup restoration process.

This caused all subpartitions associated with a backup-enabled partition to have the first item (ex. the main/non-subpartition) restored to all subpartitions as well.

See for example the partition entries in Angler's recovery.fstab:

/efs1 emmc /dev/block/platform/soc.0/f9824900.sdhci/by-name/modemst1 flags=backup=1;display=EFS
/efs2 emmc /dev/block/platform/soc.0/f9824900.sdhci/by-name/modemst2 flags=backup=1;subpartitionof=/efs1

While creating the backup of EFS, you will end up with:

efs1.emmc.win (modemst1 partition raw data)

efs2.emmc.win (modemst2 partition raw data)

When restoring this EFS backup, what happened was the file name was not updated for restore, and you ended up with:

Restoring EFS...

Restoring efs1.emmc.win to modemst1

Restoring efs1.emmc.win to modemst2

It should have been:

Restoring EFS...

Restoring efs1.emmc.win to modemst1

Restoring efs2.emmc.win to modemst2

If you had a working backup, you could restore it properly with:

dd if=/sdcard/TWRP/BACKUPS/SERIALNO/BACKUPNAME/efs2.emmc.win of=/dev/block/platform/soc.0/f9824900.sdhci/by-name/modemst2 bs=16384

As I figured many users may have accidentally backed up the badly restored partitions, and that command is easier said than done for many, the simpler solution was to just erase the partition entirely using zeros and have the modem firmware regenerate it on next boot.

(Snapdragon modem firmware is usually smart enough to regenerate from scratch ex. zeros, but panics on random data or incorrect magic!)

If you're wondering, here was the actual fix: https://github.com/omnirom/android_bootable_recovery/commit/724c5148a5bf341479bf943b0c64ce8d40814148

This bug was present in both Angler and Bullhead as far as I can tell, as they were rebuilt recently on the latest sources (between the time the bad commit happened and the fix linked above).

Most other devices are built on the TWRP version release commit rather than latest sources, so they should not have the bug.

There could be some user built builds out there with this issue, I see the OnePlus 3 did have a build on XDA with the issue.

If you're wondering, I just like to set block size (bs) to 16384 in dd for funsies. It's not necessary.

Update

TWRP 3.0.2-2 seems to have a backup bug where the 2nd tar file created after ~1GB will fail to write and cancel the backup.

I'll see about creating a quick build without the broken patches. (this is why it's bad to build on latest sources instead of release tags! ;))

Update #2

I've built new builds for Angler and Bullhead, they can be found here: https://idlekernel.com/twrp/nexus/

They should be up to date, but have the adb backup patches rebased out until the bugs are solved.

These builds are untested, and I recommend sticking with 3.0.2-0 instead for the time being.
[Nexus 6P Q&A, Help & Troubleshooting] shadowstep:
Thanks for the information! Extremely useful. Also, looking at the timestamps of the fix commit and the new version released (3.0.2-2), I see that the build was released about three hours post the fix commit was merged. Any way to confirm that it is actually there in the updated version that was posted?
[Nexus 6P Q&A, Help & Troubleshooting] jcadduono:
Not really any way to confirm, but the build does have the fix. Dees_Troy built it soon after testing the patch. It does have another issue mentioned above. (backup multi archives broken)
[Nexus 6P Q&A, Help & Troubleshooting] tr4nqui1i7y:
Stick with 3.0.2-0 until the next stable release. Probably 3.0.3-?
[Nexus 6P Q&A, Help & Troubleshooting] Eric214:
So I take it we should be waiting for 3.0.2-3 now?
[Nexus 6P Q&A, Help & Troubleshooting] jcadduono:
That's probably a good idea, for those of you who don't want to wait for an official 3.0.2-3 build, you can try:

https://idlekernel.com/twrp/nexus/

This should be similar to 3.0.2-2, just with the bad patches removed until a solution is found and official builds are remade.

I haven't tested them, sorry. I do not own either device.

Otherwise, yes, stick with 3.0.2-0, 3.0.2-1 was only meant to add Android N decryption support.
[Nexus 6P Q&A, Help & Troubleshooting] SlimSnoopOS:
Are you able to provide the dd command that Nexus 5X users should be using to resolve the TWRP 3.0.2-1 EFS issue?
[Nexus 6P Q&A, Help & Troubleshooting] jdhedden:
FWIW, I created a backup of Boot+System+System Image+Vendor+Vendor Image+Data using 3.0.2-2, and it completed without error. I'm ignorant as to what options or such trigger the bug mentioned.
[Nexus 6P Q&A, Help & Troubleshooting] jcadduono:
It should be the exact same as Nexus 6P.

As am I, apparently. :P Thanks for the info.
[Nexus 6P Q&A, Help & Troubleshooting] Eric214:
The bug is in the restoring of the backups. I think TWRP will corrupt the backup (EFS) and then when you go to restore the backup it corrupts the partition
[Nexus 6P Q&A, Help & Troubleshooting] SlimSnoopOS:
I seem to have exhausted my thanks for the day! Thank you and I will send a thanks your way tomorrow.
[Nexus 6P Q&A, Help & Troubleshooting] sinisin:
Im on a Note 5 and just restored a full back up that included EFS yesterday. No problems. So it's obviously not a problem with all phones.
[Nexus 6P Q&A, Help & Troubleshooting] mohdfahad47:
But why restore efs partition from twrp unless it's needed( in case of losing the imei). I never restore the efs partition if i want to go back to any old rom, i restore boot/system and data only. Fortunately ive never faced an issue with the imei...so the need of restoring the efs partition never occurred.
[Nexus 6P Q&A, Help & Troubleshooting] joeyddr:
Now restore all of it.
[Nexus 6P Q&A, Help & Troubleshooting] frost_nz:
I'm the same. I backed up the EFS partition the first day I got the phone, stashed it away on my PC in case anything went wrong in the future and haven't backed up/restored the EFS partition since.
[Nexus 6P Q&A, Help & Troubleshooting] chevycam94:
I did the same. Not chancing anything this time
[Nexus 6P Q&A, Help & Troubleshooting] mohdfahad47:
I know right, restoring it always sounds kinda useless. But i do backup my efs with every backup i make (to be on the safe side), i just dont restore it. Thumbs up buddy
[Nexus 6P Q&A, Help & Troubleshooting] DevUt:
Let me explain the subpartitons issue

Lets brief out first what is subpartition

In Android we have multiple partitions like

/data
/boot
/system
/recovery
/cache

Sometime we have multiple partition for same type of partition like

In Samsung the download mode is /boot1 (or something like that )

Same way the efs is in two (or more) partitons

/efs1
/efs2

TWRP for simple GUI experience it lists the multiple partitions as a single button

When does the bug come in ?

The bug is that TWRP was restoring a single subpartition to all subpartitions of it

example in this case

/efs2 was restored in both /efs2 and /efs1

so

when backing up

/efs1 = efs1.emmc.win

/efs2 = efs2.emmc.win

But when restoring

/efs1 = efs1.emmc.win

/efs2 = efs1.emmc.win

How was it fixed ?

https://github.com/omnirom/android_bootable_recovery/commit/724c5148a5bf341479bf943b0c64ce8d40814148

In this fix [MENTION=912474]Dees_Troy[/MENTION] fixed the restore by referring to the subparts instead of the parentpart which caused the bug
[Nexus 6P Q&A, Help & Troubleshooting] sfhub:
I have an issue with TWRP where it keeps asking me for password even I don't have one set.

I disabled password and screenlock, then upgraded to Android N

I installed TWRP 3.0.2-2 and it was ABLE to decrypt userdata automatically since there was no password set

This worked fine for a while but I noticed I could not mount /vendor successfully in adb, the partition would mount, but the contents weren't visible

So I downgraded TWRP to 3.0.2-0 to see if it would mount any differently.

From that point on, TWRP is unable to decrypt my userdata (asks me for password) even though I don't have one set.

I understand 3.0.2-0 cannot decrypt Android N. I reinstalled 3.0.2-2 and now it also is asking me for password, when there is none set.

It almost seems like running 3.0.2-0 caused some persistent change that causes 3.0.2-2 to be unable to decrypt.

I can boot into Android N and set up a pattern, then boot into 3.0.2-2 and it recognizes that I added a pattern because now it asks for pattern instead of password however when I enter the pattern, it does not decrypt.

Any idea what is going on? Does TWRP store some settings somewhere that might be causing this issue?

This is on Nexus 5x running NRD90M and TWRP 3.0.2-2. I understand this is 6P thread, but it is unclear whether this is specific to 5x or not.
[Nexus 6P Q&A, Help & Troubleshooting] Danish2980:
My situation after this bug occurred:

No TWRP

Locked Bootloader (My stupid attempt to save my device)

Phone freezes during boot

What can I do?
[Nexus 6P Q&A, Help & Troubleshooting] TheBurgh:
Can anyone confirm that this unofficial version of twrp is working?
[Nexus 6P Q&A, Help & Troubleshooting] multiwirth:
I'm using still cwm 8)
[Nexus 6P Q&A, Help & Troubleshooting] SpiritBreak3r:
Because everytime you backup from twrp it, by default EFS is also checked. Similarly, while you restore a backup, EFS is again checked and I restored a backup of my ROM from 302-1 which bricked it.
[Nexus 6P Q&A, Help & Troubleshooting] mbutandola:
So basically, if EFS had not been checked you wouldn't have bricked the phone, would you? Meaning that those who managed to restore didn't have EFS checked?

Envoyé de mon Nexus 6P en utilisant Tapatalk
[Nexus 6P Q&A, Help & Troubleshooting] mohdfahad47:
I guess, performing (fastboot format userdata) from fastboot might solve the issue.
[Nexus 6P Q&A, Help & Troubleshooting] sfhub:
Thanks. I considered that but wanted to avoid reinstall, unless as a last resort, because the phone works fine otherwise. userdata is encrypted and it boots into android N, which has no problems decrypting and no problems changing to pattern lock.

TWRP 3.0.2-2 had no problems decrypting userdata initially also. It was only after I ran TWRP 3.0.2-0 (possibly coincidentally) and then reinstalled TWRP 3.0.2-2 that the troubles decrypting started.

I will reinstall as a last resort, but this just feels like something where I can make a slight modification, either removing some cached settings or making a change in some persistent setting that affects how TWRP 3.0.2-2 figures out which decryption procedure to follow.

Clearly the keys are not corrupted nor is the encryption itself because Android N works fine even changing the pattern lock and further TWRP 3.0.2-2 recognizes the change to a pattern lock.

Perhaps if there was some log file I could look at it would give me some clue what is going on.
[Nexus 6P Q&A, Help & Troubleshooting] sfhub:
UPDATE: I apologize for the confusion. This issue had nothing to do with running 3.0.2-0. It turns out a script I was writing overwrote some critical files in /vendor and that is what caused all the issues with decrypting.

If anyone cares, I fixed the issue of TWRP 3.0.2-2 initially being able to decrypt my userdata but then no longer being able to after running TWRP 3.0.2-0.

What I did was flash boot.img, vendor.img, and system.img from MTC20F (marshmallow) and twrp-3.0.2-0.img, then booted into twrp. TWRP could successfully decrypt my userdata.

I then flashed boot.img, vendor.img, and system.img from NRD90M (nougat) and twrp-3.0.2-2.img, then booted into twrp. TWRP can now successfully decrypt userdata again.

It is possible/likely all I needed to do was flash vendor.img (skipping boot.img and system.img) but I didn't experiment.

There seems to be something persistent that is done when you boot TWRP 3.0.2-0 with an NRD90M (nougat) installed that then subsequently confuses TWRP 3.0.2-2 enough that it can't decrypt your userdata anymore.
[Nexus 6P Q&A, Help & Troubleshooting] Eric214:
Agreed, I've only ever backed up my EFS in case of emergency. Like last Saturday when I had a bootloop. First time ever.
[Nexus 6P Q&A, Help & Troubleshooting] ultyrunner:
So, if we tried to revert to MM from N by flashing a factory image are we still likely to brick our phones if we aren't restoring an EFS? I am generally pretty solid with flashing via fastboot, but all this brick and TWRP talk has me confused. Really wanted to roll back to the latest MM but scared of a brick. It seems like we'll never get the N factory image.
[Nexus 6P Q&A, Help & Troubleshooting] Eric214:
Yeah speak of which. Has there been any info on why they haven't dropped the factory images yet or have I missed something? Been 2 week's and 4 other devices at least have theirs posted already. I think it's normal for it to be about 4 days and images are posted.
[Nexus 6P Q&A, Help & Troubleshooting] ultyrunner:
Given that it's Sept 3rd, I suspect we will be waiting until Sept security patch is rolled out and getting it then. At least I hope so. Has to be a problem with it or it would have been up. I think I will just be patient and hopefully TWRP will be sorted totally then too.
[Nexus 6P Q&A, Help & Troubleshooting] bashirkh:
I backed up and restored mine several times using this version, never had a problem...
[Nexus 6P Q&A, Help & Troubleshooting] Eric214:
yeah that actually makes sense. good thinking.
[Nexus 6P Q&A, Help & Troubleshooting] Deltadroid:
Is this only an issue when building TWRP with the omni android-7 branch?
[Nexus 6P Q&A, Help & Troubleshooting] RusherDude:
I suffered this problem on a Nexus 5X, after restoring an EFS from a full backup done on 3.0.2-1 also. The solution for me was to restore an old EFS backup I had done with previous TWRP version.
[Nexus 6P Q&A, Help & Troubleshooting] ultyrunner:
I've only got an EFS from when I first got my 6p and rooted it. Never had to restore and didn't back it up since. I really would like to go back to MM until the factory image drops, but as I don't think I have a reliable clear path back, nor am I quite sure which TWRP I should use, I think I'll just remain where I am until the image drops. Then I'll just do it properly and re-root.
[Nexus 6P Q&A, Help & Troubleshooting] RusherDude:
I honestly would wait until they release a fixed TWRP version this time, this bug is not a joke (unless you know how to solve it now), it was not fun flashing a full OTA and rebooting with a "corrupted phone" red screen instead of the pre-ota flash usual orange "unlock your bootloader!" screen.

EDIT: unless you're bricked now, then format EFS like the OP say (didn't try it but he says it should work) if you don't back and old EFS backup (BIG MISTAKE)
[Nexus 6P Q&A, Help & Troubleshooting] ultyrunner:
Yeah, was planning to wait anyway. Using the debloated ROM by tupac4u with ElementalX and I'm in reasonable shape actually. The factory image HAS to drop soon, no matter how badly they borked it. Meanwhile, Google is crickets. Not saying a word on why it's taking so long to post an image for their current flagship. It's a little disconcerting that they wouldn't just come out and provide some info, or an ETA or something. I just much prefer being on the stock factory image with my own adjustments.

Related, though, the red corrupt message isn't always bad (other than how it looks when you boot). As long as Dirty Unicorns has had a 6p variant, it's caused that message.
[Nexus 6P Q&A, Help & Troubleshooting] RusherDude:
But the causes to make that message appear seem to be very strange or random: My N5x does not boot and panics asap boot animation first frame starts due to the EFS issue, and reboots. That should show a red corruption screen at start? maybe, but it doesnt, you keep the current unlocked orange one.

Then, you flash a total OTA, which flashes and verifies everything, and then the corrupted red message appears!! with the same status than before and the partitions than the OTA flashed and verified, wtf? and then, I tested flashing elementalX kernel and the orange screen returned... it doesn't make any sense, and when you're on this situation it doesn't seem fun at all :laugh:

---------- Post added at 10:57 PM ---------- Previous post was at 10:54 PM ----------

I don't know if at that point you can unlock bootloader (don't know if the OEM unlock bit is resetted when locking or not), or as a last resort, try flashing a total OTA stock image from your current build (dont be scared if after that you see a corupted red image at boot, it happened to me on N5X). However, apart from that, I think RMA is your only option, since I doubt you can access the EFS partition without TWRP or an unlocked bootloader :(. Someone correct me if I'm wrong..
[Nexus 6P Q&A, Help & Troubleshooting] mohdfahad47:
I'm glad you got it sorted. Im still unrooted on NRD90M, because of all these issues and probably cuz there's nothing solid yet out for nougat. Waiting for that damn 7.0 nougat factory image...:rolleyes:
[Nexus 6P Q&A, Help & Troubleshooting] DevUt:
Yes only on android-7.0 branch

Most importantly restoring factory images wont help as the factory images do not touch the efs partition

dd works because that partiton is nulled out and the phone regenerates the efs
[Nexus 6P Q&A, Help & Troubleshooting] scoot007301:
OK reading all the horror stories is got me confused as to how to avoid the boot loop..

My question is this...

I took the OTA update to Nougat.

And after it booted I then went into Factory recovery and did a factory reset and went through the setup and then setup my accounts and apps .

Then I went to Bootloader and flashed TWRP 3.0.2.1 and then booted into TWRP recovery and i made a backup system/data/Vender and probably EFS also as I think it's default checked.

Then I flashed superSU Update 2.76 for Root which allowed me to keep TWRP recovery.

So now I'm on TWRP recovery 3.0.2.2

If I was to restore my backup of Nougat b4 I rooted that I made with TWRP 3.0.2.1 would i be at risk of the dreaded boot loop ??

Or is it that I'm safe as long as I don't restore the EFS part of the backup??

Thanks for any advice as I'm scared to do anything in recovery now
[Nexus 6P Q&A, Help & Troubleshooting] Bobbaloo:
THANK you sooo much for posting this info and getting my phone unbricked!!!!!
[Nexus 6P Q&A, Help & Troubleshooting] DJBhardwaj:
The best way is to unselect the EFS while restoring. This will prevent the bootloop.
[Nexus 6P Q&A, Help & Troubleshooting] Bobbaloo:
the mok and cm mods have been defective in that area. i don't know much but i had gotten into the habit of backing up and restoring that also. in the earlier version, it was called RADIO, right?
[Nexus 6P Q&A, Help & Troubleshooting] Chintaro:
TaroEnterprise
[Nexus 6P Q&A, Help & Troubleshooting] mohdfahad47:
There's no point in restoring the EFS partition everytime you restore from twrp. Restore EFS only if you lose your IMEI....if you want to restore back to any rom, just restore boot/system and data partitions.

---------- Post added at 03:14 PM ---------- Previous post was at 03:11 PM ----------

Well it's kinda pointless restoring the efs every you restore from twrp..i don't remember if efs was called radio before on twrp.:confused:

---------- Post added at 03:30 PM ---------- Previous post was at 03:14 PM ----------

I got the red corrupt message when i tried to go full stock to (mtc20f) from Cm13( wanted to go to stock in order to get the nougat ota update) but i got that annoying message even after lockingthe bootloader. I solved this issue by unlocking the bootloader and flashing all the images manully from fastboot