I’m an impatient man, so although I heard rumors that Mobistar might be testing the HTC Hero update (which is Belgium-specific, as the YouTube application has to be removed because of privacy law concerns), I decided to go the “less official” way and root and flash the darn thing myself. The process was pretty easy (thanks for the info Thomas & Serge), the outcome is great; my phone is a better Hero for it!
So suppose you’re as impatient as I am, suppose you don’t care that this may void your warranty, suppose you’re not scared of bricking your brand new toy, suppose you’re a not entirely technically ignorant, then you could follow these steps:
Root your HTC: by using flashrec.apk to flash a new recovery image on your HTC as described here. If you get a “backup failed” error in step 10 as I did, you just need to power off and on and try again (the backup itself isn’t used anyway, that step is just needed to have flashrec allow you to continue).
Upgrade your rooted HTC: from the new recovery image menu flash MoDaCo custom ROM v2.x (I installed 2.2, 2.3 was released a couple of hours ago) to your system as described here. And don’t forget to wipe before flashing as I did.
Update to the latest radio package to version 63.18.55.06EU_6.35.06.18 from the recovery image menu (you should know the drill by this step) for optimal radio performance.
But you could also wait for the official update, off course …
But let there be no doubt; it’s a great handset! My Hero sports a beautiful touch-screen, a nice -albeit young- Linux-based OS and a top notch webkit-based browser (with Adobe Flash 10, a first for a mobile device). The price is considerably lower then that of an iPhone and the platform is very open (esp. if you compare it to the golden cage Apple created for its ecosystem). I’ve installed several free apps from the Android Market and downloaded and installed a great AR-application from outside the Market without having to jailbreak anything (more on Android-apps in a later post).
But there’s one thing I really miss on my fancy device; a physical keyboard. Because as ancient as my Nokia e61i might have been, I really was more productive (as in “writing mails”) on it thanks to the (small) physical QWERTY-keyboard it sported. And while friends and colleagues assure me that I’ll get used to the virtual keyboard, and I’m sure things will indeed get better, we should not kid ourselves; nothing beats a real keyboard. Ever! So let the quest for a small compatible bluetooth keyboard begin!
Next on my list was getting the “shared folder“, which I configured in Virtualbox (look ma, no samba), to automount in my Ubuntu-guest with read-write permissions for my non-root user. I ended up adding this line to /etc/fstab (the dmode and fmode-options did the trick eventually):
And to wrap things up I also installed the Mozilla Labs Weave-plugin, which syncs a.o. bookmarks and passwords in Firefox between my 3 environments. It caused me some headaches at first, synchronizing just seemed to take forever and no error was shown in the frontend. But I found some obscure messages (things like “Exception caught from onComplete handler of CryptoWrap__decrypt-57 generator”) in the verbose log and Google linked those to a post on the Weave Google Group which explained that the problem was with an incorrect “encryption passphrase”. And sure enough Weave was syncing happily after once I re-entered my -too complex- passphrase.
But some time ago my laptop got a memory upgrade (from 1 to 2 Gb) and last week Paul Cobbaut wrote about Virtualbox on his blog. I installed this example of German craftsmanship (both a “free as in beer” and an open source version are available, version 3 was just released a few hours ago!) and my computer hasn’t been the same since. I’m now running a fullscreen (guest additions rock) Virtualbox virtual machine with Ubuntu 9.04, using an openssh-provided (with some help from corkscrew, off course) socks-proxy for unlimited internet access and I feel like a kid that has just been allowed in a playground.
Next to Ubuntu, I also installed Opensolaris (which seems to need a shitload of RAM) and a leaked version of the emulator of that much anticipated (well, by me at least) Palm WebOS. On my disktop I installed the Linux-version of Virtualbox and I’ve got OS-weirdness such as ReactOS, Haiku and Syllable running there. Hell, maybe I’ll even install (a clean version of) Windows XP in a virtual machine there, just to make it full circle. ‘Cause I’m free!
This weekend I had to resort to Joikuspot (software that turns your 3G-cellphone into a wireless gateway to the internet) for my web-needs. Because I encountered a few problems setting up a connection from my Ubuntu laptop, here’s a quick recap for documentations sake.
The rather fundamental issue was that I couldn’t get my computer (a Dell D620 running Ubuntu 8.04 with the iwl3945 driver) to join the ad-hoc wifi-network which Joikuspot (on a Nokia e61i) created. As connecting from my wife’s Windows XP laptop did work, I googled around a bit and it turned out I had to specifically set the channel used by Joikuspot to 1 or 6 instead of “automatic” or 11. Although NetworkManager still seemed confused, this did allow me to connect from the command line (disabling wireless networking in NM first and then using iwconfig and dhclient). But why joining an ad-hoc wifi-network on channel 11 doesn’t work in Ubuntu, that I still don’t know.
Once connected to the wireless network, I found out that Joikuspot Light requires your browser to auto-detect a proxy. The proxy in Joikuspot seems to be used to limit the functionality of the free version and gently push you towards the non-free Premium product. As my normal web-connection came back soon after I figured this out, I didn’t bother to test if I could tunnel my way out of those limitations. But crippled or not, Joikuspot is great to have around when your broadband connection is down.
When talking about caching, apc_delete might not be that important, as apc_store allows you to set the TTL (time to live) of the variable you’re storing. If you try to retrieve a stored variable which exceeded the TTL, APC will return FALSE, which tells you to update your cache.
All this means that adding 5 minutes worth of caching to your application could be as simple as doing;
if (($stringValue=apc_fetch($stringKey)) === FALSE) {
$stringValue = yourNormalDogSlowFunctionToGetValue($stringKey);
apc_store($stringKey,$stringValue,300);
}
From a security point-of-view however (esp. on a shared environment) the APC-functions should be considered extremely dangerous. There are no mechanisms to prevent a denial of service; everyone who “does PHP” on a server can fill the APC-cache entirely. Worse yet, using apc_cache_info you can get a list of all keys which you in turn can use to retrieve all associated values, meaning data theft can be an issue as well. But if you’re on a server of your own (and if you trust all php-scripts you install on there), the APC-functions can be sheer bliss!
Yesterday I somewhat reluctantly removed eAccelerator from my server (Debian Etch) and installed APC instead. Not because I wasn’t satisfied with performance of eAccelerator, but because the packaged version of it was not in the Debian repositories (Andrew McMillanprovided the debs), and those debs weren’t upgraded at the same pace and thus broke my normal upgrade-routine. Moreover APC will apparently become a default part of PHP6 (making the Alternative PHP Cache the default opcode cache component). Installation was as easy as doing “pecl install apc” and adding apc to php.ini. Everything seems to be running as great as it did with eAccelerator (as most test seem to confirm).