Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

CM10.2 for the LG Optimus 2x

OP tonyp

9th August 2013, 05:43 AM   |  #1  
tonyp's Avatar
OP Recognized Developer / Contributor
Thanks Meter: 33,725
 
4,795 posts
Join Date:Joined: Feb 2011
Donate to Me
CM10.2 for the LG Optimus 2x


If you appreciate my work on the LG Optimus 2x you can support me by donating!

I am doing this for free in my leisure time because I like working on Android stuff and helping others out.
You're not required to donate, but I highly appreciate a couple free beers or pizzas as a gratidue for my work.


To quote one of the most famous xda developers:
Quote:
Originally Posted by Chainfire

Don't be a leech, buy me a beer (and use the "Thanks" button!). Imagine if every CF-Root user has donated me $1...

I am nowhere near his usercount, but just imagine if every happy (and only those) user of one of my ROMs has donated 5€+.



After some sleepless nights I am happy to present CM10.2 for the LG P990
The first post contains information for developers, the second one a download and changelog of my personal testbuilds.

My time is rather limited these days. I will maintain the p990 device tree for others to use and post my development test builds.
But I do not plan to support a clean CM10.2 build, as soon as I upgrade to my own fork of CM someone else will have to take over!


Core changelog:
Code:
2131109:
- buildflag optimizations (-Os for arm modules, slightly increases RAM)
- codebase updated to the CM-10.2-M1 snapshot (Android 4.3.1)


20130930:
- fixed camera getting stuck after taking a picture 
  (this isn't about camera FCs - try the norh kernel for them!)


20130930:
- fixed notifications causing media playback interruption


20130829:
- Hack: Disable Wifi suspend options by default 
  (this is a bcmdhd option not compatible to our bcm4329 drivers)
- Additional custom hardwarekeys button actions
- Add gesture based lockscreen security


20130824.2:
- option to use the external SD as primary
- using the T2 camera wrapper (which improves ISO, contrast and saturation)


20130824:
- removed all selinux/auditd etc. modules
- enabled timer coalescence/slack kernel functions by default
- fixed CPU speed options at the performance menu (tegra2 incompatibilities)

20130821:
- dalvik/vm: Dalvik startup with a low memory footprint (gives more free ram)
- built from the new consolidated device tree at https://github.com/p990-dev/

20130820:
- Camera fixed
- hardware OMX fix (mp4 videos in the stock player etc.)
- Google TTS non-neon incompatibility fixed

20130812:
- SoftAP (wifi hotspot) fixed (see details below)

20130809:
- initial CM10.2 build
- device tree updated for Android 4.3 including:
  fstab updates, RIL updates, CM10.2 source build incompatibilities fixed etc

Information for developers:

I have created a clean and consolidated device tree for cm-10.2 at p990-dev:
https://github.com/p990-dev/android_...ommits/cm-10.2

We do not need the split into p990 and star-common anymore (that has been done initially to support the p999), thus I decided to combine them.
I git merged them together to retain the 2.5 year old commit history (I really hate those "initial commit bringups, which destroy them completely).

It is only for the new bootloader, as we got a converter to support both.
But if someone wants to maintain a dedicated oldbl branch just send me a PM and I'll give you push access.

In order to build CM10.2 for the p990 we need to track frameworks/av to fix compiling and for the OMX stuff which fixes the camera.
I've set up a build manifest which you can use: https://github.com/p990-dev/android

If you want to fix the SoftAP (wifi hotspot) you need to track my modified system/netd package and apply the patch attached to this post to frameworks/base.
The fix isn't included by default because I'd have to maintain the frameworks/base package - and it would require almost daily updates or it gets out of sync with other packages relying on it causing the build to fail.


Compile your own CM10.2 ROM
For those of you who want to build your own ROM (which I can highly recommend) I've copied the excellent build setup instructions by @Raum1807 here, they should still work for CM10.2:
Quote:
Originally Posted by Raum1807

Make your 'own' ROM today!

0. Preparation

Things you need for building:

A computer
An internet connection
An open mind
Time
Patience


First of all you need a running up-to-date Ubuntu/Linux system. I am using Ubuntu 12.10 64-bit.

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.

IMPORTANT: INSTALL EVERYTHING AS A NORMAL USER. DON'T INSTALL AS ROOT!

[INDENTI. Installation of the required packages (Ubuntu 12.10 64-bit)[/SIZE]

Install packages:

Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
  python-markdown libxml2-utils schedtool pngcrush xsltproc zlib1g-dev:i386
Set the links:

Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
II. Installing JAVA

You need a Java Development Kit for building CM10. Recommended is the SUN JDK 6. As of writing the most recent version is SUN JDK 6 Update 38.

1. Download the jdk-6u38-linux-i586.bin from the Oracle/Sun Java Download Area. If you are on 64-bit Ubuntu as I am, you should grab jdk-6u38-linux-x64.bin.

2. Make the bin file executable:

Code:
$ chmod +x jdk-6u38-linux-x64.bin
3. Extract the bin file:

Code:
$ ./jdk-6u38-linux-x64.bin
4. Move the extracted folder to this this location:

Code:
$ sudo mv jdk1.6.0_38 /usr/lib/jvm/./jdk-6u38-linux-x64.bin
5. Install the new Java source in system:

Code:
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/java 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javaws 1
$ sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javadoc 1
$ sudo update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javah 1
$ sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javap 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/jar 1
6. Select the default Java version for your system:

Code:
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javaws
$ sudo update-alternatives --config javadoc
$ sudo update-alternatives --config javah
$ sudo update-alternatives --config javap
$ sudo update-alternatives --config jar
7. Check Java version:

Code:
$ java -version
8. Verify the symlinks. Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the new Java location and version:

Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
III. The sources

Install repo:

Repo is a tool that makes it quite easy to download and maintain the sources of Cyanogenmod.

[CODE]$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ cd ~/bin
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo



After this is done (one time only of course) you can build your own CM10.2 ROM.
There is no need to handle a local_manifest as I included the required repos into the main mainfest.
I've again used @Raum1807's instructions but updated them to CM10.2

Get the sources

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

Code:
$ mkdir ~/cm10.2
$ cd ~/cm10.2
Initialize Repo for Android CM10.2 (Android 4.3):

Code:
$ repo init -u git://github.com/p990-dev/android.git -b cm-10.2
and enter your credentials if needed.

Download the sources:

Code:
$ 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

Code:
$ repo sync
Initialize the environment

Code:
$ . build/envsetup.sh

Build the ROM

Code:
$ repo sync
$ breakfast p990
$ mka bacon
and flash it via CWM/TWRP. Make a clean start (if necessary) with format /system, wipe data/factory reset, etc..


Have fun!




Attached Files
File Type: patch SoftAPfix.patch - [Click for QR Code] (2.5 KB, 583 views)
Last edited by tonyp; 13th December 2013 at 01:09 PM.
The Following 238 Users Say Thank You to tonyp For This Useful Post: [ View ]
9th August 2013, 05:54 AM   |  #2  
tonyp's Avatar
OP Recognized Developer / Contributor
Thanks Meter: 33,725
 
4,795 posts
Join Date:Joined: Feb 2011
Donate to Me
for users
For users:

A download of my newest newbl testbuild is here:
http://tonyp.basketbuild.com/index.p...=main/CM-10.2/

It comes with kk 126 + kowalskimanager, mini gapps for 4.3.
Apart from my fixes to make this old device with ICS(!) blobs and an outdated kernel work it's mostly clean cm10.2 build.

Installation instructions (coming from another ROM than CM10.2):
Do a full wipe. Do another reboot after the first boot. Don't bitch.

Installation instructions (updating to a newer CM10.2 build):
Flash the ROM. Reboot. No wipes needed.

Quote:

Working:
- Nearly the same features as in CM10.1 (phone, wifi, data, etc).

Not working (oh and pretty please, no "reminders" of what's broken):
- BT is pretty much broken - see here for more details
- camera (yes, it's completely broken)
- wifi hotspot
- all the cm10.1 bugs are still there of course (hdmi etc.)


Changelog:

Code:
cm-10.2-20130824-UNOFFICIAL-p990.zip
- removed all selinux/auditd etc. modules.
- fixed setting the CPU speed at the performance menu
- enabled timer coalescence/slack kernel functions by default
- lowered the vibration strength
- merged upstream (JWR66Y is merged)


cm-10.2-20130821-UNOFFICIAL-p990.zip
- dalvik/vm: Dalvik startup with a low memory footprint 
- add the possiblity of using external sdcard as application storage for user 0
- added sys.mem.max_hidden_apps=4 to the build.prop 
- back to CM10.1 stock GPS files 

cm-10.2-20130820-UNOFFICIAL-p990.zip
- Camera fixed \o/
- hardware OMX fix (mp4 videos in the stock player etc.)
- added my memory management option from CM10.1 (more aggressive task killing)
- long press the clear recents button to clear cache
- enabled development settings for the device owner by default
- enabled camera shutter muting (follows device sound settings)
- re-added Focal
- Google TTS fix
- included mini gapps package updated
- merged upstream

cm-10.2-20130812-UNOFFICIAL-p990.zip
- SoftAP (wifi hotspot) fixed
- merged upstream


cm-10.2-20130809-UNOFFICIAL-p990.zip
- initial build

Last edited by tonyp; 9th November 2013 at 05:06 AM.
The Following 79 Users Say Thank You to tonyp For This Useful Post: [ View ]
9th August 2013, 06:25 AM   |  #3  
Senior Member
Thanks Meter: 124
 
659 posts
Join Date:Joined: Feb 2012
Thank you

Sent from my Nexus 4 using xda app-developers app
9th August 2013, 06:36 AM   |  #4  
SREEPRAJAY's Avatar
Forum Moderator
Flag CITY OF PARKS
Thanks Meter: 4,532
 
3,190 posts
Join Date:Joined: Jul 2010
More
here it is:

General Discussion here

Thanks for the adherence, compliance and understanding
The Following 19 Users Say Thank You to SREEPRAJAY For This Useful Post: [ View ]
10th August 2013, 05:10 PM   |  #5  
SREEPRAJAY's Avatar
Forum Moderator
Flag CITY OF PARKS
Thanks Meter: 4,532
 
3,190 posts
Join Date:Joined: Jul 2010
More
Old bootloader version
Tonyp's Unofficial JB 4.3 oldBL will be shortly available...
Thanks to @tonyp for the porting methods
Thanks to @Custom40 for the effort of packing/repacking boot.img

please hold on for sometime......maybe available to the testers soon

Thanks guys
The Following 16 Users Say Thank You to SREEPRAJAY For This Useful Post: [ View ]
20th August 2013, 03:13 PM   |  #6  
tonyp's Avatar
OP Recognized Developer / Contributor
Thanks Meter: 33,725
 
4,795 posts
Join Date:Joined: Feb 2011
Donate to Me
Sweet, I got the power to move threads from the dev discussion to this place
As the main issue seems fixed (spoiler alert - see below ) and I doubt there will come too much input from other developers anyways, I think we can continue this here.
Still try to use SREEPRAJAY thread for general input

Sooo... what's the big news.
Thanks to the help of @timduru I managed to find the missing piece which is required for this:





I will post a new build in the evening
Last edited by tonyp; 20th August 2013 at 03:22 PM.
The Following 95 Users Say Thank You to tonyp For This Useful Post: [ View ]
20th August 2013, 03:42 PM   |  #7  
Account currently disabled
Flag ND-BL-MB-KL
Thanks Meter: 7,568
 
2,452 posts
Join Date:Joined: Nov 2012
Donate to Me
More
Awesome Tony! You are EPIC man..Hats off

And for 4.3, let me try porting the LG cam!
The Following 16 Users Say Thank You to Jishnu Sur™ For This Useful Post: [ View ]
20th August 2013, 03:46 PM   |  #8  
SREEPRAJAY's Avatar
Forum Moderator
Flag CITY OF PARKS
Thanks Meter: 4,532
 
3,190 posts
Join Date:Joined: Jul 2010
More
That is called a good team.... @tonyp @pengus77 @spyrosk....as someone here said...you guys are preventing users from buying a new one....lol
Thanks a lot


And @Jishnu Sur joining for the cam....
And so many others who are behind the screen
BTW should I try porting it to the old bl?

Sent from my LG-P990 using xda premium
The Following 8 Users Say Thank You to SREEPRAJAY For This Useful Post: [ View ]
20th August 2013, 03:50 PM   |  #9  
JUMPhil's Avatar
Senior Member
Flag Bochum
Thanks Meter: 71
 
149 posts
Join Date:Joined: Jun 2011
More
Quote:
Originally Posted by tonyp

[…]
As the main issue seems fixed (spoiler alert - see below ) […]

Sooo... what's the big news.
Thanks to the help of @timduru I managed to find the missing piece which is required for this:





I will post a new build in the evening

Ermahgerd you're such a genius, man. Thank you so much for your effort. I'm glad you finally found the missing piece required for the plant.
Last edited by JUMPhil; 20th August 2013 at 03:54 PM.
The Following 2 Users Say Thank You to JUMPhil For This Useful Post: [ View ]
20th August 2013, 03:53 PM   |  #10  
chp2's Avatar
Senior Member
Thanks Meter: 82
 
268 posts
Join Date:Joined: Jan 2013
More
Tony, you're fantastic.

I can't say all my current feelings right now but I'm heating alot (me not my P990, )
It's the first time in my life I hope to be back from hollydays soon to be able to download these new builds.

And any news about Github?
Last edited by chp2; 20th August 2013 at 03:56 PM.

The Following User Says Thank You to chp2 For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes