Jump to content


Photo

Building CM9 for the LG E400 for yourself

- - - - -

  • Please log in to reply
8 replies to this topic

#1
hecatae

hecatae

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 3,195 posts
  • Gender:Male
  • Location:northampton
  • Devices:Samsung i9305
  • Twitter:@meritez
Make sure you have:
Ubuntu 12.04 (Precise Pangolin) 64-bit
Your computer has at least 4GB RAM
Good Internet connection
install dependencies:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
  zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev \
  ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 \
  lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 \
  tofrodos python-markdown libxml2-utils xsltproc readline-common \
  libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev \
  lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 \
  libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev \
  libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.6-dev
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

Configure USB:

$ gksudo gedit /etc/udev/rules.d/51-android.rules
add this to the above:

#Garmin-Asus
SUBSYSTEM==usb", ATTR{idVendor}==091E", MODE=0666"

#Google
SUBSYSTEM==usb", ATTR{idVendor}==18d1", MODE=0666"

#HTC
SUBSYSTEM==usb", ATTR{idVendor}==0bb4", MODE=0666"

#Huawei
SUBSYSTEM==usb", ATTR{idVendor}==12d1", MODE=0666"

#K-Touch
SUBSYSTEM==usb", ATTR{idVendor}==24e3", MODE=0666"

#KT Tech
SUBSYSTEM==usb", ATTR{idVendor}==2116", MODE=0666"

#Kyocera
SUBSYSTEM==usb", ATTR{idVendor}==0482", MODE=0666"

#Lenovo
SUBSYSTEM==usb", ATTR{idVendor}==17EF", MODE=0666"

#LG
SUBSYSTEM==usb", ATTR{idVendor}==1004", MODE=0666"

#Motorola
SUBSYSTEM==usb", ATTR{idVendor}==22b8", MODE=0666"

#NEC
SUBSYSTEM==usb", ATTR{idVendor}==0409", MODE=0666"

#Nook
SUBSYSTEM==usb", ATTR{idVendor}==2080", MODE=0666"

#Nvidia
SUBSYSTEM==usb", ATTR{idVendor}==0955", MODE=0666"

#OTGV
SUBSYSTEM==usb", ATTR{idVendor}==2257", MODE=0666"

#Pantech
SUBSYSTEM==usb", ATTR{idVendor}==10A9", MODE=0666"

#Philips
SUBSYSTEM==usb", ATTR{idVendor}==0471", MODE=0666"

#PMC-Sierra
SUBSYSTEM==usb", ATTR{idVendor}==04da", MODE=0666"

#Qualcomm
SUBSYSTEM==usb", ATTR{idVendor}==05c6", MODE=0666"

#SK Telesys
SUBSYSTEM==usb", ATTR{idVendor}==1f53", MODE=0666"

#Samsung
SUBSYSTEM==usb", ATTR{idVendor}==04e8", MODE=0666"

#Sharp
SUBSYSTEM==usb", ATTR{idVendor}==04dd", MODE=0666"

#Sony Ericsson
SUBSYSTEM==usb", ATTR{idVendor}==0fce", MODE=0666"

#Toshiba
SUBSYSTEM==usb", ATTR{idVendor}==0930", MODE=0666"

#ZTE
SUBSYSTEM==usb", ATTR{idVendor}==19D2", MODE=0666"


Set proper permissions:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules

JAVA JDK Installation:
http://www.oracle.co...ds-1637591.html

$ sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*

install Java JDK:

$ sudo mkdir -p /opt/java/64/
$ sudo cp jdk-6u34-linux-x64.bin /opt/java/64
$ sudo su -
$ cd /opt/java/64
$ chmod +x jdk-6u34-linux-x64.bin
$ ./jdk-6u34-linux-x64.bin
$ exit

Add JDK PATH to .bashrc:

$ gksudo gedit ~/.bashrc

Add these lines:

# Java PATHs
export JAVA_HOME=/opt/java/64/jdk1.6.0_34
export PATH=$PATH:$JAVA_HOME/bin

Android SDK:

Download the SDK here:

http://developer.and.../sdk/index.html

Extract the SDK and place it in your home directory.

Add AndroidSDK PATH to .bashrc:

$ gksudo gedit .bashrc

Add the following lines:

# Android tools
export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin

Add PATH to .profile:
$ gksudo gedit .profile

Add these lines:
PATH=$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"

To use the ADB Update software (or to verify a working adb path), use the following command:

$ android

Install the Repo:

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

Initialize the CyanogenMOD 9 Repo:

$ mkdir android
$ cd android
$ mkdir system
$ cd system
$ repo init -u git://github.com/CyanogenMod/android.git -b ics

Finally:

$ repo sync -j16

borrowed and adapted from Compile ParanoidAndroid

  • 0

#2
hecatae

hecatae

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 3,195 posts
  • Gender:Male
  • Location:northampton
  • Devices:Samsung i9305
  • Twitter:@meritez
next

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

then

cd ~/android/system
. build/envsetup.sh
breakfast e400

this will pull down all e400 files and dependencies.

now connect your e400 with adb enabled and run

/android/system/device/lge/e400/extract-files.sh

this will pull all props from your device

run
brunch e400

  • 0

#3
sparhawk76

sparhawk76

    Newbie

  • Members
  • Pip
  • 9 posts
  • Devices:lg e400r
In the process of getting my build environment set up ... following your guide and found one ommission.

Before running "breakfast e400", you have to do the following:

cd ~/android/system
. build/envsetup.sh

Thanks for the great guide.

Sparhawk

  • 0

#4
hecatae

hecatae

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 3,195 posts
  • Gender:Male
  • Location:northampton
  • Devices:Samsung i9305
  • Twitter:@meritez
you also need to run:

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

In the process of getting my build environment set up ... following your guide and found one ommission.

Before running "breakfast e400", you have to do the following:

cd ~/android/system
. build/envsetup.sh

Thanks for the great guide.

Sparhawk


you ran extract-files.sh yet?

  • 0

#5
sparhawk76

sparhawk76

    Newbie

  • Members
  • Pip
  • 9 posts
  • Devices:lg e400r
Yep ... although think the files I pulled back from my phone weren't working properly as my stock rom is GB based.

Trying another build right now incorporating some of the libs you sent me as you say they are ICS versions. Instead of using extract-files.sh, I have been manually copying the libs into the proprietary folder, and have been modifying proprietary-files.txt and running setup-makefiles.sh.

Just trying to learn my way around the android build system ... made a separate branch for the e400r in my build tree, got "USE_CCACHE=1 brunch e400r" running as I type this.

Learning alot as I go, but it's an exciting journey. Hoping I get some results out of this current build, will keep you updated.

  • 0

#6
hecatae

hecatae

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 3,195 posts
  • Gender:Male
  • Location:northampton
  • Devices:Samsung i9305
  • Twitter:@meritez
to get cm9 working for the e400r it "should" only need the ril libs replacing

  • 0

#7
hecatae

hecatae

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 3,195 posts
  • Gender:Male
  • Location:northampton
  • Devices:Samsung i9305
  • Twitter:@meritez
anyone got the msm-3.0.8 kernel?

  • 0

#8
yayakuya

yayakuya

    Enthusiast

  • Members
  • PipPipPip
  • 178 posts
  • Gender:Male
  • Location:Indonesia
  • Devices:Sony Xperia E, HTC Desire VC
i think not yet.... :(
if there's already, i can't wait to port PACman into L3

  • 0

#9
hecatae

hecatae

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 3,195 posts
  • Gender:Male
  • Location:northampton
  • Devices:Samsung i9305
  • Twitter:@meritez

https://github.com/T...ge-kernel-lproj

 

3.4 kernel, currently on irc.freenode.net #teamhacklg trying to make the l3 boot 3.4 kernel

 

l3 specific branch to try and get this working: https://github.com/T...tree/l3/3.4/4.1


  • 1




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users