Google Nexus 4 (lg-mako): Difference between revisions
m Reverted edits by Doomfan345 (talk) to last revision by Newbyte Tag: Rollback |
m gitlab.com -> gitlab.postmarketos.org (bot edit) |
||
(8 intermediate revisions by 5 users not shown) | |||
Line 7: | Line 7: | ||
| imagecaption = LG Nexus 4 running Weston | | imagecaption = LG Nexus 4 running Weston | ||
| releaseyear = 2012 | | releaseyear = 2012 | ||
| originalsoftware = Android | | originalsoftware = Android | ||
| originalversion = 4.2 | |||
| extendedversion = 5.1.1 (Linux 3.4) | |||
| chipset = Qualcomm Snapdragon S4 Pro (APQ8064) | | chipset = Qualcomm Snapdragon S4 Pro (APQ8064) | ||
| cpu = Quad-core 1.5 GHz Krait | | cpu = Quad-core 1.5 GHz Krait | ||
Line 15: | Line 17: | ||
| memory = 2 GB | | memory = 2 GB | ||
| architecture = armv7 | | architecture = armv7 | ||
| type = handset | |||
| status_usbnet = Y | | status_usbnet = Y | ||
| status_flashing = Y | | status_flashing = Y | ||
Line 37: | Line 40: | ||
| whet_dhry = 1233.4 | | whet_dhry = 1233.4 | ||
}}{{Based on SoC|Qualcomm_Snapdragon_600_(APQ8064)|Snapdragon 600}} | }}{{Based on SoC|Qualcomm_Snapdragon_600_(APQ8064)|Snapdragon 600}} | ||
== Users owning this device == | |||
{{Device owners}} | |||
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --> | |||
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--> | |||
<!-- you may need to purge page cache to see changes (more->purge cache)--> | |||
<!-- you can use {{My devices}} on your profile page to show table with all your devices --> | |||
== Installation == | == Installation == | ||
Line 42: | Line 52: | ||
{{note| No backend is available for user interface weston - it will boot to black/blank screen, see [[Weston#Troubleshooting|Weston troubleshooting]].}} | {{note| No backend is available for user interface weston - it will boot to black/blank screen, see [[Weston#Troubleshooting|Weston troubleshooting]].}} | ||
< | <syntaxhighlight lang="shell-session"> | ||
pmbootstrap init | $ pmbootstrap init | ||
pmbootstrap install | $ pmbootstrap install | ||
(enter fastboot, see below) | $ # (enter fastboot, see below) | ||
pmbootstrap flasher flash_rootfs | $ pmbootstrap flasher flash_rootfs | ||
pmbootstrap flasher boot | $ pmbootstrap flasher boot | ||
</ | </syntaxhighlight> | ||
To flash the kernel, you can choose <code>pmbootstrap flasher flash kernel</code> (but charging and power off doesn't work as expected anymore, see below). | To flash the kernel, you can choose <code>pmbootstrap flasher flash kernel</code> (but charging and power off doesn't work as expected anymore, see below). | ||
Attempting to flash an arbitrarily large rootfs (here xfce4 ui, >1GB), will fail: | Attempting to flash an arbitrarily large rootfs (here xfce4 ui, >1GB), will fail: | ||
< | <syntaxhighlight lang="shell-session"> | ||
$ fastboot flash userdata lg-mako.img | $ fastboot flash userdata lg-mako.img | ||
Sending 'userdata' (1129472 KB) FAILED (remote: 'data too large') | Sending 'userdata' (1129472 KB) FAILED (remote: 'data too large') | ||
fastboot: error: Command failed | fastboot: error: Command failed | ||
</ | </syntaxhighlight> | ||
Note that this is not related to the destination partition size. The getvar option to <code>fastboot</code> does not list a max-download-size variable. Unfortunately the <code>fastboot -S</code> flag is not useful since the image is not sparse. An untested tedious workaround may be to just flash a smaller ui image and manually <code>apk del/add</code>. | Note that this is not related to the destination partition size. The getvar option to <code>fastboot</code> does not list a max-download-size variable. Unfortunately the <code>fastboot -S</code> flag is not useful since the image is not sparse. An untested tedious workaround may be to just flash a smaller ui image and manually <code>apk del/add</code>. | ||
Line 83: | Line 93: | ||
<code>hwtest</code> output: | <code>hwtest</code> output: | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
< | <syntaxhighlight lang="text"> | ||
Category Model Path Status Value | Category Model Path Status Value | ||
framebuffer msmfb44_80601 /sys/class/graphics/fb0 working U:768x1280p-0 | framebuffer msmfb44_80601 /sys/class/graphics/fb0 working U:768x1280p-0 | ||
Line 94: | Line 104: | ||
input keypad_8064 /dev/input/event1 working | input keypad_8064 /dev/input/event1 working | ||
input pmic8xxx_pwrkey /dev/input/event0 working | input pmic8xxx_pwrkey /dev/input/event0 working | ||
</ | </syntaxhighlight> | ||
</div> | </div> | ||
</div> | </div> | ||
Line 103: | Line 113: | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
The default governor is battery-draining "performance" (see <code>cpufreq-info</code>, package cpufrequtils). Thermal throttling seems to be activated in this case (dmesg): | The default governor is battery-draining "performance" (see <code>cpufreq-info</code>, package cpufrequtils). Thermal throttling seems to be activated in this case (dmesg): | ||
< | <syntaxhighlight lang="text"> | ||
[ 552.307952] msm_thermal: Limiting cpu0 max frequency to 1350000 | [ 552.307952] msm_thermal: Limiting cpu0 max frequency to 1350000 | ||
</ | </syntaxhighlight> | ||
Try the "ondemand" governor (via <code>cpufreq-set</code>). | Try the "ondemand" governor (via <code>cpufreq-set</code>). | ||
</div></div> | </div></div> | ||
Line 116: | Line 126: | ||
Charging updates also spam dmesg: | Charging updates also spam dmesg: | ||
< | <syntaxhighlight lang="text"> | ||
[ 1366.506774] pm8921_chg_status_show: pm8921_chg_status_show , true ! buf = 1 | [ 1366.506774] pm8921_chg_status_show: pm8921_chg_status_show , true ! buf = 1 | ||
[ 1366.506774] , is_charging = 1 | [ 1366.506774] , is_charging = 1 | ||
[ 1382.078124] adjust_soc: ibat_ua = -344300, vbat_uv = 4323186, soc = 84, batt_temp=253 | [ 1382.078124] adjust_soc: ibat_ua = -344300, vbat_uv = 4323186, soc = 84, batt_temp=253 | ||
[ 1402.078124] adjust_soc: ibat_ua = -340800, vbat_uv = 4326126, soc = 85, batt_temp=253 | [ 1402.078124] adjust_soc: ibat_ua = -340800, vbat_uv = 4326126, soc = 85, batt_temp=253 | ||
</ | </syntaxhighlight> | ||
The <code>sensors</code> command (package lm-sensors) shows a couple of charging-related(?), non-zero thermal sensor values (<code>pm8921_tz-virtual-0</code> and <code>pm8821_tz-virtual-0</code>). | The <code>sensors</code> command (package lm-sensors) shows a couple of charging-related(?), non-zero thermal sensor values (<code>pm8921_tz-virtual-0</code> and <code>pm8821_tz-virtual-0</code>). | ||
</div></div> | </div></div> | ||
Line 216: | Line 226: | ||
'''theohussey's mainlining progress was [https://gitlab.com/theohussey/linux-postmarketos/-/tree/device-lg-mako here].''' Read on for generic instructions of what would need to be done. | '''theohussey's mainlining progress was [https://gitlab.com/theohussey/linux-postmarketos/-/tree/device-lg-mako here].''' Read on for generic instructions of what would need to be done. | ||
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 {{ | 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 {{issue|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. | ||
A good way forward would be using a minimal version of the <code>flo</code> DTS, where everything but USB is deleted, and fixing USB / trying to get the display working with the [https://github.com/freedreno/freedreno/wiki/DSI-Panel-Driver-Porting DSI Panel Porting Guide]. The downstream DTSI files that need to be ported to the upstream kernel are probably located [https://github.com/LineageOS/android_kernel_lge_mako/tree/lineage-15.1/arch/arm/boot/dts here], and I guess the exact panel name appears when running <code>dmesg</code> 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]]. | A good way forward would be using a minimal version of the <code>flo</code> DTS, where everything but USB is deleted, and fixing USB / trying to get the display working with the [https://github.com/freedreno/freedreno/wiki/DSI-Panel-Driver-Porting DSI Panel Porting Guide]. The downstream DTSI files that need to be ported to the upstream kernel are probably located [https://github.com/LineageOS/android_kernel_lge_mako/tree/lineage-15.1/arch/arm/boot/dts here], and I guess the exact panel name appears when running <code>dmesg</code> 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]]. | ||
Line 224: | Line 234: | ||
Partition layout: | Partition layout: | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
< | <syntaxhighlight lang="shell-session"> | ||
# fdisk /dev/block/mmcblk0 | # fdisk /dev/block/mmcblk0 | ||
Found valid GPT with protective MBR; using GPT | Found valid GPT with protective MBR; using GPT | ||
Line 262: | Line 272: | ||
24 15267840 15268863 512K 0700 DDR | 24 15267840 15268863 512K 0700 DDR | ||
25 15268864 15269854 495K 0700 grow | 25 15268864 15269854 495K 0700 grow | ||
</ | </syntaxhighlight> | ||
</div></div> | </div></div> | ||
Line 276: | Line 286: | ||
* ollieparanoid | * ollieparanoid | ||
* PabloCastellano and robb4 on IRC: Workaround for red screen bug ({{ | * PabloCastellano and robb4 on IRC: Workaround for red screen bug ({{issue|54}}) | ||
== See also == | == See also == | ||
* [https://github.com/freedreno/freedreno/wiki/Nexus-4 freedreno: Nexus 4] | * [https://github.com/freedreno/freedreno/wiki/Nexus-4 freedreno: Nexus 4] | ||
* [https://gitlab. | * [https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/master/device/testing/device-lg-mako Device package] | ||
* [https://gitlab. | * [https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/master/device/testing/linux-lg-mako Kernel package] | ||
* [https://web.archive.org/web/20170607151608/https://www.optiv.com/blog/building-a-nexus-4-uart-debug-cable Tutorial: UART debug cable] | * [https://web.archive.org/web/20170607151608/https://www.optiv.com/blog/building-a-nexus-4-uart-debug-cable Tutorial: UART debug cable] | ||
* [https://developers.google.com/android/drivers#mako Official proprietary drivers] | * [https://developers.google.com/android/drivers#mako Official proprietary drivers] | ||
* {{issue|1079}} The Nexus 7 DTB is so similar, it even boots | * {{issue|1079}} The Nexus 7 DTB is so similar, it even boots | ||
* {{issue|9|linux-postmarketos}} Attempt at writing a new DTS for the Nexus 4 | * {{issue|9|linux-postmarketos}} Attempt at writing a new DTS for the Nexus 4 |
Latest revision as of 13:30, 4 November 2024
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 |
Type | handset |
Hardware | |
Chipset | Qualcomm Snapdragon S4 Pro (APQ8064) |
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 |
Original version | 4.2 |
Extended version | 5.1.1 (Linux 3.4) |
postmarketOS | |
Category | testing |
Pre-built images | no |
Mainline | partial |
Unixbench Whet/Dhry score | 1233.4 |
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 |
This device is based on the Snapdragon 600. See the SoC page for common tips, guides and troubleshooting steps |
Users owning this 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
Installation
FDE (full disk encryption) seems to be broken for lg-mako currently, see pmaports#209 |
No backend is available for user interface weston - it will boot to black/blank screen, see Weston troubleshooting. |
$ 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).
Attempting to flash an arbitrarily large rootfs (here xfce4 ui, >1GB), will fail:
$ fastboot flash userdata lg-mako.img
Sending 'userdata' (1129472 KB) FAILED (remote: 'data too large')
fastboot: error: Command failed
Note that this is not related to the destination partition size. The getvar option to fastboot
does not list a max-download-size variable. Unfortunately the fastboot -S
flag is not useful since the image is not sparse. An untested tedious workaround may be to just flash a smaller ui image and manually apk del/add
.
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).
Reverting to factory
Reflashing a factory image after a pmOS install may hang. For the final factory image (LMY48T), the display will show a looping animation of rotating / flying colored dots on a black background (but be patient, wait at least 10 minutes to confirm hang). Follow the instructions at Reverting to stock (manta). The first time setup screen should follow the rotating dots (perhaps 8 minutes). During the flash the back of the device may warm noticeably.
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.
Hardware status (downstream kernel)
Output from hwtest
hwtest
output:
CPU tuning
CPU tuning:
Charging
Charging:
Sensors
For reference, sensor information from sensorsandbox (f-droid) on mako 16GB; note that in addition to hardware-based sensors, it presumably includes software-based / derived sensors.
sensor details (sensorssandbox)
Mainline
See The Mainline Kernel for a general introduction to mainlining. |
Current tree can be found here Qualcomm_Snapdragon_600_(APQ8064)#Mainlining
theohussey'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:
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