What's new
DroidForums.net | Android Forum & News

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Heads Up: Need to select Vendor File in TWRP Backups

cynkrzy

Diamond Member
Just discovered the hard way you need to backup the vendor file in TWRP when doing backups.
It''s not selected by default.

There are 2 options "Vendor" and "Vendor Image" - I believe "Vendor" is the correct choice, since TWRP doesn't support flashing the vendor.img from within TWRP.

Hopefully it will restore the "Vendor" option.

I tried to restore my Stock Rooted Image and the phone boots, get's the popup about the phone being corrupt and then can't be pin unlocked. That's because I was on 08K stock and flashed the 08M Vendor.img to match the ROM (Part of the install instructions)

Not sure if that's because I changed to a different pin when I flashed PureNexus and the Pin is stored in the vendor image or what. Tried both Pins to no avail.

But I think I can re-flash the Vendor image for "K" - not sure if I'll be able to get it to unlock though.

Not a disaster by any means, had a backup of the ROM so I'm back in business and of course we are the truly lucky ones who can get stock image file to flash in Fastboot.

So just a word to the wise.
 
  • Like
Reactions: CJM
From what I've read, you'll want to set the device security to "None" before you backup. This will remove the pin and fingerprint sensor and should prevent issues when restoring.

Sent from my Nexus 6P
 
Also, read this from XDA

Quote:

Originally Posted by mikexda

"I may be totally off base here because I have not tried it myself. But why can't you simply restore your backup. Then while still in TWRP go delete /data/system/locksettings.db?"

"Mike, you deserve a medal  Your solution made it possible to login again. I was set to fingerprint security with an additional PIN before I made a backup. Then after restoring, the fingerprint reader accepted my fingerprint, but the PIN security was set back to Swipe, so I could logon with just my fingerprint and a simple swipe. Good find!
Everyone having restore issues, follow Mike's instructions and thank him

Btw, I'm on a Nexus 5X, but that probably won't matter"

Sent from my Nexus 6P
 
Last edited:
From my experience so far, if the restore is of the same rom or possibly os version, restores without restoring the vendor partition work just fine.

I'm going to try an experiment later, where I restore a backed up vendor partition and see if that works.

And then one where I flash the vendor.img for the Rom after the restore, see if that eliminates the security.

I'll let y'all know how that works. Good to have options
 
Not right now anyway, though I think if you back up vendor and restore it, it ought to work.

Once we get a new update from Google should be able to test that theory
 
I know I tried to restore a backup because I tested compatibility of a mod with the stock ROM, backed up the vendor and vendor image, then restored both and it didn't fully restore. It would just stop part way and reboot, but never fully boot. Then I tried one or the other with the same result.
 
I know I tried to restore a backup because I tested compatibility of a mod with the stock ROM, backed up the vendor and vendor image, then restored both and it didn't fully restore. It would just stop part way and reboot, but never fully boot. Then I tried one or the other with the same result.

That's not very encouraging. I've restored backups of the current ROM without restoring vendor many times without any problems.

Beside the pin & fingerprints apparently being save in the vendor partition, I'm not certain that much else is.
So far the only issue I've had is trying to restore an older OS version. I'm guessing it's because the update changed something in the Vendor partition. I bet if I had flashed the correct vendor.img for that version it would have worked, just removed the previously defined security. That's my theory at the moment...

I have backups of 2 "M" roms at the moment. So I'll attempt to restore the other one, without restoring "vendor" and see what happens.
 
Yeah, let us know, I couldn't figure out what I did wrong (obviously something though).
 
Well - Here are the results. Mostly bad I'm afraid.

Backup a ROM, Restore that same ROM works., (Fingerprint & Lockscreen pin work)

Any attempt to restore a different ROM that had a pinlock or gesture for lockscreen security, whether or not you back up and restore vendor (not Vendor.img) fails. It restores, the rom, but the pinlock is not restored.

I then tried flashing vendor.img using fastboot & that failed as well. TWRP is missing something either when it backs up or restores.

I did find a way into the restored ROM without having to start from scratch. I did a factory data reset in TWRP & I got in but ya get the pleasure of setting everything up all over again.

My best guess is that removing security before the backup, will only work if the phone has no security when you go to restore.
I bet an un-secured backup restored over a secured phone results in the same bad result. Pin unlock will fail.

The last thing I'm going to try is to backup the vendor.img instead of vendor. Not all that hopeful, but want to exhaust all the possibilities.

That's the news... now to go set my phone up ... Again.
 
No Joy! - Backing up vendor.img and restoring vendor.img failed as well.
Only way to get back into a restore of a different ROM than the one that was currently installed is a Factory Data Reset in TWRP after the restore.

Not really all that usefull, though it does eliminate a step or two as compared to just flashing a ROM.

Back to setting up my phone again... sheesh, so much fun here on the "Bleeding Edge"
 
So you tried taking security off the phone before backing up and you still couldn't restore? I'm sticking with the stock ROM for now and just trying out kernels.

Sent from my Nexus 6P
 
Back
Top