Format of XT9 database - Windows Mobile Development and Hacking General

Hi!
I am looking for a description of the XT9 database format. I've searched on the net but have not been able to find an answer.
What I'm trying to do is create a program to automatically enter words from a textfile into the t9-db. What I've done 'till now is write a mortscript that uses et9mywords.exe to add words from a file. The downside of this is that the script is very slow in sending the keystrokes to et9mywords.exe and I would also like to hide the whole process of adding the words from the user (which I couldn't accomplish with mortscript/et9mywords.exe).
Thanks in advance,
Georg

Hi Georg,
did you succeed in your task? I found a 3MB italian txt file and I'd like to inject it in my xT9UdbData.dat file (gingerbread 2.3.4 xt9 dictiornay file) but I don't know how it is coded.

Related

HOWTO: programmaticaly create a shortcut to a file/folder

hi,
I need to create a shortcut to a file or folder using eVC++ 4.0, anybody knows how to do this??
Thaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanx alot
Mohammad
It's very easy:
Just create a file (with lnk extension)
and write to it:
10#"my_app.exe" -launch
this is what it means:
10 - length of the string after #. This value doesn't have to be accurate because it is usually ignored.
"my_app.exe" - path and name of the target of the shortcut.
-launch - command line parameters (if you have any)
You can also add: ?incon.exe,0 to take an icon from another exe / dll
Thaaaaaaaaaaaaaaank you very very much,
but I need a small thing, could you please provide me with a complex example so I can understand all features supported for shortcuts.
Thank you again,
Mohammad
Mo.
A number of us have posted about the structure of the .lnk file.
Search against my username for the word completeness.
V
now, I searched and got how the thing works, but I have a problem with coding this stuff:
When I attemp to write to shortcut file like this:
strData.Format(_T("%d#\"%s\""),strFilename.GetLength(), element.strPathname);
ShortcutFile.Write(strData,strData.GetLength()*2);
The file is not written correctly, what I get is the data I wrote in the file with a square charecter after each letter like this:
#□4□0□"□\□S□t□o□r□a□g□e□ □C□a□r□d□\□M□y□P□r□o□g□r□a□m□.□E□x□e□"□
so how can I solve this? and does it relate to unicode?
That's because you are trying to write it in UNICODE. This adds zero to every byte.
You must use fopen, fprintf, fclose functions or just create an array of char and use FileWrite to create an ASCII text file.
Thanks levenum,
but isn't windows ce file system unicode based? if so, how can I use ASCII format to write unicode filenames?
Thanks alot
Mohammad
#include <Oleauto.h>
......
char convertUshortToChar(unsigned short in)
{
char con='\0';
VarI1FromUI2(in,&con);
return con;
}
and add Oleaut32.lib to the list of object/library moduals in you project settings.
just call that for each unicode character that you want to be ascii and write the result to file.
Two things:
a) The file system may be UNICODE, but shortcuts are ASCII text. Also ASCII functions like fopen are supported.
b) There is a much easier way to convert UNICODE to ASCII:
mbstowcs(unicodeStrBuffer, asciiStrBuffer);
OK, I did it, but I think that there is a problem with Windows mobile, and it is a big problem.
Till now, I beleive that you cannot create a shortcut to a unicode-named file, I failed to do that, File explorer was not successful, Resco Explorer was not better.
Worse, they do not tell you that you cant create the shortcut, they create the shortcut for you and when you try to open it they conclude that the path was not found!!.
Very bad huh?
Mohammad
I thought that all file names are in unicode?? Use my shortcut creator in GSMbeam file open dialog to try and make a shortcut to a file named like you said. If that shortcut dose not work send me the file in question and I will try and see whats going on.
Ok, I downloaded your program and tried to create a shortcut for an arabic-named file, simply it did not work.
I know its not a bug in ur program, its a bug in Windows Mobile, it is mainly a bug in the design itself, how does Micro$oft design windows mobile to be unicode based while non-ascii characters are not supported in the shell links, its really a shame.
You can be sure that this will happen with asian characters along with Farsi, Hebrew, Arabic and all non-ascii characters.
Programmatically, what happens is as follows:
1. A program converts a filename from unicode to ASCII to save it in the .lnk file.
2. If the file name contains non-ASCII characters, those will be converted to NULL character.
3. When the shell tries to resolve the link target it does not recognise the filename because some characters are NULL.
Thats what I found out!!
Take this file name for example (Arabic): 2مرحبا.mp3
Try to solve the issue, and please inform us whatever happens with you..
Best Regards,
Mohammad
So the problem is how to get the shell to read unicode in lnk files. I re-wrote a lnk file in unicode to see if it would work but it would not. There are a lot of non english ppc users, surely this problem has come up before?
As an experiment I also made shortcut to a folder using utf-8, I think that contains arabic characters and also the ascii characters. After removing some garbage that my editor put at the front of the lnk file worked fine. Try making a shortcut in notepad and saving it as a utf-8 file then rename it on your device but make sure there is no extra characters.
أنا قادر على أكل الزجاج و هذا لا يؤلمني. -- I think those characters are arabic and they are copied of a utf-8 table site so if the shell can read a utf-8 lnk that contains english letters then maybe it can do the arabic too.
Actually, non English UNICODE characters are translated in to extended ASCII codes (128 - 255). When the system needs to translate these codes back to UNICODE it relies on code page definitions in the wince.nls file.
If your locale is properly set to Arabic and you have a valid nls installed (ether you have Arabic ROM or some sort of Arabic language support installed) you should be able to reference Arabic file names using ASCII links.
So, can I depend on string conversion functions we discussed before in this topic to convert characters according to my code page?
I have an arabic ROM installed on my Wizard, it is the i-mate rom on O2 device, so the arabizer doesnt work well, may be because the serial number of the O2 device.
Anyway, I should invistigate this issue on my friend's JamIn device, and we should come up with a workaround for this wiered problem.
Regards all,
Mohammad
OK,
I have tried creating a shortcut on my friend's arabic-enabled JamIn device, the shortcut refers to arabic-named file and it worked good.
levenum, you are right, it depends on the code page on each device, so your device will not be able to create a shortcut to an arabic named file.
Mohammad

HELP Translating Apps Tutorial

I've seen that many apps comes with AppName.0409.mui installed in the same folder of the app, usually \Windows.
For who don't have an english OS, usually miss app dialog box string.
I've seen that if u want to have back dialog box string u have to make a copy of AppName.0409.mui and reneme it into AppName.xxxx.mui where xxxx is your contry code (for me, italian, 0410).
But how to have dialog box string in native language?
I've tried with a recent app extracted from touch dual (Action Screen) which have a mui file with only one string. I've used Resource Hack, changed the string, compiled and saved. But... nothing.
In second instance i've changed not only the string but also the language code, compiled, saved and...
So can someone who is skilled make a tutorial for changing app strings?
Sorry for my bad english and thanks in advance for reply.
P.S.: i've read this http://forum.xda-developers.com/showthread.php?t=311078 and also this http://forum.xda-developers.com/showthread.php?t=307968 but talking about rom, not apps...
I do it like this:
1. Copy the program's executable file to pc.
2. Open the exe with Resource Tuner. I delete all other folders exept Menu, Dialog and String(in these are all the strings for translation) and save the file.
3. Then I open it with resource hacker and push action -> save all recources
4. I open the generated rc file with notepad and replace all the:
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US(or maybe this is another language)
lines to:
LANGUAGE LANG_GREEK, 0x1 (this is for greek language)
and save the file.
5. After that I open the rc file again, but now with resource builder and I push tools -> Create resource-only dll and I save the file as name_of_file.exe.0408.mui(for greek).
6. Finally I open this file with resource hacker and I translate it
I used to do it in this way cause I have all these three progrs(resource hacker, resource tuner and resource builder)
Maybe there are other progs or ways but this works fine for me until now. If someone knows easier and faster methods I also want to know.
First, thanks for reply.
I was trying to make an easier thing... but maybe i can try this way for my scope.
I've installed HTC Action Screen, you can found it at: http://forum.xda-developers.com/showthread.php?t=336587
It's a cool launcher, nothing more. After installation i can find in \Windows folder two files:
HTCActionScreen.exe
HTCActionScreen.exe.0409.mui
Well in the mui there's only one string that is the top of the launcher screen, that i don't see. I've renamed 0409 into 0410 and now i see the string, the original one in english (some like that "Dial phone number or select a task below:").
I'd like to change in italian, so, i've used resource hacker ONLY for translate the string (as in your 6.) but... i don't see anything once again!!!
Any suggestion?
Have i to start from exe as in your reply?
Thanks again.
This is happens because you cannot change the LANGUAGE line with resource hacker. For this I save the resources in a rc file and adit it with notepad. I had similar problems with some muis that cannot translated before use the method that I described above. You only need resource builder to recompile the rc file to mui again. I don't now in what must change the Language line for Italian, but I think you can find out if you open an italian mui file.
So, i describe my step:
1) open HTCActionScreen.exe.0409.mui with Resource Hacker and and push action -> save all recources
2) open the .rc just created with notepad and changed LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US into LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN
3) open this .rc with resource builder and push tools -> Create resource-only dll and I save the file as HTCActionScreen.exe.0410.mui
4) open this file with resource hacker and translate it
it doesn't work
Where's my fault?
Maybe have i to sign the file?

Dictionary doesn't remember added words

Hi!
I'm fed up with the dictionary on my Blackstone.
There are some words which are not contained in the dictionary, so I have to add them. But it's not that easy. Sometimes, I have to enter the new word twice until it's saved and almost always, my added words disappear after some time, so I have to add them again and again.
Is there any solution available or do I have to change any settings?
I hope someone can help me.
Thanks.
Olli
P.S.: This happens on ANY ROM, not on a special one.
Hi,
I've had the same experience.
My sollution:
On the latest Dutty ROM (WM6.5) there is an program named "eT9MyWords". It's a simple word list where you can insert directly all the words you frequently use.
I'm postive that you will be able to download this program if you don't have it already.
I hope that the following will solve your prob.
1) Copy files below, from windows directory to another location
eT9Rudb.Rdb
eT9AsDb.Adb
2) Change attributes from read only to archive
3) Overwrite files in windows folder (Now the files are not in rom)
4) If are still read only you have to change again in Archive (Now you can becouse files are not in rom)
Then, create the following folder inside windows directory
\ET9IMEDB\
(e.g. \Windows\ET9IMEDB\)
Copy files eT9Rudb.Rdb and eT9AsDb.Adb inside \ET9IMEDB directory.
Now, using eT9MyWords.exe or keyboard's 'add word', you can add your custom words which will be saved for ever.
Hey!
Thanks for your ideas. Wasn't looking here for a few days.
I will try your solutions and tell you, if they work.

suggest word(s)

hi
I am sorry if this has been asked before (but I did search)
Is there any way to add suggest word(s) when typing in text, I have to type the same sentence over and over again every day and on my old phones/PDA this was not to bad as you could set the suggest word(s) to give you the next 4 works, I can't find this in the HD2 is there any way to add it
Thanks for any help
according to hint 19 in this thread:
19. Improve Suggested T9 Dictionary With Custom Words
The Leo has a very useful hidden application in the Windows directory. You need to unhide hidden system and Rom files in order to find it. Find the file "eT9MyWords.exe" in the Windows directory and add a shortcut to this file in your Windows/Start Menu folder.
When in the application, add the most common words you use when using the keypad such as names, locations, user names, email addresses and other words not common in the standard T9 dictionary. For example if you are based in London, UK you could add the following locations:
Leicester, Piccadilly, Tottenham, Soho, Charring, Euston, Trafalgar, Clapham,
and words such as BRB, DVD, coz, lol, xoxo, [email protected], ciao, etc.
Click to expand...
Click to collapse
I have read these tips and know about adding custom words.
What I want is for three to four words to come up to complete a sentence.
This has been in the input tap on old PDAs suggest word(s)
Hi
Is there no one Who can help with this?
Really with all the clever people on this site can no one help me
Please someone help me
Hi, i did a few tests and found...
et9mywords wont accept spaces, and although you can sneakily paste sentences into the input box, it wont save them, so that method is out.
Custom words are also found in HTCMDB.txt, and the good news is it works!
(See image)
The line 'this is a test' i hard coded into the file using my kitchen, then the 'this is a second test' i added as follows....
(I use resco explorer, i suspect the normal file manager wont do what is required, total commander probably will)
find /windows/HTCMDB.txt (it will be hidden, so show all files)
copy it to your sd card, and from there to your desktop.
(I tried editing it on the phone using windows mobile notepad, but it didnt work right)
On the PC, right click the file, properties, and untick 'read only', apply.
Open it and edit it as required.
Save it, and again right click, re apply 'read only'
Copy back to your sd card, and from teh phone use commander or resco to move it to /windows/
You will probably get a warning about rom files and what not, thats ok.
Reboot, and you should now be able to see your sentences.
PLease let me know how you get on.
EDIT - just for clarity, every entry inside HTCMDB.txt must be on its own line.
thanks for your help with this I have done as you posted and it works, it's a bit long winded but it works
thanks jason

Editing XT9 words on PC?

Hi, is there any way how to edit XT9 words on PC? I know about the et9MyWords.exe app in WM, but I want something more comfortable...
Thx
EDIT: Ok, I've found that editing HTCMDB.txt from Windows directory does the job...
Nice. Thanks for this info.
How do you edit and save HTCMDB.txt file? It's a system file found under Windows folder. Won't allow modification of this file.
Any work around?
htc x9 edit
i used total commander (explorer dose not allow you to modify system files) to copy the file to sd card (otherwiswe wont let you edit it) edit+save and then copy to windows folder (overwritting) and that s it
I was able to do it using Total Commander. But it doesn't seem to work. The additional words i put in there were not recognized. And the edited file with more words is only half the size of the original file. What went wrong?
in fact i've translated part of the words allready existing in the file (takes some time to do them all manually) and it worked thow i did not take notice of the final file size
I can't add new words to the list? Only change existing words?

Categories

Resources