Google Nexus 4 (lg-mako)
Currently the device is booting into a black screen, see pmaports#209. Help with resolving this is welcome. Please remove this note when the issue has been fixed. |
![]() LG Nexus 4 running Weston | |
Manufacturer | Google (LG) |
---|---|
Name | Nexus 4 |
Codename | lg-mako |
Released | 2012 |
Hardware | |
Chipset | Qualcomm APQ8064 Snapdragon S4 Pro |
CPU | Quad-core 1.5 GHz Krait |
GPU | Adreno 320 |
Display | 768x1280 IPS |
Storage | 8/16 GB |
Memory | 2 GB |
Architecture | armv7 |
Software | |
Original software | Android on Linux 3.4 |
postmarketOS | |
Category | testing |
Pre-built images | no |
Mainline | partial |
Flashing |
Works |
---|---|
USB Networking |
Works |
Internal storage |
No data |
SD card |
No data |
Battery |
Works |
Screen |
Broken |
Touchscreen |
Works |
Multimedia | |
3D Acceleration |
No data |
Audio |
No data |
Camera |
No data |
Camera Flash |
No data |
Connectivity | |
WiFi |
Works |
Bluetooth |
No data |
GPS |
No data |
NFC |
No data |
Modem | |
Calls |
No data |
SMS |
No data |
Mobile data |
No data |
Miscellaneous | |
FDE |
Works |
USB OTG |
Works |
HDMI/DP |
No data |
Sensors | |
Accelerometer |
No data |
Magnetometer |
No data |
Ambient Light |
No data |
Proximity |
No data |
Hall Effect |
No data |
Haptics |
No data |
Barometer |
No data |
Installation
FDE (full disk encryption) seems to be broken for lg-mako currently, see pmaports#209 |
pmbootstrap init pmbootstrap install (enter fastboot, see below) pmbootstrap flasher flash_rootfs pmbootstrap flasher boot
To flash the kernel, you can choose pmbootstrap flasher flash kernel
(but charging and power off doesn't work as expected anymore, see below).
Entering "Fastboot mode"
Hold Volume Down
+ Power
, let go of Power
once the device display does something (e.g. turns from battery icon to black screen).
Charging and power off (after flashing the postmarketOS kernel)
You don't have to flash the kernel! pmbootstrap flasher boot is also working! |
You can flash the postmarketOS kernel, but instead of charging the battery, it will boot straight into postmarketOS (or the on screen keyboard to type in the password). Right now, the best way to charge it from that situation is to boot the recovery TWRP.
You can properly turn the device off by unplugging the usb cable, then booting into fastboot, then choosing power off.
Wifi
We need to package the wcnss.* files for wifi. A version from 2015 can be found here.
Mainline
See The Mainline Kernel for a general introduction to mainlining. |
Current tree: https://github.com/okias/linux/tree/qcom-apq8064-mainline
power_graphic's mainlining progress was here. Read on for generic instructions of what would need to be done.
That most peripherals of the mako
should work with mainline as well, once they are enabled in the DTS file. In fact, @vetzki reported in #1079 that the mako
boots when using exactly the same DTS as the one from flo
(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.
A good way forward would be using a minimal version of the flo
DTS, where everything but USB is deleted, and fixing USB / trying to get the display working with the DSI Panel Porting Guide. The downstream DTSI files that need to be ported to the upstream kernel are probably located here, and I guess the exact panel name appears when running dmesg
after a successful boot (I did not verify this). Please expand this when you're working on it, and report your progress in #postmarketOS. Check out the Mainline Guide.
Partition Layout
Partition layout:
# fdisk /dev/block/mmcblk0 Found valid GPT with protective MBR; using GPT Command (m for help): p Disk /dev/block/mmcblk0: 15269888 sectors, 3360M Logical sector size: 512 Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20 Partition table holds up to 28 entries First usable sector is 34, last usable sector is 15269854 Number Start (sector) End (sector) Size Code Name 1 1024 132095 64.0M 0700 modem 2 132096 133119 512K 0700 sbl1 3 133120 134143 512K 0700 sbl2 4 134144 138239 2048K 0700 sbl3 5 138240 139263 512K 0700 tz 6 139264 184319 22.0M 0700 boot 7 184320 229375 22.0M 0700 recovery 8 229376 230935 780K 0700 m9kefs1 9 230936 232495 780K 0700 m9kefs2 10 232496 234055 780K 0700 m9kefs3 11 234496 235519 512K 0700 rpm 12 235520 236543 512K 0700 aboot 13 236544 237567 512K 0700 sbl2b 14 237568 241663 2048K 0700 sbl3b 15 241664 242687 512K 0700 abootb 16 242688 243711 512K 0700 rpmb 17 243712 244735 512K 0700 tzb 18 244736 245759 512K 0700 metadata 19 245760 278527 16.0M 0700 misc 20 278528 311295 16.0M 0700 persist 21 311296 2031615 840M 0700 system 22 2031616 3178495 560M 0700 cache 23 3178496 15267839 5903M 0700 userdata 24 15267840 15268863 512K 0700 DDR 25 15268864 15269854 495K 0700 grow
Community Info
postmarketOS users that own the device
- AnimalFriend11
- Bam (Notes: Ready to give out)
- Cherryband (Notes: screen/digitizer damaged)
- Dcambie (Notes: Testing)
- Gouchi (Notes: pmaports#209)
- Haeckle
- Ichernev
- Lantizia
- Lazcode (Notes: Needs new battery)
- Lifehackerhansol (Notes: 16GB model)
- Linmob (Notes: 8GB, dead)
- Maff (Notes: Screen-swapped with another, deader Nexus 4)
- Ollieparanoid
- Otto (Notes: 4 with broken screens)
- Roboe (Notes: variant: mako 16GB, version-hardware: rev_11; working SlimPort HDMI adapter available; running UBPorts stable)
- Russanandres (Notes: SailfishOS 2)
- TechEdison
Maintainers
- Ivan Belokobylskiy
Contributors
- ollieparanoid
- PabloCastellano and robb4 on IRC: Workaround for red screen bug (#54)
See also
- freedreno: Nexus 4
- Device package
- Kernel package
- Tutorial: UART debug cable
- Official proprietary drivers
- #1079 The Nexus 7 DTB is so similar, it even boots
- linux-postmarketos#9 Attempt at writing a new DTS for the Nexus 4