[One (M7) Android Development] mwilky:
SVN Guide​

How to set up SVN for Windows

Step 1-3 is only for people who haven't set up the SVN yet, if you have already set up and just want to update to the newest revision, go to step 4

You will need:

A PC running a newish version of Windows

Tortoisesvn, choose 32 or 64 bit depending on your OS

An archive program, i recommend winrar

1. Setting up folder structure.

Once you have TortoiseSVN set up and installed, browse to a directory where you would like your ROM to be stored

Once your in that directory create a new folder and name it "HTC One"

Go inside that folder and create two more folders, name one "renovate-m7" and the other "renovate-flashable"

You don't have to use these names, it just makes things less confusing if you do.

To give you an idea on what these folders will do, "renovate-m7" is where you will download/update the rom/files to each time we make an update. Once you are up to date or at a revision you want to flash you then export the rom to "renovate-flashable" ready to flash on your device.

2. Downloading the ROM

Once you have completed step one, it is time to download the ROM.

Right click on the "renovate-m7" folder and click "SVN Checkout". The following image should appear

From here you will need to enter the url of the renovate rom project.

The link is http://androidsvnhost.com:9880/svn/renovate-m7/trunk/ which can also be found in the first post

Go ahead an enter the URL and press go

If all done correctly the ROM should start downloading, this could take a while depending on your internet speed. This is the one and only time you will have to download the full 800mb rom.

Once it has finished you will be left with the rom structure inside the "renovate-m7" folder. You can tell if everything has synced correctly as there will be a green tick on the folder icon.

3. Exporting and zipping

Open "renovate-m7" and you will see the rom structure. Your instincts will probably tell you to add this to a zip and then just flash on your phone, but as this is the folder linked with the SVN, there are hidden files which we don't want to include when we put it in our rom.zip ready to flash.

To get rid of these hidden files, all you need to do is right click "renovate-m7" folder, go to "tortoiseSVN" then click "export".

This will open a new window asking you to choose where to extract to, simply locate your "renovate-flashable" folder, click it, and click "select folder" to begin exporting

Once the export has finished, your going to want to zip up the rom so you can flash it.

Open "renovate-flashable" and select all the folders and the boot.img

If you have winrar installed click "add to archive"

This will open a dialogue, all you need to do is set the the format to ".zip" not ".rar", choose a name for the zip and choose where to save it

Once you have done this click ok to start the zipping

Once finished this is your completed rom.zip, simply transfer this to your phones memory and flash in recovery :)

4. Updating

If we make an update to our rom, svn users can stay up to date change by change, and only by downloading the modified files, not the entire rom everytime.

To update to the latest revision all you need to do is right click on "renovate-m7" and select "SVN Update"

This will update all the changed files to the latest version, keepin you up to date.

Once the update is complete, you'll have to export the rom again (step 3) before zipping it up and flashing.

Before you export though, make sure you delete the previous revision from "renovate-flashable"

Once the old build is deleted, simply follow the "exporting" step again and you will be up to date with all the latest changes.

How to set up SVN for Mac OS

You will need:

•	An Intel based Mac

•	Xcode or Command Line tools for your version of OSX

•	svnX

1) You need the command line tools to be installed in order to export the ROM once the source has been downloaded. To do this you will need to complete only one of the next options.

a) Command Line Tools via Xcode

Xcode is a 1.6GB download and if all you need is the command line tools then I strongly recommend you use option B. Download and install Xcode, once completed via the preferences download the command line tools;

OR

b) Command Line tools via the Apple Developer Site.

This method you will require an Apple Developer ID, its free to sign up and if you already have an Apple ID, you can use that. Sign up and search for command line tools, select the correct version for your OSX version, download and install.

2) Next you need to installed svnX and connect it to the Renovate repository, hit the + button on the Repositories window and enter the details;

Name: Whatever you would like to call it.

Path: http://androidsvnhost.com:9880/svn/renovate-m7/trunk/

User: <n/a>

Password: <n/a>

3) Once the details are entered, click the entry to open the repository;

4) Select the revision you wish to download, this will mostly be the latest version, then click the Checkout button.

5) Select where you wish to download the ROM to and svnX will begin the download. Remember this location, as we will require it later. You don’t see progress indicated unless you click the Output button, this will show the current file being downloaded and a progress indicator at the bottom.

Once complete the source is now copied to your Mac, now time to export the code ready for archiving.

In this example I downloaded the files to:

/Users/Guy/Downloads/android-sdk/ROMs/Renovate/One

6) Open up terminal and navigate to the location where you would like export the ROM to:

cd /Users/Guy/Downloads/android-sdk/ROMs/Renovate/Exported

7) Then run ‘svn export’ on the director where you downloaded the files to:

svn export /Users/Guy/Downloads/android-sdk/ROMs/Renovate/One

This will clean all of the comments and other revision files from the files and make them ready for archiving.

8) Navigate to the directory where you exported the ROM to, select all the files, right mouse and select compress;

Once the archive has been created, copy to your phone and flash as normal via recovery.

When its time to update your local copy, open svnX and follow steps 3 through 8.