[Nexus 5 Q&A, Help & Troubleshooting] earthling2019:
Hello everyone,

I have a LG Nexus 5 and I want to install Lineage OS.

I was successfully (official) TWRP and (official) Lineage OS with GAPPs installed and used and many times OTA updated in past.

Few days ago I want wipe all old datas and fresh install Lineage OS and first download latest versions of (official) TWRP and (official) Lineage OS 14.1.

I downloaded TWRP via https://eu.dl.twrp.me/hammerhead/ and Lineage OS via https://web.archive.org/web/20190223223750/https://download.lineageos.org/hammerhead

I verified hashes before use this files.

Second I pressed "Volume Down + Power" buttons but old (version) TWRP not started. Nexus 5's screen look like factory image. After this "adb reboot bootloader", "fastboot devices", "fastboot flash recovery twrp-3.3.1-0-hammerhead.img".

I powered off Nexus 5 and press "Volume Down + Power" buttons but Nexus 5's screen look like factory image even move down by using Volume Down button and selected "Recovery mode" after press power button latest TWRP started. (I don't know is this normal? Old time I pressed "Volume Down + Power" buttons, directly TWRP started.)

Third I selected "Wipe", "Format Data", "Advanced Wipe", choosed "Cache and System" and they are wiped.

Fourth I backed to main page and selected “Advanced”, “ADB Sideload” and swiped. On my computer "adb sideload lineage-14.1-20190126-nightly-hammerhead-signed.zip". Process succesfully completed. But I navigated to "Install" via main page I didn't see "lineage-14.1-20190126-nightly-hammerhead-signed.zip". My "sdcard" directory look like only within TWRP directory. Even so I turned main page and selected "Reboot", "System" swiped and after reboot Lineage OS 14.1 normally started and I was succesfully set up it.

Fifth I just wondered Lineage OS 16 on Nexus 5 and I downloaded in here (unofficial) LineageOS 16 for Nexus 5.

https://xdaforums.com/google-nexus-5/orig-development/rom-lineageos-16-0-nexus-5-t3921162

And verified hash for 20190719. (It was latest version in time I downloaded.)

Sixth start TWRP and wipe necessary locations. (Format Data, System, Cache)

Go to ADB Sideload and (on computer) "adb sideload lineage-16.0-20190719-UNOFFİCİAL-hammerhead.zip"

Terminal printed (only): "Total xfer: 0.01x"

---------------------------TWRP Screen Start--------------------------

Updating partition details...

...done

Full SELinux support is present.

MTP Enabled

Formatting Data using make_ext4fs...

You may need to reboot recovery to be able to use /

data again.

Updating partition details...

...done

Formatting System using make_ext4fs...

Formatting Cache using make_ext4fs...

Updating partition details...

...done

Starting ADB sideload feature...

Installing zip file '/sideload/package.zip'

Warning: No file_contexts

Target: google/hammerhead/hammerhead:6.0.1/M4B30Z/

3437181:user/release-keys

detected filesystem ext4 for /dev/block/bootdevice/

by-name/system

Patching system image unconditionally...

E1001: Failed to update system image.

Updater process ended with ERROR: 7

---------------------------TWRP Screen End---------------------------

Seventh I want reflash (official) Lineage OS 14.1 because of Lineage OS 16 flash failed and I wiped old installed Lineage OS 14.1 but ADB Sideload again same error. (This file before successfully transferred and installed.)

Eight I downloaded factory image (6.0.1 (M4B30Z, Dec 2016)) for Nexus 5. in here https://developers.google.com/android/images#hammerhead

It was completely installed without any error and started. I set up it. (I don't lock bootloader.)

I used "flash-all.sh".

Nineth I re-installed TWRP and retry same installation. Again fail with same error.

I tried some solutions for solve this problem but they aren't solve my problem.

1) Install different versions of TWRP. (3.3.1-0, 3.3.0-0, 3.2.1-1)

2) Delete "assert line" in "updater-script" explained this video https://www.youtube.com/watch?v=VCqROwIGLLE

3) Lineage OS file transfere to external USB drive and connect the Nexus 5 via USB OTG cable. (Error or not detect USB drive for different results depend versions of TWRP.)

4) Repair "data" partition. (Ext4 file system.)

How to solve this problem and install Lineage OS?

Note: I am using Manjaro. https://manjaro.org/

I am not a native english speaker. Sorry for my wrongs.