Hey guys, i am interested in making my own ROMO for this device. I know that it will probably be difficult to do so i just wanted to know the basics, as in, what do i need to know (skills) before i fully get into making a ROM. the difficulty is not a factor, i will get it eventually
Linux based operating system and effort
start by compiling cm from the instructions on there site
chococomaxim said:
Hey guys, i am interested in making my own ROMO for this device. I know that it will probably be difficult to do so i just wanted to know the basics, as in, what do i need to know (skills) before i fully get into making a ROM. the difficulty is not a factor, i will get it eventually
Click to expand...
Click to collapse
Set up cygwin kitchen with a Linux virtual machine and learn the structure and functions of rom folders and files.. That's all you need...
Sent from my MB886 using xda app-developers app
What you need really depends on what kind of rom you want to do. For Stock Based Roms, all you need is 7-zip, Notepad++, apktool and a wrapper for it (android kitchen, etc).
You don't need Linux unless you want to compile from source. Ignore the Cygwin suggestion -- Cygwin will eat the cpu/ram up and that's whats needed the most when compiling (well, disk IO is, but....). Once you have Linux installed, do a PAC or CM10.2 build since they both fully compile and ya need to test out your build environment.
Cygwin is fine if you just need to use some Linux apps\commands every once and a while and ya don't wanna boot into Linux. Unless you have a really, really bad ass PC (8 core AMD @ 3.8ghz, 16GB+ ram, SSD) Cygwin/virtual environments won't be worth using for things like compiling.
skeevydude said:
What you need really depends on what kind of rom you want to do. For Stock Based Roms, all you need is 7-zip, Notepad++, apktool and a wrapper for it (android kitchen, etc).
You don't need Linux unless you want to compile from source. Ignore the Cygwin suggestion -- Cygwin will eat the cpu/ram up and that's whats needed the most when compiling (well, disk IO is, but....). Once you have Linux installed, do a PAC or CM10.2 build since they both fully compile and ya need to test out your build environment.
Cygwin is fine if you just need to use some Linux apps\commands every once and a while and ya don't wanna boot into Linux. Unless you have a really, really bad ass PC (8 core AMD @ 3.8ghz, 16GB+ ram, SSD) Cygwin/virtual environments won't be worth using for things like compiling.
Click to expand...
Click to collapse
Thanks for the info, I do have Linux and I want to compile from the source.
Sent from my Atrix HD using Tapatalk 4
chococomaxim said:
Thanks for the info, I do have Linux and I want to compile from the source.
Sent from my Atrix HD using Tapatalk 4
Click to expand...
Click to collapse
Which distro & what rom?
I use Manjaro Linux and schroot into Ubuntu 12.04 for compiling -- its the best of both worlds -- a fully up-to-date modern Linux distro with an environment recommended for building android. Using just Ubuntu 12.04/Mint 13 kinda sucks cause its a bit outdated -- Old versions of apps, desktop environments (Gnome, XFCE, KDE, etc). Since I've been doing it for a while now, I gotta recommend the modern Linux/schroot for android way. So far the only downside is a 20 minute increase in compile time (probably due to my 3GB ram more than anything), but the benefit of having an up to date desktop for everything else is worth it.
I'll admit that I cheated a bit. I was dual booting Manjaro and Ubuntu 12.04 until I just said screw it and setup the schroot. Normally with an schroot setup, the other environment is setup from a basic command line environment and if you copy/paste the apt-get commands from the various guides around you'll be missing necessary files (those guides are written assuming you're doing it from an actual desktop install which includes a lot more files than the bare minimum command line only install). I've done schroot environments both ways and using my dual boot OS as my schroot has worked better (only problem is the GUI is broke if I try to boot into Ubuntu now, but apt-get update and upgrade work, from boot and schroot, and that's the only reason I'd actually boot into now anyways).
skeevydude said:
Which distro & what rom?
I use Manjaro Linux and schroot into Ubuntu 12.04 for compiling -- its the best of both worlds -- a fully up-to-date modern Linux distro with an environment recommended for building android. Using just Ubuntu 12.04/Mint 13 kinda sucks cause its a bit outdated -- Old versions of apps, desktop environments (Gnome, XFCE, KDE, etc). Since I've been doing it for a while now, I gotta recommend the modern Linux/schroot for android way. So far the only downside is a 20 minute increase in compile time (probably due to my 3GB ram more than anything), but the benefit of having an up to date desktop for everything else is worth it.
I'll admit that I cheated a bit. I was dual booting Manjaro and Ubuntu 12.04 until I just said screw it and setup the schroot. Normally with an schroot setup, the other environment is setup from a basic command line environment and if you copy/paste the apt-get commands from the various guides around you'll be missing necessary files (those guides are written assuming you're doing it from an actual desktop install which includes a lot more files than the bare minimum command line only install). I've done schroot environments both ways and using my dual boot OS as my schroot has worked better (only problem is the GUI is broke if I try to boot into Ubuntu now, but apt-get update and upgrade work, from boot and schroot, and that's the only reason I'd actually boot into now anyways).
Click to expand...
Click to collapse
I have Linux mint 15 and going to use a cm build
Sent from my Atrix HD using Tapatalk 4
Should I stay where I'm at or do something similar to what you are doing
Sent from my Atrix HD using Tapatalk 4
chococomaxim said:
I have Linux mint 15 and going to use a cm build
Sent from my Atrix HD using Tapatalk 4
Click to expand...
Click to collapse
You shouldn't have to do much more than search xda for an Ubuntu 13.04 guide (I think Mint 15 is Ubuntu 13.04). From there its pretty much
make a directory for the source, open a terminal, cd to the created directory
repo init -u https://github.com/CyanogenMod/android.git -b cm-10.2
add the codebox below to a new file named roomservice.xml
repo sync
-. vendor/cm/get-prebuilts
. build/env-setup.sh
brunch mb886
To update and build a new rom
make a copy of the last compiled rom if necessary (located at out/product/mb886)
open terminal at source directory
make clean
do everything from repo sync to brunch
Everything in italics is terminal commands
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_motorola_mb886" path="device/motorola/mb886" remote="github" revision="cm-10.2" />
<project name="CyanogenMod/android_device_motorola_msm8960-common" path="device/motorola/msm8960-common" remote="github" revision="cm-10.2" />
<project name="CyanogenMod/android_kernel_motorola_msm8960-common" path="kernel/motorola/msm8960-common" remote="github" revision="cm-10.2" />
<project name="TheMuppets/proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="cm-10.2" />
</manifest>
Lots of the guides suggest using CCACHE, but I gotta recommend NOT using it. In the past I did use it, but sometimes builds would have random errors, FC's, and whatnot, and builds using the same sources (no repo sync) with CCACHE disabled didn't have the random bugs. Ccache might speed up the 2nd build and on, but risking random bugs isn't worth the small speed up IMHO.
---------- Post added at 01:00 PM ---------- Previous post was at 12:47 PM ----------
chococomaxim said:
Should I stay where I'm at or do something similar to what you are doing
Sent from my Atrix HD using Tapatalk 4
Click to expand...
Click to collapse
If you're happy with Mint 15, then stay with it. You might run into some Python2/3 issues, but the rest of it should work fine. "repo" doesn't like Python 3 and doesn't like being initialized with 3 and syncing with 2 and vice-a-versa. Luckily, the OpenJDK/Java7 patches are included in the CM repos now, so the BS of installing Java6 isn't here anymore (be glad you don't have to deal with it).
If you're having a difficult time using an updated Linux as an android build environment, then consider using the schroot way. IMO, its worth at least to try to compile on your current system -- only go the schroot or dual boot if your current system doesn't like android compiling.
skeevydude said:
If you're having a difficult time using an updated Linux as an android build environment, then consider using the schroot way. IMO, its worth at least to try to compile on your current system -- only go the schroot or dual boot if your current system doesn't like android compiling.
Click to expand...
Click to collapse
I'm also going to get a Linux install up (Debian 7.10), and probably going to start building/compiling, and will very likely run into issues. Would there be any extra packages I would need besides that giant list in every build guide to get it working right? Would there be issues like there would be trying to build with 13.04? I know Ubuntu is what everyone uses for compiling, but I'd rather be at the base of everything.
Also, incase there are big issues, how would we go about setting up a schroot?
skeevydude said:
You shouldn't have to do much more than search xda for an Ubuntu 13.04 guide (I think Mint 15 is Ubuntu 13.04). From there its pretty much
make a directory for the source, open a terminal, cd to the created directory
repo init -u https://github.com/CyanogenMod/android.git -b cm-10.2
add the codebox below to a new file named roomservice.xml
repo sync
-. vendor/cm/get-prebuilts
. build/env-setup.sh
brunch mb886
To update and build a new rom
make a copy of the last compiled rom if necessary (located at out/product/mb886)
open terminal at source directory
make clean
do everything from repo sync to brunch
Everything in italics is terminal commands
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_motorola_mb886" path="device/motorola/mb886" remote="github" revision="cm-10.2" />
<project name="CyanogenMod/android_device_motorola_msm8960-common" path="device/motorola/msm8960-common" remote="github" revision="cm-10.2" />
<project name="CyanogenMod/android_kernel_motorola_msm8960-common" path="kernel/motorola/msm8960-common" remote="github" revision="cm-10.2" />
<project name="TheMuppets/proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="cm-10.2" />
</manifest>
Lots of the guides suggest using CCACHE, but I gotta recommend NOT using it. In the past I did use it, but sometimes builds would have random errors, FC's, and whatnot, and builds using the same sources (no repo sync) with CCACHE disabled didn't have the random bugs. Ccache might speed up the 2nd build and on, but risking random bugs isn't worth the small speed up IMHO.
---------- Post added at 01:00 PM ---------- Previous post was at 12:47 PM ----------
If you're happy with Mint 15, then stay with it. You might run into some Python2/3 issues, but the rest of it should work fine. "repo" doesn't like Python 3 and doesn't like being initialized with 3 and syncing with 2 and vice-a-versa. Luckily, the OpenJDK/Java7 patches are included in the CM repos now, so the BS of installing Java6 isn't here anymore (be glad you don't have to deal with it).
If you're having a difficult time using an updated Linux as an android build environment, then consider using the schroot way. IMO, its worth at least to try to compile on your current system -- only go the schroot or dual boot if your current system doesn't like android compiling.
Click to expand...
Click to collapse
i found this link from the CM wiki http://wiki.cyanogenmod.org/w/Build_for_mb886 and i was wondering what would be the different because it has totally different commands than what you provided. is it because this the wiki guide is 10.1 and the one you had was 10.2?
chococomaxim said:
i found this link from the CM wiki http://wiki.cyanogenmod.org/w/Build_for_mb886 and i was wondering what would be the different because it has totally different commands than what you provided. is it because this the wiki guide is 10.1 and the one you had was 10.2?
Click to expand...
Click to collapse
I believe it's all the same, except when you get to the repo init, change cm-10.1 to cm-10.2.
Sent from my MB886 using xda app-developers app
Related
Obviously, I am going to be cleaning up some bugs with the CM7 build...
But, for those of you who might be inclined to develop a CM-based AOSP ROM, feel free to check out my github source to see what's involved:
https://github.com/Hashcode
Or you can:
repo init -u https://[email protected]/Hashcode/cm4D3.git
repo sync
To pull the entire set of android files that I use for compiling the current build.
Please note that the Board Config is currently setup to generate Safestrap .zip files.
Great job
Thank you for everything you have done for the droid 3!
Is there a kitchen for DROID 3 roms. Running windows 7
Sent from my DROID3 using xda premium
You need to be running Linux to do this hardcore kind of stuff.
Like Ubuntu I had it set up in VB and detain. Was just wondering if there was some thing for Motorola roms out there. I have had HTC phones this my first moto with android on it.
Sent from my DROID3 using xda premium
I'm starting to tinker with building (learning, actually) ROMs. I'm running Linux Mint Debian - has there been a kitchen built for D3?
Hashcode said:
repo init https://[email protected]/Hashcode/cm4D3.git
Click to expand...
Click to collapse
That should be
Code:
repo init -u git://github.com/Hashcode/cm4D3.git -b gingerbread
or whatever URL you want to use from the access URL box at https://github.com/Hashcode/cm4D3.
And of course "gingerbread" could be "ics" if your excitement about being on the bleeding edge overrides what should be a fairly sensible fear reaction to the term "bleeding edge".
@Hashcode: You don't use your own ALSA repos? (Comparing with my own generated manifest for your project...)
Also, are you planning on pulling newer Gingerbread manifest changes into your tree? I noticed CyanogenMod have gained a u8150 device tree, and I happen to have one of those, but your manifest doesn't list it...
Ooops. I have a u8510. >_< But the question stands...
TBBle said:
That should be
Code:
repo init -u git://github.com/Hashcode/cm4D3.git -b gingerbread
or whatever URL you want to use from the access URL box at https://github.com/Hashcode/cm4D3.
And of course "gingerbread" could be "ics" if your excitement about being on the bleeding edge overrides what should be a fairly sensible fear reaction to the term "bleeding edge".
@Hashcode: You don't use your own ALSA repos? (Comparing with my own generated manifest for your project...)
Also, are you planning on pulling newer Gingerbread manifest changes into your tree? I noticed CyanogenMod have gained a u8150 device tree, and I happen to have one of those, but your manifest doesn't list it...
Ooops. I have a u8510. >_< But the question stands...
Click to expand...
Click to collapse
Thank you for pointing out that my repo init line was wrong. I fixed it for those that were having issues.
Also, for those watching my manifest for ICS, I'm getting an error when syncing:
error: revision refs/heads/master in manifests not found
I'm trying to fix that. Correction: Fixed it and double-checked with a repo sync.
Some quick answers:
- I tried to customize the alsa source to fix some of the audio issues. But it ended up being a bit more complex than just changing ALSA. Motorola added a layer into the audio system for handling HDMI audio and in call audio volume.
When you build stock AOSP Gingerbread using the alsa drivers, the libaudio.so file ends up being all of the ALSA calls. If you examine the libaudio from the D3, you'll see that it is nothing of the sort. It's the customized mixer lib for RDS voice and HDMI audio. There's another lib from the phone: libaudio_ext.so which ends up being the alsa calls.
All of which made customizing just the alsa code risky at best as the further away from the version of alsa that was used on the phone, the less likely that the custom libaudio would work.
I probably still have the unfinished hardware_alsa git out on github, but it's not active in the current build.
- I can occasionally check for updates to the CM7 manifest and add them, or if you fork the manifest and add it in there that works as well.
Side Note: I may need to pick your brain on an EGL 0x0500 erorr I'm getting in the ICS code. I'm fairly certain it's an enum value that our version of the PowerVR drivers aren't set to handle, but I'd like to confirm that for my troubleshooting. And it seems that you might have some knowledge in that area
Where/how does someone begin working on building a ROM once they've downloaded these files? I'd rather dive into code and learn Android rather than using a menu driven wizard. Is there a tutorial somewhere? What tools are needed?
Sent from my DROID3 using XDA App
Phibernaut said:
Where/how does someone begin working on building a ROM once they've downloaded these files? I'd rather dive into code and learn Android rather than using a menu driven wizard. Is there a tutorial somewhere? What tools are needed?
Sent from my DROID3 using XDA App
Click to expand...
Click to collapse
This would be the starting point that you're looking for:
http://source.android.com/
Hashcode said:
Side Note: I may need to pick your brain on an EGL 0x0500 erorr I'm getting in the ICS code. I'm fairly certain it's an enum value that our version of the PowerVR drivers aren't set to handle, but I'd like to confirm that for my troubleshooting. And it seems that you might have some knowledge in that area
Click to expand...
Click to collapse
Some, but probably not enough. I'm happy to look, but I'm actually moving internationally tomorrow so I may not have 'net access for a week or so. >_< (That's why I've been trying so hard to get backup working. ^_^)
Once I'm settled in I will probably use fdisk to repartition my device or have a poke at hacking sd-ext support into safestrap, so I can start playing with custom ROMs.
Did you see my safestrap-ME863 nandroid patch in the Safestrap thread, BTW? It's got a couple of TODOs, but seems safe and roughly correct to me. http://forum.xda-developers.com/showpost.php?p=19683372&postcount=249
It could also form the basis for detecting when /preinstall can't be used as safe-system although I didn't look to see if there's already code to do that.
Does anyone know of a site where I can peek at reference code for random things (Apps, Kernal etc.)? It'll make it easier to understand how the code works. I haven't look at any code yet so I don't even know what language apps and the os are programmed in. (Java, C, C++, Ruby)
Sent from my D3-CM7-SS using xda premium
tenchi19134 said:
Does anyone know of a site where I can peek at reference code for random things (Apps, Kernal etc.)? It'll make it easier to understand how the code works. I haven't look at any code yet so I don't even know what language apps and the os are programmed in. (Java, C, C++, Ruby)
Click to expand...
Click to collapse
Just pull down the repo as Hashcode describes in this thread - you'll have all of the Android source. To the best of my knowledge, it comprises of mostly C, C++, and Java, but there is probably a smathering of some other things like ASM, perl, BASH, etc.
And to those who are asking if there is a kitchen, there is, it's called make
Hello everybody,
I haven't really done much on these forums, so when the AOSP source came out, I decided that now was the time for me to come and help. Pretty much anybody that wants to help right now can help, especially beginners if you want to learn how to build your own ROMs, as this is also my first ROM. I don't have a 64-bit computer, so I won't be able to do much except for Fridays when me and my friends (who have 64-bit computers) hang out. I know the Nookie devs a are working on cm10, but if they want to come in and help every so often, I would love that.
PLEASE REMEMBER THAT THESE ARE PRE-PRE-ALPHA BUILDS! ONLY USER THESE BUILDS IF YOU ARE WILLING TO SACRIFICE YOUR NOOK!
I am currently getting a goo.im account to host the builds on.
Thanks to anybody who decides to help.
thejrcrafter
Sent from my NookColor using xda app-developers app
Not to sound disrespectful but why do we need this thread? I'm just asking because wouldn't the nookie dev team just continue cm10.1 through the Nightlies thread? And if you follow cyanogenmod on G+ they have said they're still working on adding features from cm10 to the new branch of jellybean(4.2), so wouldn't these builds be a little premature?
Sent from my SGH-T999 using xda app-developers app
Oh. Now I sound stupid. The point about cm10.1 still in development is definitely something I overlooked, but with the nookie devs just taking over the whole build, I disagree with that. One of the main points of this thread is to help people that want to build and debug but don't know how to. Since AOSP 4.2 is for the most part stable, I think I might work on that instead.
Sent from my NookColor using xda app-developers app
Because there is no actual development in this thread, i have moved it to general for now. Should development happen, we can look at moving it back.
Fair enough.
Sent from my NookColor using xda app-developers app
thejrcrafter2 said:
Oh. Now I sound stupid. The point about cm10.1 still in development is definitely something I overlooked, but with the nookie devs just taking over the whole build, I disagree with that. One of the main points of this thread is to help people that want to build and debug but don't know how to. Since AOSP 4.2 is for the most part stable, I think I might work on that instead.
Sent from my NookColor using xda app-developers app
Click to expand...
Click to collapse
OK that's incredibly understandable if I set up a build environment I might come back and learn too thanks
Sent from my SGH-T999 using xda app-developers app
*shrug* eff it, why not?...let's do this...
what do I have to do first?...I am running ubuntu 12.04 on a partition on my laptop...i know that may be helpful....
Okay well since I've got a few people here, might as well start. If anyone still wants to come in though, that's fine. Pretty much all I know at this'd point is that you need a 64-bit Linux computer. I'll go research a little after school tomorrow and report what I find. Also, we might as well include the 4.2.1 bug updates while we're at it so then my dad doesn't get kicked off my contacts list. (Is the 4.2.1 update source available yet?)
Sent from my NookColor using xda app-developers app
thejrcrafter2 said:
Okay well since I've got a few people here, might as well start. If anyone still wants to come in though, that's fine. Pretty much all I know at this'd point is that you need a 64-bit Linux computer. I'll go research a little after school tomorrow and report what I find. Also, we might as well include the 4.2.1 bug updates while we're at it so then my dad doesn't get kicked off my contacts list. (Is the 4.2.1 update source available yet?)
Sent from my NookColor using xda app-developers app
Click to expand...
Click to collapse
i'm running ubuntu 12.04 32bit :\ i need 64?...crap....
plasticarmyman said:
i'm running ubuntu 12.04 32bit :\ i need 64?...crap....
Click to expand...
Click to collapse
That's what everybody says. But they said the same thing about CM9 and I successfully built on my 32bit Ubuntu. But when I tried to move to CM10, it kept getting stuck, freezing. So now I am in the process of starting over with 64bit.
Sent from my Nook HD+ using Tapatalk
Yeah I don't have 64 either... Is the Acer c7 a 64bit computer because I could just hack Ubuntu on it, if not I could sign up for amazon ec2, but that requires a random number to call me and my parents would not be very happy with that.
Sent from my NookColor using xda app-developers app
Okay, I was reading thru the source code tutorial on android.com, and it seems that building on a 32bit environment should in theory work, since all the required packages are i386 compatible:
For Ubuntu 10.04-11.10:
Code:
git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
And for Ubuntu 12.04 (Not officially supported, but should work since we'll work on the master branch):
Code:
git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Once I get home, I will see if it will compile on my Kubuntu 12.04 32-bit laptop (since Kubuntu is an official derivative of Ubuntu, it will probably work, especially since it has the apt-get repos) and tell you guys what happens, maybe post a video.
okay, I installed all of the packages for 12.04 successfully, except for when I tried installing the sun-java6-jdk, I was told that it didn't work or something. but in the packages list, there is the openjdk, so i hope thats not a problem. right now im trying to free up some space because my stupid 40 gb hard drive (dont make fun!) doesnt exactly like having 30 gb free.
PS is anybody still even following this thread?
THIS IS MY 42ND POST! YAY! 42!
I'm following..
thejrcrafter2 said:
okay, I installed all of the packages for 12.04 successfully, except for when I tried installing the sun-java6-jdk, I was told that it didn't work or something. but in the packages list, there is the openjdk, so i hope thats not a problem. right now im trying to free up some space because my stupid 40 gb hard drive (dont make fun!) doesnt exactly like having 30 gb free.
PS is anybody still even following this thread?
THIS IS MY 42ND POST! YAY! 42!
Click to expand...
Click to collapse
Do a web search for the sun-java6-jdk. It was removed from both conical and that maverick repository. It can still be installed once you find the right place. I just did it a few days ago. And I think it is required that it be sun rather than open.
Sent from my Nook HD+ using Tapatalk
leapinlar said:
Do a web search for the sun-java6-jdk. It was removed from both conical and that maverick repository. It can still be installed once you find the right place. I just did it a few days ago. And I think it is required that it be sun rather than open.
Sent from my Nook HD+ using Tapatalk
Click to expand...
Click to collapse
Not sure for 4.2 but I built 4.1 lots of times using openjdk. The compiler complains about it but it works fine. Also andbot should work fine with some tweaks for 4.2
Im interested in this tread although i use a momo9 ... Im been wanting to learn how to . I run arch linux 64
Alright, for starters, proper java support is actually crucial when you think about the fact that Android is built almost entirely in java. So I would suggest to go to developer.android.com and set up an appropriate development environment upon a clean install of a stable linux os (clean, ideally, otherwise, YMMV.. so clean.).
Android Devs just put out bundled Eclipse + AndroidSDK + Eclipse ADT plugin for all relevent architectures and OSes. It's a one-click-download-and-develop... once you separately download from Sun the Java package that matches your environment (Windows, Mac, Linux [x86/x86_64]). I recommend an older Ubuntu or Mint, like the previous LTS.. Newer is not always better.
With Linux, you can simply grab the appropriate Java pack and extract it into the resulting ADT Bundle from Google directory. Open the compressed Java package, rename the folder to jre from jre.1.7.whatever.the.full.name.is. Then extract it to eclipse/jre. This allows you to jusr run the eclipse exec from directory and java will work flawlessly, in linux.
From this point you can set up the rest of the build environment with a clear mind that the resulting errors will be much simpler to triage.
- sent from my motherfkin' Samsung Exynos Dual A15 Chromebook running motherfkin' Fedora 18 -- in XFCE cuz the bleeding edge has no driver support.
disynthetic said:
- sent from my motherfkin' Samsung Exynos Dual A15 Chromebook running motherfkin' Fedora 18 -- in XFCE cuz the bleeding edge has no driver support.
Click to expand...
Click to collapse
I'm sorry, but that signature is offensive and should not be displayed on public forums like XDA.
Sent from my Nook HD+ using Tapatalk
leapinlar said:
I'm sorry, but that signature is offensive and should not be displayed on public forums like XDA.
Sent from my Nook HD+ using Tapatalk
Click to expand...
Click to collapse
Apologies. I was excited about having just accomplished the task of getting Linux working on my Chromebook. No harm intended.
This is a guide to build CyanogenMOD 10.2 (Android 4.3) for Google Nexus 4. This guide is for OS X Mountain Lion (10.8).
[size=+1]Pre Requirements:[/size]
1) go to App Store on your OS X and Download Xcode 4. Once that is installed, open Xcode and go to preferences. There you find a tab “DOWNLOADS”, open it and there you can find “Command line tools” and next to it click INSTALL. It will take a few minutes to download and install
2) Make sure you have the android-sdk downloaded and setup adb and fastboot, so they work. It is recommended to place the android-sdk to /usr/local/
[size=+1]Initializing the build environment[/size]
First we need to set up our OS X to be able to build Android. This needs some extra things compared to for example, building in Linux, but the main stuff is pretty much the same. So let’s get started then, shall we?
Open up Terminal and type
Code:
java
If you don’t have java installed you will get a prompt to install it.
Next we will install homebrew (you can also use macports if you like)
Code:
ruby <(curl -fsSk https://raw.github.com/mxcl/homebrew/go)
Now make sure android-sdk and homebrew are in $PATH
Code:
touch ~/.bash_profile && echo "PATH=/usr/local/bin:/usr/local/sbin:$PATH:/usr/local/android-sdk/tools:/usr/local/android-sdk/platform-tools" >> ~/.bash_profile
I also recommend to add this edit to the .bash_profile file:
Code:
nano –w ~/.bash_profile
Code:
export BUILD_MAC_SDK_EXPERIMENTAL=1
Now run this and see if you need to update anything.
Code:
brew doctor
If you do (and you probably will once a day) type:
Code:
brew update
Now we need to get our dev packages
Code:
brew install git coreutils findutils gnu-sed gnupg pngcrush repo
Once that is done, run
Code:
brew outdated
if it shows anything, run
Code:
brew upgrade
Now run this the correct a few symlinks [Not sure if these are needed anymore]:
Code:
ln -s /usr/local/bin/gfind /usr/local/bin/find && ln -s /usr/local/bin/gsed /usr/local/bin/sed
Now to create our case sensitive image for our CM work [NOTE: the 60g can be changed to anything. It only takes up what it needs but I used 60GB]:
Code:
hdiutil create -type SPARSE -fs "Case-sensitive Journaled HFS+" -size 60g -volname "android" -attach ~/Desktop/Android
Now to create our working directory
Code:
cd /Volumes/Android && mkdir cm10.2 && cd cm10.2
[size=+1]Getting the source[/size]
Now to initialize the git and to download it
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
Download the sources:
Code:
repo sync
Wait until it is finished. It will take a long time, depending on your internet connection.
[size=+1]Obtain the device build files and proprietary files:[/size]
To do this we will use CyanogenMods "tool" called roomservice. Roomservice is replacing the old local_manifest.xml file. Just run the code below to create the file directly into the folder.
Code:
nano -w /Volumes/android/cm10.2/.repo/local_manifests/roomservice.xml
Paste the following lines into the file:
Code:
<manifest>
<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-10.2"/>
</manifest>
It seems that nowadays you only need to have the TheMuppets repo there, the roomservice process takes care of the rest and downloads the needed mako bits automatically. And actually it doesn't matter what you name the xml file under the local_manifests directory. The process loads every xml file from there in a alphabetical order. If you still have that local_manifest.xml file in your .repo directory, i suggest you remove that, because at that case that file will be read first and after that all the other from the local_manifests folder
Save the file. And rerun the code:
Code:
repo sync
Download the necessary pre-builts:
Code:
/Volumes/android/cm10.2/vendor/cm/get-prebuilts
That is all. The sources are now ready.
[size=+1]Building CyanogenMOD[/size]
If you build now, you're probably gonna get kernel build errors regarding the missing elf.h header (this error might be device specific). Fortunately, we already have this file downloaded, so we only need to copy it to /usr/local/include:
Code:
cp /Volumes/android/cm10.2/external/elfutils/libelf/elf.h /usr/local/include
FINALLY, we are ready to build:
Code:
cd /Volumes/android/cm10.2 && source build/envsetup.sh && brunch mako
Change “mako” to something else if you want to build for another device (of course needs to be supported by CM)
Then we just let the Mac do the rest. Remember that it will take a while to do the build, and meantime you Macs fans will scream for mercy while CM punishes your system ☺
After the build is finished successfully you can find your newly created flashable zip by typing:
Code:
cd $out
Look for .zip file with a tag UNOFFICIAL
Happy building!
[size=+2]Credits:Imperticus (borrowed some stuff from his guide
ArmanUV (borrowed some stuff from his guide[/size]
Build errors
jeroenqui said:
if you get a similar error like this when building, here is the solution:
Zcat: /volumes/android/cm10.1/out/target/product/mako/ramdisk.img.z: No such file or directory
then it's because zcat is old and broken. Do this to fix it and use the newer version: Gzcat
sudo mv /usr/bin/zcat /usr/bin/broken-zcat
sudo ln -s /usr/bin/gzcat /usr/bin/zcat
Click to expand...
Click to collapse
And this too
Is it possibile to build on osx leopard 10.5?
Inviato dal mio Nexus 4
Excellent write up
Cice96 said:
Is it possibile to build on osx leopard 10.5?
Inviato dal mio Nexus 4
Click to expand...
Click to collapse
Not totally sure but it should be possible.
kennyp987 said:
Excellent write up
Click to expand...
Click to collapse
Thanks!
Can you do same things for aokp
Awesome work !
Envoyé depuis mon Nexus 4 avec Tapatalk
Excellent! Will give it a try and let you know how it goes! Can you maybe add instructions for cherry picks?
Thanks!!!
Sent from my Nexus 4 using xda premium
+1
Sent from my Nexus 4 using Tapatalk 2
This worked for me. Thanks OP!
how much time takes to build ?
Zasuk said:
how much time takes to build ?
Click to expand...
Click to collapse
Build times will depend on what Cpu, memory and hardrive you have.
My Macbook pro is a little older (2009) and is running a core 2 duo, with 8gigs of ram and a Momentus hybrid XT hardrive.
My build times are about 2.5 hours. Using ccache, and not doing a make clobber before the build, build times will drop down to about 30 minutes or less for me.
Just wanted to say thanks to the OP for the guide. Everything worked like a charm.
One thing I did, just to avoid any unknown problems was to download the 10.6 sdk and add it to the Xcode sdk folder just for a little extra insurance being new to building with my Mac.
i have this error any idea ? thank you for this excellent thread !
hdiutil: create failed - Ressource occupée
hey man,
what would the local_manifest.xml look like for the AT&T Galaxy S3 (d2att) ?
[GUIDE] Building CM10.1 for Nexus 4 with Mac OS X Mountain Lion (aka OS X 10.8)
jakew02 said:
hey man,
what would the local_manifest.xml look like for the AT&T Galaxy S3 (d2att) ?
Click to expand...
Click to collapse
No idea
jakew02 said:
hey man,
what would the local_manifest.xml look like for the AT&T Galaxy S3 (d2att) ?
Click to expand...
Click to collapse
This is what mine looks like for d2vzw. I'd imagine you just replace the vzw with att:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_samsung_d2vzw" path="device/samsung/d2vzw" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_msm8960-common" path="device/samsung/msm8960-common" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_d2-common" path="device/samsung/d2-common" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" revision="cm-10.1" />
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung/" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_kernel_samsung_d2" path="kernel/samsung/d2" remote="github" />
</manifest>
Re: [GUIDE] Building CM10.1 for Nexus 4 with Mac OS X Mountain Lion (aka OS X 10.8)
How big is the sparseimage you guys made? I tried with 5gb and it filled up without finishing. My Mac partition only got 10gb of free space.
Sent from my Nexus 4 using Tapatalk 2
[GUIDE] Building CM10.1 for Nexus 4 with Mac OS X Mountain Lion (aka OS X 10.8)
sh0td0wn said:
How big is the sparseimage you guys made? I tried with 5gb and it filled up without finishing. My Mac partition only got 10gb of free space.
Sent from my Nexus 4 using Tapatalk 2
Click to expand...
Click to collapse
5gigs isä way too small.
The source hogs at least 15gb (about) and building takes at least the same. So I made a 70gb image so it wouldn't fill up
Awesome guide! Any chance you can tell us how to build it with the Linaro toolchain and Bionic stuff everyone says makes android faster?
---------- Post added at 01:27 PM ---------- Previous post was at 12:34 PM ----------
FYI this command is failing:
/usr/bin/ruby -e "$(/usr/bin/curl –fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
Looks like the URL is no good any more.
EDIT: This is the new command for downloading homebrew:
ruby <(curl -fsSk https://raw.github.com/mxcl/homebrew/go)
Hello,
I don't want to ask how to build ROM.
I am new to building and compiling. I followed tutorial here on xda.
I installed everything crucial, then I do "repo init" ( repo init -u https://github.com/P880-dev/android.git -b cm-11.0) and then "repo sync". Source has downloaded. Then I do "source \envsetup.sh", "lunch", chose 11 as cm_p880-userdebug and at last "make -j6 otapackage". Now I have a question: I am compiling it for like 6 hours and in "home\username\android\out\project\p880" is around 12 GB of data, is that good?
Sent from my LG-P880 using Tapatalk
yep that is good.. every next time would be faster..
how long ? depends on processor and ram
@gerciolisz
Oh, forgot my specs:
Asus laptop
Core i5 3120m
6 GB ram
in virtualbox:
3 cores
2,5 gb
60 gb disk
And run make -j6
whoah it can be a long day to you i have ubuntu in dualboot with windows i5 and 12gb ram and it took about 4 hours
I am more concerned about that I have only 6 gb of disk available. But I think it is on the end of process. It is worth if waiting
Compiling done First compiling successed Tomorrow time for testing.
Just 2.3 GB of storage left
Do I need to manually now run ccache=1 (or sth like that - to not compile everytime everything) or is good if it is already in file somewhere in repos configuration?
You have to initialize ccache before compilation, that way it can cache the code when you first compile it. Check here.
LGaljo said:
Compiling done First compiling successed Tomorrow time for testing.
Just 2.3 GB of storage left
Do I need to manually now run ccache=1 (or sth like that - to not compile everytime everything) or is good if it is already in file somewhere in repos configuration?
Click to expand...
Click to collapse
Just like Adam said.. But anyway it needs more space to cache..
Sent from my LG-P880 using xda app-developers app
I will expand disk. I added first two lines in bashrc. But I didn't run prebuilts/misc/linux-x86/ccache/ccache -M 50G. It is good if I do it now?
Sent from my LG-P880 using Tapatalk
LGaljo said:
I will expand disk. I added first two lines in bashrc. But I didn't run prebuilts/misc/linux-x86/ccache/ccache -M 50G. It is good if I do it now?
Sent from my LG-P880 using Tapatalk
Click to expand...
Click to collapse
You can, but won't have effect now as you already compiled.
gerciolisz said:
whoah it can be a long day to you i have ubuntu in dualboot with windows i5 and 12gb ram and it took about 4 hours
Click to expand...
Click to collapse
Today I built my new build from scratch in 2 hours and half. I made dualboot and run make -j12 otapackage. Mean while I was able to surf the web :laugh:.
Hi!
Perhaps this thread actually can be some kind of a tutorial on how to build CM11 for P880, if you succeded?
I have followed this thread:
http://forum.xda-developers.com/showthread.php?t=2515305
Except i did some mistakes, so i simply did a fresh Ubuntu reinstall on a SSD-disk so it hopefully also will build faster..
I have some questions though:
- Don't we need to insert the code into the local_manifest.xml?
- Also, i see you don't compile it using "brunch p880" command.. Is there a reason for this?
LGaljo said:
Today I built my new build from scratch in 2 hours and half. I made dualboot and run make -j12 otapackage. Mean while I was able to surf the web :laugh:.
Click to expand...
Click to collapse
make -j12 with 3 core inside virtualbox? seems pointless 3-4 would be sufficient. also try schedtool and see if it's faster. (install schedtool, then use schedtool -B -e make -j4 otaimage)
gingerboy92 said:
make -j12 with 3 core inside virtualbox? seems pointless 3-4 would be sufficient. also try schedtool and see if it's faster. (install schedtool, then use schedtool -B -e make -j4 otaimage)
Click to expand...
Click to collapse
You didn't read well, I made dualboot with windows. I don't know how is it possible to run -j12 and no lag. (I was also able to surf the web). can be installed with apt-get? does otaimage produce .img file?
faabak said:
Hi!
Perhaps this thread actually can be some kind of a tutorial on how to build CM11 for P880, if you succeded?
I have followed this thread:
http://forum.xda-developers.com/showthread.php?t=2515305
Except i did some mistakes, so i simply did a fresh Ubuntu reinstall on a SSD-disk so it hopefully also will build faster..
I have some questions though:
- Don't we need to insert the code into the local_manifest.xml?
- Also, i see you don't compile it using "brunch p880" command.. Is there a reason for this?
Click to expand...
Click to collapse
just follow the instructions from the thread until creating the working directory, for initializing repo, use the one from laufersteppenwolf's thread (http://forum.xda-developers.com/showthread.php?t=2551006).
repo init -u https://github.com/P880-dev/android.git -b cm-11.0the next steps are the same.
repo sync
cd vendor/cm/
. get-prebuilts
and other steps. i'm lazy to retype everything if you are really willing to build android from source, you should be able to figure out what i'm saying
---------- Post added at 11:33 PM ---------- Previous post was at 11:23 PM ----------
LGaljo said:
You didn't read well, I made dualboot with windows. I don't know how is it possible to run -j12 and no lag. (I was also able to surf the web). can be installed with apt-get? does otaimage produce .img file?
Click to expand...
Click to collapse
there's no point of using numbers higher than the amount your cpu cores. -j5 or -j6 is fine for quad core cpu, any higher, it doesn't effect anything, just pointless. sudo apt-get install schedtool should work, but again, i have no idea how much difference it will make. otaimage will produce a zip file. you can also use make bacon. make bacon will produce a zip with the proper naming, and more, i guess, idk.
gingerboy92 said:
just follow the instructions from the thread until creating the working directory, for initializing repo, use the one from laufersteppenwolf's thread (http://forum.xda-developers.com/showthread.php?t=2551006).
repo init -u https://github.com/P880-dev/android.git -b cm-11.0the next steps are the same.
repo sync
cd vendor/cm/
. get-prebuilts
and other steps. i'm lazy to retype everything if you are really willing to build android from source, you should be able to figure out what i'm saying
---------- Post added at 11:33 PM ---------- Previous post was at 11:23 PM ----------
there's no point of using numbers higher than the amount your cpu cores. -j5 or -j6 is fine for quad core cpu, any higher, it doesn't effect anything, just pointless. sudo apt-get install schedtool should work, but again, i have no idea how much difference it will make. otaimage will produce a zip file. you can also use make bacon. make bacon will produce a zip with the proper naming, and more, i guess, idk.
Click to expand...
Click to collapse
I'm actually doing the sync now, with the https://github.com/P880-dev/android.git so i'm guessing i'm onto the right path!
Thanks!!
faabak said:
I'm actually doing the sync now, with the https://github.com/P880-dev/android.git so i'm guessing i'm onto the right path!
Thanks!!
Click to expand...
Click to collapse
you are welcome.
hope it will compile.
and boots
don't worry if it bootloops, we all had it at least once.
gingerboy92 said:
you are welcome.
hope it will compile.
and boots
don't worry if it bootloops, we all had it at least once.
Click to expand...
Click to collapse
It compiled!
But.. Of course it bootloops, as i expected! Maybe i should just try to compile it again? What did you do?
faabak said:
It compiled!
But.. Of course it bootloops, as i expected! Maybe i should just try to compile it again? What did you do?
Click to expand...
Click to collapse
it have been a while since i compiled from 4.4 source. i think i read from cm11 development thread someone mentioned that the some patches causes bootloop. perhaps your problem is the same as his. take a look at the thread
gingerboy92 said:
it have been a while since i compiled from 4.4 source. i think i read from cm11 development thread someone mentioned that the some patches causes bootloop. perhaps your problem is the same as his. take a look at the thread
Click to expand...
Click to collapse
Yeah, i also noticed! But it does'nt seems like everyone has that problem.. I run "brunch" again now, it only used like 15 minutes or so.. Will try to install it!
How to Android Development
Part 1 Setting Things Up Hi All,
I Fetched this Guide from @Anik_khan original post on XDA on ROM Building ,Kernel Compilation and All
So I Made this Post to Make you Learn How to
Build ROM ,Kernels more Simpler and Noob Friendly Way
First of All This Guide is Mostly Targeted to Android One (sprout) Devices Can Be Used for Any Other Device with some Edits :silly:
1)Requirements
i)A Ubuntu 14.04 or greater Distro 64 Bit Installed on PC or you can also use a Virtual Machine
*If you don't know what is Ubuntu Linux or Anything Else LOL Mate Step Back Do your Homework and Come Back Again*
ii)2GB or More RAM Minimum
iii)100GB+ HDD Space Available (1GB or More if you just want to Build Kernels)
iv) A Stable and Good Speed Broadband Connection with Unlimited Data (coz you are going to Download ‘n’ GB files)
v)Patience :v:angel:
2)Setting Up Build Environment
@akhilnarang had Created a Script to Setup the Environment Automatically
So Just Type this Command on Terminal I edited those Scripts with Manual Changes
Code:
sudo apt-get install git-core
git clone git://github.com/akhilnarang/scripts
cd scripts
. build-environment-setup.sh
This Step will Install all the Required Packages
Congrats
YOUR BUILD ENVIRONMENT IS NOW SETUP
Now Move forward to Part 2 (Making your First Kernel )
*in editing*
@chiranjit_1998 update your repo, script is old, I've updated mine
Yup ,I'll Do that Thanks
Part 2 to banade bhai
Sent from my HM 1SW using Tapatalk