• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Cyanogenmod12.1 Build Environment Set-Up

Welp, the camera works... kinda. When I'm indoors, everything has a green night vision-ish tint, but when I'm outdoors and give it a few seconds to adjust to the light, everything looks normal. I'll upload photos soon, I had to re-flash everything and wipe my caches because I was getting Google Play Service crashes that were causing all my other apps to crash.

EDIT: Did a clean install, couldn't get past the setup wizard because Google Services kept crashing. I'm gonna try for a fresh build...
 
Last edited:
Welp, the camera works... kinda. When I'm indoors, everything has a green night vision-ish tint, but when I'm outdoors and give it a few seconds to adjust to the light, everything looks normal. I'll upload photos soon, I had to re-flash everything and wipe my caches because I was getting Google Play Service crashes that were causing all my other apps to crash.

For lack of a better term, we are going to have to go into the caf kernel and decaf certain parts of it. Probably mainly the sensors is the issue. But getting the camera to show up is a great start.
 
For lack of a better term, we are going to have to go into the caf kernel and decaf certain parts of it. Probably mainly the sensors is the issue. But getting the camera to show up is a great start.
Don't know anything about kernel hacking, but I'll gladly do what I can to help. I've got to Volts right now -- the one that's currently activated is the one having camera issues, while the one I just aquirred is running perfectly, camera and all (both are Virgin Mobile Volts). I can test anything you wanna throw at me and provide feedback, but that's about it. I'm a quick learner though ;)
 
I wonder if a more recent GAPPS flash would have the same issue in regards to your problems pheonix. The GAPPS are 2 months old but that might not be it since you have to update Play Services when you enter the play store anyway. Has anyone tested a more Recent GAPPS build? idk if it's ok to just start flashing more recent dates willy nilly on my device.
 
I wonder if a more recent GAPPS flash would have the same issue in regards to your problems pheonix. The GAPPS are 2 months old but that might not be it since you have to update Play Services when you enter the play store anyway. Has anyone tested a more Recent GAPPS build? idk if it's ok to just start flashing more recent dates willy nilly on my device.

I could try that. I was just gonna try a fresh build but I can try another Gapps package. At this point, it's either have a camera but no working user apps, or a functioning setup without a rear camera.

EDIT: Welp, tried another Gapps package, didn't work. As a side note, the stock AOSP browser doesn't work either, it crashes as soon as you launch it, with or without Gapps installed. I ran "make clean" and am gonna try for a clean build to see if that helps (fingers crossed).
 
Last edited:
OK, I've been testing the new build aswell. Back camera does not work for me. Things are smoother and there is a slight increase in objective performance as measured by Antutu testing which I did 5x on previous and new builds.So far I have not been plagued by the play services bug and I am using a nightly delta GAPPS build along with a clean flash and the Browser works as well. Maybe it takes longer than 3 hours for the services bug to appear but so far this is daily driver material, I have 35 apps installed and there is less hiccups than when I had 21 installed. Still have a touchscreen issue but that was persistent even on stock so it's probably hardware. Great job BADMOFO33.
Edit:Forgot to add I'm on Virgin Mobile
Edit 2: Video seems to be working much better, crackle works, vine still doesn't work as well as perktv, snapchat vids are working, haven't checked Netflix yet.
 
Last edited:
Alright, now we've got something! Back camera works, although still with a green-ish tint. I'm not getting any Google Services crashes either, and the default AOSP browser works fine, so I'm guessing I just had a corrupt build earlier. Also managed to get the torch working too :D

1.jpg
 
running a new build now, pulled camera.dtsi from LG stock lollipop kernel for w7 device(L90). (Hopefully it fixes camera issues... Thanks @whoshotjr2006)
Also added whoshotjr2006 LED fix and added back the LED options under Display & Lights settings. ReAdded RIL file to get rid of Sim not detected. Added some other picks for various things(cant remember what exactly)
Will post my trees soon on OP.
Just posted my 5/27 build for now until I get new kernel built, dont want to get people hyped before hand.
will probably want you guys to test first....
 
Last edited:
Getting the following error when I try to compile for OmniROM:

Code:
including ./packages/apps/OmniSwitch/Android.mk ...
including ./packages/apps/OmniTorch/Android.mk ...
including ./packages/apps/OneTimeInitializer/Android.mk ...
including ./packages/apps/OpenDelta/Android.mk ...
including ./packages/apps/PackageInstaller/Android.mk ...
including ./packages/apps/PerformanceControl/Android.mk ...
including ./packages/apps/PhoneCommon/Android.mk ...
including ./packages/apps/Provision/Android.mk ...
including ./packages/apps/QuickSearchBox/Android.mk ...
including ./packages/apps/Settings/Android.mk ...
including ./packages/apps/SoundRecorder/Android.mk ...
including ./packages/apps/SpareParts/Android.mk ...
including ./packages/apps/SpeechRecorder/Android.mk ...
including ./packages/apps/Stk/Android.mk ...
including ./packages/apps/Tag/Android.mk ...
including ./packages/apps/Terminal/Android.mk ...
including ./packages/apps/TvSettings/QuickSettings/Android.mk ...
including ./packages/apps/TvSettings/Settings/Android.mk ...
including ./packages/apps/UnifiedEmail/Android.mk ...
including ./packages/apps/VoiceDialer/Android.mk ...
including ./packages/experimental/Android.mk ...
including ./packages/inputmethods/LatinIME/Android.mk ...
including ./packages/inputmethods/OpenWnn/Android.mk ...
including ./packages/providers/CalendarProvider/Android.mk ...
including ./packages/providers/ContactsProvider/Android.mk ...
including ./packages/providers/DownloadProvider/Android.mk ...
including ./packages/providers/MediaProvider/Android.mk ...
including ./packages/providers/PartnerBookmarksProvider/Android.mk ...
including ./packages/providers/TelephonyProvider/Android.mk ...
including ./packages/providers/TvProvider/Android.mk ...
including ./packages/providers/UserDictionaryProvider/Android.mk ...
including ./packages/screensavers/Basic/Android.mk ...
including ./packages/screensavers/PhotoTable/Android.mk ...
including ./packages/screensavers/WebView/Android.mk ...
including ./packages/services/Mms/Android.mk ...
including ./packages/services/Telecomm/Android.mk ...
including ./packages/services/Telephony/Android.mk ...
including ./packages/wallpapers/Basic/Android.mk ...
including ./packages/wallpapers/Galaxy4/Android.mk ...
including ./packages/wallpapers/HoloSpiral/Android.mk ...
including ./packages/wallpapers/LivePicker/Android.mk ...
including ./packages/wallpapers/MagicSmoke/Android.mk ...
including ./packages/wallpapers/MusicVisualization/Android.mk ...
including ./packages/wallpapers/NoiseField/Android.mk ...
including ./packages/wallpapers/PhaseBeam/Android.mk ...
including ./pdk/apps/HelloPDK/Android.mk ...
including ./pdk/apps/TestingCamera/Android.mk ...
including ./pdk/apps/TestingCamera2/Android.mk ...
including ./prebuilts/gcc/darwin-x86/mips/mipsel-linux-android-4.8/Android.mk ...
including ./prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8/Android.mk ...
including ./prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/Android.mk ...
including ./prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/Android.mk ...
including ./prebuilts/gcc/linux-x86/mips/mipsel-linux-android-4.8/Android.mk ...
including ./prebuilts/misc/Android.mk ...
including ./prebuilts/ndk/Android.mk ...
including ./prebuilts/qemu-kernel/x86/pc-bios/Android.mk ...
including ./prebuilts/sdk/Android.mk ...
including ./prebuilts/tools/Android.mk ...
including ./sdk/adtproductbuild/Android.mk ...
including ./sdk/annotations/Android.mk ...
including ./sdk/avdlauncher/Android.mk ...
including ./sdk/dumpeventlog/Android.mk ...
including ./sdk/emulator/mksdcard/Android.mk ...
including ./sdk/emulator/opengl/Android.mk ...
including ./sdk/eventanalyzer/Android.mk ...
including ./sdk/find_java/Android.mk ...
including ./sdk/find_lock/Android.mk ...
including ./sdk/hierarchyviewer/etc/Android.mk ...
including ./sdk/hierarchyviewer/src/Android.mk ...
including ./sdk/monitor/Android.mk ...
including ./sdk/sdklauncher/Android.mk ...
including ./system/core/Android.mk ...
including ./system/extras/Android.mk ...
including ./system/keymaster/Android.mk ...
including ./system/media/audio_route/Android.mk ...
including ./system/media/audio_utils/Android.mk ...
including ./system/media/camera/src/Android.mk ...
including ./system/media/camera/tests/Android.mk ...
including ./system/netd/client/Android.mk ...
including ./system/netd/server/Android.mk ...
including ./system/security/keystore-engine/Android.mk ...
including ./system/security/keystore/Android.mk ...
including ./system/security/softkeymaster/Android.mk ...
including ./system/vold/Android.mk ...
including ./tools/external/fat32lib/Android.mk ...
including ./vendor/lge/x5/Android.mk ...
including ./vendor/omni/Android.mk ...
PRODUCT_COPY_FILES device/lge/x5/prebuilt/etc/audio_effects.conf:system/etc/audio_effects.conf ignored.
build/core/Makefile:72: warning: overriding commands for target `/home/ph0enix_216/android/omni/out/target/product/x5/system/etc/clatd.conf'
build/core/base_rules.mk:550: warning: ignoring old commands for target `/home/ph0enix_216/android/omni/out/target/product/x5/system/etc/clatd.conf'
build/core/Makefile:72: warning: overriding commands for target `/home/ph0enix_216/android/omni/out/target/product/x5/system/lib/egl/egl.cfg'
build/core/base_rules.mk:550: warning: ignoring old commands for target `/home/ph0enix_216/android/omni/out/target/product/x5/system/lib/egl/egl.cfg'
build/core/Makefile:72: warning: overriding commands for target `/home/ph0enix_216/android/omni/out/target/product/x5/obj/lib/libtime_genoff.so'
build/core/prebuilt_internal.mk:247: warning: ignoring old commands for target `/home/ph0enix_216/android/omni/out/target/product/x5/obj/lib/libtime_genoff.so'
build/core/Makefile:72: warning: overriding commands for target `/home/ph0enix_216/android/omni/out/target/product/x5/system/lib/libril.so'
build/core/base_rules.mk:550: warning: ignoring old commands for target `/home/ph0enix_216/android/omni/out/target/product/x5/system/lib/libril.so'
build/core/Makefile:72: warning: overriding commands for target `/home/ph0enix_216/android/omni/out/target/product/x5/system/bin/rild'
build/core/base_rules.mk:550: warning: ignoring old commands for target `/home/ph0enix_216/android/omni/out/target/product/x5/system/bin/rild'
No private recovery resources for TARGET_DEVICE x5
device/lge/x5/mkbootimg.mk:42: warning: overriding commands for target `/home/ph0enix_216/android/omni/out/target/product/x5/boot.img'
build/core/Makefile:568: warning: ignoring old commands for target `/home/ph0enix_216/android/omni/out/target/product/x5/boot.img'
make -C kernel/lge/msm8226 O=/home/ph0enix_216/android/omni/out/target/product/x5/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE="/home/ph0enix_216/android/omni/prebuilts/misc/linux-x86/ccache/ccache /home/ph0enix_216/android/omni/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-" VARIANT_DEFCONFIG= SELINUX_DEFCONFIG= cm11_msm8226_defconfig
host Executable: mkbootfs (/home/ph0enix_216/android/omni/out/host/linux-x86/obj32/EXECUTABLES/mkbootfs_intermediates/mkbootfs)
make[1]: Entering directory `/home/ph0enix_216/android/omni/kernel/lge/msm8226'
/home/ph0enix_216/android/omni/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/bin/../lib/gcc/x86_64-linux/4.6/../../../../x86_64-linux/bin/ld: error: /home/ph0enix_216/android/omni/out/host/linux-x86/obj32/EXECUTABLES/mkbootfs_intermediates/mkbootfs.o: file is empty
/home/ph0enix_216/android/omni/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/bin/../sysroot/usr/lib/../lib32/Scrt1.o(.text+0x28): error: undefined reference to 'main'
collect2: ld returned 1 exit status
make: *** [/home/ph0enix_216/android/omni/out/host/linux-x86/obj32/EXECUTABLES/mkbootfs_intermediates/mkbootfs] Error 1
make: *** Waiting for unfinished jobs....
GEN /home/ph0enix_216/android/omni/out/target/product/x5/obj/KERNEL_OBJ/Makefile
net/ipv6/Kconfig:260:warning: multi-line strings not supported
warning: (SND_SOC_MSM8226) selects DOLBY_DAP which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_MSM8974)
warning: (SND_SOC_MSM8226) selects DOLBY_DAP which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_MSM8974)
#
# configuration written to .config
#
make[1]: Leaving directory `/home/ph0enix_216/android/omni/kernel/lge/msm8226'

real 7m54.390s
user 1m58.420s
sys 0m29.102s
ph0enix_216@Nanaba:~/android/omni$

Any advice? Googled the crap out of it and couldn't find anything.
 
Hey one of you guys with newly downloaded cm12 or omnirom source. Would anyone feel like being a maintainer for the lollipop version of twrp? It's one extra download more than you have now, about 1mb or so in size and also only takes about a half hour to compile from source the first time.

Anyone feel free to jump in and claim it, if you need help I'll help. I just don't feel like/don't have the room for downloading cm12 source again at the moment or I would do it.

Edit: heres a general guide: http://androidforums.com/threads/recovery-twrp-2-8-5-0-lollipop.902943/page-2#post-6990775

If your using omnirom source, you already have twrp in bootable/recovery. just run mka recoveryimage.
 
Last edited:
Getting the following error when I try to compile for OmniROM:


Any advice? Googled the crap out of it and couldn't find anything.

It looks like some file for your toolchain is missing or corrupt. You either have a bad download or your trying to build on an x86 distro instead of the needed 64 bit distro. You are running a 64 bit copy of debian/linux mint/ubuntu/etc right? it also could have something to do with ia32 libs that are needed for building in debian based distributions too.

look through this: http://forum.xda-developers.com/che...to-setup-ubuntu-14-10-utopic-unicorn-t2862442

and make sure you have all the packages it wants you to install and have followed the instructions to a T.
 
It looks like some file for your toolchain is missing or corrupt. You either have a bad download or your trying to build on an x86 distro instead of the needed 64 bit distro. You are running a 64 bit copy of debian/linux mint/ubuntu/etc right? it also could have something to do with ia32 libs that are needed for building in debian based distributions too.

look through this: http://forum.xda-developers.com/che...to-setup-ubuntu-14-10-utopic-unicorn-t2862442

and make sure you have all the packages it wants you to install and have followed the instructions to a T.

Hey, thanks! I am on a 64-bit distro of Ubuntu, and I followed that post to the letter, I'll post later on how my build goes. And hey, I can be a maintaner for TWRP if you like. My current build machine has 500~GB of space and compiles pretty good, and I'm currently setting up a second build envornment on my Acer C720 Chromebook (just for kicks :D ).
 
Hey guys I'm going to give this another shot. Plus I thought we shouldn't let these guides get buried on the site. We should sticky them they have great info in them. Which is why I've linked some treads that contain useful info.
Building CM12: Work in Progress. Join In! by @elisam98
http://androidforums.com/threads/building-cm12-work-in-progress-join-in.891676/
LG Volt Dev Resources by @elisam98
http://androidforums.com/threads/lg-volt-dev-resources.892502/
Also I wanted to thank a few Dev's for all their hard work
@whoshotjr2006 @elisam98 @Bad_MOFO_33 & any Devs i left out. All of us here on the forum support you guys
EDITED: FORMAT ERROR
Tried to make links open in new tab
 
Last edited:
How what do i do after brunch? It finished with this one warning
Code:
mkdir -p /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot;  /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/scripts/dtc/dtc -p 2048 -O dtb -o /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot/msm8226-x5.dtb ./kernel/lge/msm8226/arch/arm/boot/dts/msm8226-x5_spr_us/msm8226-x5.dts; cat /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot/zImage /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot/msm8226-x5.dtb > /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot/msm8226-x5-zImage;
/home/dev/Cyanogenmod12.1/out/host/linux-x86/bin/checkpolicy:  loading policy configuration from /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/ETC/sepolicy.recovery_intermediates/policy_recovery.conf
device/lge/x5/sepolicy/netd.te:5:ERROR 'unknown type wfd_app' at token ';' on line 17760:
allow netd netd:packet_socket { create bind setopt read ioctl };
allow netd wfd_app:fd use;
checkpolicy:  error(s) encountered while parsing configuration
make: *** [/home/dev/Cyanogenmod12.1/out/target/product/x5/obj/ETC/sepolicy.recovery_intermediates/sepolicy.recovery] Error 1
make: *** Waiting for unfinished jobs....
Target dt image: /home/dev/Cyanogenmod12.1/out/target/product/x5/dt.img
/home/dev/Cyanogenmod12.1/out/host/linux-x86/bin/dtbToolCM -2 -o /home/dev/Cyanogenmod12.1/out/target/product/x5/dt.img -s 2048 -p /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/scripts/dtc/ /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot/
DTB combiner:
  Input directory: '/home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot/'
  Output file: '/home/dev/Cyanogenmod12.1/out/target/product/x5/dt.img'
Found file: msm8226-x5.dtb ... chipset: 200, rev: 0, platform: 131, subtype: 0
  additional chipset: 224, rev: 0, platform: 131, subtype: 0
  additional chipset: 200, rev: 65537, platform: 131, subtype: 0
  additional chipset: 224, rev: 65537, platform: 131, subtype: 0
=> Found 4 unique DTB(s)

Generating master DTB... completed
Made DT image: /home/dev/Cyanogenmod12.1/out/target/product/x5/dt.img

#### make failed to build some targets (04:31:21 (hh:mm:ss)) ####

dev@dev-VGN-NS135E ~/Cyanogenmod12.1 $
 
How what do i do after brunch? It finished with this one warning
Code:
mkdir -p /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot;  /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/scripts/dtc/dtc -p 2048 -O dtb -o /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot/msm8226-x5.dtb ./kernel/lge/msm8226/arch/arm/boot/dts/msm8226-x5_spr_us/msm8226-x5.dts; cat /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot/zImage /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot/msm8226-x5.dtb > /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot/msm8226-x5-zImage;
/home/dev/Cyanogenmod12.1/out/host/linux-x86/bin/checkpolicy:  loading policy configuration from /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/ETC/sepolicy.recovery_intermediates/policy_recovery.conf
device/lge/x5/sepolicy/netd.te:5:ERROR 'unknown type wfd_app' at token ';' on line 17760:
allow netd netd:packet_socket { create bind setopt read ioctl };
allow netd wfd_app:fd use;
checkpolicy:  error(s) encountered while parsing configuration
make: *** [/home/dev/Cyanogenmod12.1/out/target/product/x5/obj/ETC/sepolicy.recovery_intermediates/sepolicy.recovery] Error 1
make: *** Waiting for unfinished jobs....
Target dt image: /home/dev/Cyanogenmod12.1/out/target/product/x5/dt.img
/home/dev/Cyanogenmod12.1/out/host/linux-x86/bin/dtbToolCM -2 -o /home/dev/Cyanogenmod12.1/out/target/product/x5/dt.img -s 2048 -p /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/scripts/dtc/ /home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot/
DTB combiner:
  Input directory: '/home/dev/Cyanogenmod12.1/out/target/product/x5/obj/KERNEL_OBJ/arch/arm/boot/'
  Output file: '/home/dev/Cyanogenmod12.1/out/target/product/x5/dt.img'
Found file: msm8226-x5.dtb ... chipset: 200, rev: 0, platform: 131, subtype: 0
  additional chipset: 224, rev: 0, platform: 131, subtype: 0
  additional chipset: 200, rev: 65537, platform: 131, subtype: 0
  additional chipset: 224, rev: 65537, platform: 131, subtype: 0
=> Found 4 unique DTB(s)

Generating master DTB... completed
Made DT image: /home/dev/Cyanogenmod12.1/out/target/product/x5/dt.img

#### make failed to build some targets (04:31:21 (hh:mm:ss)) ####

dev@dev-VGN-NS135E ~/Cyanogenmod12.1 $
use these trees, compile error is fixed + added some drm stuff to help with video playback
(these are my most recent)
you may have to run "make clean" or "make clobber" after adding these.
 

Attachments

Last edited:
Back
Top Bottom