Skip to content

Instantly share code, notes, and snippets.

View kimocoder's full-sized avatar
👤
Kali NetHunter & Aircrack-NG [ Android & Linux ]

Christian Bremvåg kimocoder

👤
Kali NetHunter & Aircrack-NG [ Android & Linux ]
View GitHub Profile
@verNANDo57
verNANDo57 / 8GB_android-11_compilation-note
Last active November 14, 2023 20:04
Workarounds for building Android 11 on 8GB RAM
Workarounds for building R on 8GB RAM environment:
1. At the start of the build:
[ 99% 138/139] /mnt/ssd/lineage/out/soong/.bootstrap/bin/soong_build /mnt/ssd/lineage/out/soong/build.ninja
This used to take around 30mins, after enabling zram now it takes around 30secs (thanks to @kdrag0n for the zram idea) which is on par with what happens in 16GB RAM building environments
sudo apt install zram-config for installing zram-config package
sudo nano /etc/fstab and add a # in front of the swap disk if you have one and then reboot
After booting cat /proc/swaps to check if zram is enabled or not
@notnamed
notnamed / atheros-bluetooth-kernel-4.13.md
Created November 4, 2017 15:24
Fixing Atheros Killer / QCA Rome bluetooth chipset on kernel 4.13

Fixing Bluetooth on certain Atheros chipsets

The Atheros Rome bluetooth chipset has been a huge headache under Linux due to Qualcomm reusing an ID code for this and an older chipset: https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1542743 among other sources

The fix for this in kernel 4.8 is available in that bug report, but it is not compatible with the new kernel 4.13.

Note: I didn't write any of this code, I'm just documenting a fix.

Included below is a modified version of btusb.c that is working. I've made some small patches based on the compile errors and the btusb.c from the 4.13 kernel. I did not patch everything; just the bits that were relevant to my install errors. You may wish to do a more complete patch if you experience stability issues. Install commands:

@jedld
jedld / build_boot.sh
Created August 17, 2017 23:00
Build android boot image
#!/bin/sh
# mkbootfs ~/Downloads/samsung_t285_hacks/omni_root_test | minigzip > boot_kitchen/boot.img-ramdisk-new.gz
# mkbootfs /home/jedld/Downloads/samsung_t285_hacks/PURE_CM13/extracted/boot | minigzip > boot_kitchen/boot.img-ramdisk-new.gz
mkbootfs ~/android-work/out/target/product/gtexslte/root | minigzip > boot_kitchen/boot.img-ramdisk-new.gz
# mkbootfs boot_kitchen/boot | minigzip > boot_kitchen/boot.img-ramdisk-new.gz
# degas-mkbootimg -o boot.img --base 0 --pagesize 2048 \
@polesen
polesen / Makefile
Created June 1, 2012 20:56
Takes a RSA public key modulus and exponent in base64 encoding and produces a public key file in PEM format
CC = clang
CFLAGS =
DEPS =
OBJ = modexp2pubkey.o
LIBS = -lssl -lcrypto
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
modexp2pubkey: $(OBJ)