Food + basic psychology.
Chameleons are naturally very skittish. When you read about their natural environment, it all becomes quite clear really. They grow fast for a reasons and they are very aware of you being there for a reason. They see us as predators, by default. When fall comes in Yemen, the protective foliage is gone. Large percentage of them are picked off by other predators. Those that survive, have first dibs on females that hatch the next season. It's a very harsh existence.
Never try to grab them from above. Hell will break loose.
If he shows aggression when you approach, do not retreat. Be calm and stay put, unless you believe you will be bitten. Only retreat once he is calm again. Hand feed his favorite snacks and make those snacks ONLY available by hand feeding. If he doesn't bite, do not leave the food behind. Eventually you'll figure out which treats he likes best. Next, slowly move up the treat from your hand up your arm, so he eventually has to step on your hand to get to it.
Be very very very very very patient. Never try to force him. That's taking two steps back. I've made that mistake. It's counter productive. Eventually after weeks, maybe even months, he will be on your hand and will join you without much stress. Once he is outside, same rules apply. Take your time. If he shows signs of stress, keep him with you and be calm until he is calm. Only put a calm chameleon back in his cage. The logic is simple. If he gets all huffy and puffy and you retreat or return him to his cage, you will reinforce this behavior. Next time, he'll think that if he gets all worked up, it will work again and you'll be gone. Instead, if you "reward" him by retreating only when he is calm, he will eventually realize that being calm gets him what he wants. Of course, at that point, he may start to "enjoy" which is really more like tolerate you.
It's all about trust. Trust takes a long time to build up.