I Am a Flasher

I love to flash my phone. There, I said it. I’m out.

I’m a tinkerer. I love to learn how everything works. And once I understand how things work, I try to make them just a little bit better.

I currently own a Verizon Samsung Galaxy Nexus (toro). I used it stock for a couple of weeks, and then I rooted it and began exploring alternate ROMs. Verizon was dragging its heels bringing the latest version of the Android operating system to this phone and I wanted to experience the best Google had to offer.

For months, I tried various ROMs and kernels. I’ve probably flashed the phone over a hundred times. I eventually settled on Cyanogenmod 10.1 nightlies and either CM kernel or Franco kernel, depending on mood.

Over time and successive flashes of nightly builds, my phone became inexplicably slower and slower. It would stutter, pause, delay. Very frustrating, and as I was following all the best practices for flashing alternate ROMs, very puzzling.

I was using the same process with my Asus Nexus 7 tablet and its performance was worse than the phone’s.

A fan of the Stack Exchange network of sites, I posted this question to the Android Stack Exchange. I’ll quote from myself here:

I have a Verizon Galaxy Nexus (toro). I am running Cyanogenmod 10.1 ROM nightlies and I use CyanDelta Updater to stay up to date.

For a period of about 3 weeks, I updated to the latest nightly nearly every day using CyanDelta. Sometimes I’d download the full ROM instead of using CyanDelta. During this time, I never wiped the device (aka factory reset). I just applied the new release on top of the old.

Recently, my phone’s performance degraded significantly. There were long delays unlocking, long delays switching apps, long delays doing just about everything. The phone would freeze up, and the OS would ask if I wanted to end a process because it wasn’t responding. My podcatcher would stutter while playing.

Instead of switching to another ROM, I decided to first do a full wipe (factory reset). I used Titanium Backup to back up my user apps and data. In TeamWin Recovery, I did a factory reset, flashed the same CM 10.1 nightly I was running previously, restored my apps using Titanium, signed into accounts, etc.

My phone’s performance has been completely restored. It’s like night and day.

My question is: Why did that work? What is it about applying successive ROM versions that could cause a slowdown that a wipe would fix?

I love my new level of performance, but I also enjoy keeping up with the latest releases. It would seem I can’t have my jelly beans and eat them too. Now I’m reluctant to flash any updates without doing a full wipe.

I didn’t receive any good leads on answers. Every now and then I’d google for solutions. Late last week, I think I may have found a possible answer. I followed up my own question with an answer:

I’ve come up with one potential answer myself: TRIM

Solid state disks (SSDs) and some flash memory require the operating system to perform a kind of housekeeping task to maintain the efficiency of the device.

The operating system command TRIM is explained in this AnandTech article:

Its applicability to certain Android devices, including my Samsung Galaxy Nexus and ASUS Nexus 7 is explained in these XDA Developers threads:

An XDA member wrote an app called LagFix which purports to exercise the TRIM maintenance function, thus restoring write performance for the device.

Since I recently performed a complete factory reset, I’m no longer having performance problems and thus I can’t directly corroborate the purported benefits of LagFix. If I’m in a position where performance is suffering, I may do some benchmarking and see if LagFix improves the situation.

Please be aware if you plan to try LagFix that there are some devices that have chips that do NOT play nice with this utility. These chips have what’s come to be called a BrickBug, and if you run LagFix on one of these devices, you will irrevocably brick your device.

I highly recommend you follow the advice and read the LagFix FAQ. It points to a utility which can tell you if your device contains a chip that may suffer from the BrickBug.

One aspect I haven’t figured out yet is why a factory reset might restore performance. I’d like to figure out whether a factory reset performs a TRIM cleanup. My meager understanding of the TRIM process from my experience using PCs and SSDs is that if the OS doesn’t have integrated TRIM support, you need a separate utility to periodically sweep the disk.

I purchased the pro version of LagFix to support the developer and I have running on a schedule. I’m hoping that’s the end of my performance woes.

Advertisements

Just How Cheap is Cloud Backup?

I believe in the Computer Backup Rule of Three as written about by Scott Hanselman.  There are a million ways to backup your system, and I’m not going to get into exactly how I back up my family’s precious photos, videos and music. Instead, I am going to share something that recently made the frugal me very happy.

I’ve had a Microsoft Windows Home Server (now discontinued) for a couple of years. Basically it’s a mini server that keeps all our PCs backed up, acts as a file share, and does a bunch of other stuff for us. It’s home to all our shared documents, music, photos and videos. It’s probably the thing I’d grab if the house were on fire (after the family is safe, of course!). So the order would be (1) family (2) server (3) my Taylor guitar. And this remote control. That’s all I need.

I’ve been backing up our files to “the cloud” for a couple of years. I wanted an offsite backup, and I’m too lazy to find somewhere outside the home to swap a hard drive full of all our precious files every week or two.

I use a product from CloudBerry Lab that is a backup add-in for the Windows Home Server. All it does is copy files that we keep on the server up to Amazon’s Simple Storage Service (S3). That’s my offsite backup. Let Amazon take all my money.

I’ve been backing up 160GB of files this way, and paying Amazon’s going rate of around $20/month for the privilege. There are probably cheaper ways to stuff 160GB into the cloud, but this was easy and it just works.

Then Amazon introduced Amazon Glacier.

Amazon Glacier is an extremely low-cost storage service that provides secure and durable storage for data archiving and backup. In order to keep costs low, Amazon Glacier is optimized for data that is infrequently accessed and for which retrieval times of several hours are suitable. With Amazon Glacier, customers can reliably store large or small amounts of data for as little as $0.01 per gigabyte per month, a significant savings compared to on-premises solutions.

I migrated all our files to Glacier, and what was previously a $20/month charge is now … wait for it … $1.60/month.

What else can I back up?!

Nifty Skype Trick

Here’s a favorite Skype trick of mine. If I know I want to be able to walk around during a meeting, I’ll get Skype loaded up on my Android phone as well as my computer. When the call comes in, both devices ring. I can answer the call on either device. After, I can switch seamlessly, throwing the call back and forth between the two.

I’m not sure if it’s required to have the Android version up and running ahead of time, but I usually do it this way to make sure the call gets registered on the phone if I plan to answer it on the PC.

While in the call on the PC, I locate the call details on the Android device, and tap and hold. Then I can join the call. The call jumps to the phone and hangs up on the PC. The reverse works as well.

I’m not sure yet whether this would work if each device was on a separate network. I’ve only tried it with both on my home wifi.

Typing Test!

I’ve sometimes wondered whether I could successfully switch from a QWERTY to DVORAK keyboard layout and increase my typing speed. I’ve always been a fairly fast typist, thanks to the 1980’s NJ public school system and a fleet of IBM Selectrics.

I found this typing speed testonline and decided to give it a whirl.

The Results!

Test 1: 82 WPM with one error (damn!)

Test 2: 92 WPM with no errors

Test 3: 94 WPM with no errors.

Granted, this was letters only, no numbers.  I was absent the day in typing class when we covered numbers, and I swear I’ve never recovered.

Typing test with letters and numbers: 67 WPM. Ouchie.

SpinRite, VMware and Windows 7 or Windows 8

Today, my moderately trusty Windows Home Server HP MediaSmart ex495 started complaining of a disk issue. The built-in repair tools seemed to clear the error code, but when I went to run an error scan using HD Tool Pro, the box locked up.  After a reboot, I saw some SMART errors on the disk.  Time for SpinRite!

SpinRite is a trusted tool for performing hard disk maintenance on magnetic hard drives (not flash drives!).  Typically, one would use SpinRite by creating a boot CD or USB stick and running it on a dedicated PC. While it’s running, you can’t use your PC for anything else. It can take hours to do its job.

My preferred method of running SpinRite is inside a virtual machine on my laptop, using an external USB or eSATA dock to connect the troubled disk. To do this, I’ve created a tiny virtual machine in VMware Workstation 8. When creating it the first time, I booted into the virtual machine’s BIOS to change the order of the boot devices to ensure the ISO is the first boot device. I connect the troubled disk to the VM using the Physical Disk option in VMWare Workstation.

I used this method for some years, until it stopped working after moving to Windows 7. Windows 7 would seem to take a lock on the external disk, and the VM seemed to not be able to connect to the physical disk.

The fix for me is to use the DiskPart command line tool with some specific commands to get Windows to release the physical disk so VMware can use it.

In my case, the disk I needed to operate is Disk 2.

Run an elevated command prompt (as Administrator), then run “diskpart”.  Once in diskpart, issue these commands.

list disk
select disk #
offline disk
attribute disk clear readonly
rescan

That should do it. The next time you boot the VM, it should be able to take ownership of the physical disk.

Edit August 26th, 2013:

I just confirmed this technique continues to work on Windows 8.

Tip for saving ink printing airline boarding passes

When I fly Southwest, I print my boarding pass at home.  Southwest must think printer ink flows from every faucet, as they include color ads on every boarding pass.  Thanks, but no thanks.

(By the way, if you’ve ever been curious to know what printer ink costs relative to other common liquids, check out this infographic.)

Here’s my tip to avoid printing out those ads and wasting precious ink. I use Google’s Chrome web browser. I can’t say whether this will work in other browsers, but it just might.

  • You’re on the final boarding pass page, ready to print it out.
  • Do File…Print or Ctrl-P (whatever you please to start the print process)
  • Chrome will bring up a print dialog.
  • Change the “Margins” setting to Custom.
  • Drag the bottom margin up to somewhere around 5.5 inches and let go.
  • The ads should disappear (actually, they’ve landed on Page 2).
  • Change the “Pages” setting from “All” to only print Page 1.
  • Donate ink savings to charity.

p.s. Even better tip — save the boarding pass document to a PDF and send it to your phone or tablet, and save the ink and paper.

Simple Pleasures – Hot Swapping Batteries with the Samsung Galaxy Nexus

I recently switched US cellular carriers from Sprint to Verizon, and Android phones from the Sprint HTC EVO 3D to the Verizon Samsung Galaxy Nexus.

Being a power user, I tend to burn through my battery fairly quickly. With any new phone purchase comes the inevitable buying of extended batteries and external battery chargers.

When power runs low, it’s great to be able to swap in a new battery. I love user-replaceable batteries.  You can argue with me that a non-user-replaceable battery would allow for a design that could incorporate a larger primary battery. On second thought, don’t. It sounds like a boring argument.

It’d be great if I could swap out a battery without needing to shut down the phone first. Why isn’t there a little backup battery or capacitor that makes this possible? Probably lack of space, or desire to keep costs down.  Now, you can just pull the battery (killing the phone), and probably things will be fine, but once in a while I expect doing so will cause some kind of data loss and corruption. I’m a good little user, so I always shut down the phone first.

Here’s the “feature” that some of my past phones have had, my HTC EVO 3D didn’t, and my Galaxy Nexus does. I can plug in the USB charger, yank the battery, and the thing keeps running. So I can hot swap the battery without wasting time shutting down and booting up.

It’s the little things.