<?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>ZZ &amp; Joa</title>
	<atom:link href="https://blog.znjoa.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.znjoa.com</link>
	<description>Work &#38; Life</description>
	<lastBuildDate>Sat, 01 Mar 2025 14:30:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.znjoa.com/wp-content/uploads/2022/11/cropped-DALL·E-2022-11-23-19.39.49-USSR-style-poster-of-VR-and-AR-150x150.jpg</url>
	<title>ZZ &amp; Joa</title>
	<link>https://blog.znjoa.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">192961540</site>	<item>
		<title>How to Use Dynu DNS with acme.sh for SSL Management</title>
		<link>https://blog.znjoa.com/2025/02/17/how-to-use-dynu-dns-with-acme-sh-for-ssl-management/</link>
					<comments>https://blog.znjoa.com/2025/02/17/how-to-use-dynu-dns-with-acme-sh-for-ssl-management/#respond</comments>
		
		<dc:creator><![CDATA[Zz]]></dc:creator>
		<pubDate>Mon, 17 Feb 2025 19:49:40 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[ACME]]></category>
		<category><![CDATA[acme.sh]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[letsencrypt]]></category>
		<category><![CDATA[SSL]]></category>
		<guid isPermaLink="false">https://www.znjoa.com/?p=314</guid>

					<description><![CDATA[Installing acme.sh Get Dynu DNS api Export environment variables Create alias Add below line to the&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Installing acme.sh</h2>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
sudo su -
mkdir .acme.sh
cd .acme.sh
curl https://get.acme.sh | sh -s email=your_email_address
</pre></div>


<h2 class="wp-block-heading">Get Dynu DNS api</h2>



<div class="wp-block-jetpack-markdown"><ul>
<li>Go to <a href="https://www.dynu.com/ControlPanel/APICredentials#">https://www.dynu.com/ControlPanel/APICredentials#</a></li>
<li><strong>Create <code>OAuth2</code> API credentials</strong>
<ul>
<li>Change credential type to <code>OAuth2</code></li>
<li>Click on the binoculars to show <code>Client ID</code> and <code>Secret</code></li>
</ul>
</li>
</ul>
</div>



<figure class="wp-block-image size-large is-resized"><img fetchpriority="high" decoding="async" width="1024" height="847" src="https://www.znjoa.com/wp-content/uploads/2025/02/Pasted-image-20250217195007-1024x847.png" alt="" class="wp-image-315" style="width:614px;height:auto" srcset="https://blog.znjoa.com/wp-content/uploads/2025/02/Pasted-image-20250217195007-1024x847.png 1024w, https://blog.znjoa.com/wp-content/uploads/2025/02/Pasted-image-20250217195007-300x248.png 300w, https://blog.znjoa.com/wp-content/uploads/2025/02/Pasted-image-20250217195007-768x635.png 768w, https://blog.znjoa.com/wp-content/uploads/2025/02/Pasted-image-20250217195007-1536x1271.png 1536w, https://blog.znjoa.com/wp-content/uploads/2025/02/Pasted-image-20250217195007-2048x1694.png 2048w, https://blog.znjoa.com/wp-content/uploads/2025/02/Pasted-image-20250217195007-800x662.png 800w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Export environment variables</h2>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
export Dynu_ClientId=&quot;Client ID&quot;
export Dynu_Secret=&quot;Secret&quot;
</pre></div>


<div class="wp-block-jetpack-markdown"><p><strong>Important</strong></p>
<ul>
<li>if you have used the wrong client ID or secret previously and with the error <code>authentication failed</code>, you need to delete <em>the corresponding 2 lines</em> from the below file:</li>
</ul>
</div>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
~/.acme.sh/account.conf
</pre></div>


<div class="wp-block-jetpack-markdown"><ul>
<li>otherwise the exporting even the correct credentials will not work using <code>export ...</code></li>
</ul>
</div>



<h2 class="wp-block-heading"><strong>Create alias</strong></h2>



<p>Add below line to the end of your `~/.bashrc` file</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
alias acme.sh=~/.acme.sh/acme.sh
source ~/.bashrc
</pre></div>


<h2 class="wp-block-heading"><strong>Generating certificate</strong></h2>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
acme.sh --issue --dns dns_dynu -d domain.com -d www.domain.com
</pre></div>


<h2 class="wp-block-heading"><strong>Install the certificates</strong></h2>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
acme.sh --install-cert -d domain.com -d www.domain.com --key-file /etc/letsencrypt/live/domain.com/privkey.pem --fullchain-file /etc/letsencrypt/live/domain.com/fullchain.pem --reloadcmd &quot;service apache2 force-reload&quot;
</pre></div>


<h2 class="wp-block-heading">Validation</h2>



<ul class="wp-block-list">
<li>Restart apache</li>
</ul>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
sudo service apache2 restart
</pre></div>


<ul class="wp-block-list">
<li>Open a browser, check the SSL certificate is updated</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.znjoa.com/2025/02/17/how-to-use-dynu-dns-with-acme-sh-for-ssl-management/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">314</post-id>	</item>
		<item>
		<title>Installing Overleaf server (community edition) on Raspberry Pi</title>
		<link>https://blog.znjoa.com/2024/11/24/installing-overleaf-community-edition-on-raspberry-pi/</link>
					<comments>https://blog.znjoa.com/2024/11/24/installing-overleaf-community-edition-on-raspberry-pi/#comments</comments>
		
		<dc:creator><![CDATA[Zz]]></dc:creator>
		<pubDate>Sun, 24 Nov 2024 21:51:20 +0000</pubDate>
				<category><![CDATA[RPi]]></category>
		<category><![CDATA[Arm64]]></category>
		<category><![CDATA[Overleaf]]></category>
		<category><![CDATA[Overleaf CE]]></category>
		<category><![CDATA[Overleaf community editon]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<guid isPermaLink="false">https://www.znjoa.com/?p=299</guid>

					<description><![CDATA[Get toolkit cd ~ git clone https://github.com/overleaf/toolkit.git cd toolkit bin/init Change listening IP and port sudo&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[<h2>Get toolkit</h2>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">cd ~
git clone https://github.com/overleaf/toolkit.git
cd toolkit
bin/init
</pre>
<h2>Change listening IP and port</h2>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">sudo vim config/overleaf.rc
</pre>
<ul>
<li>change <code>YourPORTChoice</code> in <code>OVERLEAF_PORT=YourPORTChoice</code></li>
<li>change  <code>OVERLEAF_LISTEN_IP</code>to <code>0.0.0.0</code></li>
</ul>
<h2>Build docker images for ARM</h2>
<p>This is the key part. One needs to build the arm version of the docker images using the command below.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">cd ~<br />git clone https://github.com/overleaf/overleaf.git
cd overleaf/server-ce

make ARCH=arm build-base
make ARCH=arm build-community</pre>
<h2>Change image names</h2>
<p>The image needs to be renamed, correponding to the version mentioned in the version file below.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">docker image tag sharelatex/sharelatex:main sharelatex/sharelatex: x.x.x</pre>
<pre>Note:<br />- <code>x.x.x</code> comes from ~/toolkit/config/version</pre>
<h2>Start service</h2>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">bin/up -d</pre>
<h2>Verify the service is accessible</h2>
<ul>
<li>Access the below link in your browser:</li>
</ul>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">YourServerIP:YourPORTChoice</pre>


<h2 class="wp-block-heading">Creating a new user</h2>



<pre class="wp-block-code"><code>bin/docker-compose exec sharelatex /bin/bash -ce "cd /overleaf/services/web &amp;&amp; node modules/server-ce-scripts/scripts/add-user --email=your_email_address"</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.znjoa.com/2024/11/24/installing-overleaf-community-edition-on-raspberry-pi/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">299</post-id>	</item>
		<item>
		<title>Migrating Raspberry Pi OS from micro SD card to SSD with existing partitions</title>
		<link>https://blog.znjoa.com/2023/12/16/migrating-raspberry-pi-os-from-micro-sd-card-to-ssd-with-existing-partitions/</link>
					<comments>https://blog.znjoa.com/2023/12/16/migrating-raspberry-pi-os-from-micro-sd-card-to-ssd-with-existing-partitions/#respond</comments>
		
		<dc:creator><![CDATA[Zz]]></dc:creator>
		<pubDate>Sat, 16 Dec 2023 19:01:08 +0000</pubDate>
				<category><![CDATA[RPi]]></category>
		<category><![CDATA[Tech]]></category>
		<guid isPermaLink="false">https://www.znjoa.com/?p=240</guid>

					<description><![CDATA[Moving the installation of your Raspberry Pi from the micro SD card to an external SSD&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[
<p><em>Moving the installation of your Raspberry Pi from the micro SD card to an external SSD can boost performance. </em></p>
<p><em>In case the SSD  planned to move the installation to already has data which should be kept, the following steps can be followed.</em></p>



<h2 class="wp-block-heading">Create partitions for RPi on the SSD</h2>



<p>All the following partition operations can be done in<code class="EnlighterJSRAW" data-enlighter-language="generic">GParted</code>.</p>



<p>First, two partitions corresponding to the micro SD card need to be created on the SSD: <code class="EnlighterJSRAW" data-enlighter-language="generic">bootfs</code> and <code class="EnlighterJSRAW" data-enlighter-language="generic">rootfs</code>. If necessary the existing partition on the SSD should be resized on the left side to allow for the new partitions. The size of these two partitions should be the same as those on the micro SD card.</p>



<h2 class="wp-block-heading">Clone micro SD partitions into the two partitions on SSD</h2>



<p>The following commands can be used to clone the partitions:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo dd bs=512M  if=/dev/your_microSD_boot_partition of=/dev/your_ssd_boot_partition
sudo dd bs=512M  if=/dev/your_microSD_root_partition of=/dev/your_ssd_root_partition</pre>



<p>The cloned partitions should be checked in <code>GParted</code> to check no errors are given.</p>



<h2 class="wp-block-heading">UUID settings</h2>



<p>Partition <code>UUIDs</code>  need to be adjusted to point to these on the SSD. This includes two parts: <code>/cmdline.txt</code> in <code>bootfs</code></p>



<p>and <code>/etc/fstab</code> in <code>rootfs</code>. They can be changed by mounting partitions on another Linux machine.</p>



<h3 class="wp-block-heading">How to check partition PARTUUID and UUID</h3>



<p>The <code class="EnlighterJSRAW" data-enlighter-language="generic">PARTUUID</code> and <code class="EnlighterJSRAW" data-enlighter-language="generic">UUID</code> of a partition can be checked by the blow command:</p>



<p><code class="EnlighterJSRAW" data-enlighter-language="generic">sudo blkid /dev/partition_to_check</code></p>



<h3 class="wp-block-heading">cmdline.txt in bootfs partition</h3>



<p>Change <code class="EnlighterJSRAW" data-enlighter-language="generic">xxxxxxxx</code> below to the <code>PARTUUID</code> of <code>rootfs</code> partition on the SSD.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">root=PARTUUID=xxxxxxxx</pre>



<h3 class="wp-block-heading"><span style="font-family: monospace; color: #000000;"><span style="caret-color: #222222; background-color: #f2f4f5;">/etc/fstab</span> </span>in rootfs partition</h3>



<p>Change <code class="EnlighterJSRAW" data-enlighter-language="generic">yyyyyyyy</code> below to the <code>UUID</code> of <code>bootfs</code> partition on the SSD.</p>



<p>Change <code class="EnlighterJSRAW" data-enlighter-language="generic">zzzzzzzz</code> below to the <code>UUID</code> of <code>rootfs</code> partition on the SSD.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">proc            /proc           proc    defaults          0       0
UUID=yyyyyyyy /boot/firmware  vfat    defaults          0       2
UUID=zzzzzzzz /               ext4    defaults,noatime  0       1</pre>
<hr />
<p><em>Now, plug your SSD to the Raspberry Pi without your micro SD card plugged. Start the RPi and enjoy!</em></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.znjoa.com/2023/12/16/migrating-raspberry-pi-os-from-micro-sd-card-to-ssd-with-existing-partitions/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">240</post-id>	</item>
		<item>
		<title>Installing USBNetwork (SSH service) on Kindle</title>
		<link>https://blog.znjoa.com/2023/07/26/installing-usbnetwork-on-kindle/</link>
					<comments>https://blog.znjoa.com/2023/07/26/installing-usbnetwork-on-kindle/#comments</comments>
		
		<dc:creator><![CDATA[Zz]]></dc:creator>
		<pubDate>Tue, 25 Jul 2023 22:54:47 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Kindle]]></category>
		<category><![CDATA[paperwhite]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[SSH via WiFi]]></category>
		<category><![CDATA[usbnetwork]]></category>
		<guid isPermaLink="false">http://192.168.0.186/?p=191</guid>

					<description><![CDATA[This enables you to connect to your Kindle via SSH using USB connection. With some further&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[
<p>This enables you to connect to your Kindle via SSH using USB connection. With some further settings, you can SSH with WiFi.</p>



<h2 class="wp-block-heading">Prerequisites</h2>



<ul class="wp-block-list">
<li>You have a jailbroken Kindle. If not, you can refer to <a href="https://www.znjoa.com/2023/07/25/jailbreaking-my-kindle-paperwhite-gen-1/" target="_blank" rel="noreferrer noopener">this post</a>.</li>



<li>Both <strong>KUAL</strong> and <strong>MRPI</strong> are installed. If not, refer to <a href="https://www.znjoa.com/2023/07/25/installing-kual-and-mrpi-on-a-jailbroken-kindle-paperwhite-1/" target="_blank" rel="noreferrer noopener">this post</a>.</li>
</ul>



<h2 class="wp-block-heading">Installing</h2>



<ol class="wp-block-list">
<li>Go to the <a href="https://www.mobileread.com/forums/showthread.php?t=225030" target="_blank" rel="noreferrer noopener">Snapshots page</a> on MobileRead.</li>



<li>Under the right product category, find the <strong>USBNetwork Hack</strong>. Download the <code>.tar.xz</code> file.</li>



<li>Extract the downloaded file, select the <strong>correct</strong> <code>Update_usbnet_*.bin</code> file. There are multiple update files for different devices, so make sure you select the correct one!</li>



<li>Connect your Kindle to your computer via USB cable. Confirm it’s in USB Drive Mode.</li>



<li>Place the selected file in Step 3 in <code>/mrpackage/</code> under your Kindle&#8217;s root folder.</li>



<li>Disconnect Kindle from the computer.</li>



<li>Go to <code>KUAL--Helper--Install MR Packages</code>, install the <code>USBNetwork</code>.</li>
</ol>



<h2 class="wp-block-heading">SSH via USB</h2>



<p>After installing by default, this is the only possible way to connect. Depending on the OS, some of the following steps can differ:</p>



<ol class="wp-block-list">
<li>Turn on the SSH server on the Kindle by typing <code>;un</code> in the search bar then press <code>Enter</code>. This will start the server with its IP as <code>192.168.15.244</code> which expects a incoming connection from <code>192.168.15.201</code>.</li>



<li>Configure the network on the client side:
<ul class="wp-block-list">
<li>macOS: <code>System Settings--Network--RNDIS/Ethernet Gadget--Details--TCP/IP</code>
<ul class="wp-block-list">
<li><code>Configure IPv4</code>: <code>Manually</code></li>



<li><code>IP Address: 192.168.15.201</code></li>



<li><code>Subnet Mask: 255.255.255.0</code></li>



<li>The red dot indicating the network should turn green</li>
</ul>
</li>



<li>Linux: <code>ifconfig usb0 192.168.15.201</code></li>



<li>Windows: Please check the Windows section of <a href="https://wiki.mobileread.com/wiki/USBNetwork" target="_blank" rel="noreferrer noopener">this post</a>.</li>
</ul>
</li>



<li>Connecting to server: <code>ssh root@192.168.15.244</code>. No password, so just press <code>Enter</code>.</li>
</ol>



<h2 class="wp-block-heading">SSH via WiFi</h2>



<p>Now that you have the remote access to your Kindle, you can also turn on the SSH connection via WiFi. There are two reasons that you might want to do this:</p>



<ol class="wp-block-list">
<li>The connecting is easier as you don&#8217;t have to do the plugging and unplugging.</li>



<li>It might be easier for the debugging as the Kindle being charged while connecting via USB might influence some system behaviors which make the debugging difficult.</li>
</ol>



<p>This can be enabled by:</p>



<ol class="wp-block-list">
<li>Change <code>USE_WIFI</code> option to <code>TRUE</code> for <code>/mnt/us/usbnet/etc/config</code></li>



<li>Restart SSH server in KUAL</li>
</ol>



<p>Then disconnecting the Kindle from the computer, the server can be accessed by <code><code><code>ssh root@YourKindle'sIP</code></code></code><code><code></code></code> (usually it&#8217;s <code>192.168.0|1.x</code>).</p>



<h2 class="wp-block-heading">Some tidying up</h2>



<p>Some of the below are not closely related to SSH but they become a problem once SSH connection is possible.</p>



<h3 class="wp-block-heading">Start SSH service on boot</h3>



<ol class="wp-block-list">
<li>SSH into Kindle</li>



<li><code>touch /mnt/us/usbnet/auto</code></li>
</ol>



<h3 class="wp-block-heading">Show logs while starting Kindle</h3>



<ol class="wp-block-list">
<li>SSH into Kindle</li>



<li><code>touch /mnt/us/usbnet/verbose</code></li>
</ol>



<p>This will show some logs at the bottom of the screen while Kindle is starting.</p>



<h3 class="wp-block-heading">Give Kindle a static IP</h3>



<p>If you want to use SSH via WiFi consistently, it is recommended to use DHCP to give Kindle a static local IP. This can be achieved by a router.</p>



<h3 class="wp-block-heading">Set a password for <code><code class="EnlighterJSRAW" data-enlighter-language="bash">root</code></code> user</h3>



<p>This is a major security risk with incoming SSH connection. Essentially without password anyone within your LAN has the access to your Kindle.</p>



<ol class="wp-block-list">
<li>SSH into Kindle</li>



<li><code>passwd</code>, then enter your new password</li>
</ol>



<p>Attention, next time when you want to Ssh into your Kindle, you should use the newly-set password.</p>



<h3 class="wp-block-heading">Use pub key authentication</h3>



<p>This is more convenient and securer than a password login. The steps are below:</p>



<ol class="wp-block-list">
<li>Run <code>ssh-keygen</code> on your <strong>client</strong> machine. Enter the name you would like it to have. In the end it gives you a private key <code>xxx</code> and a public key <code>xxx.pub</code>.</li>



<li>Copy the <code>xxx.pub</code> to <code>/mnt/us/usbnet/etc/</code> using <code>scp</code>, <strong>rename</strong> it to <code>authorized_keys</code></li>



<li>Copy <code>xxx</code> to the <code>.ssh</code> folder on your <strong>client</strong> machine.</li>
</ol>



<p>Now you should be able to connect your Kindle with pub key authentication.</p>



<h3 class="wp-block-heading">Some more tweaks</h3>



<p>Similar as the <code>SSH</code> service on another Linux machine, there exists a <code>sshd</code> config file in Kindle&#8217;s system <code>(/mnt/us/usbnet/etc/sshd_config)</code>. There you can do things like <strong>turning off password login</strong>, <strong>restrict login IPs</strong> and <strong>adjusting port</strong> etc.</p>



<h2 class="wp-block-heading">Closing remarks</h2>



<p>Connecting to Kindle via <code>SSH</code> to be honest is not that straightforward comparing to other Linux machines. However, this is not all impossible by following the previously mentioned steps. This exposes the system files to us and make possible further tweaking of the system via scripting.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.znjoa.com/2023/07/26/installing-usbnetwork-on-kindle/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">191</post-id>	</item>
		<item>
		<title>Installing KUAL and MRPI on a jailbroken Kindle Paperwhite 1</title>
		<link>https://blog.znjoa.com/2023/07/25/installing-kual-and-mrpi-on-a-jailbroken-kindle-paperwhite-1/</link>
					<comments>https://blog.znjoa.com/2023/07/25/installing-kual-and-mrpi-on-a-jailbroken-kindle-paperwhite-1/#comments</comments>
		
		<dc:creator><![CDATA[Zz]]></dc:creator>
		<pubDate>Tue, 25 Jul 2023 21:10:15 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Jailbreaking]]></category>
		<category><![CDATA[KAUL]]></category>
		<category><![CDATA[Kindle]]></category>
		<category><![CDATA[MRPI]]></category>
		<guid isPermaLink="false">http://192.168.0.186/?p=182</guid>

					<description><![CDATA[Although this tutorial is based on a jailbroken Kindle Paperwhite Gen 1, it should also work&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[
<p>Although this tutorial is based on a jailbroken Kindle Paperwhite Gen 1, it should also work similarly for other Kindle models.</p>



<h2 class="wp-block-heading">Why KUAL and MRPI?</h2>



<p>Many extensions you can install after jailbreaking the Kindle depends on them, e.g., enabling <code>SSH</code> on the Kindle.</p>



<h2 class="wp-block-heading">Prerequisites</h2>



<p>You have a Kindle which is already <strong>jailbroken</strong>. If not, refer to <a href="https://www.znjoa.com/2023/07/25/jailbreaking-my-kindle-paperwhite-gen-1/" target="_blank" rel="noreferrer noopener">this post</a>.</p>



<h2 class="wp-block-heading">KUAL</h2>



<p>It can be installed by following these steps:</p>



<ol class="wp-block-list">
<li>Go to the <a rel="noreferrer noopener" href="https://www.mobileread.com/forums/showthread.php?t=225030" data-type="URL" data-id="https://www.mobileread.com/forums/showthread.php?t=225030" target="_blank">Snapshots page</a> on MobileRead, there under the <strong><code>KUAL &amp; KUAL extensions</code></strong> section, you can download the file for the bullet <strong>KUAL</strong>.</li>



<li>Extract the downloaded <code>.tar.xz</code> file.
<ul class="wp-block-list">
<li>If your Kindle runs firmware <code>5.x</code>, select file <code>KUAL-KDK-2.0.azw2</code></li>



<li>If your Kindle runs an older firmware, select file <code>KUAL-KDK-1.0.azw2</code></li>
</ul>
</li>



<li>Connect your Kindle to your computer via USB cable. Confirm it&#8217;s in USB Drive Mode.</li>



<li>Copy the selected file into <code>/documents</code> of your Kindle drive.</li>



<li>Disconnect your Kindle and a new book should appear on your home screen.</li>



<li>Tap on the book, you enter KUAL, meaning it&#8217;s successfully installed.</li>
</ol>



<h2 class="wp-block-heading">MRPI</h2>



<p>It stands for&nbsp;<strong>MobileRead Package Installer</strong>, which is an extension of KUAL. You can install many packages using MRPI and it makes your life easier according to MobileRead.</p>



<p>The steps to install are:</p>



<ol class="wp-block-list">
<li>Go to the <a href="https://www.mobileread.com/forums/showthread.php?t=225030" target="_blank" rel="noreferrer noopener" data-type="URL" data-id="https://www.mobileread.com/forums/showthread.php?t=225030">Snapshots page</a> on MobileRead, there under the <strong><code>KUAL &amp; KUAL extensions</code></strong> section, you can download the file for the bullet <strong>MR Package Installer</strong>.</li>



<li>Extract the downloaded <code>.tar.xz</code> file.</li>



<li>Connect your Kindle to your computer via USB cable. Confirm it&#8217;s in USB Drive Mode.</li>



<li>Copy all extracted files in Step 2 to the <strong>root folder</strong> of your Kindle.</li>



<li>After disconnecting your Kindle from the computer, you can confirm it&#8217;s successfully installed by going to <strong>KUAL</strong>, there a new <strong>helper</strong> menu should appear.</li>
</ol>



<h2 class="wp-block-heading">Concluding remarks</h2>



<p>With these preparations done, many extensions can be installed, which will be shown in <a href="https://www.znjoa.com/2023/07/26/installing-usbnetwork-on-kindle/" target="_blank" rel="noreferrer noopener">the next post</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.znjoa.com/2023/07/25/installing-kual-and-mrpi-on-a-jailbroken-kindle-paperwhite-1/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">182</post-id>	</item>
		<item>
		<title>Jailbreaking my Kindle Paperwhite (Gen 1)</title>
		<link>https://blog.znjoa.com/2023/07/25/jailbreaking-my-kindle-paperwhite-gen-1/</link>
					<comments>https://blog.znjoa.com/2023/07/25/jailbreaking-my-kindle-paperwhite-gen-1/#comments</comments>
		
		<dc:creator><![CDATA[Zz]]></dc:creator>
		<pubDate>Tue, 25 Jul 2023 20:35:00 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[downgrading]]></category>
		<category><![CDATA[Jailbreaking]]></category>
		<category><![CDATA[Kindle]]></category>
		<category><![CDATA[paperwhite]]></category>
		<guid isPermaLink="false">http://192.168.0.186/?p=159</guid>

					<description><![CDATA[The main steps are (1) downgrading and then (2) jailbreaking. The details are shown below with&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[
<p>The main steps are (1) <strong>downgrading</strong> and then (2) <strong>jailbreaking</strong>. The details are shown below with most of the information from <a href="https://www.mobileread.com">MobileRead</a>.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Downgrading:</h2>



<p><em>This is mainly based on <a rel="noreferrer noopener" href="https://www.mobileread.com/forums/showthread.php?t=264432" target="_blank">this post</a> on MobileRead.</em></p>



<p>The firmware on my KW1 is <code>5.6.6.1</code> which doesn&#8217;t seem to be jailbreaking ready according to MobileRead. Thus, it needs to be downgraded to a supported version of firmware <code>(5.3.3</code> before applying jailbreaking. The steps are:</p>



<ol class="wp-block-list">
<li>Download <code>5.3.3</code> firmware <a href="https://s3.amazonaws.com/G7G_FirmwareUpdates_WebDownloads/update_kindle_5.3.3.bin" target="_blank" rel="noreferrer noopener">here</a></li>



<li>Disable your Kindle&#8217;s WiFi by turning on airplane mode</li>



<li>Connect your Kindle to your computer through USB cable, you should see a wallpaper displaying <code>USB Drive Mode</code></li>



<li>Once connected, copy the download firmware <code>(.bin)</code> to the root of your connected Kindle</li>



<li>keep connected, wait for 2 minutes</li>



<li><strong>Press and hold</strong> power button until Kindle is restarted, now it should be installing the firmware.</li>



<li>You can confirm the downgrading after the reboot by going to: <code>Menu--Settings--Menu--device info</code></li>
</ol>



<p>If you see <code>5.3.3</code> for the firmware, congrats! You have successfully downgraded the firmware on your Kindle Paperwhite 1.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Jailbreaking</h2>



<p><em>This is mainly based on <a href="https://www.mobileread.com/forums/showthread.php?t=186645" target="_blank" rel="noreferrer noopener">this post </a>on MobileRead.</em></p>



<p>Now you are on <code>5.3.3</code>, you can jailbreak your Kindle by following these steps:</p>



<ol class="wp-block-list">
<li>Download <code><strong>K5 JailBreak</strong>&nbsp;<em>(5.0.x - 5.4.4.2)</em></code> file from <a rel="noreferrer noopener" href="https://www.mobileread.com/forums/showthread.php?t=225030" target="_blank">Snapshots page </a>on MobileRead.</li>



<li>Connect your Kindle to your computer by USB, make sure it&#8217;s in USB drive mode</li>



<li>Extract the content of the downloaded <code>tar.xz</code> file <strong>(not the folder <code>JailBreak</code> itself)</strong> to the root folder of your Kindle. </li>



<li>Update the Kindle system as you normally will by going to: <code>Menu--Settings--Menu--Update your Kindle</code>. <strong>The system will not reboot.</strong> Instead, after a few seconds the following text appear <strong><code>**** JAILBREAK ****</code></strong>. This will only appear once.</li>



<li>Restart your Kindle by: <code>Menu--Settings--Menu--Restart</code>.</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Concluding remarks</h2>



<p>Jailbreaking your Kindle opens many new ways for you to use your Kindle. But before going into, several preparations need to be done on the Kindle, which will be shown in <a href="https://www.znjoa.com/2023/07/25/installing-kual-and-mrpi-on-a-jailbroken-kindle-paperwhite-1/" target="_blank" rel="noreferrer noopener">another post</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.znjoa.com/2023/07/25/jailbreaking-my-kindle-paperwhite-gen-1/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">159</post-id>	</item>
		<item>
		<title>DDNS setup using name servers</title>
		<link>https://blog.znjoa.com/2022/11/24/ddns-setup/</link>
					<comments>https://blog.znjoa.com/2022/11/24/ddns-setup/#respond</comments>
		
		<dc:creator><![CDATA[Zz]]></dc:creator>
		<pubDate>Wed, 23 Nov 2022 23:06:05 +0000</pubDate>
				<category><![CDATA[RPi]]></category>
		<category><![CDATA[DDNS]]></category>
		<category><![CDATA[Dynu]]></category>
		<category><![CDATA[Godaddy]]></category>
		<category><![CDATA[nameserver]]></category>
		<guid isPermaLink="false">http://192.168.0.186/?p=134</guid>

					<description><![CDATA[This is about my DDNS setup for znjoa.com which is managed by Godaddy. On the GoDaddy&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[<p>This is about my DDNS setup for znjoa.com which is managed by Godaddy.</p>
<ol>
<li>On the GoDaddy settings page, go to the DNS management page
<ol>
<li>Remove GoDaddy default name servers</li>
<li>Add the following name servers from Dynu
<ol>
<li>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">NS1.DYNU.COM
NS2.DYNU.COM
NS3.DYNU.COM
NS4.DYNU.COM
NS5.DYNU.COM
NS6.DYNU.COM
NS10.DYNU.COM
NS11.DYNU.COM</pre>
</li>
<li>Here, NS10 and NS11 are from Europe. If not added the DNS propagation takes very long for myself to see the change. So just remember to add the NS from your region</li>
</ol>
</li>
<li>Other than this, nothing needs to be done (no c name no a record no site redirection)</li>
</ol>
</li>
<li>On Dynu website:
<ol>
<li>register your domain</li>
<li>Follow <a href="https://www.dynu.com/DynamicDNS/IPUpdateClient/RaspberryPi-Dynamic-DNS">this tutorial</a> to enable the local service of Dynu on rpi4 (which I&#8217;m using to host this site)
<ol>
<li>Use md5 of password for safety</li>
<li><code class="EnlighterJSRAW" data-enlighter-language="bash">echo "password"| md5</code>  is wrong, should be <code class="EnlighterJSRAW" data-enlighter-language="bash">echo -n "password" | md5</code> which does not keep the trailing new line character</li>
</ol>
</li>
<li>Back to Dynu website, go to DDNS services:
<ol>
<li>check your domain is there and the ip address was just updated</li>
<li>this can also be done by checking the log file on the script folder on rpi4</li>
<li>or you can directly enter the url in the script file in a browser and see if there&#8217;s any error</li>
</ol>
</li>
</ol>
</li>
</ol>
<p>Now you are good to go! To me, using name servers from a DDNS provider seems to be faster than redirecting the whole site to a DDNS url (which points to my real public IP) on the GoDaddy website.</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.znjoa.com/2022/11/24/ddns-setup/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">134</post-id>	</item>
		<item>
		<title>Backing up and restoring Raspberry Pi SD card</title>
		<link>https://blog.znjoa.com/2021/05/17/backing-up-and-restoring-raspberry-pi-sd-card/</link>
					<comments>https://blog.znjoa.com/2021/05/17/backing-up-and-restoring-raspberry-pi-sd-card/#respond</comments>
		
		<dc:creator><![CDATA[Zz]]></dc:creator>
		<pubDate>Mon, 17 May 2021 00:06:36 +0000</pubDate>
				<category><![CDATA[RPi]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[pv]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[rpi]]></category>
		<category><![CDATA[watch_progress]]></category>
		<guid isPermaLink="false">http://192.168.0.186/?p=67</guid>

					<description><![CDATA[This shows how to do it on MacOS. It&#8217;s quite straightforward using dd. Backup Remote way&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[
<p><em>This shows how to do it on MacOS. It&#8217;s quite straightforward using <code class="EnlighterJSRAW" data-enlighter-language="generic">dd</code>.</em></p>



<h5 class="wp-block-heading">Backup</h5>



<h6 class="wp-block-heading">Remote way</h6>



<p>If you prefer to do it remotely via SSH, use this command:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">ssh root@your_rpi_ip "dd if=/dev/your_rpi_sd_card bs=1m | gzip -1 -" | pv | dd of=rpi.gz</pre>



<p><code data-enlighter-language="generic" class="EnlighterJSRAW">your_rpi_ip</code>&nbsp;can be obtained by <code data-enlighter-language="generic" class="EnlighterJSRAW">hostname -I</code>&nbsp;. <code data-enlighter-language="generic" class="EnlighterJSRAW">if</code>&nbsp;is followed by the your sd card path when mounted on RPi, which can be obtained by <code data-enlighter-language="generic" class="EnlighterJSRAW">lsblk -p</code>&nbsp;(make sure the disk you believe to be the SD card matches the size of your SD card!). <code data-enlighter-language="generic" class="EnlighterJSRAW">pv</code>&nbsp;is used here so that the progress of <code data-enlighter-language="generic" class="EnlighterJSRAW">dd</code> can be constantly checked. If you don&#8217;t have it, install it using <code data-enlighter-language="generic" class="EnlighterJSRAW">brew install pv</code> if you have homebrew installed.&nbsp;</p>



<p>Depending on the size of your SD card and your connection speed, it could take some time. So go and get a coffee!</p>



<h6 class="wp-block-heading">Local way (RPi end)</h6>



<p>Similarly, you should be able to dd locally on <code data-enlighter-language="generic" class="EnlighterJSRAW">RPi</code> then scp the image to your PC/Mac. As a result, the <code data-enlighter-language="generic" class="EnlighterJSRAW">SSH</code> part will be stripped away:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">dd if=/dev/your_rpi_sd_card bs=1m | gzip -1 - | pv | dd of=rpi.gz</pre>



<p>After it&#8217;s done, you can use <code data-enlighter-language="generic" class="EnlighterJSRAW">scp</code> to transfer the image file to your PC/Mac.</p>



<h6 class="wp-block-heading">Local way (PC/Mac end)</h6>



<p>This is recommended since it&#8217;s faster due to the fact that the SD card is physically connected to your PC/Mac.</p>



<ol class="wp-block-list"><li>Remove the SD card from your RPi and connect it to your computer.</li><li>Check the disk name on your Mac using: <code data-enlighter-language="generic" class="EnlighterJSRAW">diskutil list</code>. Similarly, double check the disk size so that you don&#8217;t make a mistake.</li><li>Same as the local way on RPi end: <code data-enlighter-language="generic" class="EnlighterJSRAW">dd if=/dev/your_rpi_sd_card bs=1m | gzip -1 - | pv | dd of=rpi.gz</code>.</li></ol>



<hr class="wp-block-separator is-style-wide"/>



<h5 class="wp-block-heading">Restoring</h5>



<p>It&#8217;s also pretty straight-forward for the restoring. The steps are:</p>



<ol class="wp-block-list"><li>Connect the SD card to your computer.</li><li>Check the name of the disk using the method mentioned above</li><li>Unmount (not eject) the SD card by <code data-enlighter-language="generic" class="EnlighterJSRAW">diskutil unmountDisk /dev/disk_nr</code></li><li>Burn the image file into your SD card using: <code data-enlighter-language="generic" class="EnlighterJSRAW">gzip -dc yourRPiImage | pv | sudo dd of=/dev/disk_nr bs=1m</code></li></ol>



<p>After another coffee, you can plug your SD card back into your RPi. Enjoy your back-to-life RPi.</p>



<h5 class="wp-block-heading">P.S.</h5>



<p>Instead of using <code data-enlighter-language="generic" class="EnlighterJSRAW">pv</code>, <code data-enlighter-language="generic" class="EnlighterJSRAW">progress</code> and <code data-enlighter-language="generic" class="EnlighterJSRAW">watch</code> can be used together to check the status. So run the above commands without <code data-enlighter-language="generic" class="EnlighterJSRAW">pv</code>, and open another terminal and run <code data-enlighter-language="generic" class="EnlighterJSRAW">watch progress</code>, you now even have a progress bar!</p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.znjoa.com/2021/05/17/backing-up-and-restoring-raspberry-pi-sd-card/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">67</post-id>	</item>
		<item>
		<title>Install Pi-hole with existing Apache2 on Raspberry Pi 4</title>
		<link>https://blog.znjoa.com/2021/05/16/install-pi-hole-with-existing-apache2-on-raspberry-pi/</link>
					<comments>https://blog.znjoa.com/2021/05/16/install-pi-hole-with-existing-apache2-on-raspberry-pi/#respond</comments>
		
		<dc:creator><![CDATA[Zz]]></dc:creator>
		<pubDate>Sun, 16 May 2021 22:25:23 +0000</pubDate>
				<category><![CDATA[RPi]]></category>
		<category><![CDATA[dns-sink]]></category>
		<category><![CDATA[pi-hole]]></category>
		<category><![CDATA[rpi]]></category>
		<guid isPermaLink="false">http://192.168.0.186/?p=36</guid>

					<description><![CDATA[This is a record of the steps that I took to install pi-hole on my raspberry&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[<p><em>This is a record of the steps that I took to install pi-hole on my raspberry pi (RPi). It might not be universally applicable. Still hopefully it can help some out there.</em></p>
<h5><strong>Precondition</strong></h5>
<ul>
<li>apache2 and php already installed and set up on your raspberry pi (raspbian)</li>
</ul>
<hr />
<h5 class="wp-block-heading"> <strong>Download and run the automated install</strong> (<a href="https://github.com/pi-hole/pi-hole">Reference</a>)</h5>



<p>Run this command in the terminal:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="shell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">curl -sSL https://install.pi-hole.net | bash</pre>



<ol class="wp-block-list">
<li><em>Select interface:</em> wlan0 (depending on your need, wlan0 is for wifi and eth0 is for the wired connection)</li>
<li><em>Select DNS provider</em>: OpenDNS</li>
<li><em>IPv4&amp;v6:</em> both</li>
<li><em>Use static IP?:</em> Yes</li>
<li><em>Web admin interface</em>: yes</li>
<li><em>Install web server?</em>: <strong>No</strong></li>
<li><em>Log query</em>: On</li>
<li><em>Privacy</em>: full</li>
</ol>



<p>After these steps, a message will appear in the terminal telling you the IP and the password of the admin page (something like <code class="EnlighterJSRAW" data-enlighter-language="shell">http://192.168.x.xxx</code>). Note this down as you will need it later.</p>



<h5 class="wp-block-heading">Two warnings</h5>



<p>The installation finished with two warnings:</p>



<ol class="wp-block-list">
<li><em>xxx modules are missing for php</em></li>
<li><em>the web server user needs to be member of the &#8220;pihole&#8221; group for full functionality</em></li>
</ol>



<p>The first can be solved using <code><code class="EnlighterJSRAW" data-enlighter-language="shell">sudo apt install php-xxx</code></code> to install these packages.</p>



<p>The second can be solved by <code class="EnlighterJSRAW" data-enlighter-language="shell">sudo usermod -a -G pihole your_apache2_user</code>.</p>



<h5 class="wp-block-heading"><strong>Some setup on the admin page</strong></h5>



<p>On the left, go to <code>group management -&gt; Adlists</code> to add custom list. Below are some that I use:</p>



<ul class="wp-block-list">
<li><a href="https://raw.githubusercontent.com/0Zinc/easylists-for-pihole/master/easylist.txt">Easy list</a></li>
<li><a href="https://raw.githubusercontent.com/0Zinc/easylists-for-pihole/master/easyprivacy.txt">Easy privacy</a></li>
<li><a href="https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt">Developer Dan&#8217;s ads&amp;tracking list</a></li>
<li><a href="https://cdn.jsdelivr.net/gh/neoFelhz/neohosts@gh-pages/basic/hosts">Neohosts basic</a></li>
<li><a href="https://github.com/easylist/easylistchina/blob/master/easylistchina.txt">Easylist China</a></li>
</ul>



<p>After adding your lists, go to tools -&gt; update gravity -&gt; update.</p>



<h5 class="wp-block-heading"><strong>Check it’s working</strong></h5>



<p>Go to a site that you are certain that is riddled with ads or a ab backer checker site (such as<a href="https://d3ward.github.io/toolz/src/adblock.html" target="_blank" rel="noreferrer noopener"> this one</a>), and you show see that most of the ads are gone!</p>



<p>Now, enjoy a more pleasant online experience!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.znjoa.com/2021/05/16/install-pi-hole-with-existing-apache2-on-raspberry-pi/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">36</post-id>	</item>
	</channel>
</rss>
