Computer Stuff

It’s been an interesting and challenging month for Joe’s laptop. I write this in December of 2020. Just off the top of my head, I purchased my HP notebook on 2015 or 2016, with Windows 7 home installed. Along the way, I took the free upgrade to Windows 10 but didn’t do anything major besides that.

Over the last few months, I’ve run into more frequent problems with my Toshiba mechanical hard disk drive. Very slow disk access, lots of drive errors and running chkdsk. I knew it was just a matter of time before a catastrophic failure and started thinking about options. At the end of this whole process, I decided to document via this webpage and hopefully save someone else all the searching I had to do.

High on the list was replacing the HDD with a solid state drive (SSD). Some initial research showed that it could be easily done so my thoughts turned to getting the data from the old drive to the new drive. My first thought was mirroring the drive within the operating system but that option didn’t appear in the home version of Windows. That left cloning as the best choice. More research, checking reviews, etc. I purchased a disk duplicator and a 1 TB SSD that met my needs and budget.

The day arrived when the hardware was available and I had enough time for the cloning operation. Naturally, I had to do a quick YouTube check for accessing/removing the HDD in the notebook but in the days that followed I had that process down pat. The first few attempts to clone in the disk duplicator failed, with only an error light to indicate the problem. The website for the duplicator didn’t provide any useable information and I came to the conclusion that the operation failed due to bad sectors on the source disk.

On to plan B. Since the hardware couldn’t do the job, I started looking at software solutions, hopefully free. Well, I was out of luck on the free part but found great reviews and a decent price for EaseUs Disk Copy so I paid up and downloaded. The disk duplicator still came in handy as a docking station for the SSD. At this point, I’d like to point out that I was operating without a safety net – in the form of backups. My recent attempts to backup data all failed and in the process I removed the older backups, trying to make more room on my external drive.

EaseUs did the trick, although not immediately. It needed to create and boot into a WinPE environment but after that I had a good clone of my HDD. I tried to verify using Windows Disk Management. It showed the drive and the partitions but said the drive was offline. That made little sense to me since it was connected and showing partitions so it was back to Google. Seems like it was offline because it shared a drive ID with the original drive. If I just forced it online, a new drive ID would be assigned. I did that and verified that my C drive did indeed look like the original. I quickly powered everything down and swapped out drives. A huge groan followed as the new SSD would not boot. I put the original back in and started researching my latest problem.

Apparently, that drive ID is very important in the boot process of a computer with UEFI bootup. I re-cloned the SSD and opted NOT to verify anything after the process completed. Just swapped out the drives and it booted up with only 1 prompt during the boot sequence that I just had to hit enter. The second or third boot after that, though, HP did a system repair. I thought that was very odd and also noticed something else that was strange.

The only icon in my system tray that would respond was the OneDrive icon. I fought with that problem for days and finally, after searching the events log, determined that I was missing a file named QuickActions.dll in C:\Windows\ShellExperiences. Fortunately, I hadn’t made any changes to my original hard drive so I was able to plug it in and get the file. Big sigh of relief when I had access to working icons again.

On to the next issue. I wanted to use Windows Backup again to create a new system image and alternate between that and the cloning process for insurance. Throw in regular Windows documents backup and it should be bulletproof. Except the Windows system image failed. Every. Damn. Time. (Right about this point, I ordered another 1TB SSD for cloning purposes.) I kept getting an error parsing an XML file. I tried numerous suggestions found on the internet and none helped. Until I found someone talking about this exact problem after cloning a drive with EaseUs.

Enter GPT fdisk (https://sourceforge.net/projects/gptfdisk/

Someone else far more talented than I discovered the actual problem. When EaseUs created the clone, it randomly applied very strange characters to the partition names. That’s what was crashing the system image backup process, when trying to write/read an XML file. Windows does not provide a method to rename those partitions, at lease none that were readily identifiable. The solution suggested by someone else on the Internet was to use GPT fdisk to rename. After downloading and unzipping the required files, here’s the process I followed.

Open a command prompt with admin privileges. CD to the folder where I extracted the files. Invoke the proper version of the program. Since my laptop is 64 bit, I ran

gdisk64 -l 0:

The zero and colon make the first fixed drive on the system active for the program. Here’s a screen shot of the information that provided.

You can see the partition name problem

That first command exits the gdisk64 program immediately after displaying the information. After digesting and saving this info, I went back in and issued a series of commands.

gdisk64 0: (to start the program with the only fixed drive active)

i (enter, program will prompt you for partition number)

This shot shows info AFTER I corrected the partition name

c (enter, program will prompt for partition number and new partition name)

Repeat this process for each partition. You’ll notice that when displaying the information for each partition there’s a line for Partition GUID code that has a simple name at the end. That’s what I used for the partition name.

w (enter. This writes the changes)

q (enter. This quits GPT fdisk)

Reboot your computer and you should be able to run Windows System Image backup now.

My current backup plan will follow this scheme:

Week 1: Clone spare SSD

Week 2: Windows documents backup

Week 3: Windows system image backup

Week 4: Windows documents backup

The only drawback to this is that each Week 1 I’ll probably have to redo the partition names. But at least now I have a procedure documented.

And now, Android app writing

Earlier this year I decided to write an Android app. I initially thought it would be easy peasy, just find an existing program and modify it for my purposes. Well, that was way wrong. Seems like Android apps are written in either Java or Kotlin. I have no experience with either so I opted to try Kotlin on the assumption that it was designed specifically for Android. I spent a few months taking online tutorials and finally thought I was ready enough. Wrong again. The database part was easy but everything else around it was giving me fits. Suffice it to say that I borrowed a lot of sample code and somehow managed to make it all work. 2 big discoveries along the way.

First, creating a database in sqlite studio didn’t work for Android. I finally had to create the database using command line tools from sqlite.org. After that I could modify all I wanted with studio.

Next, Kotlin does NOT allow global variables, at least not declared as such. This was pretty important for a certain function in my app. After looking at several possible workarounds, I finally posted something in a FaceBook Kotlin group. Voila, the answer given there was a Singleton Object. I had to search a little more for sample usage but that got me over a major hump.