Skip to content

Instantly share code, notes, and snippets.

View tdrkDev's full-sized avatar
:shipit:
bro...

Roman Rihter tdrkDev

:shipit:
bro...
View GitHub Profile
@A2L5E0X1
A2L5E0X1 / lineage-signing-builds.md
Last active April 15, 2025 18:33
Signing LineageOS builds with your own dev-keys

Generating dev-keys to sign android builds

All you need is an Android buildsystem (LineageOS is recommended)
NOTE: For Lineage 21 and newer, different steps are required.

PART 1: GENERATING KEYS

  1. Export your infos (replace examples with your infos)
subject='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/[email protected]'

C: Country shortform

// a) As Mac OS X does not have byteswap.h
// needed this for a c util I had used over the years on linux.
// did not find a solution to stopgap via macports, sadly, but this did the trick
#if HAVE_BYTESWAP_H
#include <byteswap.h>
#else
#define bswap_16(value) \
((((value) & 0xff) << 8) | ((value) >> 8))