[GUIDE][Ubuntu] Compiling Android from Source

So I've got a rom booted and running. I changed the permissions for the sdk directory and the working directory so that I could build as a non-privileged user, and then I made recovery and su modifications without unzipping my ota, and I've got a working rom.

Now, my problem seems to be finding a Gapps package that will let me sign into the play store without server error.
 
So I've got a rom booted and running. I changed the permissions for the sdk directory and the working directory so that I could build as a non-privileged user, and then I made recovery and su modifications without unzipping my ota, and I've got a working rom.

Now, my problem seems to be finding a Gapps package that will let me sign into the play store without server error.

nevermind, my previous link doesn't have JB gapps with google now.

How about these? http://api.viglink.com/api/click?format=go&drKey=1359&loc=http%3A%2F%2Fforum.xda-developers.com%2Fshowthread.php%3Ft%3D1772786&v=1&libid=1342405035728&out=http%3A%2F%2Fd-h.st%2FMGK&ref=http%3A%2F%2Fforum.xda-developers.com%2Fforumdisplay.php%3Ff%3D1455&title=%5BROM%5D%5BJB%2FAOSP%5DTwisted%20AOSP%20v4.0.0%3A%20Laying%20the%20Groundwork%20-%20xda-developers&txt=Gapps&jsonp=vglnk_jsonp_13424050661112
 
You think I should try an ICS Gapps package?

No. I'd recommend Jelly Belly and its 7/14 package. Or Kejars 7/13 package. Both claim to work.

Sent from my Galaxy Nexus using Android Central Forums
 
Ok, Nexus Bean Gapps, and Jelly Belly Gapps, didn't work. Downloading Kejars now.

Should I be able to just flash over the rom, or do I need to manually mod the rom before flashing?
 
Ok, Nexus Bean Gapps, and Jelly Belly Gapps, didn't work. Downloading Kejars now.

Should I be able to just flash over the rom, or do I need to manually mod the rom before flashing?

Keep in mind that auto restore is probably the last big "bug" remaining for JB roms. It has worked intermittently at best, so I wouldn't be too dissuaded if it never works. Just go to "My Apps" and start going down the line ;).

What do you mean manually mod the rom? Just flash them like you would normally.

I'd wipe data/cache/dalvik/system, then flash your rom then the GAPPs package.
 
Can't get any of the Gapps packages to work. Home button just flat out does nothing, doesn't even return home, stock browser won't open, and when I launch play store it won't connect. The only thing that works is gmail.

Everything works fine if I install without Gapps.
 
Can't get any of the Gapps packages to work. Home button just flat out does nothing, doesn't even return home, stock browser won't open, and when I launch play store it won't connect. The only thing that works is gmail.

Everything works fine if I install without Gapps.

Are those results the same across GAPPs packages? If so, you could have a faulty build, unfortunately :(. It happens.
 
Well now I am getting errors trying to build. I have selected toro, and I type "make -j2 otapackage", and I see the platform_version, etc., but under "checking build tools versions..." I get this error:

find: 'src': no such file or directory

I thought I had followed the directions and was successful at each one - anyone know what I'm doing wrong?

I'm having the same issue. After the error message, it continues like it's building, but only runs for a couple minutes and doesn't seem to actually produce anything. (i.e. no .zip or .img files using variations of "make -j#" and "make -j# otapackage")

Everything else seems to have run smoothly, and I can't find any issues with anything I downloaded for the build environment. Anyone have any ideas?

PS: This guide is phenomenal, I don't post much on here but I've been around for a little while and this is by far the most comprehensive tutorial I've ever seen. Kudos, D!
 
  • Like
Reactions: dmmarck
I'm having the same issue. After the error message, it continues like it's building, but only runs for a couple minutes and doesn't seem to actually produce anything. (i.e. no .zip or .img files using variations of "make -j#" and "make -j# otapackage")

Everything else seems to have run smoothly, and I can't find any issues with anything I downloaded for the build environment. Anyone have any ideas?

PS: This guide is phenomenal, I don't post much on here but I've been around for a little while and this is by far the most comprehensive tutorial I've ever seen. Kudos, D!

Does it look something like this?

find: `src': No such file or directory build/core/Makefile:38: warning: overrid - Pastebin.com

And thank you! It appears this error is common and I'm trying to figure out what in the heck is going on with y'alls builds. :)

EDIT:

Some more links for you folks to see:

http://forum.xda-developers.com/showpost.php?p=28559635&postcount=26
http://forum.xda-developers.com/showpost.php?p=28550948&postcount=9

I'll keep no searching. I suggest whenever you run into anything to copy and paste it, wrap it in quotes, and hit Google hard.

You could also try changing stuff...like make -j1 otapackage instead of make -j4 otapackage, etc. See if any of that helps. Or run through the build environment stuff/double check you're in the source folder.
 
Last edited:
Does it look something like this?

find: `src': No such file or directory build/core/Makefile:38: warning: overrid - Pastebin.com

And thank you! It appears this error is common and I'm trying to figure out what in the heck is going on with y'alls builds. :)

Just ran it again with "make -j2 otapackage" to see exactly what it's producing and got way more output than I expected... This latest attempt starts with the same "find: `src': No such file or directory" error, but then launches into a bunch of system files being ignored, and then a ton of lines starting variously with "target Generated: *filename*", "Import includes file: *filename*", "Export includes file: *filename*", and "Notice file: *path*/NOTICE -- *filename*.txt". It finished with:

Code:
make: *** [out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/javalib.jar] Error 41
make: *** Waiting for unfinished jobs....

... and that brought me back to a blank $ prompt. :confused:
 
I was asking about configuring the kernel build. When you build a regular kernel you can choose to build it for a specific target CPU rather than a generic x86, pick different speed governors, things like that. I've noticed that different kernels that I've loaded have different speed governors available so clearly people have been doing that also the OTA build is aimed at ARMv7, the GN has a Cortex A9, is v7 the ARM equivalent of i386 or does the A9 have v7 cores in it?. I also notice that some kernels are advertised as performance and some as lean kernels but they never have any release notes saying what they actually did to differentiate their kernels. I doubt that they've patched the kernels, I would assume that they just selected different options.
 
Last edited:
I sync'd the 4.1.1_r1 branch, entered "full_toro-userdebug" at the lunch menu since it wasn't listed, ran make otapackage, and the result is named full_toro-ota-eng.lordbah.zip. I wasn't expecting to see "eng" there but "userdebug".
 
Negative. Just tried it and then ran "make -j2 otapackage" again and I'm still getting the same results, first the `src' error and then loads of "target Generated" and whatnot.

Stumbled across this after a Google search of the make error: xda-developers - View Single Post - [Tutorial] Compile JB on Ubuntu

Applied this patch: https://github.com/CyanogenMod/andr...mmit/c8b97210aa31c9b80b5fd136d8617ebe4e731e09

And it compiled perfectly! Just downloaded Jelly Belly's 7-14 GApps, gonna get to flashing and see if it worked.

Again, huge thanks to dmmarck for this killer writeup, and Andrew Ruffolo for the make clobber pointer, lol. :)
 
  • Like
Reactions: dmmarck
Disclaimer, this is my first build and this guide gives me warm fuzzies inside. I had to do some different things to get Java installed, but that was solved with 5 minutes of googling around for a solution. Anyway, I compiled my build last night on Ubuntu 10.04 running in VirtualBox. I've got my zip, but some of the last lines of are:

No bootloader.img in target_files; skipping install
No radio.img in target_files; skipping install
No radio.img in target_files; skipping install
:-\:'(:(

Any idea what I did wrong? Thanks for the help (and the guide)! :D
 
Stumbled across this after a Google search of the make error: xda-developers - View Single Post - [Tutorial] Compile JB on Ubuntu

Applied this patch: https://github.com/CyanogenMod/andr...mmit/c8b97210aa31c9b80b5fd136d8617ebe4e731e09

And it compiled perfectly! Just downloaded Jelly Belly's 7-14 GApps, gonna get to flashing and see if it worked.

Again, huge thanks to dmmarck for this killer writeup, and Andrew Ruffolo for the make clobber pointer, lol. :)

How did you apply the patch? I opened the file, made a backup, and just copy and pasted the contents then saved it. Same thing, no src and etc... :( Any thoughts?

D, hell of a write up man, I've been trying to understand googles environment setup for months now, & gave up. When I saw your writeup on android central, I promptly quit whatever it was I was doing and fired my machine up and went to work. I just wish I had the drive and know how to do this on my own, but maybe your push in the right direction is what I needed?

Thanks again, I love this community. :D
 
  • Like
Reactions: dmmarck
Wait, I'm stupid aren't I? That stuff isn't included in a ROM. DOH!!!

Disregard my thread clutter!
 

Trending Posts

Members online

Forum statistics

Threads
955,377
Messages
6,964,635
Members
3,163,270
Latest member
OptimalMaximus