Let's say you have an iPhone or an iPad, which is already activated, everything works, but you forgot your iCloud password or the person you've got it from didn't log out and now you can't track them. Or you're just bored and feel like playing with your device.
Anyhow, this tutorial is meant for those who have an activated device and would like to change the iCloud account/ disable the "Find my iPhone" feature. This was tested on an iPhone 5S on iOS 7.1.2. Pursue at your own risk.
The first step is to jailbreak the device using Pangu Jailbreak.
Once jailbroken, download and install: iFile, iCleaner and iFirewall iOS 7 from Cydia.
Open iFile, navigate to var/keychains/ and delete keychain-2.db. This will delete any stored passwords!
Restart your iPhone using the home and power button.
Now open iFirewall, add a new rule for "Settings" and choose "Deny All Connections" from the menu. In the same app, add a new rule for the domain "com.apple.com", denying all connections to that as well.
Open iCleaner, go to the first page and disable the "iCloud Daemon". Restart your iPhone.
Get into Settings, iCloud and "Find my iPhone" should now be off. Remove the account.
Get back to iCleaner, reenable the iCloud Daemon, get into Cydia and uninstall iFirewall iOS 7. Restart your device.
Go back into Settings and try creating a new account/ sign into your existing one. This step may challenge your patience as it will say that the server can't establish connections. Keep trying, it WILL work.
Once signed in, you will notice that find my iPhone on your new account is off. Turn it on, and make sure it stays so by closing the Settings app from the multitasking bar and reopening it. Find my iPhone should be on.
On your computer, sign into www.icloud.com and try to localize your device. Once viewed, try to play a sound on it. If it plays, choose "Erase iPhone".
Erasing process won't complete as you have jailbroken your phone, wait until the erasing status bar gets towards the end, put the device into DFU mode and restore with iTunes.
Your device will now need you to sign in with the Apple ID you have erased it with.
Important: DO NOT skip the erasing step and restore it. If you do so, it will ask you for the previous owner's account, even though you signed it with yours.
Hope this helps you guys, discovered most of that myself, with little help and putting together various tips and tricks from our beloved Google.
Please note that if this doesn't work for you I cannot be held responsible, try it at your own risk. Also, I have no idea how to bypass the activation screen so don't ask anything about that, this only works for already activated phones.