Dial *#06# on the phone
Check the phone settings under About phone or About device
Look on the SIM tray or back of the device
Check the original box or packaging label
Check the purchase receipt or carrier documents
For iPhone, go to Settings > General > About
For Android, go to Settings > About phone > Status or IMEI information
