Attila Oláh

SRE @ Google Zürich

  • 06 Jun 2013

    HTC Desire network unlock guide

    If under Linux or XP,

    • install VirtualBox (or some other virtualisation tool) (emerge virtualbox for Gentoo)
    • get a Windows 7 ISO (no, wine will not work) (no, XP won’t work either, at least the 64-bit version has troubles with the the adb interface drivers)
    • install Windows 7 in VirtualBox

    Then,

    • connect the Desire (make sure USB debugging is enabled)
    • install HTC Sync, that will install the Android driver for the Desire (no, the Google USB drivers from the SDK won’t work)
    • install the adb drivers (download from here)
    • download and run the unlock app (previous version)

    If running from VirtualBox, make sure the USB port is forwarded to the guest OS.

    If the phone won’t reboot, make sure adb devices shows the connected device. If not, make sure the drivers are installed.

    If the phone reboots, but the app won’t find it, again, make sure adb devices shows the device. If not, make sure the adb drivers are installed too.

    This will only work on the Desire.

    • programming
  • 06 Jun 2013

    HTC Desire hálózatfüggetlenítése

    Ha Linuxban vagy XP-ben vagy,

    • telepíts egy VirtualBox-ot (vagy valami hasonlót) (emerge virtualbox Gentooban)
    • szerezz egy Windows 7 ISO-t (sajnos a jó öreg wine itt nem fog segíteni) (XP sem jó, legalább is a 64-bites verzió nem akarja telepíteni az illesztőprogramokat)
    • telepíts Windows 7-et VirtualBox-ban

    Ezután

    • csatlakoztast a Desire-t (a telefonon az USB fejlesztést be kell kapcsolni)
    • telepítsd az HTC Sync nevű programot, az majd beteszi a szükséges illesztőprogramokat (az univerzális “Google USB illesztőprogramok” csomak nem jó, a HTC-s kell.
    • telepítds az adb illesztőprogramot (letölthető itt vagy itt)
    • töltsd le és indítsd el a föltörő programot (alőző verzió)

    VirtualBox alatt oda kell figyelni arra, hogy az USB port továbbítva legyen a vendég oprendszernek.

    Ha a telefon nem akar újraindulni, ellenőrizd, hogy az adb devices parancs fölismeri-e a csatlakoztatott eszközt. Ha nem, valószínű az adb illesztőprogram nincs jól telepítve.

    Ha a telefon újraindul, de a program nem találja, ellenőrizd megint adb devices parancssal, hogy az adb illesztőprogram telepítődött-e.

    Ez csak az HTC Desire-re alkalmazható.

    • programming,
    • hu
  • 05 Apr 2013

    WAT and the principle of least astonishment

    I came across this video while reading a question on StackExchange programmers about the Principle of Least Astonishment.

    • programming,
    • videos
    Source
  • 30 Jan 2013

    irssi and camper_van

    Recently I’ve come across a ruby irc server called camper_van. What it does is pretty simple: it communicates with Campfire while acting as an IRC server. That, combined with irssi makes it much more fun to use Campfire for work.

    The following is a simple script that starts the server (if not already running) and then opens up irssi in a new gnome-terminal session.

    The second file is an example irssi config file (merge it with ~/.irssi/config).

    • programming
    Source
  • 29 Jul 2012

    HTTP DELETE and Sencha Touch

    I’ve recently learned that App Engine chokes on HTTP DELETE requests that contain a request body. While developing locally, everything works just fine, but when deployed, the production server drops these “malformed” requests with a “400 Bad Request” status line, so they don’t even reach the application in the WSGI pipeline.

    After reading the specs I couldn’t find where it would state that a body is not allowed for DELETE, it does state however that the request URI should be enough to identify the resource and that no extra parameters should be required (so I guess many servers just ignore the body there).

    Anyway, since App Engine is so strict about requests (which is a good thing anyway), it would be cool if Sencha Touch 2 could be somehow forced not to send an XHR payload when deleting a moel instance using the REST proxy. There seem to be no config option to prevent a request body, and when I asked in the forum, I got no decent reply.

    After reading the source, I came up with an override that fixes this behaviour. However, since overrides are now deprecated in favor of Ext.define, the following gist now includes a correction to the override.

    • programming
    Source
  • 02 Sep 2011

    Prevent Chromium opening all files with Firefox

    Chromium opens downloaded files using xdg-open. Problem is, xdg-open doesn’t work correctly with awesome (and also doesn’t support a number of other, non-mainstream wms.)

    The piece of code responsible for detecting the desktop environment:

    detectDE()
    {
        if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
        elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
        elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
        elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
        elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
        else DE=""
        fi
    }

    (this comes from Gentoo’s xdg-open, ebuild x11-misc/xdg-utils-1.1.0_rc1_p20110519.)

    A solution

    While we could easily monkey-patch this, or we could just set some environment variables, but there’s a cleaner solution. Create the script /usr/local/bin/xdg-open, so it will take precedence over the real xdg-open, and have it set the environment variable only for the process you’re about to start:

    #!/bin/sh
    KDE_FULL_SESSION="true" /usr/bin/xdg-open "$@"

    I found some helpful information on this forum dead link removed, though my idea is different as I want Chromium to use KDE software when opening files (okular, gwenview, etc.)

    Update

    As of xdg-utils version 1.1.0_rc1_p20120916, detectDE is now somewhat smarter and a lot more complex (~70 LOC).

    • programming
Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
Next
Attila Oláh //
atl@google.com