The US Federal Bureau of Investigation (FBI) is not amused with Apple and Google’s decision to encrypt smartphone data making it inaccessible to law-enforcement agencies.

Apple’s iOS 8 is using technology which will grant data access only to authorized users. Even the company cannot access user information without their consent.

Google is also planning to add automatic data encryption to its upcoming Android operating system, which would allow access only through password.

FBI director James Comey told reporters: "I like and believe very much that we should have to obtain a warrant from an independent judge to be able to take the contents of someone’s mobile device.

"What concerns me about this is companies marketing something expressly to allow people to place themselves beyond the law."

Both the companies are adding the new feature in the wake of widespread criticism over the spying of US intelligence agencies on mobile phone users across the world, and more than a year after the Snowden leaks.

Comey highlighted that the new technology could become a barrier to their rescue efforts, where access to cellphone data could save lives, such as during the acts of terrorism.

FBI officials are reportedly in talks with the companies to convince them to back out from their decision to not share user information.