Skip to content

Instantly share code, notes, and snippets.

@tdm
tdm / gist:ad70df712efe8f4e0b321da7056d197e
Created June 11, 2022 15:11
dockerfile for android building
FROM ubuntu:18.04
# Update the base
RUN apt-get update && apt-get -y upgrade
# Install sudo and let anyone in the "users" group run anything
RUN apt-get -y install sudo && \
echo '%users ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
RUN apt-get -y install \
#!/usr/bin/python3
import os
import sys
import getopt
import subprocess
### Logging utilities ###
log_debug = False
#!/bin/sh
if [ $# -ne 1 ]; then
echo "Usage: repackbootimg <name>" 1>&2
exit 1
fi
name="$1"
newname="new$1"
#!/sbin/sh
# Get the GPT
echo "Getting gpt.bin"
dd if="/dev/block/mmcblk0" of="/tmp/gpt.bin" bs=512 count=34
# Get the firmware
cd "/dev/block/bootdevice/by-name"
partitions=$(ls)
for p in $partitions; do
@tdm
tdm / qcacld.sh
Created August 21, 2017 07:09
Add qcacld
# See https://www.atlassian.com/blog/git/alternatives-to-git-submodule-git-subtree
git remote add qcacld https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-2.0
git subtree add --prefix drivers/staging/qcacld-2.0 qcacld LA.UM.5.5.r1-02800-8x96.0
@tdm
tdm / cve-patcher.py
Created August 17, 2017 20:44
Android CVE Patcher preview 1
#!/usr/bin/python
import os
import sys
import requests
import getopt
from xml.etree import ElementTree
import subprocess
def dequote(s):