Basically, as said in general the answer would be No. It though could be possible for some accessories, and those would be some that are using some kind of plug-in system, which would also need to be supporting loading plug-ins from other than ROM. Anyway, you would need to specify for what it is that you want to do and with what, then do extensive searching in here, our wiki and in teh internet in whole, and then if you haven't foudn your anwers yet, then ask again in here, and please then add real details on what you are trying to achieve.
Thanks for your responses, what i wanted to do is make my nokia E7 recognize a headset I just bought specifically the bose mie2 but when I plugged in to the phone a message appears saying "Accessory not supported" i did a quick search in the internet and found others with same problem but not that many answers, and i was wondering if it was possible to develop an app or a driver for symbian to support the headset but maybe is more of a hardware issue as you pointed out and as it says on other forums to, i'm going to try with an adapter and see if that works, or if any other ideas please let me know. Thanks again.
Instead, go for the Bose IE2 Audio Headphones and the Nokia AD-54. This will give the same functionality and comfort – even cheaper than MIE2
Or you keep your headset and go for the Nokia AD-87U – and pray. Therefore, creating a driver does not make sense.
Or your keep your headset and go for an additional 2,5mm to 3,5mm adapter and use the 2,5mm adapter which came with your headset – you need the one with the circle.
Additionally, make sure to put it fast, because Nokia Symbian tends to auto-detect the plug wrongly if put-in too slowly.
To answer your question: I am not aware of a possibility to change from Nokia A/V to AHJ by software. If something like this would exit, it would render you phone incompatible with all other Nokia accessories like the TV-out cable.