Skip to content

Instantly share code, notes, and snippets.

View danielml3's full-sized avatar

Daniel danielml3

View GitHub Profile
#!/system/bin/sh
#
# ADDOND_VERSION=2
#
# /system/addon.d/25-customprops.sh
#
. /postinstall/tmp/backuptool.functions
case "$1" in
@danielml3
danielml3 / kernel-build.sh
Last active May 18, 2024 00:09
Build a QCOM GKI kernel with external modules and generate the module.load files
#!/bin/bash
KERNEL_TOOLS=/home/daniel/android/lineage-21.0/prebuilts/kernel-build-tools/linux-x86/bin/
CLANG_PATH=/home/daniel/android/lineage-21.0/prebuilts/clang/host/linux-x86/clang-r487747c/bin/
export PATH="$KERNEL_TOOLS:$CLANG_PATH:$PATH"
TARGET=$1
KERNEL_SRC=$(pwd)
O=out
@danielml3
danielml3 / flash_all_ofp.py
Created August 26, 2023 11:00
Python script for generating a flash_all.sh shell script from a decompressed OFP to flash all A/B & super partitions
import xml.etree.ElementTree as ET
import os
tree = ET.parse('ProFile.xml')
fastboot_cmds = ["fastboot set_active a"]
def AppendFastbootCmd(partition, image):
cmd = "fastboot flash %s %s" % (partition, image)
fastboot_cmds.append(cmd)