FORUMS
Remove All Ads from XDA

[GUIDE][7/30/12] Use SVN to Download SuperLTE and Other SVN-distributed ROMs

5,182 posts
Thanks Meter: 5,215
 
By LiquidSolstice, Inactive Recognized Developer on 30th July 2012, 08:28 PM
Post Reply Email Thread
Quote:

Ignore this quoted section if you are reading this guide for the first time. Start at the blue "New SVN Users" line.
List of SVN Checkout Links for ROMs that are developed with SVN:

Do NOT edit the URL in any way. Copy it exactly as it is shown.

Quote:

superLTE by il Duce & Team D3RP

Code:
http://d3rp-lte-rom.googlecode.com/svn/trunk/






New SVN Users, start reading from here!


As promised, I'm posting this graphical guide up for those who wish to use SVN in order to obtain nightly builds of ROMs and all other items that utilize SVN for distribution. As always, my guides are meant for the completely clueless, and come with screenshots for help

First of all. Let's start with the big question.

What is SVN, and why do I care?
SVN is actually not an acronym for anything. "SVN" is the command line phrase that triggers a system called "Subversion", but no one wants to type out Subversion every time they want to refer to svn. Long story short, it allows for simple distribution of computer software/ROMs/etc with methodical updating that can be rolled back at any time. It may sound intimidating, but I'll be making it quite easy for you to understand, and ultimately, you'll find it quite useful. Don't get intimidated or freaked out. A few days ago, I had never used SVN either, but now it's a piece of cake!

Well, uh, that sounds interesting, but seriously, why do I care?
Well, you should. Let's take our Sense-based ROMs, for instance. They're all roughly 400+ MB (maybe less for the Sense-stripped ROMs).

Doesn't it suck to have to download a new 400+MB zip file each time there's a small fix that you really want to get to?

What if I told you, that using SVN, you only have to download the select files that the ROM devs have updated, which tends to be a fraction of the size, rather than download a full massive zip of the ROM each time? That instead of downloading 300 MB, you'd only have to download 30 to get a bunch of fixes and updates? What if I also told you that you can revert changes which broke your previous setup with ease? Sounds good? Great! Let's get started!


Stuff You'll Be Needing
*What is this? An SVN checkout link is the link that your ROM dev or software author will provide you. It tells Tortoise SVN where to get all those yummy files. For the sake of our example, we will be using the Synergy ROM, which is developed using Google Code. Google Code provides automatic SVN links for those who know how to use it. Don't worry about this yet, just read on to understand more.

BOLDED Text - These are folder locations.
Red Underlined/Bolded Text - These are hyperlinks.
Blue Bolded Text - These are bonus tidbits that may or may not appeal to you.


Step 1: Install Tortoise SVN


Step 2: Create the proper folder structure
So then, you don't HAVE to do it this way, but this is how I do it, and will keep your organized. This part was originally written for an Evo 3D ROM, but the process is the exact same regardless of device.
  • Start by making a folder called Evo LTE, anywhere on your computer. (I keep mine inside my My Documents Folder). Note; this guide was originally for the EVO 3D, so my folder name in the screenshots will say EVO 3D. Mentally replace that with "EVO LTE".
  • Inside it, create two more folders. Because the ROM we are downloading for our example is Synergy, we will title it synergy-evo3d and the other one Current. You may change the title of the first folder accordingly based on what ROM you're downloading it. It doesn't matter what you call it, as long as you know what it is. In the screenshots of this post, all screenshots show the folder titled synergy-evo3d, so if you're downloading a different ROM, mentally replace that name with the name of your ROM in each screenshot and name it accordingly




Step 3: Start Downloading!
  • Now that we have our folders set up, let's be clear about which folder is for what. The synergy-evo3d folder is meant as your "cooking pot". You will update your ROM and revert your ROM from there, much in the same way you'd add more and more spices and ingredients to your cooking pot.
  • Once you have updated or reverted the ROM, you then will export that updated content into your Current folder, which will end up being the zip you flash to your phone. If this doesn't make sense right now, fear not. I'll explain when we get to that step and why we do it this way.

So let's start the downloading process, because this will take some time.


Part 1: Download
  • Right-click on the synergy-evo3d folder.


  • Click on SVN Checkout. The following dialog will pop up.


  • Now, we need the link of the repository. The developer of your ROM/software will provide this for you, you simply need to ask, or look below for a list of SVN Checkout links for SVN-based ROMs.You'll be looking for a "trunk link". If you don't see one, ask your developer.

Remember, if you're not downloading Synergy, look at the top of this post for all recently updated SVN trunk links!
  • Paste the link of your ROM of choice back into our Tortoise SVN window, and press "OK".



  • Now begins the downloading process. It will download the proper folder structure. Just sit back, and let it do it's thing. It can take anywhere from 5-10 minutes to an hour and a half, depending on your internet connection. If you have a slower connection, don't worry. Bite the bullet once with this, and then you'll see the beauty of SVN.



  • Once it finishes, we're left with the completed folder! You'll notice there's now a green checkmark on it, signifying that it's our SVN folder and it has been properly synced:



  • If we open this folder, we see the following:




Congrats! We synced it properly. Now, here's the thing. Each one of those folders you see contain a hidden .svn folder, which Tortoise SVN uses to keep track of the version numbers whatnot. Therefore, if you zipped up all the files you see right now, you'd have a massive ZIP file full of unneeded files, and it might also malfunction/not flash on your device. This is where we use the "Export" command.

Continue to the next post!
The Following 41 Users Say Thank You to LiquidSolstice For This Useful Post: [ View ] Gift LiquidSolstice Ad-Free
 
 
30th July 2012, 08:33 PM |#2  
LiquidSolstice's Avatar
OP Inactive Recognized Developer
Thanks Meter: 5,215
 
More
Part 2: Export, Zip, and Flash!
  • So, to ensure we don't copy any of the .svn folders that are unneeded for our ROM zip, we will use the Export command. This is where we will use the Current folder we created earlier.
  • Start by right-clicking synergy-evo3d, go to Tortoise SVN, and find "Export".



  • This dialog will pop up, asking you where to export. Navigate to our EVO 3D folder, and then click on our Current folder.


  • Click OK. It will begin exporting:



  • Once it is finished, it will create a synergy-evo3d folder inside the Current folder. If you see green checkmarks on any of these items, you're looking in the wrong location. You need to be looking at EVO 3D/Current/synergy-evo3d



  • Open it up, and voila! There's our ROM package!



  • BONUS: From this point on, you can customize the ROM before we zip it up. Stuff in the system/app folder you want to remove? Go on, get rid of it now! Or perhaps you want to add in your own Ringtones now? Do it
  • Once you've made any personal changes you want (or none, if you want to just flash it as is), highlight all of the files, and click "Add to archive".



  • This window appears. You've probably seen it before if you've ever zipped anything up.
  • First and foremost, make sure you select the format to be "zip" and not the default "rar".
  • Then, pick your level of compression. The idea is simple. if you go as simple as "Store", your file will zip up in seconds, but the finishing zip will be large (in my case, roughly 550MB). If you choose to take the "Best" compression level, it will takea few more minutes (depending on your computer) and can be as small as 330 MB. (That's of course approximate, different people may have different sizes depending on what they remove or don't remove).
  • Finally, name it what you want, and click OK!

When that's all done? Take the zip, put it on your phone's SD card, and flash that thing. Enjoy! If you get a Status error when flashing, make sure you've properly zipped up the archive. Check the screenshots and follow them exactly.

But wait, Liquid, you said we could update without downloading each time!
  • Yes, I did. That will be the next post, scroll down!
The Following 18 Users Say Thank You to LiquidSolstice For This Useful Post: [ View ] Gift LiquidSolstice Ad-Free
30th July 2012, 08:34 PM |#3  
LiquidSolstice's Avatar
OP Inactive Recognized Developer
Thanks Meter: 5,215
 
More
Part 3: Updating Incrementally
So then, now that we've gone through all that trouble, we've just discovered that our developer has made a dozen more changes and now we have to download a new ROM. But wait, no we don't!

  • Go back to your EVO 3D folder. Right click on your synergy-evo3d folder.



  • Click on it, and it will update ONLY what your developers changed. If they removed a file, Tortoise SVN will remove it. If they added a file, Tortoise SVN will add it. And of course, if they edit a file, Tortoise SVN will update that file. When it completes, you'll be told what revision it is at. It may take a few minutes, just be patient

You'll notice it only downloaded about 26 MB, and has placed/overwritten/removed all files accordingly. It also states that I am now properly at Revision # 259.
  • BONUS: Want to see what was updated and why it was updated? Simply click "Show Log" to get to THIS window:
  • You'll be able to see all the revisions made since your last update, and you can go farther back in time if you'd like. If you're the kind of guy who presses "Show Details" when installing applications on Windows, play around with this window, you'll find much that is interesting




  • Once it finishes, press OK. Go back to EVO 3D/Current/synergy-evo3d. Ensure it's not your SVN folder by making sure you see no green checkmarks on any of the folders or files. Once you have made sure of this, delete the synergy-evo3d folder completely.
  • If your previous ROM zip is still in there, either delete it too or move it somewhere else. This is to make space/room for the fresh Export we are about to do.



Return to our main EVO 3D folder. Right click, and then export to the Current folder, just like we did the first time. Once it finishes, again, zip it up, just like we did the first time. If you forgot this step, or want to make sure you're doing it right, scroll up to "Part 2: Export, Zip, and Flash!" in post #1.

And that's it! A hell of a lot easier than downloading the ROM over and over, eh? Keep reading, the fun isn't over yet.
The Following 19 Users Say Thank You to LiquidSolstice For This Useful Post: [ View ] Gift LiquidSolstice Ad-Free
30th July 2012, 08:34 PM |#4  
LiquidSolstice's Avatar
OP Inactive Recognized Developer
Thanks Meter: 5,215
 
More
Part 4: Reverting To Previous Builds
So then. This is the nature of the beast known as the "nightly" build. A revision has gone in and borked your setup. Maybe it's killed off your battery life, maybe it changed something visual you don't like, maybe it removed an app that you preferred to have in the ROM. Your reasons may vary, but it doesn't matter. You can revert to a working version very easily.

Heads up! This can get a bit hairy depending on what you want to do. There's recommended strategies, and then there's things I wouldn't recommend. Read on to learn more. This section is very much not for begginers and I strongly advise you not do this unless you .*truly* understand what you're doing.

Alright then, let's begin.
  • Remember that "Show Log" button we hit earlier when upgrading? We want to go back there now. Right click on your SVN folder, and click on "Show Log".





Then, this window will pop up. It's a catalog of all the changes made. You can control by many different factors. Let's start by finding the timeframe of the revision you want to go back to. Then, from there, you'll notice there's a search box.



  • So there's two scenarios here.
  • One, you already know what build number you want to revert to, in which case, scroll down until you find the right revisions.
  • Two, you're not entirely sure what revision you want, but you remember the changelog comment. For instance, let's say I'm having issues with the kernel. To see all the changelog comments that contain the word "kernel", I type "kernel" into the search box and press Enter:




Or we could go even more detailed.
  • Let's say you're a Themer, and you're trying to find a certain framework-res.apk that was modified at some point to ensure your theme still works or to redo your theme.
  • Simple! We just type "framework-res.apk" into the searchbox, and we press enter.

As you can see, it is showing me every single change that modified the file "framework-res.apk".



For the sake of keeping it simple for this guide, I theoretically want to find all changes related to the "overscroll" effect. So I type it in, pick the revision I want, and then I right click it.




~~~ STOP.~~~
This is where you need to stop and think about what you're doing. As you can see, you have two options in the screenshot above. You can revert to that revision, or you can revert changes from that revision. There is a HUGE difference between the two, and there is a list of things you need to remember before you pick which one to do.


Use Revert To Revision (Recommended)
  • This will revert ALL changes since the revision you clicked on. If you are on Revision 296 and want to revert to Revision 260, ALL revisions between 261 and 296 will be reversed. If something was added, it will be deleted. Modified files will be restored to what they were in 260. Removed files will be readded to where they were as of build 260.


    Use this Option ONLY if:
  • The latest revision has wrecked a key part of your phone, such as the mobile network, the 4G, the battery, MMS, etc etc, and you need said functions working asap.
  • You want to revert to a revision that you feel simply worked better, and you will stick with that revision until the changelog reflects that your complaints have been addressed.
  • It's simply a temporary deal while you wait out the process of more fixes being added.

Use Revert Changes From Revision (Not Recommended)
This will revert a SINGLE revision's changes only. For instance, if you are on revision 290, and there was a change in Revision 260 you liked better than the one in 290, it will only take that single change from 260 and "inject" it into your current 290 build. If this sounds too complicated to you, DO NOT DO IT. Read the NOTE at the end of this section to understand why.

Use this Option ONLY if:
  • You are an advanced developer, and you're interested in figuring out what changes Team Synergy made to what, and how it affects the items around it.
  • You are a ROM themer, and you need access to previous files to troubleshoot your theme as you upgrade it.
  • You are an advanced user and you are trying to troubleshoot how one file that Team Synergy changed is affecting your programs/development/mods etc.

~~~Continue.~~~




Decide which one suits you (most likely the first option), and click Yes when it asks you to confirm. It will finish reverting the changes (it calls this "reverse-merging")



Once it completes, follow the steps to Re-Export, and Flash!

NOTE:
Using SVN Revert is a tricky thing. For now, as far as what I've guided you to know, SVN is only a TEMPORARY solution. And it can also be a problematic one. Why? Because you'll still want to update to a new build, right? No matter which option you chose above, using SVN update will overwrite any revisions Reverts that you have done before. This will get to be a problem if you try to keep reverting back to a version you prefer. The more and more you cherry-pick which changes you want to keep, the more and more unstable you may make the ROM. You might also miss out on new features; say that the ROM's framework-res.apk was updated with some new features as of revision 290, but you're still using the framework-res.apk from build 260. You won't be able to get any of those new features. It gets worse when you get to System files. What if you chose to keep a reverted apk, and in a new build, it gets overwritten? If you keep your old apk, and newer builds have dependencies on that apk, you'll run into errors, because the system will not find the apk it's looking for, it will find your old one.

Essentially, the best place to get ROM fixes is straight from the Devs. Use SVN Revert ONLY as a temporary solution until they fix it!

There's plenty more coming, but I'm tired of this thread again, stay tuned. I'll add some more helpful tips later on


Well guys, that's it for the guide for now. As always, I do my best to make sure you have the easiest and clearest guides to go by, because XDA is about the more knowledgeable spreading their knowledge to the less. Enjoy, and most importantly, spread what you learned here to other people that use SVN. They may not be using SVN for ROMs, but the guide is more or less the same as long as they have their own SVN link.
The Following 19 Users Say Thank You to LiquidSolstice For This Useful Post: [ View ] Gift LiquidSolstice Ad-Free
30th July 2012, 08:46 PM |#5  
LiquidSolstice's Avatar
OP Inactive Recognized Developer
Thanks Meter: 5,215
 
More
Quote:

F.A.Q.

Quote:

Do I have to rezip the entire ROM each time I SVN update and flash the whole zip?

This is, unfortunately, the single most popular question when it comes to svn. The answer is unfortunately "yes". The coding required to create "patches" is outside my scope of understanding and would need to be done by a more experienced developer. il Duce has a method to work with this, but I don't know much about it. Sorry!


Quote:

My zip won't flash! Help!

This is the second most common issue with SVN. When you go to zip up your files, make sure you are zipping it up exactly how you see in the screenshot; i.e., make sure you select all the folders and then right-click to zip it. Don't zip the "Current" folder up.

Quote:

I am a developer and I'd like my trunk link visible in the OP.

No problem! Just PM me with your trunk link and I will post it up, along with a link to your thread. Please don't just reply here, my SVN threads usually get pretty hectic and I may miss it.


Quote:

Changelog

Quote:

7/30/12 - Rebooted the guide, cleaned it up, edited it a bit for LTE users

Quote:

7/30/12 - Added superLTE trunk link, cleaned up some typos, removed some Evo 3D-specific content

The Following 16 Users Say Thank You to LiquidSolstice For This Useful Post: [ View ] Gift LiquidSolstice Ad-Free
30th July 2012, 08:58 PM |#6  
eyeisdasteve's Avatar
Senior Member
Flag Massachusetts
Thanks Meter: 201
 
More
Sweet guide.

Sent from my EVO LTE using XDA Premium app
The Following 3 Users Say Thank You to eyeisdasteve For This Useful Post: [ View ] Gift eyeisdasteve Ad-Free
30th July 2012, 09:02 PM |#7  
LiquidSolstice's Avatar
OP Inactive Recognized Developer
Thanks Meter: 5,215
 
More
If there are any questions, I can do my best to help. il Duce is quite proficient with SVN himself, if you have specific questions about SVN and his ROM, please ask him
The Following 2 Users Say Thank You to LiquidSolstice For This Useful Post: [ View ] Gift LiquidSolstice Ad-Free
30th July 2012, 09:14 PM |#8  
vanessaem's Avatar
Moderator Committee / Senior Moderator / Recognized Themer - Flame Tamer
Flag Missouri City
Thanks Meter: 14,650
 
Donate to Me
More
Quote:
Originally Posted by LiquidSolstice

If there are any questions, I can do my best to help. il Duce is quite proficient with SVN himself, if you have specific questions about SVN and his ROM, please ask him


There's like a hundred members of the team so any one of us should be able to help as well.
The Following 3 Users Say Thank You to vanessaem For This Useful Post: [ View ] Gift vanessaem Ad-Free
DDiaz007
30th July 2012, 11:13 PM |#9  
Guest
Thanks Meter: 0
 
More
Good job on the guide!

Sent from my PG86100 using Tapatalk 2
31st July 2012, 01:17 AM |#10  
Senior Member
Thanks Meter: 478
 
More
okay...how about removing apps? How do I know which ones I can remove without damaging functionality?
31st July 2012, 01:19 AM |#11  
LiquidSolstice's Avatar
OP Inactive Recognized Developer
Thanks Meter: 5,215
 
More
Quote:
Originally Posted by mcwups1

okay...how about removing apps? How do I know which ones I can remove without damaging functionality?

That will be dependent on the ROM itself. If I have time, I may do a completely unrelated thread where I discuss what all the different apks do.
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes