Skip to content

Instantly share code, notes, and snippets.

View tdrkDev's full-sized avatar
🤨
Trying to buy Pepsi in Russia

Roman Rihter tdrkDev

🤨
Trying to buy Pepsi in Russia
View GitHub Profile
@A2L5E0X1
A2L5E0X1 / lineage-signing-builds.md
Last active November 20, 2023 19:31
Signing LineageOS builds with your own dev-keys

Generating dev-keys for signing android builds

All you need is an android buildsystem (I would recommend you to use lineageos)

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/emailAddress=android@android.com'

C: Country shortform
ST: Country longform
L: Location (I used federal state)

// 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))