[LG Optimus 2x] Raum1807:
Build your 'own' CM10.1 ROM (Android 4.2.1) today!

Revision V1.3 2013.01.09 Updates: No more patching needed. local_manifest.xml updated to new branch revision. Text updates.

Revision V1.2 2012.12.13 Updates: Repo sync branch finally changed from mr1-staging to cm-10.1. Thanks HerrKuk.

Revision V1.1 2012.12.11 Updates: New Patch: WiFi shows networks, BT works, audio.h reworked, notification lights are back, USB mass-storage support included. Compatible to V30A Kernel.

Revision V1.0 2012.12.01 Initial release

Thank you note: Thanks to Ricardo Cerqueira for his work on this device.Thanks to marsgod for BT and WiFi patches/tips.

General note: Please keep in mind that CM10.1 is still experimental. This guide is for those who cannot wait...

Preparation

What you need:

You need a fully working build environment. If you don't have one running already, you can follow my guide in the other thread to get a fully working environment under Ubuntu 12.10 64bit. Follow the easy steps in the guide. Make a test build with CM10 to see if it is working. Then you will be ready for the next step.

Your build environment is now set? Good, let's start!

Use the terminal to make the steps. A terminal window can be opened by pressing Ctrl+Alt+T. Every single command for the terminal is marked with a $ sign. Just paste every command (without the $ sign) to your terminal window and there shouldn't be any problem.

Get the sources

Start with creating a new working directory for CM10.1:

$ mkdir ~/cm10.1
$ cd ~/cm10.1

Initialize Repo for Android CM10.1 (Android 4.2.1):

$ repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1

and enter your credentials if needed.

Download the sources:

$ repo sync

Wait until it's finished (takes a lot of time!).

If the process hangs use Ctrl+C to break out of it and resume the download with another

$ repo sync

Initialize the environment

$ . build/envsetup.sh

Obtain the proprietary files:

Create a file with the name local_manifest.xml in the .repo directory to add additional sources. To see the hidden .repo directory, you have to press Ctrl-H in your file manager.

Create the xml-file with

$ gedit ~/cm10.1/.repo/local_manifest.xml

20130109: Update! New branch revisions!

Paste the following lines to the editor

<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-10.1"/>
<project name="CyanogenMod/android_device_lge_p990" path="device/lge/p990" remote="github" revision="cm-10.1"/>
<project name="CyanogenMod/android_device_lge_star-common" path="device/lge/star-common" remote="github" revision="cm-10.1"/>
<project name="CyanogenMod/lge-kernel-star" path="kernel/lge/star" remote="github" revision="cm-10.1"/>
</manifest>

Save the file.

Run another

$ repo sync

Download the necessary prebuilts from cyanogenmod by running

$ ~/cm10.1/vendor/cm/get-prebuilts

Ok. That's done!

Patching

20130109: Thanks to Ricardo Cerqueira's Update to the CyanogenMod repos there is no more patching needed!

Only for those who have patched the sources before and want to build with the new sources. If you are new to this skip the 'Patching' part and go to 'Build the ROM' directly.

If you have patched/changed the sources and want to get up-to-date, here is what you can do:

change the local.manifest.xml file that it looks like the one you see above

delete all the directories inside your ~/cm10.1/ directory but keep the hidden .repo directory

repo sync now and the missing files will be downloaded and the whole structure will be recreated without redownloading the repos you already have

get the prebuilts with ~/cm10.1/vendor/cm/get-prebuilts

and this is it, just brunch p990 again

Build the ROM

$ repo sync
$ brunch p990

and flash it via CWM. Make a clean start (if necessary) with format /system, wipe data/factory reset, etc..

Have fun!