Documenting Problems That Were Difficult To Find The Answer To

Monthly Archives: December 2015

CyanogenMod 12.1 Google Play Services has stopped

On a Samsung Galaxy Tab SM-T320 I was getting the following message after upgrading CyanogenMod to the latest stable 12.1 build:

Unfortunately, Google Play services has stopped.

This message would occur constantly, maybe every 3 seconds or so.

On pressing the “Report” button I would see a preview of a Crash Report that stated:

Submission subject
[CRASH] threw android.database.sqlite.SQLiteException

Submission content
android.database.sqlite.SQLiteException: Can’t downgrade database from version 65 to 64

So I used adb to shell into the device from my laptop and became the root user (using the su command).

Essentially I just had to delete any databases that were being used by Google Play Services. This was a lot. To find out which I would run the command:

logcat |grep -B 3 -A 20 downgrade |less

and look for lines that stated:

E/DatabaseUtils( 1180): 	at

and so forth and then run

rm /data/data/*


rm /data/data/*

I think these were the main two database directories I had to erase. You will probably want to back up any SMSs you have (although this doesn’t apply in the case of a tablet with just wifi).

I also had a similar crash with the clock and had to erase its databases, too.

Then reboot. Should be no more errors.

CyanogenMod 12.1 Not Roaming (No Signal)

I had a problem in Estonia. My phone was not roaming with my foreign SIM. When I inserted an Estonian SIM it connected just fine with H+ and LTE data modes enabled. But my foreign SIM would give me the following message whenever I tried to connect automatically or manually to any Estonian provider:

Can't connect to this network at the moment

Can’t connect to this network at the moment

The message was “Can’t connect to this network at the moment. Try again later.”

Very unhelpful. And I would have no signal at all.

When I returned to my foreign country I double-checked with my provider to ensure that I did, indeed, have roaming enabled. In fact this worked on a previous version of CyanogenMod on a different phone in Estonia. So it appeared there was something wrong with the phone.

Eventually I luckily ended up on this article which had a technique that worked for me.


A faster way may be to just dial *#*#4636#*#* on your phone, select Phone Information, find the “Set preferred network type:” drop down and select “GSM only” and wait 60 seconds to see if you get a connection.

But even if this works it could be just a temporary solution. And you may be restricted to slow speeds so experiment with other network types, too. What you set in this testing menu will not be retained after a reboot.

First I had to set my preferred network type to “2G” by first going into settings, and choosing “Mobile Networks” (taking care to touch the words, not the switch icon):

Choose Settings, Mobile Networks

Choose Settings, Mobile Networks

Then set the preferred network type to 2G:

Set the Preferred Network Type to 2G

Set the Preferred Network Type to 2G

At this point you can power off your phone, insert your foreign (roaming) SIM, then turn your phone on again. Like magic it will find a signal and finally be roaming.

How About Roaming in New Zealand on Three UK?

Again I had to set the preferred network type to 2G to actually connect to Spark NZ or 2 Degrees in New Zealand on Three roaming. (Update: actually, that’s strictly speaking not true, I was just impatient. Turns out you can have LTE preferred but just wait the 1-2 minutes it takes to connect to the mobile network, and may disconnect but will reconnect again).

But if you want a faster connection you have to do a little trick after powering up your phone each time. That trick is as follows.

Dial *#*#4636#*#* which will give you a “Testing” menu. Choose “Phone information”.

Further down the screen you will see “Network type:” and this may be EDGE – which is a high speed form of 2G (GSM). You can make this HSPA or HSPAP by doing the following.

Find “Set the preferred network type:” and from this list select “LTE/GSM auto (PRL)”. It will take a while to connect back to the phone network, between 1 and 2 minutes. Be patient (although if you wait 5 minutes give up). This time when you connect the “Network type:” should display HSPA or HSPAP and your connection should be a lot quicker.

Note that this preference will be lost each time you reboot your phone. So you’ll have to go through this little trick each time you power on for high speed mobile data in New Zealand.

A friend has UTMS showing on their phone on the same network which is 3G.

See this forum post about various network types and speeds.

Clipboard Cut and Paste Like Putty in XTerm

Do you want to select by click-and-holding the left-mouse button and having that text automatically copied into the system-wide clipboard? And then copying from the system-wide clipboard by right-clicking on the mouse?

In ~/.Xresources add:

XTerm*selectToClipboard: true

XTerm.vt100.translations: #override \
  ~Meta <Btn3Down> : insert-selection(CLIPBOARD,CUT_BUFFER0) \n\

Then, to load these changes, run:

xrdb ~/.Xresources

Ubuntu 14.04 and a USB Drive Found But Inaccessible

I have a Lexar 8GB USB stick that, when plugged into a Linux USB3 or USB2 port, flashes slowly every 2.5 seconds. The LED fades in slowly then quickly fades out and the cycle repeats.

This drive actually appears in my list of devices (in my case /dev/sde). So, what does dmesg say?

[623742.964273] usb 3-1.1.3: new high-speed USB device number 28 using xhci_hcd
[623743.337447] usb 3-1.1.3: New USB device found, idVendor=05dc, idProduct=a81d
[623743.337456] usb 3-1.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[623743.337462] usb 3-1.1.3: Product: USB Flash Drive
[623743.337466] usb 3-1.1.3: Manufacturer: Lexar
[623743.337470] usb 3-1.1.3: SerialNumber: AA5AS3XX6JEO3333
[623743.337771] usb 3-1.1.3: ep 0x81 - rounding interval to 128 microframes, ep desc says 255 microframes
[623743.337783] usb 3-1.1.3: ep 0x2 - rounding interval to 128 microframes, ep desc says 255 microframes
[623743.338436] usb-storage 3-1.1.3:1.0: USB Mass Storage device detected
[623743.338751] scsi248 : usb-storage 3-1.1.3:1.0
[623744.337112] scsi 248:0:0:0: Direct-Access     Lexar    USB Flash Drive  1100 PQ: 0 ANSI: 4
[623744.337664] sd 248:0:0:0: Attached scsi generic sg5 type 0
[623744.342377] sd 248:0:0:0: [sde] Attached SCSI removable disk

Looks pretty normal. Except that it is not. If I attach an identical but working Lexar 8GB USB drive into my machine I get some additional but important lines giving the logical block count of the device in dmesg:

[623541.046652] scsi 246:0:0:0: Direct-Access     Lexar    USB Flash Drive  1100 PQ: 0 ANSI: 4
[623541.046886] sd 246:0:0:0: Attached scsi generic sg5 type 0
[623541.047068] sd 246:0:0:0: [sde] 15656960 512-byte logical blocks: (8.01 GB/7.46 GiB)
[623541.047634] sd 246:0:0:0: [sde] Write Protect is off
[623541.047636] sd 246:0:0:0: [sde] Mode Sense: 43 00 00 00
[623541.048121] sd 246:0:0:0: [sde] No Caching mode page found
[623541.048124] sd 246:0:0:0: [sde] Assuming drive cache: write through
[623541.050183] sd 246:0:0:0: [sde] No Caching mode page found
[623541.050186] sd 246:0:0:0: [sde] Assuming drive cache: write through
[623541.050913]  sde: sde1
[623541.052443] sd 246:0:0:0: [sde] No Caching mode page found
[623541.052445] sd 246:0:0:0: [sde] Assuming drive cache: write through
[623541.052447] sd 246:0:0:0: [sde] Attached SCSI removable disk

This is made clear by running lsblk which does not list /dev/sde as a block device. In addition trying to run blockdev gives an error:

# blockdev --getsize /dev/sde
blockdev: cannot open /dev/sde: No medium found

This exactly problem has been described in forums here on 2013-11-05 and here on 2015-03-12.

My conclusion? USB drive is toast. Nothing is going to save it. Not “blanking it” using the “dd if=/dev/zero of=/dev/sde” command (because there are no logical blocks to write to). But I could be wrong. After all – the device is clearly communicating important information to the host such as model name and number – but just not giving access to the storage area behind it.

Other Interesting Links

See the kernel /sys/block/ filesystem documentation.

How Do I Track My Nationwide Mortgage Application?

You may be wondering how you can view the progress of your mortgage application after you applied to Nationwide through your Internet Banking? It’s not obvious on the website where this application tracking is to be found.

After logging in wave your mouse over the “Browse products and apply” tab. Then click on the “My quotes and applications” link in the drop-down from the menu as illustrated in the following screenshot:

Finding Your Mortgage Application Progress on Nationwide Internet Banking

Finding Your Mortgage Application Progress on Nationwide Internet Banking

Good luck!

Airbus and Two Pilots in an Emergency

As a regular flier few things scared me so much about flying as the Air France Flight 447 disaster on 2009-06-01. For the first time in a long time a modern airliner by one of the top tier airlines in the world just went inexplicably missing. I had been flying that same day but after hearing that news I did not take any flights again for more than a year.

The subsequent report on that flight 447 was concerning. One major issue was that when two pilots were attempting to control the aircraft at the same time they were not aware that they were both attempting to take control. Unlike a Boeing aircraft in which the steering columns both move when one pilot makes a manoeuvre the Airbus sidestick control provides no physical feedback in the event the other pilot is also issuing commands to the aircraft.

A news report released by the BBC on 2015-12-01 about the AirAsia flight 8501 disaster that occurred on 2014-12-28 stated:

  • At another point, the two men appeared to be pushing their controls in opposite directions

It would be more reassuring to Airbus passengers in future if Airbus provided some warning or feedback when two pilots attempt to give opposing instructions to the plane at the same time. Especially when the lack of a clear distinction of pilot-in-command on these aircraft can, and has, resulted in the deaths of hundreds of people.