<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<title>Benjamin Higgins</title>
	<link href="https://www.brhiggins.com/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="https://www.brhiggins.com"/>
	<generator uri="https://www.getzola.org/">Zola</generator>
	<updated>2021-08-16T00:00:00+00:00</updated>
	<id>https://www.brhiggins.com/atom.xml</id>
	<entry xml:lang="en">
		<title>Apply me_cleaner with a CH341A USB programmer (Lenovo ThinkPad T480)</title>
		<published>2021-08-16T00:00:00+00:00</published>
		<updated>2021-08-16T00:00:00+00:00</updated>
		<link href="https://www.brhiggins.com/posts/me-cleaner-thinkpad-t480/" type="text/html"/>
		<id>https://www.brhiggins.com/posts/me-cleaner-thinkpad-t480/</id>
		<content type="html">&lt;h1 id=&quot;overview&quot;&gt;Overview&lt;&#x2F;h1&gt;
&lt;p&gt;I have written &lt;a href=&quot;..&#x2F;me-cleaner-maximus-viii-hero&quot;&gt;a previous blog post&lt;&#x2F;a&gt; about applying
me_cleaner on my motherboard with a removable BIOS chip using a Raspberry Pi. This post
will therefore be a bit more concise to avoid repetition.&lt;&#x2F;p&gt;
&lt;p&gt;My Lenovo ThinkPad T480 does not have a removable BIOS chip, so a SOIC8 clip was needed
instead. This was much easier overall than my experience with my motherboard (see post
linked above), and did not require any fiddling about with combining regions of
different binary files. I used a CH341A USB programmer to avoid having to worry about
wires and timing etc. myself.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;disclaimer&quot;&gt;Disclaimer&lt;&#x2F;h1&gt;
&lt;p&gt;Do this at your own risk. You will void your warranty, you may brick or otherwise break
your laptop. Your computer is your responsibility, not mine.&lt;&#x2F;p&gt;
&lt;p&gt;Read &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;corna&#x2F;me_cleaner&#x2F;wiki&quot;&gt;the wiki&lt;&#x2F;a&gt; before attempting.&lt;&#x2F;p&gt;
&lt;p&gt;You may wish to check &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;corna&#x2F;me_cleaner&#x2F;issues&#x2F;3&quot;&gt;issue #3, &#x27;me_cleaner
status&#x27;&lt;&#x2F;a&gt; and search for your
motherboard&#x2F;laptop details to see if anyone else has reported success&#x2F;failure with the
same hardware as you.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;summary&quot;&gt;Summary&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;Connect the SOIC8 clip to the CH341A programmer and plug in via USB&lt;&#x2F;li&gt;
&lt;li&gt;Read the contents of the chip using &lt;code&gt;flashrom&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Apply &lt;code&gt;me_cleaner -S&lt;&#x2F;code&gt; to delete the ME &lt;em&gt;and&lt;&#x2F;em&gt; set the HAP bit&lt;&#x2F;li&gt;
&lt;li&gt;Write back to the chip&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;section-1-setting-everything-up&quot;&gt;Section 1: setting everything up&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;open-your-laptop-and-disconnect-power&quot;&gt;Open your laptop and disconnect power&lt;&#x2F;h2&gt;
&lt;p&gt;Unscrew and open up your laptop. This may require the use of a pry tool or something,
you should probably look for a video or something on YouTube if this is your first time.&lt;&#x2F;p&gt;
&lt;p&gt;I don&#x27;t know if this is necessary or not, but I figured it would probably be sensible to
connect all power and batteries just to be on the safe side.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;connect-to-the-bios-chip&quot;&gt;Connect to the BIOS chip&lt;&#x2F;h2&gt;
&lt;p&gt;Locate the BIOS chip on your motherboard and connect the SOIC8 clip to it. You will
notice that the clip has a red wire: this indicates where to connect pin 1. Pin 1 is
indicated on the chip by a dot in one corner.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;chip-location.png&quot; alt=&quot;Chip location on motherboard&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;clipped.jpg&quot; alt=&quot;Clip connected to chip&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;connect-to-the-ch341a-programmer&quot;&gt;Connect to the CH341A programmer&lt;&#x2F;h2&gt;
&lt;p&gt;The other end of the wires on the SOIC8 clip need to connect to the CH341A programmer.&lt;&#x2F;p&gt;
&lt;p&gt;One side of the top of the programmer has a small diagram which indicates which socket
to use depending on whether you have a 25XX or 24XX chip. This should be somewhere in
the name written on the chip itself, or in the datasheet if you look up the part number
written on the chip.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;chip-version-diagram.png&quot; alt=&quot;Chip version diagram&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;In my case the chip is a W25Q128JV, i.e. 25 series, so I connect it in the left hand
side of the socket. The dot on the diagram indicates where to connect wire 1.&lt;&#x2F;p&gt;
&lt;p&gt;Plug the USB in to another computer (you can&#x27;t use the same one that you&#x27;re flashing,
obviously!) and the POWER LED should turn on.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;fully-connected.png&quot; alt=&quot;CH341A fully connected&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;interface-with-the-chip&quot;&gt;Interface with the chip&lt;&#x2F;h2&gt;
&lt;p&gt;We are going to use &lt;code&gt;flashrom&lt;&#x2F;code&gt; to interface with the chip. Make sure it is installed. We
need to specify &lt;code&gt;--programmer ch341a_spi&lt;&#x2F;code&gt; to tell it that we&#x27;re using a CH341A.&lt;&#x2F;p&gt;
&lt;p&gt;Test if the chip is detected by running without any other options. Look for output that
indicates that the chip is found.
&lt;code&gt;flashrom -programmer ch341a_spi&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;section-2-removing-the-me&quot;&gt;Section 2: removing the ME&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;extract-the-existing-bios-image&quot;&gt;Extract the existing BIOS image&lt;&#x2F;h2&gt;
&lt;p&gt;Read the contents of the chip:
&lt;code&gt;flashrom --programmer ch341a_spi -r extracted.bin&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;This will take a while and look like it&#x27;s doing nothing. Just let it do it&#x27;s thing! DO
NOT unplug it!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Back this file up&lt;&#x2F;strong&gt;. This is your recovery file if your modified image doesn&#x27;t work or
bricks your motherboard.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;apply-me-cleaner&quot;&gt;Apply me_cleaner&lt;&#x2F;h2&gt;
&lt;p&gt;Make sure you&#x27;ve read &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;corna&#x2F;me_cleaner&#x2F;wiki&#x2F;How-to-apply-me_cleaner&quot;&gt;How to apply
me_cleaner&lt;&#x2F;a&gt; on the
me_cleaner wiki, so that you know what you&#x27;re doing.&lt;&#x2F;p&gt;
&lt;p&gt;I found that the &#x27;full&#x27; application with &lt;code&gt;-S&lt;&#x2F;code&gt; worked fine for me:
&lt;code&gt;python me_cleaner.py -S -O modified.bin extracted.bin&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Verify that the ME is removed from the image&lt;&#x2F;strong&gt; by following the relevant steps in the
wiki guide &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;corna&#x2F;me_cleaner&#x2F;wiki&#x2F;Get-the-status-of-Intel-ME&quot;&gt;Get the status of Intel
ME&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;flash-your-modified-image-back-to-the-chip&quot;&gt;Flash your modified image back to the chip&lt;&#x2F;h2&gt;
&lt;p&gt;Up until this point you haven&#x27;t modified anything on your motherboard, so no damage
done. This is the part where you can brick your motherboard! Make sure you understand
the risk and accept what you&#x27;re doing.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Make sure you have your original extracted.bin&lt;&#x2F;strong&gt;. If things go wrong, you can just flash it back with the
same command.&lt;&#x2F;p&gt;
&lt;p&gt;Flash the modified image with the command&lt;br &#x2F;&gt;
&lt;code&gt;flashrom --programmer ch341a_spi -w merged.extracted.bin&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;This will take a while and look like it&#x27;s doing nothing. Just let it do it&#x27;s thing! DO
NOT unplug it!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-it&quot;&gt;Test it&lt;&#x2F;h2&gt;
&lt;p&gt;When it&#x27;s done, unplug the SOIC8 clip. Connect the power up again, replace the case, and
power on the laptop.&lt;&#x2F;p&gt;
&lt;p&gt;If all worked then when entering the BIOS you should be able to see that the &#x27;ME
Firmware Version&#x27; field is empty.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;bios-me-missing.png&quot; alt=&quot;Empty ME Firmware Version in BIOS&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Boot into your OS (I&#x27;m using Linux) and follow the wiki steps to validate that the ME is
gone: &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;corna&#x2F;me_cleaner&#x2F;wiki&#x2F;Get-the-status-of-Intel-ME&quot;&gt;Get the status of Intel
ME&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;If all has gone well, your laptop should work as normal, and the ME should be gone! If
not, you can flash back your original &lt;code&gt;extracted.bin&lt;&#x2F;code&gt; to return to the original state.&lt;&#x2F;p&gt;
&lt;p&gt;You can also try me_cleaner with the &lt;code&gt;-s&lt;&#x2F;code&gt; option instead, as &lt;code&gt;-S&lt;&#x2F;code&gt; will not work for
everyone.&lt;&#x2F;p&gt;
</content>
	</entry>
	<entry xml:lang="en">
		<title>Configure notmuch + NeoMutt with multiple ProtonMail accounts</title>
		<published>2021-06-30T00:00:00+00:00</published>
		<updated>2021-06-30T00:00:00+00:00</updated>
		<link href="https://www.brhiggins.com/posts/protonmail-mbsync-notmuch-neomutt/" type="text/html"/>
		<id>https://www.brhiggins.com/posts/protonmail-mbsync-notmuch-neomutt/</id>
		<content type="html">&lt;p&gt;I have found a good offline terminal-based email solution which I am happy with. My
requirements were as follows:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Emails stored on my hard drive in a sensible format&lt;&#x2F;li&gt;
&lt;li&gt;Synchronisation of read and deleted status&lt;&#x2F;li&gt;
&lt;li&gt;Terminal client for reading&#x2F;browsing email&lt;&#x2F;li&gt;
&lt;li&gt;Multiple email accounts all appear in one list&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Limitation:&lt;&#x2F;strong&gt; I have not yet come up with a solution for &lt;em&gt;sending&lt;&#x2F;em&gt; mail from multiple
accounts with my current approach. I don&#x27;t send much email, so I just do that from the
web UI when I need to.&lt;&#x2F;p&gt;
&lt;p&gt;In my search for a solution I tried &lt;a href=&quot;http:&#x2F;&#x2F;www.mutt.org&#x2F;&quot;&gt;mutt&lt;&#x2F;a&gt;,
&lt;a href=&quot;https:&#x2F;&#x2F;neomutt.org&#x2F;&quot;&gt;NeoMutt&lt;&#x2F;a&gt;, &lt;a href=&quot;http:&#x2F;&#x2F;sup-heliotrope.github.io&#x2F;&quot;&gt;sup&lt;&#x2F;a&gt;, and
&lt;a href=&quot;https:&#x2F;&#x2F;aerc-mail.org&#x2F;&quot;&gt;aerc&lt;&#x2F;a&gt; all for a period each. The only email client which
actually offered all the features I was after straight out of the box was
&lt;a href=&quot;http:&#x2F;&#x2F;sup-heliotrope.github.io&#x2F;&quot;&gt;sup&lt;&#x2F;a&gt;, so it&#x27;s probably worth you checking that out.&lt;&#x2F;p&gt;
&lt;p&gt;I stuck with sup for a while, but eventually gave up on it. It crashed a lot, required
various ruby packages to be installed, required pinning certain versions, and various
other fixing. One day it stopped displaying my mail entirely, and I decided I couldn&#x27;t
really be bothered to fix it again, so I started my search back up.&lt;&#x2F;p&gt;
&lt;p&gt;I believe I have discovered my perfect solution using a combination of &lt;a href=&quot;https:&#x2F;&#x2F;notmuchmail.org&#x2F;&quot;&gt;notmuch&lt;&#x2F;a&gt; and
&lt;a href=&quot;https:&#x2F;&#x2F;neomutt.org&#x2F;&quot;&gt;NeoMutt&lt;&#x2F;a&gt;. NeoMutt is rather a pain to configure and not obvious in any way in my
view, so I&#x27;m sure there&#x27;s a lot more configuration I could do to make it better, but I
have the bones of what works, which I will share&lt;&#x2F;p&gt;
&lt;p&gt;ProtonMail provides a couple of synchronisation challenges on it&#x27;s own, due to the level
of IMAP feature support offered by &lt;a href=&quot;https:&#x2F;&#x2F;protonmail.com&#x2F;bridge&#x2F;&quot;&gt;ProtonMail Bridge&lt;&#x2F;a&gt;.
I will cover that too.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;protonmail-and-mbsync&quot;&gt;ProtonMail and mbsync&lt;&#x2F;h2&gt;
&lt;p&gt;Install &lt;a href=&quot;https:&#x2F;&#x2F;protonmail.com&#x2F;bridge&#x2F;&quot;&gt;ProtonMail Bridge&lt;&#x2F;a&gt; and configure it with your mail accounts.&lt;&#x2F;p&gt;
&lt;p&gt;Install &lt;a href=&quot;https:&#x2F;&#x2F;isync.sourceforge.io&#x2F;&quot;&gt;mbsync&#x2F;isync&lt;&#x2F;a&gt;. This will be used to synchronise
all your mail into files in the &lt;a href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Maildir&quot;&gt;Maildir format&lt;&#x2F;a&gt;
on your local machine. &lt;&#x2F;p&gt;
&lt;p&gt;You need to configure your &lt;code&gt;~&#x2F;.mbsyncrc&lt;&#x2F;code&gt;. Here is where there are some limitations
with ProtonMail. &lt;&#x2F;p&gt;
&lt;p&gt;ProtonMail provides you with two stores that you can use to read your inbox: &#x27;All Mail&#x27;
or &#x27;INBOX&#x27; (these can be viewed within the browser as well).&lt;&#x2F;p&gt;
&lt;p&gt;I first tried syncing &#x27;All Mail&#x27; so that everything would be synced even if it&#x27;s in a
folder on the remote. This has a problem however, and it is to do with deletion.
ProtonMail Bridge does not appear to support the &lt;em&gt;deletion&lt;&#x2F;em&gt; of mail from the &#x27;All
Mail&#x27; folder. If you delete something on your local machine, mbsync will give you error
messages when you try and sync it back.&lt;&#x2F;p&gt;
&lt;p&gt;You need to sync &#x27;INBOX&#x27; instead, however this has different weird behaviour with
deletion. The deletion will propogate, but the mail will remain in the &#x27;All Mail&#x27;
folder. It won&#x27;t go to the &#x27;Trash&#x27;. This leaves your deleted mail in a weird state where
it is still in your &#x27;All Mail&#x27;, but you have no way to filter or search for it, even
from the web UI.&lt;&#x2F;p&gt;
&lt;p&gt;The solution is to sync &#x27;INBOX&#x27;, and also sync the &#x27;Trash&#x27; folder separately. Then we
can configure mbsync to move emails to the trash folder when deleted, so they end up in
the &#x27;Trash&#x27; on the remote side.&lt;&#x2F;p&gt;
&lt;p&gt;There appears to be no way to permanently delete email from the remote via the bridge.&lt;&#x2F;p&gt;
&lt;p&gt;This solution also requires that your email &lt;em&gt;client&lt;&#x2F;em&gt; be configured to handle the
&#x27;deletion&#x27; of emails in the correct way. What &lt;em&gt;won&#x27;t&lt;&#x2F;em&gt; work is if your email client just
deletes the file locally, as we need the &#x27;deleted&#x27; email to be moved to the trash
folder. The solution for this is to have a mail client that sets the MailDir &#x27;T&#x27;
(Trashed) flag on the mail, and then let mbsync take it from there.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#282828;color:#fdf4c1aa;&quot;&gt;&lt;code&gt;&lt;span&gt;# The local mail store
&lt;&#x2F;span&gt;&lt;span&gt;MaildirStore protonmail-personal-local
&lt;&#x2F;span&gt;&lt;span&gt;# Put it wherever you like
&lt;&#x2F;span&gt;&lt;span&gt;Path ~&#x2F;mail&#x2F;protonmail-personal&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;# The inbox folder needs to be absolute, for some reason
&lt;&#x2F;span&gt;&lt;span&gt;Inbox ~&#x2F;mail&#x2F;protonmail-personal&#x2F;inbox
&lt;&#x2F;span&gt;&lt;span&gt;# Tell mbsync where to put trashed emails after expunging
&lt;&#x2F;span&gt;&lt;span&gt;Trash trash
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# The IMAP details for ProtonMail Bridge
&lt;&#x2F;span&gt;&lt;span&gt;IMAPAccount protonmail-personal-imap
&lt;&#x2F;span&gt;&lt;span&gt;Host 127.0.0.1
&lt;&#x2F;span&gt;&lt;span&gt;Port 1143
&lt;&#x2F;span&gt;&lt;span&gt;User personal@protonmail.com
&lt;&#x2F;span&gt;&lt;span&gt;PassCmd &amp;quot;&#x2F;usr&#x2F;bin&#x2F;pass protonmail-personal&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;SSLType STARTTLS
&lt;&#x2F;span&gt;&lt;span&gt;CertificateFile &#x2F;etc&#x2F;ssl&#x2F;certs&#x2F;protonmail-bridge.pem
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Specify that a store exists on the protonmail IMAP account
&lt;&#x2F;span&gt;&lt;span&gt;IMAPStore protonmail-personal-remote
&lt;&#x2F;span&gt;&lt;span&gt;Account protonmail-personal-imap
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Configure the local-remote inbox connection
&lt;&#x2F;span&gt;&lt;span&gt;Channel protonmail-personal-inbox
&lt;&#x2F;span&gt;&lt;span&gt;# Specify the remote INBOX folder
&lt;&#x2F;span&gt;&lt;span&gt;Master  :protonmail-personal-remote:INBOX
&lt;&#x2F;span&gt;&lt;span&gt;# Specify the local folder, the &amp;#39;Inbox&amp;#39; will be used by default
&lt;&#x2F;span&gt;&lt;span&gt;Slave :protonmail-personal-local:
&lt;&#x2F;span&gt;&lt;span&gt;# We want the mail gone from the local and remote inboxes
&lt;&#x2F;span&gt;&lt;span&gt;# It will be moved to the &amp;#39;Trash&amp;#39; folder configured above
&lt;&#x2F;span&gt;&lt;span&gt;Expunge Both
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Configure the local-remote trash connection
&lt;&#x2F;span&gt;&lt;span&gt;Channel protonmail-personal-trash
&lt;&#x2F;span&gt;&lt;span&gt;Master :protonmail-personal-remote:Trash
&lt;&#x2F;span&gt;&lt;span&gt;Slave :protonmail-personal-local:trash
&lt;&#x2F;span&gt;&lt;span&gt;# Make sure you don&amp;#39;t expunge here, as mbsync will just expunge
&lt;&#x2F;span&gt;&lt;span&gt;# straight back into the trash folder!
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Configure the local-remote sent connection
&lt;&#x2F;span&gt;&lt;span&gt;Channel protonmail-personal-sent
&lt;&#x2F;span&gt;&lt;span&gt;Master  :protonmail-personal-remote:Sent
&lt;&#x2F;span&gt;&lt;span&gt;Slave :protonmail-personal-local:sent
&lt;&#x2F;span&gt;&lt;span&gt;Expunge Both
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Any other ProtonMail accounts you have should be configured in the same way.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;systemd-service-timer&quot;&gt;Systemd service&#x2F;timer&lt;&#x2F;h3&gt;
&lt;p&gt;Create a systemd service and timer to sync your mail periodically.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;~&#x2F;.config&#x2F;systemd&#x2F;user&#x2F;mbsync.service&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#282828;color:#fdf4c1aa;&quot;&gt;&lt;code&gt;&lt;span&gt;[Unit]
&lt;&#x2F;span&gt;&lt;span&gt;Description=mbsync
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;[Service]
&lt;&#x2F;span&gt;&lt;span&gt;Type=oneshot
&lt;&#x2F;span&gt;&lt;span&gt;ExecStart=&#x2F;usr&#x2F;bin&#x2F;mbsync -Va
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;~&#x2F;.config&#x2F;systemd&#x2F;user&#x2F;mbsync.timer&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;systemd&quot; style=&quot;background-color:#282828;color:#fdf4c1aa;&quot; class=&quot;language-systemd &quot;&gt;&lt;code class=&quot;language-systemd&quot; data-lang=&quot;systemd&quot;&gt;&lt;span&gt;[Unit]
&lt;&#x2F;span&gt;&lt;span&gt;Description=mbsync timer
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;[Timer]
&lt;&#x2F;span&gt;&lt;span&gt;OnBootSec=1m
&lt;&#x2F;span&gt;&lt;span&gt;OnUnitActiveSec=15m
&lt;&#x2F;span&gt;&lt;span&gt;Unit=mbsync.service
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;[Install]
&lt;&#x2F;span&gt;&lt;span&gt;WantedBy=timers.target
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Enable and start them with &lt;code&gt;systemctl --user enable --now mbsync.timer&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;notmuch&quot;&gt;Notmuch&lt;&#x2F;h2&gt;
&lt;p&gt;This step is optional if you don&#x27;t care about having multiple accounts visible together.&lt;&#x2F;p&gt;
&lt;p&gt;The limitation with NeoMutt by default is that it just displays one MailDir at a time,
and doesn&#x27;t provide a function to merge them into a single view (not that I know of
anyway). The solution is to use &lt;a href=&quot;https:&#x2F;&#x2F;notmuchmail.org&#x2F;&quot;&gt;notmuch&lt;&#x2F;a&gt; to index your mail.
NeoMutt has support for using notmuch as an indexer.&lt;&#x2F;p&gt;
&lt;p&gt;You basically just need to install notmuch and run through &lt;a href=&quot;https:&#x2F;&#x2F;notmuchmail.org&#x2F;getting-started&#x2F;&quot;&gt;their Getting Started
guide&lt;&#x2F;a&gt;. Index all the accounts you want and
play around with the tags and stuff.&lt;&#x2F;p&gt;
&lt;p&gt;New emails need to be tagged as &#x27;inbox&#x27; after being downloaded by mbsync. Modify your
&lt;code&gt;mbsync.service&lt;&#x2F;code&gt; to add the following&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#282828;color:#fdf4c1aa;&quot;&gt;&lt;code&gt;&lt;span&gt;ExecStart=&#x2F;usr&#x2F;bin&#x2F;mbsync -Va
&lt;&#x2F;span&gt;&lt;span&gt;ExecStartPost=&#x2F;usr&#x2F;bin&#x2F;notmuch new
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;neomutt&quot;&gt;NeoMutt&lt;&#x2F;h2&gt;
&lt;p&gt;NeoMutt can be a pain to configure, but once you work out what to do it doesn&#x27;t require
too many configuration options to get the bare bones working. Especially when you&#x27;re
already syncing with mbsync and indexing with notmuch, so we can bypass all of NeoMutt&#x27;s
features in those areas.&lt;&#x2F;p&gt;
&lt;p&gt;Create your &lt;code&gt;~&#x2F;.config&#x2F;neomutt&#x2F;neomuttrc&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#282828;color:#fdf4c1aa;&quot;&gt;&lt;code&gt;&lt;span&gt;# Not actually relevant in this case, but NeoMutt requires it to be set
&lt;&#x2F;span&gt;&lt;span&gt;set folder = ~&#x2F;mail 
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Specify a notmuch query to use as your NeoMutt &amp;#39;Inbox&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;# Include the sent tag if you want NeoMutt&amp;#39;s threading feature
&lt;&#x2F;span&gt;&lt;span&gt;virtual-mailboxes &amp;quot;inbox&amp;quot; &amp;quot;notmuch:&#x2F;&#x2F;?query=tag:inbox or tag:sent&amp;quot; 
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Limit the notmuch query to the last 30 days
&lt;&#x2F;span&gt;&lt;span&gt;# Without this, neomutt&amp;#39;s startup time will grow as the size of your mailbox does
&lt;&#x2F;span&gt;&lt;span&gt;set nm_query_window_duration = 30
&lt;&#x2F;span&gt;&lt;span&gt;set nm_query_window_timebase = day
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Specify that the mail should be read from the above virtual mailbox
&lt;&#x2F;span&gt;&lt;span&gt;set spoolfile = inbox 
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Set the name to send from
&lt;&#x2F;span&gt;&lt;span&gt;set realname = &amp;quot;Benjamin Higgins&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# You have to pick one email address as default
&lt;&#x2F;span&gt;&lt;span&gt;set from = &amp;quot;personal@protonmail.com&amp;quot; 
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Specify other email addresses to consider as yours
&lt;&#x2F;span&gt;&lt;span&gt;# This affects replies and threading highlighting
&lt;&#x2F;span&gt;&lt;span&gt;# Regex is supported, useful for plus addressing
&lt;&#x2F;span&gt;&lt;span&gt;alternates &amp;quot;personal+?.*@protonmail.com&amp;quot; &amp;quot;work@protonmail.com&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Specify that you want to reply from the address received to
&lt;&#x2F;span&gt;&lt;span&gt;set reverse_name = yes
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Allow headers to be edited so you can edit from address
&lt;&#x2F;span&gt;&lt;span&gt;set edit_headers = yes 
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Specify that deletion shouldn&amp;#39;t actually delete the file,
&lt;&#x2F;span&gt;&lt;span&gt;# just set the &amp;#39;T&amp;#39; (Trashed) flag on it; mbsync will handle the rest
&lt;&#x2F;span&gt;&lt;span&gt;set maildir_trash = yes 
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# --- OPTIONAL ---
&lt;&#x2F;span&gt;&lt;span&gt;# Sort first by thread, then by date 
&lt;&#x2F;span&gt;&lt;span&gt;set sort = threads 
&lt;&#x2F;span&gt;&lt;span&gt;set sort_aux = reverse-last-date-received 
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Prevent scrolling up&#x2F;down opening the next email
&lt;&#x2F;span&gt;&lt;span&gt;set pager_stop = yes # Prevent scrolling down opening the next email
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# HTML mail handling, see https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;mutt#Viewing_HTML
&lt;&#x2F;span&gt;&lt;span&gt;set mailcap_path = ~&#x2F;.config&#x2F;neomutt&#x2F;mailcap
&lt;&#x2F;span&gt;&lt;span&gt;auto_view text&#x2F;html # Auto convert HTML emails
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Set the column format in the index view
&lt;&#x2F;span&gt;&lt;span&gt;set index_format = &amp;quot;%2C %Z %d %-15.15F %s (%-4.4c)&amp;quot; 
&lt;&#x2F;span&gt;&lt;span&gt;set date_format = &amp;quot;%m&#x2F;%d %I:%M&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;At this point you should have a basic barebones setup for reading mail from multiple
accounts offline in NeoMutt, with threading view.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;next-steps&quot;&gt;Next steps&lt;&#x2F;h2&gt;
&lt;p&gt;You may wish to have notmuch tag your sent mail as such. This doesn&#x27;t affect NeoMutt
integration, but it useful if you want to use notmuch&#x27;s more complex indexing features.
You could add this as another &lt;code&gt;ExecStartPost&lt;&#x2F;code&gt; in your &lt;code&gt;mbsync.service&lt;&#x2F;code&gt;.&lt;br &#x2F;&gt;
&lt;code&gt;notmuch tag -new -inbox +sent -- from:&amp;quot;&#x2F;personal\+?.*@protonmail.com&#x2F;&amp;quot; or from:work@protonmail.com&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;You can configure keybinds and colourschemes in Mutt. I use the &lt;a href=&quot;https:&#x2F;&#x2F;neomutt.org&#x2F;contrib&#x2F;vim-keys&quot;&gt;Vi
keybinds&lt;&#x2F;a&gt;. You may need to hunt around for the
&lt;code&gt;vim-keys.rc&lt;&#x2F;code&gt; file on your system; mine was at &lt;code&gt;a&lt;&#x2F;code&gt;. I like the &lt;a href=&quot;https:&#x2F;&#x2F;www.sthu.org&#x2F;code&#x2F;codesnippets&#x2F;mutt-gruvbox.html&quot;&gt;gruvbox
colourscheme&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;sending-mail&quot;&gt;Sending mail&lt;&#x2F;h2&gt;
&lt;p&gt;I very rarely send mail, so I haven&#x27;t made it a priority to figure out how to do this
properly. It isn&#x27;t hard to get a simple setup for sending from one account with NeoMutt
and &lt;a href=&quot;https:&#x2F;&#x2F;marlam.de&#x2F;msmtp&#x2F;&quot;&gt;msmtp&lt;&#x2F;a&gt;, but different accounts per email address becomes
a little more complex. At the moment I just log into the browser on the few occasions I
need to actually send email!&lt;&#x2F;p&gt;
</content>
	</entry>
	<entry xml:lang="en">
		<title>Apply me_cleaner with a Raspberry Pi (Asus Maximus VIII Hero) </title>
		<published>2021-06-25T00:00:00+00:00</published>
		<updated>2021-06-25T00:00:00+00:00</updated>
		<link href="https://www.brhiggins.com/posts/me-cleaner-maximus-viii-hero/" type="text/html"/>
		<id>https://www.brhiggins.com/posts/me-cleaner-maximus-viii-hero/</id>
		<content type="html">&lt;h1 id=&quot;overview&quot;&gt;Overview&lt;&#x2F;h1&gt;
&lt;p&gt;I was successfully able to apply &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;corna&#x2F;me_cleaner&quot;&gt;me_cleaner&lt;&#x2F;a&gt; on my
Asus Maximus VIII Hero Alpha motherboard with an i7-6700k, though with some difficulty.
I will walk you through the steps I followed to successfully remove the ME from my
motherboard.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;disclaimer&quot;&gt;Disclaimer&lt;&#x2F;h1&gt;
&lt;p&gt;Do this at your own risk. You will void your warranty, you may brick or otherwise break
your PC. Your computer is your responsibility, not mine.&lt;&#x2F;p&gt;
&lt;p&gt;Read &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;corna&#x2F;me_cleaner&#x2F;wiki&quot;&gt;the wiki&lt;&#x2F;a&gt; before attempting.&lt;&#x2F;p&gt;
&lt;p&gt;You may wish to check &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;corna&#x2F;me_cleaner&#x2F;issues&#x2F;3&quot;&gt;issue #3, &#x27;me_cleaner
status&#x27;&lt;&#x2F;a&gt; and search for your
motherboard&#x2F;laptop details to see if anyone else has reported success&#x2F;failure with the
same hardware as you.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;summary&quot;&gt;Summary&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;operating-modes&quot;&gt;Operating modes&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;me_cleaner&lt;&#x2F;code&gt; with no options will delete the ME&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;me_cleaner -s&lt;&#x2F;code&gt; will set the &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;corna&#x2F;me_cleaner&#x2F;wiki&#x2F;HAP-AltMeDisable-bit&quot;&gt;HAP
bit&lt;&#x2F;a&gt; only&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;me_cleaner -S&lt;&#x2F;code&gt; will delete the ME &lt;em&gt;and&lt;&#x2F;em&gt; set the HAP bit&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;bios-image&quot;&gt;BIOS image&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;The BIOS can be extracted directly from the chip with &lt;code&gt;flashrom&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;A &#x27;clean&#x27; version of the BIOS can be sourced from Asus&#x27; website&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;applying-me-cleaner&quot;&gt;Applying me_cleaner&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;my-problem&quot;&gt;My problem&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;me_cleaner -S&lt;&#x2F;code&gt; resulted in my PC failing to POST regardless of the BIOS source&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;me_cleaner&lt;&#x2F;code&gt; (no options) worked on Asus&#x27; image, but not my extracted image&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;me_cleaner -s&lt;&#x2F;code&gt; worked on my extracted image, but not on Asus&#x27; image&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;eventual-solution&quot;&gt;Eventual solution&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Apply &lt;code&gt;me_cleaner&lt;&#x2F;code&gt; (no options) on the official image&lt;&#x2F;li&gt;
&lt;li&gt;Apply &lt;code&gt;me_cleaner -s&lt;&#x2F;code&gt; on my extracted image&lt;&#x2F;li&gt;
&lt;li&gt;Use &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;LongSoft&#x2F;UEFITool&quot;&gt;UEFITool&lt;&#x2F;a&gt; to merge the two&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;section-1-setting-everything-up&quot;&gt;Section 1: setting everything up&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;connect-bios-chip&quot;&gt;Connect BIOS chip&lt;&#x2F;h2&gt;
&lt;p&gt;Remove the chip from the motherboad; be careful, it&#x27;s easy to accidentally bend the pins!
&lt;img src=&quot;chip-location-photo.png&quot; alt=&quot;Chip location on motherboard&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I believe that all BIOS chips have the same pin layout, but it might be a good idea to
find the datasheet for your specific chip (check the name written on it) to be sure. I
found the datasheet for my Winbond 25Q128FV1Q, which showed the following layout.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;pin-layout.png&quot; alt=&quot;Pin layout&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Plug the chip into a breadboard and connect to the following GPIO pins on your Raspberry
Pi. You may find &lt;a href=&quot;https:&#x2F;&#x2F;pinout.xyz&#x2F;&quot;&gt;pinout.xyz&lt;&#x2F;a&gt; useful to check which pin is which.&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Chip num&lt;&#x2F;th&gt;&lt;th&gt;Chip name&lt;&#x2F;th&gt;&lt;th&gt;GPIO name&lt;&#x2F;th&gt;&lt;th&gt;Pin num&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;1&lt;&#x2F;td&gt;&lt;td&gt;CS&lt;&#x2F;td&gt;&lt;td&gt;GPIO 8 (SPIO CE0)&lt;&#x2F;td&gt;&lt;td&gt;24&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;2&lt;&#x2F;td&gt;&lt;td&gt;DO (Data Out)&lt;&#x2F;td&gt;&lt;td&gt;GPIO 9 (SPIO MISO)&lt;&#x2F;td&gt;&lt;td&gt;21&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;3&lt;&#x2F;td&gt;&lt;td&gt;WP&lt;&#x2F;td&gt;&lt;td&gt;3v3 Power&lt;&#x2F;td&gt;&lt;td&gt;17&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;4&lt;&#x2F;td&gt;&lt;td&gt;Ground&lt;&#x2F;td&gt;&lt;td&gt;Ground&lt;&#x2F;td&gt;&lt;td&gt;25&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;DI (Data In)&lt;&#x2F;td&gt;&lt;td&gt;GPIO 10 (SPIO MOSI)&lt;&#x2F;td&gt;&lt;td&gt;19&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;6&lt;&#x2F;td&gt;&lt;td&gt;CLK&lt;&#x2F;td&gt;&lt;td&gt;GPIO 11 (SPIO SCLK)&lt;&#x2F;td&gt;&lt;td&gt;23&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;7&lt;&#x2F;td&gt;&lt;td&gt;HOLD&lt;&#x2F;td&gt;&lt;td&gt;3v3 Power&lt;&#x2F;td&gt;&lt;td&gt;17&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;8&lt;&#x2F;td&gt;&lt;td&gt;VCC&lt;&#x2F;td&gt;&lt;td&gt;3v3 Power&lt;&#x2F;td&gt;&lt;td&gt;17&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;&lt;strong&gt;Use 3.3V for VCC!&lt;&#x2F;strong&gt; 5V will damage the chip.&lt;&#x2F;p&gt;
&lt;p&gt;You will notice that 3 pins need to be connected to VCC; WP and HOLD are &#x27;pulled up&#x27;.
You will need to use the connections on your breadboard to achieve this.&lt;&#x2F;p&gt;
&lt;p&gt;MISO and MOSI correspond to Master In Slave Out and vice versa, if you were wondering.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;enable-spio-in-your-raspberry-pi&quot;&gt;Enable SPIO in your Raspberry Pi&lt;&#x2F;h2&gt;
&lt;p&gt;SPIO interfacing seems to be turned off by default! Make sure you turn it on. You can
follow &lt;a href=&quot;https:&#x2F;&#x2F;www.raspberrypi-spy.co.uk&#x2F;2014&#x2F;08&#x2F;enabling-the-spi-interface-on-the-raspberry-pi&#x2F;&quot;&gt;this useful
guide&lt;&#x2F;a&gt;
to find out how.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;interface-with-the-chips&quot;&gt;Interface with the chips&lt;&#x2F;h2&gt;
&lt;p&gt;Make sure you have &lt;code&gt;flashrom&lt;&#x2F;code&gt; installed. Use the following command to test if your chip
is detected.
&lt;code&gt;flashrom -p linux_spi:dev=&#x2F;dev&#x2F;spidev0.0,spispeed=8000&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;We invoke &lt;code&gt;flashrom&lt;&#x2F;code&gt; and use &lt;code&gt;-p&lt;&#x2F;code&gt; to specify the programmer we want to use is
&lt;code&gt;linux_spi&lt;&#x2F;code&gt;. We then specify the SPI device we want to interface with, and the speed we
want to use.&lt;&#x2F;p&gt;
&lt;p&gt;I had no idea what speed to use and couldn&#x27;t find concrete guidance online. I found that
8000 worked consistently, so I stuck with that.&lt;&#x2F;p&gt;
&lt;p&gt;You can add on &lt;code&gt;-V&lt;&#x2F;code&gt; for verbose output if you like.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;troubleshooting-no-eeprom-flash-device-found&quot;&gt;Troubleshooting: No EEPROM&#x2F;flash device found&lt;&#x2F;h3&gt;
&lt;p&gt;If you get &lt;code&gt;No EEPROM&#x2F;flash device found&lt;&#x2F;code&gt; it means that flashrom has been unable to find
your chip, which means something is not connected somewhere. You may need to spend a
while testing different things to find out what&#x27;s wrong.&lt;&#x2F;p&gt;
&lt;p&gt;Check that:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;You have all the pins connected&lt;&#x2F;li&gt;
&lt;li&gt;You are using 3.3V not 5V&lt;&#x2F;li&gt;
&lt;li&gt;You have the chip the right way around&lt;&#x2F;li&gt;
&lt;li&gt;You have WP and HOLD pulled up&lt;&#x2F;li&gt;
&lt;li&gt;You have SPI enabled&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Try:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Switching CS (chip #1) from SPIO CE0 (Pi 24) to SPIO CE1 (Pi 26)&lt;&#x2F;li&gt;
&lt;li&gt;Different values in &lt;code&gt;spispeed&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Using a different Raspberry Pi (I was close to giving up before I tried a different
Pi, and it worked straight away; maybe something was damaged somewhere)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;section-2-removing-the-me&quot;&gt;Section 2: removing the ME&lt;&#x2F;h1&gt;
&lt;p&gt;These steps are a recount of &lt;em&gt;what worked for me&lt;&#x2F;em&gt;. Different motherboards may vary in
how they behave or respond, so your mileage may vary. Make sure you understand at least
the basics of what you are doing so that you can adapt it to your needs. You may find
you need only do one or the other.&lt;&#x2F;p&gt;
&lt;p&gt;In order to get the &#x27;full&#x27; application of me_cleaner I needed to merge two BIOS files,
as using the &lt;code&gt;-S&lt;&#x2F;code&gt; option resulted in a BIOS that wouldn&#x27;t POST for me.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;extract-the-bios-from-the-chip&quot;&gt;Extract the BIOS from the chip&lt;&#x2F;h2&gt;
&lt;p&gt;Assuming that you&#x27;ve been able to successfully interface with your chip using
&lt;code&gt;flashrom&lt;&#x2F;code&gt;, you can continue.&lt;&#x2F;p&gt;
&lt;p&gt;Use &lt;code&gt;flashrom -p linux_spi:dev=&#x2F;dev&#x2F;spidev0.0,spispeed=8000 -r extracted.bin&lt;&#x2F;code&gt; to extract
the BIOS from the chip into a file named &lt;code&gt;extracted.bin&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Back this file up&lt;&#x2F;strong&gt;. This is your recovery file if your modified image doesn&#x27;t work or
bricks your motherboard.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;get-asus-bios-image&quot;&gt;Get Asus&#x27; BIOS image&lt;&#x2F;h2&gt;
&lt;p&gt;Download the BIOS file from Asus&#x27; website. Unzipping it will yield a .CAP file, which is
some proprietary format that&#x27;s not useful. You&#x27;ll need to use
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;LongSoft&#x2F;UEFITool&quot;&gt;UEFITool&lt;&#x2F;a&gt; to extract the image.&lt;&#x2F;p&gt;
&lt;p&gt;Open the .CAP file in UEFITool, right click on &#x27;AMI Aptio capsule&#x27; and choose &#x27;Extract
body...&#x27;. Save this somewhere, I called my file &lt;code&gt;source.bin&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;uefitool-extract-body.png&quot; alt=&quot;Extract body with UEFITool&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;apply-me-cleaner&quot;&gt;Apply me_cleaner&lt;&#x2F;h2&gt;
&lt;p&gt;Make sure you&#x27;ve read &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;corna&#x2F;me_cleaner&#x2F;wiki&#x2F;How-to-apply-me_cleaner&quot;&gt;How to apply
me_cleaner&lt;&#x2F;a&gt; on the
me_cleaner wiki, so that you know what you&#x27;re doing.&lt;&#x2F;p&gt;
&lt;p&gt;You should probably try various combinations of approaches to see what works for you.
Here&#x27;s what worked for me.&lt;&#x2F;p&gt;
&lt;p&gt;Set the HAP bit on the extracted image: &lt;code&gt;python me_cleaner.py -s -O hap.extracted.bin extracted.bin&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Delete the ME in the source image: &lt;code&gt;python me_cleaner.py -O removed.source.bin source.bin&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Open &lt;code&gt;removed.source.bin&lt;&#x2F;code&gt; in UEFITool, expand to find &#x27;ME region&#x27;, use &lt;code&gt;Extract as is...&lt;&#x2F;code&gt; and save somewhere, e.g. &lt;code&gt;removed_me.rgn&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;uefitool-me-region-context.png&quot; alt=&quot;UEFITool Extract ME region&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Open &lt;code&gt;hap.extracted.bin&lt;&#x2F;code&gt; in UEFITool, expand to find &#x27;ME region&#x27; again, and use &lt;code&gt;Replace as is...&lt;&#x2F;code&gt;. Select your &lt;code&gt;removed_me.rgn&lt;&#x2F;code&gt; file.&lt;&#x2F;p&gt;
&lt;p&gt;Use File &amp;gt; Save image file... to save the image out as &lt;code&gt;merged.extracted.bin&lt;&#x2F;code&gt;. This is
the file that I flashed back to my chip&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Verify that the ME is removed from the image&lt;&#x2F;strong&gt; by following the relevant steps in the
wiki guide &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;corna&#x2F;me_cleaner&#x2F;wiki&#x2F;Get-the-status-of-Intel-ME&quot;&gt;Get the status of Intel
ME&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;flash-your-final-image-back-to-the-chip&quot;&gt;Flash your final image back to the chip&lt;&#x2F;h2&gt;
&lt;p&gt;Up until this point you haven&#x27;t modified anything on your motherboard, so no damage
done. This is the part where you can brick your motherboard! Make sure you understand
the risk and accept what you&#x27;re doing.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Make sure you have your original extracted.bin&lt;&#x2F;strong&gt;. If things go wrong, you can just flash it back with the
same command.&lt;&#x2F;p&gt;
&lt;p&gt;Flash the modified image with the command&lt;br &#x2F;&gt;
&lt;code&gt;flashrom -p linux_spi:dev=&#x2F;dev&#x2F;spidev0.0,spispeed=8000 -w merged.extracted.bin&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;This may take a little while, do not unplug the chip.&lt;&#x2F;strong&gt; Just let it do it&#x27;s thing.
Some people online report that it may take up to quarter of an hour. It took about 2-3
minutes for me.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;plug-it-back-into-your-motherboard-and-test&quot;&gt;Plug it back into your motherboard and test&lt;&#x2F;h2&gt;
&lt;p&gt;Plug the chip back into your motherboard, power on your PC, and follow check the status
of the ME from within your OS. The wiki is your friend again: &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;corna&#x2F;me_cleaner&#x2F;wiki&#x2F;Get-the-status-of-Intel-ME&quot;&gt;Get the status of Intel
ME&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I found that the first time I booted with the modified BIOS, the machine just hung and
did nothing. Holding the power button to force it off solved it for the second boot, and
everything has been fine since.&lt;&#x2F;p&gt;
&lt;p&gt;If all has gone well, your PC should work normally, and the management engine should be
gone! If not, you can flash back your original &lt;code&gt;extracted.bin&lt;&#x2F;code&gt; which should return your
BIOS back to how it was. There are a lot of useful issues in the me_cleaner repository
which may be able to help you out, if you take the time to read them.&lt;&#x2F;p&gt;
&lt;p&gt;If something went really really wrong you can purchase a replacement chip (assuming
you&#x27;re using a motherboard with a removable chip like in this guide).&lt;&#x2F;p&gt;
</content>
	</entry>
	<entry xml:lang="en">
		<title>Make Miniflux portable</title>
		<published>2021-03-11T00:00:00+00:00</published>
		<updated>2021-07-31T00:00:00+00:00</updated>
		<link href="https://www.brhiggins.com/posts/make-miniflux-portable/" type="text/html"/>
		<id>https://www.brhiggins.com/posts/make-miniflux-portable/</id>
		<content type="html">&lt;p&gt;After hunting for a while for a good offline RSS reader I decided on
&lt;a href=&quot;https:&#x2F;&#x2F;miniflux.app&#x2F;&quot;&gt;Miniflux&lt;&#x2F;a&gt;. It is designed to be hosted on a home server or
something, but it functions just fine as a standalone desktop application. The use of
the browser to access content is one of my favourite things about it, as it means all my
&lt;a href=&quot;https:&#x2F;&#x2F;qutebrowser.org&#x2F;&quot;&gt;qutebrowser&lt;&#x2F;a&gt; keyboard combinations will work.&lt;&#x2F;p&gt;
&lt;p&gt;There&#x27;s just one thing that it&#x27;s missing: it&#x27;s not portable. It uses PostgresSQL for the
database; no option for SQLite or any other kind of portable format. Let&#x27;s fix that! &lt;&#x2F;p&gt;
&lt;h2 id=&quot;overview&quot;&gt;Overview&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Only launch Miniflux when needed, like an application (rather than a background
service)&lt;&#x2F;li&gt;
&lt;li&gt;Dump the database to a file when Miniflux is closed&lt;&#x2F;li&gt;
&lt;li&gt;Load the data in from the dump just before relaunching Miniflux&lt;&#x2F;li&gt;
&lt;li&gt;Your dump file is how your data is portable&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;disclaimer&quot;&gt;Disclaimer&lt;&#x2F;h2&gt;
&lt;p&gt;I don&#x27;t know much about Postgres, I haven&#x27;t used it much. And I&#x27;m relatively amateur at
shell scripting, so there may be better ways to achieve this.&lt;&#x2F;p&gt;
&lt;p&gt;Also this guide is only for Linux. I assume you&#x27;d be able to achieve the same thing on
Windows or Mac by modifying the commands, but I have no interest in either of those
platforms myself.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;A Linux machine&lt;&#x2F;li&gt;
&lt;li&gt;PostgresSQL installed&lt;&#x2F;li&gt;
&lt;li&gt;Miniflux installed&lt;&#x2F;li&gt;
&lt;li&gt;Be comfortable using the command line&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;steps&quot;&gt;Steps&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;1-initial-postgressql-and-miniflux-setup&quot;&gt;1: Initial PostgresSQL and Miniflux setup&lt;&#x2F;h3&gt;
&lt;p&gt;Miniflux has some official &lt;a href=&quot;https:&#x2F;&#x2F;miniflux.app&#x2F;docs&#x2F;installation.html&quot;&gt;installation
instructions&lt;&#x2F;a&gt;, but there&#x27;s some oddities
around the user and database names they tell you to use. The default Postgres connection
string used is&lt;br &#x2F;&gt;
&lt;code&gt;user=postgres password=postgres dbname=miniflux2 sslmode=disable&lt;&#x2F;code&gt;,&lt;br &#x2F;&gt;
yet the instructions tell you to create a user and database both with names &#x27;miniflux&#x27;,
and then don&#x27;t tell you how to configure the database connection string to these values.&lt;&#x2F;p&gt;
&lt;p&gt;Anyway, I prefer to configure with the defaults so I have one fewer configuration file
to worry about.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#282828;color:#fdf4c1aa;&quot;&gt;&lt;code&gt;&lt;span&gt;# Switch to the postgres user
&lt;&#x2F;span&gt;&lt;span&gt;$ su - postgres
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Initialise your database (if you haven&amp;#39;t done so already)
&lt;&#x2F;span&gt;&lt;span&gt;$ initdb -D &#x2F;var&#x2F;lib&#x2F;postgres&#x2F;data
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Create your miniflux database
&lt;&#x2F;span&gt;&lt;span&gt;$ createdb miniflux2
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Exit the postgres user
&lt;&#x2F;span&gt;&lt;span&gt;$ exit
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Run required miniflux migrations
&lt;&#x2F;span&gt;&lt;span&gt;$ miniflux -migrate
&lt;&#x2F;span&gt;&lt;span&gt;-&amp;gt; Current schema version: 0
&lt;&#x2F;span&gt;&lt;span&gt;-&amp;gt; Latest schema version: 44
&lt;&#x2F;span&gt;&lt;span&gt;* Migrating to version: 1
&lt;&#x2F;span&gt;&lt;span&gt;* Migrating to version: 2
&lt;&#x2F;span&gt;&lt;span&gt;...
&lt;&#x2F;span&gt;&lt;span&gt;* Migrating to version: 43
&lt;&#x2F;span&gt;&lt;span&gt;* Migrating to version: 44
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;# Create the miniflux admin user
&lt;&#x2F;span&gt;&lt;span&gt;$ miniflux -create-admin
&lt;&#x2F;span&gt;&lt;span&gt;Enter Username: admin
&lt;&#x2F;span&gt;&lt;span&gt;Enter Password:
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You may need to create the &lt;code&gt;&#x2F;var&#x2F;lib&#x2F;postgres&#x2F;data&lt;&#x2F;code&gt; directory and change it&#x27;s ownership
if you&#x27;re having problems. This may need to be done as root.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#282828;color:#fdf4c1aa;&quot;&gt;&lt;code&gt;&lt;span&gt;$ mkdir &#x2F;var&#x2F;lib&#x2F;postgres&#x2F;data
&lt;&#x2F;span&gt;&lt;span&gt;$ chown postgres:postgres &#x2F;var&#x2F;lib&#x2F;postgres&#x2F;data
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Once you&#x27;ve done these steps you should be able to launch Miniflux, visit it in a
browser, and interact with it normally. Refer to &lt;a href=&quot;https:&#x2F;&#x2F;miniflux.app&#x2F;docs&#x2F;index.html&quot;&gt;the Miniflux
documentation&lt;&#x2F;a&gt; for a user guide.&lt;&#x2F;p&gt;
&lt;p&gt;If it&#x27;s not working properly yet, troubleshoot your issues at this stage before moving
on. Shut down Miniflux when you&#x27;re done testing.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#282828;color:#fdf4c1aa;&quot;&gt;&lt;code&gt;&lt;span&gt;$ miniflux
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;[INFO] Starting Miniflux...
&lt;&#x2F;span&gt;&lt;span&gt;[INFO] Starting scheduler...
&lt;&#x2F;span&gt;&lt;span&gt;[INFO] Listening on &amp;quot;127.0.0.1:8080&amp;quot; without TLS
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;2-dump-the-database&quot;&gt;2: Dump the database&lt;&#x2F;h3&gt;
&lt;p&gt;Postgres provides the &lt;code&gt;pg_dump&lt;&#x2F;code&gt; command which will dump the contents of the database as
the SQL queries that would be needed to recreate it.&lt;br &#x2F;&gt;
This command includes the &lt;code&gt;--clean&lt;&#x2F;code&gt; option which will remove the data that has been
dumped, so that it doesn&#x27;t conflict when it&#x27;s imported again. This also means the data
is only ever in one place, the database or the file.&lt;&#x2F;p&gt;
&lt;p&gt;This will be the portable file, so choose where you want it to go. I would suggest
putting it in a git repository.&lt;&#x2F;p&gt;
&lt;p&gt;Dump the contents to your chosen destination. We need to pass the &lt;code&gt;-U&lt;&#x2F;code&gt; option to tell
Postgres which user we&#x27;re executing this as.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#282828;color:#fdf4c1aa;&quot;&gt;&lt;code&gt;&lt;span&gt;pg_dump -U postgres miniflux2 &amp;gt; &#x2F;path&#x2F;to&#x2F;dump.sql
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Double check the file, it should have a bunch of SQL queries in it.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;3-create-a-script&quot;&gt;3: Create a script&lt;&#x2F;h3&gt;
&lt;p&gt;Now we&#x27;re going to create a script that will import the dump file before launching
Miniflux, and dump it again when we&#x27;re done. When we want to launch Miniflux we need to
import the dump file, launch Miniflux, and launch the browser. When we&#x27;re done
browsing&#x2F;reading our feeds, we want to shut them down and dump the database again.&lt;&#x2F;p&gt;
&lt;p&gt;Create a &lt;code&gt;miniflux.sh&lt;&#x2F;code&gt; script which will be used for launching Miniflux.&lt;&#x2F;p&gt;
&lt;p&gt;Pay special attention to the browser command in the middle. This is the process that the
script will wait for before shutting down Miniflux and dumping the data. You ideally
want this to be a standalone process, i.e. not a command that just opens a new tab in an
existing browser instance, else Miniflux won&#x27;t shut down until all your tabs are closed.
I am using &lt;a href=&quot;https:&#x2F;&#x2F;qutebrowser.org&#x2F;&quot;&gt;qutebrowser&lt;&#x2F;a&gt; and am achieving this by launching it
with a different profile directory just for Miniflux. Other browsers should have a
similar alternative, you&#x27;ll have to look it up for your browser.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#282828;color:#fdf4c1aa;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;font-style:italic;color:#928374;&quot;&gt;#!&#x2F;bin&#x2F;sh
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#928374;&quot;&gt;# Exit immediately if there&amp;#39;s any errors
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fabd2f;&quot;&gt;set &lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;-e
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;db_name&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fe8019;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b8bb26;&quot;&gt;miniflux2
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;dump_loc&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fe8019;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b8bb26;&quot;&gt;&#x2F;path&#x2F;to&#x2F;dump.sql
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fabd2f;&quot;&gt;echo &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b8bb26;&quot;&gt;&amp;quot;Importing dump&amp;quot;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;&#x2F;usr&#x2F;bin&#x2F;psql -U postgres $db_name &lt;&#x2F;span&gt;&lt;span style=&quot;color:#fe8019;&quot;&gt;&amp;lt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;$dump_loc
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fabd2f;&quot;&gt;echo &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b8bb26;&quot;&gt;&amp;quot;Launching miniflux&amp;quot;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;&#x2F;usr&#x2F;bin&#x2F;miniflux &lt;&#x2F;span&gt;&lt;span style=&quot;color:#fe8019;&quot;&gt;&amp;amp;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;miniflux_pid&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fe8019;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b8bb26;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;!
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fabd2f;&quot;&gt;echo &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b8bb26;&quot;&gt;&amp;quot;Launching browser&amp;quot;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;&#x2F;usr&#x2F;bin&#x2F;qutebrowser 127.0.0.1:8080&#x2F;unread --target window --basedir ~&#x2F;.local&#x2F;share&#x2F;qutebrowser&#x2F;miniflux
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fabd2f;&quot;&gt;echo &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b8bb26;&quot;&gt;&amp;quot;Killing miniflux&amp;quot;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fabd2f;&quot;&gt;kill&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt; -INT $miniflux_pid
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fabd2f;&quot;&gt;wait &lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;$miniflux_pid
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fabd2f;&quot;&gt;echo &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b8bb26;&quot;&gt;&amp;quot;Dumping database&amp;quot;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;&#x2F;usr&#x2F;bin&#x2F;pg_dump -U postgres --clean $db_name &lt;&#x2F;span&gt;&lt;span style=&quot;color:#fe8019;&quot;&gt;&amp;gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#fdf4c1;&quot;&gt;$dump_loc
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;testing-it&quot;&gt;Testing it&lt;&#x2F;h2&gt;
&lt;p&gt;Lets test it.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#282828;color:#fdf4c1aa;&quot;&gt;&lt;code&gt;&lt;span&gt;$ .&#x2F;miniflux.sh
&lt;&#x2F;span&gt;&lt;span&gt;Importing dump
&lt;&#x2F;span&gt;&lt;span&gt;SET
&lt;&#x2F;span&gt;&lt;span&gt;SET
&lt;&#x2F;span&gt;&lt;span&gt;...
&lt;&#x2F;span&gt;&lt;span&gt;Launching miniflux
&lt;&#x2F;span&gt;&lt;span&gt;Launching browser
&lt;&#x2F;span&gt;&lt;span&gt;[INFO] The default value for DATABASE_URL is used
&lt;&#x2F;span&gt;&lt;span&gt;[INFO] Starting Miniflux...
&lt;&#x2F;span&gt;&lt;span&gt;[INFO] Starting scheduler...
&lt;&#x2F;span&gt;&lt;span&gt;[INFO] Listening on &amp;quot;127.0.0.1:8080&amp;quot; without TLS
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;At this point your new browser instance should launch. You can log in and interact with
Miniflux.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;miniflux-working.png&quot; alt=&quot;Miniflux working&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;When you&#x27;re done, close your browser instance. You should see Miniflux and your data
dumped back into the file.&lt;&#x2F;p&gt;
&lt;pre style=&quot;background-color:#282828;color:#fdf4c1aa;&quot;&gt;&lt;code&gt;&lt;span&gt;Killing miniflux
&lt;&#x2F;span&gt;&lt;span&gt;[INFO] Shutting down the process...
&lt;&#x2F;span&gt;&lt;span&gt;[INFO] Process gracefully stopped
&lt;&#x2F;span&gt;&lt;span&gt;Dumping database
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;At this point you can do whatever you want with the file. Transport it between machines,
back it up. As long as you use the script to import before launching Miniflux and dump
again when you&#x27;re done, you should be good.&lt;&#x2F;p&gt;
&lt;p&gt;Personally, I keep the file in the git repo. I have added a couple of extra commands at
the end to commit it to git and push to the remotes after everything else is done.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;limitations&quot;&gt;Limitations&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Feeds don&#x27;t automatically refresh&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Because Miniflux is never open in the background, it can&#x27;t refresh feeds automatically.
You need to manually refresh the feeds each time you launch. There&#x27;s probably a way
around this, but I haven&#x27;t found it enough of a problem to try figure it out yet.
&lt;img src=&quot;miniflux-refresh-feeds.png&quot; alt=&quot;Manually refresh feeds&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;&#x2F;h2&gt;
&lt;p&gt;Now that I can port the data about easily, Miniflux has all the features I want from my
RSS application, with no need to set up an extra server.&lt;&#x2F;p&gt;
</content>
	</entry>
</feed>
