ASUS ZenFone 2 Laser (720p) (asus-z00l)

== Contributors ==
* antonyjr
* RoDen (only wiki page)
== Maintainer(s) ==
* antonyjr
== Users owning this device ==
== How to enter flash mode ==
Press Volume Up + Power Key. At the time of writing lk2nd does not recognize volume down for this device so you can't enter into flashing mode with lk2nd when you flash your kernel to the boot partition.
The only workaround is to erase the boot partition completely by entering the stock fastboot. For this you have to turn your phone completely off(do not plug in anything since if it's charging then it boots). Now Use Volume Up + Power Key once you see the bootloader release the buttons. Now do the following,
 $ fastboot erase boot
 $ fastboot flash boot lk2nd.img
 $ fastboot reboot 
 $ # Now you should be in lk2nd
== Unlocking Bootloader ==
Before you do anything to the device you should unlock the bootloader (Make sure to enable Developer Mode and USB Debugging in Android first). 
Since the recovery partition of the device is not locked by default we would flash TWRP first. Download TWRP from here and flash it to recovery.
 $ # Boot into stock fastboot by pressing Vol Up + Power Key
 $ fastboot flash recovery twrp.img
Now Press Volume Down + Power Key while still in fastboot, Once you see your phone reboot and show the ASUS logo release the buttons. Now You should see TWRP, do the required changes by TWRP. Now reboot again and verify if Android is still working and again get into Recovery.
Also Please Turn Off Screen locking in TWRP settings which causes some trouble. Disable Screen Locking and reduce the Screen brightness.
Now make a backup of your Phone with TWRP to a USB Flashdrive using OTG Cable this is important to recover if you do something wrong or want to go back to Android after writing postmarketOS to your internal memory. (Because the phone will not install any other Android OS unless you are in your Stock Android with latest Firmware again)
For Installing Lineage OS you should do a dirty flash with the latest firmware update.
Now you must install SuperSU or other android root software(TWRP -> Install -> SuperSU.zip transferred from Computer). SuperSU worked for me.
Wipe all caches and reboot into your device. Hopefully it should be rooted.
Now connect your device to your computer with USB debugging enabled. Download this zip file and extract it to some location of your computer.
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", ATTR{idProduct}=="4daf", MODE="0666", GROUP="plugdev", SYMLINK+="android%n"
Now go to the extracted directory of the zip and execute the following command while your phone connected with USB Debugging and without the screen lock state,
 $ ./unlock_bootloader.sh
Make sure to allow permissions by SuperSU on your phone screen.
Now hopefully your device should be unlocked. To check this execute the following command. This will reboot your device into fastboot.
 $ adb reboot bootloader
 $ fastboot oem device-info # It should say Bootloader: unlocked
 $ fastboot reboot
== Installation ==
Install the lk2nd bootloader, as it is required to handle some quirks
with msm8916 devices on mainline kernels. Flash the lk2nd.img image to the boot partition with fastboot flash boot /path/to/lk2nd.img. lk2nd
also provides a fastboot interface that allows for flashing kernels without overwriting lk2nd itself. As soon as you flash this to this device the default boot will always be lk2nd, when you flash a valid mainline kernel you can't see lk2nd again. Read the above sections for workaround.
Once you have booted into lk2nd, follow Qualcomm_Snapdragon_410/412_(MSM8916)#Installation.
== Display ==
Adjusting brightness may require pressing the Power button. Also, it may be automated with xdotool key 122.
== Battery ==
The charging is not controlled and there is no charging status reporting.
== WiFi ==
"Wifi will work but the signal range is very bad. So You have to be close to the AP. I highly suggest using mobile data instead of Wifi since wifi is not sustainable."
== Bluetooth ==
Bluetooth is unstable. Maybe, it's the same problem of bad signal range as with WiFi.
== Photos ==
File:Unixbench_20231119_z00l.png|thumb|Unixbench
== Plasma Desktop & Mobile Configuration ==
* Preparation:
# Choose plasma-mobile in pmbootstrap init if you don't want to change Plasma Desktop settings to Mobile manually.
# Add some useful extra packages, like mc and neofetch (optional).
# Add full disk encryption: pmbootstrap install --fde --add=unl0kr - as it's much better protection than a simple screensaver.
# Flash the device with pmbootstrap flasher flash_rootfs --partition userdata(there's not enough space on Android's system partition), then reboot into Plasma Mobile with [sudo] fastboot reboot
# Add a new line containing NoDisplay=true in /usr/share/applications/org.​kde.mobile.​plasma​settings.​desktop(or delete the file or move it to a safe location) and never use Plasma Mobile Settings because it makes amendments without user interaction] and may potentially break everything.
# Comment export GDK_BACKEND=wayland in /etc/profile.d/gtk-app-wayland.sh (or delete the file or move it to a safe location as it has nothing useful except this line), otherwise GTK apps would crash in X11.
# Change LockOnStart=true to false in /etc/xdg/kscreenlockerrc (or delete the file or move it to a safe location as it has nothing useful except this line) so you don't have to enter one more password immediately after start (optional).
# Add a new line containing uhid in /etc/modules to utilize Bluetooth mouse (optional, but using Plasma Desktop with a mouse is highly recommended).
* Installation:
# Install Plasma Desktop with sudo apk add postmarketos-ui-plasma-desktop
# Uninstall Plasma Phone with sudo apk del plasma-dialer as it is not supported in X11 and it seems there's no way to blacklist it in Application Menu for X11 only. Install Phosh's app calls with sudo apk add calls instead.
# Install onboard (the best virtual keyboard ): sudo apk add onboard - if you forgot to add it to extra packages during Preparation.
# Install other useful programs, like dolphin and kate, if you forgot to add them to extra packages during Preparation (optional).
* Configuration:
# Remove sddm from default services with sudo rc-update del sddm as Plasma Mobile has its own display manager - tinydm.
# Delete (or move to a safe location) settings-​hardware-​powermanagement.​desktop from /usr/share/systemsettings/categories and never use Plasma Desktop Power Management as it would change the Power Button behavior and maybe mess up some other power management settings, too.
# Delete (or move to a safe location) org.kde.xwaylandvideobridge.​desktop from /etc/xdg/autostart otherwise Wayland to X11 Video bridge would start multiplying and also cause white square in top left corner after compositing is disabled on Plasma Desktop X11.
# Change tinydm session to Plasma Desktop X11: sudo tinydm-set-session -f -s /usr/share/xsessions/plasmax11.desktop and reboot.
* Recommended settings for Plasma Desktop X11:
# (VERY IMPORTANT! To avoid the 'drag-and-NEVER-drop' issue of the touch panel) Input Devices -> Mouse -> Advanced, change Drag start distance' to 20 pixels (maximum). You may also try changing Drag start time if the 'drag-and-NEVER-drop' issue persist.
# Appearance -> Global Theme, select Breeze Dark
# Appearance -> Plasma Style, select Breeze Dark (or Breeze - ???)
# Appearance -> Window Decorations -> Theme, click the icon in the bottom right corner -> General -> Button size, select Large
# Appearance -> Window Decorations -> Titlebar Buttons, uncheck Show titlebar button tooltips
# Workspace Behavior -> General Behavior, uncheck Display informational tooltips on mouse hover
# Workspace Behavior -> General Behavior, switch Clicking files or folders to Selects them
# Workspace Behavior -> Screen Locking, change Lock screen automatically After to 1 minute
# Workspace Behavior -> Screen Locking, uncheck After waking from sleep
# Workspace Behavior -> Screen Locking, change Allow unlocking without password for to 10 seconds
# Startup and Shutdown -> Autostart, + Add -> + Add Application... -> Utilities -> Onboard
# Startup and Shutdown -> Background Services, uncheck Print Manager, SMART (not supported for eMMC, you may check eMMC life time with cat /sys/class/mmc_host/mmc0/mmc0:0001/life_time and cat /sys/class/mmc_host/mmc0/mmc0:0001/pre_eol_info), Thunderbolt Device Monitor, Touchpad
# Connections -> Wi-Fi -> General configuration, check All users may connect to this network (to enable auto-connection to Wi-Fi)
# (if needed) Input Devices -> Keyboard -> Layouts, check Configure layouts, + Add, choose an additional layout
# Display and Monitor -> Display Configuration, set Orientation to Portrait (actually, Landscape, as Build-In Screen is 720x1280)
# Display and Monitor -> Display Configuration, set Global Scale to 175%
# Display and Monitor -> Compositor -> Compositing, uncheck Enable on startup to disable 3D effects
* Recommended Onboard settings:
# General, check Start Onboard hidden
# General, uncheck Show tooltips
# Window, check Dock to screen edge
# Layout, choose Small
* Recommended Maliit-Keyboard settings:
# Add export QT_QUICK_CONTROLS_STYLE=org.kde.desktop into ~/.profile to apply [dark] theme settings
# (if needed) In console execute gsettings set org.maliit.keyboard.maliit enabled-languages "['en', 'ru', 'emoji']"
* Recommended Firefox settings (in about:config):
# browser.toolbars.bookmarks.visibility, enter never
# layout.css.devPixelsPerPx, enter 0.75
# layout.scrollbar.side, enter 3
# widget.gtk.overlay-scrollbars.enabled, switch to false
# widget.non-native-theme.scrollbar.size.override, enter 50
# IMPORTANT! In Wayland start Firefox by env GDK_DPI_SCALE=2 firefox-esr for proper scaling
* Recommended Firefox add-ons/extensions:
# Dark Reader
# ScrollAnywhere
# Tap to Tab
# uBlock Origin
* Current Issues:
# Error enabling firewall (firewalld / ufw) in Plasma Desktop settings.
# Flickering in Mozilla Firefox may be fixed by disabling hardware WebRenderer setting layers.acceleration.disabled or gfx.webrender.software to true in the browser's about:config.
# In X11 Power Button doesn't work as it should function on a mobile phone. Use xset dpms force off instead or switch to Wayland.
# In X11 Double Tap to Wake is not implemented and any touch would turn the panel on. The only solution right now is to switch to Wayland.
[ToDo]
# Compare stand-by battery life with all wireless interfaces off under X11 and Wayland.
[TBC]