Skip to content

Instantly share code, notes, and snippets.

View fourkbomb's full-sized avatar

Simon Shields fourkbomb

View GitHub Profile
echo Purging old target_files...
rm out/dist/*target_files*
echo Making dist...
mka dist
echo Signing target files apks...
TARGET_FILES_SIGNED=lineage-$(get_build_var LINEAGE_VERSION)-signed-target_files.zip
./build/tools/releasetools/sign_target_files_apks -o -d ~/.android-certs out/dist/*-target_files-*.zip $TARGET_FILES_SIGNED
echo Generating ota package...
OTA_PACKAGE=lineage-$(get_build_var LINEAGE_VERSION)-install.zip
./build/tools/releasetools/ota_from_target_files -k ~/.android-certs/releasekey $TARGET_FILES_SIGNED $OTA_PACKAGE
@fourkbomb
fourkbomb / README.md
Last active December 22, 2018 15:11
switch from CM to Lineage non-destructively

Switch from CyanogenMod to LineageOS without redownloading everything

  1. Init the Lineage manifest: repo init -u ssh://git@github.com/LineageOS/android.git -b cm-14.1 (or cm-13.0 if you prefer that)
  2. Update your local manifest (.repo/local_manifests/roomservice.xml), if it exists - find and replace "CyanogenMod" with "LineageOS" globally.
  3. Move the git objects: mv .repo/project-objects/CyanogenMod .repo/project-objects/LineageOS
  4. curl https://gist.github.com/fourkbomb/0d94e286dc6f173eb9053c0d75e84783/raw/cc1bb94337eab5e30efa689fe1d050db25a1124a/fixlinks.sh > ~/fixlinks.sh
  5. chmod +x ~/fixlinks.sh
  6. cd .repo/projects
  7. find . -name '*.git' -exec ~/fixlinks.sh {} \;
  8. And finally, fix the actual tree:
@fourkbomb
fourkbomb / dtb_diff.py
Last active June 22, 2019 07:17
basic diff between two device tree blobs, attempts to account for differing phandles
#!/usr/bin/env python
# Copyright (C) 2019 Simon Shields <simon@lineageos.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@fourkbomb
fourkbomb / osrc_download.py
Created September 28, 2017 02:42
download source releases from samsung OSRC using a terminal
#!/usr/bin/env python3
# Copyright (c) 2017 Simon Shields
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#