yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Apps and Games] vijay555:
Guys, responding to this query:

http://xdaforums.com/showthread.php?p=3233602#post3233602

I'm releasing a solution to allow you to remap the double tap and press and hold functions of the wired headset on the Blackstone. This may well work for other recent HTC devices, but given that I dropped out about the time of the dinosaurs, I'm not up to date with their peculiarities. Try it, it can't do much harm...

Moving on:

Ok, I haven't publicly released anything for a long, long time, so herewith, an unfinished portion of VJPoOf (which stands for VJPowerOff).

<the science bit>

VJPoOf is basically a selection of my VJBrisk tools, updated to pass command lines, and searching for only specified target .exe and .lnk files.

</the science bit>

HTC have made it quite easy to override the redial and voice dial functions from the hard wired headphones. Basically, change the following applications in the\windows folder

\windows\redial.exe for the redial command

\windows\SDDialer.exe for the Cyberon voice dialer

An easier way to do this is to extract the zip enclosed (on your pc); then:

Step 1: Drop the files Redial.exe and SDDialer.exe into your \windows\ folder.

They will overwrite the original HTC apps, but don't worry, just delete those two files to get the originals back. I also enclose the originals in the .zip.

Ok, so extract the two files into \windows\.

Step 2: Next, somewhere on your PDA, find the app you want to launch instead of the double tap or long hold on the headset.

Make a shortcut to that app (use gsfinder or similar on your PDA). Then, you must rename the shortcut VJRedial.lnk or VJSDDialer.lnk as appropriate.

Step 3: Copy these two shortcuts into your \windows\ folder, and hey presto, customisable headset commands.

I have one configured to toggle the device lock state, and the other to launch a music player.

As I said, this is a pre-release of a portion of VJPoOf, which will allow you to customise most of the other buttons on the Blackstone as well, short and long power button presses, red button etc. Might do some other stuff too, later

Let me know if your device poofs into smoke.

​

V

Download link:

http://www.vijay555.com/vj/releases/vjpoof/vjpoof.zip

UPDATE:

Just for fun, I've released another tiny app from this suite I made to shut the Blackstone down instantly. It might work on other HTC phones, untested.

There will be no warnings, shutdown animations or anything, just instant power off (not standby), so please ensure you've finished working on whatever is open on your phone.

VJF-Off (VJFastOff)

http://www.vijay555.com/vj/releases/vjpoof/vjfastoff.exe
[Windows Mobile Apps and Games] Cheeze[iT]:
Does this mean that whatever I set the "hold call" button to do, it has to be the same? For instance I want that call button to be set to rotate screen and the press and hold on the headset to be MSVC and on the bluetooth to be MSVC. Is that possible?
[Windows Mobile Apps and Games] vijay555:
What is the "hold call" button? How do you achieve that? Wired headset single click etc?

There are two distinct actions created by the wired headset - double click (redial), and press and hold (voice dial).

Both of these functions can be remapped to separate replacement functions.

V
[Windows Mobile Apps and Games] egzthunder1:
Hey V!

Don't feel bad about us being dinosaurs. Even dinosaurs can be cool (and dangerously useful) :D

Anyways, good to see you back
[Windows Mobile Apps and Games] vijay555:
@egzthunder1 - great picture! Covers every eventuality...

It's nice to be back. I've been lurking for a few days - I got a Blackstone last week, got it unlocked, and rapidly un-installed all of the Touch-Slo stuff.

It's nice to be hacking again, 4 IDA windows disassembling, a hex-editor and rom dumps scattered across my desktop - feels just like the old days!

V
[Windows Mobile Apps and Games] egzthunder1:
If you want to have some fun, check out in the BA section (yes my BA is still alive and kickin!). One of the devs (sun_dream) has ported WM6.5 (or so it seems) although it is only an early beta (fast and very stable though). You could try to port it to the Blackstone and maybe even help these guys with the cHome app (codename Titanium). Good Luck!
[Windows Mobile Apps and Games] DeepShark:
Hi,

Sorry if my question is a newbie question (because I am one !), but when I try this one my HTC Touch HD (Blackstone), I can't copy the files in windows folder.

It tells me "Access denied" (in fact "Accès refusé" in French) when I want to copy your Redial.exe.

Is there "something" to unlock "somewhere" ? :-)

Thank you
[Windows Mobile Apps and Games] vijay555:
What are you using to copy the files?

If you use your PC, activesync, explore the PDA, and then find the \windows folder. Just drag the redial.exe file into \windows\.

If that doesn't work, please let us know what phone you're using, and if you've used anything to remove the security settings.

V
[Windows Mobile Apps and Games] ryomahino:
Hi Vijay, maybe you can help us; I have a wired remote control W100 for answer calls and control music player, but only works with WMP or AudioManager, can you make one app to intercept the signals of wired remote control w100 and use this signals to control another music player?

Thanks for your reply
[Windows Mobile Apps and Games] DeepShark:
Hi,

Thanks for your answer.

The first time, I was using the explorer on my mobile. But I just try with the explorer of my Vista (through ActiveSync) and it makes the same error.

My Phone is HTC Touch HD (Blackstone).

I haven't used anything to remove the security settings.

Maybe that's the problem ? Maybe by default there's no authorization to modifiy Windows folder ? What should I use to change this ?

Thanks
[Windows Mobile Apps and Games] Spiderm@n_:
Ok, but I have a E100 wired remote control and it behaves a bit differently. Any ideas?
[Windows Mobile Apps and Games] vijay555:
@ryomahino and @Spiderm@n_:

a long time back I wrote some hacks for the bluetooth headset, and believe that they can be expanded to redirect control functions of the wired headset.

I'll have to see if I can get hold of one - know anywhere I can get them cheap? The wife will have my cajones if she finds me buying more phone stuff!

@DeepShark - I'm not sure why you can't do that:

I've got an orange HTC blackstone, which was locked to Orange, but I got it unlocked. Then, I just ran the Modaco "Remove Security" cab to remove security warnings etc. I don't know if that changes things - I've never had much trouble overwriting in the \windows\ folder.

Try using GSFinder or similar (on your phone), and copy the file (the modified redial.exe), and then navigate to \windows\, and paste it into \windows\.

It should overwrite the old one.

Let me know if that helps.

V
[Windows Mobile Apps and Games] DeepShark:
@vijay555

Thanks for your advices but it still doesn't work...

I have installed GSFinder (nice tool !) and try again the copy : doesn't work.

Then I can see the proprties of redial.exe. It says "read only". When I try to change it, it says that it's impossible "these attributes cannot be changed".

I think it's maybe because it is written "Application (in ROM)", no ?

I have try also the removesecurity.cab but it changes nothing.

Am I alone to have this problem ? :-(

I really want to succeed because I very often redial somebody without really wanting it (because I press the button unvolontary).

Thanks for your help !
[Windows Mobile Apps and Games] vijay555:
Could somebody else try and see if it works for them?

@DeepShark - you don't need to change the file attributes etc of the files in \windows\ - you can normally just write over a file in \windows\ with a replacement, and the original will "disappear", (as it's in rom, not really replaced or deleted), and will reappear when you remove the fake redial.exe.

I'd be grateful if someone else can try with their phones - my phones are always heavily modified so not the best test cases. Please describe any success/failure and how your phone has been changed.

@DeepShark -what rom and operator are you on? What country?

V
[Windows Mobile Apps and Games] DeepShark:
ROM : 1.14.406.3 (22273) FRE

Country : France

Operator : Bouygues Telecom
[Windows Mobile Apps and Games] DeepShark:
STOP SEARCHING ! It works !!!

I don't know why, the copy now works. Maybe it's because I have do a soft reset a few minutes only...(?)

Thanks a lot for your patience Vijay555 ! Now I will do the following operations (I have prefered immediatly tell you that the copy has worked!)
[Windows Mobile Apps and Games] DeepShark:
Cool, when I press twice the button, it doesn't redial the last number now !!! This will avoid a lot of wrong calls I make very often !

A last question : in fact I don't want to make another action on the "double click" of the button. My wish is to do nothing at all in this case.

Now I have made no program in your .lnk file, so I get an error on my screen. Do you know a program I can call which do nothing ? (I know, it's strange but I hope you understand).

In the other case, I will keep your error message : it's better than make a wrong call !!

Thanks for this useful program you have made !
[Windows Mobile Apps and Games] vijay555:
Try this one.

VJAirHead - an empty executable

http://www.vijay555.com/vj/releases/vjairhead/vjairhead.exe

Glad it's working for you - let me know how it goes.

I have in mind doing a full audio/voice interface with clicks of the headset buttons to allow you to operate the phone remotely, but I think it'd just end up like this:

:)
​

V
[Windows Mobile Apps and Games] DeepShark:
Yeah, great :)

Thanks a lot, I can double click on the button and nothing happens, and no error message too !

Good luck if you try to do the full audio/voice interface !!!
[Windows Mobile Apps and Games] bbobeckyj:
Hi Vijay,

So what does this do that simply changing any 2 .exes, to 'redial.exe' & 'SDDialer.exe', & putting them into windows not do? (hopefully that makes sense).

I guess this must be just a small part of more to come?

Also when are you going to update your site?
[Windows Mobile Apps and Games] vijay555:
bbobeckyj: I use VJBrisk and it's bastard offspring because navigating into \windows\ is a pain in the ass, as it takes several minutes to cache icons and re-sort after replacing files etc (whether through activesync or on the device).

Hence, I replace 'redial.exe' & 'SDDialer.exe' with VJBrisk's that point to a shortcut, and the shortcuts points to a static folder on my SD Card.

That way, to change 'redial.exe' & 'SDDialer.exe', I merely need to go into my SD Card and change the ultimate target. This takes seconds, not minutes. When you're developing and changing these files often, it's a lot faster.

However, VJPoOf, the final product, is a selection of other similar hacks (either VJBrisk type redirections or low level hacks), to make better use of all of the hardware buttons on the Touch HD, eg remapping the power key, remaping the headset buttons etc. As you said, not all of this has been released yet, because I got distracted by other apps I'm writing, VJVirtualMouse and others which are more useful to me, for now.

Updating my website: not really sure, for years I've been hoping to do a major replacement, but I prefer to spend the hours and days it would take to do that coding instead. I don't get a lot of spare time, so I prefer to spend it on something useful to me. And anything I want to release, I release on XDA Devs first anyway!

V
[Windows Mobile Apps and Games] bbobeckyj:
You always seem to think it out best, I hate going into windows. Currently if I want to change a file in windows, I make the file in a new folder called windows and copy both to the root. I had not thought to make the shortcut fixed and point to second changable shortcut.
[Windows Mobile Apps and Games] ArchiGent:
hi vijay et al, i'm new to all this but i'm hoping your wired headset remapper is just what i'm looking for. it's a real shame that the wired headset doesn't come with a volume control like it did on the xda orbit. could someone tell me how to remap the voicedial so that it changes the volume. i'm ok up to swapping the file in windows, but after that i haven't a clue!! thanks
[Windows Mobile Apps and Games] bbobeckyj:
you'll need a prgram to change the volume also-
[Windows Mobile Apps and Games] ArchiGent:
thanks for the quick reply and attacment!! sorry to be a bit slow but i really could do with a step by step guide. do i still swap the windows files? how do i create a shortcut? how do i use the set volume prog? sorry i'm such a novice and i appreciate your help..
[Windows Mobile Apps and Games] bbobeckyj:
I'm about to post a comprehensive how to create .LNK files in a moment and link to it in my signature, I'll edit this post when done.

EDIT: http://xdaforums.com/showthread.php?p=3430671#post3430671
[Windows Mobile Apps and Games] ArchiGent:
thats great! i'm off to do some chores now, but will have a go later on! Thanks for all your help.
[Windows Mobile Apps and Games] vijay555:
VJFastOff

UPDATE:

Just for fun, I've released another tiny app from this suite I made to shut the Blackstone down instantly. It might work on other HTC phones, untested.

There will be no warnings, shutdown animations or anything, just instant power off (not standby), so please ensure you've finished working on whatever is open on your phone.

VJF-Off (VJFastOff)

http://www.vijay555.com/vj/releases/.../vjfastoff.exe
[Windows Mobile Apps and Games] bbobeckyj:
Works on diamond and trinity
[Windows Mobile Apps and Games] Daniel1515:
This is pretty good (thanks for the info about the EXEs that are run!), but I thought something with a nice GUI to change the button action would be good. So I started working on my own, mainly to learn about development of apps for phones (I'm mainly a web developer, so don't know too much about app development). It uses a "plugin" architecture to extend its capabilities (so, for example, there'll be a TouchFLO3D AudioManager plugin, a plugin to run any application, etc.)

Looks something like this at the moment:

Not yet functional, it gets the information about the plugins (which are managed .NET DLL files, one DLL can have one or more plugins in it) but doesn't save any of the settings.

Of course, when (and if) I release mine, I'll link to this topic :). I don't have much free time, so I'm not sure how long it'll take.
[Windows Mobile Apps and Games] vijay555:
@Daniel1515 that's a nice idea, and looks beautiful too.

So you're using launchable commands exported from the plugin dll?

That's a nice idea, although given the work you'll be putting into the concept and extensibility, I suggest you shoot higher - make it able to customise more phone functions that just the press and hold on the wired headset.

And why not make it a general hardware button customiser too? (ie on other phones, with proper hardware keys, remap the functionality of the volume keys, hang up key etc)?

You're framework could be a great place for other extension plugins to be plugged in to! [although I might be disqualified, I don't use .net, although I guess dlls are dlls in any language]

V
[Windows Mobile Apps and Games] Daniel1515:
Each plugin has one or more classes in it. Each class has some properties (Name, Description, etc.), a UserControl for the GUI config stuff at the bottom, and an "Execute" method to do whatever it is the plugin does.

I'm using C# and the .NET Framework 3.5. I still need to figure out how to save settings.

That's a good idea :). Not sure if I'll have time to do that, though (I'm a second-year university student so get busy at times). And I'm not too sure what else I can customise (the main thing I'm wanting to customise on my phone right now is the headset button).

I don't have any other phones to test with :(

.NET DLLs are special, they're not like ordinary DLLs. If you've ever used COM, they're a little bit like that. I don't know too much about coding (like I mentioned before, I'm mainly a web developer) so don't really know that much.

In any case, once I get it to a semi-usable state, I'll post the code somewhere :).
[Windows Mobile Apps and Games] 12aon:
Yes! I've been looking and asking around for something like this (I think). I would really like to have a two click next function to go with the regular HTC headset (like the iphone:o). I thought about how to include more functions any you could set a couple more with long and short press, although a triple longpress command is a bit over the top :). The next function alone would make my phone a lot more usable as mp3 player, thanks 12
[Windows Mobile Apps and Games] vijay555:
@12aon:have a look into VJPoOf and VJWMPlayerControl. I made them to do just that - press n hold to skip, double tap to play/pause.

V
[Windows Mobile Apps and Games] robned:
Hello guys,

This is exactly the features I have been looking forward to.

Any chance there will be an TF3D wired remote control for the Music? One tap, play / paus, Two taps changes to next track, Three taps previous?

There are several people out there who are asking for this since HTC Touch HD lacks this possibility.

I've come as far as I could in my knowledge, but can't handle the HTC drivers for the headset...

Any hope there will be somehting like this out soon? It would be a blast!
[Windows Mobile Apps and Games] Daniel1515:
I only know how to handle press and hold, and double tap (thanks to information posted by vijay555 in the first post in this topic, about the EXEs used). So I'm not sure how to add three taps or anything similar. There doesn't seem to be an API for this :(

In any case, I have limited free time, but I'll try to make a usable app. For any developers, the unfinished source code is up on GoogleCode - http://code.google.com/p/htcbutton/ (it'll compile and give the results in my screenshots, but won't really do anything useful just yet. Stuff isn't saved)
[Windows Mobile Apps and Games] izzyzc:
Hi! First of all, I think this is very good so as to be able to control how the handsfree works..

One problem though... I tried downloading the ZIP file, but it does not contain anything in it... Have you discontinued this?

I wonder if I was doing anything wrong... Please advise...

Thanks!
[Windows Mobile Apps and Games] 12aon:
Ah thanks, that's just great! Unfortunately I don't have my head set to try in out but I do have a question. I think the headset already has a play and pause button when clicking only once, would that mean I would then have two different ways to play and pause? Is it possible to have a volume control button that works like short press long press -> louder (the longer you hold the louder it gets) and the doing this again to make it softer. Just dreaming that would make my headset complete :), thanks a lot will try as soon as my neighbor returns from his skiing trip, 12
[Windows Mobile Apps and Games] TruckerJoe:
I'm still having some trouble getting this to work.

So, I replaced Redial and SDdialer with the files you provided. Then I made a shortcut to VJWMplayer with the commandline "next" and "playpause", renamed these to VJSDDialer.lnk and VJRedial.lnk and placed these in \Windows.

Now if I click on one of these files, Media Player does what its soposed to do, next track or pause.

BUT, if I connect the headset and double tap or hold, then a popup on the screen tells me:

"Didn't find 'VJSDDialer.lnk' or 'VJSDdialer.exe' in the launch directory '\windows'

command line: "

www.vijay555.com"

Did I miss something?
[Windows Mobile Apps and Games] jetherson:
I'm using Michy4.1 and my double-click (redial) on my wired headset isn't working.

Redial.exe is in \windows, so I'm wondering what could be wrong. Maybe it has something to do with my ROM? I remember a long time ago, my redial works.
[Windows Mobile Apps and Games] coucsou:
Hi,

ViJay, Nice to see you back on developpement ! I like (and use) your stuff since long time. Thanks.

I have an HTC Diamond and there are 3 actions with the button :

- press and hold

---- to hang up during conversation

---- to launch the voice dialer (SDDialer) application while not in conversation

- single press to toggle between standby mode and normal mode during conversation.

- double press to redial while not in conversation

So I guess there must be more than two exe files to replace. What are they ?

Another question : How can you be sure than these hard coded exe path are not triggered by another action ?

I tried VJFastOff on my diamond. It works.
[Windows Mobile Apps and Games] vijay555:
@coucsou:

Thanks for using my stuff! I've been here and away again, spent a couple of months trying to battle with a HUGE problem, all for the sake of a couple of pixels, but am glad to say that I persevered and got those $*!* pixels in the end! New things, coming soon....

On the Touch, the apps are redial.exe and sddialer.exe.

IIRC I checked if they were used elsewhere by doing a binary search for the filenames through the entire rom, and couldn't find them anywhere else.

Things may be different on the diamond, but there's a good chance they're the same as the Touch.

If there is an issue with the implementation in replacing redial.exe, a custom redial.exe (etc) app could be written to account for this, but it'd only be worth doing if you find somewhere else where redial.exe is being used. Another solution is to rewrite the headset driver, but ditto for PITA.

Hope that helps!

V
[Windows Mobile Apps and Games] coucsou:
Thanks for your anwser.

I'm am not able to check inside the diamond rom but there is no risk : at worst the alternative application will be launch by the other action.

You didn't answer about traking event during conversation (standby mode toggle ans hang up). Should I understand that there is no way to do it ?
[Windows Mobile Apps and Games] vijay555:
@coucsou - could you clarify your query, I'm afraid that I haven't had a chance to read and catch up everything yet, so my apologies.

But, from my reading of the headset driver, those were the two relevant .exes in the Touch. There may well be more, and there are very probably others in other phones. However, it's easy enough to check - if you replace redial and sddialer, does your Diamond continue to do what it did before?

I may well try to pull apart the Diamond rom at some point, and have a look further, once I've caught up with what's being going on in the last few weeks!

V
[Windows Mobile Apps and Games] coucsou:
You have a headset driver approach : you did found 2 executable names hard coded in the driver, then use a VJbrisk way to redirect the user action.

I have a event approach : I did reference every action possible with my headset (the ones I list in my first reply).

These actions can be split in two categories : "during conversation" and "while not in conversation".

- The "while not in conversation" actions are (well) handled by VJPoOF.

- I wonder whether there is a way to handle the ""during conversation" actions. Maybe it's impossible.

Hope this help.
[Windows Mobile Apps and Games] vijay555:
@coucsou: I understand what you're saying. I didn't (need to) look into that, but at a guess, why not just check what the current Window is, or if there is a window displayed with the title of the Phone.exe app when it's in a conversation. That way your replacement redial.exe etc can check if the phone is currently within a conversation.

Alternatively, use the State and Notification broker to check if there's a call ongoing, or use TAPI.

V
[Windows Mobile Apps and Games] coucsou:
I did install VJPoOf on my Diamond and it works perfectly (while not in conversation). Great job, thanks !

During conversation the standard behavior (conversation standby toggle and hang up) stands. Hence I have no "simple" way to handle the headset button action.

Using State and notification broker is a nice idea, but I'm not used to program in PDA environnement.

Is there any program that handle State and notification broker stuff (interface to subscribe to a change and in return event notification) ?

Thanks for you help.