FORUMS

[GUIDE][COMPLETE]How to build ROM with Google Cloud

8,089 posts
Thanks Meter: 19,681
 
By nitin.chobhe, Recognized Contributor on 17th April 2016, 08:47 AM
Post Reply Email Thread
What is this Tutorial?
This tutorial will help you learn about building a custom ROM from source on Google Cloud.

Who this tutorial is for?
This tutorial is for those who want to build a custom ROM from source, but are unable to do that because of following reasons:
1. Low network speed
2. Limited bandwidth
3. Irregular power supply which obstructs the repo sync (yes, this is a reason in some countries )

What is needed for you to start with this thread?
1. A google account
2. A credit card – This is a must to start using Google Cloud Update: I read that people have successfully used debit cards as well.; so try your luck
With you card you can activate free trial and use Google Cloud without any charges for 12 months. Your card will be charged for $1 for verification purpose (and that’s it, the charges on my credit card got reversed in a day- I’m not sure about the reversal of the charges on debit card charges will be reversed on the cards [But I'm not responsible if they don't revert it ]).
3. A PC with good (average will also do, I used 512 kbps connection) internet connection (to access Google Cloud, your bandwidth will not be used much).
4. Common sense (you should have it as you are reading this thread)
5. Willingness to read, search and ask right questions in right forums, communities

So, let’s start our journey!

Part – I
Activating Google Cloud FREE Trial
1. Go to Google Cloud website: https://cloud.google.com/ and click on Free Trial button
Google cloud home page

2. Login with your Google account username and password.
Sign up

3. Click on SIGN UP FOR FREE TRIAL


Enter all the details and click on Accept and start free trial button


4. It will start your free trial and create first project for you


Congratulations! You have completed the most important Part – I of the process and you are now ready to setup the environment for building your ROM!
Update: Now the free trial validity is 1 year so more time to learn how to build the ROM

Part – II
Creating Virtual machine on Google Compute Engine
1. Click on the 2 lines menu displayed on the left top corner to bring on the Products and Services list on left side.


2. In this menu, click on Compute Engine


3. It’ll show following page, click on Create Instance button


4. On Create Instance page, specify the details like Name, Zone (if you want to change them). In Machine Type combo, select a machine configuration that you would like to have.
I use 4 cores and 15 GB memory


5. In Boot disk section, click on Change button.


6. On Boot disk details page, select the OS that you want to have on VM Instance. I always used Ubuntu 14.04 LTS (and it never let me down). Update: Now I use 16.04 LTS


Enter the size of disk. I used 500 GB so that I can sync 2-3 ROMs in the same VM Instance Then click on Select button.
Note: With this configuration I was able to clean build a ROM in around 70 minutes. The repo sync took around 25-30 minutes (which would have taken a week on my slow internet connection)
7. It’ll take you back to Create Instance page. Here you can specify the Firewall by checking both the check boxes. Finally click on Create button to create the VM Instance.


8. It’ll take a minute or two and create the VM instance. It’ll be in running state as indicated by the Green check box in front of the VM Name.
Note: You can start or stop the instance by selecting it and then clicking on stop or start button. It is advised to stop the VM instance once you are done with using it.


9. Click on the 3 dots menu near SSH and select option Open in browser window.
10. It’ll start the SSH connection to the VM Instance that you have created.


11. Run following command to get su
Code:
sudo –s


Now you are ready to install the required packages to build the ROM from source. You can follow this nice guide created by @jackeagle to start:
http://forum.xda-developers.com/show...14&postcount=2
That was it!
Wish you all the best for building your first ROM
The Following 212 Users Say Thank You to nitin.chobhe For This Useful Post: [ View ] Gift nitin.chobhe Ad-Free
17th April 2016, 08:48 AM |#2  
nitin.chobhe's Avatar
OP Recognized Contributor
Flag Pune
Thanks Meter: 19,681
 
Donate to Me
More
How to upload the ROM zip on internet?
Many guys, who were able to build the ROM successfully, were asking about how to get the ROM zip on phone

Thanks @hackslash for this nice post: http://forum.xda-developers.com/show...&postcount=146

Upload to AFH: https://forum.xda-developers.com/sho...&postcount=315

You can also upload it on Google drive by following these steps:
http://olivermarshall.net/how-to-upl...-command-line/ (thanks @Papdya for sharing this link)

Nitin
The Following 43 Users Say Thank You to nitin.chobhe For This Useful Post: [ View ] Gift nitin.chobhe Ad-Free
17th April 2016, 09:08 AM |#3  
Shreesha.Murthy's Avatar
Recognized Contributor / Inactive Recognized Developer
Flag 127.1.1.0
Thanks Meter: 6,900
 
More
Awesome guide. I'm sure it'll help out those who are trying hard to build their first ROM and get involved in building stuff. Just a suggestion though
I find @akhilnarang script to be easy to setup server and it's just few commands away. It'd be nice if you include that
Link : github.com/akhilnarang/scripts

-ThugLife™✌
The Following 16 Users Say Thank You to Shreesha.Murthy For This Useful Post: [ View ] Gift Shreesha.Murthy Ad-Free
17th April 2016, 09:15 AM |#4  
nitin.chobhe's Avatar
OP Recognized Contributor
Flag Pune
Thanks Meter: 19,681
 
Donate to Me
More
Quote:
Originally Posted by Shreesha.Murthy

Awesome guide. I'm sure it'll help out those who are trying hard to build their first ROM and get involved in building stuff. Just a suggestion though
I find @akhilnarang script to be easy to setup server and it's just few commands away. It'd be nice if you include that
Link : github.com/akhilnarang/scripts

-ThugLife™

Sure buddy! I'll have a look an include them.

I suffered a lot to build my first ROM (you know that)... So thought to share this easy and fast way to build the ROM. I observed that initially we have to build many times due to errors (coming from lack of knowledge about building). This will reduce the time that is required for "build - error - fix- rebuild" cycle and learn ROM building quickly
The Following 7 Users Say Thank You to nitin.chobhe For This Useful Post: [ View ] Gift nitin.chobhe Ad-Free
17th April 2016, 11:10 AM |#5  
Recognized Contributor / Recognized Developer
Flag Pune
Thanks Meter: 12,924
 
Donate to Me
More
Nice :P
You can add guide to add a disk, format and mount that too :P
That was my main stuggle when I was trying to use it first :P
The Following 5 Users Say Thank You to akhilnarang For This Useful Post: [ View ]
17th April 2016, 11:31 AM |#6  
core7x's Avatar
Senior Member
Flag Kuala Lumpur
Thanks Meter: 59
 
More
Good for our reading. Thanks
The Following User Says Thank You to core7x For This Useful Post: [ View ] Gift core7x Ad-Free
17th April 2016, 12:02 PM |#7  
nitin.chobhe's Avatar
OP Recognized Contributor
Flag Pune
Thanks Meter: 19,681
 
Donate to Me
More
Quote:
Originally Posted by akhilnarang

Nice :P
You can add guide to add a disk, format and mount that too :P
That was my main stuggle when I was trying to use it first :P

I'll have to understand it from you first

Sent from my Nexus 4 using XDA Free mobile app
The Following 3 Users Say Thank You to nitin.chobhe For This Useful Post: [ View ] Gift nitin.chobhe Ad-Free
17th April 2016, 05:47 PM |#8  
Senior Member
Thanks Meter: 29
 
More
To make sure i understand, technically I could build roms on a chromebook with this guide? And the guide listed at the end, do we download all those things on our computer or on the cloud platform? Thanks!
17th April 2016, 05:52 PM |#9  
Shreesha.Murthy's Avatar
Recognized Contributor / Inactive Recognized Developer
Flag 127.1.1.0
Thanks Meter: 6,900
 
More
Quote:
Originally Posted by allanlgz

To make sure i understand, technically I could build roms on a chromebook with this guide? And the guide listed at the end, do we download all those things on our computer or on the cloud platform? Thanks!

Cloud platform m8 :wink:

-ThugLife™✌
The Following 2 Users Say Thank You to Shreesha.Murthy For This Useful Post: [ View ] Gift Shreesha.Murthy Ad-Free
17th April 2016, 06:02 PM |#10  
nitin.chobhe's Avatar
OP Recognized Contributor
Flag Pune
Thanks Meter: 19,681
 
Donate to Me
More
Quote:
Originally Posted by allanlgz

To make sure i understand, technically I could build roms on a chromebook with this guide? And the guide listed at the end, do we download all those things on our computer or on the cloud platform? Thanks!

As @Shreesha.Murthy says, you do everything on Google cloud. That's the whole point of writing this thread

Sent from my Nexus 4 using XDA Free mobile app
The Following 2 Users Say Thank You to nitin.chobhe For This Useful Post: [ View ] Gift nitin.chobhe Ad-Free
17th April 2016, 06:03 PM |#11  
Senior Member
Thanks Meter: 29
 
More
Quote:
Originally Posted by Shreesha.Murthy

Cloud platform m8 :wink:

-ThugLife™✌

Thanks m8. I've never built before but feel comfortable with all the commands and everything. Just one last question, if I want to build for the Sprint LG G3 ls990, I'd have to use the device tree and everything device specific from CM for ls990 (or any other that has all device specific things) to get it to work on my ls990, correct?

Also, thanks so much for the guide it looks really helpful
Post Reply Subscribe to Thread

Tags
android, from source, guide, rom

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes