Here's my quick guide to compiling Android for the Optimus G Pro for ATT.
For reference, this phone's codename is "geefhd" per the stock boot.img, however the kernel defconfig is "gkatt_bcm".
Simplicity sake dictates that I would like to use the kernel defconfig's name as the device codename.
From here on out, I'd like to refer to this phone in code as gkatt, yet we'll call the kernel source dir geefhd.
Building Android for this phone requires quite a bit of familiarity with the Android build system. If you are unfamiliar with things like makefiles and bash, I do not recommend trying this, as you'll pull out more of your hair than you can afford to lose.
That said, I'd recommend you have at least repo installed, or in your $PATH variable to make this guide a little easier to follow.
You also need to have the build utilities installed. See the CyanogenMod wiki for the build dependencies and how to install them.
Getting your tree set up
Well, it ain't Christmas, but let's put up the tree anyway.
For this guide, I'm going to assume you're like me, and you put all your Android projects in ~/android/.
Now after a few hours, you'll have a empty tree set up. Let's decorate!Code:mkdir -p ~/android/cm-10.1/ cd ~/android/cm-10.1/ repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1 repo sync
Getting the device repos set up
Once you have the basic CM skeleton in place, we need to add our device support files.
Congrats. Now you have the Android side of things ready, however you're not fully ready to start building-- you need a kernel!Code:mkdir -p ~/android/cm-10.1/device/lge cd ~/android/cm-10.1/device/lge git clone -b cm-10.1 https://github.com/TeamLGOG/android_device_lge_gee-common.git gee-common git clone https://github.com/thecubed/android_device_lge_gkatt.git gkatt
Getting the kernel repos ready
Next up: kernel.
You should now have a nice folder containing the kernel and everything you need to build it.Code:mkdir -p ~/android/cm-10.1/kernel/lge cd ~/android/cm-10.1/kernel/lge git clone https://github.com/thecubed/android_kernel_lge_geefhd.git geefhd
Great! What do I do with this?
You now have two options -- do you want to build Android AND a kernel, or just a kernel?
Let's assume you want to build a kernel only first.
Now you'll see some neat text from my setup script, it'll tell you what commands it just added to your shell and how to use them.Code:cd ~/android/cm-10.1/kernel/lge/geefhd . envsetup.sh
To build a kernel do this:
Then you can look in arch/arm/boot for a file called zImage, which is the kernel itself, ready to be used and abused.Code:make mrproper make gkatt_bcm-perf_defconfig make zImage
Once you're done and want to clean up, just run make clean or make mrproper to erase all tracks of ever building.
Keep in mind, "mrproper" erases your ".config" file, so before you can build again, you have to issue "make gkatt_bcm-perf_defconfig".
My envsetup script will warn you of that, just incase you forget
Now, let's assume you want to build an Android recovery image!
The environment is now ready for you to build...Code:cd ~/android/cm-10.1/ . build/envsetup.sh lunch cm_gkatt-userdebug
In about 10 mins you'll have a full recovery.img in $OUT.Code:mka recoveryimage
The neat thing about this is it builds the kernel inline with your build -- so you build a recovery AND a kernel at the same time.
This will save you a LOT of time testing kernels, since you don't have to manually unpack and repack the boot image after modifying the kernel.
To see your shiny new recovery.img file:
KEEP IN MIND you CANNOT flash these images! Flashing them will result in a security error!Code:cd $OUT
You can only fastboot boot these images. I'll post fastboot instructions shortly.
How do I get help??
Well, first things first, ask on IRC.
I'm nearly always around on Freenode. Join #lg-optimus-g and ask if I'm around.
I go by the name IOMonster on IRC. When I'm at work, I'm IOMonster_work.
Please don't just ask to ask a question, ask your full question.
Don't PM me unless you ask first, it's weird to get 20 PM windows open on my IRC client and not have any idea who is who or what they want... basic courtesy please
If by chance/miracle I'm not on IRC, post here. Again, I will not answer questions related to this via PM on XDA. I like answering things publicly so that others can read the answer. Google doesn't index PM's (yet, at least haha), so it doesn't do anyone any good to help you over PM unless it's something private.
I <3 you so much, how do I show my love?Let me know if I missed anything!
You are so kind
I most definitely do not expect donations of any kind, however they are appreciated a lot.
I purchased this phone off-contract just to get it unlocked, if you are a kind soul and would like to send me a token of your appreciation I would love you forever.
XDA has a neat "Donate to me" button that should be on the left side of this page under my name. Donations go to purchasing new hardware to work on and other neat stuff, so they're always appreciated.