<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CkMNQXwyeSp7ImA9WhRbE0o.&quot;"><id>tag:blogger.com,1999:blog-11585209</id><updated>2012-02-04T16:48:10.291+01:00</updated><category term="android" /><category term="mysql" /><category term="perl" /><title>vorcidel</title><subtitle type="html">Ubuntu, Perl, the Web, the World</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.vorcidel.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.vorcidel.com/" /><author><name>Chad A Davis</name><uri>https://profiles.google.com/108814850707137125759</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-OyR2vylpMZI/AAAAAAAAAAI/AAAAAAABamk/3OxRE99da4Y/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Vorcidel" /><feedburner:info uri="vorcidel" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DEAFSXw5cSp7ImA9WhdWFEQ.&quot;"><id>tag:blogger.com,1999:blog-11585209.post-4037724257698632613</id><published>2011-09-08T17:45:00.000+02:00</published><updated>2011-09-08T17:45:18.229+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-08T17:45:18.229+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mysql" /><title>MySQL shebang</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://en.wikipedia.org/wiki/Shebang_(Unix)" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="142" src="http://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Shebang.svg/321px-Shebang.svg.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;mysql&lt;/span&gt; command line client cannot be used in a script's shebang line like many other languages such as bash and perl and etc allow.&amp;nbsp;Patches have been submitted, but so far none of them have been accepted.&lt;br /&gt;
&lt;br /&gt;
A quick work-around is to create a simple wrapper script like this:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1203684.js?file=mysqlscript"&gt;
&lt;/script&gt;
&lt;br /&gt;
If you make that executable and put it in your &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;PATH&lt;/span&gt;, then you can do something simple like this:&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1203686.js?file=connections.sql"&gt;
&lt;/script&gt;
&lt;br /&gt;
Note that this also allows you pass any additional command line options and they will be passed through to &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;mysql&lt;/span&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;connections.sql -u mysqluser -p&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11585209-4037724257698632613?l=blog.vorcidel.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3i81J2__duKXCNeFNpXxICQZu6M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3i81J2__duKXCNeFNpXxICQZu6M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3i81J2__duKXCNeFNpXxICQZu6M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3i81J2__duKXCNeFNpXxICQZu6M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Vorcidel/~4/rNrOhVN2SyE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.vorcidel.com/feeds/4037724257698632613/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.vorcidel.com/2011/09/mysql-shebang.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/11585209/posts/default/4037724257698632613?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/11585209/posts/default/4037724257698632613?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Vorcidel/~3/rNrOhVN2SyE/mysql-shebang.html" title="MySQL shebang" /><author><name>Chad A Davis</name><uri>https://profiles.google.com/108814850707137125759</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-OyR2vylpMZI/AAAAAAAAAAI/AAAAAAABamk/3OxRE99da4Y/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.vorcidel.com/2011/09/mysql-shebang.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkAHRHo5cSp7ImA9WhZaEks.&quot;"><id>tag:blogger.com,1999:blog-11585209.post-435002363376765794</id><published>2011-06-28T15:45:00.000+02:00</published><updated>2011-06-28T15:45:35.429+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-28T15:45:35.429+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="perl" /><title>Threshold-based clustering in Perl</title><content type="html">There are many scenarios where you need to cluster similar data into groups. I'm working with protein sequences and protein structures and have been using &lt;a href="http://p3rl.org/Algorithm::Cluster"&gt;Algorithm::Cluster&lt;/a&gt; which is a small Perl wrapper (written in &lt;a href="http://en.wikipedia.org/wiki/XS_(Perl)"&gt;Perl XS&lt;/a&gt;) around the &lt;a href="http://bonsai.hgc.jp/~mdehoon/software/cluster/software.htm"&gt;C Clustering Library&lt;/a&gt; which was derived from&lt;span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif;"&gt;&amp;nbsp;"&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;the famous Cluster program originally written by Michael Eisen while at Stanford University", the manual to which can be found here (&lt;a href="http://cpansearch.perl.org/src/MDEHOON/Algorithm-Cluster-1.48/doc/cluster.pdf"&gt;PDF&lt;/a&gt;).&amp;nbsp;&lt;/span&gt;&lt;/span&gt;It supports many types of clusteri&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;ng, "&lt;a href="http://en.wikipedia.org/wiki/Hierarchical_clustering"&gt;hierarchical clustering&lt;/a&gt;&amp;nbsp;&lt;span class="Apple-style-span" style="background-color: white;"&gt;(pairwise simple, complete, average, and centroid linkage), along with &lt;a href="http://en.wikipedia.org/wiki/Cluster_analysis#Partitional_clustering"&gt;k-means and k-medians&lt;/a&gt; clustering, and 2D &lt;a href="http://en.wikipedia.org/wiki/Self_organizing_map"&gt;self-organizing maps&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;."&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;What it lacks, however, is a way to set a distance (or similarity) threshold between objects from different clusters.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;For example, I have a set of protein sequences (which are character strings with some additional attributes) that I'm reading with &lt;a href="http://bioperl.org/"&gt;BioPerl&lt;/a&gt;. &lt;a href="http://p3rl.org/Algorithm::Cluster"&gt;Algorithm::Cluster&lt;/a&gt; will do hierarchical clustering and give me a tree.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;script src="https://gist.github.com/1050912.js"&gt;
 
&lt;/script&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white; font-family: inherit;"&gt;I'm using&amp;nbsp;&lt;a href="http://p3rl.org/Bio::Tools::Run::Alignment::Clustalw"&gt;Bio::Tools::Run::Alignment::Clustalw&lt;/a&gt; to measure the distance between protein sequences. Actually, I'm measuring the similarity, but that's simply the additive inverse. I create a small convenience module&amp;nbsp;&lt;/span&gt;&lt;a href="http://p3rl.org/Algorithm::DistanceMatrix"&gt;Algorithm::DistanceMatrix&lt;/a&gt;&amp;nbsp;that will quickly create the lower diagonal distance matrix required by&amp;nbsp;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;a href="http://p3rl.org/Algorithm::Cluster"&gt;Algorithm::Cluster&lt;/a&gt;&amp;nbsp;just by defining a distance function.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white;"&gt;Now to get clusters out of the tree, we simply do something like:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;script src="https://gist.github.com/1050934.js"&gt;
 
&lt;/script&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white;"&gt;But how do you know how many clusters you want?&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Determining_the_number_of_clusters_in_a_data_set"&gt;Determining the number of clusters in a data set&lt;/a&gt;&amp;nbsp;is a hard problem. If the tree looks like this&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-aoPeIqwrBeM/Tgm4uIcjD3I/AAAAAAABaM8/JVwhCrznI_0/s1600/average-linkage-by-identity-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="223" src="http://3.bp.blogspot.com/-aoPeIqwrBeM/Tgm4uIcjD3I/AAAAAAABaM8/JVwhCrznI_0/s320/average-linkage-by-identity-3.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;you can see that the cut line required to produce three clusters is quite crowded by other nodes in the tree, whereas there is a more natural break in the middle of the tree. Moreover, in general, the type of data that you are clustering will determine how you want to partition your data into clusters.&amp;nbsp;&lt;/span&gt;In this case, I wanted to define clusters such that proteins in one cluster were less than 75% similar (distance &amp;gt; 25) to those in another cluster (according the average linkage metric).&lt;br /&gt;
&lt;br /&gt;
I first asked &lt;a href="http://biostar.stackexchange.com/questions/8500/clustering-in-perl"&gt;this question&lt;/a&gt;&amp;nbsp;on&amp;nbsp;&lt;a href="http://biostar.stackexchange.com/"&gt;Biostar&lt;/a&gt;&amp;nbsp;(&lt;a href="http://stackoverflow.com/"&gt;StackOverflow&lt;/a&gt;&amp;nbsp;for computational biology) before creating a&amp;nbsp;&lt;a href="https://rt.cpan.org/Public/Bug/Display.html?id=68482"&gt;patch&lt;/a&gt;&amp;nbsp; to&amp;nbsp;&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;a href="http://p3rl.org/Algorithm::Cluster"&gt;Algorithm::Cluster&lt;/a&gt;&amp;nbsp;to implement a &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;cutthresh()&lt;/span&gt; method. It's implemented in &lt;a href="http://en.wikipedia.org/wiki/XS_(Perl)"&gt;XS&lt;/a&gt; and should be reasonably efficient, but it has not been reviewed yet. In the meantime, I've created a pure Perl implementation in &lt;a href="http://p3rl.org/Algorithm::Cluster::Thresh"&gt;Algorithm::Cluster::Thresh&lt;/a&gt;&amp;nbsp;that works simply like&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;script src="https://gist.github.com/1050939.js"&gt;
 
&lt;/script&gt;&lt;br /&gt;
Whether with &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;cut()&lt;/span&gt; or with &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;cutthresh()&amp;nbsp;&lt;/span&gt;you can finally have a look at what's in each cluster with something like&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1050954.js"&gt;
 
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Issues can be reported on the GitHub &lt;a href="https://github.com/chadadavis/Algorithm-Cluster-Thresh/issues"&gt;issue tracker&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11585209-435002363376765794?l=blog.vorcidel.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8ODE9R2Kd6Ud09Lx2rVYgYMo2LQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8ODE9R2Kd6Ud09Lx2rVYgYMo2LQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8ODE9R2Kd6Ud09Lx2rVYgYMo2LQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8ODE9R2Kd6Ud09Lx2rVYgYMo2LQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Vorcidel/~4/twZfBrqBqck" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.vorcidel.com/feeds/435002363376765794/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.vorcidel.com/2011/06/threshold-based-clustering-in-perl.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/11585209/posts/default/435002363376765794?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/11585209/posts/default/435002363376765794?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Vorcidel/~3/twZfBrqBqck/threshold-based-clustering-in-perl.html" title="Threshold-based clustering in Perl" /><author><name>Chad A Davis</name><uri>https://profiles.google.com/108814850707137125759</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-OyR2vylpMZI/AAAAAAAAAAI/AAAAAAABamk/3OxRE99da4Y/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-aoPeIqwrBeM/Tgm4uIcjD3I/AAAAAAABaM8/JVwhCrznI_0/s72-c/average-linkage-by-identity-3.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.vorcidel.com/2011/06/threshold-based-clustering-in-perl.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMMRno7cSp7ImA9WhZTEko.&quot;"><id>tag:blogger.com,1999:blog-11585209.post-8511439775715761712</id><published>2011-03-08T23:45:00.002+01:00</published><updated>2011-03-16T13:28:07.409+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-16T13:28:07.409+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="android" /><title>CyanogenMod 6 on the Motorola Milestone</title><content type="html">I was happy to hear that &lt;a href="http://blog.goddchen.de/2010/09/motorola-milestone-android-2-2-froyo-cyanogen-mod-6-1-0-rc0/"&gt;others have gotten a workable Android 2.2 on the Motorola Milestone&lt;/a&gt;, from &lt;a href="http://www.cyanogenmod.com/"&gt;CyanogenMod&lt;/a&gt;. There were a couple little tricks, so I wanted to document those here.&lt;br /&gt;
&lt;br /&gt;
I've had this for &amp;nbsp;a little over a day now, and I'm very happy with the improved performance. The home screen is more responsive, the keyboard is much more responsive that it was with Android 2.1. &amp;nbsp;It's running at 900 Mhz with JIT (just-in-time compilation enabled). (I think Milestone was originally running at around 550 Mhz or so, if I'm not mistaken). I installed "Quandrant" from the market to benchmark it, and its just better than the average Samsung Galaxy S, which is much better than the performance I had on the official 2.1update1 (which was around that of the average "Droid", as you might expect).&lt;br /&gt;
&lt;br /&gt;
CyanogenMod is very customizable. It uses the ADW home app and comes with some very useful utilities, including&amp;nbsp;a clever "Toggle2G" app that allows you to dynamically switch from 3G to 2G when th phone is idle to save battery. &amp;nbsp;I have also installed "Set CPU" from the market, which allows the CPU to be clocked down to about 300 Mhz when it's idle to save battery. I have not done exhaustive battery testing, but I get more than 24 hrs from a single charge when I use the phone occasionally throughout the day (a bit of browsing, phoning, GPS, calendar, etc).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Root it&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The excellent OpenRecovery (&lt;a href="http://modmymobile.com/forums/563-motorola-milestone-roms/531599-open-recovery-v1-46-11-21-2010-a.html"&gt;adapted for Milestone&lt;/a&gt;) is the central tool. Once you've downloaded the zip file to your computer, extract the contents and copy them to your phone (the root directory). This will include the OpenRecovery directory itself, an &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;update.zip&lt;/span&gt;, and an SBF image, titled &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;vulnerable_recovery.sbf&lt;/span&gt;.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Before you can start putting custom firmware (i.e CyanogenMod) on your phone, you need root access. If you already have &amp;nbsp;Android 2.2, or probably even if you have the 2.1update1, your phone is probably not able to be rooted. So, first you have to flash an SBF image that is vulnerable, in order to allow the phone to be rooted. This is that SBF file included in OpenRecovery. Unfortunately, OpenRecovery &lt;a href="http://android.doshaska.net/rootable"&gt;cannot apply the image&lt;/a&gt;. So, I downloaded RSD Lite (from Motorola) for Windows. Start the phone in bootloader mode (Hold the D-pad up button while pressing power, then release power, until "OK to program" appears). Then connect the phone to the computer and start RSD Lite, select the&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;vulnerable_recovery.sbf&lt;/span&gt;&amp;nbsp;that was included in OpenRecovery and flash it to the phone. But, now this is the tricky part, do not let it reboot into Android. RSD Lite will report that the process is only about 40% complete when the phone is already rebooting by itself (and RSD Lite just keeps counting even when the phone is disconnected). Once the phone has powered itself off and back on, disconnect it from the computer and pull the battery immediately. Do not let it reboot.&lt;br /&gt;
&lt;br /&gt;
The reason is that during boot, the Milestone will erase the back door that you've created. So, you need to be sure to boot into recovery mode instead (hold 'x' when powering on, release power and wait for the recovery logo. Then to display the menu, press the volume-up and camera buttons simultaneously). Select the menu option (using the D-pad) to apply the&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;update.zip&lt;/span&gt; (which was from OpenRecovery). This will then load and now you are in the OpenRecovery menu. Take a short breath.&lt;br /&gt;
&lt;br /&gt;
First make a backup of your existing system. Select nandroid from the OpenRecovery menu and make a full backup. You can always restore this backup by booting into OpenRecovery any time in the future. This will get you back to the beginning if you install some new firmware and decide you don't like it.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;Install CyanogenMod&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Go back to the OpenRecovery main menu, select the menu option to root your phone. Now your phone is rooted. It is safe to reboot. You can continue to use whatever firmware was on your phone before. All of your settings are retained at this point, but now you also have root access. If you need to use OpenRecovery again (e.g. to install CyanogenMod), you will &lt;a href="http://modmymobile.com/forums/554-motorola-milestone-development/560035-open-recovery-vanishes-phone-reboot.html"&gt;again need to boot into recovery mode&lt;/a&gt;, do all of the button combinations, apply the&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;update.zip&lt;/span&gt;&amp;nbsp;before you can reach OpenRecovery.&lt;br /&gt;
&lt;br /&gt;
I downloaded the Milestone port of &lt;a href="http://android.doshaska.net/cm6"&gt;CyanogenMod6&lt;/a&gt;&amp;nbsp;(version 7 is apparently not yet recommended for general consumption). This is a zip file, which you should not unzip, but you can rename it to something shorter like &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;update-cm-6.zip&lt;/span&gt;. This file is a backup (made by Nandroid), which you can effectively restore to your phone, thereby installing CyanogenMod6. The &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;boot.img&lt;/span&gt; included does not work with my Milestone kernel, however. So, I had to get &lt;a href="http://code.google.com/p/cyanogenmod4milestone/downloads/list"&gt;the older version&lt;/a&gt; 0.04. Now unzip that &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;bootimg.zip&lt;/span&gt;&amp;nbsp;; you will need to replace the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;boot.img&lt;/span&gt; that is in the CyanogenMod6 zip file. (I simply unzipped, overwrote boot.img and rezipped, but the zip format that I created was not usable.) So, instead, you should simply add the version 0.04 &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;boot.img&lt;/span&gt; to the zip archive (which will overwrite the original boot.img that is in the archive). In Linux (and probably Mac), that's just:&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;zip update-cm-6.zip boot.img&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;Now you're ready to install CyanogedMod6. Copy the now-updated (or actually down-graded) &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;update-cm-6.zip&lt;/span&gt; to your phone into the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/OpenRecovery/updates&lt;/span&gt; directory on your SD card. Reboot the phone into recovery mode (as above) and start OpenRecovery again. Select Nandroid to restore a backup. You will see there your original backup, as well as the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;update-cm-6.zip&lt;/span&gt;, which you can now select to restore, thereby overwriting your old system with the CyanogenMod firmware.&lt;br /&gt;
&lt;br /&gt;
Now CyanogenMod6 is installed, but before rebooting, you should cleanup the phone. OpenRecovery has options on the main menu to clear all the caches on the phone, as well as all of your personal settings, which is recommended (this is the same as Android's "Factory reset"). It's not that much work to reconfigure your applications and will probably make for a smoother experience. Of course, things like bookmarks can easily be restored. Note, it was not necessary for me (in Germany) to backup any of the APN (i.e. mobile network provider) settings.&lt;br /&gt;
&lt;br /&gt;
Now you can restart. You will notice that you have no Google account. Due to copyright restrictions, that is a &lt;a href="http://wiki.cyanogenmod.com/index.php?title=Latest_Version#Google_Apps"&gt;separate download&lt;/a&gt;. Once you've got that zip file, just put it into the same &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/OpenRecovery/updates&lt;/span&gt; folder (do you sense a pattern yet?) and use OpenRecovery to apply it. In fact, I didn't, but you could probably install CyanogenMod6 and the Google apps without rebooting in between, if you simply copy both of the zip files to &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/OpenRecovery/updates&lt;/span&gt; before you even flash the phone with the SBF.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;Issues&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;I haven't tested many things yet: camera, camcorder, bluetooth headphones, but will update if issues come up.&amp;nbsp;I haven't tried flash (it's in the market), but I don't even use that on my laptop, as it kills the battery there already.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;The only issue I've discovered so far is the auto-suggest on the keyboard does not correctly replace words. If you are still typing the word, the auto-suggest list shows alternatives, you can select one, and the word will be correctly replaced. However, if you put the cursor on word farther back in the sentence, alternatives will also be shown. However, selecting an alternative at this point simply inserts the word, in addition to the original word that is still there and does not get deleted.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;I have not, but some have reported that Facebook sync can get stuck and drain the battery. But, you can &amp;nbsp;&lt;a href="http://blog.goddchen.de/2010/10/fix-for-battery-drain-with-cyanogen-mod-cm6-on-the-milestone/"&gt;check it&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
Update: bluetooth headphones are working, at least for music, fine. The new camera app has some nice new features. The camera app itself is responsive. However, starting and leaving the camera app can be slow; I notice this back on Android 2.1 already, though. On one occasion the camera froze the phone and I had to pull the battery, but the problem did not reoccur. This also happened with Android 2.1, though only a couple times in the 1.5 years that I was on Android 2.1. I also had one case where the battery drained (90% to 0%) in less than eight hours in airplane mode. This should not happen, as this mode doesn't send or receive any 3G/2G/wifi/GPS/bluetooth or other signals. This may have been related to an app trying to sync without having a network connection (e.g. the Facebook issue mentioned above). However, this was a one-time incident and I was not able to reproduce the problem. On a side note, the Facebook app in the market was updated today, but that may be unrelated.&lt;br /&gt;
&lt;br /&gt;
Still haven't tested: Phone calls on the bluetooth headset.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11585209-8511439775715761712?l=blog.vorcidel.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LWQOpBZoB8WVaniVvHV5iLErIl8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LWQOpBZoB8WVaniVvHV5iLErIl8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LWQOpBZoB8WVaniVvHV5iLErIl8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LWQOpBZoB8WVaniVvHV5iLErIl8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Vorcidel/~4/_wxMEkEQRls" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.vorcidel.com/feeds/8511439775715761712/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.vorcidel.com/2011/03/cyanogenmod-6-on-motorola-milestone.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/11585209/posts/default/8511439775715761712?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/11585209/posts/default/8511439775715761712?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Vorcidel/~3/_wxMEkEQRls/cyanogenmod-6-on-motorola-milestone.html" title="CyanogenMod 6 on the Motorola Milestone" /><author><name>Chad A Davis</name><uri>https://profiles.google.com/108814850707137125759</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-OyR2vylpMZI/AAAAAAAAAAI/AAAAAAABamk/3OxRE99da4Y/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.vorcidel.com/2011/03/cyanogenmod-6-on-motorola-milestone.html</feedburner:origLink></entry></feed>

