Nexus 5 gives Status 7 error when flashing 5.1 OTA I've been trying all day to install 5.1 OTA via ADB. In my struggle, I tried installing TWRP to try to get it to work, but it didn't. I since flashed the stock recovery.

When trying to flash via ADB, this is my output log:

Finding update package...
Opening update package...
Verifying update package...
Installing update...
Verifying current system...
"System/bin/install-recovery.sh" has unexpected contents.
E:Error in /sideload/package.zip
(Status 7)

Installation aborted.
Your clue is in the output log:


  "System/bin/install-recovery.sh" has unexpected contents.


Since Android 5, OTA installs verify each partition as a whole so any changes will result in verification failing even if the file is not changed by the update. Something has changed the install-recovery.sh file, so you will need to revert the change or copy the original file back from a backup.