yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Original Android Development] SirRGB:
Have you formatted data? If that does not work consider to first unbrick using the official google packages and then reflashing los18.1.
[Nexus 5 Original Android Development] Ichir0:
Format the Data in TWRP.

TWRP→Wipe→Advanced Wipe→Check Data→Repair or Change File System→ Change File System→ Ext4

After that, reboot TWRP and Wipe→Wipe to Factory Reset.

If there is no hardware problem, the Data partition should now be back to normal.
[Nexus 5 Original Android Development] Bouquins:
Thank you again ! I did what you mentioned, then when installing LOS from USB OTG cable (unable to see my N5 on my computer), error says, at the end of the install, just after "Updating partition details": Failed to mount '/Data' (Invalid argument) , and Failed to mount '/Cache' (Invalid argument)...
[Nexus 5 Original Android Development] Ichir0:
umm...

I do not know if TWRP currently supports installation via USB OTG.

So the easiest solution is to use the hh_repart -r command as @SirRGB mentioned, to reset the partition table and flash the factory image.

Do not forget to format the corrupted data and cache partitions before running the hh_repart -r command.

Then follow the @z3DD3r and LOS guides.

You can also try adb sideload instead of USB OTG.

What is ADB Sideload and how can I use it?

What is ADB sideload?ADB sideload is a new feature that was added to AOSP recovery in Jelly Bean. As of version 2.3, TWRP now supports ADB sideload mode. A...

twrp.me
[Nexus 5 Original Android Development] Bouquins:
I'm stuck, because whatever I do, it's impossible to mount any partition.
[Nexus 5 Original Android Development] Ichir0:
Are you saying that TWRP's Advanced Wipe and Change File System do not work at all?

If so, try the Fastboot command.

In Bootloader

fastboot erase userdata

fastboot format userdata

fastboot erase cache

fastboot format cache

After that, start TWRP and make sure that each partition is mounted and Advanced Wipe is working.
[Nexus 5 Original Android Development] Bouquins:
Thank you again; I've done what you mentioned:

fastboot erase userdata
fastboot format userdata
fastboot erase cache
fastboot format cache

How do I make sure that each partition is mounted ?

Again, thank you very much for helping me from the beginning of my post; much appreciated !
[Nexus 5 Original Android Development] Ichir0:
Don't worry about it.

To check if it is mounted

TWRP→Mount

If you can check each box, you are good to go.

Also,

Run TRWP→Wipe→Factory Reset and also check if the process completes successfully.

If both are fine, the partition has been fixed.

You can use ADB sideload to install LOS18.1, or run hh_repart -r and then flash the factory image from Bootloader.
[Nexus 5 Original Android Development] Bouquins:
I can check System, Persist and Firmware.

I can not check Data, Cache and USB OTG.
[Nexus 5 Original Android Development] Ichir0:
Did the Fastboot command not complete successfully?

If that's the case

There may be some problem with the partition table, or the hardware may be dead.

Just to be sure

TWRP→Wipe→Advanced Wipe→Check Data(cache)→Repair or Change File System→Change File System→ fat

and let us know the results.
[Nexus 5 Original Android Development] Bouquins:
The Fastboot command did complete without issue.

TWRP→Wipe→Advanced Wipe→Check Data(cache)→Repair or Change File System→Change File System→ fat

Results in: failed to mount /cache, Invalid argument

HEY ! I just check; now I'm able to copy the LOS zip into the phone ! I've copied LOS zip and Gapps zip into the phone; I'm trying to install LOS and Gapps.

EDIT 2 at the end of the LOS install process, I have:

Updating partitions details: unabled to mount '/cache' (Invalid argument)

..done

EDIT 3 by using hh_repart -m (and not hh_repart -r), LOS installed without warning message; installing now Gapps.

EDIT 4 when the phones reboot, it asks me some password...1st time I see this thing ! Since I haven't one, the phone was unable to decrypt; so it offers me the only solution: factory data reset, which I'm doing now.

EDIT 5 LOS is starting flawlessly, BUT asking me some password, which I don't have !

EDIT 7 pw is "default_password"; but the phone stills ask for factory reset. I formatted data from TWRP, waiting now for LOS to reboot.

EDIT 8 THE PHONE STARTED! Believe it or not ! I think this goddamn phone was cursed ^^

Again, a very big THANK YOU for helping me sole this ! Have a very good day, my friend !
[Nexus 5 Original Android Development] Ichir0:
I'm glad to hear that the problem has been resolved.

Enjoy your Nexus 5.

Have a nice day!
[Nexus 5 Original Android Development] Bouquins:
Just a very little issue: when I connect the phone to the computer, this one can't see the phone as a mass storage. Not a big issue.
[Nexus 5 Original Android Development] Bouquins:
Just an issue: I'm unable to install whatever or copy whatever; the phone says "not enough space"...
[Nexus 5 Original Android Development] Bouquins:
Little issue: not enough space on the phone to install whatever.
[Nexus 5 Original Android Development] Bouquins:
Sorry for triple post; it bugged.
[Nexus 5 Original Android Development] Ichir0:
I don't remember exactly, but I've encountered similar problems in the past.

Wipe→advanced wipe

to wipe System, data, Internal Storage, Cache and one by one.

Also, be sure to check that the system, data, and cache are Ext4. All three must be Ext4.

The file system is

Wipe→Advanced Wipe→Check Data(system,cache)→Repair or Change File System

you can check it at.

Then reboot TWRP and re-flash LOS18.1. That should fix it.

Just to be safe.

Since this is a developer's thread, polluting it with Q & A is probably not desirable.

If the above does not solve the problem, please consider moving it to a dedicated thread.
[Nexus 5 Original Android Development] Bouquins:
Indeed, sorry. If the moderator wants to move all my intervention, please do it ! Thanks again for all.
[Nexus 5 Original Android Development] TomiLynch:
It's so nice seeing people like @Ichir0 trying their best to help others.

@Bouquins , I know you said thank you many times already, but it's also nice to hit that thanks button (now changed to Like) for someone that has helped you. Doesn't really change anything, but it's a nice gesture.
[Nexus 5 Original Android Development] apelly:
I'm curious how much effort this was. I have a 5x I wouldn't mind having a crack at building lineage for, but if we're talking weeks of effort, I won't bother starting.
[Nexus 5 Original Android Development] Crrrr:
Well, continuing a project already existent may take less time, I think ...
[Nexus 5 Original Android Development] Bouquins:
Done; thanks for having me noticed that !
[Nexus 5 Original Android Development] rockrl:
So, I've flashed new TWRP, did repartition thing, installed rom and gapps, got error on gapps, play store is installed and working tho, but I didn't get cell signal/sim working, so I guess I have to update the BL and Radio thing, now I've updated from "M8974A-2.0.50.2.29" to the latest radio, and still doesn't work, maybe my sim slot is fukt, also, is it possible to tweak kernel for more performance? It sucks having basic UI lag, although so far batterylife seems great, I would be willing to trade some.
[Nexus 5 Original Android Development] Sir Charles82:
Thanks for the update for July, but why is the project discontinued?

Does z3DD3r have no more time to support it?
[Nexus 5 Original Android Development] SirRGB:
He doesnt own Nexus 5 and has no more motivation...understandable ig
[Nexus 5 Original Android Development] z3DD3r:
Hello

Some of you already saw that new build was released. The reason for new build is a bug in gps reported by one of my testers. And it so happened that the bug fix coincided with the release of the new security patch. It doesn't mean that i will continue to support N5 in the future...
[Nexus 5 Original Android Development] Sir Charles82:
@z3DD3r : thanks for clearing things up and thank you for a final build with fixed bugs.

and last but not least: thank you for all the work getting LOS to the N5 :)
[Nexus 5 Original Android Development] amosstevens:
@z3DD3r : what about the build of july 21, what are the changes ?
[Nexus 5 Original Android Development] z3DD3r:
@amosstevens, this build includes additional fix for gps. In previous build gps wasn’t fully fixed, so i’ve made new build and removed previous one.
[Nexus 5 Original Android Development] alevoski:
Hi,

I have just registered to say thanks !

All seams to work very well with the last build (lineage-18.1-20210721-UNOFFICIAL-hammerhead-signed.zip; md5 a4726f7e62c4094d9426e2ddad9fa8bb) and the suggested gapps (open_gapps-arm-11.0-pico-20210724.zip; md5 6e59c71fbe745f21e6644b833a55b5cf).

The encryption works too and it didn't need any special thing (I just encrypted it then the phone has reboot then tada !)

Regards

Al
[Nexus 5 Original Android Development] R0mp1p:
Hey,

thanks for the great ROM. It took me a while to install, however as far as I experiance it's working fine now except WiFi. The phone won't conntect when using WPA2+WPA3 encryption only under WPA+WPA2. Is the fix to that mentioned in post #3 "Patches"? I downloaded the zip file from Github, however when installing via TWRP it gives me an error (invalid zip file). Any advice?

Thanks
[Nexus 5 Original Android Development] z3DD3r:
Hey,

These patches useful for users who want to build the ROM from source code. They are already included in my builds. Our device always have issues with WPA3 cos of old WiFi hardware and firmware. U need to reconfigure your router. Search in the thread for possible solutions. I can release a new build with some changes for coexistence of WPA2 with WPA3 but chances that this will solve your problem is low…
[Nexus 5 Original Android Development] R0mp1p:
Thanks for your reply. I would give a try with a new release.
[Nexus 5 Original Android Development] z3DD3r:
New build is out.

Short change log:

August security patch.

Some fixes for device overlays.

Tweaks for CPU governor and I/O scheduler.

Disabled ZRAM to improve performance. (Can be enabled with root access)

@R0mp1p,

Try this new build with your router setup and report back please if it works.
[Nexus 5 Original Android Development] bemanet:
The New Version works with WLAN PMF...
[Nexus 5 Original Android Development] z3DD3r:
@bemanet ,

Good news! But, well, it is not so simple. Seems that it works because PMF is only enabled but not enforced on your WLAN. Our device is not PMF compatible (this was added since Android 10 with LOS 17.1). Everything started to work because of changes in overlays which wasn't applied fully correct in previous builds... Anyway it is better then nothing :)
[Nexus 5 Original Android Development] bemanet:
Yes, that's clear so far. But before that, the WLAN on the Nexus5 did not work at all when PMF was switched on. So now it's a positive step forward 😀
[Nexus 5 Original Android Development] R0mp1p:
Wifi works for me with the new release, thanks.
[Nexus 5 Original Android Development] aa84:
New lineage-18.1-20210813-UNOFFICIAL is laggy on my device - Im getting ANRs, and the screen is jittery. Im waiting ~20min after boot for the os to finish booting completely. Switching to ondemand governor seems to have fixed it though.
[Nexus 5 Original Android Development] R0mp1p:
lineage-18.1-20210813-UNOFFICIAL running smoothly on my N5.

Dumb question: can I edit anywhere my phone number as it is evidenced as "unknown".

Furthermore I was wondering if root works for this Rom. Tried SuperSu however did not work for me.

Thanks.
[Nexus 5 Original Android Development] z3DD3r:
Have u installed it on top of previous build or from scratch, i.e. with wiping all partitions?

Use Magisk for root.
[Nexus 5 Original Android Development] R0mp1p:
Works like charme, thanks!

Any advice how to edit my phone number as it is evidenced as "unknown".
[Nexus 5 Original Android Development] aa84:
On top of lineage-18.1-20210721, updated gapps, and just wiping dalvik cache/cache. I just did a /data backup, system/data wipe, install rom/gapps, data restore and now ANRs/jitters are gone! Thanks!
[Nexus 5 Original Android Development] jollfye:
Hello, how can I enable ZRAM back (magisk root)? Since I installed this build (on top of 0721) I have these freezes/jitters which were not there previously, well at least this much.
[Nexus 5 Original Android Development] z3DD3r:
ZRAM can not be the reason of your freezes/jitters. Moreover ZRAM uses compression which loads CPU. Most likely your freezes/jitters happened after dirty flash. Read post by @aa84. Freezes are gone after a clean flash and restoring data.
[Nexus 5 Original Android Development] jollfye:
Thanks for clarification. So the order is like this or there's more?

1. backup everything (just in case)

2. system/data wipe

3. install rom/gapps (I installed nano previously/currently, long ago, so nano this time too? + do I need to install magisk zip here, after gapps?)

4. restore data (or magisk zip should be here, after data restore?)

5. wipe dalvik cache/cache (do I need this step?)

Will I have to reinstall all the apps and settings after that "clean flash and restoring data"?

Will appreciate a little guidance. Thank you.

Update:

Had some time, here's what I tried, to no avail tho.

1. system wipe

2. install rom (august)/gapps (latest nano)/magisk 23 zip

3. cache/dalvik wipe -> reboot

All apps n settings r in place but freezes r there too... And I just don't understand the need to backup data, wipe it, install rom and restore the same backed up data back, like why bother even touching data (to keep it)? And why reinstalling system didn't help :(

Update 2:

So after several restarts, when device fully started (after smth like 10 mins, so that all apps and stuff is started), it works ok, rather smoothly, just with some micro-freezes. But if u open chrome on some heavy page, then home button to open YouTube from apps list, some time later YouTube starts to lag and freeze like helll, like can't open a video for a minute etc.. that was not the case before, on 0721 😔

Update 3:

After another reboot and some wait after, it kinda stabilized, no more super freezes but micro ones r still here n there, which I guess could be acceptable.

Update 4:

Well, on some usual load like chrome -> home button, google news -> article -> some url in there, then some more in it -> open original article in chrome, etc.. it just froze, like for a minute, chrome was asking close or wait, system UI - same, several times all that.. then when stuff was swiped up in trebuchet recents -> back to smoothness again, seems like low ram situation, tho in developer options -> memory usage it showed 1.4 out of 1.9 GB was used in last 3 hours... same scenario was ok on 0721.. I'll try enabling ZRAM back later, but I'm not sure as u say it's probably not the cause..
[Nexus 5 Original Android Development] Ichir0:
Hello.

As @z3DD3r stated, I don't think it's a ZRAM problem, but if you still want to try it

You can enable it with KernelAdiutor, etc.

KernelAdiutor→VirtualMemory→swappiness (previous default was 60) and Disksize (previous default was 510MB)

Releases · Grarak/KernelAdiutor

An application which manages kernel parameters. Contribute to Grarak/KernelAdiutor development by creating an account on GitHub.

github.com
[Nexus 5 Original Android Development] z3DD3r:
@jollfye,

As i already said, ZRAM can not be your problem. But I/O scheduler can be. Try to change it from bfq to noop and set read_ahead_kb to 128. You can use any kernel manager like EX Kernel Manager or KernelAuditor to do this.
[Nexus 5 Original Android Development] jollfye:
Thank you, that helped some, I used SmartPack-Kernel Manager (changed bfq to noop, read_ahead_kb from 256 to 128). The device is not that smooth but at least there's less of these horrible long freezes, tho they're not gone completely. Also while using Kernel Manager I noticed that when CPU temperature is around 60°, there's no long freezes, but when it was around 70°, that's when it becomes unusable, it's kinda hot weather now at where I am.. but at the same time I don't remember temperature around affect much device's performance before, on 0721.
[Nexus 5 Original Android Development] z3DD3r:
@jollfye,

Remove changes you made in Kernel Manager and try new build (lineage-18.1-20210818-UNOFFICIAL-hammerhead-signed)
[Nexus 5 Original Android Development] jollfye:
Just dirty flashed the latest rom zip and yep, it works! No more unbearable, long freezes under the usual load I described, micro-freezes are still here, but it's ok, they were on 0721 and before too, considering how old is our device. Thank you!
[Nexus 5 Original Android Development] kanzy:
hi@all!..

i install lineage-18.1-20210818 on previous release and i think all is good, but i don't see any option to transfer files from pc via usb...

thx for attention
[Nexus 5 Original Android Development] z3DD3r:
@kanzy,

I never saw problems with file transfer from pc. At least on latest versions of windows 10. Anyway here is how it worked for me:

1. Disable 'USB Debugging' in Developer options on your Nexus 5 if enabled

2. Connect your Nexus 5 to PC

3. Go to Settings -> Connected devices -> USB

4. Change 'No data transfer' to 'File Transfer'

5. Look for Nexus 5 inside of windows explorer
[Nexus 5 Original Android Development] geokilla:
How do I flash this ROM? I tried flashing in TWRP but Gapps didn't install. Seems like the /vendor partition didn't get created after flashing the repartition zip.

I'm currently on the stock Google image but it doesn't boot up. It's stuck on the splash screen.
[Nexus 5 Original Android Development] z3DD3r:
@geokilla,

Read the second post of this thread. Nexus 5 doesn’t have and doesn’t need vendor partition. The only requirement for gapps is increased /system partition.
[Nexus 5 Original Android Development] kanzy:
@z3DD3r​

thx for the quickly answer and for the very good work.

i use debian.

with other devices (ampli, dac) otg work well, but i don't see the usb menu file transfer (scrolling the status bar or in 'connected devices') and when i plug in the usb cable nothing appear on phone/fileman pc.

i made a dirty flash, but i think it doesn't matter about this thing.

edit: sorry... broken cable
[Nexus 5 Original Android Development] geokilla:
I must be doing the repartition or ROM install wrong. Got bootloops so I'm back on stock.

Edit: Tried again and got the repartition working and Lineage flashed.
[Nexus 5 Original Android Development] R0mp1p:
what did you change in the latest build lineage-18.1-20210821-UNOFFICIAL-hammerhead-signed.zip?
[Nexus 5 Original Android Development] mandayugana:
I'm unable to view photos taken by stock camera app on 0818 build. Photo previews are shown, but can't view full photo. Same behavior with other image viewer apps.

Using Google Camera all photos are saved correctly. Gallery is able to show preview and full photo.

Edit: I took some photos on July 20th with stock camera and all photos are good.
[Nexus 5 Original Android Development] z3DD3r:
@R0mp1p, @mandayugana,

New build includes Fix for snap camera, some additional changes in kernel and changes in power profiles inside of battery settings. Now the ‘Quick’ profile sets all 4 cores online with minimal frequency at 300Mhz. Something similar to setup in franco kernel.
[Nexus 5 Original Android Development] R0mp1p:
same here with the latest build
[Nexus 5 Original Android Development] z3DD3r:
You will not be able to view old photos taken with Snap because of incorrect EXIF metadata. But unfortunately the fix i’ve included doesn’t work. Discussion is here:

Direct image upload/share does not work since upgrade to 18.1 (#3367) · Issues · LineageOS / issues / android · GitLab

Expected Behavior sharing the image to any messenger app. image is uploaded and showed in the application as image

gitlab.com

For now u can use other camera app. For example Google Camera 3.2.045
[Nexus 5 Original Android Development] R0mp1p:
ok, thanks! And thanks for all your efforts and wors!
[Nexus 5 Original Android Development] z3DD3r:
@AtumTTG,

I've updated third post with patches for keyboard. Regardless the size i can't tell you anything. Maybe something wrong on your side or something changed in LOS source code...
[Nexus 5 Original Android Development] abcdef121448:
Thank you very much for supporting this 8 year old phone with a recent OS for so long. Unfortunately my phone bootlooped after the 2nd latest updated so I had to completely reflash the ROM. I am having the same camera errors as the other ones but you gave a fix for that already. I have another problem though: Since the two most recent updates my phone is very slow overall and I am having big stability problems. When opening apps they usually freeze for a few seconds, then i get an "app is not responding" message and if I click on wait I can kinda use this app. The phone is barely usable this wayand I´d be very happy if you could help me troubleshoot. I installed your custom recovery and did a completely clean flash of the OS.
[Nexus 5 Original Android Development] z3DD3r:
@abcdef121448

Did i understand correctly that there was no such problem on build from July?
[Nexus 5 Original Android Development] abcdef121448:
@z3DD3r Yes that is correct. The last build I was running on was I believe May or maybe July. At first i did a dirty update which always worked the past few times but shot it this time so I wiped everything and flashed the latest update via ADB Sideload. I was already thinking about reverting back to the older version.
[Nexus 5 Original Android Development] z3DD3r:
Do not revert please. I’ll post a flashable zip with tweaked governor for you in an hour. I think this will solve your problems

Btw, do you use any mods or tweaks?
[Nexus 5 Original Android Development] z3DD3r:
@abcdef121448,

Unfortunately i can't provide a flashable zip for you today. Have a lot of tasks at work :(

Let me know if you can wait a bit for a fix.
[Nexus 5 Original Android Development] abcdef121448:
Not using any mods or tweaks, just your ROM completely stock.

Btw do you have a paypal? I would like to give something back for keeping 8 year old phones running with the latest version of Android.
[Nexus 5 Original Android Development] abcdef121448:
@z3DD3r yeah, don´t worry I have been living with my phone being like that for more than a week now. I will be able to wait another day.
[Nexus 5 Original Android Development] z3DD3r:
Good. I've built a kernel for tests. Flash it with TWRP. This kernel can be used only with lineage-18.1-20210821-UNOFFICIAL-hammerhead-signed build. Test it for day or two and let me know if it helped.

Thanks, but i don't accept any donations :)
[Nexus 5 Original Android Development] abcdef121448:
@z3DD3r Thank you so much for the updated kernel! Will try it right away! :)

Another very annoying bug that I have: Something seems to be wrong with permissions. I have an app for mapping plants and it needs GPS for mapping my observations (ObsMapp). And for some reason it doesn´t get GPS signal. The phone receives GPS signal because if I try with GPS status i get a signal right away but something seems wrong with that app. Before the update everything worked well. I can also take photos with the camera app and have the location stored in EXIF but that´s really complicated, especially because it doesn´t always take the corrupted files that the camera app produces.

Thank you so much for your help.

Here is a Screenshot to better illustrate it:
[Nexus 5 Original Android Development] lucifer3984:
Can we Still Install kitkat os?
[Nexus 5 Original Android Development] z3DD3r:
@abcdef121448,

Well, nothing changed in GPS in last build from my side. Maybe something is broken after august security patch but i can’t test it. Bug with camera is known. Related to Snap and there is no fix right now. The only way is to use Google Camera. Version 3.2.045 works without issues.

@lucifer,

Yes we can. Download kitkat factory image and flash it with fastboot
[Nexus 5 Original Android Development] z3DD3r:
@abcdef121448,

Hey! Have you tried the kernel i've posted?