Google Glass – A story of joy and sadness – Part 2

After developing a Glass GDK app for several weeks, I had noticed some warnings on Glass that it needs to cool down to operate properly. At this point I would disconnect the USB cable and power down the device. On one such event everything changed. When I powered on Glass, the device failed to start properly. The timeline failed to start and instead there were many errors such as ‘Home cannot start’.

It was not clear what was going wrong, so it was time to reconnect the USB cable and open LogCat in eclipse to view the log files. This is when the problem revealed itself, the filesystem became read only. Many services failed to start because they were trying to access their SQL Lite databases on the /data partition.


01-02 19:26:01.945: W/PackageManager(3776): Unknown permission android.permission.RAISED_THREAD_PRIORITY in package com.google.android.apps.lightcycle.glass
01-02 19:26:01.960: A/PackageManager(3776): Unable to backup package manager settings, current changes will be lost at reboot
01-02 19:26:01.968: E/AndroidRuntime(3776): Error reporting WTF
01-02 19:26:01.968: E/AndroidRuntime(3776): java.lang.NullPointerException
01-02 19:26:01.968: E/AndroidRuntime(3776): at com.android.internal.os.RuntimeInit.wtf(RuntimeInit.java:345)
01-02 19:26:01.968: E/AndroidRuntime(3776): at android.util.Log$1.onTerribleFailure(Log.java:103)
01-02 19:26:01.968: E/AndroidRuntime(3776): at android.util.Log.wtf(Log.java:278)
01-02 19:26:01.968: E/AndroidRuntime(3776): at android.util.Log.wtf(Log.java:255)
01-02 19:26:01.968: E/AndroidRuntime(3776): at com.android.server.pm.Settings.writeLPr(Settings.java:845)
01-02 19:26:01.968: E/AndroidRuntime(3776): at com.android.server.pm.PackageManagerService.(PackageManagerService.java:1158)
01-02 19:26:01.968: E/AndroidRuntime(3776): at com.android.server.pm.PackageManagerService.main(PackageManagerService.java:838)
01-02 19:26:01.968: E/AndroidRuntime(3776): at com.android.server.ServerThread.run(SystemServer.java:165)
01-02 19:26:02.015: D/dalvikvm(3776): GC_EXPLICIT freed 181K, 6% free 9865K/10439K, paused 3ms+4ms
01-02 19:26:02.015: I/SystemServer(3776): Account Manager
01-02 19:26:02.031: D/PackageManager(3776): generateServicesMap(android.accounts.AccountAuthenticator): 2 services unchanged
01-02 19:26:02.046: I/SystemServer(3776): Content Manager
01-02 19:26:02.062: W/AtomicFile(3776): Couldn't rename file /data/system/sync/accounts.xml to backup file /data/system/sync/accounts.xml.bak
01-02 19:26:02.062: W/SyncManager(3776): Error writing accounts
01-02 19:26:02.062: W/SyncManager(3776): java.io.IOException: Couldn't create directory /data/system/sync/accounts.xml
01-02 19:26:02.062: W/SyncManager(3776): at com.android.internal.os.AtomicFile.startWrite(AtomicFile.java:63)
01-02 19:26:02.062: W/SyncManager(3776): at android.content.SyncStorageEngine.writeAccountInfoLocked(SyncStorageEngine.java:1648)
01-02 19:26:02.062: W/SyncManager(3776): at android.content.SyncStorageEngine.(SyncStorageEngine.java:306)
01-02 19:26:02.062: W/SyncManager(3776): at android.content.SyncStorageEngine.init(SyncStorageEngine.java:323)
01-02 19:26:02.062: W/SyncManager(3776): at android.content.SyncManager.(SyncManager.java:305)
01-02 19:26:02.062: W/SyncManager(3776): at android.content.ContentService.getSyncManager(ContentService.java:55)
01-02 19:26:02.062: W/SyncManager(3776): at android.content.ContentService.(ContentService.java:134)
01-02 19:26:02.062: W/SyncManager(3776): at android.content.ContentService.main(ContentService.java:494)
01-02 19:26:02.062: W/SyncManager(3776): at com.android.server.ServerThread.run(SystemServer.java:188)
01-02 19:26:02.062: W/AtomicFile(3776): Couldn't rename file /data/system/sync/status.bin to backup file /data/system/sync/status.bin.bak
01-02 19:26:02.062: W/SyncManager(3776): Error writing status


01-02 19:26:02.101: I/SqliteDatabaseCpp(3776): sqlite returned: error code = 14, msg = os_unix.c: open() at line 26525 - "" errno=30 path=/data/data/com.android.providers.settings/databases/settings.db-shm, db=/data/system/accounts.db
01-02 19:26:02.101: I/SqliteDatabaseCpp(3776): sqlite returned: error code = 14, msg = unable to open database file, db=/data/system/accounts.db
01-02 19:26:02.109: E/SqliteDatabaseCpp(3776): CREATE TABLE android_metadata failed
01-02 19:26:02.109: E/SQLiteDatabase(3776): Failed to open the database. closing it.
01-02 19:26:02.109: E/SQLiteDatabase(3776): android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file
01-02 19:26:02.109: E/SQLiteDatabase(3776): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:2074)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1014)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:986)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1051)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:771)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:157)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:231)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at com.android.providers.settings.SettingsProvider.query(SettingsProvider.java:398)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at com.android.providers.settings.SettingsProvider.ensureAndroidIdIsSet(SettingsProvider.java:317)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at com.android.providers.settings.SettingsProvider.onCreate(SettingsProvider.java:256)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at android.content.ContentProvider.attachInfo(ContentProvider.java:944)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at android.app.ActivityThread.installProvider(ActivityThread.java:4237)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at android.app.ActivityThread.installContentProviders(ActivityThread.java:3992)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at android.app.ActivityThread.installSystemProviders(ActivityThread.java:4387)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at com.android.server.am.ActivityManagerService.installSystemProviders(ActivityManagerService.java:6268)
01-02 19:26:02.109: E/SQLiteDatabase(3776): at com.android.server.ServerThread.run(SystemServer.java:192)
01-02 19:26:02.109: E/SQLiteOpenHelper(3776): Couldn't open settings.db for writing (will try read-only):
01-02 19:26:02.109: E/SQLiteOpenHelper(3776): android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file
01-02 19:26:02.109: E/SQLiteOpenHelper(3776): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
01-02 19:26:02.109: E/SQLiteOpenHelper(3776): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:2074)

Glass was basically unable to start the timeline and it seemed to be stuck in a loop trying to start or load things. I waited and waited for something different to happen, but I would see the same errors again and again in the log. After at least 5 minutes, Glass started to get hot, and so I needed to do a hard shutdown to stop the overheating.

At this point it was time to reach out to Google Glass support to see what could be done. I zipped up the log file that contained the numerous errors and sent a URL to this along with my description of the problem. I received a reply instructing me to try the Glass hard reset and if that did not work, try the factory reset.

After trying this, I had the same result.

Following this, it was advised that I try the remote factory reset. Again, after trying this my Glass continued to have the same problem.

Next I was advised by Google to plug Glass into the wall AC outlet and perform the 15 second hard power down. This had no impact.

Next I was advised to disable all 3rd party apps through MyGlass. After trying this and having the same problem, I started to realize that most likely the read only filesystem errors were preventing all of the rescue attempts from working.

In the meantime I was trying my best to force mount of the /data partition with read / write permissions. This of course required root access. I tried to force fsck to check the partition, and well, root access is required.

I continued to work with the Glass support team over the next few weeks, and at some point the suggestions from them started to repeat themselves. So this was now the time to question about a warranty replacement. The first several tries went nowhere, no answers about a replacement Glass. No attempts were made on their part to ask for the broken unit from me, which I thought was strange. Just more of let’s keep trying.

Finally on one phone call I received an answer about the warranty replacement… it could not happen because I installed 3rd party applications on Glass. This I thought was ridiculous, because as a developer for Glass GDK there is no way to test your application without installing on Glass. Currently there is no emulator available and this means I have to void my warranty as a developer? Well if my warranty was void, I may as well root the device and try to fix the /data partition. I stumbled upon the following video which explains how to root and void your warranty.

And so I tried and failed. The command fast boot oem unlock wipes your user data as a protective measure. Your user data is on the /data partition and mine was read only, so fail! No root access for me. Stuck with a read only data partition.


./adb shell "mount"
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/system /system ext4 rw,relatime,barrier=1,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/userdata /data ext4 ro,nosuid,nodev,noatime,barrier=1,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/cache /cache ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/fuse /mnt/sdcard fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

And so I gave up. There wasn’t much else I could do on my own to fix the /data partition.

Finally after several weeks of sadness, I received an email from Google. They are offering to send me a replacement glass. Yippie! I thought my $1500 was down the drain! I’m not sure of the details and reasoning behind this, but I’ll take it. Joy again!

Leave a Reply

Your email address will not be published. Required fields are marked *