[ZenFone 2 Q&A, Help & Troubleshooting] blazzer12:
I have been flashing ROMS since it was cool to do so (no, not before).

But I am a complete n00b when it comes to dev stuff and this whole post is written at that point of view; this post MAY contain incorrent information and n00bish mistakes.

Why change to 720px1280?

Frame rate doubles when using games or other graphics intensive applications.

Increased batter life due to lower resolution.

Even more snappier!

Since it's a 5.5" screen, not much difference between 1080x1920 and 720x1280. Of course, it's a compromise but barely noticable.

(Don't actually do anything, just read!)

How to change the resolution?

Make sure you enable "USB Debugging"

Make sure you installed adb and fastboot in your computer.

Connect your phone to your computer (usb cable... etc).

In the terminal type : adb shell wm size 720x1280

Wait, everything is so big! We need to change the DPI.

The original DPI is 480, but at 720x1280, 350 seems to restore the previous size and feel. Feel free to experiment with the DPI

How to change the DPI?

Make sure you enable "USB Debugging"

Make sure you installed adb and fastboot in your computer.

Connect your phone to your computer (usb cable... etc).

In the terminal type : adb shell wm density 350

OK, now you notice the (Virtual) Navigation Keys at the bottom don't work anymore.

Well that is because the Virtual Keys Mapping is out of range.

To understand why, consider this question : How will the system know which button you are pressing?

System uses the "display coordinate system" to identify where the buttons are located on the screen.

This info in located in this file: /sys/board_properties/virtualkeys.ftxxxx_ts

virtualkeys.ftxxxx_ts:

0x01:158:215:2045:260:250
0x01:102:540:2045:260:250
0x01:139:865:2045:260:250

Syntax:

0x01: A version code. Must always be 0x01. (ok google)
<Linux key code>: The Linux key code of the virtual key.
<centerX>: The X pixel coordinate of the center of the virtual key.
<centerY>: The Y pixel coordinate of the center of the virtual key.
<width>: The width of the virtual key in pixels.
<height>: The height of the virtual key in pixels.

Linux key code says what the button is: return, home, recent...

The last four parameters (centerX, centerY, width_of_virtual_key, height_of_virtual_key) are our concern, because they say where the buttons are located on the screen using "display coordinate system".

In "virtualkeys.ftxxxx_ts", the location of buttons is defined for 1080x1920.

So when we changed the resolution to 720x1280, the mapping for the virtual buttons became out of range and thus unusable.

So what should those parameters be for 720x1280?

0x01:158:143:1363:173:166
0x01:102:360:1363:173:166
0x01:139:576:1363:173:166

Stop lying!

Well I don't know for sure.

Method 1:

The original resolution is 1080x1920 and we changed it to 720x1280.

a -> 1080x1920

b -> 720x1280

w -> width

h -> height

wb/wa = 1280/1920 = hb/ha = 1280/1920 = 0.666666667

Both the resolutions have same aspect ratio. So we need not bother about width and height seperately, because they are both changed at the same proportion.

So, multiply the last four parameter values (centerX, centerY, width_of_virtual_key, height_of_virtual_key) by 0.666666667 and you should get the location of the buttons when resolution is changed to to 720p.

Method 2:

Enable "Show pointer location" in "Developer Settings".

The co-ordinates of where you touched the screen are displayed at the top.

Change the resolution to 720x1280.

The Navigation Buttons don't work but drag your fingers onto them.

You will see X and Y are near to the values we calculated in METHOD 1.

So lets modify the file already! (/sys/board_properties/virtualkeys.ftxxxx_ts)

Well you see, the file (virtualkeys.ftxxxx_ts) is located in the directory "/sys".

It turns out, it is not an actually directory. It is a "view" of the KERNEL as a filesystem.

So, every time the system boots, the kernel creates (magics?) those files in "/sys" which the system uses.

We do not have permission to change that directory's contents, not even with a slip from our parents.

Unless we have a way of overriding the kernel created file (virtualkeys.ftxxxx_ts), we have to patch the kernel itself.

I don't know how to patch kernels and stuff, this escalated quickly for me. So if you are interested check it out!

Please check the validity of anything said in this post. Positive criticism is welcome!

Sources : https://source.android.com/devices/input/touch-devices.html#virtual-key-map-files, [MENTION=5510605]aziz07[/MENTION] (started all this after reading their posts in : http://xdaforums.com/zenfone2/general/downgrade-resolution-ze551ml-t3163797)