RIYADH (Reuters) - BlackBerry maker Research In Motion, aiming to avert a ban on its Messenger service in Saudi Arabia, has agreed to hand over coveted "codes" to users' phones, an industry source familiar with the talks told Reuters on Tuesday.