VMWare Player 3 vs Linux 2.6.32

I wanted to test some crap in VMWare, didn’t feel like messing with the entire server thing so went for the player. Unfortunately, this thing doesn’t work against the 2.6.32 kernel.

After installation, you can fix it with as follows (as root):


cd /tmp
tar xf /usr/lib/vmware/modules/source/vmnet.tar
tar xf /usr/lib/vmware/modules/source/vmci.tar

cd vmnet-only
sed -i "/vnetInt.h/ a\#include \"compat_sched.h\"" vnetUserListener.c

cd ../vmci-only/include
sed -i "/compat_page.h/ a\#include \"compat_sched.h\"" pgtbl.h

cd /tmp
tar cf /usr/lib/vmware/modules/source/vmnet.tar vmnet-only
tar cf /usr/lib/vmware/modules/source/vmci.tar vmci-only

and rerun vmplayer.

Rooting the HTC Hero

Note: This is at your own risk. If you fry your phone, your problem, not mine.

I recently got an HTC Hero. Great phone, I’m loving the Android platform. Pity that you don’t have full access to it, and I actually wanted to merge my old phone (Nokia E65)’s SMS database into this one, so I needed full access.

(Un)fortunately, these days the HTC Hero comes with the latest firmware, 2.73.1100.5, which on the one hand makes rooting harder (fixes several bugs and fastboot no longer works) but on the other hand makes the phone respond a lot better.

After some twiddling and reading on the XDA Developers Forum, I came up with this recipe:

Downloads needed:

Howto:

  • Download the Android SDK, and install/extract it somewhere. I’m using Linux and put it under /home/<user>/android/
  • Download asroot2.zip, superuser.zip, and extract them in a directory of your choice. For instance, /tmp.
  • Change to the Android SDK directory and in that one /tools (here: /home/<user>/android-sdk-linux_86/tools/
  • Start adb (Android Debug Bridge): ./abd wait-for-device
  • Put your phone in HTC Sync mode: drag the notification bar down and activate HTC Sync

After a while adb should return to the prompt. Should mean your phone has been found.

  • Copy asroot2 and su on the phone in /data/local:
    ./adb push /tmp/asroot2 /data/local/
    ./adb push /tmp/su /data/local/
  • Open a shell to the device: ./adb shell
  • Make asroot2 executable, and launch it:
    chmod 0755 /data/local/asroot2
    /data/local/asroot2 /system/bin/sh

Your phone should greet you with:

[+] Using newer pipe_inode_info layout
Opening: /proc/564/fd/3
SUCCESS: Enjoy the shell.
#

At this point, remount your /system filesystem read-write.
Before remounting, executing the mount command should return a line containing:

/dev/block/mtdblock3 /system yaffs2 ro 0 0

Now, remount the fs:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
(this returns no output)

And now executing mount should return a line like:

/dev/block/mtdblock3 /system yaffs2 rw 0 0

and copy the su binary into /system/bin:
dd if=/data/local/su of=/system/bin/su
and make it executable with root permissions:
chmod 4755 /system/bin/su

Next, copy the Supseruser.apk to the SD card and install it.
Then, reboot your phone (power off and on).

Restart your abd shell, and execute su in your adb shell: su, and on the phone it should come ask if you want to allow root permissions:

SU request
Tap “Allow”, et voila, you now have a rooted phone.

Nacht van FCP&D

Nacht van FCP&D

Another shameless advertisement for the upcoming Nacht van FCP&D organised by the Flemish Caledonian Pipes & Drums – Clan MacKenzie, for our 20th year anniversary. We’re playing together with the Royal Fanfare St-Cecilia Teralfene.

The place to be? St-Bavo Humaniora, Lange Boomgaardstraat, in Ghent. The underground Reep parking is less than 100m away.


View Larger Map

Nokia 3109c and Snow Leopard (iSync 3.1)…

As I detailed in my previous post on how to get this phone working with Leopard, upgrading to Mac OS X 10.6 aka Snow Leopard broke things again.

Easy fix though: follow the steps in my previous post, and attached to this post you can find the ‘fixed’ MetaClasses.plist file.

All I actually did was copy this block in the existing MetaClasses.plist:

<key>com.nokia.3109</key>
<dict>
<key>Identification</key>
<dict>
<key>com.apple.cgmi+cgmm</key>
<string>Nokia+Nokia 3109</string>
<key>com.apple.gmi+gmm</key>
<string>Nokia+Nokia 3109</string>
<key>com.apple.usb.vendorid-modelid</key>
<string>0x0421/0x045A</string>
</dict>
<key>InheritsFrom</key>
<array>
<string>family.com.nokia.series40.3rdEd.bus.usb-bt</string>
</array>
<key>Services</key>
<array>
<dict>
<key>ServiceName</key>
<string>com.apple.model</string>
<key>ServiceProperties</key>
<dict>
<key>ModelIcon</key>
<string>NOK3109.tiff</string>
<key>ModelName</key>
<string>3109</string>
</dict>
</dict>
<dict>
<key>ServiceName</key>
<string>com.apple.synchro</string>
<key>ServiceProperties</key>
<dict>
<key>MaxCityLength</key>
<integer>50</integer>
<key>MaxEMailLength</key>
<integer>60</integer>
<key>MaxEventLocationLength</key>
<integer>150</integer>
<key>MaxPhoneNumberLength</key>
<integer>48</integer>
<key>MaxPostalCodeLength</key>
<integer>50</integer>
<key>MaxStateLength</key>
<integer>50</integer>
<key>MaxStreetLength</key>
<integer>50</integer>
<key>MaxURLLength</key>
<integer>60</integer>
</dict>
</dict>
</array>
</dict>

Since WP keeps on braking my indentation, just download it here: MetaClasses.plist

12th Celtic Weekend – Merelbeke

12th Celtic Weekend

Shameless advertisement for the upcoming 12th Celtic Weekend organised by the Flemish Caledonian Pipes & Drums – Clan MacKenzie, the pipeband where I play.

Friday november 6 2009
19:00 Official Opening
20:00 Flemish Caledonian Pipes and Drums
20:45 Kenny Nairn @ your request – Scottish folk

Saturday november 7 2009
11:00 Flemish Caledonian Pipes and Drums with Kenny Nairn
12:30 Haggis Amuses
12:45 Kenny Nairn @ your request – Scottish folk
14:00 Flemish Caledonian Pipes and Drums
15:15 Dance demonstration Folk and Country
16:30 Flemish Caledonian Pipes and Drums
17:45 Performance Country & Western with Irish influences
19:00 Flemish Caledonian Pipes and Drums
20:00 Ballathum XL – Irish folk
21:00 Flemish Caledonian Pipes and Drums
22:00 Ballathum XL – Irish folk

Sunday november 8 november 2009
11:00 Flemish Caledonian Pipes and Drums with Kenny Nairn
11.30 Royal Harmony “De Toekomst Sint Niklaas” – first part
12:15 Haggis Amuses
12:30 Royal Harmony “De Toekomst Sint Niklaas” – second part
13.15 Kenny Nairn @ your request – Scottish folk
14:00 Flemish Caledonian Pipes and Drums
15:00 Irish dance by Dancestudio Kim
16:00 Flemish Caledonian Pipes and Drums
17:00 Irish dance by Dancestudio Kim
18:00 Finale

The place to be? Kloosterstraat 20 in Merelbeke (Belgium, ofcourse)


View Larger Map

Using an Alcatel X200 under Linux

I recently purchased an Alcatel Onetouch X200 3G USB modem, to be able to use internet on various locations where there is no wired or wifi available. Works fine under Windows/Mac OS X, bit more of a hassle under Linux.

Here are some hints on how to get it to work:

  • You need to install usb-modeswitch to switch the card from it’s builtin usb-storage mode to the USBModem mode. Configuration is done in /etc/usb_modeswitch.conf
  • Use /dev/ttyUSB2. The other two ports that your modem will give don’t really work well.
  • Also, use atleast kernel 2.6.31. Earlier ones might not work.
  • Disable PIN authentication on your SIMcard! This one thing was what kept it from working decently – I tried tons of things, and when I disabled the PIN, it worked nearly instantaneously.
    The command to do PIN auth is AT+CPIN=1111 (changing 1111 by your actual PIN), but when issuing this command the modem accepts it, but very often freaks out afterwards. Weird.
    You can find a nice list of GSM modem AT codes on gsm-modem.de.

Thats about it!

Backup & restore of your Tomato-based router statistics

Since I recently moved, and now have my Tomato based WRT54GL on 24/7, I also wanted a way to keep a backup of those nice statistics the router generates. You have the option (built-in) to write them to nvram or to a CIFS share, but the former has a limited amount of writes, and the latter is not really stable (and I don’t have anything powered on all the time to keep the backups on).

I found some nice scripts on gulbsoft.de that showed how to make backups on an ftp/website combination, but I wanted to move this to an internet-host (since that thing IS up 24/7 in contrast to my inhouse infrastructure) and I didn’t really like them, I ‘redesigned’ them.

Lo and behold!

The only thing you need to do is put this in your WAN-up script:

killall rstats

URL="http://your.web.page.address"
FTP="ftp.server.name"
USER="username"
PW="password"
STATSDIR="/tmp/var/lib/misc"
FTPSCRIPT="/tmp/ftpbackup.sh"
FILES="rstats-history.gz rstats-speed.gz rstats-stime rstats-source"

cat > $FTPSCRIPT << EOF
for FILE in $FILES; do
  ftpput -u $USER -p $PW $FTP \$FILE $STATSDIR/\$FILE
done
EOF
chmod a+x $FTPSCRIPT

cru d bkstat
cru a bkstat "2,15,30,45 * * * * $FTPSCRIPT"
cd $STATSDIR
rm $FILES
for FILE in $FILES; do
  wget $URL/$FILE
done
sleep 10
rstats

Don’t forget to change the lines reading URL, FTP, USER and PW to your respective website address, ftp server name, ftp login name and ftp password!

Status update!

Short summary of what I’ve been busy with:

  • We’ve moved to a new place, near the city of Ghent. Lots of painting needed be done, decoration, stuff like that… kept me busy for the better part of two months. The results are viewable here.
  • We’ve also moved internet providers, since the all-in-one bundles (TV+Telephony+Internet) came out cheaper in the end. So I’m back at Telenet.
  • Friend from Spain came over during the Gentse Feesten. It’s a treat being able to go by bus to the centre of Ghent in 10ish minutes ;)
  • On a sadder note, one of our smoothcoat cavies, Macchiatto, passed away on july 20th.
  • I’ve managed to trash the linux installation on my macbook, and since I too lazy I put Mac OS X on it again. Said macbook also had to go in for repairs anyway (crack in the topcase). All fixed now, free of charge.

I think that’s about it. Mostly getting settled now in the new place… so far so good ;)