Posts tagged “HTC Magic”

Changing HTC_IME language to Danish and other languages

Prerequisites are to have had started the program once, so that it has made the configuration files and a properly installed AndroidSDK on you computer.

OK, so there are two ways of achieving this. On ROM’s that support Danish as a system language you should go choose that in Settings>Locale & text>Select locale, here you will find your language. Change to it and HTC_IME should also be in that language as well. Super easy. Now you might want to have the UI language to be English. If you change it back to English in the Locale picker, the HTC_IME language will revert to English also, which you don’t want if you want Danish word prediction.
What we have to do then is to echo “en” to /data/property/persist.sys.language, which contains the information about what language the user UI should be. This is done by executing following commands in your command line.

adb shell
echo en > /data/property/persist.sys.language
reboot

You can also do this without changing any locales and change the settings only for HTC_IME, and not making them system wide.
This is done by pulling the configuration file for HTC_IME to your computer, editing it and pushing it back.

adb pull /data/data/com.htc.android.htcime/shared_prefs/com.htc.android.htcime_preferences.xml . (remember the dot!)

edit the line saying <string name=”keyboard_language”>x<⁄string>, where x is the value we need to change to 8 to get Danish dictionary (see bottom of post for other languages). Save the file and push it back to the phone and reboot.

adb push com.htc.android.htcime_preferences.xml /data/data/com.htc.android.htcime/shared_prefs/com.htc.android.htcime_preferences.xml

Now you only need to either reboot the phone or change the layout to Compact QWERT and back and you should have your chosen dictionary and word prediction. This ofcourse works for other languages aswell. Here are the following values that seems to work for the last method:

English 0
Arabic (Egypt) 14
Arabic (Israel) 14
Czech 7
Danish 8
Dutch 11
Spanish 4
Finnish 12
French 1
German 2
Greek 17
Italian 3
Norvegian (Bokmål) 10
Polish 13
Portugese 5
Romanian 16
Russian 6
Swedish 9
Turkish 15

This was tested on CyanogenMod 4.1.11.1 and up and will most likely work on other ROM’s aswell. Also notice that it will keep saying English in the Settings menu.

Latest version of HTC_IME for donut can be aquired on XDA-developers – thanks to Cyanogen.

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.

Change splash screen on HTC Magic

Some of these phones are branded and come with an ugly splash screen from the carrier, and you might want to change that into your own. The only things you need is a Engeneering SPL or a Hard SPL, which you should how to get from the previous blog posts I made, and either a Linux operating system with Imagemagick installed and this application for Windows or this application for Linux (has to be build from source) to create your own splash images.

First step is to convert an existing image with the dimensions 320×480 pixels. The image file has to be supported by imagemagick, so it has to be either gif, jpg, png, bmp or whatever is supported. This image file has to be converted into a 256 colour 8-bit raw image file:

convert -depth 8 splash.png rgb:splash.raw

Check that the splash.raw file is exactly 460800 bytes.
When you have the raw with the correct size, we need to compile the rgb2565 application it is done by running:

gcc -O2 -Wall -Wno-unused-parameter -o rgb2565 to565.c

When you have the application compiled the raw image has to be converted to a format the phone understands:

rgb2565 < splash.raw > splash.raw565

Check that this new file is 307200 bytes, otherwise do not flash it to the phone. We have now created the splash image for the phone. You can do the same in a Windows environment with the application mentioned in the start of this blog post. It should be obvious how to use it.

Second step is to flash the splash image to the phone. Start the phone in fastboot mode by holding back+end/power, also make sure you have the AndroidSDK on you computer installed and have the tools in your PATH.

Then make sure that the fastboot device shows up on you computer:

fastboot devices

cd to the folder where the splash.raw565 is and execute the following commands:

fastboot flash splash1 splash.raw565
fastboot reboot

If you want it to show up for longer (only for pre-cupcake):

fastboot flash splash1 splash.raw565
fastboot flash splash2 splash.raw565
fastboot reboot

The phone reboots and you should now see your splashscreen, enjoy :)

This is how my current splash looks like:

Splash image on my HTC Magic

Splash image on my HTC Magic

My own converted splash screens can be found here: http://ostebaronen.dk/android/splash/

Credit goes to: Android-dls.com Wiki

HTC Magic APN settings for Bibob

Here are the settings I use for my carrier, Bibob.

Name: Bibob
APN: internet.bibob.dk
Proxy: 212.88.64.8
Port: 8080
MMSC: mms.sonofon.dk
MMS Proxy: 212.88.64.8
MMS Port: 8080
MCC: 238
MNC: 02

Username, password and server are not set. Seems to work fine, at least with 3g connection. Haven’t tried MMS yet.