{"id":22469169,"url":"https://github.com/alula/alu-lk2nd","last_synced_at":"2025-06-22T21:33:47.307Z","repository":{"id":111570900,"uuid":"277009667","full_name":"alula/alu-lk2nd","owner":"alula","description":"Shitty lk2nd-based bootloader for santoni with multiboot support and random things for debugging. Certified by Huong Tram.","archived":false,"fork":false,"pushed_at":"2020-07-04T00:25:04.000Z","size":11031,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-21T09:44:38.282Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alula.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-04T00:22:40.000Z","updated_at":"2020-08-23T00:05:00.000Z","dependencies_parsed_at":"2023-03-09T16:15:18.698Z","dependency_job_id":null,"html_url":"https://github.com/alula/alu-lk2nd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alula/alu-lk2nd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alula%2Falu-lk2nd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alula%2Falu-lk2nd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alula%2Falu-lk2nd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alula%2Falu-lk2nd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alula","download_url":"https://codeload.github.com/alula/alu-lk2nd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alula%2Falu-lk2nd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261372129,"owners_count":23148757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T11:26:49.936Z","updated_at":"2025-06-22T21:33:42.293Z","avatar_url":"https://github.com/alula.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lk2nd\nlk2nd is a bootloader for Qualcomm MSM devices (at the moment only MSM8916),\nbased on the [CodeAurora Little Kernel fork](https://source.codeaurora.org/quic/la/kernel/lk/).\nIt provides an Android Fastboot interface on devices where the stock bootloader\ndoes not provide Fastboot (e.g. Samsung).\n\nOn MSM8916 it is also used for some quirks for mainline devices, e.g. to set\na proper WiFi/BT MAC address in the device tree.\n\nlk2nd does not replace the stock bootloader. It is packaged into an Android\nboot image and then loaded by the stock bootloader as a \"secondary\" bootloader.\nThe real Android boot image is placed into the boot partition with 1 MB offset,\nand then loaded by lk2nd.\n\n## Supported SoCs\n- MSM8916\n- MSM8953 (SDM450,SDM625)\n- MSM8952 (MSM8940)\n\n### Supported devices\n- Motorola Moto G4 Play (harpia)\n- Samsung Galaxy A3 (2015) - SM-A300FU\n- Samsung Galaxy A5 (2015) - SM-A500FU\n- Samsung Galaxy J5 (2016) - SM-J510FN\n- Samsung Galaxy S4 Mini Value Edition - GT-I9195I\n- Samsung Galaxy Tab A 8.0 LTE (2015) - SM-T357W\n- Samsung Galaxy Tab A 9.7 WiFi (2015) - SM-T550\n- Wileyfox Swift\n- Samsung Galaxy A6+ (2018) - SM-A605FN\n- Xiaomi Redmi 4X - santoni\n- Xiaomi Redmi Note 4X Snapdragon - mido\n\n## Installation\n1. Download `lk2nd.img` (available in [Releases](https://github.com/msm8916-mainline/lk2nd/releases)(MSM8916))\n2. Flash `lk2nd.img` using the stock flashing procedure:\n  - Fastboot: `fastboot flash boot lk2nd.img`\n  - Samsung: `heimdall flash --BOOT lk2nd.img`\n\n## Usage\nlk2nd provides the standard Android fastboot protocol for flashing/booting Android boot images.\n\nPress `Volume Down` while booting to enter Fastboot mode.\nPress `Volume Up` while booting to boot into Recovery mode.\n\n**Note:** If your stock bootloader uses the same key combinations, you need to wait a bit before\npressing the volume keys. Usually, waiting until the screen turns on and/or the device vibrates\nshould be enough to make the stock bootloader ignore the keys.\n\n`fastboot flash lk2nd lk2nd.img` can be used to update lk2nd directory from its\nfastboot interface.\n\n**Note:** `fastboot flash boot boot.img` will flash the actual boot image with 1 MB offset\ninto the boot partition. This is done to avoid replacing lk2nd (since it is also booted from\nthe boot partition).\n\nOther fastboot commands work normally.\n\n## Building\n```\n$ make TOOLCHAIN_PREFIX=arm-none-eabi- \u003cSoC\u003e-secondary\n```\n\n**Requirements:**\n- ARM (32 bit) GCC tool chain\n  - Arch Linux: `arm-none-eabi-gcc`\n- [Device Tree Compiler](https://git.kernel.org/pub/scm/utils/dtc/dtc.git)\n  - Arch Linux: `dtc`\n\nReplace `TOOLCHAIN_PREFIX` with the path to your tool chain.\n`lk2nd.img` is built and placed into `build-\u003cSoC\u003e-secondary/lk2nd.img`.\n\n## Porting\n### To other devices with supported Socs\n- Add a simple device tree to `dts/`. You just need `model` and the\n  `qcom,msm-id`/`qcom,board-id` from downstream.\n\n### To other SoCs\n- Cherry-pick changes\n- Make some changes\n- Add secondary project config\n\n(TODO: Document this properly)\n\n## Contact\nPing `minecrell`/`Mis012`/`Junak` on [`#postmarketos-mainline`](https://wiki.postmarketos.org/wiki/Matrix_and_IRC).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falula%2Falu-lk2nd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falula%2Falu-lk2nd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falula%2Falu-lk2nd/lists"}