Adata XPG SX8200 Pro, Samsung 970 Evo Plus, and Sintech

In early September 2021, I popped a brand new 2TB Adata XPG SX8200 Pro into a Sintech adapter and the pair into my mid 2015 15-inch MacBook Pro (MacBookPro11,4). The tandem worked beautifully until February 25 when the Adata drive’s GUID partition became so corrupted that the drive wasn’t viewable to macOS or readable at all. Fortunately my Time Capsule had a backup less than 8 hours old.

In an interesting twist, I used the power-cycle method on the Adata SSD and was able to get it working again. My data couldn’t be recovered from the Adata SSD, but I was able to erase and re-format it as an APFS drive again. Even though Adata provided an RMA under warranty if I want to send it in, I flashed my data back to it and am using the Adata drive as-is in the Sintech adapter again. I will follow up with Adata to see if they still want to see this drive as something caused it to fail; it may be the drive is failing, the Sintech adapter is dying, or maybe even the MacBook Pro sent some unkind juice?

While the Adata SSD was briefly out of action, I popped a Samsung 970 Evo Plus 2TB into the Sintech adapter. The Samsung SSD seemed to work for about 12 hours, but the next morning the MacBook Pro was booting to the desktop and then automatically restarting on its own. The Samsung SSD was manufactured September 2021 and I tried to patch it with Samsung’s latest firmware “Samsung_SSD_970_EVO_Plus_4B2QEXM7.iso”, but this file said the Samsung’s SSD was already current. Despite this ad saying that the Samsung 970 Evo Plus 2TB is compatible if running the current firmware, I didn’t find this to be true. I also tried the Samsung SSD with another Sintech adapter I have (the stubby one for MacBook Air devices), but it didn’t work. After all this happened, I decided to return the Samsung SSD as I seemed to have the Adata device back up and running again.

Below are Blackmagic numbers with the Adata drive and this Sintech adapter. I’m pleased with the pair when they keep my data intact:

Windows and Re-connecting to Network Drives

Sometimes my work machine running Windows 10 loses it’s VPN connection, but when the VPN connection is re-established I’m finding the network drives no longer want to connect.

Click the Start button, then type in “cmd” and enter to bring up a command prompt. Then insert the following text:

net use p:

Which then spews out the following if you’re lucky:

Local name p:
Remote name \\yourcompanydomainname.com\projects
Resource type Disk
The command completed successfully.

After returning to navigate folders in Windows indeed the network file paths are working again – woohoo! I think in the old days Windows I occasionally had to re-run a .bat script to re-establish network file path connectivity, but this seems to be a bit easier.

DRAT and macOS Monterey

Earlier this week, a third party NVMe SSD failed as the boot drive inside my MacBookPro11,4. The drive had been backed up less than 8 hours from the disaster, but I was hoping to fiddle with the failed drive a bit more to recover files on the desktop that were saved within the last 8 hours.

Jivan Pal and others have developed DRAT for macOS and linux to work with APFS drives that might have some sort of corruption (I’m assuming this is extremely rare). Immediately after the failure, the SSD drive wasn’t visible in Finder or Disk Utility and obviously wouldn’t mount. After employing the power cycle method using an USB enclosure the NVMe was suddenly viewable in Disk Utility, but still couldn’t be mounted.

And that’s when I came across Jivan Pal talking about his open-source software, DRAT. My NVMe SSD is throwing error messages that mention the Space Manager is invalid. I’m not sure DRAT will help with this issue, but I figured it was worth a shot before I sent the SSD away on warranty for a replacement.

To install DRAT, you’ll need to visit this site, find the highest number for the latest version, click the triangle next to “Assets”, and if you’re on a Mac click on the file name “drat-0.1.3-darwin-amd64” or whatever the number is that corresponds to the version you’re seeing when reading this.

When the file is downloaded place it in the /Applications/Utilities folder, then open Terminal.app to execute these two lines of code:

cd /Applications/Utilities
chmod +x drat-0.1.3-darwin-amd64
./drat-0.1.3-darwin-amd64

When you execute the code with the last line of code, move back to Finder and offer access to this app in your Security settings, Apple logo->System Preferences…/Security & Privacy->General tab, and click “Allow Anyway”.

As suspected, the NVMe SSD is too far gone as back in Terminal.app and a request for DRAT to inspect the drive yields the following output:

sudo ./drat-0.1.3-darwin-amd64 inspect /dev/disk3s1
Password:
Opening file at `/dev/disk3s1` in read-only mode ... OK.
Simulating a mount of the APFS container.
Reading container superblock at address 0x0, assuming default block size of 4096 bytes ... FAILED: read_blocks: An unknown error occurred whilst reading from the stream.
ABORT: Failed to successfully read block 0x0.

I wasn’t able to recover any files with DRAT, but I think I was close. I ended up using the trial version of Disk Drill to view a single file I was curious about and stopped my recovery effort there – my other backup was good enough. Should I return to DRAT, the online instructions were helpful.

Spectre Automatic Firmware Upgrade and Permissions

I’m working on a project with an Advantech router (SR305 v3) that needs infrequent firmware security updates. It has the ability to pull the firmware updates from a third party web server on a specified schedule. To do this, the web server (Apache running on macOS Monterey Sonoma) needs read access to the directory and files the firmware is saved in.

Advantech’s latest firmware is usually posted here. After downloading the firmware files and saving them in the web server directory “Spectre_firmware”, proper file and directory permissions are enabled on the web server by opening Terminal.app and running the following command:

sudo chown -Rv _www /Library/WebServer/Documents/Default/brad/images/Spectre_firmware

This information is for later reference if we decide to script the update process.

Reset Homebridge Authentication Credentials

I had to restore my iPhone from a backup and in the process wiped out my Authenticator/two factor information, which disabled Homebridge authentication. No sweat, from Terminal.app:

sudo hb-service stop

Navigator to your home folder and Homebridge settings:

cd ~/.homebridge

Now rename auth.json:

mv auth.json auth_old.json

Restart homebridge:

sudo hb-service start

And with a browser navigate to you’ll be able to authenticate with admin/admin through Homebridge’s web user interface. In the upper righthand corner of your web browser’s tap the 3 dots, tap “User Accounts”, and finally tap “ENABLE 2FA” to re-enable two factor authentication.

Installing Mojave in VirtualBox

I have some 32-bit apps I wanted to retain access to, so it was time to virtualize Mojave under Monterey. I found these excellent instructions, hopefully they help you too:

https://www.whatroute.net/installerapp2iso.html

Of course I installed VirtualBox Extensions in the middle of this and somehow needed to follow advice at these links:

https://stackoverflow.com/questions/65149373/kernel-driver-not-installed-rc-1908-getting-errors-in-macos-big-sur-11-0-1

https://stackoverflow.com/questions/41691803/how-to-install-guest-addition-in-mac-os-as-guest-and-windows-machine-as-host

And note to self and others who arrive here, as of today I do not recommend instructions in the following two links as they did not work for my set up:

https://appletoolbox.com/need-to-run-32-bit-apps-on-macos-catalina-use-a-mojave-virtual-machine/

https://forums.virtualbox.org/viewtopic.php?t=95049

So far things are working well. If all of this virtualization should later fail and I’m unable to continue on with my previous work in the app Addresses & Labels, I vow to follow others’ advice and give this app a shot or maybe even consider gLabels through macports.

Also, for those coming here for the first time, maybe consider skipping all the steps above and try this instead.

ABSPATH and WordPress

My blog was displaying a funky error message at the top of every page:

ABSPATH already defined in /Library/WebServer/Documents/Default/wp-config.php on line 25

After looking at line 25:

define('ABSPATH', dirname(__FILE__).'/');

I added one line above it:

if ( !defined('ABSPATH') )

And now the funky error message is gone.

Swift, build, run, LMP?

For future reference, when building a Swift package, use Terminal and move into the directory of the Swift project. In Terminal, type:

swift build

The build should finish with “Build complete!”

For the hcitool project, I then tried to run it with:

.build/x86_64-apple-macosx/debug/hcitool ibeacon

A prerequisite for this stunt is to have Xcode installed if you’re on a Mac. Eventually I want to find out my Mac’s Bluetooth LMP with instructions on this site by using this command:

sudo hcitool info 9C:65:B0:A0:1E:BD

I’m hoping I find an LMP of 8. Maybe I’ll get another chance if this issue is resolved.

Bypass Monterey Install Error on mid-2015 15-inch MacBook Pro

My above-referenced machine has a third party SSD inside of it, which when updating to Monterey through up this error message:

To get around this, I happened to have an original Apple SSD that came with another MacBook Pro. I opened the MacBook Pro, removed the 3rd party SSD, inserted the original Apple SSD, and then put the 3rd party SSD in a USB enclosure.

Next, boot the MacBook Pro while holding the option key down. Then, choose the “macOS Install” disk, which was created when the error message shown above was thrown.

Your Mac will probably restart at least 3 times all on its own, this is ok. After the restarts are done, you’ll be booted to the desktop of your 3rd party SSD that is now in the USB enclosure. Re-launch the Monterey Installer and you’ll now be able to install the 3rd party SSD in your USB enclosure. When the installation is finish (about an hour), shut the machine down and move the 3rd party SSD back inside your MacBook Pro. Press the power button to boot and be sure to hold the option key down to choose your internal 3rd party SSD.

Kind of a hassle, but it works.

Ballcock and Toto Aquia II CST416M

Our 15-year-old Toto Aquia II CST416M toilet had been making a hissing noise at the Dual-Max flushing system valve, seem to allow water to leak past it. Just turn the water supply off, lift off the green plastic cover to access the ballcock cap – I cleaned it, but the hissing continued after it was reassembled and the water supply turned back on.

Ballcock cap is listed as THU302 “Diaphragm Cap – Lavelle” in an older parts list from 2008, but it appears removed from Toto’s 2017 parts list – go figure. Park Supply of America sold me a Lavelle Industry Inc. Korky R528 Ballcock Cap Assembly replacement (UPC 749306528039) that was easy to install and immediately corrected the issue. Thanks, PSA and LII!