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

Root [DEV] CM7 Building & Development

G

g60madman

Guest

RULES

Please use this thread for development discussions of CM7

HOW TO
If you would like to get involved in building on the code please check out http://mtdev.us for full instructions on building and setting up your environment.

INFO
To work on this project it will help to have programming knowledge of Java, C, and C++. Also it will help if you have decent hardware to build the source code. At bare minimum 4GB of Ram, and 30GB of free hard drive space. While you can use a Virtual environment I do not recommend it. While you can use any flavor of Linux I recommend Ubuntu 10.04 64bit.
 
I wanted to reload my install and I went through your new write up, and I gotta say it's streamlined nicely. One thing that happened to me is the quotation marks in
Code:
[B]sudo add-apt-repository
 
I know that some parts of the "Build CM7" are missing on mtdev.us, but are available scattered throughout Google's instructions. I could easily rewrite the instructions to be more straightforward. For example, there are no instructions to download the repo script.
 
I'm getting a new error when trying to run ./repo sync. It says:
Traceback (most recent call last):
File "/home/mike/bin/.repo/repo/main.py", line 385, in <module>
_Main(sys.argv[1:])
File "/home/mike/bin/.repo/repo/main.py", line 365, in _Main
result = repo._Run(argv) or 0
File "/home/mike/bin/.repo/repo/main.py", line 121, in _Run
copts, cargs = cmd.OptionParser.parse_args(argv)
File "/home/mike/bin/.repo/repo/command.py", line 44, in OptionParser
self._Options(self._optparse)
File "/home/mike/bin/.repo/repo/subcmds/sync.py", line 126, in _Options
self.jobs = self.manifest.default.sync_j
File "/home/mike/bin/.repo/repo/manifest_xml.py", line 228, in default
self._Load()
File "/home/mike/bin/.repo/repo/manifest_xml.py", line 263, in _Load
b = m.GetBranch(m.CurrentBranch).merge
File "/home/mike/bin/.repo/repo/project.py", line 557, in CurrentBranch
b = self.work_git.GetHead()
File "/home/mike/bin/.repo/repo/project.py", line 1909, in GetHead
fd = open(path, 'rb')
IOError: [Errno 2] No such file or directory: '/home/mike/bin/.repo/manifests/.git/HEAD'

And when running ./repo init I get:
fatal: manifest url (-u) is required.
 
I'm getting a new error when trying to run ./repo sync. It says:
Traceback (most recent call last):
File "/home/mike/bin/.repo/repo/main.py", line 385, in <module>
_Main(sys.argv[1:])
File "/home/mike/bin/.repo/repo/main.py", line 365, in _Main
result = repo._Run(argv) or 0
File "/home/mike/bin/.repo/repo/main.py", line 121, in _Run
copts, cargs = cmd.OptionParser.parse_args(argv)
File "/home/mike/bin/.repo/repo/command.py", line 44, in OptionParser
self._Options(self._optparse)
File "/home/mike/bin/.repo/repo/subcmds/sync.py", line 126, in _Options
self.jobs = self.manifest.default.sync_j
File "/home/mike/bin/.repo/repo/manifest_xml.py", line 228, in default
self._Load()
File "/home/mike/bin/.repo/repo/manifest_xml.py", line 263, in _Load
b = m.GetBranch(m.CurrentBranch).merge
File "/home/mike/bin/.repo/repo/project.py", line 557, in CurrentBranch
b = self.work_git.GetHead()
File "/home/mike/bin/.repo/repo/project.py", line 1909, in GetHead
fd = open(path, 'rb')
IOError: [Errno 2] No such file or directory: '/home/mike/bin/.repo/manifests/.git/HEAD'

And when running ./repo init I get:
fatal: manifest url (-u) is required.

You didn't run the full command to repo init. Also you don't need the ./ in front of repo when running repo commands.
 
I'm getting a new error when trying to run ./repo sync. It says:
Traceback (most recent call last):....

fd = open(path, 'rb')
IOError: [Errno 2] No such file or directory: '/home/mike/bin/.repo/manifests/.git/HEAD'

And when running ./repo init I get:
fatal: manifest url (-u) is required.

I had the same problem and I deleted the .repo folder under the build directory. Hit "crtl + h" to view hidden folders if you don't see it. After that you can re-run
Code:
[COLOR=#000000][FONT=Ubuntu][B]curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo[/B][/FONT][/COLOR]
It's worked for me

Edit: When repo initializes, it makes a folder called ".repo/manifests.git/" but it's looking for ".repo/manifests/.git/" I don't know where in the script it's messing up, but I'm going to look at it or hope someone smarter than me beats me to it.
 
Sorry, I'll RTFM and post back when I have success. I'm pretty sure I'm compiling now.
EDIT: Finished compiling! Anything new in this version? It says 7.2-RC1 instead of RC0 now, by the way.
 
I still can't seem to do a full "~/bin/repo init". It gets stuck at different places. I have found that making a manifest folder and a .git folder allows repo to pass the Head file.
 
By the way, out of curiousity, how do the devs sync custom ROMs such as this one with the main Cyanogenmod 7 branch? Is is easy to break anything? (I want to know because if I get into a little coding, I'd like to know how to at least sync with mainline CM7 to update the ROM every once in a while, from source that is). Also, if you guys are short on powerful enough hardware and or don't have the time to compile, I can just checkout from github, compile, test the ROM, and upload it as an update, with permission to use as an update of course, if you want to. (Sorry for all the n00b questions, I'm just trying to do what I can to help!) Also, I probably have more free time, as I am a student.
 
No sudo, no ubuntu, no ubuntu repo's, pure debian sid, just apt-get it, after all it is where ubuntu gets it from in the first place ;)
 
Quick question: why are we required to install the stock ROM first if we formatted the /system mount? I thought that would be included in the ROM itself
 
Quick question: why are we required to install the stock ROM first if we formatted the /system mount? I thought that would be included in the ROM itself
I'm not sure I understand you. I think you mean do a factory reset? That just erases the lower DATA partition. The ROM installation formats the system partition. You can't have like FroYo settings and apps made for FroYo sitting on your load of GB.

If you mean something else, then I no know?
 
I don't understand why anyone would want to build android using ubuntu

Ubuntu freezes a debian sid (unstable) snapshot every 6 months, takes apps, etc, and modifies it to the point where it is binary incompatible with debian it's mother.

Then when the updates for ubuntu come, people wonder why it breaks like going from 10.04 to 12.04, the changes are so drastic it just fails, granted some people have no problem updating, others leave and find another distro.

A rolling release distro makes more sense, less problems.

Basically I would never use a dumbed down version of debian

This is just *my* 2 cents...


# touch universe
# chmod 777 universe
# ./universe

How I build CM7

No need for any special repositories because it's all in debian, debian is the mother & father of ubuntu, without debian, ubuntu would not exist

As ROOT

Code:
apt-get update && apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc schedtool lib32readline-gplv2-dev git-svn git-gui
All done as USER not ROOT

Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
mkdir android
cd android
repo init -u https://github.com/mantera/android.git -b gingerbread
repo sync
. build/envsetup.sh && brunch triumph -j2
 
3. In CWM recovery have you ever done a Mounts and Storage Menu < format /system? DO NOT DO IT I just want to make sure you have or have not as I have seen issues with that.

I would like to know a little more on this also, I was under the impression that this was a key to a "clean" install

I have always done this in cm7, in cm9 it causes bootloops for me so I don't do it
 
I would like to know a little more on this also, I was under the impression that this was a key to a "clean" install

I have always done this in cm7, in cm9 it causes bootloops for me so I don't do it

I am not sure what's in there. I am guessing part of the system partition. I deleted it once when installing the gb 2.3.4 rom to test. After I was done testing I could no longer install any roms at all (cm7, cm9). The only way I fixed it was reinstalling the stock froyo rom and then I could move from one rom to another with out issues.
 
Yes, I know Ubuntu takes from Debian. I have known that since I started using it. I would use Debian if my Wireless worked on it. Unfortunately, some wireless cards lack any/functioning libre drivers. Also, some versions of gnome come with wireless issues. Ubuntu has yet to give me that, so I'll stick to what works. I tried Debian before, and I thought it was great, but needed some UI polish. I liked it, but hardware issues drove me away. And yes, one can say Ubuntu steals from Debian, but please be aware that I am not willing to get into a defensive position over distro choice. I may be a noob, but I am trying here! Besides, Ubuntu provides a better development environment than Windows. At least it doesn't break compatibility and create its own Ubuntu-only programming platform (cough cough .NET) like some operating systems (cough cough Windows) and require you to upgrade all the time to use new features (cough cough Windows again). But you have a point - if everyone on the Linux side got along and gave into a handful of platforms (like Ubuntu contributing more to Debian and not creating Ubuntu-specific packages and patches,) we'd be in a more consistent and stable state now, and Linux would be more widely adopted. But as all the distro wars go on, Microsoft and Apple are both laughing in the corner all the way to the bank. You are obviously more experienced than me in the Linux and programming area, but please, be nice to a newbie and don't look down on Ubuntu so much. Once upon a time, you and others were in the same situation.
 
By the way, what am I getting different in my final build by syncing from g60madman's repository vs. mantera's repository?
 
By the way, what am I getting different in my final build by syncing from g60madman's repository vs. mantera's repository?

My repo is configured with Whyzor's fixes for the following
device/motorola/triumph
frameworks/base
dalvik

Since Mantera is focused on CM9 I don't believe he has made any changes for a while. Also my repo no longer has the RomManager as I removed it from the code. Since I am still working on the code it will be updated each time I release a new version of the ROM.
 
Based off all of the updates I've seen on your github, would it be worth compiling from it just yet? Or are more significant changes planned soon?
 
Based off all of the updates I've seen on your github, would it be worth compiling from it just yet? Or are more significant changes planned soon?

I would say yes, even though there is a bunch of updates (finally got a handle on github) they are related to the current build I released. The only difference is the RomManger is no longer in the build. I will only be pushing commits after I have tested and verified the build works.
 
Would you like me to post the build and credit it to you by somehow changing the name, and how would I do that? (I have built and booted from a successful compile yesterday.)
 
Would you like me to post the build and credit it to you by somehow changing the name, and how would I do that? (I have built and booted from a successful compile yesterday.)

If your using a CM7 build thank all the devs that have done the work

TickerGuy
IssacJ
Mantera
Whyzor

If you happen to use my build by all means throw my name in the bucket. I have not really done much yet. Mostly reorganized everything on my github, and threw up a website. However I should be releasing an update soon enough. Call it what you want, it is your take on CM7 :)

Edit: As for sharing the rom, you may need to setup an account at media fire. Since I have a web host with unlimited bandwidth I have a place to store all my roms.
 
Uh oh, getting a new error when trying to clone from git, g60madman, since it looks like a server error, could this be a problem on your end?
~/bin$ git clone https://github.com/g60madman/cm7.git
Cloning into 'cm7'...
fatal: https://github.com/g60madman/cm7.git/info/refs not found: did you run git update-server-info on the server?

Yeah I changed the instructions I am now setup like mantera with the normal repo init -u. Check my site for the new instructions on building http://mtdev.us/
 
Back
Top Bottom