Building CyanogenMod without the device

Lately I’ve been working on a research project concerning android’s dalvik vm. Unfortunately, to compile cyanogenmod (at least for the Nexus 7), some proprietary drivers from the device are required (i.e. via ./extract-files.sh in the build guide for grouper ).

Now it may be inconvenient for you to actually attach the device (like if you are using a build server). So how to get the drivers? Surprisingly google didn’t offer any hints, but there is a straightforward way to do it… extract them from a cyanogenmod nightly build!

i.e. http://download.cyanogenmod.com/?device=grouper&type=nightly

To make it even easier, here is a modified extract-files.sh that pulls them from the extracted grouper build of your choice

 

# A hack to pull the binary files from a pre-existing build
# of this cyanogenmod (i.e. a nightly)
# Alex Knaust 2013-05-02

DEVICE=grouper
MANUFACTURER=asus

# Path to the unzipped nightly with the correct blobs
NIGHTLY=~/grouper-nightly

BASE=../../../vendor/$MANUFACTURER/$DEVICE/proprietary

mkdir -p $BASE
for FILE in `cat proprietary-blobs.txt | grep -v "^#"`; do
    cp -v $NIGHTLY/$FILE $BASE/
done

./setup-makefiles.sh