<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[lupin.rocks | Maciej P. Wilczyński]]></title><description><![CDATA[Yet another boring tech blog.]]></description><link>https://blog.lupin.rocks/</link><image><url>https://blog.lupin.rocks/favicon.png</url><title>lupin.rocks | Maciej P. Wilczyński</title><link>https://blog.lupin.rocks/</link></image><generator>Ghost 3.40</generator><lastBuildDate>Wed, 08 Apr 2026 13:19:07 GMT</lastBuildDate><atom:link href="https://blog.lupin.rocks/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Bringing bricked Xiaomi STYJ02YM back to life]]></title><description><![CDATA[<p>So you just received your <a href="https://s.click.aliexpress.com/e/_dSPDLhc">brand-new Xiaomi vacuum</a>. Full of enthusiasm you've taken it out of the box, found a place for it to charge, connected to power and paired with the Mi Home app. There's a chance that the first thing you've seen was a message prompting you to</p>]]></description><link>https://blog.lupin.rocks/bringing-bricked-xiaomi-styj02ym-back-to-life/</link><guid isPermaLink="false">5e8742689889320001e2415f</guid><category><![CDATA[xiaomi]]></category><category><![CDATA[styj02ym]]></category><category><![CDATA[viomi v2]]></category><category><![CDATA[viomi v2 pro]]></category><category><![CDATA[mi robot vacuum mop]]></category><category><![CDATA[vacuum]]></category><category><![CDATA[update]]></category><category><![CDATA[stuck]]></category><category><![CDATA[bricked]]></category><category><![CDATA[fix]]></category><category><![CDATA[bootloop]]></category><category><![CDATA[root]]></category><category><![CDATA[SKV4110GL]]></category><category><![CDATA[fel mode]]></category><category><![CDATA[sunxi]]></category><category><![CDATA[fastboot]]></category><category><![CDATA[adb]]></category><category><![CDATA[unbrick]]></category><dc:creator><![CDATA[Maciej P. Wilczyński]]></dc:creator><pubDate>Mon, 06 Apr 2020 08:29:13 GMT</pubDate><media:content url="https://blog.lupin.rocks/content/images/2020/04/IMG_1214-1-.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://blog.lupin.rocks/content/images/2020/04/IMG_1214-1-.jpg" alt="Bringing bricked Xiaomi STYJ02YM back to life"><p>So you just received your <a href="https://s.click.aliexpress.com/e/_dSPDLhc">brand-new Xiaomi vacuum</a>. Full of enthusiasm you've taken it out of the box, found a place for it to charge, connected to power and paired with the Mi Home app. There's a chance that the first thing you've seen was a message prompting you to update the device to a newer firmware version. And you went for, of course. Maybe you were affected by the <a href="https://blog.lupin.rocks/fixing-xiaomi-styj02ym-update-stuck-on-80/">"stuck on 80% bug"</a> and had to use my workaround to make it download the update, maybe you were one of the lucky ones and didn't have to tinker for it to start. Nevertheless, the update is now downloading. You wait impatiently, eager to see how the Chinese device cleans the floor in your apartment. 90% complete, just a few more seconds and the newest firmware is going to be there. 95%, the device restarts. LED lights on the buttons start slowly blinking white. You wait for it to finish booting up and…</p><p>Yeah, that's it. Nothing's happening. After a few more minutes of waiting, the progress bar in the app turns red and says that the update has failed. The vacuum's light doesn't turn solid white and keeps slowly flashing instead. You try to use different key combinations, maybe even make the lights go orange or red. The device, however, is completely dead. A soft Chinese voice doesn't greet you nicely when you power on the vacuum. You're sad, mad, broken and wondering why you didn't buy a Roomba.</p><p>I, too, have been there. After hours of browsing the Internets, searching for a way to fix it, I started to believe that my adventure with the STYJ02YM has ended even before it began. The vacuum didn't even start the ADB server on boot anymore. There was no way to connect to it through the micro USB port. So, having nothing to lose, I took it apart. And many hours later, I heard the Chinese voice, and the device started breathing again. And now I'm writing this little guide to tell you how I did it.</p><h2 id="a-few-words-before-you-begin">A few words before you begin</h2><p>While I realize that if you're reading this guide, you probably don't have anything to lose too, you need to realize that this is a dangerous operation and if something goes wrong, your device might end up in a state that nothing will ever be able to fix it. This is <em>not</em> a guide for people who have no experience with electronics. As always, I take no responsibility for any damage done to your device.</p><h2 id="prerequisites">Prerequisites </h2><p>These are the things you're going to need if you want to follow the guide:</p><ul><li>A bricked <a href="https://s.click.aliexpress.com/e/_dSPDLhc">Xiaomi STYJ02YM</a></li><li>Micro USB cable</li><li>USB to TTL converter (I used <a href="https://s.click.aliexpress.com/e/_d6IquRk">this one</a>)</li><li><a href="https://s.click.aliexpress.com/e/_d7zAfXY">Female-Male dupont cables</a> or <a href="https://s.click.aliexpress.com/e/_d7zAfXY">Female-Female cables</a> with <a href="https://s.click.aliexpress.com/e/_dTTM1vU">header connectors</a> (recommended)</li><li>Set of Philips screwdrivers</li><li>A Linux or macOS computer. It's completely possible to do it on Windows but I have no knowledge and no experience with that.</li><li>Android <a href="https://developer.android.com/studio/releases/platform-tools">platform-tools</a> installed on the device</li><li>A lot of patience</li></ul><h2 id="preparations">Preparations</h2><p>Before we begin the actual operation, you need to get to the insides of your vacuum. This is not particularly easy. Start by removing the battery lid and the battery itself. Then, unscrew the front bumper. After that you can start unscrewing the main screws on the bottom. Don't forget about the small ones in between the water outlets too!</p><p>With all the screws gone, separate the two pieces of the vacuum's body. You need to use a small amount of force but also figure out a way to do it without breaking anything. It took me quite a while to get it done, but it's possible. Just keep trying.</p><p>There's a single wire harness between the two pieces of the housing, connecting the motherboard to the Lidar sensor. Disconnect it and focus on the bottom part of the vacuum, the one with the motherboard. What you should be seeing is a motherboard, looking like the one on the picture on top of the article. </p><p>Now's the right time to connect your micro USB cable to the vacuum. Don't connect it to the computer yet, we'll do that later. Just connect the cable to the vacuum and leave it there for the rest of the process. Also, the battery should <strong>not</strong> be connected — we'll power the device through the USB port only.</p><p>And now it's time for the critical part. We need to connect our serial converter to the UART pins on the vacuum motherboard. These are the pins that we need to connect to:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.lupin.rocks/content/images/2020/04/IMG_1215-1.jpg" class="kg-image" alt="Bringing bricked Xiaomi STYJ02YM back to life"><figcaption>STYJ02YM serial pins</figcaption></figure><p>If you're using header pins, solder them now. If you're going with plain dupont cables, put the male connectors into those three holes, making sure they're touching the metal connectors on the board, and fix them in place using some non-conductive tape.</p><p>The last step before we begin is to download the newest firmware for your device. Head over to my <a href="https://blog.lupin.rocks/fixing-xiaomi-styj02ym-update-stuck-on-80/">previous guide</a> and download the latest package to your computer. Once ready, unpack it (don't mind the <code>.bin</code> extension, it's just a gzip archive) and then unpack the <code>target_sys.tar.gz</code> file. There should two files inside - <code>boot.img</code> and <code>rootfs.img</code>. Have them prepared for the next steps, these two are the key to bringing life back into your vacuum.</p><h2 id="what-s-the-issue">What's the issue?</h2><p>I still haven't explained what happens to broken vacuums that makes them not boot up anymore. Well, you're going to see that yourself in just a minute. The device actually <em>tries</em> to boot up. The unfinished update makes it boot to a recovery mode first, probably to finish the update process. The recovery, however, is broken. The moment it starts loading the kernel, the device reboots and the entire process starts over again, effectively placing the device in a bootloop.</p><p>What we're going to do to fix that is to manually flash the latest system image directly to the disk and then override the recovery image with our base boot image, so when the device launches again and tries to boot into recovery, a normal boot process is going to happen. </p><p>If you're wondering if that process breaks something on the device (for example standard updates, executed through the Mi Home app), then the answer is <strong>no</strong>. I've flashed the v3.5.3__0046 image using the method I'm describing in this guide and executed a successful, standard update to 0047 afterwards — without any issues.</p><h2 id="the-easy-part">The easy part</h2><p>Let's finally begin. Take your USB serial converter and connect the dupont cables from the motherboard like that:</p><pre><code class="language-generic">USB serial converter &lt;-&gt; Vacuum motherboard

3V3 &lt;-&gt; not connected
TX &lt;-&gt; RX
RX &lt;-&gt; TX
GND &lt;-&gt; GND
5V &lt;-&gt; not connected</code></pre><p>With that, plug that converter into your computer and find out its name in your system (probably something like <code>/dev/ttyUSB0</code>). Then, let's start the screen session:</p><pre><code class="language-bash">screen /dev/ttyUSB0 115200</code></pre><p>You should see be seeing a blank screen. Grab the USB cable connected to the vacuum and connect it to your computer too. If you connected everything properly, boot output should be streaming to your screen!</p><h2 id="the-ugly-part">The ugly part</h2><p>Now comes the part that I'm totally ashamed of. You might've noticed that UBoot doesn't react to anything you type on your keyboard – even when it says "press any key to stop auto boot". For some reason, it goes straight away to booting from disk and the only way to make it not do that is to, well, temporarily get rid of the disk.</p><p>The way I accomplished it was to grab something conductive (a flat screwdriver in my case) and place it on top of the flash chip pins so that it caused a short circuit and made UBoot launch its shell. I told you it was ugly. And while, yes, it worked for me a few times in a row, there was a huge chance that it would burn the chip. Keep that in mind while doing it yourself. It's an <strong>ugly</strong>, <strong>dangerous</strong> and overall <strong>awful</strong> solution, but it's the only one I was able to find. I could, of course, unsolder the chip completely and then solder it back with the device booted up to the UBoot command line, but it would take ages given how many times I had to go through the process.</p><p>If you manage to find a better way of doing it, please let me know and I'll remove this section completely so that no one else knows that I shared something this dirty.</p><p>If you are reading this, though, then you probably need to do that the way I did it. To make it a little easier for you, I marked the pins that you need to connect with a red line below:</p><figure class="kg-card kg-image-card"><img src="https://blog.lupin.rocks/content/images/2020/04/IMG_1215-1-.jpg" class="kg-image" alt="Bringing bricked Xiaomi STYJ02YM back to life"></figure><p>Of course, you need to do that while the device is powered up and bootlooping, and hold until you see a command line prompt (a line ending with <code>#</code> and waiting for you to type commands). Also, don't connect <em>all</em><strong><em> </em></strong>the pins. Even just two should be enough. The more you do, the higher the chances of frying the chip.</p><h2 id="we-re-almost-there">We're almost there</h2><p>Now, if you have access to the bootloader command line, the most difficult part is behind you and you're just a few steps from having a vacuum again. Grab that shell and execute the following command:</p><pre><code class="language-generic">fastboot_test</code></pre><p>Then, open up a second tab in your terminal app and execute (locally, on your computer):</p><pre><code class="language-bash">fastboot devices</code></pre><p>If the command returns a connected device, you're ready for the final step!</p><p>Navigate to the directory where you unpacked the downloaded OTA package and execute the following commands:</p><pre><code class="language-bash">fastboot flash boot boot.img
fastboot flash rootfs rootfs.img
fastboot flash recovery boot.img</code></pre><p>Your output should like similar to this:</p><pre><code class="language-bash"># &gt; fastboot flash boot boot.img
Sending 'boot' (4096 KB)                           OKAY [  0.202s]
Writing 'boot'                                     OKAY [  0.626s]
Finished. Total time: 0.861s

# &gt; fastboot flash rootfs rootfs.img
Sending 'rootfs' (23040 KB)                        OKAY [  1.001s]
Writing 'rootfs'                                   OKAY [  3.448s]
Finished. Total time: 4.483s

# &gt; fastboot flash recovery boot.img                
Sending 'recovery' (4096 KB)                       OKAY [  0.204s]
Writing 'recovery'                                 OKAY [  0.627s]
Finished. Total time: 0.863s</code></pre><p>Now go back to the screen terminal tab, hit <code>ctrl-c</code> on your keyboard to exit the fastboot mode and type <code>reset</code>. Wait a few seconds and you should hear your vacuum speaking to you again. The only thing left now is to assemble it back together.</p><h2 id="instructions-unclear-got-my-junk-caught-in-a-ceiling-fan">"Instructions unclear, got my junk caught in a ceiling fan"</h2><p>Well, I warned you that I wasn't going to make it a guide for beginners. It's a difficult process and you should only do it if you at least suspect what you'd be doing. Despite its riskiness, the process <em>can</em> help you bring your vacuum back to life and given that you don't have much to lose, you can just go for it and try it. </p><p>If you need any help, the comments section below is there for you, so go ahead and ask away. I'll do my best to help.</p><p>Coming up with a way to fix my vacuum took way more time than it might seem when you look at the steps above. I spent many hours trying out different ways and combinations before I eventually came up with the one, which I believe was the easiest. If you like my work, used it to fix your vacuum, or just appreciate my efforts, you can go ahead and <a href="https://paypal.me/lupinrocks?locale.x=en_US">buy me a beer</a>. I surely won't mind that :)</p><!--kg-card-begin: html--><div style="text-align:center;">
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
		<input type="hidden" name="cmd" value="_donations">
		<input type="hidden" name="business" value="N9XB6QT2JEAD2">
		<input type="hidden" name="currency_code" value="USD">
		<input type="image" src="https://www.paypalobjects.com/en_US/PL/i/btn/btn_donateCC_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button">
		<img alt="Bringing bricked Xiaomi STYJ02YM back to life" border="0" src="https://www.paypal.com/en_PL/i/scr/pixel.gif" width="1" height="1">
	</form>
</div>
<!--kg-card-end: html-->]]></content:encoded></item><item><title><![CDATA[Fixing stuck Xiaomi STYJ02YM updates]]></title><description><![CDATA[<p>If you're an owner of a Xiaomi-branded version of the Viomi V2 Pro — the beautifully called <a href="https://s.click.aliexpress.com/e/_dSPDLhc">STYJ02YM</a>, also known as the Mi Robot Vacuum Mop Pro in Europe — you might've encountered a common problem while trying to update the device. Quite often the progress bar jumps from 1% straight to</p>]]></description><link>https://blog.lupin.rocks/fixing-xiaomi-styj02ym-update-stuck-on-80/</link><guid isPermaLink="false">5e83296a8b927800016837aa</guid><category><![CDATA[xiaomi]]></category><category><![CDATA[styj02ym]]></category><category><![CDATA[viomi v2]]></category><category><![CDATA[viomi v2 pro]]></category><category><![CDATA[robot]]></category><category><![CDATA[vacuum]]></category><category><![CDATA[update]]></category><category><![CDATA[stuck]]></category><category><![CDATA[fix]]></category><category><![CDATA[mi robot vacuum mop]]></category><category><![CDATA[root]]></category><category><![CDATA[80%]]></category><category><![CDATA[70%]]></category><category><![CDATA[90%]]></category><category><![CDATA[1%]]></category><category><![CDATA[SKV4110GL]]></category><dc:creator><![CDATA[Maciej P. Wilczyński]]></dc:creator><pubDate>Wed, 01 Apr 2020 08:45:45 GMT</pubDate><media:content url="https://blog.lupin.rocks/content/images/2020/04/20200401_103923-1-.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://blog.lupin.rocks/content/images/2020/04/20200401_103923-1-.jpg" alt="Fixing stuck Xiaomi STYJ02YM updates"><p>If you're an owner of a Xiaomi-branded version of the Viomi V2 Pro — the beautifully called <a href="https://s.click.aliexpress.com/e/_dSPDLhc">STYJ02YM</a>, also known as the Mi Robot Vacuum Mop Pro in Europe — you might've encountered a common problem while trying to update the device. Quite often the progress bar jumps from 1% straight to 70, 80 or in some cases 90% and gets stuck there, until a few minutes later an error message appears. I, too, have been affected by this bug and after a few hours of debugging, I found a way to fix it.</p><p>Before we get into the instructions, keep in mind that although the process is fairly simple and I did my best to describe it as thoroughly as I could, you still need to have some technical knowledge if you want to follow it safely, at least to know when things are going south. I take no responsibility for any damage done to your device.</p><p>Alright, with that in mind, <strong>let's begin</strong>!</p><h2 id="prerequisites">Prerequisites </h2><ul><li>Xiaomi <a href="https://s.click.aliexpress.com/e/_dSPDLhc">STYJ02YM</a> - that's quite obvious</li><li>Android <a href="https://developer.android.com/studio/releases/platform-tools">platform-tools</a> installed on your computer</li><li>SSH client installed on your computer</li><li>A Linux/Unix shell with some basic knowledge about it (Linux and macOS are fine natively, on Windows you're going to need to use either Cygwin or WSL)</li><li>Micro USB cable</li><li>Small Philips screwdriver</li></ul><h2 id="rooting-the-device">Rooting the device</h2><p>To be able to access the device's file system, your device needs to be rooted. <a href="https://github.com/rumpeltux">Rumpeltux</a> has already done a <a href="https://itooktheredpill.irgendwo.org/2020/rooting-xiaomi-vacuum-robot/">great job</a> by finding quite an easy way to root the STYJ02YM and describing it, but I'll put the instructions below anyway, adding some more details to make it easier for everyone to understand and follow.</p><h3 id="find-the-micro-usb-port">Find the micro USB port</h3><p>When you take out the main brush and its cover, you'll find out that there's a small plastic cover on top of it, held by four small screws. Unscrew them and take the lid off.</p><p>When you're done, you should be seeing a battery. Take that out too and disconnect it from the board. You're going to behold a micro USB port, sitting there and impatiently waiting for you to connect a cable into it. I've allowed myself to use a photo of that from Rumpeltux's guide below.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://blog.lupin.rocks/content/images/2020/03/battery-case.jpg" class="kg-image" alt="Fixing stuck Xiaomi STYJ02YM updates"><figcaption>A micro USB port beneath the battery (author: rumpeltux)</figcaption></figure><p>Connect the micro USB plug into the vacuum (with the battery still disconnected), but don't connect it to your computer just yet. </p><p>The device publishes an Android ADB server through the USB port, but it does so very briefly, for about 2 seconds on every boot. After that, the robot app disables the protocol. However, we can use that short 2-second window to execute our commands and enable SSH access to the system. </p><h3 id="adb-shell-replacement">ADB Shell replacement</h3><p>The vanilla <code>adb_shell</code> script that gets executed every time the <code>adb shell</code> command is run isn't particularly useful. In fact, it's completely useless. Here's how it looks like:</p><figure class="kg-card kg-code-card"><pre><code class="language-bash">#!/bin/sh
export ENV='/etc/adb_profile'
if [ $1 = '-' ];then
	/bin/login
elif [ $1 = '-c' ];then
	/bin/login -c "$2"
else
	/bin/login
fi</code></pre><figcaption>Stock adb_shell script</figcaption></figure><p>There's no point in using the <code>/bin/login</code> binary over the ADB shell. Especially given the fact that it doesn't even accept such parameter as <code>-c</code>. So, let's modify it  to actually fit our needs.</p><p>Create a file on your computer and call it <code>adb_shell</code> too. Paste the following script into it:</p><figure class="kg-card kg-code-card"><pre><code class="language-bash">#!/bin/sh
export ENV='/etc/adb_profile'
exec /bin/sh "$@"</code></pre><figcaption>Modified adb_shell script</figcaption></figure><p>Now, we need to upload the script onto the machine. Luckily, the <code>adb push</code> command allows us to modify the root file system, so we can do it with a single line of code. Unfortunately, given that ADB will be available very briefly, we need to place that command in a loop and connect the vacuum to our computer when the loop is running.</p><p>Fire up your terminal up, and execute the following commands (with the vacuum still disconnected):</p><pre><code class="language-bash">chmod 755 adb_shell
while true; do adb push -a adb_shell /bin/adb_shell | grep -v "no devices"; done</code></pre><p>With the command running, connect the device to your computer. You still don't need the battery - 5V from the USB port is enough to power the motherboard.</p><p>If you're lucky, you're going to see a message like this:</p><pre><code class="language-generic">adb_shell: 1 file pushed, 0 skipped. 0.0 MB/s (100 bytes in 0.033s)</code></pre><p>If you do, you can ignore any messages that follow that one - even if they state some errors. If you, however, did not see a line like this a few seconds after connecting the vacuum (or didn't see any output), disconnect the vacuum, wait a few seconds, and try again. It can take quite a lot of tries to get it done. Just keep reconnecting the vacuum until it succeeds.</p><p>After the file's been copied, press <code>ctrl+c</code> to exit the loop and proceed with the next steps.</p><p>Now we're going to remove the symlink to the main robot app service, so that ADB does not get disabled on every boot. Execute the following command:</p><pre><code class="language-bash">while true; do (adb shell rm /etc/rc.d/S90robotManager &amp;&amp; echo "Done") 2&gt;&amp;1 | grep -v "no devices"; done</code></pre><p>Same as before, when you see "Done", the command has succeeded. If it doesn't show up, unplug the vacuum, wait, and connect it again.</p><p>If the previous command has succeeded, the ADB should no longer be disabled on boot. To verify that, connect the vacuum and execute <code>adb shell</code>. If you see the output below and get a working shell, you're ready to proceed! </p><figure class="kg-card kg-code-card"><pre><code class="language-bash">BusyBox v1.24.1 () built-in shell (ash)

_____  _              __     _
|_   _||_| ___  _ _   |  |   |_| ___  _ _  _ _
  | |   _ |   ||   |  |  |__ | ||   || | ||_'_|
  | |  | || | || _ |  |_____||_||_|_||___||_,_|
  |_|  |_||_|_||_|_|  Tina is Based on OpenWrt!
----------------------------------------------
Tina Linux (Neptune, 57513AA3)
----------------------------------------------
root@TinaLinux:~#</code></pre><figcaption>Working Tina Linux shell on STYJ02YM through ADB</figcaption></figure><p>Now it's time to install the Dropbear binary on the robot to enable SSH access. You can compile it yourself for the Sunxi architecture (guidelines on how to do that in the Rumpeltux's guide), but the easier way would be to use the precompiled binary - again, courtesy of Rumpeltux. You can download it from <a href="https://blog.lupin.rocks/download/dropbear_2015.71-2_sunxi.ipk">here</a>.</p><p>Having downloaded the package, navigate to its directory in your terminal and execute the following commands (locally, not on the vacuum):</p><pre><code class="language-bash">adb push dropbear_2015.71-2_sunxi.ipk /tmp
adb shell opkg install /tmp/dropbear_2015.71-2_sunxi.ipk
adb shell sed -i -e "/PasswordAuth/ s/off/on/g" /etc/config/dropbear</code></pre><p>After that, disconnect and reconnect the vacuum. Let's try to access it using SSH. Execute the following command:</p><pre><code class="language-bash">ssh root@192.168.13.37</code></pre><p>Obviously, replace 192.168.13.37 with the actual vacuum IP address. When the command asks you for password, paste in <code>@3I#sc$RD%xm^2S&amp;</code>. Note, that you won't see any output when typing - you just have to <em>believe</em> it's there. Confirm with the return key and you should see the shell output again. If that's the case, execute the following command there:</p><pre><code class="language-bash">passwd</code></pre><p>The command will ask you for a new password, twice. Again, you won't see any movement as you type it. Enter a difficult password, so that your device is protected, but also make sure you're going to remember it. You can also add your public SSH key to the <code>/etc/dropbear/authorized_keys</code> file, but if you don't know what that is, you're free to stay with the password authentication.</p><p>Once that's done, we can re-enable the main robot app so that you actually get your vacuum back instead of having an expensive small computer on wheels. Execute the following command on the vacuum:</p><pre><code class="language-bash">cd /etc/rc.d
ln -s ../init.d/robotManager S90robotManager</code></pre><p>You can re-connect the battery now and put the four screws back in. Your vacuum is rooted and you have SSH access to its system. With just a little bit of luck, you won't have to use its micro USB port ever again. </p><h2 id="updating-the-vacuum">Updating the vacuum</h2><p>You've come a long way to you reach this section. Good news — your device is rooted! Bad news — you still haven't done anything in terms of updating it. So, let's change that.</p><p>First, you need to make sure that the vacuum is docked, charging, and connected to Wi-Fi. Next, you need to connect to it over SSH. To do so, simply execute the following command in your terminal, replacing the IP with the address of your vacuum:</p><pre><code class="language-bash">ssh root@192.168.13.37</code></pre><p>After that, enter the password that you set in the previous steps and you should behold the welcome message from TinaLinux. All further commands will be executed in that shell, on the vacuum.</p><p>Grab your phone and fire up the Mi Home app. Open your vacuum page and tap the "three dots" icon in the top right corner. In the menu that shows up, scroll down and tap "Firmware updates".</p><p>If you see a progress bar, you need to wait until it fails updating. What you should be seeing is a screen with your current version number, new version number, and a button that lets you update the device. <strong>Do not</strong> press that button yet. Instead, switch back to your computer and execute the following:</p><pre><code class="language-bash">cd /mnt/UDISK
cat config/PackageInfoConfig.ini</code></pre><p>The command should return exactly the following:</p><pre><code class="language-ini">[Upgarde_Config]
upgradeInstall=0
packageFlag=0
packageSize=0
remoteUrl=
packageMD5=
otaPackageVersion=
ramdiskSysMD5=
targetSysMD5=</code></pre><p>If it does, grab your phone and hit the "Update" button. When the progress bar jumps from 1% to 70/80/90%, execute the last command again, and you should see an output similar to the one below:</p><pre><code class="language-generic">[Upgarde_Config]
upgradeInstall=0
packageFlag=0
packageSize=0
remoteUrl=https://cdn.cnbj0.fds.api.mi-img.com/miio_fw/6b4f525a582876ddc13d376fee21d9e0_upd_viomi.vacuum.v7.bin?GalaxyAccessKeyId=5721718224520&amp;Expires=159119
1344000&amp;Signature=Y1OSsScYEarrCTx9ebhqb813emM=
packageMD5=6b4f525a582876ddc13d376fee21d9e0
otaPackageVersion=CRL200S-OTA
ramdiskSysMD5=
targetSysMD5=</code></pre><p>Notice the "https" at the beginning of the update URL. The reason the update fails is that it can't finish the SSL handshake successfully, probably due to certificate mismatch or a bug in the SSL library installed on the vacuum. If you execute the command below, you'll see that the file it tries to download is empty, or completely missing:</p><pre><code class="language-bash">root@TinaLinux:/mnt/UDISK# ls -l misc-upgrade/
-rw-r--r--    1 root     root             0 Mar 31 01:35 CRL200S-OTA.tar.gz
</code></pre><p>Luckily, the upgrade process retries the download a few times before it fails, and — even more luckily — it reads the config file every time it does so. The file from the URL below can be downloaded using plain HTTP protocol, so let's make the vacuum do so!</p><p>Open up the config file in a text editor:</p><pre><code class="language-bash">vim config/PackageInfoConfig.ini</code></pre><p>And change the "<strong>https</strong>" at the beginning of the URL to "<strong>http</strong>". With that done, save the file (<code>:wq</code> in VIM) and… that's it. Watch the progress bar on your phone. After a minute or so it should go back to 1% and actually start the download process. You can actually monitor how the file grows by repeating the command:</p><pre><code class="language-bash">ls -l misc-upgrade/</code></pre><h2 id="sharing-is-caring-">Sharing is caring!</h2><p>If you happen to be downloading an update that hasn't been known yet, make sure to copy the update URL from the file you were modifying and share it in the comments section below, along with the version number of the update you were downloading. For some, it might be more useful than you think!</p><p>Currently, we know the URLs of:</p><ul><li><a href="https://cdn.cnbj0.fds.api.mi-img.com/miio_fw/d3ca92018269f29fb046f4f2da53555f_upd_viomi.vacuum.v7.bin?GalaxyAccessKeyId=5721718224520&amp;Expires=1586437654000&amp;Signature=0RlW87tnRHX1h6YekruyCxU6Ozc=&amp;uniqRequestId=25704162">v3.5.3__0046</a> (Vacuum V7)</li><li><a href="https://cdn.cnbj0.fds.api.mi-img.com/miio_fw/6b4f525a582876ddc13d376fee21d9e0_upd_viomi.vacuum.v7.bin?GalaxyAccessKeyId=5721718224520&amp;Expires=1591191344000&amp;Signature=Y1OSsScYEarrCTx9ebhqb813emM=">v3.5.3__0047</a> (Vacuum V7)</li></ul><p>I'll update the list once we get more of those.</p><h2 id="what-s-next">What's next</h2><p>If you're lucky, the update is going to succeed, the vacuum is going to restart and work as great as it ever did. Your device should still be rooted after the update, so if the next one also gets stuck, you can go back to this guide and skip the rooting part.</p><p>You might not be lucky, though, just as many others haven't been — me included, unfortunately. Sometimes the device doesn't start up after an update. It just slowly flashes the buttons white, and that's pretty much all it's capable of doing. <strong>The bug occurs even to people who didn't use the workaround described in this guide to perform the update.</strong> You might be able to update the device without any issues straight from your phone and find out that your vacuum is now an expensive, blinking nightlight that can't even drive.</p><p>I've spent a lot of time on trying to fix my vacuum that got bricked after an update. And yes, I managed to find a way to do it. If you want to find out how, head over to <a href="https://blog.lupin.rocks/bringing-bricked-xiaomi-styj02ym-back-to-life/">this article</a>.</p><p>If you have any questions about the guide, feel free to use the comments section below. If you like my work and used it to fix your vacuum, you can <a href="https://paypal.me/lupinrocks?locale.x=en_US">buy me a beer</a>. One has to drink something in those tough times of home quarantine. </p><!--kg-card-begin: html--><div style="text-align:center;">
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
		<input type="hidden" name="cmd" value="_donations">
		<input type="hidden" name="business" value="N9XB6QT2JEAD2">
		<input type="hidden" name="currency_code" value="USD">
		<input type="image" src="https://www.paypalobjects.com/en_US/PL/i/btn/btn_donateCC_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button">
		<img alt="Fixing stuck Xiaomi STYJ02YM updates" border="0" src="https://www.paypal.com/en_PL/i/scr/pixel.gif" width="1" height="1">
	</form>
</div>
<!--kg-card-end: html-->]]></content:encoded></item><item><title><![CDATA[Seamlessly import your Spotify and Deezer playlists into Apple Music]]></title><description><![CDATA[<p>At the time of writing, there was no other tool like my application. There were <em>some</em> tools, although none of them were nearly as reliable as mine. I've spent a lot of time analyzing iTunes, Apple Music's API protocol (surprisingly based on DAAP), and everything about them. I'm not sure</p>]]></description><link>https://blog.lupin.rocks/seamlessly-import-your-spotify-and-deezer-playlists-into-apple-music/</link><guid isPermaLink="false">5e8323718b92780001683775</guid><category><![CDATA[PreviousBlog]]></category><category><![CDATA[Apple Music]]></category><category><![CDATA[Spotify]]></category><category><![CDATA[playlist]]></category><category><![CDATA[import]]></category><dc:creator><![CDATA[Maciej P. Wilczyński]]></dc:creator><pubDate>Mon, 06 Jul 2015 11:37:00 GMT</pubDate><media:content url="https://blog.lupin.rocks/content/images/2020/03/spotify_music.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.lupin.rocks/content/images/2020/03/spotify_music.png" alt="Seamlessly import your Spotify and Deezer playlists into Apple Music"><p>At the time of writing, there was no other tool like my application. There were <em>some</em> tools, although none of them were nearly as reliable as mine. I've spent a lot of time analyzing iTunes, Apple Music's API protocol (surprisingly based on DAAP), and everything about them. I'm not sure what was a bigger challenge - creating the app or deciding what import method I should use. Eventually, I decided to go perhaps not the most elegant way, but surely the safest and most reliable.</p><h2 id="how-does-the-app-work">How does the app work?</h2><p>Well, it's rather simple from your point of view. You find a Spotify/Deezer playlist that you like, copy it, paste into my app, and the playlist automagically appears in your Apple Music library. <strong>No need</strong> to sniff iTunes' packets (sic!).</p><h2 id="got-any-screenshots">Got any screenshots?</h2><p>Why yes I do. Scroll down and behold the interface designed by a programmer.</p><figure class="kg-card kg-image-card"><img src="https://blog.lupin.rocks/content/images/2020/03/ss_hello.png" class="kg-image" alt="Seamlessly import your Spotify and Deezer playlists into Apple Music"></figure><h2 id="aight-looks-somewhat-good-why-is-it-so-expensive">Aight, looks somewhat good. Why is it so expensive?</h2><p>Excellent question! You might've missed the fact that the app is <strong>completely free</strong>. Like, seriously, it's free, period. Feelin' shocked?</p><h2 id="damn-man-where-do-i-get-it">Damn, man, where do I get it?</h2><p>Another great question. However, before I give you the file, I want you to promise me one thing - <strong>that you will not upload the application on any external server</strong>. If you want to share it with somebody, just give them a link to this wannabe funny article.</p><p>Great, now that I've got your pledge signed with your digital blood, I can give you all that music goodness.</p><p>Without any further ado, here is a big, solid link to the download.</p><p><strong><a href="https://secure.lupine.cc/download/mpi" rel="nofollow">DOWNLOAD</a></strong></p><p>Alright, you downloaded the app, moved it to the Applications folder, and… what? Well, here's a short walkthrough.</p><h2 id="how-do-i-use-it">How do I use it?</h2><p>First, you need to do one thing - <strong>check that your primary system language is set to English</strong>. Seriously, do it. And if it's not, change it, and <strong>restart your Mac</strong>. If you don't do this, the app will not behave correctly and as a result, your playlist won't be imported. I'm sorry, it's not my fault.</p><p>When you first launch the app (or update it), you'll notice a prompt asking for your password. When you enter it, the application is going to automagically do all the necessary setup so that we won't bother you with anything not related to music.</p><p>And then, you'll see this screen:</p><figure class="kg-card kg-image-card"><img src="https://blog.lupin.rocks/content/images/2020/03/ss_uris.png" class="kg-image" alt="Seamlessly import your Spotify and Deezer playlists into Apple Music"></figure><p>The setup is pretty straightforward, although I'm going to explain everything anyway.</p><h3 id="apple-music-country-code">Apple Music country code</h3><p>It's a two-letter code of your Apple ID country. For example, if you have an American Apple ID, the code is <em>us</em> (all lowercase). For Polish, it's <em>pl</em>, and so on. If you don't know the code, please follow the steps below:</p><p>First, find any track in your Apple Music library.</p><p>Next, click the button next to its title, and click Share.</p><figure class="kg-card kg-image-card"><img src="https://blog.lupin.rocks/content/images/2020/03/ss_sharing.png" class="kg-image" alt="Seamlessly import your Spotify and Deezer playlists into Apple Music"></figure><p>Finally, click "Copy Link". Once you do this, paste the copied URL into any text editor. You're going to see something like this: https://itun.es/<strong>pl</strong>/vmr5?i=15012655. Two letters between slashes are your country code.</p><h3 id="playlist-source">Playlist source</h3><p>Well, if you want to import a Spotify playlist, you select Spotify. Guess what you need to select if you want to import a Deezer playlist…</p><h3 id="force-match">Force match</h3><p>Now, that's an interesting setting. @maciej's Playlist Importer (man, I love this name) by default uses an innovative matching method. It's good. It's great. But due to its novelty, it can have some bugs. Enabling this option will use some other way to import all the songs that MPI's algorithm couldn't handle. Default: on, recommended: on.</p><h3 id="importing-method">Importing method</h3><p>Talk about innovation. Both importing methods used in MPI are absolutely innovative and neither of them have been used before in similar apps. Well, that's because none of those apps actually import playlists… Anyway, there's the safe way and the experimental way. Safe is better, but it won't add songs that you've already had in your library to your new playlist. Experimental <s>will</s> should add them, although it fails quite often and quite hard. I think my personal record using this method is 1 imported song out of 56 matched. Hell yeah.</p><p>If you select "Safe" and it fails, @maciej's Playlist Importer will automatically use Experimental. If Experimental fails… well, at least your songs have been added to <em>My Music</em>.</p><h3 id="spotify-uris-deezer-playlist-url">Spotify URIs/Deezer playlist URL</h3><p>And now it's time for the most important thing. Here, I made a short GIF to show you how to get those.</p><h4 id="spotify">Spotify</h4><figure class="kg-card kg-image-card"><img src="https://blog.lupin.rocks/content/images/2020/03/spotifyuri.gif" class="kg-image" alt="Seamlessly import your Spotify and Deezer playlists into Apple Music"></figure><p>Yeah, it's that simple. You can copy as many as you want, but remember - only single track URIs are supported.</p><h4 id="deezer">Deezer</h4><figure class="kg-card kg-image-card"><img src="https://blog.lupin.rocks/content/images/2020/03/deezerurl.gif" class="kg-image" alt="Seamlessly import your Spotify and Deezer playlists into Apple Music"></figure><p>Yeah, it's even easier.</p><figure class="kg-card kg-image-card"><img src="https://blog.lupin.rocks/content/images/2020/03/ss_matching.png" class="kg-image" alt="Seamlessly import your Spotify and Deezer playlists into Apple Music"></figure><h2 id="got-it-now-what">Got it. Now what?</h2><p>Now… you know what to do. But please keep in mind that once the process begins (aka. once you see Bing's Image of the Day), <strong>you mustn't click your mouse, move your mouse, or touch your keyboard</strong>. Just… watch. Seriously, it's not <em>just in case</em>. If you do anything, the process <strong>will</strong> fail. And the funniest thing is that you won't even know about it until it's finished.</p><p>But if you didn't interrupt the process and everything went right, you can start enjoying your music. You can rename the playlist any time you want.</p><figure class="kg-card kg-image-card"><img src="https://blog.lupin.rocks/content/images/2020/03/ss_done.png" class="kg-image" alt="Seamlessly import your Spotify and Deezer playlists into Apple Music"></figure><h2 id="it-ain-t-workin-wat-do">It ain't workin', wat do?</h2><p>Calm down, take a deep breath, and read everything above again. If you're sure you did everything right, check for updates. Your issue might me fixed in a newer release. To check for updates, open up MPI, click on its name in the top menu bar, and select "Check for updates". If there's no new updates or the update didn't fix your problem, open up Applications &gt; Utilities &gt; Console. Find the first line that start's with "<em>@maciej's Playlist Importer</em>" and copy everything from that line to the end of the log. Then paste it on pastebin.com, and send it to me on Twitter (I guess you already know my handle) or drop me an email (mpi@lupin.rocks) with a detailed description of your problem. I'll be glad to help.</p><h2 id="dear-lord-are-you-a-wizard">Dear lord, are you a wizard?</h2><p>Actually, no. I'm just a programmer. In fact, you can even hire me! Visit <a href="http://lupine.software">https://lupine.software</a> for more details.</p><h2 id="that-s-it">That's it?</h2><p>Yes. Wait, no, it's not. Read the "Credits" section in the app. There's more.</p>]]></content:encoded></item></channel></rss>