Skip to content

Instantly share code, notes, and snippets.

@npike
npike / dump_appdata.sh
Last active August 29, 2015 14:05
Given the package name of an Android app on the device, trigger a backup via ADB and then extract the resulting backup file into the current directory. Useful for debuging sql databases in the app.
#!/bin/bash
# @author npike@phunware.com
#
# 1. Download script and store somewhere that makes you happy. Perhaps ~/Downloads on a Mac
# 2. From a terminal: chmod +x dump_appdata.sh
# 3. From a terminal: ./dump_appdata.sh com.my.app
# 4. Click "Back up my data" on connected device
# 5. Wait for backup and extraction to complete. An "app" folder will be written in the same directory
# of where this script is saved.
#
@npike
npike / IAPWatchGridView.java
Created June 19, 2014 21:26
A simple view that builds out a grid.
package tv.revolt.android.view;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.util.AttributeSet;
import android.view.View;