What is lk2nd and how does it work?
mainlk2nd is a custom bootloader for Qualcomm-based devices (smartphones, tablets, smartwatches, and SBCs). It provides a unified Android Fastboot interface, automatic hardware detection, and additional features like file system booting and secondary CPU core support. It operates in two distinct modes:
- lk2nd (Secondary Bootloader): Used for devices where the stock bootloader cannot be replaced. It is packed into an Android boot image and loaded by the stock bootloader. The OS kernel can be placed in the boot partition (with a 512 KiB offset) or stored in an
ext2file system. - lk1st (Primary Bootloader): Used for Single Board Computers (SBCs) or expert users where lk2nd acts as the first bootloader in the chain.