Loud ramblings of a Software Artisan

Saturday 30 June 2012

YouTube HTML5 error message decoding

One thing puzzling with YouTube HTML5 support is the message "this video is currently unavailable" which could mean a lot of things. The actual translation is "we need to show you ads and you need Flash for that".

If should be noted that there is no problem on mobile platform, Android or iOS, the video is shown.

Wednesday 20 June 2012

Android phone camera failure

I don't know if you noticed, but when you connect a Nexus One or a Samsung phone (Gingerbread or ICS, tested with a SGS 2 or Galaxy Note) to your Mac, the phone isn't recognized as a camera.

There is a difference between the Nexus One (stuck to Gingerbread) and the Samsung. The Nexus is USB Mass Storage (ie the phone is seen as a USB disk) while the Samsung is MTP (a variant of PTP, the USB standard for still image cameras). But in both case, the MacOS digital camera support (Image Capture, iPhoto or Aperture) recognize it but do not show anything. Adobe Lightroom is in the same boat (I'm not sure if it uses the OS capability or reimplemented it). This is because Android butcher the implementation of the Design rules for Camera Filesystem. See Android bug 2960 where you'll notice that it was largely ignored by Google despite even having a patch.

For the Nexus One this does not prevent from manually copying the images. But Samsung.... one would think they would have fixed that, but obviously they didn't. To make things worse, Samsung doesn't use Mass Storage but MTP, which mean that there is no way to just copy files from the camera[1]. That last bit is utter fail.

Update (June 21st): from the comment, apparently I can set the Galaxy Note to be as USB Mass Storage. It is complicated, needs to be done manually, require disabling USB Debugging (it will do it for you, but not reenable it), etc. In short they turned something relatively simple to something overly complex and unfriendly. Worse, it is so many to reach the dialog where like on the Nexus One, you can tap to enable Mass Storage. The positive side is that you can't enable Mass Storage without unlocking the phone, which is a security feature.

Notes

[1] unless maybe you install some tool, but anything runs better without Samsung software

Firefox Mac accessibility update

Some update about Firefox accessibility on Mac:

  • Accessibility on Mac has been disabled in Aurora 15 (and Nightly) shortly after the uplift early June. This was done because accessibility seemed to be instanciated for more than just accessibility clients, causing several unforeseen performance issues.
  • Accessibility on Mac has been re-enabled in last night Nightly 16 build for Mac. The changes are that now we whitelist VoiceOver before starting accessibility on the Mac. We also added a switch in about:config to force enable (bypass the white listing) or disable.
  • I have a current patch queue that include dealing with tab panels properly (bug 750612), text reading (bug 718625) and WAI-ARIA landmarks (bug 718700).

Using about:config: accessibility.force_disable. This option has 3 values:

  • 0 (default): do as usual
  • 1: disabled. Accessibility will not be started.
  • -1: force enabled. Accessibility will always start when requested, even without voice over.

This also works on Windows (the value -1 is unused) and soon on Linux with atk (I have to finish it)

I hope to get more rolling before we uplift Aurora 16.

Wednesday 6 June 2012

Deleted my LinkedIn account

Yep, I deleted my LinkedIn account. Despite the fact that I got no value from it, the leak of 6.5M unsalted password hashes was just the icing on the cake. For so long they had a deficient SSL support, they ask to decrypt a captcha to login and lot of other stupidities. And their mobile app steal or leak personal info like your iPhone calendar.

I should have done that a long time ago. When they asked a reason I typed in "too dumb with security"

You know where you can find me.

Friday 1 June 2012

How to take a screenshot on an Android phone

How to take a screenshot on an Android phone, a Google Nexus One in my case. I have to document it, because "home + power" like on an iPhone (or any iOS device) is far too complicated.

Warning: this post contain whole parts of ranting and sarcasm.

  1. Configure your phone to allow USB debugging.
  2. Install the Android SDK
  3. Connect the phone over USB
  4. Start ddms from the Android SDK
  5. Select your phone.

Kaboom. It crashes.

01:42:04 E/ddms: Failed to execute runnable (java.lang.ArrayIndexOutOfBoundsException: -1)
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.ArrayIndexOutOfBoundsException: -1)
	at org.eclipse.swt.SWT.error(Unknown Source)
	at org.eclipse.swt.SWT.error(Unknown Source)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Unknown Source)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Unknown Source)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
	at com.android.ddms.UIThread.runUI(UIThread.java:517)
	at com.android.ddms.Main.main(Main.java:116)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
	at org.eclipse.jface.viewers.AbstractTableViewer$VirtualManager.resolveElement(AbstractTableViewer.java:100)
	at org.eclipse.jface.viewers.AbstractTableViewer$1.handleEvent(AbstractTableViewer.java:70)
	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
	at org.eclipse.swt.widgets.Table.checkData(Unknown Source)
	at org.eclipse.swt.widgets.Table.cellDataProc(Unknown Source)
	at org.eclipse.swt.widgets.Display.cellDataProc(Unknown Source)
	at org.eclipse.swt.internal.gtk.OS._gtk_list_store_append(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_list_store_append(Unknown Source)
	at org.eclipse.swt.widgets.Table.setItemCount(Unknown Source)
	at org.eclipse.jface.viewers.TableViewer.doSetItemCount(TableViewer.java:217)
	at org.eclipse.jface.viewers.AbstractTableViewer.internalVirtualRefreshAll(AbstractTableViewer.java:661)
	at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:635)
	at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:620)
	at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1430)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1365)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1328)
	at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1428)
	at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:537)
	at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1387)
	at com.android.ddmuilib.logcat.LogCatPanel$LogCatTableRefresherTask.run(LogCatPanel.java:1000)
	at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source)
	... 5 more

En voila. You still haven't taken a screenshot.

And for the record, I'm aware that Android 4.0 can do it, but Google still hasn't provided an update for the Nexus One (their first flagship device) and is unlikely to do it. That's not really encouraging into buying a newer device.

Update: upgraded to platforn tools version 11 and still the same problem.