Friday, September 23, 2011

Ropehead Tutorials: How to use SVN on Ubuntu 11.04 to download nighly Android ROM updates




I originally learned how to SVN by following, XDA user, LiquidSolstice's tutorial on using the Window's application, Tortoise SVN, in order to utilize SVN for the Synergy Nightlies. With that said, however, I never actually used it for Synergy because I was pretty stuck on the Absurd ROM at that point which is what I had used SVN for. Either way, I eventually stuck with KushDeck for a bit, which doesn't actually use SVN.  That was until I discovered the wonders of Warm TwoPointThree by Myn and the rest of team Warm ROMs.

I had been lurking the Warm Discussion thread on Rootzwiki and lucky for me someone had posted a link to an already zipped Warm Nighty. From there, I was hooked and knew I would have to rawk the SVN myself in order to stay somewhat current with how the build was progressing.



Unfortunately for me that didn't last very long.  Alas, my computer had died due to a corrupt Windows Vista system file or someting to that effect.... BIG SURPRISE!  For some reason, even my recovery had gotten corrupt so I was even unable to do a fresh factory install.  What's a geek to do?  It's not like I have the money to buy a new Windows installation disk and I really didn't feel like scouring the net for Windows OS cracks, etc.

In order to get myself back online again with something other than just my EVO 3D, I decided to throw Ubuntu 11.04 on it.  Luckily for me, there's a lot of awesome support for the Ubuntu flavor of Linux on the interwebz and since I had used linux previously in a virtual environment, it turned out to be a farily easy transition.

All that aside, before I get going on a tangent, I'm going to be demonstrating how to follow the same method orginally written by LiquidSolstice, however, we are going to be using RabbitVCS instead of Tortoise since there is no Linux version of Tortoise.  Fortunately, RabbitVCS works almost exactly the same as Tortoise which is why there wasn't much or any learning curve regarding how to use it for our purposes.

You'll have to excuse the audio/video editing for the video above.  It had taken me three days to try to pull everything together since I'm still kind of a Linux noob.  Although the video's altogether, I decided to do the write up in three parts.  The video was made just for extra added reference.  So let's begin shall we?

Part 1: Installing RabbitVCS on your computer and Setting up your SVN folders

- Go to your applications launcher and click on "Ubuntu Software Center"

- In the search bar, simply type "RabbitVCS" without the quotes and it should bring up four items to install.

- When you click the "Install" button, it will bring up a pop-up asking for authentication.  Enter in your root password or the password you use to log into Ubuntu.

- Go into your documents section and create a folder called "EVO3D".  Inside that folder create another two folders called "Current" and "WarmTwoPointThree" (or the name of the ROM that you're trying to download).

By this time, hopefuly, your installation of the RabbitVCS software should be finished now so you can now go back to the Software Center, confirm that it's finished, and then close out that window.


Part 2: Running SVN Checkout to download the actual ROM directories.

- Go to the WarmTwoPointThree source page and copy their checkout address.

- Go to your EVO3D folder and right click on the "WarmTwoPointThree" folder (or whatever the name of the folder/ROM you had set up previously)located inside of it.  Click on "Checkout".  From there it should bring up a prompt where you can enter in a checkout URL. Paste that checkout address into the aforementioned prompt and then press Ok.

Depending on your connection, this may take a while so you might wanna go do something for a bit while it downloads all of your files.  The checkout windows will show "Finished" when it's complete just simply hit Ok then move on to the next Part.


Part 3: Creating your flashable ROM zip file

- Go back to your "Documents", then click on "EVO3D", then on "WarmTwoPointThree"(or whatever the name of the folder/ROM you had set up previously). You should see a folder labled "SVN.  If that folder shows chec mark, that means the checkout process has updated all of your directories to the newest revision at the time that you had requested the checkout.

- Right click on the "SVN" folder and scroll down to the "RabbitVCS" menu options.  From there, click on "Export" and it should bring up a dialogue box.  On there, go ahead and choose to export the files into the "Current" folder you had created previously then click okay.

**Please note that there are hidden files in the "SVN" folder that are needed for the SVN file.  By using the export function instead of simply copying the contents out of the SVN file, this filters out all of those hidden files so you only get the files necessary for your ROM zip.**

- Once that's completed, go ahead and click Ok.  Now we can navigate to our "Current" folder and see all of the contents that we'll need for our ROM.  This is where you'll be able to edit anything on the ROM as well if you choose to do so.  What I'll usually do is update the name of the changelog to match the revision number, and I'll also modify the build.prop file which is located in the system directory to show the revision number as well.  From there I simply cut the changelog and paste it into the main "EVO3D" folder instead.

- Once you've made whatever changes you wish to make, go ahead and select all of the files and then choose to "compress" them.  When the compress dialogue box comes up, make sure to choose "zip" for the type of file you're compressing it into and name the zip whatever you want, then click ok.

- The last step I usually take is I'll open up a terminal and navigate to the directory where our zip file is located and I'll check the md5sum by entering the following command: md5sum xxxxxx.zip
From there, I'll simply copy that code and paste it into the changelog that I placed outside of the Current folder so that when I transfer it to my phone, I can make sure the file didn't get corrupt along the way.



No comments:

Post a Comment