Jump to content

LG Optimus Vu (lg-p895): Difference between revisions

From postmarketOS Wiki
Clamor (talk | contribs)
Tags: mobile edit mobile web edit
Susurrus (talk | contribs)
m Replace deprecated <source> tags with <syntaxhighlight>
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Infobox device
{{Infobox device
| manufacturer = LGE
| manufacturer = LG
| name = Optimus Vu
| name = Optimus Vu
| codename = lg-p895
| codename = lg-p895
Line 6: Line 6:
| imagecaption = Optimus Vu in recursion
| imagecaption = Optimus Vu in recursion
| releaseyear = 2012
| releaseyear = 2012
| originalsoftware = Android 4.0
| originalsoftware = Android
| originalversion = 4.0
| chipset = Nvidia Tegra 3 (AP33)
| chipset = Nvidia Tegra 3 (AP33)
| cpu = Quad-core 1.5 GHz Cortex-A9
| cpu = Quad-core 1.5 GHz Cortex-A9
Line 14: Line 15:
| memory = 1 GB
| memory = 1 GB
| architecture = armv7
| architecture = armv7
| type = handset
| booting = yes
| booting = yes
| category = community
| whet_dhry = 1079.2
| whet_dhry = 1079.2
| genericdevice=Nvidia Tegra armv7 (nvidia-tegra-armv7)
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or "" (blank) - for untested or unknown -->
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or "" (blank) - for untested or unknown -->
| status_usbnet = Y
| status_usbnet = Y
Line 35: Line 39:
| status_calls =
| status_calls =
| status_otg = P
| status_otg = P
| status_usba = -
| status_hdmidp =
| status_keyboard = -
| status_touchpad = -
<!-- Sensors -->
<!-- Sensors -->
| status_accel = Y
| status_accel = Y
Line 49: Line 49:
<!-- Misc -->
<!-- Misc -->
| status_irtx = -
| status_irtx = -
| status_irrx = -
| status_trustzone = Y
| status_trustzone = Y
| status_fossbootloader = Y
| status_fossbootloader = Y
| status_cameraflash = -
| status_dvb = -
| status_usba = -
| status_hdmidp = -
| status_sdcard = -
| status_keyboard = -
| status_touchpad = -
| status_haptics = Y
| status_ethernet = -
| status_stylus = -
| status_uboot = yes
| status_uboot = yes
| status_uboot_primary = Y
| status_uboot_primary = Y
Line 78: Line 89:


=== Mainline (Grate) ===
=== Mainline (Grate) ===
* Baseline kernel sources on p895: https://github.com/clamor-s/linux/tree/p895
* Baseline kernel sources on p895: https://github.com/grate-driver/linux
* Proper dts for P895 is added
* Proper dts for P895 is added
* Version: 6.0.6
* Version: 6.4.0-rc6
* Status: Boots. See status below.
* Status: Boots. See status below.


== Installation ==
== Installation ==
=== Bootloader replacement ===
=== Bootloader replacement ===
LG bootloader is highly NOT recommended to use with pmOS. To switch to open source booloader you need to use P895 Nvflash zip, it can be found here https://github.com/clamor-s/wheelie/releases/tag/p895 and you MUST use native Linux, virtual machine and WSL will NOT work.
{{warning|Bootloader replacement will erase all data on the device!}}
LG bootloader is highly NOT recommended to use with pmOS. To switch to open source booloader you need to use P895 re-crypt zip, it can be found here https://github.com/clamor-s/wheelie/releases/tag/p895 (one with re-crypt in its name) and you MUST use native Linux, virtual machine and WSL will NOT work.


Unpack zip and cd into it. Plug your P895 to PC and reboot it with holding both {{Button|Volume Down}} and {{Button|Volume Up}}. If all is done correct <code>lsusb</code> should show <code>ID 0955:7130 NVIDIA Corp. APX</code> device.
Unpack zip and cd into it. Plug your P895 to PC and reboot it with holding both {{Button|Volume Down}} and {{Button|Volume Up}}. If all is done correct <code>lsusb</code> should show <code>ID 0955:7130 NVIDIA Corp. APX</code> device. Instructions are in the '''commands''' file or you can see them below.


Now perform:
Now perform:
<source lang="shell-session">
<syntaxhighlight lang="shell-session">
$ sudo ./wheelie --blob blob.bin
$ sudo ./wheelie --blob blob.bin
Wheelie 0.2 - Preflight for nvflash.
Wheelie 0.2 - Preflight for nvflash.
Line 104: Line 116:
Sending file: 100 %
Sending file: 100 %
[!] Done - your device should now be ready for nvflash
[!] Done - your device should now be ready for nvflash
$ sudo ./nvflash --resume --rawdevicewrite 0 2944 u-boot-bricksafe.img --go
$ sudo ./nvflash --resume --rawdevicewrite 0 1024 repart-block.bin --go
Nvflash v1.13.87205 started
Nvflash v1.13.87205 started
[resume mode]
[resume mode]
sending file: u-boot-bricksafe.img
sending file: repart-block.bin
/ 12058624/12058624 bytes sent
/ 4194304/4194304 bytes sent
u-boot-bricksafe.img sent successfully
repart-block.bin sent successfully
</source>
</syntaxhighlight>
If phone did not reboot automatically, force reboot with holding {{Button|Power}}. This will replace LG bootloader with u-boot. For more deep look into u-boot actions refer to dedicated section below.
If phone did not reboot automatically, force reboot with holding {{Button|Power}}. This will replace LG bootloader with u-boot. For more deep look into u-boot actions refer to dedicated section below.


=== postmarketOS installation ===
=== postmarketOS installation ===
{{warning|P895 as /root uses userdata partition, MAKE A BACKUP OF IT!}}
{{warning|U-Boot mode is heavy power consuming, do not stay in it for prolonged periods of time!}}
You should configure p895 build using pmbootstrap and build it using split images <code>pmbootstrap install --split</code>. Now you can use '''nvflash''' or '''dd'''.  
Thanks to u-boot you have installed on previous step, entire p895 eMMC can be mounted as a simple storage device.


For '''nvflash''' place your pmOS images into Nvflash folder and enter APX mode with wheelie. Flash rootfs first with
Boot into u-boot bootmenu by holding {{Button|Volume Down}} and {{Button|Power}}. Then using volume buttons you can navigate bootmenu and using {{Button|Power}} choose its entries.
<source lang="shell-session">
$ sudo ./nvflash --resume --download UDA lg-p895-root.img --go
Nvflash v1.13.87205 started
[resume mode]
sending file: lg-p895-root.img
/ 1205862445/1205862445 bytes sent
lg-p895-root.img sent successfully
</source>
Phone will reboot and poweroff itself. Enter APX mode with wheelie once more and flash boot with
<source lang="shell-session">
$ sudo ./nvflash --resume --download CAC lg-p895-boot.img --go
Nvflash v1.13.87205 started
[resume mode]
sending file: lg-p895-boot.img
/ 205862445/205862445 bytes sent
lg-p895-boot.img sent successfully
</source>
After pmOS should boot fine. If you have issues with /root size, use <code>resize2fs</code>.


For '''dd''' you can mount /boot and /root partitions directly as external storage on your PC. For this u-boot has options <code>mount /boot</code> and <code>mount /root</code> and you will just need to flash images onto those external storage correspondingly.
Plug your p895 to PC and choose mount internal storage. Your p895 eMMC should be detected by PC as a simple mass storage. Then it can be flashed as any SD card using [[pmbootstrap]].


== Hardware status (mainline) ==
== Hardware status (mainline) ==
Line 205: Line 199:
| There are 2 GPIO leds: Power button led and Keypad led bound and work via sysfs. Power led acts as charging indicator but has enormously big delays. Keypad led is not active till capacitive buttons are fixed.
| There are 2 GPIO leds: Power button led and Keypad led bound and work via sysfs. Power led acts as charging indicator but has enormously big delays. Keypad led is not active till capacitive buttons are fixed.
|-
|-
| P
| Y
| Vibro
| Vibro
| Immersion ISA1200 haptic engine. Hardware is set properly and i2c device is recognized. Needs proper handle.
| Immersion ISA1200 haptic engine. Basic set of modes is implemented via Force Feedback Linux API.  
|-
|-
| Y
| Y
Line 215: Line 209:
| Y
| Y
| Charger
| Charger
| Maxim MAX8971 charger is used. Fully configured, supports both slow and fast charging.
| Maxim MAX8971 charger is used. Fully configured, supports both slow and fast charging. Re-plug charger after exit from suspend, else it will charge with 360 mA current.
|-
|-
| Y
| Y

Latest revision as of 06:28, 14 April 2024

Note This device is supported as part of a generic port. Refer to Nvidia Tegra armv7 (nvidia-tegra-armv7) for installation instructions and more information.
LG Optimus Vu
Optimus Vu in recursion
Optimus Vu in recursion
Manufacturer LG
Name Optimus Vu
Codename lg-p895
Released 2012
Type handset
Hardware
Chipset Nvidia Tegra 3 (AP33)
CPU Quad-core 1.5 GHz Cortex-A9
GPU NVIDIA ULP GeForce GPU 12 cores
Display 768×1024 IPS LCD
Storage 32 GB
Memory 1 GB
Architecture armv7
Software
Original software Android
Original version 4.0
FOSS bootloader yes
postmarketOS
Category community
Pre-built images yes
postmarketOS kernel mainline grate
Unixbench Whet/Dhry score 1079.2
Generic port Nvidia Tegra armv7 (nvidia-tegra-armv7)
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
Battery
Works
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
Partial
Audio
Works
Camera
No data
Connectivity
WiFi
Works
Bluetooth
Works
GPS
No data
NFC
Works
Modem
Calls
No data
SMS
No data
Mobile data
No data
Miscellaneous
FDE
Works
USB OTG
Partial
Sensors
Accelerometer
Works
Magnetometer
Works
Ambient Light
Works
Proximity
Works
Haptics
Works
Power Sensor
Works
U-Boot
Primary Bootloader
Works
Secondary Bootloader
Partial
Mainline
Works
Internal Storage
Works
USB Peripheral
Works
Display
Works
Buttons
Works

Contributors

  • Clamor

Users owning this device

  • Clamor (Notes: pmOS with Grate kernel and U-Boot)

Unlocking

Only known method of unlocking is flashing patched LG bootloader with kernel signature check disabled, but who needs this proprietary stuff with unknown properties (vendor bootloader I mean) if p895 supports open sourced bootloader - U-Boot.

Kernel status

Android kernel

  • 3.1 kernel based on LG sources with updates till Nougat support (Kernel)

Mainline (Grate)

Installation

Bootloader replacement

Warning WARNING: Bootloader replacement will erase all data on the device!

LG bootloader is highly NOT recommended to use with pmOS. To switch to open source booloader you need to use P895 re-crypt zip, it can be found here https://github.com/clamor-s/wheelie/releases/tag/p895 (one with re-crypt in its name) and you MUST use native Linux, virtual machine and WSL will NOT work.

Unpack zip and cd into it. Plug your P895 to PC and reboot it with holding both Volume Down and Volume Up. If all is done correct lsusb should show ID 0955:7130 NVIDIA Corp. APX device. Instructions are in the commands file or you can see them below.

Now perform:

$ sudo ./wheelie --blob blob.bin
Wheelie 0.2 - Preflight for nvflash.
Copyright (c) 2011-2012 androidroot.mobi
========================================

Waiting for device in APX mode...
[=] Chip UID: 0x000000000000009
[=] RCM Version: 0x30001

[=] CPU Model: Tegra 3
[+] Sending bootloader...
Sending file: 100 %
[!] Done - your device should now be ready for nvflash
$ sudo ./nvflash --resume --rawdevicewrite 0 1024 repart-block.bin --go
Nvflash v1.13.87205 started
[resume mode]
sending file: repart-block.bin
/ 4194304/4194304 bytes sent
repart-block.bin sent successfully

If phone did not reboot automatically, force reboot with holding Power. This will replace LG bootloader with u-boot. For more deep look into u-boot actions refer to dedicated section below.

postmarketOS installation

Warning WARNING: U-Boot mode is heavy power consuming, do not stay in it for prolonged periods of time!

Thanks to u-boot you have installed on previous step, entire p895 eMMC can be mounted as a simple storage device.

Boot into u-boot bootmenu by holding Volume Down and Power. Then using volume buttons you can navigate bootmenu and using Power choose its entries.

Plug your p895 to PC and choose mount internal storage. Your p895 eMMC should be detected by PC as a simple mass storage. Then it can be flashed as any SD card using pmbootstrap.

Hardware status (mainline)

Status Hardware Info
Y Booting Android style boot.img has restriction of approx 4 MB, which is fraction of /boot partition size.
Y Bootloader Open source bootloader U-Boot is available as alternative for stock LG bootloader and can replace it. U-Boot can not boot downstream kernel if it has Trusted Foundations enabled.
Y Panel KOE/Hitachi TX13D100VM0EAA MIPI DSI LCD IPS panel via Solomon SSD2825 DSI/LVDS bridge.
Y Backlight TI LM3533 led controller is used for main backlight. Driver is converted into OF and can be operated by panel.
N HDMI output Device supports MHL via SII9244 hdmi bridge on it own i2c-gpio line. Currently not configured. Is similar to SII9234 driver but is not same, requires hw setup look. MHL connection is detected.
Y Touchscreen Synaptics RMI4 S3203B touchscreen is used.
N Touch buttons Synaptics RMI4 S3204B touchscreen's function 1a is used. It is ported and set, but currently capacitive buttons still do not work.
Y USB USB functional is fully implemented. Due to hw design HOST state can work only via OTG-Y cable (with external power). PERIPHERAL works perfectly fine.
Y Internal memory eMMC 32 Gb by Hynix model HBG4e.
P GPS Some fancy GSD5T GNSS module. Kernel part is ready but there is no way to test it since most of gps processing is made in userspace.
Y WiFi Uses BCM4330B1. Wi-Fi should work out of the box (best with IWD daemon: apk add iwd; rc-update del wpa_supplicant; rc-update add iwd). All needed stuff is included. Device may not connect to some networks (in my case it was PC hotspot, to fix this, I have installed IWD on my PC as well). Be aware that WiFi MAC address is not static, though it should not matter for average user.
Y Bluetooth BCM4330B1 37.4 MHz Class 1.5 W-ExtLNA PCM-S. Works perfectly fine with included firmware.
Y NFC As on most devices of this age PN544 is used. Recognizes NFC tags.
Y GPIO keys/switches There are 4 GPIO keys: Power, Volume up, Volume down and Memo keys.
Y GPIO leds There are 2 GPIO leds: Power button led and Keypad led bound and work via sysfs. Power led acts as charging indicator but has enormously big delays. Keypad led is not active till capacitive buttons are fixed.
Y Vibro Immersion ISA1200 haptic engine. Basic set of modes is implemented via Force Feedback Linux API.
Y Battery MAX17040 fuel gauge is used. Fully set up.
Y Charger Maxim MAX8971 charger is used. Fully configured, supports both slow and fast charging. Re-plug charger after exit from suspend, else it will charge with 360 mA current.
Y Extcon Maxim MAX14526 MUIC is used. Can detect a big range of devices, usb host/peripheral, AC charger, MHL cable etc.
Y PMIC Optimus Vu uses Maxim MAX77663 PMIC mfd. Media devices have own sub-PMIC TI LP8720.
Y Sound Sound codec is Maxim MAX98089. Fully routed in kernel, UCM's are complete for media and calls. Audio via HDMI should work out of the box.
Y Thermal sensor NCT1008 ON Semiconductor LM90 series thermometer and Tegra T sensor. Both work perfectly fine.
Y Power sensor Ina230 works fine. Battery has its own tsc2007 ADC to detect battery temperature, works as current sensor.
Y Orientation sensors Include mpu6050 imu (accelerometer, gyroscope and thermometer) and ami306 compass.
Y Light and Proximity sensor APDS990X - combined AL and proximity sensor is used. Both functions work fine. Proximity function is disabled by default.
N Front camera 1.26 MP Aptina 1/6" HD SOC (MT9M114) - mainline driver is available.
N Rear camera 8 MP Sony imx111 1/4" BSI sensor with DW9714 lens voice coil and LM3559 flash led. DW9714 and LM3559 both have mainline drivers, imx111 - does not.
N Modem Intel XMM6260 modem is used on usb2 line in hsic mode.
P ULP GeForce GPU Acceleration partially works.

Usability

Desktop environment

Since 3D acceleration is not available yet, all DE which use it will be painfully slow and laggy.

Currently xfce4 or mate are recommended.

U-Boot

Current U-Boot status on LG Optimus Vu

Status Feature Info
Y Primary bootloader U-Boot successfully boots when is flashed into EBT partition instead of LG bootloader. Can be additionally booted via fusée gelée exploit.
P Secondary bootloader U-Boot can be chainloaded from both /boot and /recovery partitions, though LG bootloader has some conflicts with U-Boot.
Y Panel Solomon SSD2825 bridge, Hitachi KOE TX13D100VM0EAA DSI panel, TI lm3533 backlight were all added into U-Boot. Panel is fully functional.
Y eMMC Re-partitioned to better fit generic setup. Can be mounted as mass storage on host PC.
Y Boot kernel Yes, and can be highly adjusted with extlinux.conf.
Y Boot menu Native u-boot bootmenu works perfectly fine. It can be called with pressing volume down button on boot.
Y Power management Offline charging and charging in u-boot both work and are hw configured. Both power off and reboot options work and are available in bootmenu. If no valid kernel is found phone will turn off.
Y Fastboot Fastboot option is available in bootmenu. Most functions should work fine.
P Boot Android Booting Android kernel can be performed only same way mainline kernel boots. Additionally it must not have CONFIG_TRUSTED_FOUNDATIONS = y and some additional small patches, it can be booted by u-boot.
Y Self update Self update option is implemented and write is done correctly. Bootloader file has to have name u-boot-dtb-tegra.bin and be placed on 1st partition of eMMC.

Gallery

Serial console

Red arrow pointing to jtag
JTAG schematics. Clickable

LG Optimus Vu is an interesting device since it has factory soldered jtag directly on motherboard in pretty apposite and easily accessible place. To get to jtag you need only to take off back cover and plastic casing over motherboard. That is it, only one free socket is jtag. UART is UART-D (serial@70006300; 115200n8) and uses 3.3v.

See also