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

Root Build CyanogenMod7 from source | Development area

bahahaha...so funny...now it makes sense..Its crazy we need to download every other device too though..

Well, if it were straight AOSP, we wouldn't have to. The benefit (and in some cases, the problem) of the CM project is it was designed to allow us to add our device to the tree, modify our makefiles accordingly, and build. It's impressive how well the CM team has made the Android source workaround us and not the other way around. And it caters to boatload of devices (which AOSP source doesn't).

Trying to build vanilla AOSP is a glorified pain in the ass (IMO). I've rarely had another device in the CM source break the entire build. Most of the time it was no one else's fault but my own.
 
now the script is just bailing on me!! i wiped everything and tried to start fresh...i wish there was an alternate method...surely there is...????​



Code:
watson540@sabayon ~/android/system $ rm -rf *
[LEFT]watson540@sabayon ~/android/system $ repo init -u git://github.com/ikarosdev/android.git -b gingerbread[/LEFT]
 
[LEFT]Your Name  [watson540]: 
Your Email [watson540@sabayon.(none)]: [/LEFT]
 
[LEFT]Your identity is: watson540 <watson540@sabayon.(none)>
is this correct [y/n]? y[/LEFT]
 
[LEFT]repo initialized in /home/watson540/android/system
watson540@sabayon ~/android/system $ repo sync -j2
Fetching projects: 100% (310/310), done.  
Checking out files: 100% (3422/3422), done.ut files:  20% (713/3422)   
Checking out files: 100% (3864/3864), done.
Checking out files: 100% (133/133), done.g out files:  49% (66/133)   
Checking out files: 100% (148/148), done.g out files:  42% (63/148)   
Checking out files: 100% (146/146), done.
Checking out files: 100% (14/14), done.ing out files:  50% (7/14)   
fatal: This operation must be run in a work tree
Traceback (most recent call last):
 File "/home/watson540/android/system/.repo/repo/main.py", line 238, in <module>
   _Main(sys.argv[1:])
 File "/home/watson540/android/system/.repo/repo/main.py", line 220, in _Main
   repo._Run(argv)
 File "/home/watson540/android/system/.repo/repo/main.py", line 125, in _Run
   cmd.Execute(copts, cargs)
 File "/home/watson540/android/system/.repo/repo/subcmds/sync.py", line 417, in Execute
   project.Sync_LocalHalf(syncbuf)
 File "/home/watson540/android/system/.repo/repo/project.py", line 956, in Sync_LocalHalf
   self._InitWorkTree()
 File "/home/watson540/android/system/.repo/repo/project.py", line 1579, in _InitWorkTree
   raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree
watson540@sabayon ~/android/system $ [/LEFT]

When I had to redo my copy last week, I ended up dumping the current copy of repo and had to redownload the latest repo script and that helped a lot. it's been working great since I did that.

Use this command to curl the current repo--from the AOSP site. This command has been updated from what is listed in Isaac's OP:

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
 
@Isaac --Sheesh!! So I finally got your miui kernel to build. It wasn't the config as I thought originally. However, thanks for posting it anyways.

I was trying to use the ramdisk from your boot.img in the miui rom. And for some reason, whenever the compiled kernel would boot, it would stop at the M logo with this when using "adb logcat":

exec '/system/bin/sh' failed: No such file or directory

So I was dense and took me a while but it finally occurred to me that it might be the ramdisk and NOT the kernel...

Once I fixed that, I finally have a working kernel.

Thanks again for your help!
 
I finally got the repo sync to finish..It took me all day yesterday because i would try to init the repo and it would fail out instantly..I ended up downgrading curl and that fixed that..

Now I have just realized im not running stock anymore so I dont have anywhere to pull the files from..possible I can pull them from miui or cm?
 
@Isaac --Sheesh!! So I finally got your miui kernel to build. It wasn't the config as I thought originally. However, thanks for posting it anyways.

I was trying to use the ramdisk from your boot.img in the miui rom. And for some reason, whenever the compiled kernel would boot, it would stop at the M logo with this when using "adb logcat":

exec '/system/bin/sh' failed: No such file or directory

So I was dense and took me a while but it finally occurred to me that it might be the ramdisk and NOT the kernel...

Once I fixed that, I finally have a working kernel.

Thanks again for your help!

I don't know if I mentioned this to you, but I updated the original frameworks repo (the "stock" one). A simple repo sync should bring everything up-to-date for you.
 
I don't know if I mentioned this to you, but I updated the original frameworks repo (the "stock" one). A simple repo sync should bring everything up-to-date for you.

Yes you did. Thank you. I tested that out the other day and was able to build successfully.
 
BTW if you have Win7/64 bit VMWare's virtual machine works fine for us running Ubuntu - that's what I use.

but wheres the fun in that? lol :p but really, its part of a project that i want to get going. im gonna have 2 computers hooked up between a switch so with "scroll lock + scroll lock + 1 or 2" i can go between both computers in a snap. and then when im done with that. im upgrading my video cards and ram so i can accomidate 4 monitors!! :D
 
how do you build individual packages?

p.s- im gonna be on this thread here in 2-3 days... im getting a new computer that im dual-booting ubuntu 11.10 on and im gonna get into source building.

Like this:

Code:
make [appname]

So, if you wanted to build Mms apk, you would do:

Code:
make Mms
 
Doing a repo sync now. Sheesh it's taking a long time. Looks like CM already added the ICS branch to their code.
 
@isaac - It looks like you need to sync up your source again before a repo sync will work and build.

target Java: CMScreenshot (out/target/common/obj/APPS/CMScreenshot_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
7 errors
make: *** [out/target/common/obj/APPS/CMParts_intermediates/classes-full-debug.jar] Error 41
make: *** Waiting for unfinished jobs....
 
@isaac - It looks like you need to sync up your source again before a repo sync will work and build.

target Java: CMScreenshot (out/target/common/obj/APPS/CMScreenshot_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
7 errors
make: *** [out/target/common/obj/APPS/CMParts_intermediates/classes-full-debug.jar] Error 41
make: *** Waiting for unfinished jobs....

Done. Everything is caught up now. I had the same problem, but I'm passed it now after the upstream merge.
 
The repo command gives me syntax errors when I tried to set up the building environment today. Not sure why... id like to start building but this problem is preventing that
 
Done: https://github.com/ikarosdev/androi...mmit/cf9c2ce6fb605d0efa618e22840cb4c437894a8a

NOTE: You will have to delete ~/android/system/vendor/motorola and re-run extract-files.sh. If you don't want to do that, just delete this (https://github.com/ikarosdev/androi...9c2ce6fb605d0efa618e22840cb4c437894a8a#L0L189) created by the script.

Let me know if it works. My laptop is nearing its death so I can't build anymore. I just had to reinstall Ubuntu today because it was acting up, but I don't think it'll be working for much longer.
 
Done: https://github.com/ikarosdev/androi...mmit/cf9c2ce6fb605d0efa618e22840cb4c437894a8a

NOTE: You will have to delete ~/android/system/vendor/motorola and re-run extract-files.sh. If you don't want to do that, just delete this (https://github.com/ikarosdev/androi...9c2ce6fb605d0efa618e22840cb4c437894a8a#L0L189) created by the script.

Let me know if it works. My laptop is nearing its death so I can't build anymore. I just had to reinstall Ubuntu today because it was acting up, but I don't think it'll be working for much longer.

Deleted the folder as you said, repo synced, and then re-extracted the files. Rebuilt.

The Portable Hotspot works great! (at least in my very limited test in tethering my Xoom to my phone.)
 
Back
Top Bottom