LG devices feature a lock method called "Knock Code". This module tries to emulate the same feature on all devices.

Unlike on LG devices, the module will only work while the screen is on, anything else requires a custom kernel.

After installing the module, you'll need to set a pattern from stock settings as your unlock method, then set a knock code from this module's settings.

For more details on security, visit the support thread.