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

Root Building CM12: Work in Progress. Join In!

His problem I think actually is that the kernel he built causes the phone to boot directly into fastboot rather than the os.
Ah I see, I had a feeling it might be something like that. I figured it wouldn't hurt to put it out there just because in whoshotjr2006's twrp his instructions are really important to make it work. I used flashify with my phone with twrp but I've been on the zv4 kernel a long time unless im testing. @elisam98 I hope you got it figured out okay. And congrats on your new build, it sounds like you are very close now!! @donjuro thank man, your insight and help is always appreciated :D
 
UPDATE: I finally got some time to work on this again :)

I changed my local_manifest.xml file to reflect some of the awesome progress that has been made in this forum. I now have the latest sources from @Bad_MOFO_33 and @whoshotjr2006.

My local_manifest file now looks like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="CyanogenMod/android_hardware_qcom_fm" path="hardware/qcom/fm" remote="github" />
  <project name="CyanogenMod/android_hardware_qcom_display-caf-new" path="hardware/qcom/display-caf-new" remote="github" revision="cm-11.0" />
  <project name="CyanogenMod/android_hardware_qcom_media-caf-new" path="hardware/qcom/media-caf-new" remote="github" revision="cm-11.0" />
  <project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
  <project name="arj1231/android_device_lge_x5" path="device/lge/x5" remote="github" revision="master"/>
  <project name="arj1231/kernel_lge_msm8226" path="kernel/lge/x5" remote="github" revision="master"/>
  <project name="touchpro/android_vendor_lge_x5"  path="vendor/lge/x5" revision="master" />
</manifest>

After doing a "repo sync", I changed my "BoardConfig.mk" file to reflect the changes in the kernel source. This involved commenting-out
Code:
TARGET_BOARD_USE_DTS := msm8226-x5_spr_us
(just put a "#" at the beginning of the line)
and
Changing the defconfig file:
Code:
TARGET_KERNEL_CONFIG := mofotest2_defconfig
I have already been able to create a recovery image with these sources!
The recovery booted into Cyanogenmod recovery. Sadly, it's a pretty crummy recovery :( You can't backup/restore with it...

I'll try to keep everyone posted if I get a working build!


 
Last edited:
UPDATE: I finally got some time to work on this again :)

I changed my local_manifest.xml file to reflect some of the awesome progress that has been made in this forum. I now have the latest sources from @Bad_MOFO_33 and @whoshotjr2006.

My local_manifest file now looks like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="CyanogenMod/android_hardware_qcom_fm" path="hardware/qcom/fm" remote="github" />
  <project name="CyanogenMod/android_hardware_qcom_display-caf-new" path="hardware/qcom/display-caf-new" remote="github" revision="cm-11.0" />
  <project name="CyanogenMod/android_hardware_qcom_media-caf-new" path="hardware/qcom/media-caf-new" remote="github" revision="cm-11.0" />
  <project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
  <project name="arj1231/android_device_lge_x5" path="device/lge/x5" remote="github" revision="master"/>
  <project name="arj1231/kernel_lge_msm8226" path="kernel/lge/x5" remote="github" revision="master"/>
  <project name="touchpro/android_vendor_lge_x5"  path="vendor/lge/x5" revision="master" />
</manifest>

After doing a "repo sync", I changed my "BoardConfig.mk" file to reflect the changes in the kernel source. This involved commenting-out
Code:
TARGET_BOARD_USE_DTS := msm8226-x5_spr_us
(just put a "#" at the beginning of the line)
and
Changing the defconfig file:
Code:
TARGET_KERNEL_CONFIG := mofotest2_defconfig
I have already been able to create a recovery image with these sources!
The recovery booted into Cyanogenmod recovery. Sadly, it's a pretty crummy recovery :( You can't backup/restore with it...

I'll try to keep everyone posted if I get a working build!

Hope you get it working man
 
Progress!

Using @Bad_MOFO_33's kernel additions (and defconfig file), and doing a lot of build debugging, I was able to build CM12 (again).

Unlike the last time, I actually made it to the cyanogenmod boot screen! :)
However, the phone won't boot past the splash screen (The blue CM guy) :(
I assume that means that parts are not loading correctly...

With that in mind, does know how to debug the boot process? I'm about to google it, but does anyone have any reccomendations for debugging methods? (i.e. Should I be using alogcat?) I've never gotten this far before :)

We're so close!

If anyone is willing to take a look by flashing the zip, I'd be more than happy to post the file (I'm just not looking for a repeat of last time!)
 
Last edited:
Progress!

Using @Bad_MOFO_33's kernel additions (and defconfig file), and doing a lot of build debugging, I was able to build CM12 (again).

Unlike the last time, I actually made it to the cyanogenmod boot screen! :)
However, the phone won't boot past the splash screen (The blue CM guy) :(
I assume that means that parts are not loading correctly...

With that in mind, does know how to debug the boot process? I'm about to google it, but does anyone have any reccomendations for debugging methods? (i.e. Should I be using alogcat?) I've never gotten this far before :)

We're so close!

If anyone is willing to take a look by flashing the zip, I'd be more than happy to post the file (I'm just not looking for a repeat of last time!)
Logcats will definitely help because then we can see what your build is doing (or not) doing, as for debugging I'm not really sure? @whoshotjr2006 or @Bad_MOFO_33 what do you use for debugging? Congrats @elisam98 on your progress! I'll try the zip if you want, if i can help i will
 
@elisam98 this is what i use for adb (android debug bridge) on my windows and linux box and in our dev options within android we can turn on adb. Here is some adb info for you, installing adb is a snap http://developer.android.com/tools/help/adb.html
http://wiki.cyanogenmod.org/w/Doc:_adb_intro
:)

Thanks, @Sands207 but I guess I wasn't very clear in my request.
I am familiar with adb - I've used it a lot in both Windows and my Ubuntu build system.
I really wanted to know how/if it's possible to pull boot logs from the phone in this situation...
To clarify, the phone is only loading until it reaches the splash screen. As far as I can tell, it gets stuck even before loading adb capabilities on the phone itself - I definitely have no way of turning on debugging (if it's not already turned on by default by CM).

I would love to toss up a link to the package, but I haven't had a chance to get in front of a proper computer with a stable internet connection for a bit.

Thank you all for your interest and participation! This forum is really working hard and accomplishing a lot!

As always, I value any input :). With enough experience and input, hopefully we can get all these ROMs built and stabilized soon!
 
Are you using the android xdk package? If you cannot pull logs from the phone because you can't push past the boot process it may help you since it allows you to emulate your device on screen and you can also view logs in real time, I'm working on CM for the galaxy ring and rush right now and I'm the only one building it so the xdk, android studio and the sdk are helping me alot. Just a thought anyway :)
 
Are you using the android xdk package? If you cannot pull logs from the phone because you can't push past the boot process it may help you since it allows you to emulate your device on screen and you can also view logs in real time, I'm working on CM for the galaxy ring and rush right now and I'm the only one building it so the xdk, android studio and the sdk are helping me alot. Just a thought anyway :)

Thanks! Didn't realize I can do that with the XDK :)
I will definitely try to take a look when I get a chance.
 
adb logcat > log.txt

from your linux terminal, and then upload it for us to check out here.

You also may have to go into your root folder inside of /out/target/product/x5 and edit default.prop. change the values of the first two variables to 0(can't remember variable names on mobile right now), save it and brunch x5 again or mka bootimage. That will make it so adb is insecure and won't prompt you to authorize your computer just to use adb and push and pull files to your /system through adb also.

Still looking on how to change that permanently for now in either kernel, device or vendor source. I'd rather not modify any actual cm repos and have to host those on github with the rest of my source, but the above will work for now and subsequent rebuilds unless you make clean/clobber.
 
Last edited:
As I detailed in this thread: DeCAF Cyanogenmod 11, Alpha 3(working cell service/semi working data), I am trying hard to build Cyanogenmod 12 for the LG Volt based on LG's newly released ZV5 kernel sources. In deference to what @whoshotjr2006 and others are trying to accomplish with CM11 in that thread, I thought it would be appropriate to start a new separate thread dedicated to building CM12.
I have learned some more about building CM, so I will post detailed (but hopefully better than last time) instructions for setting up a build environment and getting the compile started on your system.

As of now, I have been unable to completely build CM12.
I hope that others will try these steps to compile and post the build errors.
Through the community, we can try to solve these errors together!

EDIT: We got an pre-alpha build, but with problems...see below...

If there is a problem with my instructions, please reply to the thread with any comments!
As you build, if you have ANY build errors, please post them in the reply field. If we work together, we can try to get this configuration to finally build!

You do not need any fancy hardware configuration to build cyanogenmod, but the better your system specs, the faster it will build.

This thread is dedicated to building this configuration, so please keep the comments limited to the above parameters.


------------------------------------------------------------------------------------------

Now for the instructions! Here goes:

Start with a clean install of Debian or Ubuntu (I used Ubuntu 14.10 - you can use any fairly recent version)
To update to the latest sources, run:
Code:
sudo apt-get update
To make sure you don't have any other JDK installed, run:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Then install the latest version of OpenJDK:
Code:
sudo apt-get install openjdk-7-jdk
Install the build dependencies:
Code:
sudo apt-get install git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev squashfs-tools pngcrush schedtool dpkg-dev
.

To get the source, first download "repo" and put it in the system path:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
cd ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

Now we're ready to pull the source. This may take a while to complete depending on your connection speed:
Code:
mkdir ~/cm12
cd ~/cm12
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
repo sync

Make a new local manifest file:
Code:
mkdir .repo/local_manifests
cd .repo/local_manifests
gedit local_manifest.xml

Here is where we combine the LG Volt code with the already downloaded cyanogenmod sources:
In the text editor, add these lines:


Then resync the repos to grab the new source code:
Code:
cd ~/cm12
repo sync

Initialize the build environment:
Code:
. build/envsetup.sh

Now send the command to build:
Code:
brunch x5

The code will now begin to compile.

------------------------------------------------------------------------------------------
Thank you everyone who contributed and continues to contribute to porting Cyanogenmod to the LG Volt!
@whoshotjr2006, @Bad_MOFO_33, @bakerd62, @adamhos1234, @Sands207, @AnDroiDHackxr, @Corey Fields, and everyone else in these forums (sorry if I missed anyone)

BIG thanks to the guys in the ##LG_VOLT channel on freenode!!!
(especially @Zef_MOFO)

Sources:
  1. http://androidforums.com/threads/de...working-cell-service-semi-working-data.886984
  2. https://source.android.com/source/initializing.html
  3. http://developer.sonymobile.com/kno...ld-aosp-lollipop-for-unlocked-xperia-devices/
  4. http://forum.xda-developers.com/nexus-4/general/guide-cm11-how-to-build-cyanogenmod-11-t2515305
 
I havent read the entire thread, but I've been on the command below for some time now::
  1. repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
  2. repo sync
can someone tell me the size of the files I get using that command please.
 
I havent read the entire thread, but I've been on the command below for some time now::
  1. repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
  2. repo sync
can someone tell me the size of the files I get using that command please.

Around 40 to 50 gigs
 

Yep its about a 14gb compressed download and the repo tool itself uses a fair share of system resources unpacking everything after and during download of the source. But once you have a branch downloaded of source you can use the repo tool with that as a reference source and a few command parameters to download another ROM source pretty quickly, like minutes instead of hours.
 
Yep its about a 14gb compressed download and the repo tool itself uses a fair share of system resources unpacking everything after and during download of the source. But once you have a branch downloaded of source you can use the repo tool with that as a reference source and a few command parameters to download another ROM source pretty quickly, like minutes instead of hours.
Yep its about a 14gb compressed download and the repo tool itself uses a fair share of system resources unpacking everything after and during download of the source. But once you have a branch downloaded of source you can use the repo tool with that as a reference source and a few command parameters to download another ROM source pretty quickly, like minutes instead of hours.

@whoshotjr2006 & @elisam98 I hope this isn't a silly question but I am working on CM for an older device I have and I have followed directions so far and have had my repos starting to sync but both times problems with my isp and last night while i was asleep the power went out and my laptop crashed so I have been unable to fully sync up with the CM repos :/ is there a command that will enable me to start the sync where it left of instead of having to start the repo sync over and having to wait six hours? I'm getting bewildered because every time something happens and I have to start all over lol
 
Can anyone tell me about how much data space you will need to build? I read up about portable vm I can run off a 64g flash drive(because I don't own my own computer) however I don't know if that will be enough space since y'all brought up 40 or 50gs for that repo thing
 
Can anyone tell me about how much data space you will need to build? I read up about portable vm I can run off a 64g flash drive(because I don't own my own computer) however I don't know if that will be enough space since y'all brought up 40 or 50gs for that repo thing

Just to give you an idea.. I set up an ubuntu machine fresh two days ago to prepare to build cyanogenmod and i am at the step where you sync up with the repos and i downloaded source code, kernel, java, android sdk, intel xdk, eclipse and other stuff to prepare and im over 50 gigs now easy but like its been mentioned once you sync up for the first time fully you don't have to redownload everything and the size starts to be reduced as you compile and build. I'm not saying it can't be done since we prove everyday on these forums nothing is impossible but I personally wouldn't try it with my phone but I'm also a little more comfortable using linux os for this process on the computer, just my thoughts anyway :)
 
@whoshotjr2006 & @elisam98 I hope this isn't a silly question but I am working on CM for an older device I have and I have followed directions so far and have had my repos starting to sync but both times problems with my isp and last night while i was asleep the power went out and my laptop crashed so I have been unable to fully sync up with the CM repos :/ is there a command that will enable me to start the sync where it left of instead of having to start the repo sync over and having to wait six hours? I'm getting bewildered because every time something happens and I have to start all over lol

From my experience, repo sync was actually designed to continue from where it last left off. As long as you don't erase the build directory, all the previously downloaded parts are still stored on the hard drive. (In the .repo "hidden" folder).
It's just that there's a lot of stuff to download!
I've personally paused in middle of a repo sync and had it pick up where it left off the next time I ran it.
If it's the first sync ever, it won't create the proper folders yet in your build directory until it finishes one sync completely.
So if you keep running repo sync, you should eventually get the entire thing.
Good Luck! :)
 
From my experience, repo sync was actually designed to continue from where it last left off. As long as you don't erase the build directory, all the previously downloaded parts are still stored on the hard drive. (In the .repo "hidden" folder).
It's just that there's a lot of stuff to download!
I've personally paused in middle of a repo sync and had it pick up where it left off the next time I ran it.
If it's the first sync ever, it won't create the proper folders yet in your build directory until it finishes one sync completely.
So if you keep running repo sync, you should eventually get the entire thing.
Good Luck! :)
Nice! Is there any way that you could tell me the pause command? I'll keep trying to get the inital sync done today :)
 
OK. Finally got a chance to sit down in front of my build laptop with a stable internet connection.

I am releasing the version of CM12 that I built on 1/18. The update script was modified to work with TWRP or CWM.

I was able to get CM12 compiled and it will boot - but only until the splash screen.

Notes:
  • There seems to be some type of MTP support on this build. You can try to plug it in and see what happens, but it's not really working for me.
  • Although the build.prop allows for adb connections and adb kinda detects the device, it is listed as being "offline" when I run "adb devices" from the command line.
  • I took out all the references to SELinux in the BoardConfig.mk file after encountering many compiling errors with SELinux - Would that be causing problems?

I have a working theory for why the device won't boot.
Apparently, CM12 (and I'm pretty sure it's every version of Lollipop) changed the structure of the update zip file. Instead of including the /system folder as an independent folder in the zip file, it now builds an image file for the "/system" partition. Therefore, the updater-script (located under META-INF/com/google/android in the zip file) now has to unmount the existing /system partition and replace it with the updated image file ("system.new.dat" in the root of the zip file). It's possible that the current recoveries don't support all the commands that are necessary to accomplish these steps (I couldn't get TWRP to recognize the "unmount" command that is called in the updater script).

If this is the case, there are two possible solutions I can think of:
  1. We need a new recovery that supports flashing CM12.
  2. The updater-script has to be rewritten in a way that only uses commands that are recognized by CWM or TWRP (using the "mount" command to unmount "/system" ?)
Here is a link to my most recently built CM12 ROM:
https://drive.google.com/file/d/0B84L4054UpPTcDl1SzdHRFhoeFU/view?usp=sharing
**DISCLAIMER**
As far as I can tell, this ROM will not boot past the splash screen - Please flash at your own risk! If you don't know what you're doing, this zip file is not for you! :)


Thanks for bearing with me as we try to get some of these ROMs up and running!
Now is a great time for anyone to chime in with alternate theories and solutions! :)
 
OK. Finally got a chance to sit down in front of my build laptop with a stable internet connection.

I am releasing the version of CM12 that I built on 1/18. The update script was modified to work with TWRP or CWM.

I was able to get CM12 compiled and it will boot - but only until the splash screen.

Notes:
  • There seems to be some type of MTP support on this build. You can try to plug it in and see what happens, but it's not really working for me.
  • Although the build.prop allows for adb connections and adb kinda detects the device, it is listed as being "offline" when I run "adb devices" from the command line.
  • I took out all the references to SELinux in the BoardConfig.mk file after encountering many compiling errors with SELinux - Would that be causing problems?

I have a working theory for why the device won't boot.
Apparently, CM12 (and I'm pretty sure it's every version of Lollipop) changed the structure of the update zip file. Instead of including the /system folder as an independent folder in the zip file, it now builds an image file for the "/system" partition. Therefore, the updater-script (located under META-INF/com/google/android in the zip file) now has to unmount the existing /system partition and replace it with the updated image file ("system.new.dat" in the root of the zip file). It's possible that the current recoveries don't support all the commands that are necessary to accomplish these steps (I couldn't get TWRP to recognize the "unmount" command that is called in the updater script).

If this is the case, there are two possible solutions I can think of:
  1. We need a new recovery that supports flashing CM12.
  2. The updater-script has to be rewritten in a way that only uses commands that are recognized by CWM or TWRP (using the "mount" command to unmount "/system" ?)
Here is a link to my most recently built CM12 ROM:
https://drive.google.com/file/d/0B84L4054UpPTcDl1SzdHRFhoeFU/view?usp=sharing
**DISCLAIMER**
As far as I can tell, this ROM will not boot past the splash screen - Please flash at your own risk! If you don't know what you're doing, this zip file is not for you! :)


Thanks for bearing with me as we try to get some of these ROMs up and running!
Now is a great time for anyone to chime in with alternate theories and solutions! :)

Been working on this all day, too. In the same boat splash screen just going and going and going. I also tried other kernels as well as alternate defconfig with same result. @least we're at the same point now.
 
Back
Top Bottom