Skip to content

Instantly share code, notes, and snippets.

@ChristophHaag
Last active December 21, 2015 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChristophHaag/6334554 to your computer and use it in GitHub Desktop.
Save ChristophHaag/6334554 to your computer and use it in GitHub Desktop.
AOKP for Dell Streak 7
#!/usr/bin/bash
export USE_CCACHE=1
if [ ! -d ~/python2env ]
then
virtualenv -p /usr/bin/python2 ~/python2env
fi
. ~/python2env/bin/activate
cd "$ANDROID/aokp/system/"
source build/envsetup.sh
if [ "x$1" == "xupdate" ]
then
repo sync
elif [ "x$1" == "xbuild" ]
then
brunch aokp_streak7-userdebug
else
echo "Usage: $0 [update|build]"
fi
#!/bin/bash
# Caution: I have not really run this as script but as separate steps, so it might be buggy. But you get the meaning and can use it as a walkthrough.
# Prerequisites: python2, repo, schedtool, java, (virtualenv if python is python3), bash (the android build system says, only bash is supported), libxslt, zip/unzip, zlib (lib32-zlib), gperf, jdk6 (fails hardcoded with jdk7)
# UTF8 locale. E.g. uncomment en_US.utf8 in /etc/locale.gen, run locale-gen, then localectl set-locale LANG="en_US.utf8". The build WILL fail with the "C" default.
# If you don't have giveen's CyanogenMod/AOKP already, you should probably install it first since it gives you the twrp recovery from which you can easily install images.
export ANDROID="$HOME"
# First, clone the AOKP repositories with repo
if [ -d "$ANDROID/aokp" ] && [ -d "$ANDROID/aokp/system" ]
then
cd "$ANDROID/aokp/system/"
else
mkdir $ANDROID/aokp; cd "$ANDROID/aokp"
repo init -u https://github.com/AOKP/platform_manifest.git -b jb-mr1
# mv * system #or whatever
cd system/
fi
# create a local manifest that gets
# - the repository for the streak 7 configuration
# - the linux kernel sources for the streak 7 from giveen
# - the proprietary stuff from DerArtem's github repository (instead of pulling them from the device)
# The name streak7local-manifest.xml is arbitrary, it just needs to end with .xml
# http://wiki.cyanogenmod.org/w/Doc:_porting_intro#Put_your_device_folder_in_github.2C_and_use_a_local_manifest_to_automatically_sync_it_with_repo_sync
# http://wiki.cyanogenmod.org/w/Doc:_Using_local_manifests
if [ ! -d .repo/local_manifests/ ]
then
mkdir .repo/local_manifests/
fi
echo '<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github" fetch=".." review="review.cyanogenmod.com" />
<project name="ChristophHaag/android_device_dell_streak7" path="device/dell/streak7" remote="github" revision="aokp" />
<project name="giveen/kernel_dell_streak7" path="kernel/dell/streak7" remote="github" revision="cm10.1" />
<project name="DerArtem/android_vendor_dell_streak7" path="vendor/dell/streak7" remote="github" revision="master" />
<project name="CyanogenMod/huaweigeneric-ril" path="packages/apps/huaweigeneric-ril" remote="github" revision="cm-10.1" />
</manifest>
' > .repo/local_manifests/streak7local-manifest.xml
# This is for Archlinux and all the other distributions where "python" is python 3. The android build system needs it to be python 2
env python -V 2>&1 | grep "Python 3"
if [ 0 -eq $? ]
then
virtualenv -p /usr/bin/python2 /tmp/python2env
. /tmp/python2env/bin/activate
fi
# this is for bringing in the android build system shell functions like brunch
# also calls vendorsetup.sh from the streak7 repository which copies the streak7 product spec to "$ANDROID/aokp/system/vendor/aokp/products/"
source build/envsetup.sh
# This is for triggering the build
# http://wiki.cyanogenmod.org/w/Envsetup_help
brunch cm_streak7-userdebug
# If the build succeeded you have now an OTA update in $ANDROID/aokp/system/out/target/product/streak7/
# copy it to the streak 7, reboot while holding Volume up and the power button, choose update from zip, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment