yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Android Development] _raydroid:
If you do not use Play Store, you can try updating Android System Webview, Trichrome Library and Google Chrome to see if that does anything. You can find all of these on APKMirror.com.
[Nexus 4 Android Development] unmesh59:
Where would I find the latest TWRP that people seem to be using? The one in the link in the OP is 3.3.1-1 UA

Thanks
[Nexus 4 Android Development] voron00:
twrp.img

drive.google.com
[Nexus 4 Android Development] unmesh59:
Thanks!

Should adb be running when in Recovery? It isn't for me and I'm having the hardest figuring out how to flash the LOS18 zip file from the OP.
[Nexus 4 Android Development] voron00:
Adb isn't required to flash zip. Flash repartition.zip then flash rom and then flash opengapps pico. If you get unsufficent system space error when flashing gapps, you need to do this: https://xdaforums.com/t/rom-unofficial-lineageos-18-1-mako.3758779/page-36#post-87356089
[Nexus 4 Android Development] unmesh59:
How do I get the files over to the N4? And I got into this mess because I used parted to borrow from the userdata partition to further extend the system partition size!
[Nexus 4 Android Development] voron00:
Ahh... Well, if you did everything correctly, you need to format system, data and cache in twrp. Reboot, and then you should be able to use MTP in recovery and copy files over.
[Nexus 4 Android Development] unmesh59:
I found Mount -> MTP but nothing shows up in Windows Explorer when I enable it. Should I be looking somewhere else?

I should mention that although I made the partition 2G, sideloading pico gapps still failed with error 70. Here is the partition table.

~ # ./parted /dev/block/mmcblk0 p
Model: MMC 008G92 (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.2MB 524kB sbl1
3 68.2MB 68.7MB 524kB sbl2
4 68.7MB 70.8MB 2097kB sbl3
5 70.8MB 71.3MB 524kB tz
6 71.3MB 94.4MB 23.1MB boot
7 94.4MB 117MB 23.1MB recovery
8 117MB 118MB 799kB m9kefs1
9 118MB 119MB 799kB m9kefs2
10 119MB 120MB 799kB m9kefs3
11 120MB 121MB 524kB rpm
12 121MB 121MB 524kB aboot
13 121MB 122MB 524kB sbl2b
14 122MB 124MB 2097kB sbl3b
15 124MB 124MB 524kB abootb
16 124MB 125MB 524kB rpmb
17 125MB 125MB 524kB tzb
18 125MB 126MB 524kB metadata
19 126MB 143MB 16.8MB misc
20 143MB 159MB 16.8MB ext4 persist
21 159MB 2159MB 2000MB ext4 system
22 2159MB 2259MB 100MB ext4 cache
23 2259MB 6190MB 3931MB ext4 userdata
24 7817MB 7818MB 524kB DDR
25 7818MB 7818MB 507kB grow
[Nexus 4 Android Development] voron00:
Table looks good. Not sure why MTP isn't working, it should. But anyway, you can go ahead with sideloading.

You need to flash rom. Then resize system partition: https://linuxhalwa.blogspot.com/2019/11/resize-file-system-from-twrp.html Then flash gapps. That should work.
[Nexus 4 Android Development] unmesh59:
It worked! I could have sworn I typed everything at adb shell that the instructions wanted me to.

Regarding MTP, same behavior with a different laptop. In both, toggling the state of MTP does cause a chime to sound.

If I hadn't taken a snapshot of the partition table before things went south, would I have been able to push parted into the phone and run it again to look at it?

Thanks
[Nexus 4 Android Development] voron00:
My guess is that data was not properly formatted, but anyway you should just boot the rom at this point and see if it works.
[Nexus 4 Android Development] XDFefo:
Hello @voron00, thanks for supporting this device to this day! Very obsolete sadly, but has a special place in my mind as my first serious "tinkerer" phone.

I can't connect my device through file transfer on Windows, is this a driver issue? I remember installing some USB drivers on an older machine. Flashing with fastboot and adb worked however.
[Nexus 4 Android Development] unmesh59:
It does work!

Thanks
[Nexus 4 Android Development] alecorje:
Thanks for this great ROM. I have two questions:

1). I have installed the ROM and gapps with such an extra file with lines: "

Exclude

GoogleTTS

FaceDetect

FaceUnlock

Speech

Search

"

I really miss FaceUnlock. I have already installed a lot of apps. can I install FaceUnlock additionally so it works? how to do it?

2). Android auto does not work. is it for all or just for me? how to fix it?
[Nexus 4 Android Development] voron00:
FaceUnlock has been removed by Google since Android 10. Only way is to downgrade to Android 9 or lower.

Idk about Android auto, maybe it doesn't support 32 bit arm anymore.
[Nexus 4 Android Development] voron00:
lineage-18.1-20230418-UNOFFICIAL-mako-signed.zip (R_asb_2023-04)

+Kernel security patches from DivestOS
[Nexus 4 Android Development] oko17:
My SIM card does not work for me. I tried to manually add the APN but it didn't help.

Is it a known problem?
[Nexus 4 Android Development] voron00:
No problems with sim/data here.
[Nexus 4 Android Development] coubzero:
Hi @voron00, thanks for all the maintenance job you done.

It seems I brought my old buddy to the second life.

Cheers!
[Nexus 4 Android Development] Ash52:
Pls give some space so that we can install gapps pico version
[Nexus 4 Android Development] voron00:
It's already as minimal setup as possible, just exclude GoogleTTS package from gapps or delete unneeded apps from system with twrp like browser, email or music.
[Nexus 4 Android Development] voron00:
Another update:

2018-03-25:
- Synced lastest LineageOS sources.
- Fixed display calibration data not restoring after screen off
- Video driver updates
- Kernel security updates
- Other minor fixes (check github).
[Nexus 4 Android Development] Ash52:
I am getting updater error 7 while installation of ROM

Error message: this ROM is for mako but this device is .
[Nexus 4 Android Development] ze7zez:
Unmount the system partition manually before installing the ROM.

Maybe it will help you.
[Nexus 4 Android Development] voron00:
Use TWRP 3.2.1-0.
[Nexus 4 Android Development] voron00:
A slightly unexpected update but because Qualcomm has released a fix against branch prediction based attacks (Meltdown) for 8064 CPUs. Also dropped some patches that were apparently causing weird wakeups from suspend.

2018-03-27:
- Synced lastest LineageOS sources.
- Merged Branch Target Injection (Meltdown) fix for Krait CPUs.
- Reverted patches that were apparently causing suspend issues.
[Nexus 4 Android Development] vedantdude:
Everytime i update the ROM, google apps(user ones, not the sytem apps) like messages,YouTube, Keep crash.

Used the gapps nano, with the suggested gapps-config.txt.

Reflashing gapps didn't help neither did clearing the app data, only way is to reinstall the apps.

Also, is there any performance degradation from the Meltdown fix?
[Nexus 4 Android Development] voron00:
Thats because google services gets removed from system when you update the rom, you need to reflash gapps before rebooting. There is no visible degradation, i haven't done any benchmark test though, proably will be slightly lower.
[Nexus 4 Android Development] taw62:
Does the rom have no addon.d support?
[Nexus 4 Android Development] voron00:
Maybe it's not implented yet, or some gapps bug.
[Nexus 4 Android Development] voron00:
There is some progress regarding hw screen recording - i got it working. But that required to switch to entire CAF media stack and porting upstream CAF video drivers aswell. The problem is that swtiching to CAF also drags in other variants of components such as bt and wifi. For now i got everything everything working, but i want to test that stuff more and maybe even do an experimental build. Also with CAF media stack, there is no longer need to cherry-pick additional commits to get the camera working, means there is way more chance that this can become official.
[Nexus 4 Android Development] chopoLet:
Awesome! :good:
[Nexus 4 Android Development] voron00:
Ok guys, you maybe noticed that it's going to be official. So here is hopefully final unofficial build, better test everything to make sure there are no issues, and if it's fine - we will enable nightlies!

2018-04-06:
- Synced lastest LineageOS sources.
- Fixed screen recording with hardware encoder and added LineageOS recorder app.
- Other minor fixes (check github).

Known bug: Wi-Fi disconnection bug may occur when turning bluetooth ON/OFF (Rare bug, i only faced it once, could be a hardware issue, also affects other roms, no known fix yet).
[Nexus 4 Android Development] n0b0dy666:
All working fine on my end, including screen recorder.
[Nexus 4 Android Development] DMax525:
How do I flash the latest update? What should I wipe? And as I presume, the gapps data gets removed, since I reflash them?
[Nexus 4 Android Development] ddaggebi:
Kudos to the developer. Managed to bring this 5 year old device to getting Official LOS 15.1

Great devs like you will make mako a new HD2(Leo). Thanks for your commitment!
[Nexus 4 Android Development] taw62:
Running the latest build for almost a day now and found no issues so far. Everything works well, including recorder. Thanks again!
[Nexus 4 Android Development] MartinX3:
Thank you very much!

Got the low system partition raised?

And I see that https://github.com/LineageOS/android_device_lge_mako/tree/lineage-15.1 got the 15.1 branch. That's awesome!

But https://github.com/LineageOS/lge-kernel-mako/tree/cm-14.1 still doesn't?

Will that change?
[Nexus 4 Android Development] oko17:
Thanks for the information. It was caused by a broken Sim Card, changed to my main, and everything works flawless
[Nexus 4 Android Development] tuxsaveus:
This excellent rom works great thank you very much for keeping our phones still alive.
[Nexus 4 Android Development] Basirk:
I just updated my Nexus 4 using these instructions for lineage-18.1-20230423. It all seemed to work fine. However, WiFi keeps connecting then disconnecting. I found this post that seems to describe something similar and mentions a problem with 5GHz, but that's from a year ago and for the Go version(?):

https://xdaforums.com/t/rom-unofficial-lineageos-18-1-mako.3758779/post-87193337

Can anyone offer any suggestions please?
[Nexus 4 Android Development] SkewedZeppelin:
hm, wifi seems fine on my unit

maybe try flashing the last release modem?

https://dl.google.com/dl/android/aosp/occam-lmy48t-factory-c43c7cfd.zip

you don't need to flash the whole stock, there is a flash-base script in it which is just firmware only
[Nexus 4 Android Development] Basirk:
Thanks for the really quick reply!

The baseband updated from 2.0.1701.05 to .07, but unfortunately this hasn't helped. If I connect wifi to a 2.4GHz only SSID then it's stable.
[Nexus 4 Android Development] SkewedZeppelin:
Maybe try changing the channel on the router if you have access to it?
[Nexus 4 Android Development] Basirk:
I know where you're coming from, but I don't think that's the issue. I have a mesh network - a single SSID for both 2.4GHz and 5GHz, available from both the router and a mesh repeater (not uncommon these days).

Just did a test: Switched off the mesh repeater leaving just the router.

This gives me a stable 2.4GHz wifi connection on the N4. I don't think the 5GHz channel used by the router is one that the N4 supports.

I don't know whether that puts the problem in the radio or the OS. Either way, I think it's unlikely to be fixed which means I probably can't use my N4 at home :(
[Nexus 4 Android Development] Basirk:
For clarity, this was using a wifi extender with a different SSID.

To summarise, if the phone can see a non-meshed SSID, I think it's happy. However, if an SSID appears on different channels in the same frequency (i.e. mesh) then the connection becomes unstable.
[Nexus 4 Android Development] skills14:
This is working spot on thanks, does anyone else have a battery drain issue on their devices?

I'm assuming its down to age and will probably end up replacing the battery

Thanks in advance
[Nexus 4 Android Development] SkewedZeppelin:
I have a few of these units and some will take a week to die, others die in a day.

And same goes even if they are off: some will turn right back on after a month, others just flash the red light over and over.

Just the joys of a 10 year old battery.
[Nexus 4 Android Development] skills14:
Ha thought so, it was only £13 on ebay and batteries are £6 so not too bad
[Nexus 4 Android Development] voron00:
lineage-18.1-20230712-UNOFFICIAL-mako-signed.zip (R_asb_2023-07)
[Nexus 4 Android Development] skills14:
Dirty flashed latest version no problem thanks for the update, I've had issues with other versions TWRP on this device with it coming up with errors so am using clockwork recovery at the moment, would you recommend flashing your version of TWRP? Thanks in advance
[Nexus 4 Android Development] Basirk:
Great that the updates keep coming - thanks!

Unfortunately, after a clean update, this hasn't resolved my mesh wifi connectivity issue :(
[Nexus 4 Android Development] ze7zez:
From reading other information, I conclude that many devices have problems with Mesh Wi-Fi, which may be related to the lack of implementation of establishing a dynamic connection through a smartphone with rapidly changing channels on for SSID.

In my opinion, this is not a LineageOS problem, but a device firmware/modem problem.

----

edit: Typo correction.
[Nexus 4 Android Development] voron00:
lineage-18.1-20240121-UNOFFICIAL-mako-signed.zip (R_asb_2024-01)

Eh, my phone is barely alive, power button is almost dead, vibration is dead, screen is malfunctioning and 11 year old battery is going crazy.
[Nexus 4 Android Development] tuxsaveus:
Thank you very ****ing much \m/
[Nexus 4 Android Development] pbgapski:
My mako also has button problems, and it seems to be a issue on these devices. I cleaned them when changing the old battery, it it has been better for some time, but still far from perfect.

Anyway, it feels alive with your builds, and I thank you for those :)
[Nexus 4 Android Development] AraldoL:
Mine is working fine, after changing the original battery about 2 years ago with a replacement from Amazon. First they sent was deeply discharged and did not charge, they sent a new one for free that worked. All after the original getting thicker and lifted the glass back about 2 mm on one side from the gluing, luckily without breaking the glass :-)

Thank you again for the new build, device is working good at home on WIFI for several apps, No mobile data, an old deactivated SIM card still in it, phone set to flight mode with WIFI on. Mobile data would not make much sense now as here 3G was switched off completely so only 2G/EDGE/GPRS would be remaining for the Nexus but WIFI is fine at home.
[Nexus 4 Android Development] ikram.senguen:
At this point i recommend FDE.AI together with this rom. Smoothened Out the device respectivly in the non-ai mode(aka Script -mode) as well as ai-mode(but with Background process Limited to 2)

Dear dev, thank you for this awesome rom! The device is not mine but my neighbour 80+ years old could Not use any Google Services on his OG OS on Android 5 let alone Open maps wirhout device dying inside and taking years

After explaning him everything, he is thanking you too

Peace
[Nexus 4 Android Development] ze7zez:
For the ease of others, it's always a good idea to point out the source.

[APP][6.0+][ROOT]FDE.AI-v24.07.2 - Powerful AIO Android devices optimizer (04.07.2024)

ROOT access is required for this app! This app automatically modifies wide range of low-level system parameters using ROOT access. By using this app you agree with EULA and any possible risks. FeraDroid Engine (FDE) - an All-in-One ultimate...

xdaforums.com
[Nexus 4 Android Development] 7wells:
Hello!

Just wanted to let you know that I managed to flash the latest version of this ROM incl. OpenGApps pico on my Nexus 4. 😊

Despite flashing and executing the repartition tool and using the custom TWRP recovery (3.3.1-1 UA), there was still a little bit of space missing. However, I only had to exclude TTS in gapps-config.txt:

exclude
googletts

Thanks to the developers who still maintain this ROM for such an old (but still rocking) phone! ❤️
[Nexus 4 Android Development] voron00:
So i guess our journey ends here because:

1. My hard drive caught fire.

2. Android 11 support has ended February 2024 (exactly 4 years after initial release).

3. Legacy devices no longer pass google play attestation.

4. Phone is very dead.

I will try to keep download for as long as possible.

Thank you and bye :)
[Nexus 4 Android Development] roomunho:
Thank You for all Your hard work and keeping ours beloved Makos alive!

Screen on mine is also dying ☹️ I'll be missing it very much! ☹️
[Nexus 4 Android Development] n0b0dy666:
https://github.com/LineageOS/android_kernel_lge_mako
[Nexus 4 Android Development] MartinX3:
Why got a new github project opened?

https://github.com/LineageOS/lge-kernel-mako -> Up to 14.1

https://github.com/LineageOS/android_kernel_lge_mako -> Only 15.1
[Nexus 4 Android Development] Mahedi Ali:
Hi frnds how can I join u
[Nexus 4 Android Development] voron00:
Because kernel was rebased, also that kernel repo had a bad name.

It be nice if you test another update guys:

2018-04-09:
- Fixed camera auto-focus.
[Nexus 4 Android Development] MartinX3:
Thank you for you reply.

But I don't understand that right, because I also work with github and can rename a repo.

And a kernel rebase can be done in another branch in the same repo. :P
[Nexus 4 Android Development] d1g174l:
Does this kernel have usb otg(with Y-cable)? It would be nice addition...
[Nexus 4 Android Development] luffyland:
Anybody noticed the longer the flashlight was used, black screen will appear then reboots ur phone?
[Nexus 4 Android Development] voron00:
Does it happens randomly or you can reproduce? Played with torch for about an hour and no problems here. Also if you can, please post output of /proc/last_kmsg (adb shell cat /proc/last_kmsg) after you get a reboot next time.
[Nexus 4 Android Development] Ash52:
I have problem with hidden Wi-Fi. It do not connect automatically I have to turn off the phone screen and turn on it then it connects
[Nexus 4 Android Development] voron00:
Update:

2018-04-15:
- Synced lastest LineageOS sources. (Latest updates freed up some system space, you can install pico gapps now without a gapps-config).
- Camera stability fixes.
- Other minor fixes (check github).

There is a bug with our TWRP, it fails to decrypt oreo-encrypted data. I don't want encrypted users unable to install updates via updater app so official builds will be delayed until this gets resolved.
[Nexus 4 Android Development] over7:
Does this version of LineageOS comes with protected apps feature aka lock for apps ? If so, where is it (I switched from other AOSP), thx
[Nexus 4 Android Development] testerac:
Hey voron00, just a quick thanks and something I've noticed is that Reset options > Erase all data (factory reset) isn't enabled in the latest build, with or without Gapps.

Thanks again so very much from a Nexus 4 user with 3 devices. I see commits are flowing on LOS Git - very exciting!

Have been following the UBports / Halium guys progress; they've made some magic with their halium-boot and Qualcomm compositer drivers etc of recent.

Exciting times.
[Nexus 4 Android Development] voron00:
Update uploaded, but nothing interesting this week, just latest sources + some latest kernel security updates.

It works now.

Edit: LiveDisplay is broken in this build, it's broken for all legacy devices currently.
[Nexus 4 Android Development] something123:
Any chance this ROM will get official status? Thanks : )
[Nexus 4 Android Development] voron00:
Fixed version uploaded, last one had livedisplay broken, it was unlucky build time.
[Nexus 4 Android Development] miuifans:
Will This ROM get on official website of LineageOS?
[Nexus 4 Android Development] voron00:
Patience. I'm doing some final tests now, they are related to battery and that's why it takes long. Hopefully 1-2 weeks and builds will be enabled.
[Nexus 4 Android Development] miuifans:
thanks! :D
[Nexus 4 Android Development] clifsjen:
Using it for more than 2 weeks, works great for mw, great development, congrats.
[Nexus 4 Android Development] colovicc:
Google Play services

Google Play services keeps stopping
[Nexus 4 Android Development] n0b0dy666:
Did you flash GApps immediately after flashing the ROM? You must flash both at the same go else you might experience all sorts of crashes.
[Nexus 4 Android Development] colovicc:
Thank you very much! It worked!
[Nexus 4 Android Development] scapeBlood:
Is it possible to root? Because every time I try to root, I'm stuck with boot loop
[Nexus 4 Android Development] :
Magisk will get root, try flashing magisk v16.0 after the first boot, worked for me anyway.
[Nexus 4 Android Development] Holzhacker:
Now the Nexus 4 was officially promoted to 15.1! :good:

Many thanks to all people making this possible, especially to voron00!

Did you mean with "our" TWRP the one (for f2fs support) you put on your gdrive or the official 3.2.1.0?
[Nexus 4 Android Development] voron00:
This happens with official and unofficial. Also it affects other devices for example Nexus 6, they also can't decrypt data if it was encrypted with oreo. We are sort of less-affected because we don't encrypt by default. Nobody has fixed that yet unfortunately. But if /data was encrypted on nougat and then upgraded to 15.1, decryption in TWRP works. Also if you are encrypted in oreo, you can just mount /cache in TWRP and adb push update.zip to /cache and install. A TWRP fix may take literally forever so i don't think we should wait any longer and if nothing bad will happen, official builds will start next week. Also final unofficial build uploaded, it would be nice if you help me test everything before first official nightly starts.
[Nexus 4 Android Development] clifsjen:
Hi voron00, do you think you could provide alternative download host that is easy to use with wget and curl, could be androidfilehost, thanks
[Nexus 4 Android Development] Holzhacker:
Thanks for clarification. My data partition is already encrypted (in LOS 14.1).

If I upgrade to 15.1, it's recommended to wipe the data partition. Wouldn't this remove the encryption?

I tried to google for that but couldn't find an answer.
[Nexus 4 Android Development] n0b0dy666:
Wiping won't remove the encryption, you have to select format data in TWRP. Obviously enough, this will clear all your data so make sure to make backups.
[Nexus 4 Android Development] taw62:
Working with the latest build for some days and everything seems to be fine. Now, I'm looking forward to the official release! Thanks again to voron00 and all the others, who made that possible!

Just one question: since the unofficial builds are alreaday signed with release-keys, it should be possible to install the official ones without wiping /data, right?
[Nexus 4 Android Development] voron00:
Unfortunately not, i've generated my own keys and lineage has their own keys obviously.
[Nexus 4 Android Development] orangek3nny:
[MENTION=3772648]voron00[/MENTION]:

My Nexus 4 has a rare bug when the phone loses reception and probably has issues interfacing with the SIM. With LOS 14.1 I was prompted for the PIN approx. each minute until it found a network again - if a PIN was set. With 15.1 the bug causes reboots after failing to initialize the network and the phone becomes unusable.

To get it operational again, I was able to access quick settings before entering a PIN - an issue since this shouldn't and doesn't work in 14.1 - and turned on airplane mode.

Error messages before the reboot included "getIccId: ICC ID is null or empty" and "qcril_qmi_coex_terminate_riva_thread". I don't have a full log though.
[Nexus 4 Android Development] w-flo:
voron00, good job, thank you! There's now a 15.1 zip on LOS download servers. I just updated TWRP to give this a try.

But I noticed the download is only 89.44 MB on LOS servers. This is unexpected, I guess something is missing from the build?

Edit: Oh, nvm, I refreshed the page and now the file size looks OK. I guess the build servers were in the process of moving over that file to the download server when I checked the first time.

Edit 2: Yep, works great so far! :) Awesome!