<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>downgrade Archives - Alexandros Georgiou</title>
	<atom:link href="https://www.alexgeorgiou.gr/tag/downgrade/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.alexgeorgiou.gr/tag/downgrade/</link>
	<description>Balancing brackets for a living</description>
	<lastBuildDate>Fri, 04 Oct 2024 10:46:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.alexgeorgiou.gr/wp-content/uploads/2021/07/cropped-alexgeorgiou-icon-32x32.png</url>
	<title>downgrade Archives - Alexandros Georgiou</title>
	<link>https://www.alexgeorgiou.gr/tag/downgrade/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Google Authenticator app 7.0 requires cloud sign-in. Here&#8217;s how to go back to 6.0.</title>
		<link>https://www.alexgeorgiou.gr/revert-google-authenticator-app-to-version-6/</link>
					<comments>https://www.alexgeorgiou.gr/revert-google-authenticator-app-to-version-6/#comments</comments>
		
		<dc:creator><![CDATA[alexg]]></dc:creator>
		<pubDate>Fri, 04 Oct 2024 10:43:37 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[downgrade]]></category>
		<category><![CDATA[Google Authenticator]]></category>
		<category><![CDATA[Huawei]]></category>
		<guid isPermaLink="false">https://www.alexgeorgiou.gr/?p=1717</guid>

					<description><![CDATA[<p>How (and why) I reverted my Google Authenticator to a version that doesn't require sign in.</p>
<p>The post <a href="https://www.alexgeorgiou.gr/revert-google-authenticator-app-to-version-6/">Google Authenticator app 7.0 requires cloud sign-in. Here&#8217;s how to go back to 6.0.</a> appeared first on <a href="https://www.alexgeorgiou.gr">Alexandros Georgiou</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">My backup of 2FA codes failed at the worst time <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f641.png" alt="🙁" class="wp-smiley" style="height: 1em; max-height: 1em;" /></h2>



<p>Being a prudent IT-savvy user, I had exported all my two-factor authentication account data only a few days ago, to an older Android phone that also runs <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&amp;hl=en" target="_blank" rel="noreferrer noopener">Google Authenticator</a>. In fact, I have a calendar reminder to keep this 2FA backup updated, every couple of months. Naturally, I was feeling very safe and smug about it, thinking that I had nothing to worry about.</p>



<p>When I updated my Google Authenticator app to version 7.0, I discovered that the app now requires sign-in to Google. Normally this wouldn&#8217;t be a problem, but my phone is a Huawei phone, and due to the <a href="https://www.reuters.com/article/world/exclusive-google-suspends-some-business-with-huawei-after-trump-blacklist-sou-idUSKCN1SP0N7/" target="_blank" rel="noreferrer noopener">Huawei ban</a>, it cannot connect to Google at the OS level. Instead, I use the Google apps such as Gmail, Calendar and Keep via the <a href="https://brave.com/" target="_blank" rel="noreferrer noopener">Brave browser</a> (Chrome doesn&#8217;t sign in, and Firefox works but much slower). Other than that, it&#8217;s a good phone with a decent camera for its price range, and I&#8217;m happy with it, so I have no reason to change it.</p>



<p>But now, suddenly, I couldn&#8217;t use the Authenticator app, and all my 2FA codes were inaccessible. I immediately retrieved my backup phone from storage, only to find out that the battery had become a <a href="https://www.reddit.com/r/spicypillows/" target="_blank" rel="noreferrer noopener">spicy pillow</a>, and the phone would not start. Aaaargh!</p>



<p>Note that it hadn&#8217;t been more than a few weeks since this backup phone was usable, and I had kept recent backups of my 2FA codes in it. Naturally, I ordered a replacement battery for my backup phone. But this won&#8217;t be here for a few days, and I want access to my online accounts now. </p>



<h2 class="wp-block-heading">Version 7.0: A drastic change. Too drastic, if you ask me!</h2>



<p>My first thought was to look for an older version of the app and install that. Sure enough, looking at the <a href="https://apkpure.com/" target="_blank" rel="noreferrer noopener">APKPure</a>, I found out that version 7.0 has <a href="https://apkpure.com/google-authenticator/com.google.android.apps.authenticator2/download/7.0" target="_blank" rel="noreferrer noopener">this changelog entry</a>:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Cloud syncing: Your Authenticator codes can now be synced to your Google Account and across your devices, so you can always access them even if you lose your phone.</p>
</blockquote>



<p>Wow, thanks Google! That&#8217;s great and all, but unfortunately there is no option to NOT do this. It is not possible to continue using the app without signing in.</p>



<h2 class="wp-block-heading">Downgrading the app from 7.0 to 6.0&#8230;</h2>



<p>So I naturally downloaded version 6.0 from:</p>



<p><a href="https://apkpure.com/google-authenticator/com.google.android.apps.authenticator2/downloading/6.0" target="_blank" rel="noreferrer noopener">https://apkpure.com/google-authenticator/com.google.android.apps.authenticator2/downloading/6.0</a></p>



<p>I got a file named <code>Google Authenticator_6.0_APKPure.apk</code> which I now had to install. But, apparently, it&#8217;s not possible to downgrade Android apps, without first uninstalling the newer version! The Android OS won&#8217;t let you do it. At least not directly.</p>



<p><strong>And I didn&#8217;t want to uninstall the app, because that would presumably delete my 2FA data.</strong></p>



<p>So, what to do?</p>



<p>After some googling, I found out that it&#8217;s possible to install an older version of an Android app via the command line tool <code>adb</code>. I connected the phone to the computer with a USB cable and enabled debug mode.</p>



<p>The command that did the trick:</p>



<pre class="wp-block-code"><code><code>adb install -d Google\ Authenticator_6.0_APKPure.apk</code></code></pre>



<p>And the output I got back:</p>



<pre class="wp-block-code"><code>Performing Streamed Install
Success</code></pre>



<p>The <code>-d</code> option is the one that allows to downgrade the app. Version <code>6.0</code> was installed on my phone, and I regained access to all my 2FA codes.</p>



<p>Hope this helps someone.</p>
<p>The post <a href="https://www.alexgeorgiou.gr/revert-google-authenticator-app-to-version-6/">Google Authenticator app 7.0 requires cloud sign-in. Here&#8217;s how to go back to 6.0.</a> appeared first on <a href="https://www.alexgeorgiou.gr">Alexandros Georgiou</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.alexgeorgiou.gr/revert-google-authenticator-app-to-version-6/feed/</wfw:commentRss>
			<slash:comments>16</slash:comments>
		
		
			</item>
		<item>
		<title>How to migrate trac MySQL-based project from trac 1.0.12 to trac 0.11.7</title>
		<link>https://www.alexgeorgiou.gr/migrate-trac-1-0-12-to-0-11-7/</link>
					<comments>https://www.alexgeorgiou.gr/migrate-trac-1-0-12-to-0-11-7/#respond</comments>
		
		<dc:creator><![CDATA[alexg]]></dc:creator>
		<pubDate>Mon, 13 Mar 2017 20:25:14 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[downgrade]]></category>
		<category><![CDATA[issue tracking]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[trac]]></category>
		<guid isPermaLink="false">http://www.alexgeorgiou.gr/?p=199</guid>

					<description><![CDATA[<p>How to migrate trac project from 1.0.12 to a 0.11.7 installation if your project is MySQL based.</p>
<p>The post <a href="https://www.alexgeorgiou.gr/migrate-trac-1-0-12-to-0-11-7/">How to migrate trac MySQL-based project from trac 1.0.12 to trac 0.11.7</a> appeared first on <a href="https://www.alexgeorgiou.gr">Alexandros Georgiou</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In a world dominated by <a href="https://www.atlassian.com/software/jira" target="_blank" rel="noopener noreferrer"><code>JIRA</code></a>, some still dare to use <a href="https://trac.edgewall.org/" target="_blank" rel="noopener noreferrer"><code>trac</code></a>&#8230; Here&#8217;s how to migrate <code>trac</code> to an earlier version, assuming this was a good idea, which of course it is not!</p>
<h2>Versions</h2>
<p>On my Ubuntu 16 installation (let&#8217;s call it <code>example1.com</code>) I have a project on this version of <code>trac</code>:</p>
<pre>$ lsb_release  -d
Description:    Ubuntu 16.10
$ tracd --version
tracd 1.0.12</pre>
<p>I had good(-ish) reasons to migrate the entire project to a copy on an Ubuntu 10 machine.</p>
<pre>$ lsb_release -d
Description:    Ubuntu 10.04.4 LTS</pre>
<h2>Installing trac</h2>
<p>These are the resources that you need to be aware of:</p>
<ul>
<li><a href="https://trac.edgewall.org/wiki/TracOnUbuntu" target="_blank" rel="noopener noreferrer">https://trac.edgewall.org/wiki/TracOnUbuntu</a></li>
<li><a href="https://trac.edgewall.org/wiki/MySqlDb" target="_blank" rel="noopener noreferrer">https://trac.edgewall.org/wiki/MySqlDb</a></li>
</ul>
<p>I first installed <code>trac</code> via the <code>old-releases.ubuntu.com</code> repository.</p>
<pre>$ sudo apt-get install trac</pre>
<p>This installed an earlier version than the one I had.</p>
<pre class="wiki">$ tracd --version
tracd 0.11.7</pre>
<h2>Setting up the new (old) trac</h2>
<p>Rather than upgrading the entire system with <code>do-release-upgrade</code>, I decided to work with this version.</p>
<p>You will need the <code>python-mysqldb</code> module on <code>example2.com</code> to access a MySQL database. If you&#8217;re using PostgreSQL the procedure <em>should</em> be similar. YMMV.</p>
<pre class="wiki">$ sudo apt-get install python-mysqldb</pre>
<p>First, copy the assets of the project environment. This is a directory tree that you can copy over using <code>rsync</code>.</p>
<pre class="wiki">rsync -r example1.com:/path-to-trac-env example2.com:/path-to-trac-env</pre>
<p>For simplicity we&#8217;ll keep everything the same: file directories, database name and database credentials, although you could change these. Your database settings are in the <code>/path-to-trac-env/conf/trac.ini</code> file. You want the database variable under the <code>[trac]</code> section, which should look something like:</p>
<pre>[trac]

database = mysql://tracuser:tracpassword@localhost:3306/trac-env</pre>
<p>You will want to create an empty MySQL database where your project will live. You will need the MySQL client on <code>example2.com</code>, so if you don&#8217;t have it, install it with:</p>
<pre>sudo apt-get install mysql-client</pre>
<p>You will then want to login as root</p>
<pre>mysql -u root -p</pre>
<p>and create the database, (using the <code>utf8_bin</code> collation)</p>
<pre class="wiki">CREATE DATABASE `trac-env` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;</pre>
<p>and finally create the user:</p>
<pre class="wiki">GRANT ALL ON `trac-env`.* TO tracuser@localhost IDENTIFIED BY 'tracpassword';</pre>
<p>Exit the MySQL client with <code>Ctrl-D</code> and import a standard SQL dump of your database from <code>example1.com</code>. For instance, if you like one-liners, you might do this on <code>example2.com</code>:</p>
<pre class="wiki">ssh example1.com "mysqldump -u tracuser -ptracpassword --single-transaction trac-env | gzip -9" | zcat | mysql -u tracuser -ptracpassword trac-env</pre>
<h2>Nasty hack FTW</h2>
<p>Now start <code>tracd</code> and visit the installation via your web browser. You should see an error like this:</p>
<pre class="wiki"> Trac detected an internal error:

ValueError: timestamp out of range for platform time_t</pre>
<p>This is because all timestamps in this newer version of <code>trac</code> are in microseconds, rather than seconds. Here is <a href="https://trac.edgewall.org/ticket/9314">a (somewhat) relevant ticket</a>.</p>
<p>I went ahead and hacked the DB thusly:</p>
<pre class="wiki">update ignore attachment set time = floor( time / 10000000);
update ignore auth_cookie set time = floor( time / 10000000);
update ignore revision set time = floor( time / 10000000);
update ignore ticket set time = floor( time / 10000000);
update ignore ticket set changetime = floor( changetime / 10000000);
update ignore ticket_change set time = floor( time / 10000000);
update ignore version set time = floor( time / 10000000);
update ignore wiki set time = floor( time / 10000000);</pre>
<p>These are all the timestamp columns in the DB. Dividing by a million converts millionths of a second to seconds and the <code>floor</code> function makes sure that the result is still an integer.</p>
<p>The <code>ignore</code> argument is there only because I had one single collision in one ticket comment. Needless to say, this is a nasty hack, so don&#8217;t rely on it too much.</p>
<p>But, for my purposes, <strong>&#8220;It Works<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" />&#8221;!</strong></p>
<p>The post <a href="https://www.alexgeorgiou.gr/migrate-trac-1-0-12-to-0-11-7/">How to migrate trac MySQL-based project from trac 1.0.12 to trac 0.11.7</a> appeared first on <a href="https://www.alexgeorgiou.gr">Alexandros Georgiou</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.alexgeorgiou.gr/migrate-trac-1-0-12-to-0-11-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
