Posts tagged “Gadgets”

Change the animated boot screen on HTC Magic (Google builds)

NOTICE, some autosigners and sign programs do not work on Vista and Windows 7, either use Windows XP, MacOS or Linux for signing.

The other thread about changing the animated boot screen on HTC Magic, seems to only work on HTC builds, which implement the ability to have animated boot screens through a simple gif image. This does unfortunately not apply to the Google build ROMs, therefore we need to avail ourselfs of another method of changing the boot screen, which also is more complicated.

First we need to pull the framework-res.apk which resides in /system/framework/ from a update.zip for a full ROM.

Next unpack the file somewhere, inside the folder assets/images there should be two or more png images. They are called:

android-logo-mask.png

android-logo-mask

android-logo-shine.png

android-logo-shine

And can look like the images above. Those are the two files we need to edit or remake to our likings.

As you maybe can se the letters and the android in the first image are transparent, which means the shine will be shown on the phone it self as background image. This is as far as I know the only possibility of having a animated boot screen on the Google build ROMs, which is not as fancy as the animated gif images that you can make for the HTC build ROMs.

For this guide I will use the same splash image I am using for the first non animated splash screen.

As you can see it does not contain any transparent areas, I am going to turn the outline of the android and the lettering transparent and change the color of the shine. You can do that in any photo editing program such as GIMP, photoshop and Paint.net, and I will not guide you through that. The result is as follows.

transparentandroid

android-logo-shine

Now that I have to two images, I overrite the images in framework-res/assets/images, zip the file and rename it back to framework-res.apk and put it back in the update.zip, then sign it according to android developers. Now flash it to your phone and you should be seeing it next time you boot your phone.

Fixing accelerometer on HTC Magic

From time to time when you change ROM’s on your HTC Magic the accelerometer goes crazy and won’t read any values, which means no rotation of the screen and the compas will not respond either. This is fixed by deleting the file that contains previous data about the positioning. The reason for this is when you sometimes forget to wipe before applying new ROM’s old data is stored and messes up the accelerometer.

Reboot your phone in Recovery mode (home+end/power)

adb shell
mount -o rw /dev/block/mtdblock5 /data
rm /data/misc/akmd* /data/misc/rild*

Now reboot the phone and everything should be working again.

Change the animated boot screen on HTC Magic (HTC Builds)

You might have noticed that the first bootscreen, the one we changed in the previous guide on how to change the Android Splash, changes into some other boot image, which is animated. You might want to change that, which is super simple. This only works for HTC builds of the Android ROMs.

See this post for Google Builds

The second boot screen has quite alot of possibilities, it can be animated and it can have sound. It can be made of two seperate images, one where the animation happens and a background image. You can found some of these bootscreens here: 2nd splash images

Now when you have the image(s) and the sound file we need to edit the boot_animation.xml file to contain the file names of the images and the soundfile you want to show up upon boot. Here is an example of how it can look:


<BootConfiguration>
 <BootAnimation
    image="/system/media/boot.gif"
    audio="/system/media/boot.mp3"
    image2="/system/media/boot2.gif"
    image3="/system/media/boot3.gif"
    screenX="100"
    screenY="130"
    image_bg = "/system/media/boot_bg.gif"
    useAudio="1" // 1: true ; 0:false
 />
</BootConfiguration>

Everything except the image entry is optional. So if you don’t want to have sound you do not need to have it in the file. The screenX and screenY are offsets if you are using image_bg along with a smaller image that doesn’t fit the whole screen, it is for positioning it on the screen.

When you are done editing the file save it as boot_animation.xml and now we can push all the files to the phone. Remember to remount the /system partition with the rw option

adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push boot_animation.xml /system/media/
adb push boot.gif /system/media/

Do so with every file mentioned in the boot_animation.xml file and reboot your phone to see the final result.
Enjoy :)

EDIT:
Apparently some ROM’s have their bootscreen stuff in /system/media/bootscreen/ rather than just in the media folder.

Getting tablet and rotation to work on Thinkpad X60t

Getting pen and rotation to work on X60t.

NOTE: I used Gentoo Linux with kernel 2.6.25 with tuxonice patch and linuxwacom-0.8.0_p20.

First make sure you have the wacom drivers that come with the kernel compiled into the kernel or compiled as a module.
Though I’m not sure if it is nessesary or not.


	Deveice Drivers --->
		Input Device Support --->
			Tablets --->
				<M>   Wacom Intuos/Graphire tablet support (USB)

In gentoo you have to unmask the newest version of the linuxwacom driver. To do this do the following unless you are running
an ~arch:


	echo "x11-drivers/linuxwacom ~*" >> /etc/portage/package.keywords

Now install the linuxwacom package:


	emerge linuxwacom

When it is done installing we can add the nessesary sections in the Xorg.conf to make it respond to the input from the tablet.

Make your Section “ServerLayout” look similar to this (yours might look a little bit different, the important part is the
Stylus, Cursor and Eraser):


	Section "ServerLayout"
		Identifier     "X.org Configured"
   	Screen      0  "Screen0" 0 0
		InputDevice    "Mouse0" "CorePointer"
		InputDevice    "Mouse1" "SendCoreEvents"
		InputDevice    "Keyboard0" "CoreKeyboard"
		InputDevice    "Cursor" "SendCoreEvents"
		InputDevice    "Stylus" "SendCoreEvents"
		InputDevice    "Eraser" "SendCoreEvents"
	EndSection

We also need to add some device sections:


	Section "InputDevice"
		Identifier  "Cursor"
		Driver      "wacom"
		Option      "Device" "/dev/ttyS0"
		Option      "Type" "cursor"
		Option      "ForceDevice" "ISDV4"
		Option      "Mode" "Absolute"
		Option      "BottomY" "18432"
		Option      "BottomX" "24576"
	EndSection

	Section "InputDevice"
		Identifier  "Stylus"
		Driver      "wacom"
		Option      "Device" "/dev/ttyS0"
		Option      "Type" "stylus"
		Option      "ForceDevice" "ISDV4"
		Option      "TPCButton" "off"
		Option      "BottomY" "18432"
		Option      "BottomX" "24576"
		Option      "Mode" "Absolute"
	EndSection

	Section "InputDevice"
		Identifier  "Eraser"
		Driver      "wacom"
		Option      "Device" "/dev/ttyS0"
		Option      "Type" "eraser"
		Option      "ForceDevice" "ISDV4"
		Option      "BottomY" "18432"
		Option      "BottomX" "24576"
	EndSection

The Optiopn “ForceDevice” “ISDV4″ is nessesary when using serial tablets.

Before we can restart Xorg, we need to tell the system where the tablet device is, you have to do this on every boot:


	setserial /dev/ttyS0 port 0x0200 irq 5 autoconfig

Add this line to /etc/conf.d/local.start (or at least that is how you do in gentoo, this might be different on other
distro’s with different kind of init systems).

After a restart of Xorg the tablet should now work. Try it out. I use Xournal to make notes.

Now we got the tablet to work we can play a bit with rotating the screen when you swivel down the screen and when you
swivel it up. Also when you push the rotate button on the buttons beneath the screen.

Make sure you have the newest thinkpad package and acpid installed:


	echo "app-laptop/thinkpad ~*" >> /etc/portage/package.keywords
	echo "sys-power/acpid ~*" >> /etc/portage/package.keywords

Install both packages:


	emerge thinkpad acpid

Modprobe the thinkpad module and start the acpid daemon:


	modprobe thinkpad
	/etc/init.d/acpid start

Also make the daemon start and load the module on every boot:


	rc-update add acpid default
	echo 'modules_2_6="${modules_2_6} thinkpad"' >> /etc/conf.d/modules
	echo 'module_thinkpad_args_2_6=""' >> /etc/conf.d/modules

When you swivel down the monitor and when you swivel it up it generates an acpi event. This event looks like this:

When swivling down:


	Jun  9 02:22:37 arcadia acpid: received event "ibm/hotkey HKEY 00000080 00005009"

When swivling up:


	Jun  9 02:22:45 arcadia acpid: received event "ibm/hotkey HKEY 00000080 0000500a"

You can find out what events your tablet makes either by tailing /var/log/messages or use acpi_listen.

When we know what events there are made, we can make acpid execute some scripts for us.

Make a file in /etc/acpi/events called x60t-swivel-down and one that is called x60t-swivel-up.

x60t-swivel-down should contain the following:


	# called when tablet screen swivels down (into tablet mode)
	event=ibm/hotkey HKEY 00000080 00005009
	action=/etc/acpi/actions/x60t-swivel-down

x60t-swivel-up should contain:


	# called when tablet screen swivels up (into laptop mode)
	event=ibm/hotkey HKEY 00000080 0000500a
	action=/etc/acpi/actions/x60t-swivel-up

As you can see in both files, I took the received events and and assigned some actions for them.

Make the action scripts, these are placed in /etc/acpi/actions:

x60t-swivel-up:


	#!/bin/bash
	/usr/bin/xrandr -o normal
	xsetwacom set "Stylus" Rotate none
	xsetwacom set "Cursor" Rotate none
	xsetwacom set "Eraser" Rotate none

x60t-swivel-down:


	#!/bin/bash
	/usr/bin/xrandr -o inverted
	xsetwacom set "Stylus" Rotate half
	xsetwacom set "Cursor" Rotate half
	xsetwacom set "Eraser" Rotate half

The -o option for xrandr indicates the rotation of the screen. You can use normal, left, right and inverted here.
You have to tell Xorg, which orientation the Stylus, Cursor and Eraser have when rotating.

Save the scripts. Restart acpid and test it:


	/etc/init.d/acpid restart

Now try swivel the screen down, you should se the screen rotate. Swivel it up and it returns to normal.
You might also want to use the rotate button – this button does not generate acpi events, though it generates
X events, that you can grab with xev:


	emerge xev

Now fire up xev and push the button, the output looks like this (your output might look different):


	KeyRelease event, serial 30, synthetic NO, window 0x3a00001,
		root 0x59, subw 0x0, time 719677542, (609,349), root:(613,403),
		state 0x0, keycode 203, same_screen YES,

What we need is the keycode, which in this case is 203. If it does not appear, you might need to run:


	setkeycodes 6c 153

That has to be done upon every boot. Add it to your /etc/conf.d/local.start, and try run the xev app again and see if
you can grab the event now.

Now make a file called .Xmodmap in your home directory containing:


	keycode 203 = F13

And make a file called .xbindkeysrc containing the following:


	"/home/username/bin/rotate"
	F13

As you can see the file points to /home/username/bin/rotate we have to make that file, and this one contains:


	#!/usr/bin/env bash

	# This is a script that toggles rotation of the screen through xrandr,
	# and also toggles rotation of the stylus, eraser and cursor through xsetwacom

	# Check orientation
	orientation=`xrandr --verbose -q | grep LVDS | awk '{print $5}'`
	# Rotate the screen and stylus, eraser and cursor, according to your preferences.
	if [ "$orientation" = "normal" ]; then
		/usr/bin/xrandr -o right
		xsetwacom set "Stylus" Rotate cw
		xsetwacom set "Cursor" Rotate cw
		xsetwacom set "Eraser" Rotate cw
	elif [ "$orientation" = "inverted" ]; then
		/usr/bin/xrandr -o left
		xsetwacom set "Stylus" Rotate ccw
		xsetwacom set "Cursor" Rotate ccw
		xsetwacom set "Eraser" Rotate ccw
	elif [ "$orientation" = "right" ]; then
		/usr/bin/xrandr -o inverted
		xsetwacom set "Stylus" Rotate half
		xsetwacom set "Cursor" Rotate half
		xsetwacom set "Eraser" Rotate half
	elif [ "$orientation" = "left" ]; then
		/usr/bin/xrandr -o normal
		xsetwacom set "Stylus" Rotate none
		xsetwacom set "Cursor" Rotate none
		xsetwacom set "Eraser" Rotate none
	fi

Remember to make it executable!

We are almost done. Make your window manager run xmodmap ~/.Xmodmap and xbindkeysrc upon start. I use gnome and made
a little script containing the two commands and configured the gnome session to run the scrip when starting.

Run the following commands and test the button:


	xmodmap ~/.Xmodmap
	xbindkeys

We are now done!

Updgrading BIOS on X60t without CD drive.

I recieved my Lenovo Thinkpad X60t yesteday and wanted to update the bios on it, because the one that was installed on it was pretty old. I found out that according to Lenovo you need a CD drive or a 32-bit version of Windows installed, which I don’t have. Since I run Gentoo on the thinkpad. But there is a sollution for this problem. It’s done pretty easy. All you need is:

When you have all these things you are ready to go!

Install the HP USB Stick formatter and place it somewhere you remember. I installed it on the desktop.
Go to the folder where you installed it and extract the HPUSBF.EXE file with winrar or whatever you use to a subfolder in the current directory. Now that you have extracted the files to a subfolder, run the HPUSBFW.EXE utility and format you USB Stick choosing Create DOS startup disk and selecting the subfolder you extracted HPUSBF.EXE to. Now we are almost done. Last step is to extract the bios to the USB Stick using winrar or similar to a subfolder on the USB Stick.

!NOTICE! it’s not a fault that is seems like there are no files on your USB Stick before you extract the bios to it – they are hidden.

Unmount the USB Stick and boot it. A DOS promt should appear, cd to the subfolder where the BIOS were extracted on the USB Stick and write command.com. The rest should be pretty easy :)

Source: ThinkWiki.org

Encoding videos for the N810

I found this very useful program called Media Converter 2, that is very useful to convert videos for to play on the N810.

I converted Cromartie High School for the trip I’m going on this morning. I used N810 High settings, 2 passes and audio gain.

Before I started encoding I needed to extract the subtitles from the MKV files, cause the program doesn’t include them automatically unless they are in the folder where your source file is and are called the same as the source, just with the extension .srt. I extracted the subs with mkvextractgui which is a very nice little application, for extracting video, subtitles and audio from MKV files.

The end result is pretty good, playable in Canola2, I don’t complain and I’m going to laugh so much in the train.

Swap on N810, microB and kernel tweaks.

I read the thread on Internettablettalk.com, on how to make some minor tweaks to the N810, which have seemed to help a bit on the sluggishness when running a lot of programs on it. Though not much. The browser also got a little bit snappier and that is about it.

You can try out the settings yourself, though I’m not taking any responsibility if you screw anything up.

First close your microB browser and start editing this file: /home/user/.mozzila/microb/prefs.js
scroll down till you find this line:

user_pref("browser.cache.memory.capacity", 8192);

Edit it so it looks just like it. It increases the browser cache from two to eight megabytes.
Then add the following lines to the bottom of the file:

user_pref("nglayout.initialpaint.delay",2000);
user_pref("content.notify.interval", 1250000);
user_pref("content.notify.ontimer", true);
user_pref("network.http.pipelining", true);
user_pref("network.http.pipelining.maxrequests", 1000);
user_pref("network.http.max-connections", 4);
user_pref("network.http.max-connections-per-server", 4);

user_pref("network.http.max-persistent-connections-per-server", 1);

EDIT:
user_pref("network.http.max-connections", 2);
user_pref("network.http.max-connections-per-server", 1);
These settings should be better according to brontide, since 4 connections swamps the device.

This should help a bit on the browser being a little slow.

If you do not use the media player that comes with the N810 and use Canola or something like that you can disable the service that autodetects media for the built-in media player:

mv /etc/rc2.d/S99metalayer-crawler0 /etc/rc2.d/D99metalayer-crawler0

This can only be done by having root access.

Next up is adding some swap to your tablet.

Go to control panel > memory > virtual memory and add some memory there.

Now we have swap set up. The only thing we need to do now is making some kernel tweaks, and then we are done.

Download this sysctl file and place it in /etc/init.d/

chmod 755 sysctl

ln -s /etc/init.d/sysctl /etc/rc2.d/S99sysctl

Last step is to apply settings to /etc/sysctl.conf

Here is my file: sysctl.conf

This should help a little on your responsiveness on your N810 and in the browser.

All credits should go to brontide that made this thread on the InternettabletTalk forum.

zOMG N810 is here!

YAY, finally got my N810, there wasn’t any problems receiving or what so ever. I just went to nokia’s homepage, ordered it, payed and then a package came with UPS. Now I’m messing around with it, and already feel like its going to be a nice companion. The next thing I’m waiting for is a 8 GB microSD card for it, so i can store some stuff in the N810, even though it has 2 GB of space available already.

Ordered N810

Nokia N810 from the side

So the Nokia N810 Internet tablet has been out for some months various places on earth, but it hasn’t been released officially in Denmark. I decided to get me one of these Internet tablets, which I ordered from Nokia direct, where you can get it for approximate €490 with freight included in the price, which is pretty common for this device. I could have gotten it from a Danish retailer, for about 200DKK more, so I decided to get it directly from Nokia, and save the 200DKK for a 8 GB microSD card.

Now I’m looking forward to get the device, It should be able to view flash 9 objects with its Mozilla based browser, which means I would be able to watch videos from youtube, and other similar sites. But also play ScummWM games, and do other cool stuff, such as navigate through the GPS, listen to music, remote control my server and instant message with my friends. All this comes in a nice small package with a pretty big screen, and built in 2GB space. I’m so excited and can’t wait for it to arrive.

For those who don’t know what a Nokia N810 is you can go to Nokia’s webpage and see for your self.

Robson module now working

So yeah, I saw that Zepto recently release a new BIOS update for my laptop, which is a Zepto 6324W. After I got my harddrive replaced in the laptop, I asked Zepto to fit in an Intel Turbo Memory module, it’s also known as a Robson module, since that is the codename of the product.

Anyways, after a BIOS update, it all seemed to work. Before the BIOS update it said that ReadyBoost was activated, but not ReadyDrive. I messed around with the drivers for the module a lot before the BIOS update, but now it seems to work fine.

According to anandtechs test of the Robson module, it can give you a little performance boost along with more battery time, though it isn’t much.