[Android] Bizack:
Tutorial on How to build an Oracle VM Box with Linux Mint 14.1

Credit goes to Warped420 for putting together this Tutorial. (The OP)

All of the thanks from all of those who have helped him put this together...

I would like to thank Oracle for Having this awesome Virtual Machine Appliance for us to use as Non commercial end users.

I would also like to thank those At Linux Mint for putting together this awesome OS to use in our effort.

Last but not least I would like to give thanks to the folks at Emre MUMCU for the help on the initial configuration of Mint 14.1 on the Oracle VM Box Appliance.

I would like to thank the People at ChameleonOS for getting my build up and running. It is personal build that I am not supporting in this or any other forum.

** Disclaimer** I am not responsible for your computer burning up, HD drive crashes, Ram Flaming out, or you Bricking your phone cause you built a ROM that was bad and you Bricked it.**

** If I left anyone out please do give me a PM and I will add you to the credits.

Again this is a first draft, so If you have any questions please add a post (NOT A REPLY) and I will get back to you and we can make modifications where needed. please Be specific and add as much of the issue that you can.

-- Build notes for Mint 14.1 (64 bit) build box on Oracle VM Box

This is a brief tutorial setting up an Oracle VM Box w/ Linux Mint 14.1 to build android.

Here is what I did to setup a VM build box to implement it.

Please, this is not a place to start a debate on the “Best practices”; this is only what I did in order to achieve a compiled ROM that I flashed to my Galaxy Note 2 (I-605) ChameleonOS 0.8 Unofficial Build.

You don't need to know how to install a Linux operating system, but you will need to know how to follow directions and READ.

Please know what an .iso file is, how to create directories, copy files and it is helpful to know how to manipulate your network configuration in order to share it, troubleshoot it or anything else that may come up. This is a windows PC so you might have an issue with your configurations.

.

If you don't know the basics described above, stay and learn or move along.

[**] I don’t do networking troubleshooting over a thread, if you can't get it working with the information here than, I will do my best to help. NO PROMISES OR GUARANTEES!

[***] If you have a MAC, (Insert long rant about Mac’s here) Needless to say I can’t help you on your MAC…

You need to find the correct installation files for the PC / OS that you are running below.

1.	Oracle VM Box installation: Link to Oracle http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html

2.	Oracle VM VirtualBox Extension Pack

a.	Scroll down to the bottom of the page and grab the correct version (the same) as the installation files for the VM Box.​

3.	Linux Mint Cinnamon (64 bit) iso: http://www.linuxmint.com/edition.php?id=118

Host System Information: Read the Oracle website for the minimum spec for setting up a build box. Most out there are pretty powerful these days, so if you are running something x64 with at least 8 GB of RAM then you “should” be good to go.

This is what I used for my host system:​

My build: (system info)

OS Name Microsoft Windows 7 Ultimate

Version	6.1.7601 Service Pack 1 Build 7601

System Type	x64-based PC

Processor	Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz, 2301 Mhz, 4 Core(s), 8 Logical Processor(s)

Installed Physical Memory (RAM)	16.0 GB

At least 200 gb of drive space. I have mine sitting on 500gb USB3 drive. USB2 will work just fine. Build times will increase a lot after the initial build of any ROM. (unless you drop your repo & builds, CCcatch, etc…) Make sure all you put the Mint.iso on a different HD, you do not want to be reading and writing on the same drive when installing Linux. I have My images on the D Drive and the VM’s on the N drive. ( I have a lot of drives…)

Now install Oracle VM Box and then the extension pack. When all of that is finished you are ¼ of the way there.

Use Google if you have questions or if something is not working correctly. I will walk you through the basic settings.

Run your Oracle VM Box Manager:

File > Preferences > General > Default Machine Folder > Mine is N:\Oracle_VM (set up yours to a different Drive, not a different partition of the same drive.) If you don’t know what I am talking about then GooGle IT.

** WARNING** Do not choose your C drive. Or you will hate life at build time. And you could cause a **BSOD**

Everything else go through and use your common since your preferences. If you have specific questions that I can answer ask, only after you have Google’d it. Oracle VM Box comes with instructions. Use them, I did.

4.	Time to setup Mint VMBOX. (Keep in mind we are going to create a Master a copy it for later use. Always good to have a back up.)

Linux Mint is not a predefined selection for the Linux options so you will have to follow these here to get you box initially set up.

a.	Name: (Your Name Here) Make sure it is unique on your network or you will have issues with getting internet setup correctly.

b.	Type: Linux

c.	Version: Linux 2.6 (64bit)​

5.	Memory: at least 2gb preferred 4gb or if you got it 6gb... Use what you have and don’t sweat it…

6.	Hard Drive: Create a virtual drive now (option 2) Click Create

a.	Now I choose VDI native virtual Box. You can use (VMDK VM Ware, VHD Microsoft Virtual Server) Do some research if you want to use a different option. One might be better some might not. Use your noodle.

b.	Storage on physical hard drive​

i.	Dynamically Allocated (my choice) a little slower, but it does not take the space till it needs it so if you choose a 150gb disc you not waiting for an hour for it to create the disk space.​

c.	File location and size​

i.	Name it or leave what is in the box. (easier to remember where it goes and what it is) Leave it in the same folder that you created your VM.

ii.	Size 150 GB at least. You don’t want to run out of space when you are building. It sucks ass, I have done it. Plus you can build more than one ROM and be cool. If you have more space, GO FOR IT!!!​

d.	Click Create or OK I forget. Right Click on that new VM in the Manager and select Settings. **(These can only modify these when the VM is OFF)​

i.	General > Advanced >​

1.	Shared Clipboard & Drag ‘n Drop: Bidirectional​

2.	Checks in the other boxes​

ii.	System​

1.	Motherboard​

a.	Base Memory (should be what you set it as. You can change it here if you need modify it later.

b.	Leave everything else alone. (If you get a red message above the OK button address it)​

7.	Processor(s)

a.	I set mine to 4. ( I generally set mine to half of what I have on the host system if I am only going to be running one at a time)

b.	Leave Execution Cap and

c.	Extended Features: Check in Enable PAE/NX​

ii.	Display set it to what you want. I went for 128, just because I have it to spare. If you want multiple monitors Just do 2 no more.

iii.	Storage you should see your HD under Controller SATA​

1.	Controller IDE: Select the CD Empty​

a.	Attributes Click on the CD icon on the right of the IDE Secondary Master.​

i.	Choose a virtual CD/DVD disk file… and select the Mint.iso you downloaded ( you will see it under the IDE Controller)​

iv.	Network​

1.	Attached To: Select (NAT)​

a.	Name: (Whatever you use to connect to the internet with)

b.	Advanced: Make Sure (Cable connected) is checked​

8.	Installation Mint14.1 Cinnamon x64

a.	Now Click Start or hit Start in the Manager.

b.	Mint comes with snappy ui that you will use to do the installation.

c.	You should see the Install Linux Mint DVD/CD icon on the desktop. Click it…

d.	Follow the directions for your local/Region/Country etc…

e.	Preparing to install Linux Mint (Verify that you have all of the check marks.) Click Continue…​

i.	If you do not have network connection go back and figure it out.

ii.	If you have a firewall make sure that you set it up to allow connections. (See your user manual for Firewall...)​

f.	Click Erase disk and install Linux Mint. (Unless you know what you are doing)​

i.	Click Install Now!!!

ii.	Select you Region and Input your Name/Computer Name/Pick A user Name & Password (I use something simple as this is a build box and nothing of High security)

iii.	Click Continue and let it Finish…

iv.	Click Reboot. The installation media should be Removed auto-magically so Press Enter

v.	When it comes back you have a nice little splash screen Click close and leave the checked so you can visit it later if you wish.

vi.	**IMPORTANT** At the TOP LEFT Click On Devices > Install Guest Additions​

1.	Window pops up and Click RUN > enter your password in the pop up window

2.	Type “y” press enter and let it finish​

vii.	**Important** Click on devices and make sure both Shared Devices and Drag ‘n Drop are Both set Bidirectional… and REBOOT

viii.	Now we need to verify the Cut and paste or you can work within the Linux installation. You choice. I cut and pasted from windows (host) to Linux (VM)

ix.	If you chose as I did to cut and paste from windows to Linux then copy something and make sure that you can paste it in the terminal window. (moving along now… Nothing else to see here.)​

9.	Now we go through the awesome tutorial that Warped420 Setup here. http://xdaforums.com/showthread.php?t=2314836 I would highly suggest to Read all from start to Post 5 that is when we are going to get into the actual setting up of the build Box…

a.	If you are a noob (like me) The I would read all of his posts from the beginning to end. You will pick up a lot of information that will be handy when you are working with the build box.

b.	Now if we are all done reading we can get to the GOOD part!!!​

10.	Post 5 (Step 4) (we now are going to refer to the steps…) link: http://xdaforums.com/showpost.php?p=42330291&postcount=5

a.	Ok, I Hope you have set Root

b.	Open up a terminal window (Ctrl + Alt + T) input these commands one at a time. (read the post in step 4) (terminal: $ sudo passwd root) & (terminal: $ gksudo nemo)

c.	Now we go to Libs under 1…​

i.	You see under the Code Window. I would not suggest that you cut and paste this, If something errors out then you don’t know where you left off and there is now way to track down what the issues are if you are getting a bad build.

ii.	So Click Show Content (Don’t Be Scared Go For it!!!)

iii.	I opened up Notepad++ (use whatever you like and copy and paste the whole list on to it.) I would cut them out and paste them in the terminal. I did this so I always knew where I left off. You do what you think you need to just a suggestion…

iv.	Now Get you terminal window opened up and get your Cut and paste on… (Don’t Cut the $ for the first one)

v.	One thing, Install this one early sudo apt-get install gcc-4.7-multilib I have had issues when I waited till the end…

vi.	Anything you have issues with use Google or ask for help…

vii.	Go for the extras if you haven’t had enough… But I have found they are not entirely necessary for this initial step…

viii.	Good Luck!​

11.	Now at this point we have made it through all of that updated the Java install and created the 51-android.rules file and amended the repo file with the export PATH statement.

a.	If you are comfortable with you success of the build you are in a good place to take a break.

b.	I shut down the Build box Menu > Quit > ShutDown.

c.	Go to the Directory where you have the Hard Disk file that you have created. Make a copy of the Hard Disk file, to another directory as a backup. (It should be about 8 to 13 GB depending on if you did the extras or not) You might thank me later if anything goes wrong with the build you have exactly where you left off at this point in time. You should only use this with the current installation and never use it at the same time as another installation or really bad things will happen,

d.	Copy it in a safe place and go and chill out till it completes.

e.	How to restore your Copy:​

i.	Open up Oracle VM Virtual Box Manager

ii.	Make sure that your VM is powered Off.

iii.	Click on File > Virtual Media Manager

iv.	Under Hard drives Click on the Hard disk and Choose Release then Click Release on the pop up box. Now you can Remove it and delete it completely or you can do what you want with it. Click Close when you have completed.

v.	Now copy the “Fresh” copy into the folder where you have the VM created with a different Name. or do (vi) first and delete it and then copy over. Your Call…​

vi.	Once that is done in the Manager select it and click on Settings > Storage​

1.	You will notice that the HD IS gone from the VM.

2.	Click on Controller: SATA and select the icon on the right (add Hard Disk)

3.	Choose Existing disk and navigate to the file (it should be in the folder that you have the VM in. If you renamed it because you left in the old copy that is fine. Select the file you want and click open > OK

4.	You are all set and when you reboot the VM it will be right where we left off after you did the initial installation. YEAH!!!​

12.	Keep on going through Step 7 and choose your REPO!

13.	I have successfully sync’d ChameleonOS with a successful build

14.	CM 10.1 Not so successful builds on Android 4.3 it is new so I didn’t expect it…

15.	Good Luck and go forth and conquer!!!!!

There are plenty of variations for doing this as this is one in the plethora of options. “There are a million ways to skin a cat.” Poor Felix…

Just use your common since and explore the options!