[Tutorial] Building CyanogenMod for G2x

Search This thread

ZeroT| Demented

Senior Member
Jul 27, 2011
363
32
this tutorial should really be fixed because when ever i try to sync i get fatal error could not connect to github.com port 9148 or something like that
 

kwes1020

Senior Member
Apr 19, 2011
822
875
Port Arthur, Texas
I tried this out today, its building right now. Everything went smooth so far though. Thanks for the guide. Now I just need to figure out what else I want to try to add to it.

Sent from my LG-P999 using xda premium
 
Code:
sudo apt-get update && sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev gitg qt3-dev-tools libqt3-mt-dev eclipse valgrind pngcrush schedtool

I had to replace lib32readline5-dev with lib32readline-gplv2-dev. I'm on 11.11 kubuntu x64.
 

Dj-Dubster_TN

Senior Member
Apr 14, 2011
688
43
i know this may not be the correct place to post this but i figured one of you will know, how the hell can i get wireless connectivity to function correctly on ubuntu 11.10, i just installed it because im going to try and compile cm7, but i cant connect to the internet, i enter the right password for my network but it still wont connect, tells me i have the wrong password, and the security type is right too
 

Dj-Dubster_TN

Senior Member
Apr 14, 2011
688
43
Mine worked off the bat. Inserted Belkin USB adaptor, put key in and it was fine.

Well I'm using the built in adapter on my Samsung series 7 chronos, and even if I insert an adapter I cant install drivers cause they are
.exe and I cant figure out how to run those on ubuntu

Sent from my LG-P999 using xda premium
 

Dj-Dubster_TN

Senior Member
Apr 14, 2011
688
43

Dj-Dubster_TN

Senior Member
Apr 14, 2011
688
43
Can anyone tell me what im doing wrong?


jarred@ubuntu:~$ cd ~/cm7 && make clean && repo sync -j6 && . build/envsetup.sh && brunch p999
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.7
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================
^[[ACleaning out/target/product/generic...
Cleaning out/target/common...
Clean.
Fetching projects: 19% (60/312) remote: Counting objects: 26, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 16 (delta 6), reused 14 (delta 5)
Unpacking objects: 100% (16/16), done.
Fetching projects: 20% (63/312) From git://github.com/CyanogenMod/android_device_motorola_olympus
91bba6d..a773921 gingerbread -> github/gingerbread
Fetching projects: 100% (312/312), done.
Syncing work tree: 100% (312/312), done.

including device/advent/vega/vendorsetup.sh
including device/bn/encore/vendorsetup.sh
including device/geeksphone/one/vendorsetup.sh
including device/htc/ace/vendorsetup.sh
including device/htc/bravoc/vendorsetup.sh
including device/htc/bravo/vendorsetup.sh
including device/htc/buzz/vendorsetup.sh
including device/htc/click/vendorsetup.sh
including device/htc/desirec/vendorsetup.sh
including device/htc/dream_sapphire/vendorsetup.sh
including device/htc/espresso/vendorsetup.sh
including device/htc/glacier/vendorsetup.sh
including device/htc/heroc/vendorsetup.sh
including device/htc/hero/vendorsetup.sh
including device/htc/inc/vendorsetup.sh
including device/htc/legend/vendorsetup.sh
including device/htc/leo/vendorsetup.sh
including device/htc/liberty/vendorsetup.sh
including device/htc/mecha/vendorsetup.sh
including device/htc/passion/vendorsetup.sh
including device/htc/saga/vendorsetup.sh
including device/htc/speedy/vendorsetup.sh
including device/htc/supersonic/vendorsetup.sh
including device/htc/vision/vendorsetup.sh
including device/htc/vivo/vendorsetup.sh
including device/htc/vivow/vendorsetup.sh
including device/huawei/u8150/vendorsetup.sh
including device/huawei/u8220/vendorsetup.sh
including device/lge/p999/vendorsetup.sh
including device/malata/smb_a1002/vendorsetup.sh
including device/malata/smb_b9701/vendorsetup.sh
including device/motorola/droid2/vendorsetup.sh
including device/motorola/droid2we/vendorsetup.sh
including device/motorola/jordan/vendorsetup.sh
including device/motorola/morrison/vendorsetup.sh
including device/motorola/motus/vendorsetup.sh
including device/motorola/olympus/vendorsetup.sh
including device/motorola/shadow/vendorsetup.sh
including device/motorola/sholes/vendorsetup.sh
including device/motorola/zeppelin/vendorsetup.sh
including device/samsung/captivatemtd/vendorsetup.sh
including device/samsung/cooper/vendorsetup.sh
including device/samsung/crespo4g/vendorsetup.sh
including device/samsung/crespo/vendorsetup.sh
including device/samsung/epicmtd/vendorsetup.sh
including device/samsung/fascinatemtd/vendorsetup.sh
including device/samsung/galaxys2att/vendorsetup.sh
including device/samsung/galaxys2/vendorsetup.sh
including device/samsung/galaxysbmtd/vendorsetup.sh
including device/samsung/galaxysmtd/vendorsetup.sh
including device/samsung/mesmerizemtd/vendorsetup.sh
including device/samsung/showcasemtd/vendorsetup.sh
including device/samsung/sidekick4g/vendorsetup.sh
including device/samsung/tass/vendorsetup.sh
including device/samsung/vibrantmtd/vendorsetup.sh
including device/semc/mimmi/vendorsetup.sh
including device/semc/robyn/vendorsetup.sh
including device/semc/shakira/vendorsetup.sh
including device/zte/blade/vendorsetup.sh
including device/zte/v9/vendorsetup.sh
including vendor/cyanogen/vendorsetup.sh
including vendor/cyanogen/vendorsetup.sh

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.7
TARGET_PRODUCT=cyanogen_p999
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.7
TARGET_PRODUCT=cyanogen_p999
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================
find: `out/target/common/docs/gen': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
build/core/Makefile:32: warning: overriding commands for target `out/target/product/p999/system/bin/rild'
build/core/base_rules.mk:474: warning: ignoring old commands for target `out/target/product/p999/system/bin/rild'
build/core/Makefile:32: warning: overriding commands for target `out/target/product/p999/system/etc/wifi/wpa_supplicant.conf'
build/core/base_rules.mk:474: warning: ignoring old commands for target `out/target/product/p999/system/etc/wifi/wpa_supplicant.conf'
build/core/Makefile:32: warning: overriding commands for target `out/target/product/p999/system/etc/dhcpcd/dhcpcd.conf'
build/core/base_rules.mk:474: warning: ignoring old commands for target `out/target/product/p999/system/etc/dhcpcd/dhcpcd.conf'
build/core/Makefile:32: warning: overriding commands for target `out/target/product/p999/system/usr/keylayout/qwerty.kl'
sdk/emulator/keymaps/Android.mk:13: warning: ignoring old commands for target `out/target/product/p999/system/usr/keylayout/qwerty.kl'
build/core/Makefile:32: warning: overriding commands for target `out/target/product/p999/system/lib/libril.so'
build/core/base_rules.mk:474: warning: ignoring old commands for target `out/target/product/p999/system/lib/libril.so'
build/core/Makefile:32: warning: overriding commands for target `out/target/product/p999/root/init.rc'
system/core/rootdir/Android.mk:42: warning: ignoring old commands for target `out/target/product/p999/root/init.rc'
No private recovery resources for TARGET_DEVICE p999
host C: mkbootfs <= system/core/cpio/mkbootfs.c
host C: acp <= build/tools/acp/acp.c
host C: libhost <= build/libs/host/CopyFile.c
target thumb C: init <= system/core/init/builtins.c
host C++: libhost <= build/libs/host/pseudolocalize.cpp
target thumb C: init <= system/core/init/init.c
target thumb C: init <= system/core/init/devices.c
target thumb C: init <= system/core/init/property_service.c
In file included from build/libs/host/CopyFile.c:11:0:
build/libs/host/include/host/CopyFile.h:5:22: fatal error: sys/stat.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/CopyFile.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from /usr/include/stdlib.h:25:0,
from build/tools/acp/acp.c:11:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
In file included from /usr/include/stdio.h:28:0,
from system/core/cpio/mkbootfs.c:2:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/mkbootfs.o] Error 1
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1
In file included from /usr/include/c++/4.6/x86_64-linux-gnu/32/bits/os_defines.h:40:0,
from /usr/include/c++/4.6/x86_64-linux-gnu/32/bits/c++config.h:392,
from /usr/include/c++/4.6/string:40,
from build/libs/host/include/host/pseudolocalize.h:4,
from build/libs/host/pseudolocalize.cpp:1:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 1
jarred@ubuntu:~/cm7$ cd
jarred@ubuntu:~$ cd ~/cm7 && make clean && repo sync -f && . build/envsetup.sh && brunch p999
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.7
TARGET_PRODUCT=cyanogen_p999
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================
Cleaning out/target/product/p999...
Cleaning out/target/common...
Clean.
Fetching projects: 100% (312/312), done.

including device/advent/vega/vendorsetup.sh
including device/bn/encore/vendorsetup.sh
including device/geeksphone/one/vendorsetup.sh
including device/htc/ace/vendorsetup.sh
including device/htc/bravoc/vendorsetup.sh
including device/htc/bravo/vendorsetup.sh
including device/htc/buzz/vendorsetup.sh
including device/htc/click/vendorsetup.sh
including device/htc/desirec/vendorsetup.sh
including device/htc/dream_sapphire/vendorsetup.sh
including device/htc/espresso/vendorsetup.sh
including device/htc/glacier/vendorsetup.sh
including device/htc/heroc/vendorsetup.sh
including device/htc/hero/vendorsetup.sh
including device/htc/inc/vendorsetup.sh
including device/htc/legend/vendorsetup.sh
including device/htc/leo/vendorsetup.sh
including device/htc/liberty/vendorsetup.sh
including device/htc/mecha/vendorsetup.sh
including device/htc/passion/vendorsetup.sh
including device/htc/saga/vendorsetup.sh
including device/htc/speedy/vendorsetup.sh
including device/htc/supersonic/vendorsetup.sh
including device/htc/vision/vendorsetup.sh
including device/htc/vivo/vendorsetup.sh
including device/htc/vivow/vendorsetup.sh
including device/huawei/u8150/vendorsetup.sh
including device/huawei/u8220/vendorsetup.sh
including device/lge/p999/vendorsetup.sh
including device/malata/smb_a1002/vendorsetup.sh
including device/malata/smb_b9701/vendorsetup.sh
including device/motorola/droid2/vendorsetup.sh
including device/motorola/droid2we/vendorsetup.sh
including device/motorola/jordan/vendorsetup.sh
including device/motorola/morrison/vendorsetup.sh
including device/motorola/motus/vendorsetup.sh
including device/motorola/olympus/vendorsetup.sh
including device/motorola/shadow/vendorsetup.sh
including device/motorola/sholes/vendorsetup.sh
including device/motorola/zeppelin/vendorsetup.sh
including device/samsung/captivatemtd/vendorsetup.sh
including device/samsung/cooper/vendorsetup.sh
including device/samsung/crespo4g/vendorsetup.sh
including device/samsung/crespo/vendorsetup.sh
including device/samsung/epicmtd/vendorsetup.sh
including device/samsung/fascinatemtd/vendorsetup.sh
including device/samsung/galaxys2att/vendorsetup.sh
including device/samsung/galaxys2/vendorsetup.sh
including device/samsung/galaxysbmtd/vendorsetup.sh
including device/samsung/galaxysmtd/vendorsetup.sh
including device/samsung/mesmerizemtd/vendorsetup.sh
including device/samsung/showcasemtd/vendorsetup.sh
including device/samsung/sidekick4g/vendorsetup.sh
including device/samsung/tass/vendorsetup.sh
including device/samsung/vibrantmtd/vendorsetup.sh
including device/semc/mimmi/vendorsetup.sh
including device/semc/robyn/vendorsetup.sh
including device/semc/shakira/vendorsetup.sh
including device/zte/blade/vendorsetup.sh
including device/zte/v9/vendorsetup.sh
including vendor/cyanogen/vendorsetup.sh
including vendor/cyanogen/vendorsetup.sh

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.7
TARGET_PRODUCT=cyanogen_p999
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.7
TARGET_PRODUCT=cyanogen_p999
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================
find: `out/target/common/docs/gen': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
build/core/Makefile:32: warning: overriding commands for target `out/target/product/p999/system/bin/rild'
build/core/base_rules.mk:474: warning: ignoring old commands for target `out/target/product/p999/system/bin/rild'
build/core/Makefile:32: warning: overriding commands for target `out/target/product/p999/system/etc/wifi/wpa_supplicant.conf'
build/core/base_rules.mk:474: warning: ignoring old commands for target `out/target/product/p999/system/etc/wifi/wpa_supplicant.conf'
build/core/Makefile:32: warning: overriding commands for target `out/target/product/p999/system/etc/dhcpcd/dhcpcd.conf'
build/core/base_rules.mk:474: warning: ignoring old commands for target `out/target/product/p999/system/etc/dhcpcd/dhcpcd.conf'
build/core/Makefile:32: warning: overriding commands for target `out/target/product/p999/system/usr/keylayout/qwerty.kl'
sdk/emulator/keymaps/Android.mk:13: warning: ignoring old commands for target `out/target/product/p999/system/usr/keylayout/qwerty.kl'
build/core/Makefile:32: warning: overriding commands for target `out/target/product/p999/system/lib/libril.so'
build/core/base_rules.mk:474: warning: ignoring old commands for target `out/target/product/p999/system/lib/libril.so'
build/core/Makefile:32: warning: overriding commands for target `out/target/product/p999/root/init.rc'
system/core/rootdir/Android.mk:42: warning: ignoring old commands for target `out/target/product/p999/root/init.rc'
No private recovery resources for TARGET_DEVICE p999
Header: out/target/product/p999/obj/include/libexpat/expat.h
Header: out/target/product/p999/obj/include/libexpat/expat_external.h
Header: out/target/product/p999/obj/include/libpng/png.h
Header: out/target/product/p999/obj/include/libpng/pngconf.h
Header: out/target/product/p999/obj/include/libpng/pngusr.h
Header: out/target/product/p999/obj/include/libsonivox/eas.h
Header: out/target/product/p999/obj/include/libsonivox/eas_types.h
Header: out/target/product/p999/obj/include/libsonivox/eas_reverb.h
Header: out/target/product/p999/obj/include/libsonivox/jet.h
Header: out/target/product/p999/obj/include/libsonivox/ARM_synth_constants_gnu.inc
Header: out/target/product/p999/obj/include/libwpa_client/wpa_ctrl.h
Directory: out/target/product/p999/root/sbin
Directory: out/target/product/p999/root/dev
Directory: out/target/product/p999/root/proc
Directory: out/target/product/p999/root/sys
Directory: out/target/product/p999/root/system
Directory: out/target/product/p999/root/data
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc -mthumb-interwork -Ibionic/libc/private -DCRT_LEGACY_WORKAROUND -o out/target/product/p999/obj/lib/crtbegin_static.o -c bionic/libc/arch-arm/bionic/crtbegin_static.S
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc -mthumb-interwork -Ibionic/libc/private -DCRT_LEGACY_WORKAROUND -o out/target/product/p999/obj/lib/crtbegin_so.o -c bionic/libc/arch-arm/bionic/crtbegin_so.S
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc -mthumb-interwork -Ibionic/libc/private -DCRT_LEGACY_WORKAROUND -o out/target/product/p999/obj/lib/crtend_so.o -c bionic/libc/arch-arm/bionic/crtend_so.S
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc -mthumb-interwork -Ibionic/libc/private -DCRT_LEGACY_WORKAROUND -o out/target/product/p999/obj/lib/crtend_android.o -c bionic/libc/arch-arm/bionic/crtend.S
Notice file: system/core/init/NOTICE -- out/target/product/p999/obj/NOTICE_FILES/src//root/init.txt
Notice file: bionic/libc/NOTICE -- out/target/product/p999/obj/NOTICE_FILES/src//system/lib/libc.so.txt
Notice file: bionic/libdl/NOTICE -- out/target/product/p999/obj/NOTICE_FILES/src//system/lib/libdl.so.txt
Notice file: bionic/libc/NOTICE -- out/target/product/p999/obj/NOTICE_FILES/src//system/lib/libc_common.a.txt
Notice file: bionic/libstdc++/NOTICE -- out/target/product/p999/obj/NOTICE_FILES/src//system/lib/libstdc++.so.txt
Notice file: bionic/libm/NOTICE -- out/target/product/p999/obj/NOTICE_FILES/src//system/lib/libm.so.txt
Notice file: system/core/liblog/NOTICE -- out/target/product/p999/obj/NOTICE_FILES/src//system/lib/liblog.a.txt
Notice file: system/core/libcutils/NOTICE -- out/target/product/p999/obj/NOTICE_FILES/src//system/lib/libcutils.a.txt
Notice file: bionic/libc/NOTICE -- out/target/product/p999/obj/NOTICE_FILES/src//system/lib/libc.a.txt
Notice file: system/core/adb/NOTICE -- out/target/product/p999/obj/NOTICE_FILES/src//root/sbin/adbd.txt
Target buildinfo: out/target/product/p999/root/default.prop
Lex: libedify <= bootable/recovery/edify/lexer.l
Lex: libedify <= bootable/recovery/edify/lexer.l
Notice file: bootable/recovery/NOTICE -- out/target/product/p999/obj/NOTICE_FILES/src//system/bin/recovery.txt
/bin/bash: flex: command not found
/bin/bash: flex: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/edify_intermediates/lexer.cpp] Error 127
make: *** Waiting for unfinished jobs....
make: *** [out/target/product/p999/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp] Error 127
 

dubntz

Senior Member
Jun 25, 2010
85
97
I'm Stumped

Can anyone shed some light on what is happening here? I have been able to compile this so many times and now i'm running into this issue. Thanks!

dubntz@dubntz-desktop:~$ cd ~/cm7 && make clean && repo sync -j6 && . build/envsetup.sh && brunch p999
build/core/product_config.mk:198: *** device/semc/coconut/device_coconut.mk: PRODUCT_NAME must be unique; "Xperia Live" already used by device/semc/anzu/device_anzu.mk device/semc/coconut/device_coconut.mk device/semc/es209ra/device_es209ra.mk device/semc/hallon/device_hallon.mk device/semc/iyokan/device_iyokan.mk device/semc/mango/device_mango.mk device/semc/mimmi/device_mimmi.mk device/semc/robyn/device_robyn.mk device/semc/satsuma/device_satsuma.mk device/semc/shakira/device_shakira.mk device/semc/smultron/device_smultron.mk device/semc/urushi/device_urushi.mk device/semc/zeus/device_zeus.mk device/semc/zeusc/device_zeusc.mk . Stop.
 
Last edited:

IRASadPanda

Senior Member
Dec 30, 2011
1,751
296
Johns Creek
Okay, so I'm pretty sure my computer can handle this, the only thing I'm worried about is that I only have a dual core 1.65 GHz processor... Sad, I know. But I do have 4 GB RAM, is that good enough?
 

jaywillsoul

Senior Member
Apr 3, 2012
156
28
Vineland
Can anyone shed some light on what is happening here? I have been able to compile this so many times and now i'm running into this issue. Thanks!
PRODUCT_NAME must be unique; "Xperia Live" already used by device/semc/anzu/device_anzu.mk device/semc/coconut/device_coconut.mk device/semc/es209ra/device_es209ra.mk device/semc/hallon/device_hallon.mk device/semc/iyokan/device_iyokan.mk device/semc/mango/device_mango.mk device/semc/mimmi/device_mimmi.mk device/semc/robyn/device_robyn.mk device/semc/satsuma/device_satsuma.mk device/semc/shakira/device_shakira.mk device/semc/smultron/device_smultron.mk device/semc/urushi/device_urushi.mk device/semc/zeus/device_zeus.mk device/semc/zeusc/device_zeusc.mk

Read the first line. Then names being used by multiple files within the same device. Try Changing the name.

@OP, thanks. I've been wanting to use mine so I could mod it and throw a few lines in.
 

lotherius

Inactive Recognized Developer
Jan 12, 2009
2,178
612
Houston, TX
Google Pixel 6
Code:
cd ~/cm7/device/lge/p999/
./extract-files.sh
cd ~/cm7/vendor/cyanogen/
./get-rommanager
./get-google-files

So... the guide is a bit out of date... as appear to be a number of them.

The p999 directory does not exist after syncing the cm7 repo. Additionally, the git for proprietary files is no more.

The only directories under ~/cm7/device/lge/ are "star-common" and "victor-common" ...

EDIT: SOLUTION

Have to edit ~/cm7/.repo/manifest.xml and add the following line:

<project path="device/lge/p999" name="CyanogenMod/android_device_lge_p999" />
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 26
    My other tutorial for building CM for Nexus One

    Last tested on 8/8/2011

    This tutorial is basically my Nexus One tutorial altered to support the G2x. This tutorial requires a basic to intermediate knowledge of linux terminal commands. First you will need to be running the latest CM nightly. Then you will need to install Ubuntu 11.04. This tutorial will work for if you are running Ubuntu in a virtual machine and if you installed it to your hard drive. I have tested this by installing it to my hard drive and in a virtual machine, but I have not tried it in Wubi but it should work. You need 11.04 64 bit.

    How to install Ubuntu: https://help.ubuntu.com/community/Installation

    After you have installed Ububtu, make sure that your OS is up to date. You can do that by running the Update Manager from the System>Administration menu. Once that is completed, go to Applications>Accessories and open Terminal.

    Now you will be setting up your build environment.

    Next lets open a terminal. Copy and paste the following into terminal.
    (Copy from this tutorial with control+c and paste in terminal with control+shift+v)

    Code:
    sudo apt-get update && sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev gitg qt3-dev-tools libqt3-mt-dev eclipse valgrind pngcrush schedtool

    Code:
    sudo add-apt-repository ppa:ferramroberto/java && sudo apt-get update && sudo apt-get install sun-java6-jdk && sudo update-java-alternatives -s java-6-sun

    Now you will be installing ADB

    Download the sdk from the android website (use the Linux download) http://developer.android.com/sdk/index.html

    extract the sdk to your ~/ directory (home directory). So you should be able to go to a terminal and cd ~/AndroidSDK/platform-tools to access your platform-tools folder in your sdk. After that, update your android sdk by opening terminal and run:
    Code:
    ~/AndroidSDK/tools/./android

    Open the terminal, and type gedit .bashrc and at the top of the file, paste this (replacing user with your username)
    Code:
    #AndroidDev PATH
    export PATH=${PATH}:/home/user/AndroidSDK/platform-tools
    export PATH=${PATH}:/home/user/AndroidSDK/tools

    This will make ADB, Fastboot and DDMS available from the terminal on next login.
    Now, to make the device available to normal users, open a terminal and type
    Code:
    sudo gedit /etc/udev/rules.d/51-android.rules
    Then paste
    Code:
    SUBSYSTEMS == "usb", ATTRS {idVendor} == "18d1", ATTRS {idProduct} == "4E11", MODE = "0666"
    SUBSYSTEMS == "usb", ATTRS {idVendor} == "18d1", ATTRS {idProduct} == "4e12", MODE = "0666"
    SUBSYSTEMS == "usb", ATTRS {idVendor} == "0bb4", ATTRS {idProduct} == "0FFF", MODE = "0666"
    SUBSYSTEM=="usb",ATTRS(idVendor)=="18d1",SYMLINK+="android_adb",MODE="0666"
    SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
    SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
    Save and exit.
    Ensure that the rules are executable:
    Code:
    sudo chmod a+rx /etc/udev/rules.d/*
    Then type
    Code:
    sudo restart udev
    You should restart your computer (or virtual machine) right now to ensure that everything is running properly.

    Note: idVendor may vary. Use lsusb from the terminal, look for your Android device and replace “0bb4″ with the first 4 characters after “ID”.
    If ADB is still not working, read http://xdaforums.com/showthread.php?t=533 and http://alan.lamielle.net/2010/01/22/nexus-one-usb-in-ubuntu-9-10


    You should now have a fully working android build environment.

    Now before you begin getting and building the source, make sure that you are on the latest CM7 nightly and have the latest gapps from Rom Manager.

    Now to setup the CyanogenMod build environment and to build it

    Enter the following lines in terminal:

    Code:
    cd ~/
    mkdir -p ~/bin
    mkdir -p ~/cm7
    cd ~/bin
    curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo 
    cd ~/
    chmod a+x ~/bin/repo
    PATH="$HOME/bin:$PATH"
    PATH="$HOME/AndroidSDK/platform-tools:$PATH"
    PATH="$HOME/AndroidSDK/tools:$PATH"
    cd ~/cm7
    repo init -u git://github.com/CyanogenMod/android.git -b gingerbread

    Press enter and enter the information it asks for.

    The next command will download all of the CM source. It will take at least a few hours or more depending on your internet speed.
    Code:
    repo sync -j16

    After the sync, plug your phone in, and run adb devices and if your phone is listed, continue. Otherwise, go back and make sure you have properly installed adb and the drivers.

    Plug your phone in, copy the following commands into terminal, and press enter.
    Code:
    cd ~/cm7/device/lge/p999/
    ./extract-files.sh
    cd ~/cm7/vendor/cyanogen/
    ./get-rommanager
    ./get-google-files

    now you your CM build environment is complete.

    Warning: Building CM pushes your computer to the max your cpu can handle. Make sure that your computer can handle compiling CM. If It cannot, DO NOT DO THIS.

    To build, just run(use this command every time you want to build CM):

    **** Here is a new updated command to build CM****
    Code:
    cd ~/cm7 && make clean && repo sync -j6 && . build/envsetup.sh && brunch p999

    If you come across any problems while syncing use repo sync -f -j6 -d and it will force sync and override any changes made to the source on your computer.

    and it will make an update.zip in ~/cm7/out/target/product/p999/update-cm-7.1.0-RC1-G2x-signed.zip (or whatever the latest RC is)

    Congratulations you have just compiled CyanogenMod for the G2x!

    Possible causes if the build fails:
    1. Make sure you followed the directions precisely.
    2. Try all three of the build commands.
    3. If you changed any of the code, make sure it has no errors. Open it up in eclipse and check for errors.
    4. Search Google and XDA.

    **If you are getting a problem with getting the gapps, it it because of the CM gapps mirror system.
    1. download and install the latest gapps
    2. plug your phone in and run:
    Code:
    ~/cm7/vendor/cyanogen/./extract-google-files

    Sources:
    http://developer.android.com/sdk/index.html

    http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_passion

    http://www.lineardroid.co.uk/2010/07/configure-build-environment/

    http://www.lineardroid.co.uk/2010/04/how-to-set-up-adb-in-ubuntu/

    http://xdaforums.com/showthread.php?t=533090

    http://alan.lamielle.net/2010/01/22/nexus-one-usb-in-ubuntu-9-10

    http://xdaforums.com/showthread.php?t=704561


    Be sure to thank if this was helpful!
    2
    Code:
    cd ~/cm7/device/lge/p999/
    ./extract-files.sh
    cd ~/cm7/vendor/cyanogen/
    ./get-rommanager
    ./get-google-files

    So... the guide is a bit out of date... as appear to be a number of them.

    The p999 directory does not exist after syncing the cm7 repo. Additionally, the git for proprietary files is no more.

    The only directories under ~/cm7/device/lge/ are "star-common" and "victor-common" ...

    EDIT: SOLUTION

    Have to edit ~/cm7/.repo/manifest.xml and add the following line:

    <project path="device/lge/p999" name="CyanogenMod/android_device_lge_p999" />
    2

    OR...

    make a file called local_manifest.xml and stick it in ~/yourcm7dir/.repo/ folder

    put the following into the file:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <manifest>
        <remote name="proprietary" fetch="git://github.com/koush/" />
    
        <project path="vendor/broadcom" name="proprietary_vendor_broadcom" remote="proprietary" />
        <project path="vendor/bn" name="proprietary_vendor_bn" remote="proprietary" />
        <project path="vendor/htc" name="proprietary_vendor_htc" remote="proprietary" />
        <project path="vendor/imgtec" name="proprietary_vendor_imgtec" remote="proprietary" />
        <project path="vendor/google" name="proprietary_vendor_google" remote="proprietary" revision="gh-pages" />
        <project path="vendor/lge" name="proprietary_vendor_lge" remote="proprietary" />
        <project path="vendor/motorola" name="proprietary_vendor_motorola" remote="proprietary" />
        <project path="vendor/nvidia" name="proprietary_vendor_nvidia" remote="proprietary" />
        <project path="vendor/nxp" name="proprietary_vendor_nxp" remote="proprietary" />
        <project path="vendor/samsung" name="proprietary_vendor_samsung" remote="proprietary" />
    
    </manifest>

    now you'll pull ALL the prop files and every time you repo sync it'll pull any updates... ;)
    1
    I followed all of your steps but am getting the adb not found or whatever error when trying to run adb devices, or any adb command for that matter. I tried as root, and as a normal user and nothing worked.

    Anyone else have this issue?

    First, make sure that you did downloaded and extracted the Linux version of the Android SDK. Second, verify that the path to the directory where the adb command is correct. Third, check if the adb command is indeed present in that directory. If it's not in platform-tools directory then you need to run the ./android command and update the SDK.

    Sent from my LG-P999 using XDA App
    1
    i updated and installed all the things i needed and now ADB works perfect. Now i might try compiling. Thanks joackie27 for the help.

    You're welcome! That's what the XDA community (help one another) is all about.

    I wouldn't even try compiling not unless you've got the 64 bit version. I think it became a requirement with Gingerbread.

    Sent from my LG-P999 using XDA App