Giter VIP home page Giter VIP logo

msm8953-mainline / lk2nd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from msm8916-mainline/lk2nd

62.0 16.0 73.0 13.65 MB

Secondary little kernel (lk) bootloader for Qualcomm MSM8953 devices

License: Other

Makefile 1.05% C 91.59% Assembly 2.38% C++ 0.06% Shell 0.13% DIGITAL Command Language 0.49% Perl 3.90% XS 0.02% M4 0.21% eC 0.02% Batchfile 0.01% Python 0.13%
lk2nd fastboot msm8953 littlekernel bootloader sdm450 sdm625 sdm632

lk2nd's Introduction

lk2nd

lk2nd is a bootloader for Qualcomm MSM devices, based on the CodeAurora Little Kernel fork. It provides an Android Fastboot interface on devices where the stock bootloader does not provide Fastboot (e.g. Samsung).

lk2nd does not replace the stock bootloader. It is packaged into an Android boot image and then loaded by the stock bootloader as a "secondary" bootloader. The real Android boot image is placed into the boot partition with 1 MB offset, and then loaded by lk2nd.

Supported SoCs

  • MSM8952 (MSM8940)
  • MSM8953 (SDM450,SDM625,SDM626)
  • SDM632

Supported devices

  • Motorola Moto G4 Play (harpia)
  • Motorola Moto G5 Plus (potter)
  • Motorola Moto G6 (ali) NOTE: Build with motorola-ali-secondary
  • Samsung Galaxy A3 (2015) - SM-A300FU
  • Samsung Galaxy A5 (2015) - SM-A500FU
  • Samsung Galaxy J5 (2016) - SM-J510FN
  • Samsung Galaxy J8 (2018) - SM-J810M
  • Samsung Galaxy S4 Mini Value Edition - GT-I9195I
  • Samsung Galaxy Tab A 8.0 LTE (2015) - SM-T357W
  • Samsung Galaxy Tab A 9.7 WiFi (2015) - SM-T550
  • Wileyfox Swift
  • Samsung Galaxy A6+ (2018) - SM-A605FN
  • Xiaomi Redmi 4X - santoni
  • Xiaomi Redmi Note 4X Snapdragon - mido
  • Xiaomi Redmi 4 Prime - markw
  • Xiaomi Redmi 5 - rosy
  • Xiaomi Redmi Note 5 / 5 Plus Snapdragon - vince
  • Xiaomi Redmi S2 / Y2 - ysl
  • Xiaomi Redmi 6 Pro - sakura
  • Xiaomi Redmi 7 - onclite
  • Xiaomi Redmi 7A - pine
  • Meizu M6 Note - m1721
  • Motorola Moto G7 Power - ocean
  • Xiaomi Mi A2 Lite - daisy
  • Xiaomi Mi A1 - tissot
  • Samsung Galaxy Tab A2 XL WiFi (2018) - SM-T590
  • Huawei Maimang 5 / Nova (Plus) / G9 (Plus) - milan
  • Lenovo P2 - kuntao

Installation

  1. Download lk2nd.img (as of now there's no build available so you'll need to build it yourself.)
  2. Flash lk2nd.img using the stock flashing procedure:
  • Fastboot: fastboot flash boot lk2nd.img
  • Samsung: heimdall flash --BOOT lk2nd.img

Usage

lk2nd provides the standard Android fastboot protocol for flashing/booting Android boot images.

Press Volume Down while booting to enter Fastboot mode. Press Volume Up while booting to boot into Recovery mode.

Note: If your stock bootloader uses the same key combinations, you need to wait a bit before pressing the volume keys. Usually, waiting until the screen turns on and/or the device vibrates should be enough to make the stock bootloader ignore the keys.

fastboot flash lk2nd lk2nd.img can be used to update lk2nd directory from its fastboot interface.

Note: fastboot flash boot boot.img will flash the actual boot image with 1 MB offset into the boot partition. This is done to avoid replacing lk2nd (since it is also booted from the boot partition).

Other fastboot commands work normally.

Building

$ make TOOLCHAIN_PREFIX=arm-none-eabi- <SoC>-secondary

Requirements:

Replace TOOLCHAIN_PREFIX with the path to your tool chain. lk2nd.img is built and placed into build-<SoC>-secondary/lk2nd.img.

Porting

To other devices with supported Socs

  • Add a simple device tree to dts/. You just need model and the qcom,msm-id/qcom,board-id from downstream.

To other SoCs

  • Cherry-pick changes
  • Make some changes
  • Add secondary project config

(TODO: Document this properly)

Contact

Ping minecrell/Mis012/uknown/gavodavo on #postmarketos-mainline.

lk2nd's People

Contributors

aff-tar avatar alikates avatar barni2000 avatar boedhack avatar bzy-080408 avatar dgibson avatar eieio avatar fekz115 avatar ggrisco avatar i-n-o-k avatar jiaxyga avatar kumargala avatar lnxbuild avatar lucasredelive avatar m1cha avatar mis012 avatar sandeepqualcomm avatar sixtaku avatar sjg20 avatar sorixelle avatar stephan-gh avatar swetland avatar tfinkel avatar travisg avatar travmurav avatar ultra-azu avatar vipaol avatar vldly avatar xiaomi-sm7435 avatar z3ntu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.