# Build Android 4.2.1 from source



## puk3n (Jun 12, 2011)

i would like to build android 4.2.1 from source, i have read multiple tutorials. however i can not find a whole lot of support for 4.2.1. maybe I'm not searching in the right places? i would like to install ubuntu x64. i have a GIT account and eager as i could be to start this. any and all help will be appreciated.


----------



## headcheese (Aug 1, 2011)

yeah first step would be getting ubuntu 12.04 x64 up and running. i would recommend a dual boot. your source will be at least 10 gig. initially i installed ubuntu just to do builds, but now its become my main OS since its a lot faster than windows and has less stuff running in the background, it just feels cleaner. so make sure you create your self enough hard drive space.

after that check this thread out if you havent already: http://rootzwiki.com/topic/31166-tutorial-so-you-want-to-build-aokp-jb-ubuntu-1204/

this is for aokp, but would work for other roms too you just would need to run a different repo init command.


----------



## RMarkwald (Oct 19, 2011)

For the US Cellular SGS3 puk3n?

If you are building for the d2usc puk3n let me know, I build CM for my d2usc and N7 regularly.

I currently have Linux Mint 14 as my OS, and have used Ubuntu. I recommend Ubuntu 12.04.

- Sent from my US Cellular SGS3


----------



## puk3n (Jun 12, 2011)

RMarkwald said:


> For the US Cellular SGS3 puk3n?
> 
> If you are building for the d2usc puk3n let me know, I build CM for my d2usc and N7 regularly.
> 
> ...


 yes primarily for U.S.C.C sgsIII, since i have the device i can test my work, however if there is a better approach for development i am all ears.
i have an AMDx64 phenom II 965 quad, i am downloading this file (12.04.1 alternate AMD x64 .ISO) i want to dual boot however im in a raid 0 config. not sure if i can partition this drive. and save winblows 7 for gaming


----------



## RMarkwald (Oct 19, 2011)

Not sure there with the raid configuration exactly how that'd work/install, as I've never had to do that before. The other thing is if the hard drive is partitioned all for Windows, you'd have to use some utility/third party utility to shrink the partition to something smaller for free space, so you could then install Ubuntu along side.


----------



## puk3n (Jun 12, 2011)

RMarkwald said:


> Not sure there with the raid configuration exactly how that'd work/install, as I've never had to do that before. The other thing is if the hard drive is partitioned all for Windows, you'd have to use some utility/third party utility to shrink the partition to something smaller for free space, so you could then install Ubuntu along side.


excellent! i've backed up the important stuff just the same. going to give a shot this evening, thanks so much for the support thus far


----------



## puk3n (Jun 12, 2011)

i was just thinking, i may have posted this in the wrong forum section. i appologise for that. i was too excited and did not use the search button . this post can be moved or whatever if need be, i will take no offence to that.
progress is slow and steady for me, i am using virtual box (commitments are difficult sometimes) however i and currently syncing the repo. its going to take awhile seeing the source is @ 10GB . i did subscribe to [TUT] and i am finding some good stuff there, i can hardly wait to built that $hit


----------



## puk3n (Jun 12, 2011)

update: i dont know if this is right or not, ive been reading for two days straight with no sleep! but something is happening here. i am prepared for reality check any moment heh. why? because this is the only post that i have asked for any help. can anyone tell if this might work? thanks in advance


----------



## RMarkwald (Oct 19, 2011)

Yeah its still building according to your screen shot.

- Sent from my US Cellular SGS3


----------



## puk3n (Jun 12, 2011)

yeah it got done, took awhile only to give me an error 1. about the kernel not being there


----------



## sixohtew (Jun 14, 2011)

puk3n said:


> yeah it got done, took awhile only to give me an error 1. about the kernel not being there


I had the same issues while trying to compile stock aosp for d2vzw. I've tried to force it to build the kernel and I've tried just putting the kernel and ramdisk.img in the out folder but when the build compiles it boots but no display or sound so it looks like its off. Still haven't figured it out but if you do or if anyone else knows what to do that'd be great

Sent from my SCH-I535 using RootzWiki


----------



## puk3n (Jun 12, 2011)

Will share as I discover it myself. Read somewhere that cm no longer supports inline kernel building. But Idk. I might just try building CM until I have some more skills
.
Sent from my SCH-R530U using Xparent Blue Tapatalk 2


----------



## RMarkwald (Oct 19, 2011)

Guys, do you have a local_manifest.xml in your working folder? (Ex. I have mine at: /home/ryan/cm)

If so, copy/paste this (or create a new text file and name it: local_manifest.xml) into the local_manifest.xml file located at: /home/<your name or whatever>/<name of your ROM repo directory>. Hit Ctrl H to display hidden folders. Open the .repo folder, and the local_manifest.xml should be in there, and if you do, open it in a text editor. You should see the following (NOTE: This is for the d2usc, and building CM from source!):


```
<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<manifest><br />
  <project name="CyanogenMod/android_device_samsung_d2usc" path="device/samsung/d2usc" remote="github" /><br />
  <project name="CyanogenMod/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" /><br />
  <project name="CyanogenMod/android_device_samsung_msm8960-common" path="device/samsung/msm8960-common" remote="github" /><br />
  <project name="CyanogenMod/android_device_samsung_d2-common" path="device/samsung/d2-common" remote="github" /><br />
  <project name="CyanogenMod/android_kernel_samsung_d2" path="kernel/samsung/d2" remote="github" /><br />
  <project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-10.1" /><br />
</manifest>
```
I've been building CM10.1 from source (actually building now...) for my d2usc and Nexus 7 without issue.



sixohtew said:


> I had the same issues while trying to compile stock aosp for d2vzw. I've tried to force it to build the kernel and I've tried just putting the kernel and ramdisk.img in the out folder but when the build compiles it boots but no display or sound so it looks like its off. Still haven't figured it out but if you do or if anyone else knows what to do that'd be great
> 
> Sent from my SCH-I535 using RootzWiki


See my above post, as I had this issue as well. You may need to pull the last line, project name=TheMuppets (add to your local_manifest.xml). I also had no radio, none, not even roaming, until I pulled TheMuppets CM10.1 git hub files. Then things worked like a charm. This was for my d2usc variant.


----------



## sixohtew (Jun 14, 2011)

RMarkwald said:


> Guys, do you have a local_manifest.xml in your working folder? (Ex. I have mine at: /home/ryan/cm)If so, copy/paste this (or create a new text file and name it: local_manifest.xml) into the local_manifest.xml file located at: /home//. Hit Ctrl H to display hidden folders. Open the .repo folder, and the local_manifest.xml should be in there, and if you do, open it in a text editor. You should see the following (NOTE: This is for the d2usc, and building CM from source!):
> 
> ```
> 
> ...


Ahhhh that makes sense. I git cloned instead of added that to my manifest. Didn't think about that will try when I get a chanceSent from my SCH-I535 using RootzWiki


----------



## puk3n (Jun 12, 2011)

RMarkwald said:


> Guys, do you have a local_manifest.xml in your working folder? (Ex. I have mine at: /home/ryan/cm)
> 
> If so, copy/paste this (or create a new text file and name it: local_manifest.xml) into the local_manifest.xml file located at: /home/<your name or whatever>/<name of your ROM repo directory>. Hit Ctrl H to display hidden folders. Open the .repo folder, and the local_manifest.xml should be in there, and if you do, open it in a text editor. You should see the following (NOTE: This is for the d2usc, and building CM from source!):
> 
> ...


thanks for the info on that, i am following these instructions, question: these are proprietary manifest files? and this manifest will allow me to build AOKP? i am pretty sure this is the case, however i just wanted to ask...thanks


----------



## RMarkwald (Oct 19, 2011)

puk3n said:


> thanks for the info on that, i am following these instructions, question: these are proprietary manifest files? and this manifest will allow me to build AOKP? i am pretty sure this is the case, however i just wanted to ask...thanks


I don't know if you need the CyanogenMod files, but you'll for sure want the bottom line, TheMuppets for sure.


----------



## puk3n (Jun 12, 2011)

RMarkwald said:


> I don't know if you need the CyanogenMod files, but you'll for sure want the bottom line, TheMuppets for sure.


ah! i am following your guide on TUSC. i decided to use the whole manifest you posted and i am trying CM-10.1 to get more acquainted with process  thanks again...
happy to reply CM build is working great!


----------

