Double tap to wake is a feature a few modern phones have out of the box, and I’m sure it’s a feature you get so used to that you can’t live without it. Unfortunately, most phones don’t have it. But the Nexus 6P does, to an extent.
The feature was found hidden in the kernel, though unfortunately it’s disabled. Thankfully, it’s pretty easy to enable if you’re rooted (which, with a Nexus device, is almost expected). Just enter this line of code into a terminal emulator:
echo 1 > /sys/devices/soc.0/f9924000.i2c/i2c-2/2-0070/input/input0/wake_gesture
It won’t survive a reboot, but it’s easy enough to enter every boot, or have a script run if you’re fancy like that. Developers are looking into enabling the feature with a custom kernel, but until then, this is a great solution for getting a nice feature.

Source :
Androidandme