[GUIDE][Ubuntu] Compiling Android from Source

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
How do you edit within the zip?
I am running Kubuntu 12.04 and ARK will not let me edit anything in the zip, I have to extract to a folder first, make edits and re-zip, and then the installation aborts from cwm.

The stock archive manager within Ubuntu lets you do it. 7zip does as well, IIRC.

With those with that error, it looks more like to be an error with the source because it seems like a lot of stuff is missing. You could try the alternative method for Java, but I don't think that's a guaranteed slam dunk.

Did you folks sync with the branch or the master?
 

anon(93769)

Member
Nov 29, 2010
10
1
0
Visit site
Sure, which GAPPs did you use?

And congrats!

I used kejar's gapps from this page. The only piece not working so far is talk - but I recall having the same problem on another rom and simply copied/pasted into system/app, renaming the existing one, and replacing it with another.

My experience with the rom I baked installed on my phone:
- thought i had issues with bluetooth - where my headset could only connect in music mode, not phone mode, but after a few reboots and repairing it now connectes in both
- phone seemed very laggy until later in the day - after a few reboots
 

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
Yeah, Talk was a massive headache with myself. How's the camera functioning? Gallery and Talk FC'd on me like nuts the first night or so.
 

redstar427

Member
Sep 12, 2011
22
1
0
Visit site
The stock archive manager within Ubuntu lets you do it. 7zip does as well, IIRC.

With those with that error, it looks more like to be an error with the source because it seems like a lot of stuff is missing. You could try the alternative method for Java, but I don't think that's a guaranteed slam dunk.

Did you folks sync with the branch or the master?

I installed the gnome archive manager, file-roller, and it will let me edit in zip.
This solved my installation problems, and I got my first packaged rom to install.
However, there are some problems with it, like the camera won't run, and the google now voice search is broken.
Where do I find the proper JB gapps?
 

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
I installed the gnome archive manager, file-roller, and it will let me edit in zip.
This solved my installation problems, and I got my first packaged rom to install.
However, there are some problems with it, like the camera won't run, and the google now voice search is broken.
Where do I find the proper JB gapps?

Camera = common issue. Google Now voice = go to settings, download the offline voice pack.

Also, check out the Jelly Bean thread. A lot of this stuff (with fixes) is discussed b/c we were dealing with these issues when source was released and roms started being built.

For GAPPs, I recommend either Kejar's or Jelly Belly's. I presume you must tinker with stuff in order to get it right, so I suggest opening up their GAPPs and their roms to see what's what.

Oh and always give credit :).
 

redstar427

Member
Sep 12, 2011
22
1
0
Visit site
Camera = common issue. Google Now voice = go to settings, download the offline voice pack.

Also, check out the Jelly Bean thread. A lot of this stuff (with fixes) is discussed b/c we were dealing with these issues when source was released and roms started being built.

For GAPPs, I recommend either Kejar's or Jelly Belly's. I presume you must tinker with stuff in order to get it right, so I suggest opening up their GAPPs and their roms to see what's what.

Oh and always give credit :).

I looked at the JB gapps zip I installed from, and they have July 2012 dates. In the zip from Kejar, they have 2008 dates. Hard to believe these are JB gapps.

Thanks for your help, I will keep learning and trying.
Now to search for the JB threads...
 

duojet

New member
Feb 13, 2011
1
0
0
Visit site
I can't figure out what command exactly is telling the compiler we are building jelly bean and not ics or something else, if we used the repo command to sync with the master directory.
 

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
I can't figure out what command exactly is telling the compiler we are building jelly bean and not ics or something else, if we used the repo command to sync with the master directory.

It builds based upon your device--if 4.1.1 is the latest, and you're on that branch, that's what gets synced.
 

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
im running into the wrong java error issue. i found this fix

comment out the following lines in build/core/main.mk:

# ifneq ($(shell java -version 2>&1 | grep -i openjdk),)
# java_version :=
# endif


but im unsure how i would go about commiting the lines out. any help would be appreciated

There's a link in the fixes section that should more easily describe it (the version error fix). Also look back a page, I believe another person solved the issue as well.
 

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
Looks like an error in the source regarding the prebuilt stuff.

Sent from my Galaxy Nexus using Android Central Forums
 

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
does this mean i need to re sync the source

Try resyncing it, but without deleting first. Then when you do your make command, put clobber after to clean out old builds.

Then do it as normally. If that doesn't work, a clean sync may be worth while.

Sent from my Galaxy Nexus using Android Central Forums
 
  • Like
Reactions: droid343

dgolom

Member
Feb 17, 2010
10
0
0
Visit site
I have been reading about setting up ccache to speed up compiling but I am a total noob and am having difficulty figuring it out. Can anyone explain in simple terms how to set this up? TIA.
 
Last edited:

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
I have been reading about setting up ccache to speed up compiling but I am a total noob and am having difficulty figuring it out. Can anyone explain in simple terms how to set this up? TIA.

I have not done it because from what I've read, you want at least 50gigs for it. Hopefully someone else comes along with more information!

Sent from my Galaxy Nexus using Android Central Forums
 

Josh515

Well-known member
Jul 6, 2011
133
5
0
Visit site
I was finally able to get a functional ROM after a few days of working on this project (on and off of course)! I flashed it to my phone along with Kejar's Gapps and it was working fine, except for the camera and gallery (although the gallery did finally start working after a couple reboots, but still no camera). The big issue I have is that I lost root access. I still had the su.zip file on my SD card and even reflashed it to see if that would fix the problem, but it didn't work. I installed SuperSU and tried updating the SU binaries, but still nothing. Then I tried booting into CWM recovery, but the custom recovery was gone. In the end I had to reflash CWM through fastboot and restore a previous backup, so my phone does work fine now. Could I get some help with this root & recovery issue?

(This is a perfect example of why you should always make backups before changing anything!)
 

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
I was finally able to get a functional ROM after a few days of working on this project (on and off of course)! I flashed it to my phone along with Kejar's Gapps and it was working fine, except for the camera and gallery (although the gallery did finally start working after a couple reboots, but still no camera). The big issue I have is that I lost root access. I still had the su.zip file on my SD card and even reflashed it to see if that would fix the problem, but it didn't work. I installed SuperSU and tried updating the SU binaries, but still nothing. Then I tried booting into CWM recovery, but the custom recovery was gone. In the end I had to reflash CWM through fastboot and restore a previous backup, so my phone does work fine now. Could I get some help with this root & recovery issue?

(This is a perfect example of why you should always make backups before changing anything!)

Josh:

I gave some brief instructions on this a few pages back. Check them out and let me know how it works!

Sent from my Galaxy Nexus using Android Central Forums