[AT&T Samsung Galaxy S II SGH-I777] RenderBroken:
Screen Shots​

courtesy of [MENTION=5402952]@trevor.bman[/MENTION]​

​

CM11 Build Instructions​

courtesy of [MENTION=5402952]@iXNyNe[/MENTION]​

most of this is ripped from http://wiki.cyanogenmod.org/w/Build_for_i777 so visit there for extra details and explanations

You will need:

A Galaxy S II running CyanogenMod

A Linux environment; you have multiple options here

A dedicated machine (probably the quickest to make builds)

A "Dual Boot" setup (also fast, but the build can take some time so expect to get familar with linux desktop while it's building)

a Virtual Machine setup such as VirtualBox (if you run just a basic command line setup this may be faster, but if you run the full environment it's likely to be slower because of the resources)

An internet connection (probably not a hotspot... you'll be downloading ~20GB)

A Micro USB cable

*Notes: you'll want to be using the 64-bit version of whatever linux distro you choose

**I'm not going to go into detail on setting up linux here, but there's lots of tutorials

***personally I use Ubuntu linux as my daily desktop environment (I'M FREE FROM WINDOWS!)

Phase 1: Setup that only has to be done once

You'll need to install ADB (and wouldnt hurt to have fastboot)

sudo apt-get install android-tools-adb android-tools-fastboot

next is udev rules

on ubuntu press alt+f2 and enter

gksu gedit /etc/udev/rules.d/51-android.rules

you'll be asked for a password for elevated permissions *should have been setup when you setup linux

paste this

#Samsung
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0660"

There are other rules you can add for other vendors but this one should work for all samsung devices.

Next install the other tools required to build

sudo apt-get install bison build-essential curl flex git-core gnupg gperf libesd0-dev libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-6-jdk openjdk-6-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev

*note this will install the 32 and 64 bit tools, if you're on 32 bit you're doing it wrong...

Next create some directories

mkdir -p ~/bin
mkdir -p ~/android/system

Install repo command

curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

Allow repo to run outside of it's directory (so you can just type repo insteas of /home/user/bin/repo)

gedit ~/.bashrc

enter the following in the text editor then save and close

export PATH=${PATH}:~/bin

Initialize the CyanogenMod source repository

cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0

Download the source code

Your first sync will take forever! it's just under 20GB, I recommend doing it overnight - in the future your sync will be faster because it just downloads updates.

repo sync

*Note from Render - by default the repo sync command will download using 4 simultanous connections. If you have a fast internet connection you can add more connections like this:

repo sync -j6 (or -j8 and so on)

Get prebuilt apps

cd ~/android/system/vendor/cm
./get-prebuilts

notice the dot!

Prepare the device-specific code

cd ~/android/system
source build/envsetup.sh
breakfast i777

Extract proprietary blobs

Now ensure that your Galaxy S II (AT&T) is connected to your computer via the USB cable and usb debugging is turned ON!

adb devices

if you see your device listed then proceed, if not come here to this thread and ask for help! you cannot go further! (and won't be able to go further in the future).

cd ~/android/system/device/samsung/i777
./extract-files.sh

*Note from Render - If you setup your roomservice.xml file like below then you already have the needed device files and the above few steps really are not necessary.

Setup and modify roomservice.xml

mkdir .repo/local_manifests

gedit .repo/local_manifests/roomservice.xml

Enter this

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_samsung_i777" path="device/samsung/i777" remote="github" />
<project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" />
<project name="CyanogenMod/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" />
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-11.0" />
</manifest>

Save and quit

Phase 2: Building (finally!)

Let's assume from here that you finished all of the above and got bored and closed the terminal - or that you just finished a build and are starting a new one after opening a fresh terminal (or just continuing from the instructions above) the following commands in order will set up your build environment, sync the latest changes, and pull in the patches we need for the build to work and then initiate the build. All of the commands up until brunch shouldn't take long to run, brunch can take anywhere from 2-10 hours depending on your system specs

cd ~/android/system/

repo selfupdate

repo sync

cd device/samsung/i777/
git fetch http://review.cyanogenmod.org/CyanogenMod/android_device_samsung_i777 refs/changes/90/54090/1 && git cherry-pick FETCH_HEAD
croot

cd device/samsung/galaxys2-common/
git fetch http://review.cyanogenmod.org/CyanogenMod/android_device_samsung_galaxys2-common refs/changes/65/55865/1 && git cherry-pick FETCH_HEAD
croot

export USE_CCACHE=1

. build/envsetup.sh

brunch i777

#done (as long as the build shows the out file)

If your build succeeds and you have a file you can push it to your device over usb using adb like so

cd $OUT
adb push cm-11-20140107-UNOFFICIAL-i777.zip /sdcard/

*Note that the filename should match whatever your build name (depending on the date usually just change the number)

this takes a minute or two, but once it's done you can reboot into recovery and then flash your build!

Also since you used CCACHE=1 And build from here on will now take a fraction of the time to build.