{{note|Currently the device is booting into a black screen, see {{issue|209|pmaports}}. Help with resolving this is welcome. Please remove this note when the issue has been fixed.}}
{{Infobox device
| manufacturer = Google (LG)
| name = Nexus 4
| codename = lg-mako
| image = File:LG Nexus 4 Weston.png
| imagecaption = LG Nexus 4 running Weston
| display = 768x1280 IPS
| memory = 2 GB
| architecture = armv7
| status_usbnet = Y
| status_flashing = Y
| status_touch = Y
| status_screen = N
| status_wifi =
| status_xwayland =
| status_fde = Y
| status_mainline =
| status_battery = Y
| status_3d =
| status_accel =
| status_audio =
| status_bluetooth =
| status_camera =
| status_gps =
| status_mobiledata =
| status_sms =
| status_calls =
| status_otg = Y
| booting = yes
}}
== Contributors ==
* ollieparanoid
* PabloCastellano and robb4 on IRC: Workaround for red screen bug ({{github|54}})
== Users owning this device ==
{{Device owners}}
== Installation ==
{{note|FDE (full disk encryption) seems to be broken for lg-mako currently, see {{issue|209|pmaports}}}}
<pre>
pmbootstrap init
pmbootstrap install
(enter fastboot, see below)
pmbootstrap flasher flash_systemflash_rootfs
pmbootstrap flasher boot
</pre>
You can properly turn the device off by unplugging the usb cable, then booting into fastboot, then choosing power off.
== What works Wifi ==Looks like, we need to package the [https://github.com/LineageOS/android_device_lge_mako/blob/12ac6e9aeb32d5ac9fc832f2214ede2c7690d0a6/proprietary-blobs.txt#L152-L157 wcnss.* files] for wifi. A version from 2015 can be found [https://github.com/TheMuppets/proprietary_vendor_lge/tree/cm-14.1/mako/proprietary/vendor/firmware here]. It's a Qualcomm chip.
* Touchscreen== Mainline ==* Weston (has the red screen bug, but we have {{note|See [[The Mainline Kernel]] for a workaround for that now 👍 )general introduction to mainlining.}}
== What does not work =='''power_graphic's mainlining progress is [https://gitlab.com/power_graphic/linux-postmarketos/tree/device-lg-mako here].''' Read on for generic instructions of what would need to be done.
* XWayland* fbsplash Currently we only displays splash images very shortlyhave a downstream vendor kernel packaged, then goes to black screen* osknot the mainline kernel. The <code>lg-sdl mako</code> has graphical bugs (but it works for unlocking!) ({{github|59|oskthe same [https://en.wikipedia.org/wiki/System_on_a_chip SoC] as the <code>asus-sdl}})* The rest (Wifi, bluetooth, making callsflo</code>, and on the latter it is possible to run [http://web.archive.org/web/20181008184943/https://plus.google.com/111524780435806926688/posts/fkQ1BMjNNcn Android on a kernel close to mainline].)
== Wifi ==This means, that most peripherals of the <code>mako</code> should work with mainline as well, once they are enabled in the DTS file. In fact, @vetzki reported in {{github|1079}} that the <code>mako</code> boots when using exactly the same DTS as the one from <code>flo</code> (this is not recommended, as misconfiguring your device like that may damage it). SSH appears to be working for a short time before getting kicked out, the display does not work.
Looks likeA good way forward would be using a minimal version of the <code>flo</code> DTS, we need where everything but USB is deleted, and fixing USB / trying to package get the display working with the [https://github.com/LineageOSfreedreno/android_device_lge_makofreedreno/blobwiki/12ac6e9aeb32d5ac9fc832f2214ede2c7690d0a6/proprietaryDSI-Panel-blobs.txt#L152Driver-L157 wcnssPorting DSI Panel Porting Guide].* The downstream DTSI files] for wifi. A version from 2015 can that need to be found ported to the upstream kernel are probably located [https://github.com/TheMuppetsLineageOS/proprietary_vendor_lgeandroid_kernel_lge_mako/tree/cmlineage-1415.1/makoarch/proprietaryarm/vendorboot/firmware dts here], and I guess the exact panel name appears when running <code>dmesg</code> after a successful boot (I did not verify this). ItPlease expand this when you's a Qualcomm chipre working on it, and report your progress in #postmarketOS. Check out the [[Mainline Guide]].
== Alternative kernels = Partition Layout ===It *should* be possible to run [[The Mainline Kernel]] on the lg<div class="toccolours mw-collapsible mw-mako, maybe we need to write a display driver, but there's a [httpscollapsed" style="width:620px; overflow: auto;">Partition layout:<div class="mw-collapsible-content"><pre class="shell"># fdisk /dev/github.comblock/freedreno/freedreno/wiki/DSI-Panel-Driver-Porting tutorial for it]. I (ollieparanoid) didn't do enough research on this yet - if you're interested in doing this, please talk to opendata26 from postmarketOS and robclark from the freedreno project. With their help it should be quite feasible.mmcblk0Found valid GPT with protective MBR; using GPT
Non-mainline:
* [https://github.com/ollieparanoid/pmbootstrap/tree/feature/lg-mako-freedreno-3.4.0/aports/device/linux-lg-mako Freedreno backport to 3.4.0] (couldn't make it work out of the box and I suggest trying to get mainline working instead of spending time on this one)
* Freedreno backport to 3.0.8 ({{github|38}})
== Links ==Command (m for help): pDisk /dev/block/mmcblk0: 15269888 sectors, 3360MLogical sector size: 512Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20Partition table holds up to 28 entriesFirst usable sector is 34, last usable sector is 15269854
* [https://ollieparanoid.github.io/img/2017-05-26/mako/editor.jpg Weston running with framebuffer issues]
* [https://cloud.githubusercontent.com/assets/6033024/26761940/2e3273e0-4928-11e7-8800-0b4ddb14e239.jpg robb4 patched Weston to display the right colors]