Skip to content

Instantly share code, notes, and snippets.

@rriley
rriley / gist:ce38ab20532c1d7a2667
Created October 29, 2015 10:30
A script to use the Android ART compiler to generate x86 binaries from apk files. Tested with Android 5.1.1_r4
# How to use ART to compile arm oat files on the host:
# - Get source code according to https://source.android.com/source/downloading.html
# - source build/envsetup.sh
# - mm build-art
# - Use this script in the source root directory to compile APKs
CWD=`pwd`
export ANDROID_DATA="${CWD}/out/host/datadir/dalvik-cache/x86_64"
export ANDROID_ROOT="${CWD}/out/host/linux-x86"
BOOT_IMAGE="${CWD}/out/host/linux-x86/framework/core.art"
@rriley
rriley / art-compile-arm.sh
Last active October 26, 2019 17:16
A script to use the Android ART compiler to generate ARM binaries from apk files. Tested with Android 5.1.1_r4
# How to use ART to compile arm oat files on the host:
# - Get source code according to https://source.android.com/source/downloading.html
# - source build/envsetup.sh
# - mm build-art
# - Build the full android image for aosp_arm-eng
# (Follow the directions at https://source.android.com/source/building.html)
# - Use this script in the source root directory to compile APKs
CWD=`pwd`
export ANDROID_DATA="${CWD}/out/host/datadir/dalvik-cache/x86_64"
@rriley
rriley / make_latexdiff.sh
Created August 28, 2015 15:10
Quick script to generate a latexdiff of two revisions of a latex document in a repo.
#!/bin/bash
# This script generates a diff of two different git revisions of a
# tex file. Note that a few things should be true:
# -The two revisions should share the same latex style. (article,llncs,etc.)
# -The main file of each should be called main.tex
# -Everything must be in a git repository
if [ "$#" -ne 2 ]
then