Skip to content

Instantly share code, notes, and snippets.

View danielml3's full-sized avatar

Daniel danielml3

View GitHub Profile
@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 / bootimgdiff.sh
Created November 26, 2023 17:55
Script for diffing two boot images using Git and AIK (Android Image Kitchen)
#!/bin/bash
set -e
ORIGINAL_IMG=$1
NEW_IMG=$2
if [ -z $ORIGINAL_IMG ] || [ -z $NEW_IMG ]; then
echo "usage: ./bootimgdiff.sh <original-img> <new-img>"
exit 1
@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)