Skip to content

Instantly share code, notes, and snippets.

Avatar
🏳️‍🌈

Caleb Connolly calebccff

🏳️‍🌈
View GitHub Profile
@calebccff
calebccff / pixel3-blueline-dmesg-android12.log
Created Jul 10, 2022
Pixel 3 / blueline Android 12 full UART boot load
View pixel3-blueline-dmesg-android12.log
[ 0.000000] c0 0 Booting Linux on physical CPU 0x0
[ 0.000000] c0 0 Linux version 4.9.270-g862f51bac900-ab7613625 (android-build@abfarm-east4-101) (Android (7284624, based on r416183b) clang version 12.0.5 (https://android.googlesource.com/toolchain/llvm-project c935d99d7cf2016289302412d708641d52d2f7ee)) #0 SMP PREEMPT Thu Aug 5 07:04:42 UTC 2021
[ 0.000000] c0 0 Boot CPU: AArch64 Processor [517f803c]
[ 0.000000] c0 0 Machine: Google Inc. MSM sdm845 B1 DVT1.1
[ 0.000000] c0 0 earlycon: msm_geni_serial0 at MMIO 0x0000000000a84000 (options '')
[ 0.000000] c0 0 bootconsole [msm_geni_serial0] enabled
[ 0.000000] c0 0 Reserved memory: created CMA memory pool at 0x00000000fec00000, size 16 MiB
[ 0.000000] c0 0 OF: reserved mem: initialized node adsp_region, compatible id shared-dma-pool
[ 0.000000] c0 0 Reserved memory: created CMA memory pool at 0x00000000fdc00000, size 16 MiB
[ 0.000000] c0 0 OF: reserved mem: initialized node qseecom
@calebccff
calebccff / SHIFT6mq-smb2-dump.log
Created May 11, 2022
OP6 charger register dump compared to SHIFT6mq
View SHIFT6mq-smb2-dump.log
SMB2 DEBUG: (addr = CHGR_BASE, val = 0x00)
SMB2 DEBUG: (addr = 0x1001, val = 0x00)
SMB2 DEBUG: (addr = 0x1002, val = 0x00)
SMB2 DEBUG: (addr = 0x1003, val = 0x00)
SMB2 DEBUG: (addr = 0x1004, val = 0x02)
SMB2 DEBUG: (addr = 0x1005, val = 0x61)
SMB2 DEBUG: (addr = BATTERY_CHARGER_STATUS_1_REG, val = 0x03)
SMB2 DEBUG: (addr = BATTERY_CHARGER_STATUS_2_REG, val = INPUT_CURRENT_LIMITED_BIT)
SMB2 DEBUG: (addr = CHG_OPTION_REG, val = 0x00)
SMB2 DEBUG: (addr = BATTERY_CHARGER_STATUS_3_REG, val = FV_POST_JEITA_MASK=0x7a)
@calebccff
calebccff / qcom_sound_notes.md
Last active May 15, 2022
Qualcomm sound architecture notes
View qcom_sound_notes.md

Qcom (sdm845) audio

db410c notes

From 96boards docsdragonboard/dragonboard410c/guides/enable-ls-i2s.md.html

  • Primary MI2S - Supports only playback
  • Secondary MI2S - Supports only playback
  • Tertiary MI2S - Supports only capture
@calebccff
calebccff / bisect-test.sh
Created Apr 5, 2022
Caleb's hacky bisect script
View bisect-test.sh
#!/bin/bash
# sudo uhubctl -a off -p 2 -n 2109:2812 && printf "%b" "\0x01" > /dev/ttyACM0 && sleep 15 && sudo uhubctl -a on -p 2 -n 2109:2812
export TOOLSDIR=$HOME/pmos/tools
. $HOME/pmos/tools/pmenv
. $HOME/pmos/tools/automation.sh
. ~/pmos/pmbootstrap/helpers/envkernel.sh
@calebccff
calebccff / aflash.sh
Last active Mar 7, 2022
fastboot wrapper for flashing android images from a folder
View aflash.sh
#!/usr/bin/zsh
# Wrapper for common fastboot flash commands
# Example usage (as an alias)
# Assumes the device is running Android, syncs kernel modules (and whatever else)
# and then reboots and flashes the kernel
# $ alias aflashboot="adb remount && adb sync; aflash.sh -t -b"
#
# Flashes everything, from bootloader
# $ alias aflashall="aflash.sh -t -s -v -b"
@calebccff
calebccff / ril.md
Last active Feb 18, 2022
Writing a RIL HAL for AOSP / mainline
View ril.md
@calebccff
calebccff / waydroid-net-pmos.sh
Created Dec 8, 2021
Script to fix waydroid networking on postmarketOS
View waydroid-net-pmos.sh
#!/bin/ash
# You may need to disable nftables for this to work, it's probably a bad idea to do so
sysctl net.ipv4.ip_forward=1
iptables -P FORWARD ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.250.0/24
echo "ip route add default via 192.168.250.1 dev eth0; setprop net.dns1 1.1.1.1" | waydroid shell
View fab-coeffs-calc.py
#!/usr/bin/python3
import argparse
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from scipy.stats import linregress
pmics = ["pmi8998", "pm660"]
fabs = ["gf", "tsmc", "smic", "mgna"]
@calebccff
calebccff / copykernel.source
Created Nov 1, 2021
Bash function to copy kernel artifacts to AOSP device project
View copykernel.source
#!/bin/bash
##############
## WARNING: This script uses `rm -rf` with variables, make sure you know what it's doing before running it
## and don't hold me accountable if you accidentally delete important stuff.
## Whilst I have tested it, your setup will be different and you should edit this to match.
## See more details at the bottom.
ANDROID_MAINLINE_DIR="/PATH/TO/AOSP/SOURCE"
@calebccff
calebccff / edid_parser.c
Created Sep 21, 2021
Very basic edid parse to check for audio support
View edid_parser.c
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#define HDMI_EDID_PATH "edid.bin"
#define ALOGE(...) (printf(__VA_ARGS__))
struct edid_extension {
unsigned char tag;