If all else fails, contact Samsung Support with your proof of purchase. They are legally required to unlock your device if you own it. Do not pay street vendors for a "software unlock"—you can do it yourself in 10 minutes using the free tools described above.
The phone boots to a welcome screen. After selecting language and connecting to Wi-Fi, a pop-up appears saying: "This device was reset. To continue, sign in with a Google Account that was previously synced on this device." Bypass Google Verification on SAMSUNG Galaxy A40
This method exploits a software bug in older security patches of the Galaxy A40. If all else fails, contact Samsung Support with