Jump to content

ZTE Blade V7 Lite (zte-v0720)

From postmarketOS Wiki
ZTE Blade V7 Lite
ZTE Blade V7 Lite with xcfe4 user interface
ZTE Blade V7 Lite with xcfe4 user interface
Manufacturer ZTE
Name Blade V7 Lite
Codename zte-v0720
Model V0720
Released 2016
Type handset
Hardware
Chipset MediaTek MT6735P
CPU 4x 1.0 GHz Cortex-A53
GPU Mali-T720MP2
Display 720 x 1080 IPS LCD, 9:16, 5.0"
Storage 16 GB
Memory 2 GB
Architecture armv7
Software
Original software
The software and version the device was shipped with.
Android 6.0
Extended version
The most recent supported version from the manufacturer.
Android 6.0
FOSS bootloader no
postmarketOS
Category downstream
Pre-built images
Whether pre-built images are available here.
no
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
no
pmOS kernel
The kernel version that runs on the device's port.
3.18.19
Unixbench score
Unixbench Whetstone/Dhrystone score. See Unixbench.
446.1
Device package device-zte-v0720
Kernel package linux-zte-v0720
Initial MR
Initial merge request.
pmaports!6826
Features
Flashing
It is possible to flash the device with pmbootstrap flasher.
Works
USB Networking
After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system).
Works
Internal storage
eMMC, SD cards, UFS, ...
Works
SD card
Also includes other external storage cards
Untested
Battery
Charging and battery level reporting works
Untested
Screen
Display works. Ideally with sleep mode and brightness control.
Works
Touchscreen
Works
Multimedia
3D Acceleration
Untested
Built-in DVB
TV tuner/DVB device
Untested
Audio
Audio playback, microphone, headset and buttons.
Untested
Camera
Untested
Camera Flash
Untested
IR TX
Broken
IR RX
Broken
Connectivity
WiFi
Untested
Bluetooth
Untested
Ethernet
Untested
GPS
Untested
NFC
Near Field Communication
Untested
Modem
Calls
Untested
SMS
Untested
Mobile data
Untested
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Broken
USB-A
Full-sized USB-A port works (Usually applicable to SBCs and laptops).
Broken
SATA/eSATA
Broken
USB OTG
USB On-The-Go or USB-C Role switching
Works
HDMI/DP
Video and audio output with HDMI or Display Port works.
Broken
Sensors
Accelerometer
Auto screen rotation works in desktops e.g. Phosh or Plasma Mobile
Untested
Magnetometer
Sensor to measure magnetism
Untested
Ambient Light
Untested
Proximity
Untested
Hall Effect
Also known as flip cover sensor
Untested
Haptics
Untested
Barometer
Sensor to measure air pressure
Untested
Power Sensor
Sensor to monitor current, voltage and power. Not fuel gauge!
Untested

Contributors

Users owning this device


How to enter flash mode

Power off the phone, execute a flashing instruction (e.g. pmbootstrap flasher flash_kernel, plug in your phone and it should automatically start flashing. After executing one flashing instruction, the phone remains in flash mode, so you can just execute any other flashing commands without needing to unplug/replug/reboot/... the phone.

You may need to enable "Allow OEM Unlocking" in the developer options in the running Android System first. You may need to bypass MTK protections first: https://github.com/MTK-bypass/exploits_collection.

Installation

Using pmbootstrap

Follow Installation/Using pmbootstrap. When asked for the device's vendor/codename, select zte as the vendor and v0720 as the codename.

To flash the image to the device:

  • Enter flashing mode (see #How to enter flash mode)
  • Run pmbootstrap flasher flash_kernel to flash the kernel
  • Run pmbootstrap flasher flash_rootfs

Unplug USB cable after flashing and reboot the device (you can plug it in again, as soon as it starts booting)

Using TWRP

Follow Installation/Using pmbootstrap. When asked for the device's vendor/codename, select zte as the vendor and v0720 as the codename.

To flash the image to the device:

  • Generate flashable recovery zip: pmbootstrap install --android-recovery-zip
  • Copy recovery zip to SD Card (zip can be found somewhere under $HOME/.local/var/pmbootstrap/chroot_buildroot_*/ (use find -name *.zip path/to/chroot_buildroot)
  • Enter TWRP recovery (press Power and Volume Up).
  • Flash recovery zip.


Notes

Device

  • I think this is the same device as the "ZTE Blade V6 Plus", but someone would need to test that to be sure about that
  • This device has a MT6735P, which (in theory) supports ARMv8 (aarch64), however I only got it to compile with ARMv7

Kernel and pmOS

  • Downstream kernel does not support systemd
  • I got it working with xfce4 as a user interface (type sudo startx after boot), neither console nor phosh did work for me, but i did not follow through on that
  • I was able to get a pure terminal working by using ui = sxmo-de-dwm and then executing sudo startx (you can add that to a startup script), but that does not seem to be intended
  • When facing issues with the xfce4 UI, try to do the following:
sudo apk add pipewire pipewire-alsa pipewire-pulse
sudo apk upgrade --prune
sudo startx

Headless Mode

If you decide to run the phone in headless mode, i recommend disabling the display by running: echo 0 > /sys/class/leds/lcd-backlight/brightness

You can turn the display on again using: echo 255 > /sys/class/leds/lcd-backlight/brightness

Docker

You can run docker on this device. I recommend doing the following:

  • Install pmOS (with ui=none)
  • Once:
sudo apk add docker iptables-legacy
sudo mv /usr/sbin/iptables /usr/sbin/iptables.nft.bak
sudo ln -s /usr/sbin/iptables-legacy /usr/sbin/iptables
sudo mv /usr/sbin/ip6tables /usr/sbin/ip6tables.nft.bak
sudo ln -s /usr/sbin/ip6tables-legacy /usr/sbin/ip6tables
  • After every (re)boot (you can add this to an automated script running on boot):
for ctl in cpu cpuacct cpuset devices freezer memory blkio pids net_cls; do
  sudo mkdir -p /sys/fs/cgroup/$ctl
  sudo mount -t cgroup -o $ctl cgroup /sys/fs/cgroup/$ctl
done
sudo service docker restart
  • Run a docker container with sudo docker run --network=host <image>
  • Please check out my recommendations for running this device in headless mode

Porting Progress

Kernel Source

You can download the kernel for the ZTE Blade V7 Lite here: https://opensource.ztedevices.com/

Patches

This list of patches may not be up-to-date, check out the relevant linux/device package in pmaports for the list of currently used patches!

The following patches were necessary to compile:

  • fix-check-lxdialog.patch (from shared patches)
  • gcc7-give-up-on-ilog2-const-optimizations.patch (from shared patches)
  • gcc8-fix-put-user.patch (from shared patches)
  • gcc10-extern_YYLOC_global_declaration.patch (from shared patches)
  • python3dct.patch (from here https://gitlab.postmarketos.org/postmarketOS/pmaports/-/blob/master/device/downstream/linux-vernee-k506/python3dct.patch)
  • Replacing atomic_set(&obj->ps_thd_val_high, obj->hw->ps_threshold_*); with atomic_set(&obj->ps_thd_val_high, obj->hw->ps_threshold_*_def);
  • Replacing .section "*", #alloc, #execinstr with .section "*", "ax" (or just "a" if just #alloc)

Device Config

The default config provided by arch/arm/config/ztexa6735m_35u_m_defconfig in the kernel can be used and all changes suggested by pmbootstrap kconfig check can be applied (i.e. after pmbootstrap init do cp <path/to/kernel>/arch/arm/config/ztexa6735m_35u_m_defconfig <path/to/pmaports>/device/linux-zte-v0720/config-zte-v0720.armv7 and then pmbootstrap kconfig check linux-zte-v0720).

Whilst the MT6735M itself is aarch64 (arm64) based, only the armv7 (arm) config works. This may be related to the little kernel (lk) on the device not being able to boot arm64 images. See https://gitlab.com/mt6735-mainline/bootshim for more infos on that.

Recovery

Right now i am trying to use the TWRP recovery for the ZTE Blade V7 Lite to retrieve the logs on why the phone is not booting. You can get an unofficial TWRP build for the ZTE Blade V7 Lite here: https://unofficialtwrp.com/zte-blade-v7-lite-root-twrp-3-2/

Precompiled Kernel

Using the kernel (i.e. zImage file) of the stock ROM and/or the TWRP image together with the ramdisk generated by pmbootstrap "works". The phone does not bootloop and it even creates a USB network interface, however connecting to the phone does not seem to work (neither ssh nor telnet works).

So the phone bootlooping seems to be caused by something in the kernel package.

Downstream Kernel

Compiling the downstream kernel works now; the phone boots and you can even choose xfce4 as a user interface (you will have to run startx after boot).

(Close to) Mainline Kernel

Next step will be trying to use the mainline kernel for the [MT6735M](https://wiki.postmarketos.org/wiki/MediaTek_MT6735): https://gitlab.com/mt6735-mainline/linux

See also