1. Are you ready for the Galaxy S20? Here is everything we know so far!

[DEV] CM7 Building & Development

Discussion in 'Android Devices' started by dsmryder, Apr 15, 2012.

  1. dsmryder

    dsmryder Android Expert
    Thread Starter

    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 (Text):
    1. [B]sudo add-apt-repository

    1. Download the Forums for Android™ app!


  2. MikeRL

    MikeRL Android Enthusiast

    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.
  3. MikeRL

    MikeRL Android Enthusiast

    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>
    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
    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
    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.
  4. mantera

    mantera Android Expert

    You didn't run the full command to repo init. Also you don't need the ./ in front of repo when running repo commands.
    MikeRL likes this.
  5. dsmryder

    dsmryder Android Expert
    Thread Starter

    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 (Text):
    1. [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.
    MikeRL likes this.
  6. MikeRL

    MikeRL Android Enthusiast

    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.
  7. dsmryder

    dsmryder Android Expert
    Thread Starter

    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.
  8. MikeRL

    MikeRL Android Enthusiast

    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.
  9. piper_

    piper_ Well-Known Member

    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 ;)
  10. exProphecy

    exProphecy Android Enthusiast

    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
  11. dsmryder

    dsmryder Android Expert
    Thread Starter

    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?
  12. piper_

    piper_ Well-Known Member

    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 (Text):
    1. 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 (Text):
    1. mkdir ~/bin
    2. PATH=~/bin:$PATH
    3. curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
    4. chmod a+x ~/bin/repo
    5. mkdir android
    6. cd android
    7. repo init -u https://github.com/mantera/android.git -b gingerbread
    8. repo sync
    9. . build/envsetup.sh && brunch triumph -j2
  13. piper_

    piper_ Well-Known Member

    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
  14. g60madman

    g60madman Guest

    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.
    stephanos likes this.
  15. MikeRL

    MikeRL Android Enthusiast

    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.
    piper_ likes this.
  16. MikeRL

    MikeRL Android Enthusiast

    By the way, what am I getting different in my final build by syncing from g60madman's repository vs. mantera's repository?
  17. g60madman

    g60madman Guest

    My repo is configured with Whyzor's fixes for the following

    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.
    MikeRL likes this.
  18. MikeRL

    MikeRL Android Enthusiast

    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?
  19. g60madman

    g60madman Guest

    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.
    MikeRL likes this.
  20. MikeRL

    MikeRL Android Enthusiast

    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.)
  21. g60madman

    g60madman Guest

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


    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.
    MikeRL likes this.
  22. MikeRL

    MikeRL Android Enthusiast

  23. g60madman

    g60madman Guest

    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/
    MikeRL likes this.
  24. MikeRL

    MikeRL Android Enthusiast

    When I'm done compiling, will there be any noticeable changes besides the lack of ROM Manager?
  25. g60madman

    g60madman Guest

    Nope, should be the exact same. The nice thing is when ever I do an update to the code all you need to do is do a repo sync and you will have all my new updates. It makes it a lot easier going forward.
    MikeRL likes this.

Motorola Triumph Forum

Features and specs are not yet known.

Release Date

Share This Page