[Nexus 5 Original Android Development] aliv:
Okay, so here is my experience so far. I had Nexus 5 32GB with Android 6.0.1. Sluggish hot old phone with almost dead battery.

Decided to do something with it. I did some research and experiments and here is the final easy to repeat scenario.

Surprisingly, the whole experience going from Android 6.0.1 to Lineage OS 16 took just about 4 hours (taking into account I was not familiar with TWRP, etc.).

So once you backup your data, the whole process actually takes about an hour in a relaxed mode.

It is not difficult at all!

But I still have to make this standard warning: please proceed at your own risk, I am not responsible for any harm or damage that you suffer as a result.

In a few words:

1. Unlocked Android debugging.

2. Made backup of Contacts, Messages, Photos, and all other files from internal memory (copy ALL files that you need, since memory will be COMPLETELLY ERASED).

3. Flashed 1GB TWRP 3.3.1 into recovery. Good example is on this video.

4. Made backup of EFS. The whole re-partitioning story is well descirbed here. Just follow that guide exactly!

5. Re-partitioned system partition from 1GB to 1.5GB for Lineage OS 16 to fit with Gapps Pico (If you skip this step, you will be able to flash Lineage OS 16, but Gapps will not fit with Error 70).

6. Flashed 1.5GB TWRP 3.2.3 into recovery.

7. Flashed Lineage OS 16 with Gapps Pico.

8. Results: I am happy owner of fast cold phone that "does what I want" with only those apps installed that I need.

9. Every app from Google Play store that I installed - works great!

10. The only reported issue is with bluetooth call audio distortion, but I am not using bluetooth at all, so this does not bother me.

Below are some more details on my scenario.

The whole process of flashing recovery and Lineage OS itself is similar to this video.

The only difference is that you need to re-partition you system partition, otherwise Gapps will not fit.

First time I just played with Lineage OS 16 without Gapps following above video.

Then, finally, I came to this whole scenario with re-partitioning to get Nexus 5 with Lineage OS 16 and all apps I need from Google Play.

1. Download SDK Platform Tools from here

Unzip it to platform-tools_r29.0.1-windows. You will use adb.exe and fastboot.exe from it.

2. On Nexus 5: turn on "Android debugging" (google how).

3. Connect Nexus 5 with USB cable.

4. Download latest Google USB Driver from here

5. On Windows: open Device Manager, find your Android phone with yellow triangle, select update driver and manually point to folder with above Google USB driver extracted.

As a result, you should get Android Device section with Android Composite ADB Interface in it without any errors.

6. Open Command Prompt (Run as Administrator).

Change path to your Platform Tools folder platform-tools_r29.0.1-windows like "cd C:\dist\nexus\platform-tools_r29.0.1-windows".

Run "adb devices".

You should get something like this: 12e2e1b8c03401b0 device

8. Run "adb reboot bootloader".

Phone should restart into the bootloader screen with greed android image and text.

The first text row should say "FASTBOOT MODE". Check if last row says "LOCK STATE - unlocked".

I already had mine unlocked (did it long time ago).

9. Run "fastboot devices".

You should get something like 12e2e1b8c03401b0 fastboot.

If you are not getting this, check if you properly installed drivers (step 5 and 6).

10. If you had your phone in a LOCKED state, run "fastboot oem unlock" (or google how).

11. Download twrp-3.3.1-0-hammerhead.img from here

12. While Nexus 5 is in Bootloader mode (green android laying with cover open).

In cmd.exe run "fastboot flash recovery twrp-3.3.1-0-hammerhead.img".

After it will finish on Nexus 5 with volume buttons, select "Recovery mode" and press Power button.

14. TWRP will boot.

15. First, backup EFS and other things. It is very important step! Don't skip it.

In TWRP goto Backup, select all checkboxes, select storage and swipe to backup.

Wait until this process finished.

With Windows explorer, open Nexus 5 storage, goto /TWRP/BACKUPS/ and copy the whole folder to somewhere on your Windows local storage.

16. Download h_clamor_repartition.zip from here

17. Copy "h_clamor_repartition.zip" to your Nexus 5 just with copy in Windows (to Internal shared storage of Nexus 5).

18. In TWRP press Wipe and slide to Wipe.

19. In TWRP press Install, scroll down and select "h_clamor_repartition.zip" and slide to flash.

20. In TWRP -> Advanced -> Terminal and type word that pack will tell you.

Everything else will be done automatically.

In my case, I typed "modify".

21. Now you need to re-flash 1.5GB version TWRP as you re-partitioned your system partition.

Download twrp-3.2.3-1_UA-hh.img from here

22. In cmd.exe run "adb reboot bootloader"

23. Once Nexus 5 is in Bootloader mode run in cmd.exe "fastboot flash recovery twrp-3.2.3-1_UA-hh.img".

After it will finish on Nexus 5 with volume buttons select "Recovery mode" and press Power button.

So now you are in TWRP and uou're almost done!

24. Finally, download LineageOS 16.0 for Nexus 5 from this topic from here

Download Gapps Pico from here selecting ARM, 9.0 and pico.

Copy both files to Nexus 5 with Windows copy.

25. In TWRP, press Install and select lineage-16.0-20190427-UNOFFICIAL-hammerhead.zip, then click select another and select open_gapps-arm-9.0-pico-20190611.zip.

Slide to flash.

Wait until it will finish and press Reboot.

26. Phone will now reboot into your new Android Pie 9.0 in form of Lineage OS 16 for your Nexus 5!

That's it.

---------- Post added at 04:17 PM ---------- Previous post was at 03:57 PM ----------

Thank you very much for your comments. As well as I would like to thank you all guys on this forum for making such a good and well described posts for how to do different things.

I decided to re-partition system partition on my Nexus 5, since I am anyway not using whole 29 or so GB of space.

I also think, that more space in system partition is better for the system itself.

I am so excited with the Nexus 5 I've got as a result, so I decided to describe every step that I did in the above post for your guys to repeat it.

Believe me - it really makes sense. And it is not difficult at all (don't forget to save you Contacts, Messages, Photos, etc.)

I've got really fast, cold (not hot!) phone without that ton of a garbage of "standard" apps it was having.

And that is based on LATEST Android Pie!!! That is a dream!

The overall experience with Lineage OS 16 and Gapps Pico is so much better than with Android 6.0.1.

The phone is mush faster and not sluggish at all.

Hope my post will help you to get a little portion of your personal happiness ))