[G2 Android Development (D802)] ny-hardcore:
Hi, beanstalk 4.3 compiling for LG-G2 D802 isn't that complicated.

Beanstalk

1. Setup your machine for compiling android (there's loads of guides explaining how to do this).

2. Open terminal in the directory you will be using, and do a: 'repo init -u git://github.com/scotthartbti/android.git -b jb43' (without the ' )

3. Then do a 'repo sync' and wait for a long time

4. Add a file in .repo/local_manifests with the following content

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

<remote name="github"
fetch=".."
review="review.cyanogenmod.org" />

<project path="device/lge/g2-common" name="CyanogenMod/android_device_lge_g2-common" remote="github" revision="cm-10.2" />
<project path="device/lge/d802" name="CyanogenMod/android_device_lge_d802" remote="github" revision="cm-10.2" />
<project path="device/lge/vs980" name="CyanogenMod/android_device_lge_vs980" remote="github" revision="cm-10.2" />
<project path="device/lge/d800" name="CyanogenMod/android_device_lge_d800" remote="github" revision="cm-10.2" />
<project path="hardware/qcom/display-mdss" name="CyanogenMod/android_hardware_qcom_display-mdss" remote="github" revision="cm-10.2" />
<project path="hardware/qcom/media-v4l2" name="CyanogenMod/android_hardware_qcom_media-v4l2" remote="github" revision="cm-10.2" />
<project path="kernel/lge/msm8974" name="CyanogenMod/android_kernel_lge_msm8974" remote="github" revision="cm-10.2" />

5. Do a 'repo sync' again

6. Then in the "device/lge/g2-common" directory edit "overlay/frameworks/base/core/res/res/values/config.xml" and

do this

change
<integer name="config_deviceHardwareKeys">0</integer>
to
<integer name="config_deviceHardwareKeys">1</integer>

this will fix the homebutton not working on beanstalk.

7. Then get back to the main directory you started in.

8. Do a '. build/envsetup.sh' (there is DOT and SPACE before build!)

9. Do a 'breakfast 'devicename' where devicename is your device name i.e d802 or vs980 (i'm not sure if this is needed, but do it anyway)

10. Do 'brunch 'devicename' where devicename is your device name i.e d802 or vs980

11. wait

12. go to out/target/product/'devicename'/ and find you .zip file ready for flashing :)

If you do a new repo sync, the stuff in step 6 will get overwritten and you have to this again, branching with git will solve this, google it, git has a nice online help

AOKP

Building AOKP is a bit harder because you need to revert some more CM device commits and add the d802 to the vendor/aokp.

1. Do step 1 from above

2. do a 'repo init -u https://github.com/AOKP/platform_manifest.git -b jb-mr2' in the directory you want to build AOKP in.

3. do step 3 & 4 & 5

4.

Look at the following commits to see how i added the D802 to AOKP

https://github.com/koen01/vendor_aokp/commit/f3c63a7e76207c8779a9001878d52471454baeaf

and

https://github.com/koen01/vendor_aokp/commit/909c3c4b8eaeb91b2bfbede957635cbf0f80f151

Create all these file in your own vendor/aokp or try to cherrypick them from my github :)

This one is if you are building for the VS980 (remember to add the device/lge/vs980 to the local_manifest or else you will miss the device tree)

https://github.com/koen01/vendor_aokp/commit/36f816d027015781d8ae2bd4e427763149125034

5. edit device/lge/g2-common/overlay/frameworks/base/packages/SystemUI/res/values/config.xml

and delete following because AOKP doenst know them:

<!-- Is the battery LED intrusive? Used to decide if there should be a disable option -->
<bool name="config_intrusiveBatteryLed">true</bool>

<!-- Does the battery LED support multiple colors? Used to decide if the user can change the colors -->
<bool name="config_multiColorBatteryLed">true</bool>

<!-- Should "4G" be shown instead of "LTE" when the network is
NETWORK_TYPE_LTE? -->
<bool name="config_show4GForLTE">false</bool>

6. Do step 8 to 12

NB: Most of the stuff here can be applied to all sorts off roms that are CM based...