Skip to content

Instantly share code, notes, and snippets.

View TheHippo's full-sized avatar
🦛

Philipp Klose TheHippo

🦛
View GitHub Profile
@TheHippo
TheHippo / Readme.md
Created March 3, 2014 16:50
Wrapper script for working with adb and multiple Android devices

Usage

$set_android_device.py adb shell
(1) - R32D3006XXX [device usb:3-1.1 product:mantaray model:Nexus_10 device:manta]
(2) - 01499EAD0701XXXX [device usb:3-1.4 product:yakju model:Galaxy_Nexus device:maguro]
2
shell@maguro:/ $ 

How it works

@TheHippo
TheHippo / get-data-backup.sh
Created November 12, 2013 14:16
Backup all the data of an Android package to the local folder. This could useful in various occasion, e.g if you want to inspect the Sqlite database of a package without rooting you device. Usage: `./get-data-backup.sh your.package.name`
#!/bin/bash
if [[ "${#}" != "1" ]]; then
echo "Need exactly one command line argument: package name"
exit 1
fi
PACKAGE=${1}
echo "Please allow backup for: ${PACKAGE}"
adb backup -f data.ab -noapk ${PACKAGE}
dd if=data.ab bs=1 skip=24 | openssl zlib -d | tar -xvf -
rm data.ab
@TheHippo
TheHippo / Makefile
Created March 17, 2013 22:18
Compile and compress multiple Coffee-Script files into a single one, including a working source map
# adjust these path to where ever the executables are
COFFEE_BIN = ./node_modules/.bin/coffee
UGLIFY_BIN = ./node_modules/.bin/uglifyjs
# https://github.com/edc/mapcat
MAPCAT_BIN = ./node_modules/.bin/mapcat
# Where your coffee files are
INPUT_FOLDER = ./input
# Where you want your output
OUTPUT_FOLDER = ./output
@TheHippo
TheHippo / nginx.conf
Created December 12, 2012 18:22
Upstart config for running Nginx.
description "nginx http daemon"
author "Philipp Klose"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON=/opt/nginx/sbin/nginx
env PID=/opt/nginx/logs/nginx.pid
expect fork