[GUIDE][Ubuntu] Compiling Android from Source

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
[INFO]Table of Contents
  1. Creating the "Build Environment"
  2. Syncing with the Source
  3. Creating your "Rom"
  4. Troubleshooting/Fixes
[/INFO]

Android is known for its ability to be customized by the end user. The typical way to do this is to flash a rom, which is essentially an "image" of the operating system plus other goodies that can give you entirely new look and a host of neat features to play with. But rom developers usually start at one point--"source."

Source is essentially the raw code of Android. Let's put it this way--if you want to make an omelete, you're going to have get some eggs, cheese, spices, etc. Those ingredients are source. You put those ingredients together and you get an omelet, or at least get you something close enough. Here's how we get to that point.

[WARN]This guide is primarily for users of Ubuntu, particularly 64 bit. I will frequently use and mention several other guides that can help you if you are on other operating systems, particularly Mac OSX (check out the AOSP one first). If you are unfamiliar with Ubuntu/Linux, I advise you to read up a bit and become at least "moderately" familiar with how it works, particularly terminal and sudo/"root" permission commands.

Further, make sure you have enough space and adequate hardware to do this. I've seen recommendations of having at least a dualcore machine, with 2+ gb of RAM and at least 25-30 gigs of harddrive space free. Builds take up quite a lot of space, so you want to play it safe![/WARN]

The first step in compiling Android is to create what's called a "build environment." Essentially, you're installing a bunch of software that will enable you to both sync up ("download") the source and to actually put together either flashable images or a flashable zip.

#1 Install the Android SDK

It is always best to have the Android SDK installed on your machine. Go here to download the SDK package, extract it, and put it in your "home" directory. Be sure to follow the instructions and ensure everything is working properly. It's also good to triple-check that fastboot and ADB are both functional and usable.

[TIP]A great guide to installing the SDK and other neat Android goodies can be found here. I personally used it and it was awesome.[/TIP].

#2 Install the Java Development Kit (JDK/Java 6)

Now let's get to to installing more important stuff. The first thing on the list is the JDK (Java 6), since that's the JDK required for compiling Gingerbread and all of the Android versions after. Obviously most of you will want to compile Jelly Bean, so this is crucial.

The recommended way to do this is to open up the terminal and type in these commands. Note, you can copy and paste the command (copy from "sudo" until the end) and make sure hit enter after each command!

$ sudo add-apt-repository "deb Index of / lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

If for some reasons that does not work, there are some alternatives, notably this:

$ sudo apt-get install openjdk-6-jdk

If that does not work, and it may not due to licensing and support issues, either (1) Google search the issue by copying/pasting the command line error into Google (wrap it in quotes!), or (2) try to search for other alternatives repositories to add. We have several options in the fourth post (troubleshooting/fixes) as well as a few that have been mentioned throughout this guide. This is a bit of a wonky step, so don't let it get you down! Not your fault, just blame Google/Sun :).

#3 Install Python

Once the JDK is installed, you need to install Python. In some versions of Ubuntu (and I believe 12.04 is one of those versions, Python is already installed. Still, it doesn't hurt to double check!

Simply enter this command:

$ sudo apt-get install python

#4 Install Git

Git is one of the coolest, yet most confusing things, about Android/Linux. Think of it this way--it's a place where all of the revisions to the code go to be approved and get incorporated so that you have a solid piece of working software.

For git, enter this:

$ sudo apt-get install git-core

#5 Install the Required Packages

Once the JDK, python, and git are installed, you're ready to start installing some more "specific" packages required to compile Android.

If you're running Ubuntu (remember, 64 bit), and your version of Ubuntu is between 10.04 and 11.10, simply input this entire thing and hit enter:

$ sudo apt-get install 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

If you're on Ubuntu 10.10, also input this:

$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so

If you're on Ubuntu 11.10, you want to input this:

$ sudo apt-get install libx11-dev:i386

You may also need this if you're on 11.10, so I'd recommend installing it anyway (and this may be duplicative, but don't worry, Ubuntu's smarter than she may sometime act!)

$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so

If you're like me and you're on Ubuntu 12.04 (again, 64 bit!), there are two warnings that Google/Android gives us: (1) building on 12.04 is experimental, and (2) it's not guaranteed to work for any branch of the repository other than the master branch.

That being said, here are your packages:

$ sudo apt-get install 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

And don't forget this...

$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

#6 Configure USB Access

This step is important because it will enable to access pretty much any Android device by using your USB port (and your USB cable). First, let's bring up the file you'll need to "edit":

$ gksudo gedit /etc/udev/rules.d/51-android.rules

This will open up a text file. In that file, simply copy and paste this big ole list right into it, save it, and then close the file.

#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"

#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"

#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"

#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"

#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"

#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"

#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"

#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"

#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"

#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"

#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"

#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"

#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"

#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"

#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"

#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"

#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"

#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"

#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"

#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"

#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"

#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"

#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"

#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"

#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"

#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"

#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"

#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"

Remember, be sure to save it and close it. Once closed, enter this command:

$ sudo chmod a+r /etc/udev/rules.d/51-android.rules

Now your build environment is complete and you're ready to download the repo/source and get crackin'. If you have any issues, I suggest checking out my sources as well as simply asking me/our community or Googling the issue. The best way to search for an error (that I have found) is to simply copy and paste the "error" from your terminal into Google and seeing what comes out. Adding in extra terms like "Android" "source" "compile" and "build" may also help.

[NOTE]I'd like to give credit where it's due, and that's mainly these following five resources--Android Open Source Project, XDA Developer dastin1015, NPRussell, futurecrue, and droseum20. Thanks to all of these great guides and devs![/NOTE]
 
Last edited:

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
Re: [GUIDE] Compiling Android from Source for the Galaxy Nexus

The next "big" step once your build environment is "created" (installed) is to download the Android source code. This isn't necessarily difficult, it's just time consuming, sometimes taking 3 hours for everything to download. I recommend doing this when you know you have enough time to "babysit" it, because errors may creep up and you'll want to address those ASAP.

#1 Making the Repo

First, we want to make sure that you have a path for the repo to install to. Input these commands in terminal, just like you did with the prior steps.

$ mkdir ~/bin
$ PATH=~/bin:$PATH

Now, once that's finished, you download the repo script and ensure that it works (i.e. it's executable). Use these commands:


[NOTE]Please make sure you copy and paste the whole thing. Ignore the fact that the link is live on here, treat it as if it's simply plain old text.[/NOTE]

#2 Create your "Working Directory"

Once the above is finished, you'll want to create the directory that everything is going to download to and where your "rom" will eventually pop out after it is built.

First, enter this command.

$ mkdir WORKING_DIRECTORY

[TIP]Note that you can make your "WORKING_DIRECTORY" whatever name you please. Some suggestions include "JB_SOURCE," "SOURCE_DIRECTORY," "ANDROID_AWESOME," etc. Simply substitute your chosen name for "WORKING_DIRECTORY" in the above command.[/TIP]

Then, you'll want to "change directory" to that directory you just created. Remember, if your directory is something other than "WORKING_DIRECTORY," use that name!

Simply input this command to change directory (go to that directory):

$ cd WORKING_DIRECTORY

#3 Downloading the Source - The Long Haul

[NOTE]This step may take forever or it may take just an hour. Regardless, schedule your time appropriately![/NOTE]

Generally, you'll have two options--downloading the "master" branch of Android (it's basically everything), or downloading a specific branch. Now if you're on Ubuntu 12.04 like I am, remember that warning Google gave us--only the master directory is guaranteed!

To sync with/install the master source directory, input the following command:


If you wish to download a specific directory, say for this purpose Jelly Bean 4.1.1, use the following command:


Now, a prompt will come up asking for your real name and your address. Please use your real name and your real email address. If you ever take this hobby further and wish to submit code revisions to the AOSP, it would behoove you to stand by your name (so to speak:)).

[TIP]If you have already done a repo init and simply want Jelly Bean 4.1.1, try using these commands instead:

$ repo init -b android-4.1.1_r1
$ repo sync
[/TIP]

Now, it's time to actually sync up with the source and grab a snack, a meal, or The Lord of the Rings Extended Blu-Ray Trilogy. Input the following command:

$ repo sync

Sit back and relax and wait. If a fetch error comes up, I have found that the best way to get around it is to simply enter:

$ repo sync -f

I will be troubleshooting other errors a bit later on.

#4 Verifying Git


Another good thing to do is verify the git tags. This is fairly simple.

First, enter this command:

$ gpg --import

Then, without closing a window or terminal, copy and paste the following into the terminal window.

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq
/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5
jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv
aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k
cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX
gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI
2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+
OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s
KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----

Hit control + D after you pasted and all is done. If you want to verify individual tags, simply use this command:

$ git tag -v TAG_NAME

Once finished, you will have all of Android on your harddrive. For me, that totalled 15.1 gigs, so like I said, be sure you have space! (...and time) (...or a TARDIS?)

[NOTE]I'd like to give credit where it's due, and that's mainly these following five resources--Android Open Source Project, XDA Developer dastin1015, NPRussell, futurecrue, and droseum20. Thanks to all of these great guides and devs![/NOTE]
 
Last edited:

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
Re: [GUIDE] Compiling Android from Source for the Galaxy Nexus

Once you have that shiny, massive directory full of source code, it's time for you to do something with it--build Android. This is another "simple" process that requires a lot of time (an hour or two hours is not unreasonable).

#1 Download and Extract Proprietary Drivers

A neat thing about the recent Jelly Bean source drop is the inclusion (or reinclusion) of the Verizon GN into AOSP. Most of this is evidenced by the fact that proprietary binaries--binaries made without open source code but the "intellectual property" of another/a business--are now available. You will need these binaries to create a working and functional rom for your device.

Generally, you can find all of the binaries and drivers for any AOSP Nexus device on this page.

There are four binaries needed for the Verizon Galaxy Nexus in order to make a working Jelly Bean/JRO03C/4.1.1 build. The download links are available here:

WiFi/Bluetooth courtesy of Broadcom
Graphics courtesy of Imagination Technologies
Orientation Sensor courtesy of Invensense
CDMA/LTE courtesy of Samsung

If those links are broken, please reference that main Nexus drivers page for the updated links.

Now, download all of your required drivers and extract them to the "root" of your WORKING_DIRECTORY (or whatever directory name your imagination came up with). Simply unpack and drop it into that main folder.

Now, you will see that you have files that look something like this--"extract-imgtech-toro.sh" (or some variation thereof). You will need to further extract them from that WORKING_DIRECTORY, and we do this in the terminal.

First, make sure you're at your WORKING_DIRECTORY, so "change directory" or "cd" to there if you're not.

$ cd WORKING_DIRECTORY

Then, you have two options. First, you can run:

$ sh nameofthebinaryfileyouneedtoextract.sh

Or you can type in "sh" and then drop and "drop" the file into terminal. It'll do the same thing. Now, with either option, you will have to accept to terms. Each will take you to a fairly length contract. My suggestion? Read it (I have to say that). My other suggestion? Mash the enter/return key but be careful when you see "Miscellaneous" terms pop up. Then hit enter very carefully, waiting to see what comes next. Eventually you'll have a line that says something like "type I ACCEPT to agree to the terms." So, type:


Be sure to do that for each of your drivers, and now you're ready to proceed with the build.

#2 Initialize your Build Environment

Remember that build environment you installed in the first post? It's time to put it to work.

Enter this command:

$ source build/envsetup.sh

You may also use this command (it does the same thing):

$ . build/envsetup.sh

#3 Choose your Device!

In this step, you must tell your build environment where to go, what device to build for, and what type of build you want it to construct.

First, you want to get to the device "target" selection by entering a simple "lunch" command:


Then, you can either pick from the numerical menu or input your device manually. We're going to be using "tuna" names here. If you're on GSM, you want to use "maguro." If you're on Verizon, you want to use "toro."

The other big piece of this next command is which build type to choose. You have three options, however I prefer only one--userdebug.

The three options are:

  1. user - limited access; suited for production
  2. userdebug - like "user" but with root access and debuggability; preferred for debugging
  3. eng - development configuration with additional debugging tools

My suggestion? Pick userdebug, it's pretty much the standard. Now, let's say you want to build a full toro userdebug build. Here's what you enter:

$ full_toro-userdebug

If you want the same build but you have a GSM Nexus, enter this:

$ full_maguro-userdebug

#4 BUILD IT!

Once you have selected your device and build type you have two "make" options; in other words, two different builds can be constructed. You can make a bunch of images that you can flash via fastboot or you can make a flashable zip that can be used in ClockworkMod Recovery or TWRP Recovery. I suggest the latter, but I'll give you the option for both.

To make fastboot-able images, type in:

$ make -j#

See that # sign? You don't want to actually use "#," but rather, as a general rule of thumb, take your number of cores your process has (in my case, 4) and add 1 (in case you don't know threads and all that associated fantastic geeky hardware knowledge)--or 5 in my case.

Thus, I used the following command:

$ make -j5

Now, you might be able to get away with more, you might not. All this does is utilizes "parallelism" to compute things (i.e. build your rom) a bit faster. Some even use "-j1," professing its stability and low risk because everything is done with a single thread. The choice is yours, but realize that the higher the number, the faster the build.

To make a flashable zip, input the following:

$ make -j# otapackage

Now sit back, throw on Dances With Wolves, and wait for your images or your zip to pop out. Once finished, it will be located in the "out" folder within your WORKING_DIRECTORY. I suggest copying and pasting the completed build to another folder or directory so you don't accidentally screw something up when you're tinkering/hacking.

#5 Hack it and flash it!

The last step can be either the most fun or the most aggravating, depending on your interest level and skill-set. For me, it is the latter.

When your build pops out, in theory you can simply flash it and give it a test run. If it's a zip, you can do this like any other rom zip and flash it in recovery after making a nandroid/backup and doing a COMPLETE AND THOROUGH WIPE. If you chose the fastboot-able images route, you can simply cd/change directory to the images folder and then do the following:

First, connect your phone to your computer via a usb cable and put your device into "bootloader." You can do this manually by powering down then, once off, simultaneously holding down the VOLUME UP, VOLUME DOWN, and POWER buttons. Or you can be clever, turn on USB Debugging in developer options and enter the command:

$ adb reboot bootloader

(If for some reason you don't have permission to do that, make sure you have the ADB drivers setup--which you should--and put "sudo" before that command).

Then, once in "fastboot mode" (you'll see that in red), enter the following:

$ sudo fastboot flashall -w

The "-w" will do some wiping (data, I believe), so be sure to back your stuff up before you go this route.

HOWEVER, flashing it this soon precludes a lot of things and using Google services is one of them. If you want to sign in, use gmail, use your apps, etc., you'll need to find a separate package of Google Applications--GAPPs--to flash as well. For Verizon Nexus users, this has been particularly frustrating because not every GAPPs package has worked. I suggest using whatever GAPPs package has worked for you (on Jelly Bean) in the past, or navigating through our rooting/roms subforum and finding roms with confirmed, working GAPPs packages. You flash this package as you would normally--immediately after the rom.

From here, you can tinker with your rom, changing things like the build name, speed, adding different tweaks here and there, etc. Unfortunately, I have neither the talent or the knowledge to guide you onward. However, be rest assured, if you followed this guide (and the credited guides) you will have your very own, source-built rom, that you poured sweat, tears, and an exceptional amount of time and keystrokes into.

Congratulations :).

screenshot2012071018124.png

[NOTE]I'd like to give credit where it's due, and that's mainly these following five resources--Android Open Source Project, XDA Developer dastin1015, NPRussell, futurecrue, and droseum20. Thanks to all of these great guides and devs![/NOTE]
 
Last edited:

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
Re: [GUIDE] Compiling Android from Source for the Galaxy Nexus

I will be putting in common questions/problems once they arise. For now, please reference the credited guides for any immediate support, or simply post up in here for help :).

Fixes/Tricks

Java6/JDK Issues:

Java6 sometimes does not play nice, even with the AOSP-given commands to get it. Here are some resources that may help you out in resolving any Java issues, may it be installation or making sure OpenJava works.

[TIP]For installing the JDK ==>

For any read/version errors (thanks khalid!) ==>

A version error looks like this:

Your version is: java version "1.6.0_24".
The correct version is: Java SE 1.6.
[/TIP]

"Make"/find: 'src' Errors

To solve this, you can try updating your dependencies, or you can try this fix. You'll want to install this patch. Also see this post. Thanks ancorare and ewinkley!



Compiling CyanogenMod

Thanks to 2defmouze for the hat tip!
http://www.omgubuntu.co.uk/2012/05/gui-cyanogenmod-compiler-tool-for-ubuntu

[NOTE]I'd like to give credit where it's due, and that's mainly these following five resources--Android Open Source Project, XDA Developer dastin1015, NPRussell, futurecrue, and droseum20. Thanks to all of these great guides and devs![/NOTE]
 
Last edited:

wildman9904

Well-known member
Apr 26, 2011
106
14
0
Visit site
Wow. Simplistic. This is beautiful. I tried to read what I needed to do on AOSP site, and my eyes bled. This, once I get linux up, actually makes me think I might be able to do something. Thank you.
 
  • Like
Reactions: dmmarck

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
It's very simple, although if something goes awry it make took some improvisation. I essentially did it twice (aside from building the environment), so I got to run into a load of issues. I'll be adding some tricks to the troubleshooting section, as well as some other links to help out.

One thing I want to make clear though: this isn't necessarily complicated, it just takes time. But once you put in that time, there's nothing like seeing your name right there in the "About Phone." Trust me on that :).
 

auburngirl

Well-known member
Aug 23, 2010
181
7
0
Visit site
Thanks! I agree that other walkthroughs I have read just made my head hurt. This one seems like something I can handle. It will keep my inner geek satisfied for a bit. Next up? How to get started building apps. I know there was something about that a bit back.

For anyone looking to put Ubuntu on your Windows machine...

https://help.ubuntu.com/community/HowtoPartition

Sent from my ASUS Transformer Pad TF300T
 
Last edited:

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
Thanks! I agree that other walkthroughs I have read just made my head hurt. This one seems like something I can handle. It will keep my inner geek satisfied for a bit. Next up? How to get started building apps. I know there was something about that a bit back.

For anyone looking to put Ubuntu on your Windows machine...

https://help.ubuntu.com/community/HowtoPartition

Sent from my ASUS Transformer Pad TF300T

Thanks so much! Please let me know if you have any questions. It can be a bit tricky, but it's certainly doable :).
 

dually

Well-known member
Jan 16, 2011
57
4
0
Visit site
/WORKING_DIRECTORY: should that go in /~ or /home or what?
(in my case I have /home mounted to a spinning hdd with / mounted to 64 gb ssd)

Do we need to flash a jelly bean bootloader?

Will building this make a rom that will rewrite the recovery upon reboot like some factory images do?

Can someone point to the best method for rooting this after installation?
 

dmmarck

Retired Moderator
Dec 28, 2011
8,349
2,594
0
Visit site
/WORKING_DIRECTORY: should that go in /~ or /home or what?
(in my case I have /home mounted to a spinning hdd with / mounted to 64 gb ssd)

Do we need to flash a jelly bean bootloader?

Will building this make a rom that will rewrite the recovery upon reboot like some factory images do?

Can someone point to the best method for rooting this after installation?

Mine is in my home directory. You can really put in anywhere so long as you cd to it, although home directory is usually the standard place. I've seen and know of folks with different partitions and such for it, but that's a bit outside the scope of this guide.

No, you do not need to flash or use Jelly Bean bootloader but I do use it myself. It's recommended right now in most circles (please see the JB threads for more JB specific discussion), but I'd hesitate to use it if you plan on going back to ICS at any point.

Yes, it will replace recovery. Simply remove the recovery folder and two lines of code in the updater script that mention recovery, save, and it will not. Also, IIRC, there is also a file you need to remove or rename in /system to make a custom recovery stick. One of the credited guides mention the post compilation stuff with far more detail or expertise than I can, so I suggest browsing those as well. Alternatively, you may fastboot the custom recovery back.

Rooting is fairly straight forward - simply flash the appropriate superuser zip. If you want to make it stick and flashable by others, open up the superuser zip and take the app and place it into /system/app and take the binary and place it in /system/xbin. I prefer to rename the old su binary to "su old".

I will add a bit more explanation to the post rooting stuff after I go along and figure more out on my own. It's fun but tricky and it makes me appreciate the hard work that our devs do.

Also, thank God for SwiftKey.

Sent from my Galaxy Nexus using Xparent Cyan Tapatalk 2
 
  • Like
Reactions: zero neck

dually

Well-known member
Jan 16, 2011
57
4
0
Visit site
Note: had to change "$ source build/envsetup.sh" to "# source build/envsetup.sh" because of "permission denied"

Also, ended up having to install sun java 6 from "bin", "jre", and "jdk" .deb packages pulled from a website called "debian snapshots".
 
  • Like
Reactions: dmmarck

dually

Well-known member
Jan 16, 2011
57
4
0
Visit site
Ok, thanks!

Edit:
So I ended up with out/product/toro/full_toro-ota-eng.root.zip, 120mb. Is that the file I'm looking for?
 
Last edited:

Trending Posts

Forum statistics

Threads
942,379
Messages
6,913,759
Members
3,158,384
Latest member
FarajWala800