You aren't going to want to hear this but alot of this is your own fault. You have not been playing the office politics game, so you can't complain because you lost it.
Your real problem isn't favored guy unless he has some personal connection to the boss (Family member, old college buddy, coworker from a previous job) which your comment seems to say is not true. He doesn't sound like the backbiting, credit-stealing type of favored guy either.
What you need to do is learn to become favored guy yourself.
Step 1, look for differences in how he interacts with the boss. Then model your behavior on his as his is clearly effective. You are a developer and thus you should be fairly analytical, use those analytical sjkills to analyze how his interactions are differnt that yours. For instance when he is explaing things to the boss, how technical does he get compared to how technical the rest of you get?
At work I am one of the favored guys (well gals as the favored ones on my team are all women). Here is how I got there:
First step is to always keep the boss informed. That means letting him know immdiately if things will need to be pushed back, letting him know what is causing problems, letting him know what progress you have made. Among other things, it means letting the boss know when you leave early and why and, most importantly, where the project stands as a result of leaving early.
Follow the organizational norms for behavior. Don't act like a prima donna who deserves special treatment. For instance if everyone is expected to be there by 9:30, don't stroll in at 11 without letting your boss know why you are going to be later today. Your boss after all may not know you worked until midnight, he does know when you aren't there when he was looking for you.
Bosses live and die by information, they will almost always favor the people who they don't have to pull information out of. Know your own boss though, some don't like negative information (this one place where observing what favored guy says will help you see what your boss likes). You still may need to give him bad news, but be aware of how and when to do so.
Next step is to toot your own horn. Favored guy probably makes sure the boss knows when something is good (or can be interpreted as good). So he tells him about even small accomplishments. Don't expect to get credit for accomplishments if you don't tell the boss when you have accomplished something. Make sure he knows what you had to overcome to get it accomplished too especially when it is something major. Of course it really helps to be good at what you do to have accomplishments to toot your own horn about. Some favored guys (and the ones to be very wary of) toot their own horn about the accomplishments of others (i.e., they steal your credit), but by keeping the boss informed all long, it is harder for them to steal your credit.
Make sure your boss is aware of how other people view you (assuming ther view is positive of course). I work directly with clients and get a lot of written positive feedback from them in emails, I always forward these to my boss. When someone tells me that what I did was good, I ask them to tell my boss. If your users are avaiable to you, get them to tell him how much they liked the feature you just pushed to prod. The more sources a boss hears from that tell him that you are wonderful, the better he will think of you. Keep notes on such things for your performance review (mentioning the 15 client appreciation notes you got last year is quite effective!)
Start giving people public credit for their ideas and support them in technical discussions. This will make you look good as well as encourage them to give you credit for your good ideas or help you sell your idea. So when you have team discussion, make sure to say good things (Actual good things not made up ones) about your colleagues ideas including favored guy. When people explain things and the boss doesn't seem convinced, sometimes having others also agree that this is the best way to go will help. You have to give help to others to get help in return. This is a critical job skill.
You don't want to give the impression that you are jealous of or dislike favored guy. That will give the boss a negative impression of you since he already likes favored guy. If favored guy is a good guy, ask him to help you out a bit when you present something. By getting favored guy on board before the meeting, your ideas have a better chance of being listened too until you become a favored guy yourself. Favored guy can be a real asset in getting notice, use that asset.
Talk to the boss in business terms. Point out how your ehnacement will improve profits or make users or clients happier or whatever. Bosses don't care about technology as much as they care about the needs of the business. If you present your ideas in terms of cost-benefit to the business, your ideas will be much more likely to be accepted and implemented. Further when you have ideas, make them easy for the boss to implement them by doing all the work to get the proposal ready to implement. So don't just say we should do thus and so, show why you should and set things up to make it easy to implement. Having good ideas for improvement and sucessfully selling them to management will also help you become a favored guy.
Finally, never let your boss get blindsided by bad information from above. Even if he doesn't like bad news, if you know something is likely to be escalated (which can happen even when you are not at fault, so pay attention), he had better hear it from you first. Bosses are really annoyed when the they hear bad news from their boss before they hear it from you. This is part of the whole "keep them informed" thing, but it is imporatnt enough to bring out as a separate point. This also means you have to pay attention outside your own little world to know when people are getting upset becasue the feature doesn't work they way they wanted it to or because the deadline is being missed etc. These things may seem minor to you, but they are mnajor to your boss when his boss finishes dressing him down about it. If he knows the real story including the steps you took to keep people informed along the way before his boss calls him in, then he can defend his team more effectively and he looks better to his own boss for being informed.