Skip to content

Instantly share code, notes, and snippets.

@anestisb
anestisb / system-img-repair.sh
Last active January 31, 2016 14:57
De-optimize Nexus factory images
#!/usr/bin/env bash
#
# For latest Android Nexus devices (N5x, N6p, N9, etc.), Google is no longer
# providing vendor tar archives to included into AOSP build trees. Oficially
# it is claimed that all vendor proprietary blobs have been moved to /vendor
# partition. Unfortunately that is not true since a few vendor executables, DSOs
# and APKs/JARs are present under /system although missing from AOSP public tree.
#
# As such custom AOSP builds require to first extract such blobs from /system of
# factory images and manually include them in vendor directory of AOSP tree.
@anestisb
anestisb / grok_reindex.sh
Last active June 25, 2019 14:56
OpenGrok conf
#!/bin/bash
readonly HTML_OUT="/var/lib/tomcat8/webapps/ROOT/index.html"
readonly DATA_ROOT="/var/opengrok"
readonly GROK_ROOT="/opt/opengrok/opengrok-1.2.6"
declare -ar IGNORE_PATTERNS=(
"-i *.3gp"
"-i *.a"
"-i *.app"
"-i *.bc"
@anestisb
anestisb / gist:afb85fd90276acc786ab
Last active August 29, 2015 14:26
honggfuzz Android linux PTRACE arch port
--{ Changelog
* libunwind
** A fresh upstream copy is forked and statically cross-compiled using Android NDK
** Helper compile script handles all build env setup & config flags settings
** Small patches are applied for ARM64 & x86 builds dues to Android compatibility issues
** Is used to both generate stack trace and extract function names from fuzzing targets
** Line number (as used in the main Linux libbfd stream) is now replaced with offset from
func symbol
** Improved error handling in arch_unwindStack()
@anestisb
anestisb / gist:eb897bbbe49ff69ee1ab
Created November 6, 2014 14:33
AOSP android-5.0.0_r2..master Commit Diff
This file has been truncated, but you can view the full file.
anestisb@deephole:[aosp]: cat logMadness.sh
#!/opt/local/bin/bash
repo forall -c '
REPO_URL=$(git ls-remote --get-url)
echo "\nRepo: $REPO_PROJECT ($REPO_URL)"
if git rev-parse android-5.0.0_r2 >/dev/null 2>&1
then
git log --oneline --no-merges android-5.0.0_r2..master
else