Skip to content

Instantly share code, notes, and snippets.

@pao
Created November 20, 2010 00:23
Show Gist options
  • Save pao/707468 to your computer and use it in GitHub Desktop.
Save pao/707468 to your computer and use it in GitHub Desktop.
Scripts to get and manage CyanogenMOD on an Amazon EC2 instance
#!/bin/bash
# wget https://gist.github.com/raw/707468/cm-ec2-init.sh && . cm-ec2-init.sh
# Epic CM-on-EC2 Init Script for ami-4a0df923
# Preemptively agree to the JDK license
echo "sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true" | sudo debconf-set-selections
# Get required packages
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo aptitude update
sudo apt-get --yes install \
git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev \
squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev \
sun-java6-jdk pngcrush g++-multilib lib32z1-dev lib32ncurses5-dev \
lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib schedtool ack-grep
# Get repo
mkdir -p ~/bin
curl curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
# Let new path settings take effect
exec bash -l
# Set up gerrit
git config --global review.review.cyanogenmod.com.username olearyp
# Get other scripts
git-archive --format=tar --remote=git://gist.github.com/707468.git master | tar -xf -
#!/bin/sh
# Get CM
mkdir -p ~/android
cd ~/android
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync
#!/bin/sh
sudo mkdir /mnt/cm
sudo mount /dev/sdf /mnt/cm
ln -s /mnt/cm/android ~/android
cp ~/android/gerrit_keys/* ~/.ssh/
# Just snippets
# Run the emulator for the current configured product (but with
# the prebuilt qemu kernel), with startup debug logging
emulator -no-window -no-audio -verbose -show-kernel -kernel ./prebuilt/android-arm/kernel/kernel-qemu | tee emustart.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment