OTA Update Error - "Package expects build fingerprint of ..." I unrooted and re-installed stock recovery from CWM on my Nvidia Shield Tablet. But when I tried to install an OTA, I got However when I tried to install the update, I got a red triangle error. After checking the log I got an error saying "Package expects build fingerprint of ... or ..., this device has ...."

I can't remember what the fingerprints were, but the first one was something that began with "nvidia/", had a bunch of numbers in the middle followed by an underscore, then it ended with "/release-keys".

However the device's current build fingerprint was exactly the same as the first, except that it cut off halfway through, right after the numbers and the underscore.

Resetting the cache didn't work. How was this error caused, and how can I fix this without wiping my data?
I've faced the same issue when trying to update OTA from Android 4.4.4 to Android 5.1 and now from Android 5.1 to a new version.

I'm assuming your phone is rooted and you have a custom recovery installed. 

1. Find out your build fingerprint.


Install CID Getter and check the ro.build.fingerprint entry. 


  (In my case, its value is motorola/peregrine_retbr/peregrine:5.1/LPB23.13-35.5/5:user/release-keys) 



Check your value again.

Double-check it, and triple-check it, it's very, very, VERY important to get it right to the last bit.

2. Obtain the zip file for your OTA update

Start the OTA update process (settings -> phone -> check updates). It will download a file and place it on your internal memory, for instance for me it's /cache/Blur&lt;long file name&gt;.zip.

Obtain that file and place it on your computer (I have used my custom TeamWin recovery to do that). 

3. Check the updater script

Inside this zip file, there will be a file called /META-INF/com/google/android/updater-script.

There will be a line similar to the one below:

getprop("ro.build.fingerprint") == "motorola/peregrine_retbr/peregrine:5.1/LPB23.13-35.5/5:user/release-keys" || 
getprop("ro.build.fingerprint") == "motorola/peregrine_retbr/peregrine:5.1/LPBS23.13-35.5-1/1:user/release-keys" ||
abort("Package expects build fingerprint of motorola/peregrine_retbr/peregrine:5.1/LPB23.13-35.5/5:user/release-keys or motorola/peregrine_retbr/peregrine:5.1/LPBS23.13-35.5-1/1:user/release-keys; this device has " + getprop("ro.build.fingerprint") + ".");


What's it doing in this case? This line checks for the build fingerprint and aborts the process if it's not exactly either motorola/peregrine_retbr/peregrine:5.1/LPB23.13-35.5/5:user/release-keys or motorola/peregrine_retbr/peregrine:5.1/LPBS23.13-35.5-1/1:user/release-keys. 

4. Compare your build and the updater script.

Seriously. Check it again.

5. Edit the updater script

Delete this line. Place the edited file on the zip file. 

6. Patch and be happy!

Use your custom recovery to apply the patch without signature verification.

OBS:

If you have flashed anything that modifies system files -- including, but not limited to, SuperSU and the Xposed framework -- you might need to revert those files to their original state, since the OTA update will perform a check on many system files. In order to revert those files, consult the documentation from whatever you flashed.