Redmi 1W recovery steps

Assuming the phone can only boot till MIUI logo then it restarts, this means the phone is already hard bricked. You have no choice but to reload the fastboot firmware. I’ve read through many tutorials and found them not useful. Through trial and error, I managed to figure out the specific steps to recover a bricked Redmi 1W.

You need to know this information: Redmi 1W uses the MediaTek 6589T chip.

You will need to download 1. SP Flash Tool version 5.1724 or earlier 2. MIUI Recovery Rom from Xiaomi 3. MediaTek Windows Drivers.

Step 1: Install the MediaTek Windows Drivers

Step 2: Unrar the MIUI Recovery Rom file, we need one file called the scatter textfile. The scatter text file lists all the addresses of peripherals of the phone.

Step3: Extract and execute SP Flash Tool version 5.1724 or earlier as the newer versions will not accept the scatter file. You need to indicate the location of the MIUI rom and the scatter file in the SP Flash Tool application. Select “Format all + Download”. Press the Download button on the top and proceed to the next step.

Step4: Remove battery from the bricked phone for 5 seconds, then replace it. Connect the USB cable to the phone’s USB port and to the laptop. Press down on the Volume – button and hold. The SP Flash Tool will start to recognise the phone and proceed with format and download of the fastboot recovery.

Step5. After sometime, the phone will automatically reboot and the MIUI rom will reappear.

Note the serial number of the Redmi 1W is now replaced with 0123456789A.

Wired PS2 Controller to Wireless mod using ESP32

My notes for converting a Wired PS2 Controller to Wireless using ESP32 + PS2X lib

        SPI2        SPI3

Pin name GPIO #
CS0* 15 5
SCLK 14 18
MISO 12 19
MOSI 13 23

PS2 Controller Pinout (Facing)

1 2 3 4 5 6 7 8 9
Data CMD Vibr Gnd VCC Attn CLK NC Ack

VCC: 3.3V – 5V
Vibr: 7.6V – 9V

PS2X pinout

  • define PS2_DAT 19
  • define PS2_CMD 23
  • define PS2_SEL 5
  • define PS2_CLK 18

PS2 Controller <–> Adapter header <–> Black project box

Black project box –> ESP32
–> Battery (4 x 18650 @ 14.8)
–> 5V LDO 3.3V regulator LD1117V33
–> 1 x 0.1 uF ceramic cap
–> 9V regulator L7809A / L7809CV
–> 1 x 0.1 uF ceramic cap
–> Antenna?
–> Switch
–> LED (Green?)
–> LED (Red when V is less than 7.2V)

18650 & Lipo

3.7V * 1 = 3.7V
3.7V * 2 = 7.4V
3.7V * 3 = 11.1V
3.7V * 4 = 14.8V

MacBook Pro running hot on Linux?

Managed to get Linux dual booting on an old but high spec’ed MacBook Pro using rEFInd. This was the second time I had Linux on the same machine and i’m still puzzled why the laptop runs cool to touch in macOS but quite warm in Linux.

I had disabled the discrete AMD Radeon GPU which caused display problems in macOS, via nvram.

$ nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00

I’ve also reloaded AMDRadeonX3000.kext on login via the following:

$ sudo kextload /System/Library/Extensions-off/AMDRadeonX3000.kext

High Sierra boots up perfectly with the laptop running relatively cool.

But this was not the same for Linux…

I’ve loaded lm-sensors which shows Linux regularly hitting 80+ Celsius while laptop fans spun at 2000 rpm (default speed). Something wrong there, don’t you think?

BTW, I’m monitoring the temperature of CPU cores and the fan speed using sensors

$ watch -n 1 sensors

I decided something needs to be done to bring up the internal fan speed – looking around found tlp.

tlp stands for TLP (duh!) and can be found in many distribution’s repositories. I used this to change the radeon power profile and dpm states by changing the states from default to low.

From /etc/default/tlp







Followed by restarting tlp with

$ sudo systemctl restart tlp.service

No change to the internal fan speed of 2000 rpm. 🙁

After some googling, I loaded macfanctld.

Right off the bat, sensors started to show the correct fan speed. By pushing additional load (multiple Youtube and Vimeo channels) on the laptop, I can hear the fans working harder and sensors is showing higher internal fan speed.

But this still hadn’t brought the temperature of the MacBook Pro to macOS level of temperature. I’ll continue to update this once i find out why and how.

Gillette ProGlide Repair

I received a Gillette ProGlide which stopped functioning after couple years. Recently it resurfaced after a house clean-up. It had a leaking AAA battery which was removed and disposed off. With the gunky remainder, I squeezed out juice, from a lemon hiding in the fridge, onto a cotton bud then rigorously swabbed until the innards were clean.

It still didn’t power up. 🙁

Then i thought of disassembling the entire device. I found the two metal clips on the blue holder, seen only by removing the end cap. By pushing the two metal clips inwards, the entire motor and switch assembly can now be removed.

Pulled out the entire metal assembly to find the following:

Figure 1. Disassembled ProGlide

The blue pushdown switch in the centre of the PCB is the on-off switch. Sticking in a fresh AAA battery, the motor on top, spun continuously until the switch was depressed again.

So this works!

Reassembling was pretty easy. The ProGlide did not require the two metal clips to be put back into place, as the bulbous end cover held the entire assembly tight. I just made sure the motor and switch assembly could slide into the housing. Rather effortless.

Then tested the razor assembly one last time by pressing the blue switch before covering the hole with the silicone button.

Figure 2. Entire assembly

Razor assembly repaired! 🙂

Updating to Mojave 10.14.4 on an unsupported Apple hardware

I am running 10.14.3 on an unsupported Apple hardware. macOS 10.14.4 update showed up on the App Store Updates for quite a while now. I had the opportunity to update to 10.14.4 rather early this morning before skipping out for training. Popped by the mac couple times and before realising the mac hung after a reboot.

I relied on dosdude1’s Mojave Patcher as this mac hardware was no longer supported by Apple. I somehow skipped checking his page for the latest news on 10.14.4, and this turned around and hit me squarely in the face.

-> Dosdude1’s patcher page indicated the 1.30 patcher tool needs to be installed before updating to 10.14.4. <-

Drats! Training called and I had to leave. I was mulling over this problem and googling to no help – It is very no one tried updating to 10.14.4 WITHOUT dosdude1’s 1.30 patch.

Just not long ago, I bit the bullet and applied the 1.30 patch over the currently non-functioning partition. After 32 minutes and applying the dosdude1’s Post Install drivers, the mac booted up. [Hooray!]

I quickly ran a check and all seemed fine except 10.14.4 was not applied and the mac remained on 10.14.3.

I’ll keep the mac on 10.14.3 until this weekend.

Repairing an unbootable Lenovo Yoga 2 Pro

Updating this blog after a busy weekend. I came into possession of a Lenovo Yoga 2 Pro ultralight which could not boot up. The BIOS showed the stock 256 GB SSD was not recognized – uh oh not a good sign.

Quickly went to Sim Lim to pick up a replacement (and one with a larger space) mSata SSD – Samsung  850 EVO 500 GB and prepared for the operation.

Something at the back of my head was stopping me from replacing the SSD, so I thought to give another spin on the repair bandwagon. After some mucking around, I managed to resuscitate the Y2P, not after downloading a Windows 8.1 ISO (its free to download but you will need to key in a serial number if you are doing a bare metal install) from Microsoft.

The magic is found within the Repair Options -> Command Line in the Windows 8.1 thumbdrive.

c:\> bootrec /FixMbr
c:\> bootrec /FixBoot
c:\> bootrec /RebuildBcd

The Y2P started to boot up normally. I was able to log into the Windows 8.1 desktop.

All’s well.