Asus Zenfone 3 (asus-zenfone3)

There are two variants of the Zenfone 3, the ZE520KL and the ZE552KL, differing only in screen panels, batteries, and possibly some sensors unique to each variant. At the time of writing, only the ZE520KL has been tested, but the ZE552KL should also be able to boot mainline without major issues.
== Contributors ==
* User:Smankusors
* Uefa41
== Users owning this device ==
== How to enter flash mode ==
* Stock Fastboot: Press and hold + together while device is turned off.
* lk2nd Fastboot: Turn on the device. When it vibrates, press and hold .
== Installation ==
=== Unlock bootloader ===
Since Asus has shut down its unlock service, there’s no official way to unlock the Zenfone 3. However, an unofficial method exists:
# Flash factory RAW
# Execute fastboot oem unlock
# Execute fastboot reboot bootloader
# Flash Oreo RAW to restore Android
=== lk2nd Installation ===
Please make sure you have the boot.img from your current Android ROM, so that you can boot back into Android.
(A TWRP backup image might not work, since it would be too large to fit into the boot partition. Please use the original image instead of backup)
# Download lk2nd-msm8953.img from https://github.com/msm8916-mainline/lk2nd/releases
# Put the device to fastboot mode
# fastboot flash boot lk2nd-msm8953.img
# Done!
To boot Android back,
# Wait until lk2nd screen appears
# fastboot flash boot boot.img
# fastboot reboot
Now Android should boot like normal.
For more information about lk2nd, you can read lk2nd/lk1st.
=== postmarketOS Installation ===
Make sure you flashed the lk2nd first!
This guide explains how to install postmarketOS on an SD card. I recommend using Linux for this, although Termux on another rooted phone might also work.
# Install pmbootstrap
# pmbootstrap init
# Follow the instructions, make sure you choose Vendor = Asus, and Device codename = zenfone3
# pmbootstrap install --sdcard=[your sdcard location]
# Insert the sdcard to the phone, reboot, and you should now boot into postmarketOS now.
For more information about pmbootstrap, you can read pmbootstrap
== Current issues ==
* Camera doesn't work yet
* Haptics/vibration doesn't work yet (missing driver support, probably will be supported from 6.12)
* No laser distance sensor yet
* No front LED control yet
* No fingerprint
* Buttons on headphone jack mapped incorrectly (need confirmation)
* Calls have a sound problem somehow, haven't dig deeper on this yet
* We have Venus video decode support on mainline kernel, but somehow there's a bottleneck somewhere on the players
* Battery will not charge to 100%
* Touchkeys is not working yet, it's missing support on edt-ft5x06 driver
* Several sensors are not enabled yet (smankusors: I'm currently checking on this)
== Serial UART ==
To obtain bootloader logs on the ZE520KL variant, follow the test points shown in the image below. Note that the UART operates at 1.8V. For kernel version 3.18 (downstream Android kernel), set the console to ttyHSL0. For kernel version 4.9 and later, including mainline kernels, set the console to ttyMSM0.
For more information about serial debugging, please read Serial debugging.
== See also ==
* Initial merge request (abandoned by Uefa41?)
* Second merge request
* Kernel source 
* 
* 
* LineageOS wiki