Push library

Hey @moxie0

These are fixes so that this can be built easily under AOSP as a library. The res/raw bit was annoying to work around, because AOSP JAVA_LIBRARY stuff doesn't support AAPT.