Last active
December 20, 2015 05:28
-
-
Save ChristophHaag/6078249 to your computer and use it in GitHub Desktop.
Build CyanogenMod 10.1 from https://github.com/giveen/android_device_dell_streak7 and https://github.com/DerArtem/android_vendor_dell_streak7 for the Dell Streak 7 on Archlinux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
export USE_CCACHE=1 | |
if [ ! -d ~/python2env ] | |
then | |
virtualenv -p /usr/bin/python2 ~/python2env | |
fi | |
. ~/python2env/bin/activate | |
cd ~/android/system/ | |
cd vendor/cm/ | |
./get-prebuilts | |
cd - | |
source build/envsetup.sh | |
if [ "x$1" == "xupdate" ] | |
then | |
repo sync | |
elif [ "x$1" == "xbuild" ] | |
then | |
brunch cm_streak7-userdebug | |
else | |
echo "Usage: $0 [update|build]" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. Fixes and improvements welcome | |
# 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 | |
# 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 already, you should probably install it first | |
# The latest release was named JB_Beta2.1.zip with md5sum 4f28e98a121b1d5195d531483893e00c | |
# (power on the streak 7 while holding both volume keys down, with micro usb connected do: sudo ./nvflash_streak7.sh) | |
# Unfortunately not even this is available as a free of cost download anymore and I have no idea how to create images for nvflash | |
# For people who don't have and/or want a paypal account I can surely give the copy I still have to you | |
# First, clone the CyanogenMod repositories with repo | |
if [ -d ~/android ] && [ -d ~/android/system ] | |
then | |
cd ~/android/system/ | |
else | |
mkdir ~/android; cd ~/android | |
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1 | |
cd system/ | |
fi | |
# create a local manifest that gets | |
# - giveen's repository for the streak 7 configuration | |
# - the linux kernel sources for the streak 7 | |
# - 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 | |
# Once the 3.x kernel compiles (it doesn't right now) replace the kernel_dell_streak7 line with this: | |
# <project name="giveen/android-tegra-nv-3.1.10-rel-15r7" path="kernel/dell/streak7" remote="github" revision="rel-15r7" /> | |
if [ ! -d .repo/local_manifests/ ] | |
then | |
mkdir .repo/local_manifests/ | |
fi | |
echo '<?xml version="1.0" encoding="UTF-8"?> | |
<manifest> | |
<project name="ChristophHaag/android_device_dell_streak7" path="device/dell/streak7" remote="github" revision="master" /> | |
<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" /> | |
</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 | |
source build/envsetup.sh | |
# get all the proprietary stuff | |
cd vendor/cm/ | |
./get-prebuilts | |
cd - | |
# 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/system/out/target/product/streak7/cm_streak7-ota-eng.*.zip | |
# 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