Chosen Solution

Ok I bought an iPhone 4 not to long ago and my device became iCloud locked when I restored it so my friend gave me her old iPhone 4s and it was iCloud locked as well with the same account as the 4 I purchased I did research everywhere on how to bypass the iCloud lock but nothing worked so can I replace the logic board or something to get into the phone?

You will have to go to Apple with proof that you are the original owner of the device in order to get it unlocked. Otherwise, you will have to contact the original owner and get them to remove the phone from their iCloud account with these steps:

  1. Go to iCloud.com on a computer 2, Click All Devices, select the device, then click Remove from Account.